]> git.saurik.com Git - bison.git/blob - ChangeLog
Split the default %destructor/%printer into two kinds: <*> and <!>.
[bison.git] / ChangeLog
1 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
2
3 Split the default %destructor/%printer into two kinds: <*> and <!>.
4 Discussed starting at
5 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
6 * NEWS (2.3a+): Mention.
7 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
8 previous change today related to mid-rules.
9 (Bison Symbols): Remove %symbol-default and add <*> and <!>.
10 * src/parser-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
11 (TYPE_TAG_ANY): Add as <*>.
12 (TYPE_TAG_NONE): Add as <!>.
13 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
14 for <*> and <!>.
15 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
16 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
17 * src/symlist.c (symbol_list_default_new): Split into tagged and
18 tagless versions.
19 (symbol_list_destructor_set, symbol_list_printer_set): Split
20 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
21 SYMLIST_DEFAULT_TAGLESS.
22 * src/symlist.h: Update symbol_list_default*_new prototypes.
23 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
24 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
25 * src/symtab.c (default_destructor, default_destructor_location,
26 default_printer, default_printer_location): Split each into tagged and
27 tagless versions.
28 (symbol_destructor_get, symbol_destructor_location_get,
29 symbol_printer_get, symbol_printer_location_get): Implement tagged
30 default and tagless default cases.
31 (default_destructor_set, default_printer_set): Split each into tagged
32 and tagless versions.
33 * src/symtab.h: Update prototypes.
34 * tests/actions.at (Default %printer and %destructor): Rename to...
35 (Default tagless %printer and %destructor): ... this, and extend.
36 (Per-type %printer and %destructor): Rename to...
37 (Default tagged and per-type %printer and %destructor): ... this, and
38 extend.
39 (Default %printer and %destructor for user-defined end token): Extend.
40 (Default %printer and %destructor are not for error or $undefined):
41 Update.
42 (Default %printer and %destructor are not for $accept): Update.
43 (Default %printer and %destructor for mid-rule values): Extend.
44 * tests/input.at (Default %printer and %destructor redeclared): Extend.
45 (Unused values with default %destructor): Extend.
46
47 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
48
49 Don't apply the default %destructor/%printer to an unreferenced midrule
50 value. Mentioned at
51 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
52 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
53 like $@n instead of just @n so that the default %destructor/%printer
54 logic doesn't see them as user-defined symbols.
55 (symbol_is_dummy): Check for both forms of the name.
56 * src/reader.c (packgram): Remove the `$' from each midrule symbol
57 name for which the midrule value is referenced in any action.
58 * tests/actions.at (Default %printer and %destructor for mid-rule
59 values): New test.
60 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
61 for change to dummy symbol names.
62
63 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
64
65 Warn about unset midrule $$ if the corresponding $n is used.
66 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
67 $n usage.
68 (packgram): Before invoking grammar_rule_check on any rule, make sure
69 all actions have already been scanned in order to set `used' flags.
70 Otherwise, checking that a midrule's $$ is set will not always work
71 properly because the midrule check must forward-reference the midrule's
72 parent rule.
73 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
74 warning.
75
76 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
77
78 More improvements to the documentation of the prologue alternatives:
79 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
80 Bison manual.
81 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
82 some text to clarify the relative importance of the new directives and
83 to show how these directives may be viewed as code labels.
84
85 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
86
87 Similar to the recently removed %before-header, add %code-top as the
88 alternative to the pre-prologue. Mentioned at
89 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
90 Also, let the prologue alternatives appear in the grammar section.
91 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
92 (prologue_declaration): Move the existing prologue alternatives to...
93 (grammar_declaration): ... here and add %code-top.
94 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
95
96 Clean up and extend documentation for the prologue alternatives.
97 * NEWS (2.3a+): Describe prologue alternatives.
98 * doc/bison.texinfo (Prologue): Move discussion of prologue
99 alternatives to...
100 (Prologue Alternatives): ... this new section, and extend it to discuss
101 all 4 directives in detail.
102 (Bison Symbols): Clean up discussion of prologue alternatives and add
103 %code-top.
104
105 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
106
107 DJGPP specific issues.
108
109 * djgpp/config.bat: config.hin has been moved to lib. Adjust
110 config.bat accordingly.
111 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
112 * djgpp/config.site: Likewise.
113
114 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
115
116 Replace %*-header with %provides, %requires, %code. See discussion at
117 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
118
119 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
120 (b4_user_start_header): Remove.
121 * data/glr.c: Use new macros instead of b4_*start_header
122 and b4_*end_header.
123 * data/glr.cc: Likewise.
124 * data/lalr1.cc: Likewise.
125 * data/push.c: Likewise.
126 * data/yacc.c: Likewise.
127
128 * doc/bison.texinfo: Remove %before-header, rename
129 %{start,end,after}-header to %requires, %provides, %code.
130
131 * src/parse-gram.y: Likewise (also rename token names accordingly).
132 * src/scan-gram.l: Likewise.
133 * tests/actions.at: Likewise.
134
135 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
136
137 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
138 Problem reported by Joel E. Denny.
139
140 2006-10-14 Jim Meyering <jim@meyering.net>
141
142 (Sync from coreutils.)
143 Work also when the working directory (with e.g. coreutils sources)
144 is version controlled with git, rather than CVS.
145 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
146 rather than CVS.
147 In messages and comments, say e.g., "checked-out sources",
148 rather than "CVS sources".
149 (version_controlled_file): New function. Work for git as well as
150 for CVS. Don't use grep's -q option.
151 (slurp): Call it here, in place of CVS-specific code.
152
153 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
154
155 Fix testsuite for ./configure --enable-gcc-warnings:
156 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
157 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
158 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
159 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
160 * test/regression.at (Diagnostic that expects two alternatives):
161 Likewise.
162
163 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
164
165 * bootstrap.conf (gnulib_modules): Add config-h.
166 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
167 worry about HAVE_CONFIG_H.
168 * lib/abitset.c: Likewise.
169 * lib/bitset.c: Likewise.
170 * lib/bitset_stats.c: Likewise.
171 * lib/bitsetv-print.c: Likewise.
172 * lib/bitsetv.c: Likewise.
173 * lib/ebitset.c: Likewise.
174 * lib/get-errno.c: Likewise.
175 * lib/lbitset.c: Likewise.
176 * lib/subpipe.c: Likewise.
177 * lib/timevar.c: Likewise.
178 * lib/vbitset.c: Likewise.
179 * lib/bitset.c: Include "bitset.h" first, to test interface.
180 * lib/bitset_stats.c: Include "bitset_stats.h" first.
181 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
182 * lib/bitsetv.c: Include "bitsetv.h" first.
183 * lib/get-errno.c: Include "get-errno.h" first.
184 * m4/.cvsignore: Add config-h.m4.
185 * tests/actions.at (Default %printer and %destructor for ...):
186 Adjust expected line numbers in output to reflect removal of #if
187 HAVE_CONFIG_H lines.
188 * tests/glr-regression.at (Missed %merge type warnings when ...):
189 Likewise.
190 * tests/regression.at (Braced code in declaration in rules section):
191 Likewise.
192 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
193 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
194 Include <config.h> unconditionally.
195
196 * bootstrap: Sync from coreutils, as follows:
197
198 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
199
200 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
201 variable was sometimes used without being initialized. This
202 messed up the installation of the INSTALL file in some cases.
203
204 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
205
206 * bootstrap (usage, main program, symlink_to_gnulib): Add option
207 --copy. Inspired by a suggestion from Bruno Haible.
208
209 2006-10-03 Jim Meyering <jim@meyering.net>
210
211 * bootstrap: Undo last change to this file, since now gnulib-tool
212 sticks with the automake default in generating dependencies.
213
214 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
215
216 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
217 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
218
219 * doc/bison.1: Add copyright notice.
220
221 * data/glr.c: Don't include <stdarg.h>; not used.
222
223 * NEWS: The -g and --graph options now output graphs in Graphviz
224 DOT format, not VCG format.
225 * doc/bison.1: Likewise.
226 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
227 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
228 of this change in
229 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
230 * TODO: Remove Graphviz entry.
231 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
232 remove vcg.c, vcg.h, vcg_defaults.h.
233 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
234 * src/graphviz.c, src/graphviz.h: New files.
235 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
236 * src/files.h: Make comment more generic.
237 * src/main.c (main): Likewise.
238 * src/print_graph.h: Likewise.
239 * src/getargs.c (usage): Make usage description more generic.
240 * src/print_graph.c: Include graphviz.h rather than vcg.h.
241 (static_graph, fgraph): Remove. All uses changed to pass
242 arguments instead of sharing a static var.
243 (print_core, print_actions, print_state, print_graph):
244 Output graphviz format rather than VCG format.
245 * tests/.cvsignore: Remove *.vcg; add *.dot.
246 * tests/output.at: Expect *.dot files, not *.vcg files.
247
248 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
249 accommodates the 2006-10-08 change.
250
251 2006-10-11 Bob Rossi <bob@brasko.net>
252
253 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
254 (b4_yyssa, b4_yyerror_range): New macros.
255 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
256 (yypvarsinit): Remove init of removed fields.
257 (yypushparse): Remove use of removed fields; use new macros instead.
258
259 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
260
261 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
262 in a push parser. Reindent slightly to match yacc.c better.
263
264 2006-10-11 Bob Rossi <bob@brasko.net>
265
266 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
267 yymsg_alloc fields.
268 (yypvarsinit, yypushparse): Remove init of removed fields.
269 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
270
271 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
272
273 * THANKS: Add Paolo Bonzini and Bob Rossi.
274
275 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
276
277 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
278 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
279 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
280 b4_define_user_cde and uses): Remove.
281 (b4_comment, b4_prefix, b4_sync_start): New.
282 * data/bison.m4: New file, with most of the content removed from c.m4.
283 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
284 * src/output.c (output_skeleton): Pass bison.m4.
285 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
286 only if specified.
287
288 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
289
290 Fix test failure reported by Tom Lane in
291 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
292 and try to make such failures easier to catch in the future.
293 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
294 that's now the caller's responsibility.
295 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
296 Set yychar = YYEOF if it's negative.
297 * tests/actions.at (yylex): Abort if asked to read past EOF.
298 * tests/conflicts.at (yylex): Likewise.
299 * tests/cxx-type.at (yylex): Likewise.
300 * tests/glr-regression.at (yylex): Likewise.
301 * tests/input.at (yylex): Likewise.
302 * tests/regression.at (yylex): Likewise.
303 * tests/torture.at (yylex): Likewise.
304
305 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
306
307 Fix problems with translating English-language diagnostics.
308 * bootstrap: Fix bug introduced in recent bootstrap changes, with
309 respect to bison-runtime pot generation. The YY_ stuff
310 wasn't being captured.
311 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
312 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
313 * runtime-po/POTFILES.in: Add data/push.c.
314
315 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
316
317 Merge bootstrap changes from coreutils.
318
319 2006-09-28 Jim Meyering <jim@meyering.net>
320
321 Automatically generated dependencies are important even
322 when all of the sources in a directory come from gnulib.
323 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
324 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
325
326 2006-09-23 Jim Meyering <jim@meyering.net>
327
328 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
329
330 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
331
332 * bootstrap: Add support for --force.
333 (usage): New function. Describe usage less tersely.
334 (CVS_only_file): New var.
335
336 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
337
338 * data/push.c (YYPUSH_MORE): Make it an enum instead.
339 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
340 Adjust white space and comments to match GNU style better.
341
342 2006-09-20 Bob Rossi <bob@brasko.net>
343
344 * data/push.c (yyresult_get): Remove function.
345 (YYPUSH_MORE): Add #define.
346 (yypushparse): Modify return value.
347
348 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
349
350 * stamp-h.in: Remove; no longer needed.
351 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
352 Remove config.h, config.hin, intl (no longer created).
353 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
354 stamp-h1.
355
356 Sync bootstrap from coreutils, as follows:
357
358 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
359
360 * bootstrap (symlink_to_gnulib): New function.
361 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
362 to copies-of-gnulib.
363 (cp_mark_as_generated, slurp, gnulib_files):
364 Avoid making a copy if it's the same as the old version.
365 (gnulib_files): Add support for this variable (used by Bison).
366
367 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
368
369 * src/getargs.c (usage): Rework to use conventions similar to
370 coreutils, to make translation a bit easier and the code a bit
371 smaller. Problem reported by Tim Van Holder.
372
373 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
374
375 Use some of gnulib's new modules, taken from coreutils.
376
377 * bootstrap: Sync from coreutils, except add support for gnulib_files.
378 * bootstrap.conf: New file.
379 (gnulib_modules): Add configmake, inttypes, unistd.
380 (XGETTEXT_OPTIONS): Add complain, complain_at,
381 fatal, fatal_at, warn, warn_at, unexpected_end.
382 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
383 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
384 (gl_EARLY): Add.
385 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
386 (gl_INIT): Add
387 (GNULIB_AUTOCONF_SNIPPET): Remove.
388 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
389 the pickiest.
390 * lib/.cvsignore: Add inttypes_.h.
391 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
392 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
393 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
394 no-longer-necessary initializations.
395 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
396 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
397 use the unistd module.
398 * src/system.h: Likewise.
399 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
400 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
401 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
402 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
403 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
404 * src/system.h: Include inttypes.h unconditionally, now that we
405 use the inttypes module. Don't bother to include stdint.h, since
406 inttypes.h now does that for us.
407 (LOCALEDIR): Remove, now that we use the configmake module.
408 * src/getargs.c: Include configmake.h.
409 * src/main.c: Likewise.
410 * src/output.c: Likewise.
411 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
412 not from $abs_top_builddir, since config.h moved.
413
414
415 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
416 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
417
418 * src/parse-gram.y (symbol_declaration): Don't put statements
419 before declarations; it's not portable to C89.
420 * src/scan-code.l (handle_action_at): Likewise.
421
422 * src/scan-code.l: Always initialize braces_level; the old code
423 left it uninitialized and therefore had undefined behavior.
424
425 Don't attempt to redefine 'assert', since it runs afoul of
426 systems where standard headers (mistakenly) include <assert.h>.
427 Instead, define and use our own alternative, called 'aver'.
428 * src/reader.c: Don't include assert.h, since we no longer
429 use assert.
430 * src/scan-code.l: Likewise.
431 * src/system.h (assert): Remove, replacing with....
432 (aver): New function, taking a bool arg. All uses changed.
433 * src/tables.c (pack_vector): Ensure that aver arg is bool,
434 not merely an integer.
435
436 2006-09-15 Bob Rossi <bob@brasko.net>
437
438 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
439 * data/c.m4 (YYPUSH): New.
440 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
441 * src/getargs.c (push_parser): New var.
442 * src/getargs.h (push_parser): New declaration.
443 * src/output.c (prepare): Add macro insertion of `push_flag'.
444 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
445 (prologue_declaration): Parse %push-parser.
446 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
447 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
448 list of removed lines from the traces observed.
449 (AT_CHECK_CALC_LALR): Added push parser tests.
450
451 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
452
453 * NEWS: Version 2.3a.
454 * configure.ac (AC_INIT): Likewise.
455
456 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
457 "#define YYSTYPE int" that caused "make maintainer-check" to fail
458 due to header ordering dependencies. I don't know why the #define
459 was there.
460
461 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
462 runtime cost when YYDEBUG is not defined, and so that some tests
463 that used to fail now work. Problem and initial suggestion by
464 Paolo Bonzini.
465 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
466 * data/glr.cc (b4_parser_class_name):
467 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
468 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
469 (yydebug_) [YYDEBUG]: New member.
470 (yycdebug_): Now defined only if YYDEBUG.
471 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
472 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
473 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
474 if YYYDEBUG.
475 (debug_stream, set_debug_stream, debug_level, set_debug_level):
476 Define only if YYDEBUG.
477 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
478 set_debug_level.
479 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
480 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
481 AT_CHECK_CALC_GLR_CC that are working now.
482
483 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
484
485 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
486 We don't need them in glr.cc, and glr.c defines them.
487 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
488 assumes that defining it to anything is the same as defining
489 it to 1. Problem reported by Paolo Bonzini.
490
491 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
492
493 * data/c.m4 (b4_null, b4_case): Define.
494 * src/output.c (prepare_symbols): Use b4_null.
495 (user_actions_output): Use b4_case.
496
497 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
498
499 * data/glr.c (b4_shared_declarations): Put start-header first,
500 before any #includes that we generate, so that feature-test
501 macros work. Problem reported by Michael Deutschmann in
502 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
503 * data/lalr1.cc: Likewise.
504 * doc/bison.texinfo (Prologue): Document that feature-test macros
505 should be defined before any Bison declarations.
506 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
507 that depend on location.hh after, not before, Bison decls, since
508 we now include location.hh after the first user prologue.
509
510 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
511 Sander Brandenburg in
512 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
513 Also, fix minor white space and comment issues.
514 (Prologue): Mention that it's better to define feature-test macros
515 before Bison declarations. Problem reported by Michael Deutschmann.
516
517 * README-cvs: Fix typo: "&" should be "&&". Problem reported
518 by Jim Meyering.
519 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
520 This adjusts to recent gnulib changes.
521
522 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
523
524 Finish implementation of per-type %destructor/%printer. Discussed
525 starting at
526 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
527 and
528 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
529 * NEWS (2.3+): Add a description of this feature to the default
530 %destructor/%printer description.
531 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
532 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
533 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
534 list node contains a semantic type.
535 * src/symtab.c, src/symtab.h: Extend with a table that associates
536 semantic types with their %destructor's and %printer's.
537 (semantic_type_from_uniqstr, semantic_type_get,
538 semantic_type_destructor_set, semantic_type_printer_set): New functions
539 composing the public interface of that table.
540 (symbol_destructor_get, symbol_destructor_location_get,
541 symbol_printer_get, symbol_printer_location_get): If there's no
542 per-symbol %destructor/%printer, look up the per-type before trying
543 the default.
544 * tests/actions.at (Per-type %printer and %destructor): New test case.
545 * tests/input.at (Default %printer and %destructor redeclared):
546 Extend to check that multiple occurrences of %symbol-default in a
547 single %destructor/%printer declaration is an error.
548 (Per-type %printer and %destructor redeclared, Unused values with
549 per-type %destructor): New test cases.
550
551 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
552
553 Require default %destructor/%printer to be declared using
554 %symbol-default instead of an empty symbol list, and start working on
555 new per-type %destructor/%printer. Discussed at
556 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
557 * NEWS (2.3+): Add %symbol-default to example.
558 * bison.texinfo (Freeing Discarded Symbols): Likewise.
559 (Bison Symbols): Add entry for %symbol-default.
560 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
561 (generic_symlist, generic_symlist_item): New nonterminals for creating
562 a list in which each item is a symbol, semantic type, or
563 %symbol-default.
564 (grammar_declaration): Use generic_symlist in %destructor and %printer
565 declarations instead of symbols.1 or an empty list.
566 (symbol_declaration, precedence_declaration, symbols.1): Update actions
567 for changes to symbol_list.
568 * src/reader.c: Update for changes to symbol_list.
569 * src/scan-code.l: Likewise.
570 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
571 * src/symlist.c, src/symlist.h: Extend such that a list node may
572 represent a semantic type or a %symbol-default in addition to just an
573 ordinary symbol. Add switched functions for setting %destructor's and
574 %printer's.
575 * tests/actions.at, tests/input.at: Add %symbol-default to all default
576 %destructor/%printer declarations.
577
578 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
579
580 Whether the default %destructor/%printer applies to a particular symbol
581 isn't a question of whether the user *declares* that symbol (in %token,
582 for example). It's a question of whether the user by any means
583 *defines* the symbol at all (by simply using a char token, for
584 example). $end is defined by Bison whereas any other token with token
585 number 0 is defined by the user. The error token is always defined by
586 Bison regardless of whether the user declares it with %token, but we
587 may one day let the user define error as a nonterminal instead.
588 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
589 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
590 the meaning of "user-defined".
591 * tests/actions.at (Default %printer and %destructor for user-declared
592 end token): Rename to...
593 (Default %printer and %destructor for user-defined end token): ...
594 this.
595
596 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
597 computation of whether to apply the default, don't maintain a list of
598 every Bison-defined symbol. Instead, just check for a first character
599 of '$', which a user symbol cannot have, and check for the error token.
600
601 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
602
603 Don't apply the default %destructor or %printer to the error token,
604 $undefined, or $accept. This change fits the general rule that the
605 default %destructor and %printer are only for user-declared symbols,
606 and it solves several difficulties that are described in the new test
607 cases listed below.
608 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
609 * tests/actions.at (Default %printer and %destructor are not for error
610 or $undefined, Default %printer and %destructor are not for $accept):
611 New test cases.
612
613 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
614
615 Allow %start after the first rule.
616 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
617 when parsing the first rule.
618 (check_and_convert_grammar): Search for it here after all grammar
619 declarations have been parsed. Skip midrules, which have dummy LHS
620 nonterminals.
621 * src/symtab.c (symbol_is_dummy): New function.
622 * src/symtab.h (symbol_is_dummy): Declare it.
623 * tests/input.at (%start after first rule): New test.
624
625 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
626
627 Redo some of the previous commit: add back the ability to use
628 non-aliased/undeclared string literals since it might be useful to
629 those declaring %token-table.
630 * src/reader.c (check_and_convert_grammar): Undo changes in previous
631 commit: don't worry about complaints from symbols_pack.
632 * src/symtab.c (symbol_new, symbol_class_set,
633 symbol_check_alias_consistency): Undo changes in previous commit: count
634 each string literal as a new symbol and token, assign it a symbol
635 number, and don't complain about non-aliased string literals.
636 (symbols_pack): Since symbol_make_alias still does not decrement symbol
637 and token counts but does still set aliased tokens to the same number,
638 symbol_pack_processor now leaves empty slots in the symbols array.
639 Remove those slots.
640 * tests/regression.at (Undeclared string literal): Remove test case
641 added in previous commit since non-aliased string literals are allowed
642 again.
643 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
644 remove unnecessary string literal declarations.
645 * tests/sets.at (Firsts): Likewise.
646
647 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
648
649 Don't allow an undeclared string literal, but allow a string literal to
650 be used before its declaration.
651 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
652 symbols_pack complained.
653 * src/symtab.c (symbol_new): Don't count a string literal as a new
654 symbol.
655 (symbol_class_set): Don't count a string literal as a new token, and
656 don't assign it a symbol number since symbol_make_alias does that.
657 (symbol_make_alias): It's not necessary to decrement the symbol and
658 token counts anymore. Don't assume that an alias declaration occurs
659 before any uses of the identifier or string, and thus don't assert that
660 one of them has the highest symbol number so far.
661 (symbol_check_alias_consistency): Complain if there's a string literal
662 that wasn't declared as an alias.
663 (symbols_pack): Bail if symbol_check_alias_consistency failed since
664 symbol_pack asserts that every token has been assigned a symbol number
665 although undeclared string literals have not.
666 * tests/regression.at (String alias declared after use, Undeclared
667 string literal): New test cases.
668 (Characters Escapes, Web2c Actions): Declare string literals as
669 aliases.
670 * tests/sets.at (Firsts): Likewise.
671
672 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
673
674 In the grammar scanner, STRING_FINISH unclosed constructs and return
675 them to the parser in order to improve error messages.
676 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
677 SC_BRACED_CODE, SC_PROLOGUE): Implement.
678 * tests/input.at (Unclosed constructs): New test case.
679 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
680 seen.
681
682 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
683 unused global.
684
685 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
686
687 Handle string aliases for character tokens correctly.
688 * src/symtab.c (symbol_user_token_number_set): If the token has an
689 alias, check and set its alias's user token number instead of its own,
690 which is set to indicate the alias. Previously, every occurrence of
691 the character token in the grammar overwrote that alias indicator with
692 the character code.
693 * tests/input.at (String aliases for character tokens): New test.
694
695 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
696
697 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
698
699 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
700
701 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
702 to prevent failures when building on older platforms.
703 Check for autopoint failure.
704 Set XGETTEXT_OPTIONS to values that check for C format strings,
705 so that translators are warned about them (this also helps
706 prevent core dumps).
707
708 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
709 function, since it simplifies our code a bit.
710
711 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
712 rather than -W, so we don't get bogus warnings about sign comparisons.
713 Add -Wpointer-arith, since that warning is useful (it reports code
714 that does not conform to C89 and that some compilers reject).
715 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
716 since it's no longer needed.
717
718 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
719
720 Clean up scanners a bit.
721 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
722 definitions so gcc won't warn when obstack_for_string is unused.
723 * src/scan-code.l: config.h and system.h are already #include'd by
724 scan-code-c.c, so get rid of them here.
725 * src/scan-gram.l: Likewise.
726 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
727 definitions rather than duplicating the rest of it.
728 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
729
730 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
731
732 Suppress signed/unsigned comparison warnings for yycheck.
733 * data/c.m4 (b4_safest_int_type): New macro.
734 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
735 a signed int type, cast it to b4_safest_int_type first.
736 * data/yacc.c: Likewise.
737 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
738 also overwritten.
739
740 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
741
742 * doc/bison.texinfo: Fix some typos.
743
744 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
745
746 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
747 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
748
749 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
750 the latest gnulib does this a different way.
751 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
752 translation was patched, so stop omitting it.
753
754 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
755
756 Enable declaration of default %printer/%destructor. Make the parser
757 use these for all user-declared grammar symbols for which the user does
758 not declare a specific %printer/%destructor. Thus, the parser uses it
759 for token 0 if the user declares it but not if Bison generates it as
760 $end. Discussed starting at
761 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
762 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
763 and
764 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
765 * NEWS (2.3+): Mention.
766 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
767 declare a %destructor for a mid-rule's semantic value. It's just
768 impossible to declare one specific to it.
769 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
770 code. Describe default %destructor form.
771 * src/parse-gram.y (grammar_declaration): Parse default
772 %printer/%destructor declarations.
773 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
774 and symbol_destructor_location_get rather than accessing the destructor
775 and destructor_location members of struct symbol.
776 (symbol_printers_output): Likewise but for %printer's.
777 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
778 again.
779 * src/symtab.c (default_destructor, default_destructor_location,
780 default_printer, default_printer_location): New static global
781 variables to record the default %destructor and %printer.
782 (symbol_destructor_get, symbol_destructor_location_get,
783 symbol_printer_get, symbol_printer_location_get): New functions to
784 compute the appropriate %destructor and %printer for a symbol.
785 (default_destructor_set, default_printer_set): New functions to set the
786 default %destructor and %printer.
787 * src/symtab.h: Prototype all those new functions.
788 * tests/actions.at (Default %printer and %destructor): New test to
789 check that the right %printer and %destructor are called, that they're
790 not called for $end, and that $$ and @$ work correctly.
791 (Default %printer and %destructor for user-declared end token): New
792 test to check that the default %printer and %destructor are called for
793 a user-declared end token.
794 * tests/input.at (Default %printer and %destructor redeclared, Unused
795 values with default %destructor): New tests to check related grammar
796 warnings and errors.
797
798 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
799
800 Clean up handling of %destructor for the end token (token 0).
801 Discussed starting at
802 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
803 and
804 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
805
806 Make the skeletons consistent in how they pop the end token and invoke
807 its %destructor.
808 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
809 state, which has token number 0, since this would invoke the
810 %destructor for the end token.
811 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
812 until after shifting the end token, or else it won't be popped.
813 * data/yacc.c (yyparse): Likewise.
814
815 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
816 it's the end token. Upon termination, destroy an unshifted lookahead
817 even when it's the end token.
818 * data/lalr1.cc (yy::parser::parse): Likewise.
819 * data/yacc.c (yyparse): Likewise.
820
821 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
822 value warnings for the end token when the user gives the end token a
823 %destructor.
824
825 * tests/actions.at (Printers and Destructors): Test all the above.
826
827 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
828
829 Update to latest gnulib and gettext versions.
830 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
831 Add fopen-safer.
832 (gnulib_files): Add m4/warning.m4. Don't worry about files
833 overwritten by autopoint.
834 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
835 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
836 rejects them.
837 Don't use autoreconf; instead, invoke autopoint etc. by hand,
838 so that we can remove the intl files at a better time.
839 (intl_files_to_remove): Remove aclocal.m4, since it gets
840 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
841 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
842 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
843 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
844 Remove datarootdir hack; no longer needed.
845 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
846 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
847 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
848 strdup.h.
849 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
850 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
851
852 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
853
854 * bootstrap: Adjust to today's change to gnulib-tool by invoking
855 it with --assume-autoconf='latest-stable'.
856
857 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
858
859 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
860 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
861 YYSTYPE' and `{'.
862 * src/muscle_tab.h (muscle_grow): Replace the header comments with
863 those from muscle_tab.c since the old ones are misleading.
864
865 2006-07-13 Akim Demaille <akim@epita.fr>
866
867 Support %define "KEY" {VALUE}.
868 * src/scan-code.h, src/scan-code.l (translate_action)
869 (translate_rule_action, translate_symbol_action, translate_code):
870 Return char *, not const char *.
871 * src/parse-gram.y (declaration): Rename as...
872 (prologue_declaration): this.
873 (string_content): Remove this nonterminal, use STRING.
874 (braceless, content, content.opt): New nonterminal.
875 Use them.
876 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
877 as value.
878 * src/scan-gram.l (getargs.h): Don't include it.
879
880 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
881
882 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
883 rather than a for-loop that declares a local bool variable. This
884 should work around a compatibility problem with a Cray x1e C++
885 compiler reported by Hung Nguyen in
886 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
887 The for-loop was introduced in the 2004-11-17 change but I don't
888 know why it was needed.
889
890 2006-07-12 Akim Demaille <akim@epita.fr>
891
892 * data/c.m4: Comment changes.
893
894 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
895
896 * src/complain.c (error_message, ERROR_MESSAGE): New.
897 To factor...
898 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
899 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
900
901 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
902
903 * NEWS: Instead of %union, you can define and use your own union type
904 YYSTYPE if your grammar contains at least one <type> tag.
905 Your YYSTYPE need not be a macro; it can be a typedef.
906 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
907 (Union Decl, Decl Summary): Document this.
908 * data/glr.c (YYSTYPE): Implement this.
909 * data/glr.cc (YYSTYPE): Likewise.
910 * data/lalr1.cc (YYSTYPE): Likewise.
911 * data/yacc.c (YYSTYPE): Likewise.
912 * src/output.c (prepare): Output tag_seen_flag.
913 * src/parse-gram.y (declaration, grammar_declaration):
914 Use 'union_seen' rather than 'typed' to determine whether
915 %union has been seen, since grammars can now be typed without
916 %union.
917 (symbol_declaration, type.opt, symbol_def):
918 Keep track of whether a tag has been seen.
919 * src/reader.c (union_seen, tag_seen): New vars.
920 (typed): remove.
921 * src/reader.h (union_seen, tag_seen, typed): Likewise.
922 * src/scan-code.l (untyped_var_seen): New variable.
923 (handle_action_dollar): Adjust to above changes.
924 (handle_action_dollar, handle_action_at):
925 Improve overflow checking for outlandish numbers.
926 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
927 avoid new diagnostics generated by above changes.
928 * tests/regression.at (YYSTYPE typedef): Add test to check
929 for type tags without %union.
930
931 * src/symlist.c (symbol_list_length): Return int, not unsigned
932 int, since callers expect int. This may need to get revisited
933 once we have proper integer overflow checking.
934
935 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
936 object is now static.
937
938 * src/getargs.c (flags_argmatch): Return void, not int,
939 to pacify ./configure --enable-gcc-warnings.
940
941 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
942 since last_string is already defined to FLEX_PREFIX (last_string).
943
944 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
945
946 Implement --warnings/-W.
947 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
948 replaced by...
949 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
950 Adjust callers.
951 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
952 (warnings_args, warnings_types): New.
953 (getargs, short_options, long_options): Accept -W/--warnings.
954 Sort the options by alphabetical order, upper case letter right
955 before its lower case.
956
957 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
958
959 Change %merge result type clash warnings to errors. Discussed at
960 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
961 * src/reader.c (record_merge_function_type): Use complain_at.
962 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
963 declared later): Update test case results.
964
965 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
966
967 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
968 to be in alphabetical order.
969 (trace_args): Spelling fixes.
970
971 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
972
973 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
974 so they don't collide with user-defined macros.
975 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
976 this was never guaranteed, and now that we're using gnulib stdint,
977 which defines int_fast16_t to long int, the problem is exposed.
978
979 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
980
981 * data/c.m4 (b4_basename): Simplify a bit, since we don't
982 need the full POSIX semantics (and weren't implementing them
983 anyway).
984
985 Adjust to Autoconf 2.60 and today's gnulib.
986 * bootstrap (gnulib_modules): Add stdint.
987 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
988 no longer copies it.
989 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
990 since stdint needs the former and wcwidth (which is now required
991 by mbswidth) needs the latter.
992 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
993 work around a compatibility glitch between gettext 0.14.6 and
994 Autoconf 2.60.
995 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
996 Do not check for uintptr_t, since new stdint module does the right
997 thing.
998 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
999 Add stdint.h, stdint_.h, wcwidth.h.
1000 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
1001 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
1002 stdint.m4, wchar_t.m4, wcwidth.m4.
1003 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
1004 usual order for ../lib/*.h files.
1005 (file_name_split): Use last_component, not base_name, to adjust
1006 to gnulib changes.
1007 * src/parse-gram.h: Include <strverscmp.h> in the usual order
1008 for ../lib/*.h files.
1009 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
1010 Define unconditionally, since we now assume the stdint module.
1011 * src/scan-skel.l: Include <dirname.h>.
1012 (BASE_QPUTS): Use last_component, not base_name.
1013 * src/system.h: Include <unlocked-io.h> in the usual order
1014 for ../lib/*.h files. Include <stdint.h> unconditionally,
1015 since we now use the stdint module.
1016 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
1017 HAVE_UINTPTR_T, since we now use the stdint module.
1018 (base_name): Remove decl, since files now include <dirname.h>
1019 to get the decl.
1020
1021 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
1022
1023 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
1024 New, default to 1.
1025 * data/yacc.c, data/glr.c, data/location.cc: Use them.
1026 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
1027 default.
1028 * tests/calc.at: Adjust.
1029
1030 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
1031
1032 * data/c.m4 (b4_basename): New.
1033 (b4_syncline): Also output the location of its invocation (from
1034 the skeleton).
1035 (b4_user_action, b4_define_user_action, b4_user_actions)
1036 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
1037 (b4_user_stype): New.
1038 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
1039
1040 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
1041
1042 In the grammar file, the first column is 1 not 0 on the first line as
1043 on every other line.
1044 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
1045 * tests/input.at (Torturing the Scanner): Update output.
1046
1047 * src/scan-gram.l (scanner_cursor): Declare it static.
1048
1049 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
1050
1051 In warnings, say "previous declaration" rather than "first
1052 declaration".
1053 * src/symtab.c (redeclaration): Do that here.
1054 * src/reader.c (record_merge_function_type): In the case of a result
1055 type clash, report the previous declaration rather than the very first
1056 one in the grammar file.
1057 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
1058 declared later): Add a third declaration to check this behavior.
1059 * tests/input.at (Incompatible Aliases): Update output.
1060
1061 2006-06-27 Akim Demaille <akim@epita.fr>
1062
1063 * doc/Doxyfile.in: New.
1064 * doc/Makefile.am: Use it.
1065 * src/lalr.h, src/symtab.h: Initial doxygenation.
1066
1067 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
1068
1069 Don't miss %merge result type warnings just because the LHS types are
1070 declared after the %merge. This continues the effort of the previous
1071 patch.
1072 * src/reader.c (get_merge_function): Don't set the merger type yet.
1073 (record_merge_function_type): New function for setting the merger type
1074 and checking for clashes.
1075 (grammar_current_rule_merge_set): Set the location of the %merge for
1076 the current rule.
1077 (packgram): Invoke record_merge_function_type for each rule now that
1078 all symbol type declarations have been parsed.
1079 * src/reader.h (merger_list.type_declaration_location): New member
1080 storing the location of the first %merge from which the type for this
1081 merging function was derived.
1082 * src/symlist.h (symbol_list.merger_declaration_location): New member
1083 storing the location of a rule's %merge, if any.
1084 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
1085 declared later): New test to catch the error fixed by the above patch.
1086
1087 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
1088
1089 Get action warnings (grammar_rule_check) right even when symbol
1090 declarations appear after the rules. Discussed at
1091 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
1092 and
1093 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
1094 Don't mistake the type of $$ in a midrule to be that of its parent
1095 rule's $$.
1096 * src/reader.c (grammar_current_rule_end): Don't invoke
1097 grammar_rule_check yet since not all symbol declarations may have been
1098 parsed yet.
1099 (grammar_midrule_action): Likewise.
1100 Don't record whether the midrule's $$ has been used yet since actions
1101 haven't been translated yet.
1102 Record the midrule's parent rule and its RHS index within the parent
1103 rule.
1104 (grammar_current_rule_action_append): Don't translate the action yet
1105 since not all symbol declarations may have been parsed yet and, thus,
1106 warnings about types for $$, $n, @$, and @n can't be reported yet.
1107 (packgram): Translate the action and invoke grammar_rule_check now that
1108 all symbol declarations have been parsed.
1109 * src/scan-code.l (handle_action_dollar): Now that this is invoked
1110 after parsing the entire grammar file, the symbol list here in the case
1111 of a midrule is actually the midrule's empty RHS, so reference its
1112 parent rule's RHS where necessary.
1113 On the other hand, now that you can already know it's a midrule, you
1114 aren't forced to think $$ has the same type as its parent rule's $$.
1115 (handle_action_at): In the case of a midrule, reference the parent rule
1116 where necessary.
1117 * src/symlist.c (symbol_list_new): Initialize new midrule-related
1118 members.
1119 (symbol_list_length): Now that this is invoked after all rules have
1120 been parsed, a NULL symbol (rather than a NULL symbol list node)
1121 terminates a rule. symbol_list_print already does this correctly.
1122 * src/symlist.h (symbol_list.midrule_parent_rule,
1123 symbol_list.midrule_parent_rhs_index): New members so that midrules can
1124 remember their relationships with their parents.
1125 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
1126 fixed by the above patch.
1127 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
1128 implementing...
1129 (Unused values): ... this old test case and...
1130 (Unused values before symbol declarations): ... this new test case.
1131 This one is the same as `Unused values' except that all symbol
1132 declarations appear after the rules in order to catch the rest of the
1133 errors fixed by the above patch.
1134
1135 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
1136
1137 More cleanup.
1138 * src/reader.c (current_rule): Declare it static since it's no longer
1139 used outside this file.
1140 (grammar_current_rule_action_append): Remove redundant arguments from
1141 translate_rule_action invocation.
1142 * src/reader.h (current_rule): Remove this unused extern.
1143 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
1144 * src/scan-code.l (translate_rule_action): Likewise.
1145
1146 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
1147
1148 Clean up yesterday's patch.
1149 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
1150 to...
1151 * src/reader.c (grammar_current_rule_action_append): ... here for
1152 consistency with grammar_current_rule_symbol_append.
1153 * tests/regression.at (Braced code in declaration in rules section):
1154 Make yyerror and yylex static as usual.
1155
1156 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
1157
1158 Fix bug that mistakes braced code in a declaration in the rules section
1159 to be a rule action. Mentioned at
1160 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
1161 * src/scan-gram.l: Move midrule action detection from the start of the
1162 scanning of any braced code to...
1163 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
1164 action. For readability, use $2 and @2 rather than the equivalent
1165 global variables.
1166 * tests/regression.at (Braced code in declaration in rules section):
1167 New test to catch the error fixed by the above patch.
1168
1169 Work on code readability some.
1170 * src/scan-code.l (current_rule): Get rid of this misleading and
1171 redundant declaration: it's actually extern'ed in reader.h.
1172 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
1173 translate_action): Add a rule argument and use it instead of the global
1174 current_rule.
1175 (translate_rule_action): This already receives current_rule through an
1176 argument, so pass it on to translate_action instead of assigning
1177 current_rule to current_rule.
1178 (translate_symbol_action, translate_code): Pass rule = NULL to
1179 translate_action.
1180
1181 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
1182
1183 Rename %before-definitions to %start-header and %after-definitions to
1184 %end-header. Don't use these declarations to separate pre-prologue
1185 blocks from post-prologue blocks. Add new order-independent
1186 declarations %before-header and %after-header as alternatives to the
1187 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
1188 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
1189 * NEWS (2.3+): Update for these changes.
1190 * data/glr.c (b4_before_definitions): Update to...
1191 (b4_start_header): ... this.
1192 (b4_after_definitions): Update to...
1193 (b4_end_header): ... this.
1194 * data/glr.cc: Likewise.
1195 * data/lalr1.cc: Likewise.
1196 * data/yacc.c: Likewise.
1197 * doc/bison.texinfo (The prologue): Update names, and replace remaining
1198 prologue blocks with %*-header declarations.
1199 (Calc++ Parser): Likewise.
1200 (Bison Declaration Summary): Update names.
1201 (Bison Symbols): Update description.
1202 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
1203 (PERCENT_END_HEADER): ... this.
1204 (PERCENT_BEFORE_DEFINITIONS): Update to...
1205 (PERCENT_START_HEADER): ... this.
1206 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
1207 (declaration): Update token names and m4 macro names.
1208 When parsing %end-header and %start-header, invoke translate_code
1209 before muscle_code_grow, and no longer set global booleans to remember
1210 whether these declarations have been seen.
1211 Parse new %after-header and %before-header.
1212 * src/reader.c (before_definitions, after_definitions): Remove.
1213 (prologue_augment): Accept a new bool argument to specify whether to
1214 augment the pre-prologue or post-prologue.
1215 * src/reader.h (before_definitions, after_definitions): Remove these
1216 extern's.
1217 (prologue_augment): Add new bool argument.
1218 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
1219 (PERCENT_END_HEADER): ... this.
1220 (PERCENT_BEFORE_DEFINITIONS): Update to...
1221 (PERCENT_START_HEADER): ... this.
1222 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
1223 * tests/actions.at (Printers and Destructors): Update names.
1224
1225 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
1226
1227 Add comparison operators for C++ location classes. Discussed at
1228 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
1229 * data/c++.m4 (b4_define_location_comparison): New boolean %define
1230 declaration indicating whether filename_type has an operator==. If
1231 filename_type is `std::string', it defaults to `1', `0' otherwise.
1232 * data/location.cc: Iff b4_define_location_comparison is `1', add
1233 operator== and operator!= for class position and for class location.
1234
1235 Some minor fixes.
1236 * src/scan-action.l: Remove unused file.
1237 * src/symtab.c (symbol_printer_set): Use printer_location not
1238 destructor_location.
1239 * src/symtab.h (struct symbol): Replace incorrect source comment for
1240 printer members.
1241 * tests/input.at (Incompatible Aliases): Update output with correct
1242 printer location.
1243
1244 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
1245
1246 Don't put the pre-prologue in the header file. For the yacc.c code
1247 file and the glr.c header and code files, move the pre-prologue before
1248 the token definitions. Add new %before-definitions and
1249 %after-definitions to declare code that will go in both the header file
1250 and code file. Discussed at
1251 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
1252 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
1253 and
1254 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
1255 * NEWS (2.3+): Describe these changes.
1256 * data/glr.c (b4_pre_prologue): Move from within to before...
1257 (b4_shared_declarations): ... this.
1258 Add new b4_before_definitions before b4_token_enums.
1259 Add new b4_after_definitions at the end.
1260 * data/glr.cc (b4_pre_prologue): Replace with...
1261 (b4_before_definitions): ... this in the header file.
1262 (b4_after_definitions): New near the end of the header file.
1263 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
1264 code file right before including the header file.
1265 (b4_before_definitions): New in the previous position of
1266 b4_pre_prologue in the header file.
1267 (b4_after_definitions): New near the end of the header file.
1268 * data/yacc.c: Clean up some m4 quoting especially in the header file.
1269 (b4_token_enums_defines): In the code file, move to right before
1270 YYSTYPE for consistency with the header file.
1271 (b4_before_definitions): New right before b4_token_enums_defines in
1272 both the header and code file.
1273 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
1274 header and code file.
1275 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
1276 of prologues for %union dependencies.
1277 (Bison Declaration Summary): In %defines description, mention the
1278 effect of %before-definitions and %after-definitions on the header
1279 file.
1280 (Calc++ Parser): Forward declare driver in a %before-definitions rather
1281 than in the pre-prologue so that make check succeeds.
1282 (Bison Symbols): Add entries for %before-definitions and
1283 %after-definitions.
1284 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
1285 %before-definitions.
1286 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
1287 (declaration): Parse those declarations and append to
1288 b4_before_definitions and b4_after_definitions, respectively.
1289 * src/reader.c (before_definitions, after_definitions): New bools to
1290 track whether those declarations have been seen.
1291 (prologue_augment): Add to the post-prologue if %union,
1292 %before-definitions, or %after-definitions has been seen.
1293 * src/reader.h (before_definitions, after_definitions): New extern's.
1294 * src/scan-gram.l: Scan the new declarations.
1295 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
1296 prologue block in a %before-definitions or a %after-definitions based
1297 on whether the %union is declared.
1298 * tests/regression.at (Early token definitions with --yacc, Early token
1299 definitions without --yacc): Move tests for token definitions into the
1300 post-prologue since token names are no longer defined in the
1301 pre-prologue.
1302
1303 2006-06-20 Akim Demaille <akim@epita.fr>
1304
1305 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
1306 (symbol_get): Use it.
1307 * src/parse-gram.y: Use it.
1308
1309 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
1310
1311 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
1312 build succeeds when configured with --enable-gcc-warnings.
1313
1314 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
1315
1316 * src/parse-gram.y (char_name): New function.
1317 (CHAR, STRING, string_content): For %printer, properly escape.
1318 (ID): Prefer fputs to fprintf.
1319 (id): Reindent to be consistent with other rules.
1320 Properly quote char.
1321
1322 The Translation Project changed its way of publishing translations
1323 to maintainers. I haven't received any responses to my request
1324 for supporting the old way, or for documenting the new way. I
1325 have modified 'bootstrap' to use screen scraping
1326 (in this case, HTML scraping). This is unreliable and inelegant,
1327 but I don't see any better way. Yuck.
1328 * bootstrap (TP_URL, WGET_COMMAND): New vars.
1329 (get_translations): New function, which uses HTML scraping to
1330 deduce locations of latest translations.
1331 Use this function to grab both bison and bison-runtime .po files.
1332 Don't bother priming the pump for the runtime-po domain any more,
1333 as it's now translated better than bison is.
1334
1335 2006-06-19 Akim Demaille <akim@epita.fr>
1336
1337 * src/scan-gram.l: No longer "parse" things after `%union' until
1338 `{'. Rather, return a single "%union" token.
1339 No longer make symbols: return strings, and leave the conversion
1340 to symbols to the parser.
1341 (SC_PRE_CODE, token_type): Remove.
1342 * src/parse-gram.y (%union): New field `character'.
1343 Sort tokens.
1344 (CHAR): New token.
1345 (ID, ID_COLON): Now that the scanner no longer makes them
1346 identifiers, adjust all uses to invoke symbol_get.
1347 (id_colon): New, wraps the conversion from string to symbol.
1348 (%union): Accept a possible union_name.
1349 (symbol): Now can be a char.
1350 * data/c.m4 (b4_union_name): Leave a default value.
1351 * data/glr.c, data/yacc.c: Use it.
1352
1353 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
1354
1355 For associating token numbers with token names for "yacc.c", don't use
1356 #define statements unless `--yacc' is specified; always use enum
1357 yytokentype. Most important discussions start at:
1358 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
1359 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
1360 and
1361 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
1362 * NEWS (2.3+): Mention.
1363 * data/c.m4 (b4_yacc_if): New.
1364 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
1365 token #define's.
1366 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
1367 on token name definitions.
1368 * src/getargs.c (usage): Capitalize `Yacc' in English.
1369 * src/output.c (prepare): Define b4_yacc_flag.
1370 * tests/regression.at (Early token definitions): Test that tokens names
1371 are defined before the pre-prologue not just before the post-prologue.
1372 Remove this test case and copy to...
1373 (Early token definitions with --yacc): ... this to test #define's.
1374 (Early token definitions without --yacc): ... and this to test enums.
1375
1376 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
1377
1378 * NEWS: Reword the post-2.3 change to not be so optimistic about
1379 removing the old "look-ahead" spelling.
1380 Update previous look-ahead/lookahead change reports.
1381 * REFERENCES: look-ahead -> lookahead (since that's
1382 what he actually wrote).
1383 * doc/refcard.tex: look ahead -> lookahead,
1384 look-ahead -> lookahead
1385
1386 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
1387
1388 For consistency, use `lookahead' instead of `look-ahead' or
1389 `look_ahead'. Discussed starting at
1390 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
1391 and then at
1392 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
1393 * NEWS: For the next release, note the change to `--report'.
1394 * TODO, doc/bison.1: Update English.
1395 * doc/bison.texinfo: Update English.
1396 (Understanding Your Parser, Bison Options): Document as
1397 `--report=lookahead' rather than `--report=look-ahead'.
1398 * src/conflicts.c: Update English in comments.
1399 (lookahead_set): Rename from look_ahead_set.
1400 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
1401 (resolve_sr_conflict): Rename local look_ahead_tokens to
1402 lookahead_tokens, and update other uses.
1403 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
1404 count_rr_conflicts, conflicts_free): Update uses.
1405 * src/getargs.c (report_args): Move "lookahead" before alternate
1406 spellings.
1407 (report_types): Update uses.
1408 (usage): For `--report' usage description, state `lookahead' spelling
1409 rather than `look-ahead'.
1410 * src/getargs.h (report.report_lookahead_tokens): Rename from
1411 report_look_ahead_tokens.
1412 * src/lalr.c: Update English in comments.
1413 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
1414 (state_lookahead_tokens_count): Rename from
1415 state_look_ahead_tokens_count.
1416 Rename local n_look_ahead_tokens to n_lookahead_tokens.
1417 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
1418 Rename local n_look_ahead_tokens to n_lookahead_tokens.
1419 Update other uses.
1420 Update English in output.
1421 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
1422 * src/print.c: Update English in comments.
1423 (lookahead_set): Rename from look_ahead_set.
1424 (print_reduction): Rename argument lookahead_token from
1425 look_ahead_token.
1426 (print_core, state_default_rule, print_reductions, print_results):
1427 Update uses.
1428 * src/print_graph.c: Update English in comments.
1429 (print_core): Update uses.
1430 * src/state.c: Update English in comments.
1431 (reductions_new): Update uses.
1432 (state_rule_lookahead_tokens_print): Rename from
1433 state_rule_look_ahead_tokens_print, and update other uses.
1434 * src/state.h: Update English in comments.
1435 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
1436 (state_rule_lookahead_tokens_print): Rename from
1437 state_rule_look_ahead_tokens_print.
1438 * src/tables.c: Update English in comments.
1439 (conflict_row, action_row): Update uses.
1440 * tests/glr-regression.at
1441 (Incorrect lookahead during deterministic GLR,
1442 Incorrect lookahead during nondeterministic GLR): Rename
1443 print_look_ahead to print_lookahead.
1444 * tests/torture.at: Update English in comments.
1445 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
1446 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
1447 (Many lookahead tokens): Update uses.
1448 * data/glr.c: Update English in comments.
1449 * lalr1.cc: Likewise.
1450 * yacc.c: Likewise.
1451 * src/conflicts.h: Likewise.
1452 * src/lalr.h: Likewise.
1453 * src/main.c: Likewise.
1454 * src/output.c: Likewise.
1455 * src/parse-gram.c: Likewise.
1456 * src/tables.h: Likewise.
1457 * tests/calc.at: Likewise.
1458
1459 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
1460
1461 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
1462
1463 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
1464
1465 * TODO: Add request from Nelson H. F. Beebe to be able to install
1466 Bison without installing the yacc script.
1467
1468 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
1469
1470 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
1471 and yytext if they're already #define'd.
1472 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
1473 * src/scan-code-c.c: ... here.
1474 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
1475 <config.h>.
1476
1477 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
1478
1479 Get Bison to build again when configured with --enable-gcc-warnings.
1480 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
1481 missing #include's.
1482 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
1483 loc argument as it shadows a global.
1484 * src/scan-gram.l: Remove stray comma that prevents boundary_set
1485 invocation.
1486
1487 * src/.cvsignore: Add scan-code.c.
1488
1489 2006-06-07 Akim Demaille <akim@epita.fr>
1490
1491 * src/scan-gram.l: Move the "add a trailing ; to actions" code
1492 to...
1493 * src/scan-code.l: here.
1494 * tests/input.at (Torturing the Scanner): Fix another location
1495 error.
1496
1497 2006-06-07 Akim Demaille <akim@epita.fr>
1498
1499 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
1500
1501 2006-06-06 Akim Demaille <akim@epita.fr>
1502
1503 Extract the parsing of user actions from the grammar scanner.
1504 As a consequence, the relation between the grammar scanner and
1505 parser is much simpler. We can also split "composite tokens" back
1506 into simple tokens.
1507 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
1508 * src/scan-gram.l (add_column_width, adjust_location): Move to and
1509 rename as...
1510 * src/location.h, src/location.c (add_column_width)
1511 (location_compute): these.
1512 Fix the column count: the initial column is 0.
1513 (location_print): Be robust to ending column being 0.
1514 * src/location.h (boundary_set): New.
1515 * src/main.c: Adjust to scanner_free being renamed as
1516 gram_scanner_free.
1517 * src/output.c: Include scan-code.h.
1518 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
1519 Use boundary_set.
1520 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
1521 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
1522 which is now, again, a separate token.
1523 Adjust all dependencies.
1524 Whereever actions with $ and @ are used, use translate_code.
1525 (action): Remove this nonterminal which is now useless.
1526 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
1527 (grammar_current_rule_action_append): Use translate_code.
1528 (packgram): Bound check ruleno, itemno, and rule_length.
1529 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
1530 (last_string, last_braced_code_loc, max_left_semantic_context)
1531 (scanner_initialize, scanner_free, scanner_last_string_free)
1532 (gram_out, gram_lineno, YY_DECL_): Move to...
1533 * src/scan-gram.h: this new file.
1534 (YY_DECL): Rename as...
1535 (GRAM_DECL): this.
1536 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
1537 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
1538 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
1539 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
1540 Move these declarations, and...
1541 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
1542 these to...
1543 * src/flex-scanner.h: this new file.
1544 * src/scan-gram.l (rule_length, rule_length_overflow)
1545 (increment_rule_length): Remove.
1546 (last_braced_code_loc): Rename as...
1547 (gram_last_braced_code_loc): this.
1548 Adjust to the changes of the parser.
1549 Move all the handling of $ and @ into...
1550 * src/scan-code.l: here.
1551 * src/scan-gram.l (handle_dollar, handle_at): Remove.
1552 (handle_action_dollar, handle_action_at): Move to...
1553 * src/scan-code.l: here.
1554 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
1555 scan-code.h, scan-code-c.c, scan-gram.h.
1556 (EXTRA_bison_SOURCES): Add scan-code.l.
1557 (BUILT_SOURCES): Add scan-code.c.
1558 (yacc): Be robust to white spaces.
1559
1560 * tests/conflicts.at, tests/input.at, tests/reduce.at,
1561 * tests/regression.at: Adjust the column numbers.
1562 * tests/regression.at: Adjust the error message.
1563
1564 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
1565
1566 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
1567 Use Akim's wording from
1568 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
1569
1570 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
1571
1572 Between Bison releases, manually append `+' to the previous Bison
1573 release number, and use that as a signal to automatically print the
1574 ChangeLog's CVS Id keyword from --version. Discussed starting at
1575 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
1576 * ChangeLog: Add Id header.
1577 * configure.ac (AC_INIT): Append `+' to `2.3'.
1578 * src/.cvsignore: Add revision.c.
1579 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
1580 (BUILT_SOURCES): Add revision.c.
1581 (revision.c): New target rule. This file defines a new global variable
1582 named revision. It initializes it with either the Id from ChangeLog
1583 or, if VERSION doesn't contain `+', with the empty string.
1584 * src/getargs.c (version): Print the value of revision.
1585 * src/revision.h: Extern revision.
1586
1587 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
1588
1589 * NEWS: Version 2.3.
1590 * configure.ac (AC_INIT): Likewise.
1591
1592 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
1593
1594 * data/glr.c (YYRECOVERING): Define to be a function-like macro
1595 with no arguments, not as an object-like macro. This is for
1596 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
1597 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
1598 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
1599 Document this.
1600
1601 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
1602
1603 * src/getargs.c (usage): Back out yesterday's modification of the
1604 --help output so that we don't have to wait for translation before
1605 releasing 2.3.
1606
1607 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
1608
1609 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
1610 Problem reported by Akim Demaille.
1611
1612 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
1613
1614 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
1615
1616 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
1617
1618 * data/yacc.c (yy_reduce_print): Omit trailing white space in
1619 generated source code. Problem reported by Frans Englich in
1620 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
1621
1622 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
1623
1624 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
1625 shell, not within 'make', so that 'make' by an ordinary builder
1626 (using GNU make) does not worry about configuring gzip. This also
1627 works around a bug reported independently by Keith Thompson and by
1628 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
1629 stderr rather than stdout, messing up the build logs.
1630
1631 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
1632
1633 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
1634 to make sure that YYID will never be unused. This fixes a 'make
1635 maintainer-check' failure caused by the recent changes to the 'Trivial
1636 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
1637 not used.
1638 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
1639
1640 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
1641
1642 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
1643 state before an empty RHS is always resolved here. Only the location
1644 of that state is guaranteed to be resolved, and that's enough. This
1645 fixes the remaining bug reported by Derek M. Jones in
1646 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
1647 * tests/glr-regression.at (Uninitialized location when reporting
1648 ambiguity): Test the above case.
1649 Also, the embedded comments in this test case claim it checks the case
1650 of an empty RHS that has inherited the initial location. However, the
1651 corresponding LHS was already resolved, so yyresolveLocations didn't
1652 actually have reason to modify it. Fix this by forcing
1653 nondeterministic operation at the beginning of the parse.
1654
1655 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
1656
1657 * data/c.m4 (b4_yy_symbol_print_generate):
1658 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
1659 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
1660 of the bugs reported today by Derek M Jones in
1661 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
1662 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
1663 defined to be a type name without parens or brackets.
1664 (Location Type): Similarly for YYLTYPE.
1665 * tests/regression.at (Trivial grammars): Put in a test for this
1666 bug that will be caught by 'make maintainer-check' (though not,
1667 alas, by 'make check' unless your compiler is picky).
1668
1669 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
1670
1671 * NEWS: Version 2.2.
1672 * configure.ac (AC_INIT): Likewise.
1673
1674 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
1675
1676 * data/glr.c (yyreportTree): Make room in yystates for the state
1677 preceding the RHS. This fixes the segmentation fault reported by Derek
1678 M. Jones in
1679 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
1680 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
1681 to the user. Reported for yyreportTree by Derek M. Jones later in the
1682 same thread.
1683 * THANKS: Add Derek M. Jones.
1684 Update my email address.
1685 Fix typo in Steve Murphy's name.
1686
1687 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
1688
1689 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
1690 checking against YYLAST that caused the parser to miss a potential
1691 alternative in its diagnostic.
1692 Problem reported by Maria Jose Moron Fernandez in
1693 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
1694 * data/lalr1.cc (yysyntax_error_): Likewise.
1695 * data/yacc.c (yysyntax_error): Likewise.
1696 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
1697 tokens, in case we run into an older C compiler.
1698 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
1699 Use them to check for the off-by-one error fixed above.
1700
1701 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
1702 YYSIZE_T, not size_t.
1703 * tests/regression.at (Trivial grammars): New test, to catch
1704 the error fixed by the above patch.
1705
1706 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
1707
1708 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
1709 scheme.
1710 Reported by Steve Murphy.
1711
1712 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
1713
1714 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
1715 * data/glr.cc: b4_location_flag is now b4_locations_flag.
1716
1717 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
1718
1719 Implement --trace=m4.
1720 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
1721 * src/output.c (output_skeleton): When set, pass -dV to m4.
1722
1723 Factor the handling of flags in m4.
1724 * src/output.c (prepare): Rename the muscle names debug, defines,
1725 error_verbose to debug_flag, defines_flag, error_verbose_flag.
1726 * data/c.m4: Adjust.
1727 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
1728 Use b4_define_flag_if to define other b4_FLAG_if macros.
1729 (b4_location_if): As a consequence, rename as...
1730 (b4_locations_if): this, for consistency.
1731 Adjust all the skeletons.
1732
1733 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
1734
1735 * etc/bench.pm: Shorten bench names.
1736
1737 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
1738
1739 * src/output.h, src/output.c (error_verbose): Move to...
1740 * src/getargs.h, src/getargs.c: here.
1741 Sort the flags.
1742 Adjust dependencies.
1743
1744 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
1745
1746 * data/c.m4 (b4_copyright): Put the special exception for Bison
1747 skeletons here, so we don't have to put it in each skeleton. All
1748 uses changed. Suggested by Akim Demaille. Also, wrap the
1749 copyright notice, in case it is longer than 80 columns. Replace
1750 comma by newline after title.
1751
1752 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
1753
1754 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
1755 incompatibility, not a bug. Mention that it wasn't fixed as of
1756 flex 2.5.33.
1757
1758 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
1759
1760 * examples/extexi: Enforce the precedence of concatenation over
1761 >>.
1762 Reported by Tommy Nordgren.
1763
1764 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
1765
1766 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
1767 with the member "token".
1768 Reported by Martin Nylin.
1769
1770 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
1771
1772 * data/glr.c: Switch to Bison 2.2 special-exception language in
1773 the copyright notice. Use more-regular format for titles and
1774 copyright notices.
1775 * data/glr.cc: Likewise.
1776 * data/location.cc: Likewise.
1777 * data/yacc.cc: Likewise.
1778 * doc/bison.texinfo (Conditions): Document this.
1779 * NEWS: likewise. Upgrade version to 2.2.
1780
1781 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
1782
1783 * data/glr.cc: Remove dead code.
1784
1785 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
1786
1787 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
1788 that variable and the line breaks the bootstrap. Problem reported
1789 by Juan M. Guerrero.
1790
1791 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
1792
1793 * doc/bison.texinfo (Multiple start-symbols): New.
1794
1795 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
1796
1797 * etc/README, etc/bench.pl: New.
1798
1799 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
1800
1801 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
1802 rule.
1803 Reported by Mickael Labau.
1804 * tests/input.at (Torturing the Scanner): Test it.
1805
1806 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
1807
1808 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
1809 Problem reported by Bob Rossi.
1810
1811 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
1812
1813 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
1814 and didn't really work.
1815 For the index, use @ifnotinfo, not @iftex.
1816 Minor cleanups of spacing and terminology.
1817
1818 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
1819
1820 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
1821 of AT_NAME_PREFIX when %name-prefix is not used.
1822
1823 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
1824
1825 Apply --prefix to C++ skeletons too: they change the namespace.
1826 The test suite already exercize these cases.
1827 * data/c++.m4 (b4_namespace): New.
1828 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
1829 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
1830 * data/yacc.c, data/glr.c: Remove a useless `[]'.
1831 * doc/bison.texinfo: Document it.
1832 (Option Cross Key): Use @multitable in all formats. It looks
1833 nicer, even in TeX outputs.
1834 (Rules): Use the same code whatever the output type is.
1835 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
1836 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
1837 * tests/calc.at: Use it, instead of hard coding `yy'.
1838
1839 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
1840
1841 * TODO: Remove dead items.
1842
1843 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
1844
1845 * doc/FAQ: Remove, merged into...
1846 * doc/bison.texinfo (FAQ): this.
1847 * doc/Makefile.am (EXTRA_DIST): Adjust.
1848
1849 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
1850
1851 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
1852 even if empty.
1853 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
1854 * doc/bison.texinfo (Calc++ Scanner): Use it.
1855
1856 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
1857
1858 Fix two nits reported by twlevo, plus one more that I discovered.
1859
1860 * src/assoc.h (assoc_to_string): Give a name to the arg, as
1861 this is the usual Bison style.
1862 * src/location.h (location_print): Likewise.
1863
1864 * src/reader.h (token_name): Likewise.
1865
1866 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
1867
1868 Fix some nits reported by twlevo.
1869 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
1870 and "POSIX". Use more-modern syntax for URLs. Mention C++
1871 and ask for Java. Don't hardwire OS version numbers. Add
1872 copyright notice.
1873 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
1874 * src/conflicts.c (solved_conflicts_obstack): Now static.
1875
1876 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
1877
1878 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
1879 page. Say "you can use it" not "you may use it" as on the web page;
1880 we're describing capabilities not granting permission.
1881
1882 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
1883
1884 * data/glr.c (yyresolveLocations): Rename local variables to avoid
1885 shadowing warnings. Use usual patter for iterating through RHS.
1886 * tests/glr-regression.at
1887 (Uninitialized location when reporting ambiguity):
1888 Modify yylex so that it uses its argument, rather than trying
1889 to rely on ARGSUSED (which doesn't work for gcc with warnings).
1890 const char -> char const.
1891
1892 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
1893 Don't use tabs inside commands; it messes up 'ps'.
1894 Problem reported by twlevo.
1895
1896 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
1897
1898 * tests/glr-regression.at (Uninitialized location when reporting
1899 ambiguity): New test case.
1900 * data/glr.c (yyresolveLocations): New function, which uses
1901 YYLLOC_DEFAULT.
1902 (yyresolveValue): Invoke yyresolveLocations before reporting an
1903 ambiguity.
1904 * doc/bison.texinfo (Default Action for Locations): Note
1905 YYLLOC_DEFAULT's usage for ambiguity locations.
1906 (GLR Semantic Actions): Cross-reference those notes.
1907
1908 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
1909
1910 * tests/glr-regression.at (Leaked semantic values when reporting
1911 ambiguity): Remove unnecessary union and type declarations.
1912 (Leaked lookahead after nondeterministic parse syntax error): New test
1913 case.
1914 * data/glr.c (yyparse): Check for zero stacks remaining before
1915 attempting to shift the lookahead so that you don't lose it.
1916
1917 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
1918
1919 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
1920 * tests/glr-regression.at (Leaked semantic values when reporting
1921 ambiguity): New test case.
1922 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
1923 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
1924 now unnecessary yystackp parameter.
1925 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
1926 destructors can be called.
1927
1928 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
1929 in existing testcases.
1930
1931 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
1932
1933 Don't leak semantic values for parent RHS when a user action cuts the
1934 parser, and clean up related code a bit.
1935 * tests/glr-regression.at (Leaked merged semantic value if user action
1936 cuts parse): Rename to...
1937 (Leaked semantic values if user action cuts parse): ... this. Add check
1938 for leaked parent RHS values.
1939 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
1940 between an unresolved state (non-empty chain of semantic options) and
1941 an incomplete one (signaled by an empty chain).
1942 (yyresolveStates): Document the interface. Move all manipulation of a
1943 successfully or unsuccessfully resolved yyGLRState to...
1944 (yyresolveValue): ... here so that yyresolveValue always leaves a
1945 yyGLRState with consistent data and thus is easier to understand.
1946 Remove the yyvalp and yylocp parameters since they are always just
1947 taken from the yys parameter. When reporting a discarded merged value
1948 in debugging output, note that it is incompletely merged. Document the
1949 interface.
1950 (yyresolveAction): If resolving any of the RHS states fails, destroy
1951 them all rather than leaking them. Thus, as long as user actions are
1952 written to clean up the RHS correctly, yyresolveAction always cleans up
1953 the RHS of a semantic option. Document the interface.
1954
1955 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
1956
1957 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
1958 led to a segmentation fault in GNU Pascal. Problem reported
1959 by Waldek Hebisch.
1960
1961 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
1962
1963 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
1964 mid-rule action inside a nonterminal symbol in order to declare a
1965 destructor for its semantic value.
1966
1967 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
1968
1969 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
1970 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
1971 __cplusplus && ! defined _STDLIB_H && !
1972 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
1973 defined free))]: Include <stdlib.h> rather than rolling our own
1974 declarations of malloc and free, to avoid problems with
1975 incompatible declarations (using 'throw') C++'s stdlib.h. This
1976 should fix Debian bug 340012
1977 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
1978 reported by Guillaume Melquiond.
1979
1980 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
1981
1982 * NEWS: Clarify symbols versus types in unused-value warnings.
1983
1984 * configure.ac (AC_INIT): Bump version number.
1985
1986 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
1987
1988 * NEWS: Version 2.1a.
1989 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
1990 since C99 requires this.
1991
1992 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
1993
1994 * m4/c-working.m4: New file.
1995 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
1996
1997 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
1998
1999 * Makefile.maint: Merge from coreutils.
2000
2001 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
2002
2003 More portability fixes for problems summarized by Nelson H. F. Beebe.
2004
2005 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
2006 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
2007 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
2008 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
2009 messes up because C++ code is compiled in 32-bit mode but linked
2010 in 64-bit mode.
2011
2012 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
2013
2014 More portability fixes for problems summarized by Nelson H. F. Beebe.
2015
2016 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
2017 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
2018
2019 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
2020 nodist_PROGRAMS, since we don't need to actually compile the
2021 example if we're just doing a plain 'make'. This avoids bothering
2022 the installer unnecessarily about problems due to weird C++
2023 compilers.
2024
2025 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
2026
2027 More portability fixes for problems summarized by Nelson H. F. Beebe.
2028
2029 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
2030 than #include "...", and compile with -I'.'. The old method was
2031 not portable, according to Posix and the C standard, and it does
2032 not work with Sun C 5.7, where previous #line directives affect
2033 the working directory used in later #include "..." directives.
2034
2035 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2036
2037 Various DJGGP specific issues in /djgpp
2038
2039 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
2040
2041 More portability fixes for problems summarized by Nelson H. F. Beebe.
2042
2043 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
2044 '#include <map>' works and that you can apply ++ to iterators.
2045
2046 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
2047
2048 Work around portability problems summarized by Nelson H. F. Beebe in
2049 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
2050
2051 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
2052 that '#include <string>' works.
2053
2054 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
2055 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
2056 "warning: sorry: semantics of inline function static data `const
2057 unsigned char translate_table[262]' are wrong (you'll wind up with
2058 multiple copies)".
2059
2060 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
2061 or, xor to not_, and_, or_, and xor_, respectively. This works
2062 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
2063 random system header somewhere that includes the equivalent of
2064 <iso646.h>.
2065
2066 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
2067 -E" works; it apparently doesn't work with PathScale EKO Compiler
2068 Suite Version 2.0.
2069
2070 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
2071
2072 During deterministic GLR operation, user actions should be able to
2073 influence the parse by changing yychar. To make this easier to fix and
2074 to make glr.c easier to evolve in general, don't maintain yytoken in
2075 parallel with yychar; just compute yytoken when needed.
2076 * tests/glr-regression.at (Incorrect lookahead during deterministic
2077 GLR): Check that setting yychar in a user action has the intended
2078 effect.
2079 * data/glr.c (yyGLRStack): Remove yytokenp member.
2080 (yyclearin): Don't set *yytokenp.
2081 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
2082 yychar rather than *yytokenp to determine the current lookahead.
2083 Compute yytoken locally when needed.
2084 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
2085 point to.
2086
2087 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
2088 after `--report' documentation.
2089
2090 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
2091
2092 * src/parse-gram.y (grammar_declaration): Location of printer
2093 symbol is @1, not list->location. Bug reported by twlevo.
2094 * tests/input.at (Incompatible Aliases): Adjust to above change.
2095
2096 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
2097
2098 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
2099 all the test at once. This makes the output easier to read in the
2100 normal case.
2101
2102 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
2103 got from <http://bro-ids.org/download.html>. The bug is that
2104 when two actions appeared in succession, the second one was
2105 scanned before the first one was added to the grammar rule
2106 as a midrule action. Bison then output the incorrect warning
2107 "parse.y:905.17-906.36: warning: unused value: $3".
2108 * src/parse-gram.y (BRACED_CODE, action): These are no longer
2109 associated with a value.
2110 (rhs): Don't invoke grammar_current_rule_action_append.
2111 (action): Invoke it here instead.
2112 * src/reader.c (grammar_midrule_action): Now extern.
2113 (grammar_current_rule_action_append): Don't invoke
2114 grammar_midrule_action; that is now the scanner's job.
2115 * src/reader.h (last_string, last_braced_code_loc):
2116 (grammar_midrule_action): New decls.
2117 * src/scan-gram.l (last_string): Now extern, sigh.
2118 (last_braced_code_loc): New extern variable.
2119 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
2120 rule already has an action.
2121 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
2122 * tests/input.at (AT_CHECK_UNUSED_VALUES):
2123 Add some tests to check that the above changes fixed the bug.
2124
2125 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
2126
2127 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
2128 All used changed. Check whether the symbol has a destructor,
2129 not whether it is typed.
2130 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
2131 that the values are still reported as unused. All line numbers
2132 adjusted.
2133
2134 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
2135
2136 Work around a bug in bro 0.8, which underparenthesizes its
2137 definition of YYLLOC_DEFAULT.
2138 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
2139 their arguments.
2140 * data/lalr1.cc: Likewise.
2141 * data/yacc.cc: Likewise.
2142
2143 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
2144
2145 Work around a bug in Pike 7.0, and give the Pike folks a
2146 better way to override the usual int widths.
2147 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
2148 user can override the types.
2149 (short): #undef, to work around a bug in Pike 7.0.
2150 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
2151 (union yyalloc.yyss): Use yytype_int16 rather than short.
2152 All uses changed.
2153 (yysigned_char): Remove.
2154 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
2155 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
2156 * tests/regression.at (Web2c Actions): Adjust to above changes.
2157
2158 * src/reader.c (check_and_convert_grammar): New function.
2159 (reader): Close the input file even if something went wrong during
2160 parsing. Minor file descriptor leak reported by twlevo.
2161
2162 * src/assoc.c (assoc_to_string): Use a default: abort (); case
2163 to pacify gcc -Wswitch-default.
2164 * src/scan-gram.l (adjust_location): Use a default: break; case
2165 to pacify gcc -Wswitch-default.
2166 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
2167 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
2168 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
2169 Move these decls to scan-skel.l, since they don't need to be
2170 visible elsewhere.
2171 * src/scan-skel.l: Accept the above decls.
2172 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
2173 is used.
2174
2175 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
2176
2177 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
2178 since we don't want to insist on a version number at the start
2179 of the changelog every time.
2180 * Makefile.maint: Sync from coreutils a bit better.
2181 (sc_trailing_blank): Renamed from sc_trailing_space.
2182 All uses changed.
2183 (sc_no_if_have_config_h, sc_require_config_h):
2184 (sc_prohibit_assert_without_use): New rules.
2185 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
2186 (sc_dd_max_sym_length): Fix leading spaces in rule.
2187 (sc_system_h_headers): Prefix with @.
2188 (sc_useless_cpp_parens, m4-check): Output line numbers.
2189 (changelog-check): Allow version only in head.
2190 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
2191 satisfy new Makefile.maint rule.
2192 * data/glr.c: Likewise.
2193 * data/glr.cc: Likewise.
2194 * data/lalr1.cc: Likewise.
2195 * data/yacc.c: Likewise.
2196 * lib/ebitsetv.c: Likewise.
2197 * lib/lbitset.c: Likewise.
2198 * lib/subpipe.c: Likewise.
2199 * lib/timevar.c: Likewise.
2200 * src/system.h: Likewise.
2201 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
2202 * djgpp/Makefile.maint: Add copyright notice.
2203 * djgpp/README.in: Likewise.
2204 * djgpp/config.bat: Likewise.
2205 * djgpp/config.site: Likewise.
2206 * djgpp/config_h.sed: Likewise.
2207 * djgpp/djunpack.bat: Likewise.
2208 * djgpp/config.sed: Fix copyright notice to match standard format.
2209 * djgpp/subpipe.h: Likewise.
2210 * lib/bitsetv-print.c: Likewise.
2211 * lib/bitsetv.c: Likewise.
2212 * lib/subpipe.h: Likewise.
2213 * lib/timevar.c: Likewise.
2214 * lib/timevar.h: Likewise.
2215 * djgpp/subpipe.c: Use standard recipe for config.h.
2216 * lib/abitset.c: Likewise.
2217 * lib/bitset.c: Likewise.
2218 * lib/bitset_stats.c: Likewise.
2219 * lib/bitsetv-print.c: Likewise.
2220 * lib/bitsetv.c: Likewise.
2221 * lib/ebitsetv.c: Likewise.
2222 * lib/get-errno.c: Likewise.
2223 * lib/lbitset.c: Likewise.
2224 * lib/subpipe.c: Likewise.
2225 * lib/timevar.c: Likewise.
2226 * lib/vbitset.c: Likewise.
2227 * tests/local.at: Likewise.
2228 * src/scan-gram.l: Don't include verify.h, since system.h does
2229 that for us.
2230 * .x-sc_require_config_h: New file.
2231 * .x-sc_unmarked_diagnostics: New file.
2232
2233 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
2234
2235 Be a bit more systematic about using 'abort'.
2236 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
2237 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
2238 Put 'default: abort ();' before some other case, to satisfy older
2239 pedantic compilers.
2240 * lib/bitset_stats.c (bitset_stats_init): Likewise.
2241 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
2242 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
2243 * src/conflicts.c (resolve_sr_conflict): Likewise.
2244 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
2245 (get_decision_str, get_orientation_str, get_node_alignment_str):
2246 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
2247 (get_linestyle_str, get_arrowstyle_str): Likewise.
2248 * src/conflicts.c (resolve_sr_conflict):
2249 Use a default case rather than one for the one remaining enum
2250 value, to catch invalid enum values as well.
2251 * src/lalr.c (set_goto_map, map_goto):
2252 Prefer "assert (FOO);" to "if (!FOO) abort ();".
2253 * src/nullable.c (nullable_compute, token_definitions_output):
2254 Likewise.
2255 * src/reader.c (packgram, reader): Likewise.
2256 * src/state.c (transitions_to, state_new, state_reduction_find):
2257 Likewise.
2258 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
2259 (symbol_pack): Likewise.
2260 * src/tables.c (conflict_row, pack_vector): Likewise.
2261 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
2262 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
2263 * src/system.h: Don't include <assert.h>.
2264 (assert): New macro.
2265
2266 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
2267 (Destructor Decl, Parser Function, Pure Calling):
2268 Describe rules for braces inside C code more carefully.
2269
2270 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
2271
2272 Fix some porting glitches found by Nelson H. F. Beebe.
2273 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
2274 compilers that don't understand that abort () does not return.
2275 * src/state.c (transitions_to): Likewise.
2276 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
2277 that '#include <cstdlib>' works.
2278 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
2279 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
2280 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
2281 for the benefit of some pre-C99 compilers.
2282
2283 * bootstrap: Undo changes to gnulib files that autoreconf made.
2284
2285 Minor fixups to get 'make maintainer-check' to work.
2286 * configure.ac: Don't use -Wnested-externs, as it's incompatible
2287 with the new verify.h implementation.
2288 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
2289 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
2290 * data/yacc.c (YYUSE): Likewise.
2291 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
2292 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
2293 * src/parse-gram.y (declaration): Don't pass a string constant
2294 to a function that expects char *, since GCC might complain
2295 about the constant value.
2296 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
2297 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
2298 before #defining them.
2299 * tests/glr-regression.at
2300 (Incorrectly initialized location for empty right-hand side in GLR):
2301 In yyerror, use the msg arg.
2302 (Corrupted semantic options if user action cuts parse):
2303 (Incorrect lookahead during deterministic GLR):
2304 (Incorrect lookahead during nondeterministic GLR):
2305 Don't name a local var 'index'; it shadows string.h's 'index'.
2306
2307 2006-01-19 Akim Demaille <akim@epita.fr>
2308
2309 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
2310 location, not just parts of it.
2311
2312 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
2313
2314 * NEWS: Document the fact that multiple %unions are now allowed.
2315 * doc/bison.texinfo (Union Decl): Likewise.
2316 * TODO: This feature is now implemented, so remove it from
2317 the wishlist.
2318
2319 * Makefile.maint: Merge with coreutils Makefile.maint.
2320 (CVS_LIST): Use build-aux version if available.
2321 (VERSION_REGEXP): New macro.
2322 (syntax-check-rules): Add sc_no_if_have_config_h,
2323 sc_prohibit_assert_without_use, sc_require_config_h,
2324 sc_useless_cpp_parens.
2325 (sc_obsolete_symbols): Check for O_NDELAY.
2326 (sc_dd_max_sym_length): Track coreutils.
2327 (sc_unmarked_diagnostics): Look in all files, not just *.c.
2328 (sc_useless_cpp_parens): New rule.
2329 (news-date-check): Look for version or today's date.
2330 (changelog-check): Don't require version number near head.
2331 (copyright-check): Use current year instead of hardwiring 2005.
2332 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
2333 (announcement): Add --gpg-key-ID.
2334
2335 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
2336 with "file system".
2337
2338 Avoid undefined behavior that addressed just before the start of an
2339 array. Problem reported by twlevo.
2340 * src/reader.c (packgram): Prepend a new sentinel before ritem.
2341 * src/lalr.c (build_relations): Rely on new sentinel.
2342 * src/gram.c (gram_free): Adjust to new sentinel.
2343
2344 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
2345
2346 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
2347 yylookaheadNeeds. All uses updated.
2348 (yysplitStack): Rename local yynewLookaheadStatuses to
2349 yynewLookaheadNeeds.
2350 * data/glr-regression.at (Incorrect lookahead during nondeterministic
2351 GLR): In comments, change `lookahead status' to `lookahead need'.
2352
2353 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
2354
2355 * data/glr.c (yysplitStack): A little stylistic rewrite.
2356
2357 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
2358
2359 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
2360
2361 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
2362
2363 * doc/bison.texinfo: Fix some typos.
2364 (GLR Semantic Actions): New subsection discussing special
2365 considerations because GLR semantic actions might be deferred.
2366 (Actions): Mention look-ahead usage of yylval.
2367 (Actions and Locations): Mention look-ahead usage of yylloc.
2368 (Special Features for Use in Actions): Add YYEOF entry and mention it
2369 in the yychar entry.
2370 In the yychar entry, remove mention of the local yychar case (pure
2371 parser) since this is irrelevant information when writing semantic
2372 actions and since it's already discussed in `Bison Symbols' where
2373 yychar is otherwise described as an external variable.
2374 In the yychar entry, don't call it the `current' look-ahead since it
2375 isn't when semantic actions are deferred.
2376 In the yychar and yyclearin entries, add note about deferred semantic
2377 actions.
2378 Add yylloc and yylval entries discussing look-ahead usage.
2379 (Look-Ahead Tokens): When discussing yychar, don't call it the
2380 `current' look-ahead, and do mention yylval and yylloc.
2381 (Error Recovery): Cross-reference `Action Features' when mentioning
2382 yyclearin.
2383 (Bison Symbols): In the yychar entry, don't call it the `current'
2384 look-ahead.
2385 In the yylloc and yylval entries, mention look-ahead usage.
2386
2387 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2388
2389 * tests/glr-regression.at: Update copyright year to 2006.
2390
2391 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
2392
2393 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
2394 use during nondeterministic operation to track which stacks have
2395 actually needed the current lookahead.
2396 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
2397 Allocate, deallocate, resize, and otherwise shuffle space for
2398 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
2399 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
2400 appropriately during nondeterministic operation.
2401 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
2402 members to store the current lookahead to be used by the deferred
2403 user action.
2404 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
2405 from which the RHS is taken. Set the lookahead members of the new
2406 yySemanticOption according to the lookahead status for stack yyk.
2407 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
2408 yyaddDeferredAction.
2409 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
2410 members of yySemanticOption before invoking yyuserAction, and then set
2411 them back to their current values afterward.
2412 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
2413 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
2414 * tests/glr-regression.at: Remove `.' from the ends of recent test case
2415 titles for consistency.
2416 (Leaked merged semantic value if user action cuts parse): In order to
2417 suppress lint warnings, use arguments in merge function, and assign
2418 char value < 128 in main.
2419 (Incorrect lookahead during deterministic GLR): New test case.
2420 (Incorrect lookahead during nondeterministic GLR): New test case.
2421
2422 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
2423
2424 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
2425 !yyvaluep as signal that no semantic value is available to print.
2426 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
2427 to print a semantic value.
2428
2429 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
2430
2431 * tests/glr-regression.at: For consistency with my newer test cases,
2432 don't thank myself.
2433
2434 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
2435
2436 * data/glr.c (yyresolveValue): When merging semantic options, if at
2437 least one user action succeeds but a later one cuts the parse, then
2438 destroy the semantic value before returning rather than leaking it.
2439 (yyresolveStates): If a user action cuts the parse and thus
2440 yyresolveValue fails, ignore the (unset) semantic value rather than
2441 corrupting the yyGLRState, and empty the semantic options list since
2442 the user actions should have called all necessary destructors.
2443 Simplify code with YYCHK.
2444 * tests/glr-regression.at (Corrupted semantic options if user action
2445 cuts parse): New test case.
2446 (Undesirable destructors if user action cuts parse): New test case.
2447 Before applying any of this patch, this test case never actually failed
2448 for me... but only because the corrupted semantic options usually
2449 masked this bug.
2450 (Leaked merged semantic value if user action cuts parse): New test
2451 case.
2452
2453 2006-01-05 Akim Demaille <akim@epita.fr>
2454
2455 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
2456
2457 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
2458
2459 * data/c.m4 (b4_c_modern): New macro, with a new provision for
2460 _MSC_VER. Problem reported by Cenzato Marco.
2461 (b4_c_function_def): Use it.
2462 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
2463 b4_c_modern.
2464 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
2465 than rolling our own.
2466
2467 2006-01-04 Akim Demaille <akim@epita.fr>
2468
2469 Also warn about non-used mid-rule values.
2470 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
2471 member.
2472 (symbol_list_new): Adjust.
2473 * src/reader.c (symbol_typed_p): New.
2474 (grammar_rule_check): Use it.
2475 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
2476 Check its rule.
2477 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
2478 Use it.
2479 * tests/actions.at (Exotic Dollars): Adjust.
2480
2481 2006-01-04 Akim Demaille <akim@epita.fr>
2482
2483 * src/reader.c (grammar_midrule_action): If $$ is set in a
2484 mid-rule, move the `used' bit to its lhs.
2485 * tests/input.at (Unused values): New.
2486 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
2487
2488 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
2489
2490 * doc/bison.texinfo (Bison Options): Say more accurately what
2491 --yacc does.
2492 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
2493 about declarations in the grammar when in Yacc mode, as POSIX does
2494 not require a diagnostic when the grammar uses extensions.
2495
2496 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
2497
2498 Warn about dubious constructions like "%token T T".
2499 Reported by twlevo.
2500 * src/symtab.h (struct symbol.declared): New member.
2501 * src/symtab.c (symbol_new): Initialize it to false.
2502 (symbol_class_set): New arg DECLARING, specifying whether
2503 this is a declaration that we want to warn about, if there
2504 is more than one of them. All uses changed.
2505
2506 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
2507 Allow multiple %union directives, whose contents concatenate.
2508 * src/parse-gram.y (grammar_declaration): Likewise.
2509 Use muscle_code_grow, so that we don't need stype_line any more.
2510 All uses changed.
2511
2512 * src/muscle_tab.c (muscle_grow): Fix comment.
2513
2514 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
2515 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
2516 Update copyright year to 2006.
2517
2518 2006-01-03 Akim Demaille <akim@epita.fr>
2519
2520 Have glr.cc pass (some of) the calc.at tests.
2521 * data/glr.cc (b4_parse_param_orig): New.
2522 (b4_parse_param): Improve its definition, and bound it more
2523 clearly in the skeleton.
2524 (b4_epilogue): Append, instead of prepending, in order to keep
2525 #line consistency.
2526 Simplify the generation of auxiliary functions: locations and
2527 purity are mandated.
2528 (b4_global_tokens_and_yystype): Honor it.
2529 * data/location.cc (c++.m4): Don't include it.
2530 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
2531 and AT_SKEL_CC_IF.
2532 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
2533 AT_LALR1_CC_IF.
2534 Be sure to initialize the first position's filename.
2535 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
2536 mandated anyway.
2537 (AT_CHECK_CALC_GLR_CC): New.
2538 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
2539
2540 2006-01-02 Akim Demaille <akim@epita.fr>
2541
2542 * src/output.c (output_skeleton): Don't hard wire the inclusion of
2543 c.m4.
2544 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
2545 * data/glr.cc: Do not include stack.hh.
2546
2547 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
2548
2549 * data/glr.c: Reformat whitespace with tabs.
2550 (b4_lpure_formals): Remove this unused m4 macro.
2551 * tests/cxx-type.at: Reformat whitespace with tabs.
2552 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
2553 since it's a member. Rename type to isNterm for clarity.
2554
2555 2005-12-29 Akim <akim@sulaco.local>
2556
2557 Let glr.cc catch up with symbol_value_print.
2558 * data/glr.cc (b4_yysymprint_generate): Replace by...
2559 (b4_yy_symbol_print_generate): this.
2560 (yy_symbol_print, yy_symbol_value_print): Declare them.
2561
2562 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
2563
2564 * src/location.h (boundary): Note that a line or column equal
2565 to INT_MAX indicates an overflow.
2566 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
2567 (rule_length_overflow, increment_rule_length, add_column_width):
2568 New functions.
2569 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
2570 (<SC_BRACED_CODE>"}"):
2571 Use increment_rule_length rather than incrementing it by hand.
2572 (adjust_location, handle_syncline): Diagnose overflow.
2573 (handle_action_dollar, handle_action_at):
2574 Fix bug with monstrosities like $-2147483648.
2575 Remove now-unnecessary checks.
2576 (scan_integer): Verify assumptions and remove now-unnecessary checks.
2577 (convert_ucn_to_byte): Verify assumptions.
2578 (handle_syncline): New arg LOC. All callers changed.
2579 Don't store through a value derived from char const * pointer.
2580
2581 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
2582 GCC warnings.
2583
2584 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
2585
2586 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
2587 Remove unnecessary forward static decls.
2588
2589 2005-12-27 Akim Demaille <akim@epita.fr>
2590
2591 * src/reader.c (grammar_current_rule_check): Also check that $$
2592 is used.
2593 Take the rule to check as argument, hence rename as...
2594 (grammar_rule_check): this.
2595 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
2596 Rename as...
2597 (grammar_rule_begin, grammar_rule_end): these, for consistency.
2598 (grammar_midrule_action, grammar_symbol_append): Now static.
2599 * tests/torture.at (input): Don't rely on the default action
2600 being always performed.
2601 * tests/calc.at: "Set" $$ even when the action is "cut" with
2602 YYERROR or other.
2603 * tests/actions.at (Exotic Dollars): Instead of using unused
2604 values, check that the warning is issued.
2605
2606 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
2607
2608 * NEWS: Improve wording for unused-value warnings.
2609
2610 2005-12-22 Akim Demaille <akim@epita.fr>
2611
2612 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
2613 (b4_yysymprint_generate): Rename as...
2614 (b4_yy_symbol_print_generate): this.
2615 Generate yy_symbol_print instead of yysymprint.
2616 Generate also yy_symbol_value_print, and use it.
2617
2618 2005-12-22 Akim Demaille <akim@epita.fr>
2619
2620 * NEWS: Warn about unused values.
2621 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
2622 a `used' member.
2623 (symbol_list_n_get, symbol_list_n_used_set): New.
2624 (symbol_list_n_type_name_get): Use symbol_list_n_get.
2625 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
2626 * src/reader.c (grammar_current_rule_check): Check that values are
2627 used.
2628 * src/symtab.c (symbol_print): Accept 0.
2629 * tests/existing.at: Remove the type information.
2630 Empty the actions.
2631 Remove useless actions (beware of mid-rule actions: perl -000
2632 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
2633 * tests/actions.at (Exotic Dollars): Use unused values.
2634 * tests/calc.at: Likewise.
2635 * tests/glr-regression.at (No users destructors if stack 0 deleted):
2636 Likewise.
2637
2638 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
2639 rule_useful_p.
2640
2641 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
2642
2643 Undo 2005-12-01 tentative license wording change. The wording is
2644 still being reviewed by the lawyers, and we don't want to wait for
2645 them before publishing a test release. For now, revert to the
2646 previous wording.
2647 * NEWS: Undo 2005-12-01 change.
2648 * data/glr.c: Revert to previous license wording.
2649 * data/glr.cc: Likewise.
2650 * data/lalr1.cc: Likewise.
2651 * data/location.cc: Likewise.
2652 * data/yacc.c: Likewise.
2653
2654 * NEWS: Reword %destructor vs YYABORT etc.
2655 * data/glr.c: Use American spacing, for consistency.
2656 * data/glr.cc: Likewise.
2657 * data/lalr1.cc: Likewise.
2658 * data/yacc.c: Likewise.
2659 * data/yacc.c: Reformat comments slightly.
2660 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
2661 for consistency. Fix some spelling errors and reword recently-included
2662 text slightly.
2663 * tests/cxx-type.at: Cast results of malloc, for C++.
2664
2665 2005-12-21 Joel E. Denny <address@hidden>
2666
2667 * tests/cxx-type.at: Construct a tree, count the parents of shared
2668 nodes, and free each node once and only once. Previously, the memory
2669 for semantic values was leaked instead.
2670
2671 2005-12-21 Joel E. Denny <address@hidden>
2672
2673 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
2674 (yylval, yylloc): If pure, #define to yystackp->yyval and
2675 yystackp->yyloc similar to yychar and yynerrs.
2676 (yyparse): If pure, remove local yylval and yylloc. Add local
2677 yystackp to accommodate pure definitions of yylval and yylloc.
2678 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
2679 yylvalp and yyllocp to &yylval and &yylloc.
2680 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
2681 namespace. Previously, nerrs and char were missing, but lval and lloc
2682 weren't necessary.
2683 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
2684 yylvalp and yyllocp parameters since, if pure, these are now always
2685 accessible through yystackp. If not pure, they are still accessible
2686 globally.
2687 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
2688 `if (YYID (N))' to pacify lint.
2689
2690 2005-12-21 Akim Demaille <akim@epita.fr>
2691
2692 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
2693 destroy the RHS symbols of a rule.
2694 * data/yacc.c (yylen): Initialize to 0.
2695 Keep its value to the number of items to possibly shift.
2696 In particular, a regular successful parse that ends on YYFINAL by
2697 a (internal) YYACCEPT must not have yylen != 0.
2698 (yyerrorlab, yyreturn): Pop the RHS.
2699 Reorder a bit to emphasize the `shifting' bits of code.
2700 (YYPOPSTACK): Now accept a number of items to pop.
2701 * data/lalr1.cc: Likewise.
2702 * data/glr.c: Formatting changes.
2703 Use goto instead of fall through.
2704 * doc/bison.texinfo (Destructor Decl): Complete.
2705
2706 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2707
2708 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
2709 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
2710 * djgpp/config.bat: Replace every occurence of the file name
2711 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
2712 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
2713 * djgpp/config.sed: Replace every occurence of the file name
2714 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
2715 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
2716 * djgpp/djunpack.bat: DJGPP specific file.
2717 * djgpp/fnchange.lst: DJGPP specific file.
2718 * djgpp/README.in: Add new information about how to unpack the bison
2719 source on MSDOS and other systems which have 8.3 file name restrictions
2720 using djunpack.bat and fnchange.lst.
2721
2722 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
2723
2724 * bootstrap (build_cvs_prefix): Remove; unused.
2725 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
2726 when getting gnulib.
2727
2728 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
2729
2730 * data/glr.c: Reorder typedef declarations for structs to match order
2731 of struct declarations.
2732 Rename yystack everywhere to yystackp except in yyparse where it's not
2733 a pointer.
2734 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
2735 consistency.
2736 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
2737 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
2738 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
2739 lint.
2740
2741 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
2742
2743 * tests/sets.at (Accept): Fix typos in regular expression used to
2744 sed out the final state number.
2745
2746 Work around portability problem on Solaris 10: flex-generated
2747 files include <stdio.h> before <config.h>, which messes up
2748 because the latter defines __EXTENSIONS__. Address the problem
2749 by creating two new little files that include <config.h> first,
2750 then include the flex-generated files. Rewrite everyone else
2751 to include <config.h> first, as well.
2752 * lib/timevar.c: Always include "config.h".
2753 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
2754 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
2755 (EXTRA_bison_SOURCES): New macro.
2756 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
2757 * src/system.h: Don't include config.h.
2758 * src/LR0.c: Include <config.h> first.
2759 * src/assoc.c: Likewise.
2760 * src/closure.c: Likewise.
2761 * src/complain.c: Likewise.
2762 * src/conflicts.c: Likewise.
2763 * src/derives.c: Likewise.
2764 * src/files.c: Likewise.
2765 * src/getargs.c: Likewise.
2766 * src/gram.c: Likewise.
2767 * src/lalr.c: Likewise.
2768 * src/location.c: Likewise.
2769 * src/main.c: Likewise.
2770 * src/muscle_tab.c: Likewise.
2771 * src/nullable.c: Likewise.
2772 * src/output.c: Likewise.
2773 * src/parse-gram.y: Likewise.
2774 * src/print.c: Likewise.
2775 * src/print_graph.c: Likewise.
2776 * src/reader.c: Likewise.
2777 * src/reduce.c: Likewise.
2778 * src/relation.c: Likewise.
2779 * src/state.c: Likewise.
2780 * src/symlist.c: Likewise.
2781 * src/symtab.c: Likewise.
2782 * src/tables.c: Likewise.
2783 * src/uniqstr.c: Likewise.
2784 * src/vcg.c: Likewise.
2785
2786 * src/parse-gram.y: Fix minor problems uncovered by lint.
2787 (current_lhs, current_lhs_location): Now static.
2788 (current_assoc): Remove unused variable.
2789
2790 Cleanups so that Bison-generated parsers have less lint.
2791 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
2792 Prepend /*ARGSUSED*/, for lint's sake.
2793 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
2794 definition if 'lint' is defined.
2795 (YYID): New macro (or function, if lint).
2796 All uses of /*CONSTCOND*/0 replaced by YYID(0).
2797 * data/yacc.c: Likewise.
2798 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
2799 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
2800 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
2801 is C++ only.
2802 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
2803 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
2804 Use YYID(0) rather than 0, for lint.
2805 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
2806 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
2807
2808 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
2809
2810 * tests/glr-regression.at
2811 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
2812 Close memory leak reported by twlevo.
2813
2814 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
2815
2816 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
2817 all stacks.
2818 (yyparse): Iterate another stack in order to call user destructors.
2819 * tests/glr-regression.at (No users destructors if stack 0 deleted):
2820 New test case.
2821 (Duplicated user destructor for lookahead): This test now is expected
2822 to succeed.
2823
2824 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
2825
2826 * NEWS: Document the following change.
2827 * data/yacc.c: Say "parser skeleton" rather than "file", since
2828 it's no longer just a file.
2829 * data/glr.c: Grant a special exception for C GLR parsers, that
2830 reads like the already-existing exception for C LALR(1) parsers.
2831 * data/glr.cc: Likewise.
2832 * data/lalr1.cc: Likewise.
2833 * data/location.cc: Likewise.
2834 * data/yacc.c: Reword the "written by" statement to clarify that
2835 it was the parser skeleton, not the entire output file.
2836 * data/glr.c: Written by Paul Hilfinger.
2837 * data/glr.cc: Written by Akim Demaille.
2838 * data/lalr1.cc: Likewise.
2839
2840 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
2841
2842 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
2843 Fix typos in previous change that broke 'make check'.
2844 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
2845 supported in C.
2846 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
2847 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
2848 We can revert this once things settle down.
2849
2850 * src/conflicts.c (conflicts_print): Don't print file name twice
2851 when %expect fails because there were no conflicts.
2852 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
2853 change.
2854 * tests/conflicts.at (%expect not enough, %expect too much):
2855 (%expect with reduce conflicts): Adjust to new behavior.
2856
2857 2005-11-18 Akim Demaille <akim@epita.fr>
2858
2859 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
2860 errors.
2861 * NEWS: Document this.
2862 * doc/bison.texinfo (Expect Decl): Likewise.
2863
2864 2005-11-16 Akim Demaille <akim@epita.fr>
2865
2866 Generalize the display of semantic values and locations in traces.
2867 * data/glr.c (yy_reduce_print): Fix indices (again).
2868 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
2869 literal integers.
2870 * data/lalr1.cc (yyreduce_print): Rename as...
2871 (yy_reduce_print): this.
2872 Display values and locations.
2873 * data/yacc.c (yy_reduce_print): Likewise.
2874 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
2875 (yysymprint): Move higher to be visible from yy_reduce_print).
2876 (yyparse): Adjust.
2877 * tests/calc.at: Adjust the expected length of the traces.
2878
2879 2005-11-14 Akim Demaille <akim@epita.fr>
2880
2881 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
2882 from 1 to N, while values and location start at 0.
2883 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
2884
2885 2005-11-14 Akim Demaille <akim@epita.fr>
2886
2887 * data/glr.c (yy_reduce_print): Fix the $ number.
2888
2889 2005-11-14 Akim Demaille <akim@epita.fr>
2890
2891 "Use" parse parameters.
2892 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
2893 * data/glr.c, data/glr.cc: Use them.
2894 * data/glr.c (YYUSE): Have a C++ definition that supports
2895 non-pointer types.
2896
2897 2005-11-14 Akim Demaille <akim@epita.fr>
2898
2899 * data/glr.c (yyexpandGLRStack): Declare only if defined.
2900
2901 2005-11-14 Akim Demaille <akim@epita.fr>
2902
2903 * data/glr.cc: New.
2904 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
2905
2906 2005-11-12 Akim Demaille <akim@epita.fr>
2907
2908 Let position and location be PODs.
2909 * data/location.cc (position::initialize, location::initialize): New.
2910 (position::position, location::location): Define only if
2911 b4_location_constructors is defined.
2912 * data/lalr1.cc (b4_location_constructors): Define it for backward
2913 compatibility.
2914 * doc/bison.texinfo (Initial Action Decl): Use initialize.
2915
2916 2005-11-12 Akim Demaille <akim@epita.fr>
2917
2918 * data/lalr1.cc: Move the body of the ctor and dtor into the
2919 parser file (instead of the header).
2920 Wrap the implementations in a "namespace yy".
2921
2922 2005-11-12 Akim Demaille <akim@epita.fr>
2923
2924 Have glr.c include its header file when created.
2925 * data/glr.c (b4_shared_declarations): New.
2926 Output them verbatim in the parser if !%defines, otherwise
2927 output then in the header file, and include it instead.
2928
2929 2005-11-11 Akim Demaille <akim@epita.fr>
2930
2931 * data/glr.c: Comment changes.
2932
2933 2005-11-11 Akim Demaille <akim@epita.fr>
2934
2935 When yydebug, report semantic and location values for reductions.
2936 * data/glr.c (yy_reduce_print): Report the semantic values and the
2937 locations.
2938 (YY_REDUCE_PRINT): Adjust.
2939 (yyglrReduce): Use them.
2940 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
2941 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
2942 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
2943 traces.
2944
2945 2005-11-10 Akim Demaille <akim@epita.fr>
2946
2947 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
2948 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
2949 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
2950
2951 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
2952
2953 * m4/cxx.m4, examples/Makefile.am: Don't build
2954 examples/calc++ if no C++ compiler is available. (trivial change)
2955
2956 2005-11-09 Akim Demaille <akim@epita.fr>
2957
2958 * src/scan-skel.l: Use a couple of asserts.
2959
2960 2005-11-03 Akim Demaille <akim@epita.fr>
2961
2962 In some (weird) cases, the final state number is incorrect.
2963 Reported by Alexandre Duret-Lutz.
2964 * src/LR0.c (state_list_append): Remove the computation of
2965 final_state.
2966 (save_reductions): Do it here.
2967 (get_state): Alpha conversion.
2968 (generate_states): Use a for loop.
2969 * src/gram.h (item_number_is_rule_number)
2970 (item_number_is_symbol_number): New.
2971 * src/state.c: Use assert.
2972 * src/system.h: Include assert.h.
2973 * tests/sets.at (Accept): New.
2974
2975 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
2976
2977 * data/glr.c (yyfill): Adjust comment.
2978 (yyresolveAction): Initialize default location properly
2979 for empty right-hand sides.
2980 (yydoAction): Ditto.
2981 Add comment explaining apparently dead code.
2982 * tests/glr-regression.at
2983 (Incorrectly initialized location for empty right-hand side in GLR):
2984 New test.
2985
2986 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
2987
2988 * bootstrap (cleanup_gnulib): New function. Use it to clean up
2989 gnulib when interrupted. This fixes some race conditions and
2990 works around some portability problems (one noted by Paul
2991 Hilfinger).
2992
2993 2005-10-22 Akim <akim@epita.fr>
2994
2995 * Makefile.cfg: Adjust to config -> build-aux.
2996 Reported by twledo.
2997
2998 2005-10-21 Akim Demaille <akim@epita.fr>
2999
3000 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
3001 the %parse-params.
3002 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
3003 * data/yacc.c (b4_Pure_if): Rename as...
3004 (b4_yacc_pure_if): this.
3005 (YY_SYMBOL_PRINT, yyparse): Adjust.
3006 * doc/bison.texinfo: Formatting changes.
3007
3008 2005-10-21 Akim Demaille <akim@epita.fr>
3009
3010 Finish the transition config -> build-aux.
3011 * configure.ac, Makefile.am: Use build-aux.
3012 * config/prev-version, config/announce-gen, config/Makefile.am:
3013 Move to...
3014 * build-aux/prev-version, build-aux/announce-gen,
3015 * build-aux/Makefile.am: here.
3016
3017 2005-10-14 Akim Demaille <akim@epita.fr>
3018
3019 * examples/calc++/test: Use set -x only when VERBOSE.
3020
3021 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
3022
3023 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
3024 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
3025
3026 2005-10-13 Akim Demaille <akim@epita.fr>
3027
3028 * src/scan-skel.l: Output the base name parts of the parser and
3029 header file names.
3030 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
3031 additional checks.
3032 Use this to exercise C++ outputs in subdirs.
3033 Reported by Oleg Smolsky.
3034
3035 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
3036
3037 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
3038 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
3039 Problem reported by John P. Hartmann.
3040 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
3041 already defined it.
3042
3043 2005-10-12 Akim Demaille <akim@epita.fr>
3044
3045 * src/parse-gram.y (version_check): Exit 63 to please missing
3046 (stands for "version mismatch).
3047 * tests/input.at, doc/bison.texinfo: Adjust.
3048
3049 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
3050
3051 Work around portability problems with Visual Age C compiler
3052 (xlc and xlC_r) reported by John P. Hartmann.
3053 * data/location.cc (initial_column, initial_line): Remove.
3054 All uses replaced by 0 and 1.
3055 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
3056 that xlc complains about.
3057 * src/scan-skel.l (skel_wrap): Likewise.
3058 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
3059 as __STDC__.
3060 * data/yacc.c (YYMODERN_C): New macro, which also looks at
3061 __STDC_VERSION__. Use it everywhere instead of looking at
3062 __STDC__ and __cplusplus.
3063
3064 2005-10-10 Akim Demaille <akim@epita.fr>
3065
3066 * examples/calc++/test: Be quiet unless VERBOSE.
3067
3068 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
3069
3070 * data/c.m4 (yydestruct, yysymprint):
3071 Use YYUSE instead of casting to void.
3072 * data/glr.c (YYUSE): New macro.
3073 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
3074 Use it instead of rolling our own.
3075 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
3076 (YYCHK1):
3077 Use /*CONSTCOND*/ to suppress lint warnings.
3078 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
3079 (YY_STACK_PRINT): Use 'false' not '0'.
3080 (YYUSE): New macro.
3081 (yysymprint_, yydestruct_): Use it instead of rolling our own.
3082 * data/yacc.c (YYUSE): New macro.
3083 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
3084 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
3085 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
3086
3087
3088 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
3089 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
3090
3091 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
3092
3093 Undo the parts of the unlocked-I/O change that substituted
3094 putc or puts for printf. This might hurt performance a bit,
3095 but some people prefer the printf style.
3096 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
3097 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
3098 All uses replaced by YYFPRINTF and YYDPRINTF.
3099 * data/yacc.c: Likewise.
3100 * lib/bitset.c (bitset_print): Likewise.
3101 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
3102 putc and puts.
3103 * lib/lbitset.c (debug_lbitset): Likewise.
3104 * src/closure.c (print_firsts, print_fderives): Likewise.
3105 * src/gram.c (grammar_dump): Likewise.
3106 * src/lalr.c (look_ahead_tokens_print): Likewise.
3107 * src/output.c (escaped_output): Likewise.
3108 (user_actions_output): Break apart two printfs.
3109 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
3110 * src/reduce.c (reduce_print): Likewise.
3111 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
3112 * src/system.h: Include unlocked-io.h rathe than stdio.h.
3113
3114 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
3115 Use assignments rather than casts-to-void to suppress
3116 unused-variable warnings. This pacifies 'lint'.
3117 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
3118 unused-variable warnings.
3119
3120 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3121
3122 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
3123
3124 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
3125
3126 Use unlocked I/O for a minor performance improvement on hosts like
3127 GNU/Linux and Solaris that support unlocked I/O. The basic idea
3128 is to use the gnlib unlocked-io module, and to prefer putc and
3129 puts to printf when either will work (since the latter doesn't
3130 come in an unlocked flavor).
3131 * bootstrap (gnulib_modules): Add unlocked-io.
3132 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
3133 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
3134 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
3135 and similarly for puts and putc and printf.
3136 * data/yacc.c: Likewise.
3137 * lib/bitset.c (bitset_print): Likewise.
3138 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
3139 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
3140 to printf.
3141 * lib/lbitset.c (debug_lbitset): Likewise.
3142 * src/closure.c (print_firsts, print_fderives): Likewise.
3143 * src/gram.c (grammar_dump): Likewise.
3144 * src/lalr.c (look_ahead_tokens_print): Likewise.
3145 * src/output.c (escaped_output): Likewise.
3146 (user_actions_output): Coalesce two printfs.
3147 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
3148 * src/reduce.c (reduce_print): Likewise.
3149 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
3150 * src/system.h: Include unlocked-io.h rather than stdio.h.
3151
3152 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
3153 this confuses xgettext.
3154
3155 2005-10-02 Akim Demaille <akim@epita.fr>
3156
3157 * bootstrap (gnulib_modules): Add strverscmp.
3158 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
3159 * m4/.cvsignore: Add strverscmp.m4.
3160 * src/parse-gram.y (%require): New token, new rule.
3161 (version_check): New.
3162 * src/scan-gram.l (%require): Adjust.
3163 * tests/input.at (AT_REQUIRE): New.
3164 Use it.
3165 * doc/bison.texinfo (Require Decl): New.
3166 (Calc++ Parser): Use %require.
3167
3168 2005-10-02 Akim Demaille <akim@epita.fr>
3169
3170 * data/location.cc: New.
3171
3172 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
3173 Akim Demaille <akim@epita.fr>
3174
3175 Make sure -odir/foo.cc creates dir/location.hh etc.
3176 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
3177 (spec_file_prefix, spec_verbose_file, spec_graph_file)
3178 (spec_defines_file): Now const.
3179 (dir_prefix): New.
3180 (short_base_name): Remove.
3181 * src/files.c: Adjust.
3182 (dirname.h): Include.
3183 (base_name): Don't prototype it.
3184 (finput): Remove, duplicates gram_in.
3185 (full_base_name, short_base_name): Replace by...
3186 (all_but_ext, all_but_tab_ext): these.
3187 (compute_base_names): Rename as...
3188 (compute_file_name_parts): this.
3189 Update to compute the new variables, including dir_prefix.
3190 Adjust dependencies.
3191 * src/output.c (prepare): Output them.
3192 * src/reader.c: Adjust to use gram_in, not finput.
3193 * src/scan-skel.l (@dir_prefix@): New.
3194
3195 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3196
3197 * lib/subpipe.c: New function end_of_output_subpipe() added
3198 to allow support for non-posix systems. This is a no-op function
3199 for posix systems.
3200
3201 * lib/subpipe.h: New function end_of_output_subpipe() added
3202 to allow support for non-posix systems. This is a no-op function
3203 for posix systems.
3204
3205 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
3206 handle the lack of pipe/fork functionality on non-posix systems.
3207
3208 * djgpp/Makefile.maint: DJGPP specific file.
3209
3210 * djgpp/README.in: DJGPP specific file.
3211
3212 * djgpp/config.bat: DJGPP specific configuration file.
3213
3214 * djgpp/config.sed: DJGPP specific configuration file.
3215
3216 * djgpp/config.site: DJGPP specific configuration file.
3217
3218 * djgpp/config_h.sed: DJGPP specific configuration file.
3219
3220 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
3221
3222 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
3223
3224 2005-10-02 Akim Demaille <akim@epita.fr>
3225
3226 * data/location.cc: New, extract from...
3227 * data/lalr1.cc: here.
3228 (location.hh): Include it after the user prologue, in case the
3229 filename type is defined by the user.
3230 Forward declation location and position before the pre-prologue.
3231 (yyresult_): Rename as...
3232 (yyresult): this, it's a local variable, not an attribute.
3233 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
3234
3235 2005-10-01 Akim Demaille <akim@epita.fr>
3236
3237 * examples/extexi: Restore the #line generation.
3238
3239 2005-09-30 Akim Demaille <akim@epita.fr>,
3240 Alexandre Duret-Lutz <adl@gnu.org>
3241
3242 Move the token type and YYSTYPE in the parser class.
3243 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
3244 (parser::token): New, from the moved free definition of tokens.
3245 (parser::semantic_value): Now a full definition instead of an
3246 indirection to YYSTYPE.
3247 (b4_post_prologue): No longer included in the header file, but
3248 in the implementation file.
3249 * doc/bison.texi (C+ Language Interface): Update.
3250 * src/parse-gram.y: Support unary %define.
3251 * tests/actions.at: Define global_tokens_and_yystype for backward
3252 compatibility until we update the tests.
3253 * tests/calc.at: Idem.
3254 (first_line, first_column, last_line, last_column): Define for lalr1.cc
3255 to simplify the code.
3256
3257 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
3258
3259 Port to SunOS 4.1.4, which lacks strtoul and strerror.
3260 Ah, the good old days! Problem reported by Peter Klein.
3261 * bootstrap (gnulib_modules): Add strerror, strtoul.
3262 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
3263 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
3264
3265 2005-09-29 Akim Demaille <akim@epita.fr>
3266
3267 * data/c.m4 (b4_error_verbose_if): New.
3268 * data/lalr1.cc: Use it.
3269 (YYERROR_VERBOSE_IF): Remove.
3270 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
3271 parser members, replaced by...
3272 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
3273 local variables.
3274 (yysyntax_error_): Takes the state number as argument.
3275 (yyreduce_print_): Use the argument yyrule, not the former
3276 attribute yyn_.
3277
3278 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
3279
3280 * bootstrap (gnulib_modules): Add verify.
3281 * lib/.cvsignore: Add verify.h.
3282 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
3283 * src/system.h (verify): Remove.
3284 Include verify.h instead.
3285 * src/tables.c (tables_generate): Use new API for 'verify'.
3286
3287 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
3288
3289 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
3290 local variables whose names begin with 'yy'.
3291 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
3292 Trivial changes from Joel E. Denny.
3293
3294 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
3295 it itself.
3296 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
3297 don't use alloca any more.
3298
3299 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
3300 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
3301 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
3302 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
3303 to match yacc.c, to test more hosts.
3304
3305 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
3306
3307 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
3308 doesn't affect behavior.
3309 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
3310 Solaris, AIX, MSC.
3311 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
3312 This works a bit better with glibc, if user code has already included
3313 stdlib.h.
3314 * doc/bison.texinfo (Bison Parser): Document that users can't
3315 arbitrarily use malloc and free for other purposes. Document
3316 that <alloca.h> and <malloc.h> might be included.
3317 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
3318 user must declare alloca.
3319
3320 * HACKING (release): Forwarn the Translation Project about
3321 stable releses.
3322
3323 2005-09-20 Akim Demaille <akim@epita.fr>
3324
3325 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
3326
3327 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
3328
3329 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
3330 (YYSTACK_ALLOC_MAXIMUM): Use it.
3331 (yysyntax_error): New function.
3332 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
3333 multiple syntax errors are reported, and alloca is being used.
3334 Instead, reallocate buffers twice as big each time, so that
3335 we waste at most half the allocated memory. Start with a small
3336 (128-byte) buffer that will suffice in most cases anyway.
3337 Use yysyntax_error to do most of the work.
3338
3339 * doc/bison.texinfo (Error Reporting, Table of Symbols):
3340 yynerrs is the number of errors reported, not the number of
3341 errors encountered.
3342
3343 * tests/glr-regression.at (Duplicated user destructor for lookahead):
3344 Mark it as expected to fail.
3345 Cast result of malloc; problem reported by twlevo@xs4all.nl.
3346 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
3347 Don't start user-code symbols with "yy", to avoid name space problems.
3348
3349 2005-09-19 Akim Demaille <akim@epita.fr>
3350
3351 Remove the traits, failed experiment.
3352 It never proved useful, and anyway because of the current
3353 definition, it was not possible to have several specialization of
3354 this traits, making it useless.
3355 * data/lalr1.cc (yy:traits): Remove.
3356 Inline its definitions in the parser class.
3357
3358 2005-09-19 Akim Demaille <akim@epita.fr>
3359
3360 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
3361 least Mac OSX with a /usr/local install of gettext.
3362
3363 2005-09-19 Akim Demaille <akim@epita.fr>
3364
3365 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
3366 and yytoken for similarity with the other skeletons.
3367
3368 2005-09-19 Akim Demaille <akim@epita.fr>
3369
3370 * NEWS, configure.ac: update version number to 2.1a.
3371
3372 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
3373
3374 * NEWS: Version 2.1.
3375
3376 * NEWS: Remove notice of yytname change, since it was never in an
3377 official release.
3378 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
3379 diagnostic.
3380 * src/output.c (prepare): Likewise.
3381 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
3382 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
3383 is not defined. This is an awful hack, but it's enough for now.
3384 All callers changed.
3385 * tests/glr-regression-at (make_value): Args are const pointers now,
3386 to avoid GCC warning.
3387 (Duplicated user destructor for lookahead): New test. Currently
3388 skipped. It fails on my host but I'm not sure it'll always fail.
3389
3390 2005-09-16 Akim Demaille <akim@epita.fr>
3391
3392 * src/symtab.h (struct symbol): Declare the printer and destructor
3393 as const, to avoid accidental calls to free.
3394 (symbol_destructor_set, symbol_printer_set): Adjust.
3395 * src/symtab.c: Adjust.
3396
3397 2005-09-16 Akim Demaille <akim@epita.fr>
3398
3399 * data/c.m4 (b4_token_enums): New.
3400 (b4_token_defines): Rename as...
3401 (b4_token_enums_defines): this.
3402 (b4_token_defines): New, output only the #defines.
3403 * data/yacc.c, data/glr.c: Adjust.
3404 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
3405 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
3406 as default values.
3407
3408 2005-09-16 Akim Demaille <akim@epita.fr>
3409
3410 * data/lalr1.cc (yylex_): Remove, inline its code.
3411 (yyreport_syntax_error_): Remove, replaced by...
3412 (yysyntax_error_): this which returns a string and leaves to the
3413 caller the call to the users' error function.
3414 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
3415 Move from members of the parser object...
3416 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
3417 to local variables of the parse function.
3418
3419 2005-09-16 Akim Demaille <akim@epita.fr>
3420
3421 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
3422 since it's in Bison's name space.
3423
3424 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
3425
3426 * data/glr.c (yyresolveValue): Add default case to pacify
3427 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
3428
3429 * NEWS: Document when yyparse started to return 2.
3430 * doc/bison.texinfo (Parser Function): Document when yyparse
3431 returns 2.
3432
3433 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
3434 (b4_filename_type): Renamed back from b4_file_name_type. All uses
3435 changed.
3436 (class position): file_name -> filename (reverting). All uses changed.
3437
3438 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
3439
3440 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
3441 do anything if $@ exists. This reverts part of the 2005-07-07
3442 patch.
3443
3444 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
3445
3446 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
3447 contains obsolete information and isn't worth distributing as a
3448 separate file anyway.
3449 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
3450 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
3451 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
3452 (yyparse): Abort if user code uses longjmp to throw an unexpected
3453 value.
3454
3455 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
3456
3457 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
3458 Suggested by twlevo@xs4all.nl.
3459
3460 * data/glr.c (YYCHK1): Do not assume YYE is in range.
3461 This avoids a diagnostic from gcc -Wswitch-enum.
3462 Problem reported by twlevo@xs4all.nl.
3463
3464 * doc/bison.texinfo: Don't use "filename", as per GNU coding
3465 standards. Use "file name" or "file" or "name", depending on
3466 the context.
3467 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
3468 not to hack/foo.tab.c.
3469 (Calc++ Top Level): 2nd arg of main is not const.
3470 * data/glr.c: b4_filename -> b4_file_name.
3471 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
3472 All uses changed.
3473 (class position): filename -> file_name. All uses changed.
3474 * data/yacc.c: b4_filename -> b4_file_name.
3475 * lib/bitset.h: filename -> file_name in local vars.
3476 * lib/bitset_stats.c: Likewise.
3477 * src/files.c: Likewise.
3478 * src/scan-skel.l ("@output ".*\n): Likewise.
3479 * src/files.c (file_name_split): Renamed from filename_split.
3480 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
3481
3482 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
3483
3484 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
3485 to accommodate latest gnulib.
3486
3487 * tests/glr-regression.at (Duplicate representation of merged trees):
3488 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
3489
3490 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
3491 needed.
3492
3493 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
3494
3495 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
3496 All uses changed. Invoke user destructor after an error during a
3497 split parse (trivial change from Joel E. Denny).
3498
3499 * tests/glr-regression.at
3500 (User destructor after an error during a split parse): New test case.
3501 Problem reported by Joel E. Denny in:
3502 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
3503
3504 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
3505
3506 * README-cvs: Give URLs for recommended tools.
3507 Mention Gzip version problem, and bootstrapping issues.
3508 Remove troubleshooting section, as it's somewhat obsolete.
3509
3510 * bootstrap (no_cache): New var, to accommodate different wget
3511 variants. Use it instead of '-C off'. Problem reported by
3512 twlevo@xs4all.nl.
3513
3514 * data/glr.c (yydestroyStackItem): New function.
3515 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
3516 debugging information. Problem reported by Joel E. Denny.
3517
3518 2005-08-25 Akim Demaille <akim@epita.fr>
3519
3520 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
3521
3522 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
3523
3524 * data/glr.c (yyrecoverSyntaxError, yyreturn):
3525 Don't invoke destructor on unresolved entries.
3526 * tests/glr-regression.at
3527 (User destructor for unresolved GLR semantic value): New test case.
3528 Problem reported by Joel E. Denny in:
3529 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
3530
3531 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
3532
3533 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
3534 Add strnlen.c.
3535 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
3536 lib-prefix.m4, po.m4.
3537
3538 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
3539 in yydestruct diagnostic, since it might not be an error.
3540 Problem reported by Joel Denny near end of
3541 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
3542 * data/lalr1.cc (yyerturn): Likewise.
3543 * data/yacc.c (yyreturn): Likewise.
3544 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
3545
3546 * src/files.c: Remove obsolete FIXME comment.
3547
3548 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
3549 with the other templates, and to fix bogus run-on messages such
3550 as the one reported at the end of
3551 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
3552 All callers changed to avoid the newline.
3553 (yyprocessOneStack): Output two lines rather than one, to accommodate
3554 the above change. This changes the debug output format slightly.
3555
3556 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
3557 reported by Joel E. Denny in
3558 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
3559 (trivial change).
3560 * tests/glr-regression.at (Duplicate representation of merged trees):
3561 New test, from Joel E. Denny in:
3562 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
3563 * THANKS: Add Joel E. Denny.
3564
3565 * configure.ac (AC_INIT): Bump to 2.0c.
3566
3567 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
3568
3569 * NEWS: Version 2.0b.
3570
3571 * Makefile.am (SUBDIRS): Put examples before tests, so that
3572 "make check" doesn't finish with "All 1 tests passed".
3573
3574 * tests/regression.at (Token definitions): Don't rely on
3575 AT_PARSER_CHECK for data that contains backslashes. It currently
3576 uses 'echo', and 'echo' isn't portable if its argument contains
3577 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
3578 that the byte '\0xff' is not printable in the C locale; it is,
3579 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
3580 not printable, so use '\0x81' to test.
3581
3582 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
3583 version of GCC, since the macro is used with non-GCC compilers.
3584
3585 Fix core dump reported by Pablo De Napoli in
3586 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
3587 * tests/regression.at (Invalid inputs with {}): New test.
3588 * src/parse-gram.y (token_name): Translate type before using
3589 it as an index.
3590
3591 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
3592 the user's name space. All uses changed to __attribute__
3593 ((__unused__)).
3594 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
3595 Add __attribute__ ((__noreturn__)).
3596
3597 * etc/clcommit: Remove. We weren't using it, and it failed
3598 "make maintainer-distcheck".
3599 * Makefile.maint: Merge from coreutils.
3600 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
3601 (syntax-check-rules): Change list of rules as described below.
3602 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
3603 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
3604 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
3605 (sc_trailing_space): New rules.
3606 (sc_xalloc_h_in_src): Remove.
3607 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
3608 (sc_space_tab, sc_error_exit_success, sc_changelog):
3609 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
3610 (makefile-check, po-check, author_mark_check):
3611 (makefile_path_separator_check, copyright-check):
3612 Use grep -n, to make it easier to find violations.
3613 Use CVS_LIST and CVS_LIST_EXCEPT.
3614 (header_regexp, h_re): Remove.
3615 (dd_c): New macro.
3616 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
3617 (my-distcheck): Use more-modern GCC flags.
3618 (signatures, %.asc): Remove.
3619 (rel-files, announcement): Remove signatures.
3620 Restore old updating code, even though we don't use it, so
3621 that we're the same as coreutils.
3622 (alpha, beta, major): Depend on news-date-check.
3623 Make the upload commands.
3624
3625 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
3626 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
3627 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
3628 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
3629 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
3630 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
3631 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
3632 * tests/sets.at: Likewise.
3633
3634 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
3635 we comment out the Autoconf version number.
3636 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
3637 it's error-prone and "make maintainer-distcheck" rejects it.
3638
3639 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
3640 Indent calls to "error" to pacify "make maintainer-distcheck",
3641 when the calls are not intended to be translated.
3642 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
3643
3644 * src/Makefile.am (DEFS): Use +=, to pacify
3645 "make maintainer-distcheck".
3646 (bison_SOURCES): Add scan-skel.h.
3647 (sc_tight_scope): New rule, from coreutils.
3648
3649 * src/files.c (src_extension, header_extension):
3650 Now static, not extern.
3651 * src/getargs.c (short_options): Likewise.
3652 * src/muscle_tab.c (muscle_table): Likewise.
3653 * src/parse-gram.y (current_class, current_type, current_prec):
3654 Likewise.
3655 * src/reader.c (grammar_end, previous_rule_end): Likewise.
3656 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
3657 * src/main.c (main): Cast bindtextdomain and textdomain calls to
3658 void, to avoid warning when NLS is disabled.
3659 * src/output.c: Include scan-skel.h.
3660 (scan_skel): Remove decl, since scan-skel.h does this.
3661 (output_skeleton):
3662 Indent calls to "error" to pacify "make maintainer-distcheck".
3663 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
3664 * src/reader.h (gram_end, gram_lineno): New decls to pacify
3665 "make maintainer-distcheck".
3666 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
3667 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
3668 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
3669 (skel_lex_destroy, scan_skel): Move these decls to...
3670 * src/scan-skel.h: New file.
3671 * src/uniqstr.c (uniqstr_assert):
3672 Indent calls to "error" to pacify "make maintainer-distcheck".
3673
3674 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
3675 not @VAR@.
3676
3677 * tests/torture.at: Revamp to avoid misuse of atoi that
3678 "make maintainer-distcheck" complained about.
3679
3680 * examples/extexi (message): Don't print a message more than once,
3681 and omit line-number decoration that makes Emacs compile think
3682 that informative messages are worth worrying about.
3683
3684 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
3685
3686 * configure.ac: Update version number.
3687
3688 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
3689 accidentally.
3690 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
3691 autogenerated by the maintainer.
3692 * examples/calc++/.cvsignore: Add *.yy.
3693
3694 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
3695 * lib/bitset_stats.c (bitset_stats_init): Likewise.
3696 * lib/bitsetv.c (bitsetv_alloc): Likewise.
3697
3698 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
3699
3700 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
3701 from maintainer-distcheck about casting the argument of 'free'.
3702
3703 * NEWS: Mention recent yytname changes.
3704 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
3705
3706 * bootstrap: For translations that have not yet been upgraded to
3707 the new runtime-po domain, prime the pump by extracting the
3708 relevant strings from the obsolete translations. This code can be
3709 removed once the bison-runtime domain has been translated by each
3710 team.
3711
3712 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
3713 now that token names are already quoted.
3714
3715 Fix problem reported by Anthony Heading.
3716 * data/glr.c (YYTOKEN_TABLE): New macro.
3717 (yytname): Define if YYTOKEN_TABLE.
3718 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
3719 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
3720 (YYERROR_VERBOSE): Define the same way the other skeletons do.
3721 * src/output.c (prepare_symbols): Output token_table_flag.
3722
3723 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
3724
3725 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
3726 again if the first call fails.
3727
3728 * data/glr.c (yytnamerr): New function.
3729 (yyreportSyntaxError): Use it to dequote most string literals.
3730 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
3731 with other skeletons. All uses changed.
3732 (yytnameerr_): New function.
3733 (yyreport_syntax_error): Use it to dequote most string literals.
3734 * data/yacc.c (yytnamerr): New function.
3735 (yyerrlab): Use it to decode most string literals.
3736 * doc/bison.texinfo (Decl Summary, Calling Convention):
3737 Clarify quoting convention of yytname.
3738 * src/output.c (prepare_symbols): Quote all names. This undoes
3739 the 2005-04-17 change, which is now accomplished (mostly) via
3740 changes in the parsers as described above.
3741 * tests/regression.at (Token definitions, Web2c Actions):
3742 Undo most 2005-04-17 change here, too.
3743
3744 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
3745
3746 Fix more problems reported by twlevo@xs4all.nl.
3747 * tests/cxx-type.at: Don't pipe output of ./types through sed to
3748 remove trailing spaces. This loses the exit status of ./types,
3749 and isn't needed since ./types shouldn't be emitting trailing
3750 spaces.
3751 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
3752 as the stack isn't valid in that case.
3753
3754 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
3755 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
3756 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
3757 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
3758 is used.
3759 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
3760 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
3761 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
3762 Likewise.
3763
3764 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
3765 overly-picky compilers that reject 'char *foo = "bar";'.
3766
3767 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
3768 to FILE * parameter, not to stderr. This fixes a typo introduced
3769 in the 2005-07-12 change.
3770
3771 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
3772 warnings from GCC 4.
3773
3774 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
3775 (yyglrShiftDefer, yysplitStack):
3776 Remove unused parameters b4_pure_formals. All uses changed.
3777 (yyglrShift): Remove unused parameters b4_user_formals.
3778 All uses changed.
3779 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
3780
3781 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
3782
3783 Destructor cleanups and regularization among the three skeletons.
3784 * NEWS: Document the behavior changes.
3785 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
3786 stack before failing, as the cleanup code will do it for us now.
3787 * data/lalr1.cc (yyerrlab): Likewise.
3788 * data/glr.c (yyparse): Pop everything off the stack before
3789 freeing it, so that destructors get called properly.
3790 * data/lalr1.cc (yyreturn): Likewise.
3791 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
3792 This is more consistent.
3793 * doc/bison.texinfo (Destructor Decl): Mention more reasons
3794 why destructors might be called. 1.875 -> 2.1.
3795 (Destructor Decl, Decl Summary, Table of Symbols):
3796 Some English-language cleanups for %destructor.
3797 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
3798 Add output line for destructor of start symbol.
3799 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
3800 because of that same extra output line.
3801
3802 * NEWS: Document minor wording changes in diagnostics of
3803 Bison-generated parsers.
3804 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
3805 Remove unused formals. All uses changed.
3806 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
3807 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
3808 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
3809 Rename yyoverflowab to yyexhaustedlab.
3810 When memory exhaustion occurs during syntax-error reporting,
3811 report it separately rather than in a single diagnostic; this
3812 eases translation.
3813 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
3814 (Memory Exhausted): Renamed from Parser Stack Overflow.
3815 Revamp wording slightly to prefer "memory exhaustion".
3816 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
3817
3818 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
3819
3820 Add i18n support to the GLR skeleton. Partially fix the C++
3821 skeleton; a C++ expert needs to finish this. Remove debugging
3822 msgids; there's little point to having them translated, since they
3823 can be understood only by someone who can read the
3824 (English-language) source code.
3825
3826 Generate runtime-po/bison-runtime.pot automatically, so that we
3827 don't have to worry about garbage getting in that file. We'll
3828 make sure after the next official release that old msgids don't
3829 get lost. See
3830 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
3831
3832 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
3833 Now auto-generated.
3834 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
3835 Fix typos in explanations of the runtime file.
3836 * bootstrap: Change gettext keyword from YYI18N to YY_.
3837 Use standard Makefile.in.in in runtime-po, since we'll arrange
3838 for backward-compatible bison-runtime.po files in a different way.
3839 * data/glr.c (YY_): New macro, from yacc.c.
3840 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
3841 Translate messages intended for users.
3842 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
3843 the wording in the other skeletons. We don't know that the memory
3844 is virtual.
3845 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
3846 Use same method that yacc.c uses.
3847 Don't translate debugging messages.
3848 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
3849 it doesn't work (yet), and requires C++ expertise to fix.
3850 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
3851 Move defn to a more logical place, to be consistent with other
3852 skeletons.
3853 Don't translate debugging messages.
3854 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
3855 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
3856 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
3857 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
3858
3859 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
3860 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
3861 void, not int.
3862 * tests/glr-regression.at (Badly Collapsed GLR States):
3863 Likewise.
3864 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
3865 yylex should return 0 at EOF rather than aborting.
3866
3867 Improve tests for stack overflow in GLR parser.
3868 Problem reported by twlevo@xs4all.nl.
3869 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
3870 All uses removed.
3871 (yyStackOverflow): Just longjmp, but with value 2 so that caller
3872 can handle the problem.
3873 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
3874 (yyparse): New local variable yyresult to record the result.
3875 Use result of setjmp to set it, rather than storing itinto
3876 struct.
3877 (yyDone): Remove label.
3878 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
3879 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
3880 if YYABORT is used).
3881 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
3882 yyparse status; put status > 1 into diagnostic.
3883 Check that status==2 works.
3884 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
3885 Use exit status 3 for failure to open (which shouldn't happen).
3886
3887 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
3888
3889 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
3890 1 on syntax error; just let yyparse do its thing.
3891 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
3892 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
3893 (Exploding the Stack Size with Alloca):
3894 (Exploding the Stack Size with Malloc):
3895 Expect exit status 2, not 1, since the parser is supposed to blow
3896 its stack. Problem reported by twlevo@xs4all.nl.
3897
3898 * data/glr.c (yyparse): Don't assume that the initial calls
3899 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
3900 Print a stack-overflow message and fail instead.
3901 Initialize the line-number information before creating the stack,
3902 so that the stack-overflow message can report line zero safely.
3903
3904 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
3905
3906 Fix problems reported by twlevo@xs4all.nl.
3907 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
3908 (yyuserMerge): Provide a default case if b4_mergers is empty.
3909 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
3910 * tests/glr-regression.at
3911 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
3912 Add casts to pacify C++ compilers.
3913 * tests/glr-regression.at (Improper merging of GLR delayed action
3914 sets): Declare yylex before using it.
3915 * tests/Makefile.am (maintainer-check-g++): Fix a stray
3916 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
3917 test for valgrind; valgrind is independent of g++.
3918 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
3919 for compatibility with POSIX 1003.1-2001 (if running coreutils).
3920 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
3921 Use a destructor, so that we can expand the stack. Change
3922 YYSTYPE to char * so that we can free it. Cast result of malloc.
3923
3924 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
3925
3926 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
3927 a valgrind failure. Problem reported by twlevo@xs4all.nl.
3928
3929 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
3930
3931 * PACKAGING: New file, suggested by Bruno Haible and taken from
3932 similar wording in gettext's PACKAGING file.
3933 * NEWS: Mention PACKAGING.
3934 * Makefile.am (EXTRA_DIST): Add PACKAGING.
3935
3936 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
3937
3938 * NEWS: Document recent i18n improvements.
3939 * bootstrap: Get runtime translations into runtime-po.
3940 Create runtime-po files automatically, if possible.
3941 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
3942 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
3943 does not infringe on the user's name space.
3944 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
3945 * doc/bison.texinfo (Internationalization): Revamp the English
3946 and Texinfo syntax a bit, to try to make it clearer.
3947 (Bison Options, Option Cross Key): Mention --print-localedir.
3948 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
3949 YYENABLE_NLS. Quote a bit more.
3950 * runtime-po/.cvsignore: New file.
3951 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
3952 * runtime-po/Rules-quot: Remove; now created by bootstrap.
3953 * runtime-po/quot.sed: Likewise.
3954 * runtime-po/boldquot.sed: Likewise.
3955 * runtime-po/en@quot.header: Likewise.
3956 * runtime-po/en@boldquot.header: Likewise.
3957 * runtime-po/insert-header.sin: Likewise.
3958 * runtime-po/remove-potcdate.sin: Likewise.
3959 * runtime-po/Makevars: Likewise.
3960 * runtime-po/LINGUAS: Likewise.
3961 * runtime-po/de.po: Likewise; we will rely on the translation project
3962 to maintain this, so "bootstrap" should get it.
3963 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
3964 its value.
3965 * src/main.c (main): Bind the bison-runtime domain, too.
3966
3967 2005-07-12 Bruno Haible <bruno@clisp.org>
3968
3969 * data/yacc.c: Include <libintl.h> when NLS is enabled.
3970 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
3971 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
3972 * runtime-po: New directory.
3973 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
3974 $(DOMAIN).pot-update rule, so that old messages are never dropped.
3975 * runtime-po/Rules-quot: New file, copied from po/.
3976 * runtime-po/quot.sed: Likewise.
3977 * runtime-po/boldquot.sed: Likewise.
3978 * runtime-po/en@quot.header: Likewise.
3979 * runtime-po/en@boldquot.header: Likewise.
3980 * runtime-po/insert-header.sin: Likewise.
3981 * runtime-po/remove-potcdate.sin: Likewise.
3982 * runtime-po/Makevars: New file.
3983 * runtime-po/POTFILES.in: New file.
3984 * runtime-po/LINGUAS: New file.
3985 * runtime-po/bison-runtime.pot: New file.
3986 * runtime-po/de.po: New file.
3987 * m4/bison.m4: New file.
3988 * Makefile.am (SUBDIRS): Add runtime-po.
3989 (aclocaldir, aclocal_DATA): New variables.
3990 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
3991 Define aclocaldir.
3992 * src/getargs.c (usage): Document --print-localedir option.
3993 (PRINT_LOCALEDIR_OPTION): New enum item.
3994 (long_options): Add --print-localedir option.
3995 (getargs): Handle --print-localedir option.
3996 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
3997 (Internationalization): New section.
3998
3999 2005-07-12 Akim Demaille <akim@epita.fr>
4000
4001 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
4002 for consistency with the rest of the code.
4003 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
4004 Add separators.
4005
4006 2005-07-12 Akim Demaille <akim@epita.fr>
4007
4008 * src/parse-gram.y: Use %printer instead of YYPRINT.
4009
4010 2005-07-12 Akim Demaille <akim@epita.fr>
4011
4012 * src/symtab.h, src/symtab.c (symbol_print): New.
4013 * src/symlist.h, src/symlist.c (symbol_list_print): New.
4014 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
4015
4016 2005-07-12 Akim Demaille <akim@epita.fr>
4017
4018 * data/glr.c (b4_syncline): Fix (swap) the definitions of
4019 b4_at_dollar and b4_dollar_dollar.
4020
4021 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
4022
4023 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
4024 and Pennello's paper.
4025
4026 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
4027
4028 * data/yacc.c (yyparse): Undo previous patch. Instead,
4029 set yylsp[0] and yyvsp[0] only if the initial action
4030 sets yylloc and yylval, respectively.
4031
4032 * data/yacc.c (yyparse): In the initial action, set
4033 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
4034 This avoids the use of undefined variables if the initial
4035 action does not set yylloc and/or yylval.
4036
4037 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
4038
4039 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
4040 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
4041 Remove from CVS. These files are automatically generated.
4042 * examples/extexi: Clarify that this file is now part of Bison,
4043 not GNU M4, and that it works with any POSIX-compatible Awk.
4044 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
4045 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
4046 so that we also get calc++-parser.yy. Geneate it.
4047 Use $(AWK), not gawk, since any conforming Awk will do.
4048 Put comment before action, since older 'make' can't handle comment
4049 in action.
4050 $(BUILT_SOURCES): List all built sources, not just some of them.
4051 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
4052 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
4053 $($(calc_sources_generated)): Remove unnecessary test for existence
4054 of target. (This had a shell syntax error anyway; a stray "x".)
4055 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
4056 calc++-parser.yy.
4057 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
4058
4059 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
4060 implied by the other modules.
4061
4062 2005-07-06 Akim Demaille <akim@epita.fr>
4063
4064 Bind examples/calc++ to the package.
4065 * examples/calc++/Makefile: Remove, replaced by...
4066 * examples/calc++/Makefile.am: ... this new file.
4067 * examples/calc++/test: Remove input.
4068 * examples/calc++/compile: Remove.
4069 * examples/Makefile.am: New.
4070 * configure.ac, Makefile.am: Adjust.
4071 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
4072
4073 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
4074
4075 * data/glr.c (yyFail): Drastically simplify; since the format argument
4076 never had any % directives, we can simply pass it to yyerror.
4077 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
4078 be modified later, as that is the usual style in glr.c.
4079 Problems reported by Paul Hilfinger.
4080
4081 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
4082 and size overflow errors.
4083 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
4084 in case the user prolog sets feature-test macros like _GNU_SOURCE.
4085 (YYSIZEMAX): New macro.
4086 (yystpcpy): New function, taken from yacc.c.
4087 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
4088 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
4089 so that we don't have to maintain their signatures.
4090 (yyFail): Check for buffer overflow, by using vsnprintf rather
4091 than vsprintf. Allocate a bigger buffer if possible.
4092 Report an error if buffer allocation fails.
4093 (yyStackOverflow): New function.
4094 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
4095 the initialization was successful. It might fail if storage was
4096 exhausted.
4097 (yyexpandGLRStack): Add more checks for storage allocation failure.
4098 Use yyStackOverflow to report failures.
4099 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
4100 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
4101 Don't assume stack number fits in int.
4102 (yysplitStack): Check for storage allocation failure.
4103 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
4104 can print diagnostics on storage allocation failure. All callers
4105 changed.
4106 (yyresolveValue): Use yybool for boolean.
4107 (yyreportSyntaxError): Check for size-calculation overflow.
4108 This code is taken from yacc.c.
4109 (yyparse): Check for storage allocation errors when allocating
4110 the initial stack.
4111
4112 2005-07-05 Akim Demaille <akim@epita.fr>
4113
4114 Extract calc++ from the documentation.
4115 * doc/bison.texinfo (Calc++): Add the extraction marks.
4116 * examples/extexi: New, from the aborted GNU Programming 2E.
4117 Separate the different paragraph of a file with empty lines.
4118 * examples/Makefile: Use it to extract the whole calc++ example.
4119
4120 2005-06-24 Akim Demaille <akim@epita.fr>
4121
4122 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
4123 class typedefs.
4124
4125 2005-06-22 Akim Demaille <akim@epita.fr>
4126
4127 * doc/bison.texinfo (C++ Language Interface): First stab.
4128 (C++ Parsers): Remove.
4129
4130 2005-06-22 Akim Demaille <akim@epita.fr>
4131
4132 * data/lalr1.cc (yylex_): Honor %lex-param.
4133
4134 2005-06-22 Akim Demaille <akim@epita.fr>
4135
4136 Start a set of simple examples.
4137 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
4138 * examples/calc++/calc++-driver.hh,
4139 * examples/calc++/calc++-parser.yy,
4140 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
4141 * examples/calc++/compile, examples/calc++/test: New.
4142
4143 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
4144
4145 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
4146 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
4147 which stems from the 2005-05-27 patch.
4148
4149 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
4150
4151 * data/glr.c: Modify treatment of unused parameters to permit use
4152 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
4153
4154 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
4155
4156 Fix infringement on user name space reported by Janos Zoltan Szabo.
4157 * data/yacc.c (yyparse): strlen -> yystrlen.
4158
4159 2005-05-30 Akim Demaille <akim@epita.fr>
4160
4161 * data/lalr1.cc (_): New.
4162 Translate the various messages.
4163
4164 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
4165
4166 Fix infringement on user name space reported by Bruno Haible.
4167 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
4168 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
4169 the user's name space.
4170 (alloca): Include <stdlib.h> to get it, if it's not built in.
4171 (YYMALLOC, YYFREE): Define only if needed.
4172 (malloc, free): Declare, but only if needed, as this infringes on
4173 the user name space.
4174
4175 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
4176
4177 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
4178 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
4179 with %d format.
4180 * lib/ebitset.c (min, max): Undef before defining.
4181 * lib/vbitset.c (min, max): Likewise.
4182 * lib/subpipe.c (create_subpipe): Save local variables in case
4183 vfork clobbers them.
4184
4185 2005-05-24 Bruno Haible <bruno@clisp.org>
4186
4187 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
4188 error message syntax used by gcc-4.0.
4189
4190 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
4191
4192 * README: Mention m4 1.4.3. Remove obsolete advice about
4193 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
4194
4195 * bootstrap: Remove workaround for problem I encountered with
4196 gettext 0.14.1; it seems to be fixed now.
4197
4198 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
4199
4200 * NEWS: Version 2.0a.
4201
4202 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
4203 the previous change.
4204
4205 Various maintainer cleanups.
4206 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
4207 conftest*, for benefit of CVS commands run at the same time as
4208 "configure". Add build-aux, since "bootstrap" now creates it and
4209 its subfiles.
4210 * Makefile.cfg (move_if_change): Remove.
4211 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
4212 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
4213 (po_repo, do-po-update, po-update, wget_files, get-targets):
4214 (config.guess-url_prefix, config.sub-url_prefix):
4215 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
4216 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
4217 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
4218 Remove.
4219 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
4220 this is now the recommended name.
4221 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
4222 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
4223 ylwrap. These files now go into build-aux.
4224 * config/move-if-change: Remove.
4225 * config/prev-version.txt: Bump from 1.75 to 2.0.
4226
4227 * bootstrap: Add stdio-safer, unistd-safer modules.
4228 Remove m4/glibc2.m4 (introduced by latest gnulib, but
4229 we don't need it).
4230 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
4231 fopen-safer.c, stdio-safer.h, unistd-safer.h.
4232 * lib/subpipe.c: Include "unistd-safer.h".
4233 (create_subpipe): Make sure all the newly-created
4234 file descriptors are > 2, so that diagnostics don't
4235 get sent down them (which might cause Bison to hang, in theory).
4236 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
4237 * src/files.c (xfopen): Use fopen_safer, not fopen.
4238
4239 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
4240 yesterday's yacc.c fix.
4241
4242 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
4243
4244 * data/glr.c, data/lalr1.cc: Update copyright date.
4245
4246 Fix a destructor bug reported by Wolfgang Spraul in
4247 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
4248 * data/yacc.c (yyabortlab): Don't call destructor, and
4249 don't set yychar to EMPTY.
4250 (yyoverflowlab): Don't call destructor.
4251 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
4252 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
4253 since we no longer output the message "discarding lookahead token
4254 end of input ()".
4255
4256 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
4257
4258 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
4259 fix a small glitch in debugging output.
4260 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
4261 after YY_SYMBOL_PRINT where needed.
4262
4263 (struct yyGLRState): Add some comments.
4264 (struct yySemanticOption): Add some comments.
4265 (union yyGLRStackItem): Add comment.
4266
4267 (yymergeOptionSets): Correct this to properly perform the union,
4268 avoiding infinite reported by Michael Rosien.
4269 Update comment.
4270
4271 * tests/glr-regression.at: Add test for GLR merging error reported
4272 by M. Rosien.
4273
4274 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
4275
4276 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
4277 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
4278 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
4279 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
4280 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
4281 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
4282 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
4283 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
4284 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
4285 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
4286 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
4287 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
4288 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
4289 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
4290 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
4291 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
4292 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
4293 src/derives.h, src/files.c, src/files.h, src/getargs.c,
4294 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
4295 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
4296 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
4297 src/output.h, src/parse-gram.c, src/parse-gram.h,
4298 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
4299 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
4300 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
4301 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
4302 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
4303 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
4304 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
4305 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
4306 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
4307 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
4308 tests/reduce.at, tests/regression.at, tests/sets.at,
4309 tests/synclines.at, tests/testsuite.at, tests/torture.at:
4310 Update FSF postal mail address.
4311
4312 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
4313
4314 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
4315 Problem reported by Ralf Menzel.
4316
4317 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
4318
4319 * tests/actions.at: Test that stack overflow invokes destructors.
4320 From Marcus Holland-Moritz.
4321 * data/yacc.c (yyerrlab): Move the code that destroys the stack
4322 from here....
4323 (yyreturn): to here. That way, destructors are called properly
4324 even if the stack overflows, or the user calls YYACCEPT or
4325 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
4326 (yyoverflowlab): Destroy the lookahead.
4327
4328 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
4329
4330 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
4331
4332 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
4333
4334 * NEWS: Bison-generated C parsers no longer quote literal strings
4335 associated with tokens.
4336 * src/output.c (prepare_symbols): Don't escape strings,
4337 since users don't want to see C escapes.
4338 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
4339 in diagnostics.
4340 * tests/input.at (Torturing the Scanner): Likewise.
4341 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
4342
4343 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
4344
4345 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
4346 the data size is known to be too small and we can't increase it.
4347 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
4348
4349 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
4350
4351 * src/parse-gram.y: Include quotearg.h.
4352 (string_as_id): Quote $1 before using it as a key, since the
4353 lexer no longer quotes it for us.
4354 (string_content): Don't strip quotes, since lexer no longer
4355 quotes it for us.
4356 * src/scan-gram.l: Include quotearg.h.
4357 ("\""): Omit quote.
4358 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
4359 a key, since the rest of the lexer doesn't quote it.
4360 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
4361 * tests/regression.at (Token definitions): Check for backslashes
4362 in token strings.
4363
4364 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
4365 (YYSIZE_T): Define to unsigned long int when using an older compiler.
4366 (yyparse): Revamp code to generate long syntax error message, to
4367 make it easier to translate, and to avoid problems with arithmetic
4368 overflow. Change "virtual memory" to "memory" in diagnostic, since
4369 we don't know whether the memory is virtual.
4370
4371 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
4372
4373 * NEWS: Bison-generated C parsers now use the _ macro to
4374 translate strings.
4375 * data/yacc.c (_) [!defined _]: New macro.
4376 All English strings wrapped inside this macro.
4377 * doc/bison.texinfo (Bison Parser): Document _.
4378 * po/POTFILES.in: Include src/parse-gram.c, since it now
4379 includes translateable strings that parse-gram.y doesn't.
4380
4381 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
4382
4383 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
4384 reverting the 2004-10-11 change to this function.
4385 (symbol_check_alias_consistency): Don't call symbol_type_set
4386 if the type name is already correct.
4387 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
4388
4389 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
4390
4391 * tests/regression.at (Token definitions): Don't use a token named
4392 c, as that generates a "#define c ..." that runs afoul of buggy
4393 stdlib.h that uses the identifier c as a member of struct
4394 drand48_data. Problem reported by Horst Wente.
4395
4396 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
4397
4398 * bootstrap: Change translation URL from
4399 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
4400 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
4401 redirection glitches. Problem reported by twlevo@xs4all.nl.
4402
4403 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
4404
4405 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
4406 after operands; POSIX says this isn't portable for the c99 command.
4407
4408 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
4409
4410 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
4411 immediately if a data overrun has occurred; this may help us track
4412 down what may be a spurious failure on MacOS.
4413
4414 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
4415
4416 Respond to problems reported by twlevo@xs4all.nl.
4417
4418 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
4419
4420 * src/vcg.h: Comment fix.
4421 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
4422 (G_CMAX): Change to -1 instead of INT_MAX.
4423
4424 * data/yacc.c (yyparse): Omit spaces before #line.
4425
4426 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
4427
4428 * src/tables.c (state_number_to_vector_number): Put it inside an
4429 "#if 0", since it's not currently used. Problem reported by
4430 Roland McGrath.
4431
4432 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
4433
4434 * src/output.c (escaped_output): Renamed from
4435 escaped_file_name_output, since we now use it for symbol tags as
4436 well. All uses changed.
4437 (symbol_destructors_output, symbol_printers_output):
4438 Escape symbol tags too.
4439 Problem reported by Matyas Forstner in
4440 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
4441
4442 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
4443 not needed.
4444 * src/output.c (user_actions_output, token_definitions_output,
4445 symbol_destructors_output, symbol_printers_output): Likewise.
4446 * src/reader.c (prologue_augment): Likewise.
4447 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
4448
4449 * src/vcg.c (output_edge): Don't quote linestyle arg.
4450 Problem reported by twlevo@xs4all.nl.
4451
4452 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
4453
4454 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
4455 example, reported by Derek M Jones. Also, make the example even
4456 more outrageous, to better illustrate how bad the problem is.
4457
4458 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
4459
4460 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
4461 putsym. Typo reported by Sebastian Piping.
4462
4463 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
4464
4465 * doc/bison.texinfo (Language and Grammar): some -> same
4466 (Epilogue): int he -> in the
4467 Typos reported by Sebastian Piping via Justin Pence.
4468
4469 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
4470
4471 * tests/glr-regression.at (Improper handling of embedded actions
4472 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
4473 embedded actions and $-N in GLR parsers", work around an Autoconf bug
4474 with dollar signs in test names.
4475 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
4476 for a similar reason.
4477
4478 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
4479
4480 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
4481 wants to redefine G_VIEW.
4482
4483 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
4484
4485 * src/vcg.c (get_view_str): Remove case for normal_view.
4486 Problem reported by twlevo@xs4all.nl.
4487
4488 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
4489
4490 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
4491 Problem reported by twlevo@xs4all.nl.
4492
4493 * doc/bison.texinfo: Change @dircategory from "GNU programming
4494 tools" to "Software development". Requested by Richard Stallman
4495 via Karl Berry.
4496
4497 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
4498
4499 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
4500 Problem reported by twlevo@xs4all.nl.
4501
4502 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
4503
4504 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
4505 keyword; it's not needed with modern compilers, and it doesn't
4506 affect correctness with older compilers. Suggested by
4507 twlevo@xs4all.nl.
4508
4509 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
4510
4511 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
4512 gcc -Wswitch-default.
4513 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
4514 * data/yacc.c (yyparse): Likewise.
4515
4516 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
4517
4518 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
4519 already. Let config.h define any nonstandard values.
4520
4521 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
4522
4523 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
4524 for the benefit of slower hosts. Problem reported by
4525 Nelson H. F. Beebe.
4526
4527 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
4528
4529 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
4530 being defined and not used.
4531 * data/lalr1.cc (yyparse): Likewise.
4532 Use "if (false)" rather than "if (0)".
4533
4534 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
4535
4536 * TODO: Mention that we should allow NUL bytes in tokens.
4537
4538 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
4539
4540 * src/scan-skel.l (<<EOF>>): Don't close standard output.
4541 Problem reported by Hans Aberg.
4542
4543 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
4544
4545 * src/getargs.c (version): Happy new year; update overall
4546 program copyright date from 2004 to 2005.
4547
4548 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
4549 Problem reported by Hans Aberg.
4550 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
4551 (Output file names.): Add a test for the case when standard output
4552 is closed.
4553
4554 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
4555
4556 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
4557 to fix an oversight in the Bison 2.0 manual.
4558
4559 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
4560
4561 * NEWS: Version 2.0. Reformat the existing news items since
4562 1.875, so that related items are grouped together.
4563 * configure.ac (AC_INIT): Bump version to 2.0.
4564 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
4565
4566 * tests/torture.at (Exploding the Stack Size with Alloca): Set
4567 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
4568 otherwise, we're not testing alloca. Unfortunately there's no
4569 simple way to consult HAVE_ALLOCA here.
4570
4571 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
4572 for yymsg, too.
4573
4574 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
4575 hand. This avoids a warning about comparing int to size_t when
4576 GCC warnings are enabled.
4577
4578 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
4579
4580 * NEWS: Bison-generated parsers no longer default to using the
4581 alloca function (when available) to extend the parser stack, due
4582 to widespread problems in unchecked stack-overflow detection.
4583 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
4584 responsibility to set it to a positive value. This lets the user
4585 specify a value that is not a preprocessor constant.
4586 * data/yacc.c (YYMAXDEPTH): Likewise.
4587 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
4588 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
4589 to be a compile-time constant. However, explain the constraints on it.
4590 Also, explain the constraints on YYINITDEPTH.
4591 (Table of Symbols): Explain that alloca is no longer the default.
4592 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
4593 to 1.
4594
4595 * doc/bison.texinfo (Location Default Action): Mention that n must
4596 be zero when k is zero. Suggested by Frank Heckenbach.
4597
4598 2004-12-22 Akim Demaille <akim@epita.fr>
4599
4600 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
4601 (parser::state_type, parser::semantic_type, parser::location_type):
4602 Private, not public.
4603 (parser::parse): Return ints, not bool.
4604 Returning a bool introduces a problem: 0 corresponds to false, and
4605 it seems weird to return false on success. Returning true changes
4606 the conventions for yyparse.
4607 Alternatively we could return void and send an exception.
4608 There is no clear consensus (yet?).
4609 (state_stack, semantic_stack, location_stack): Rename as...
4610 (state_stack_type, semantic_stack_type, location_stack_type): these.
4611 Private, not public.
4612 * tests/c++.at: New.
4613 * tests/testsuite.at, tests/Makefile.am: Adjust.
4614
4615 2004-12-21 Akim Demaille <akim@epita.fr>
4616
4617 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
4618
4619 2004-12-21 Akim Demaille <akim@epita.fr>
4620
4621 Don't impose std::string for filenames.
4622
4623 * data/lalr1.cc (b4_filename_type): New.
4624 (position::filename): Use it.
4625 (parser.hh): Move the inclusion of stack.hh and location.hh below
4626 the user code, so that needed headers for the filename type can be
4627 included first.
4628 Forward declare them before the user code.
4629 * tests/Makefile.am (check-local, installcheck-local): Pass
4630 TESTSUITEFLAGS to the TESTSUITE.
4631
4632 2004-12-20 Akim Demaille <akim@epita.fr>
4633
4634 Use more STL like names: my_class instead of MyClass.
4635
4636 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
4637 (SemanticStack, SemanticType, StateStack, StateType)
4638 (TokenNumberType, Stack, Slice, Traits, Parser::location)
4639 (Parser::value): Rename as...
4640 (location_stack, location_type, rhs_number_type, semantic_stack)
4641 (semantic_type, state_stack, state_type, token_number_type, stack)
4642 (slice, traits, parser::yylloc, parser::yylval): these.
4643
4644 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
4645
4646 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
4647
4648 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
4649 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
4650
4651 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
4652
4653 Remove uses of 'short int' and 'unsigned short int'. This raises
4654 some arbitrary limits. It uses more memory but nowadays that's
4655 not much of an issue.
4656
4657 This change does not affect the generated parsers; that's a different
4658 task, as some users will want to conserve memory there.
4659
4660 Ideally we should use size_t to represent all object counts, and
4661 something like ptrdiff_t to represent signed differences of object
4662 counts; but that will require more code-cleanup than I have the
4663 time to do right now.
4664
4665 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
4666 Use size_t, not int or short int, to count objects.
4667 * src/closure.c (nritemset, closure): Likewise.
4668 * src/closure.h (nritemset, closure): Likewise.
4669 * src/nullable.c (nullable_compute): Likewise.
4670 * src/print.c (print_core): Likewise.
4671 * src/print_graph.c (print_core): Likewise.
4672 * src/state.c (state_compare, state_hash): Likewise.
4673 * src/state.h (struct state): Likewise.
4674 * src/tables.c (default_goto, goto_actions): Likewise.
4675
4676 * src/gram.h (rule_number, rule): Use int, not short int.
4677 * src/output.c (prepare_rules): Likewise.
4678 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
4679 errs, reductions): Likewise.
4680 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
4681 Likewise.
4682 * src/tables.c (vector_number, tally, action_number,
4683 ACTION_NUMBER_MINIMUM): Likewise.
4684 * src/output.c (muscle_insert_short_int_table): Remove.
4685
4686 2004-12-17 Akim Demaille <akim@epita.fr>
4687
4688 * data/lalr1.cc: Extensive Doxygenation.
4689 (error_): Rename as...
4690 (error): this, since it is visible to the user.
4691 Adjust callers.
4692 (Parser::message): Now an automatic variable from...
4693 (Parser::yyreport_syntax_error_): here.
4694 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
4695 Parser::error.
4696 * tests/input.at: Escape $.
4697
4698 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
4699
4700 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
4701 Parenthesize rhs to avoid obscure problems with mistakes like
4702 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
4703 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
4704 b4_rhs_location): Likewise.
4705 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
4706 b4_rhs_location): Likewise.
4707
4708 2004-12-16 Akim Demaille <akim@epita.fr>
4709
4710 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
4711 yacc.c: be sure to stay within yycheck_.
4712 * tests/actions.at: Re-enable C++ tests.
4713
4714 2004-12-16 Akim Demaille <akim@epita.fr>
4715
4716 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
4717 real.
4718
4719 2004-12-16 Akim Demaille <akim@epita.fr>
4720
4721 Use #define to handle the %name-prefix.
4722
4723 * data/glr.c, data/yacc.c: Comment changes.
4724 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
4725 so that one can refer to yylex in the parser file, and have it
4726 renamed, as is the case with other skeletons.
4727
4728 2004-12-16 Akim Demaille <akim@epita.fr>
4729
4730 Move lalr1.cc internals into yy*.
4731
4732 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
4733 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
4734 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
4735 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
4736 (empty_, final_, terror_, errcode_, ntokens_)
4737 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
4738 (looka_, ilooka_, error_range_, nerrs_):
4739 Rename as...
4740 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
4741 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
4742 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
4743 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
4744 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
4745 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
4746 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
4747 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
4748 these.
4749
4750 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
4751
4752 Fix some problems reported by twlevo at xs4all.
4753 * src/symtab.c (symbol_new): Report an error if the input grammar
4754 contains too many symbols. This is better than calling abort() later.
4755 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
4756 (struct node, struct graph):
4757 Rename member expand to stretch. All uses changed.
4758 (struct graph): Remove member layoutalgorithm. All uses removed.
4759 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
4760 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
4761 All uses changed.
4762 (N_STRETCH): Rename from N_EXPAND. All uses changed.
4763
4764 2004-12-15 Akim Demaille <akim@epita.fr>
4765
4766 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
4767 Add more Doxygen comments.
4768 (symprint_, stack_print_, reduce_print_, destruct_, pop)
4769 (report_syntax_error_, translate_): Rename as...
4770 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
4771 (yypop_, yyreport_syntax_error_, yytranslate_): this.
4772
4773 2004-12-15 Akim Demaille <akim@epita.fr>
4774
4775 * data/lalr1.cc (lex_): Rename as...
4776 (yylex_): this.
4777 Move the trace here.
4778 Take the %name-prefix into account.
4779 Reported by Alexandre Duret-Lutz.
4780
4781 2004-12-15 Akim Demaille <akim@epita.fr>
4782
4783 Simplify the C++ parser constructor.
4784
4785 * data/lalr1.cc (debug_): Rename as...
4786 (yydebug_): so that the parser's internals are always in the yy*
4787 pseudo namespace.
4788 Adjust uses.
4789 (b4_parse_param_decl): Remove the leading comma as it is now only
4790 called as unique argument list.
4791 (Parser::Parser): Remove the constructor accepting a location and
4792 an initial debugging level.
4793 Remove from the other ctor the argument for the debugging level.
4794 (debug_level_type, debug_level, set_debug_level): New.
4795
4796 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
4797 constructor calls.
4798
4799 2004-12-15 Akim Demaille <akim@epita.fr>
4800
4801 Remove b4_root related material: failure experiment
4802 (which goal was to allow to derive from a class).
4803
4804 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
4805 definitions and uses.
4806
4807 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
4808
4809 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
4810 not 2, since it's not portable to subtract 1 from the start of an
4811 array. The new item 0 is never set or used. All uses changed.
4812
4813 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
4814 the default definition of YYLLOC_DEFAULT. Problem reported
4815 by Frank Heckenbach.
4816
4817 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
4818
4819 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
4820 the normal case and one for the error case. Just use the
4821 first one uniformly. Problem reported by Frank Heckenbach.
4822 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
4823 use exactly the same macro in both places.
4824 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
4825 so that the normal-case YYRHSLOC works for the error case too.
4826 All uses changed.
4827 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
4828 (YYLLOC_DEFAULT): Use the same macro as glr.c.
4829 * doc/bison.texinfo (Location Default Action): Don't claim that
4830 we have an array of locations. Use the same macro for both glr
4831 and lalr parsers. Mention YYRHSLOC. Mention what happens when
4832 the index is 0.
4833
4834 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
4835
4836 * HACKING: Update email addresses to send announcements to.
4837
4838 * configure.ac (AC_INIT): Bump version to 1.875f.
4839
4840 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
4841
4842 * NEWS: Version 1.875e.
4843 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
4844
4845 * src/scan-skel.l: Include "complain.h", for "fatal".
4846
4847 * src/relation.h (relation_print, relation_digraph):
4848 Relation sizes are of type relation_node, not size_t (this is
4849 merely a doc fix, since the two types are equivalent).
4850 (relation_transpose): Relation sizes are of type relation_node,
4851 not int.
4852 * src/relation.c: Likewise.
4853 (top, infinity): Now of type relation_node, not int.
4854 (traverse, relation_transpose): Use relation_node, not int.
4855
4856 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
4857 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
4858 (yyparse): Remove unused local introduced in 2004-10-25 patch.
4859
4860 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
4861 specifying whether the test should be skipped. Use it tp
4862 specify that the [%defines %skeleton "lalr1.cc"] tests currently
4863 fail on some hosts, and should be skipped.
4864
4865 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
4866
4867 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
4868 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
4869 unless otherwise specified below.
4870
4871 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
4872 to allocate kernel_base, kernel_items, kernel_size, since
4873 they needn't be initialized to 0.
4874 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
4875 * src/closure.c (new_closure): Likewise, for itemset.
4876 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
4877 * src/lalr.c (set_goto_map): Likewise, for temp_map.
4878 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
4879 (build_relations): Likewise for edge, states1, includes.
4880 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
4881 * src/reader.c (packgram): Likewise, for ritem, rules.
4882 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
4883 * src/relation.c (relation_digraph): Likewise for VERTICES.
4884 (relation_transpose): Likewise for new_R, end_R.
4885 * src/symtab.c (symbols_token_translations_init): Likewise for
4886 token_translations.
4887 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
4888 (token_actions): Likewise for yydefact, actrow, conflrow,
4889 conflict_list.
4890 (save_column): Likewise for froms[symno], tos[symno].
4891 (goto_actions): Likewise for state_count.
4892 (pack_table): Likewise for base, pos, check.
4893 (tables_generate): Likewise for width.
4894
4895 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
4896 for initial core. Just have a separate core, so we needn't worry
4897 about whether kernel_size and kernel_base are initialized.
4898
4899 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
4900 kernel_size, kernel_items): Remove unnecessary initialization.
4901 * src/conflicts.c (conflicts): Likewise.
4902 * src/derives.c (derives): Likewise.
4903 * src/muscle_tablc (muscle_insert): Likewise.
4904 * src/relation.c (relation_digraph): Likewise.
4905 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
4906 conflrow, conflict_table, conflict_list, table, check):
4907 Likewise.
4908
4909 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
4910 This is because all callers pass unsigned int.
4911 * src/closure.h (new_closure): Likewise.
4912
4913 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
4914 (build_relations): Initialize includes[i] in all cases.
4915 * src/reader.c (packgram): Always initialize rules[ruleno].prec
4916 and rules[ruleno].precsym. Initialize members in order.
4917 * src/relation.c (relation_transpose): Always initialize new_R[i]
4918 and end_R[i].
4919 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
4920
4921 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
4922 conflict_list[0] was always 0, but now it isn't initialized.
4923
4924 * src/table.c (table_grow): When conflict_table grew, the grown
4925 area wasn't cleared. Fix this.
4926
4927 * lib/.cvsignore: Add strdup.c, strdup.h.
4928 * m4/.cvsignore: Add strdup.m4.
4929
4930 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
4931
4932 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
4933 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
4934 GOTO_NUMBER_MAXIMUM, since we occasionally compute
4935 ngotos + 1 without checking for overflow.
4936 (build_relations): Use END_NODE, not -1, to denote end of edges.
4937 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
4938 build_relations): Use goto_number, not int, for goto numbers.
4939 * src/tables.c (save_column, default_goto): Likewise.
4940
4941 2004-11-23 Akim Demaille <akim@epita.fr>
4942
4943 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
4944 of #defining from yystype.
4945 Don't typedef yystype, C++ does not need it.
4946 This lets it possible to forward declare it as union.
4947
4948 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
4949
4950 * bootstrap (gnulib_modules): Add extensions.
4951 Problem reported by Jim Meyering.
4952
4953 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
4954
4955 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
4956 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
4957 src/system.h, src/tables.c: XFREE -> free, to accommodate
4958 recent change to gnulib xalloc.h.
4959 Problem reported by Jim Meyering.
4960
4961 2004-11-17 Akim Demaille <akim@epita.fr>
4962
4963 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
4964
4965 2004-11-17 Akim Demaille <akim@epita.fr>,
4966 Alexandre Duret-Lutz <adl@gnu.org>
4967
4968 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
4969 changes.
4970 (YYCDEBUG): Adjust.
4971 Use it instead of cdebug_.
4972 (Parser::debug_stream, Parser::set_debug_stream): New.
4973 (Parser::symprint_): Define cdebug_ for temporary backward
4974 compatibility.
4975 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
4976 debug_stream ().
4977
4978 2004-11-17 Akim Demaille <akim@epita.fr>
4979
4980 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
4981 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
4982 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
4983 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
4984
4985 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
4986
4987 * data/glr.c (yyloc_default): Remove; not used.
4988 Problem reported by Frank Heckenbach.
4989
4990 2004-10-25 Akim Demaille <akim@epita.fr>
4991
4992 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
4993 Introduce another definition to address simple location arrays.
4994 (yyGLRStack): New member: yyerror_range.
4995 (yyrecoverSyntaxError, yyparse): Update it.
4996 (yyrecoverSyntaxError): Use it when shifting the error token to
4997 have an accurate range, equivalent to the one computed by both
4998 yacc.c and lalr1.cc.
4999 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
5000 that column numbers start at column 0, as per GNU Coding
5001 Standards, the others tests, and the doc.
5002 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
5003 Adjust to the above change (first column is 0).
5004 And adjust the location of the "<error>", now covering the whole
5005 line.
5006
5007 2004-10-22 Akim Demaille <akim@epita.fr>
5008 and Paul Eggert <eggert@cs.ucla.edu>
5009
5010 Remove some arbitrary limits on goto numbers and relations.
5011 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
5012 initial values, since they're never used.
5013 (set_goto_map): ngotos is now unsigned, so test for overflow
5014 by seeing whether it wraps around to zero.
5015 * src/lalr.h (goto_number): Now size_t, not short int.
5016 (GOTO_NUMBER_MAXIMUM): Remove.
5017 * src/relation.c (relation_print, traverse, relation_transpose):
5018 Check for END_NODE rather than looking at sign.
5019 * src/relation.h (END_NODE): New macro.
5020 (relation_node): Now size_t, not short int.
5021
5022 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
5023
5024 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
5025 keyword, not an identifier. Problem reported by Baron Schwartz in
5026 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
5027
5028 2004-10-11 Akim Demaille <akim@epita.fr>
5029
5030 * src/symtab.c (symbol_check_alias_consistency): Also check
5031 type names, destructors, and printers.
5032 Reported by Alexandre Duret-Lutz.
5033 Recode the handling of associativity and precedence in terms
5034 of symbol_precedence_set.
5035 Accept no redeclaration at all, not even equal to the previous
5036 value.
5037 (redeclaration): New.
5038 Use it to factor redeclaration complaints.
5039 (symbol_make_alias): Don't set the type of the alias, let
5040 symbol_check_alias_consistency do it as for other features.
5041 * src/symtab.h (symbol): Add new member prec_location, and
5042 type_location.
5043 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
5044 * tests/input.at (Incompatible Aliases): New.
5045
5046 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
5047
5048 .cvsignore fixes to accommodate gnulib changes,
5049 and the practice of naming build directories "_build".
5050 * .cvsignore: Add "_*". Sort.
5051 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
5052 * m4/.cvsignore: Add "*_gl.m4".
5053
5054 2004-10-06 Akim Demaille <akim@epita.fr>
5055
5056 * src/parse-gram.y (add_param): Fix the truncation of trailing
5057 spaces.
5058
5059 2004-10-05 Akim Demaille <akim@epita.fr>
5060
5061 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
5062 whether the reducion was empty or not. This leaves room to
5063 improve the use of YYLLOC_DEFAULT in such a case.
5064 lalr1.cc is still experimental, so changing this is acceptable.
5065 And finally, there are probably not many users who changed the
5066 handling of locations in GLR, so changing is admissible too.
5067
5068 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
5069 empty reduction, set @$ to an empty location ending the previously
5070 stacked symbol.
5071 Adjust uses to make sure the code is triggered on empty
5072 reductions.
5073 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
5074 expected output: empty reductions have empty locations.
5075
5076 2004-09-29 Akim Demaille <akim@epita.fr>
5077
5078 * data/lalr1.cc: Move towards a more standard C++ coding style
5079 for templates: Class < T > -> Class<T>.
5080
5081 2004-09-29 Akim Demaille <akim@epita.fr>
5082
5083 * data/lalr1.cc: Reinstall the former ctor, for sake of
5084 compatibility, but warn it will be removed.
5085 Move towards a more standard C++ coding style (i.e., type *var ->
5086 type* var).
5087
5088 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
5089
5090 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
5091 since it's less likely to work if NULs are involved in the future.
5092
5093 2004-09-27 Akim Demaille <akim@epita.fr>
5094
5095 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
5096
5097 2004-09-27 Akim Demaille <akim@epita.fr>
5098
5099 * data/lalr1.cc (b4_parse_param_decl_1): New.
5100 (b4_parse_param_decl): Use it to have different names between attribute
5101 and argument names.
5102 (b4_cc_constructor_call): Likewise.
5103
5104 2004-09-24 Akim Demaille <akim@epita.fr>
5105
5106 * src/parse-gram.y (add_param): Strip the leading and trailing
5107 blanks from a formal argument declaration.
5108 (YY_LOCATION_PRINT): New.
5109
5110 2004-09-24 Akim Demaille <akim@epita.fr>
5111
5112 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
5113 after the location.
5114
5115 2004-09-24 Akim Demaille <akim@epita.fr>
5116
5117 * doc/bison.texinfo (Table of Symbols): Sort.
5118
5119 2004-09-21 Akim Demaille <akim@epita.fr>
5120
5121 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
5122 the useless parentheses.
5123 Suggested by Paul Eggert.
5124
5125 2004-09-20 Akim Demaille <akim@epita.fr>
5126
5127 Let the initial-action act on the look-ahead, and use it for the
5128 "initial push" (corresponding to an hypothetical beginning-of-file).
5129 And let lalr1.cc honor %initial-action.
5130
5131 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
5132 example.
5133 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
5134 (Parser::Parser): Remove the ctor that used to initialize it.
5135 (Parser::parse): Like in the other skeletons, issue the "starting
5136 parse" message before any action.
5137 Honor %initial-action.
5138 Initialize the stacks with the lookahead.
5139 * data/yacc.c: Let $$ and @$ in %initial-action designate the
5140 look-ahead.
5141 Push them in the stacks.
5142 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
5143
5144 2004-09-20 Akim Demaille <akim@epita.fr>
5145
5146 * doc/bison.texinfo (Initial Action Decl): New.
5147
5148 2004-09-20 Akim Demaille <akim@epita.fr>
5149
5150 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
5151 clearer criterion to define it.
5152 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
5153 When reducing on an empty RHS, use the latest stacked location as
5154 location.
5155 yylloc is not always available.
5156 * data/glr.c: Likewise.
5157 Also, honor initial-actions.
5158
5159 2004-09-20 Akim Demaille <akim@epita.fr>
5160
5161 * data/yacc.c (YY_LOCATION_PRINT): New.
5162 Define when we know YYLTYPE's structure, i.e., when the default
5163 YYLLOC_DEFAULT is used.
5164 * data/c.m4 (b4_yysymprint_generate): Use it.
5165 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
5166 value of the result.
5167 (error_start_): Replace with...
5168 (error_range_): this location array.
5169 This allows to replace code relying on the implementation of
5170 locations by portable code.
5171 * data/yacc.c (yylerrsp): Replace with...
5172 (yyerror_range): this.
5173 Every time a token is popped, update yyerror_range[0], to have an
5174 accurate location for the error token.
5175 * data/glr.c (YY_LOCATION_PRINT): New.
5176 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
5177 deference a pointer.
5178 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
5179 report the location in %printers.
5180
5181 * src/scan-skel.l: Instead of abort, report error messages to ease
5182 understanding skeleton scanning failures.
5183
5184 2004-09-16 Akim Demaille <akim@epita.fr>
5185
5186 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
5187 (iterator, const_iterator): these, to be more in the C++ spirit.
5188 Also, return reverse iterators so that when displaying the stack
5189 we display its bottom first.
5190 (Parser::stack_print_, Parser::reduce_print_): Match the messages
5191 from yacc.c.
5192 We should probably use vector here though.
5193
5194 2004-09-16 Akim Demaille <akim@epita.fr>
5195
5196 Have more complete shift traces.
5197
5198 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
5199 to report Shifts instead of ad hoc YYDPRINTF invocations,
5200 including for the error token.
5201 * data/lalr1.cc (symprint_): Output the location.
5202 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
5203 output the location within the %printer.
5204 Activate GLR tests, at least to make sure they compile properly.
5205 They still don't pass though.
5206 * tests/calc.at: Adjust expect verbose output, since now "Entering
5207 state..." is on a different line than the "Shifting" message.
5208
5209 2004-09-08 Akim Demaille <akim@epita.fr>
5210
5211 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
5212 Bison directive from the Bison file to the invocation of this
5213 macro, so that these directives are passed to
5214 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
5215 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
5216 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
5217 the extra Bison directives instead of the whole series.
5218 Change the grammar so that there are recoverable errors, and
5219 unrecoverable errors. Now we can have the parser give up before
5220 consuming the whole input. As a result we now can observe that
5221 the lookahead is freed when needed.
5222 Change the parser source to parse argv[1] instead of a hard coded
5223 string.
5224 Simplify yylex, and give a value and location to EOF.
5225 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
5226 passed directives already coded in the file.
5227 Add some tests to check the location of "error".
5228 For some tests, the C++ parser is correct, and not yacc.c.
5229 For other tests, they provide different, but unsatisfying, values,
5230 so keep the C++ value so that at least one parser is "correct"
5231 according to the test suite.
5232 (Actions after errors): Remove, this is subsumed by the
5233 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
5234
5235 2004-09-06 Akim Demaille <akim@epita.fr>
5236
5237 * data/lalr1.cc: Adjust the indentation of the labels.
5238 (Parser::pop): New.
5239 Use it.
5240
5241 2004-09-06 Akim Demaille <akim@epita.fr>
5242
5243 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
5244 argument, an informative message.
5245 Call YY_SYMBOL_PRINT.
5246 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
5247 * data/lalr1.cc (destruct_): Likewise.
5248 In addition, no longer depend on b4_yysymprint_generate and
5249 b4_yydestruct_generate to generate these functions, do it "by
5250 hand".
5251
5252 2004-09-03 Akim Demaille <akim@epita.fr>
5253
5254 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
5255 invoked, yydestruct the lookahead.
5256 * tests/calc.at (Calculator $1): Update the expected lengths of
5257 traces: there is an added line for the discarded lookahead.
5258 * doc/bison.texinfo (Destructor Decl): Some rewording.
5259 Define "discarded" symbols.
5260
5261 2004-09-02 Akim Demaille <akim@epita.fr>
5262
5263 * data/lalr1.cc (translate_, destruct_): No reason to be static.
5264
5265 2004-09-02 Akim Demaille <akim@epita.fr>
5266
5267 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
5268 (YYDSYMPRINTF): Rename as...
5269 (YY_SYMBOL_PRINT): this.
5270 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
5271 two.
5272 Use it instead of direct symprint_ calls.
5273 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
5274 one.
5275
5276 2004-09-02 Akim Demaille <akim@epita.fr>
5277
5278 * data/lalr1.cc (b4_yysymprint_generate): New.
5279 (symprint_): New member function, defined when YYDEBUG.
5280 Use it consistently instead of token/nterm debugging output by
5281 hand.
5282 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
5283 %printer calls to use cdebug_ when using lalr1.cc.
5284
5285 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
5286
5287 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
5288 with #ifdef YYDEBUG.
5289
5290 2004-08-26 Akim Demaille <akim@epita.fr>
5291
5292 * doc/bison.texinfo (Implementing Loops): Rename as...
5293 (Implementing Gotos/Loops): this.
5294
5295 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
5296
5297 Adjust to latest gnulib.
5298 * bootstrap (gnulib_modules): Add xalloc-die.
5299 Set LC_ALL=C so that file names sort consistently.
5300 Prefer the gnulib copies of gettext.m4, glibc21.m4,
5301 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
5302 uintmax_t.m4, ulonglong.m4.
5303 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
5304 po.m4 since we are now using _gl.m4 instead.
5305
5306 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
5307
5308 * src/scan-action.l: Remove. Scanning of semantic actions is
5309 handled in scan-gram.l.
5310
5311 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
5312
5313 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
5314
5315 * src/location.h (struct): The file member is a uniqstr.
5316 (equal_boundaries): Use UNIQSTR_EQ for comparison.
5317
5318 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
5319
5320 Fix bug with non-%union parsers that have printers or destructors,
5321 which led to a Bison core dump. Reported by Peter Fales in
5322 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
5323
5324 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
5325 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
5326 not to our own type.
5327 * src/output.c (symbol_destructors_output, symbol_printers_output):
5328 Don't assume %union.
5329 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
5330 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
5331 UNION-FLAG. All callers changed.
5332 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
5333 Use type char, not unsigned int, when declaring an array of char;
5334 this lets us remove a cast.
5335 (Printers and Destructors): Add non-%union test cases.
5336
5337 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
5338
5339 * doc/bison.texinfo: Minor editorial changes, mostly to the new
5340 GLR writeups. E.g., avoid frenchspacing and the future tense,
5341 change "lookahead" to "look-ahead", and change "wrt" to "with
5342 respect to".
5343
5344 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
5345
5346 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
5347 New sections, split off from the GLR Parsers section. Put the new
5348 Simple GLR Parser near the start of the GLR section, for clarity.
5349 Rewrite connective text.
5350
5351 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
5352
5353 * doc/bison.texinfo (Simple GLR Parsers): New section.
5354
5355 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
5356
5357 * NEWS, TODO, doc/bison.texinfo:
5358 Use "look-ahead" instead of "lookahead", to be consistent.
5359 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
5360 while we're fixing "look-ahead".
5361 * src/conflicts.c (shift_set): Renamed from shiftset.
5362 (look_ahead_set): Renamed from lookaheadset.
5363 * src/print.c: Likewise.
5364 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
5365 name for "lookahead".
5366 (report_types, usage): Likewise.
5367 * src/getargs.h (report_look_ahead_tokens): Renamed from
5368 report_lookaheads.
5369 * src/lalr.c (compute_look_ahead_tokens): Renamed from
5370 compute_lookaheads.
5371 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
5372 (look_ahead_tokens_print): Renamed from lookaheads_print.
5373 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
5374 state_rule_lookaheads_print.
5375 * src/state.h: Likewise.
5376 (reductions.look_ahead_tokens): Renamed from lookaheads.
5377 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
5378 AT_DATA_LOOKAHEADS_GRAMMAR.
5379
5380 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
5381
5382 * README: Update location of patched M4 distribution.
5383
5384 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
5385
5386 Don't assume the C++ compiler takes the same arguments as the C compiler
5387 (trivial change).
5388 * configure.ac (O0CXXFLAGS): New var.
5389 * tests/atlocal.in (CXXFLAGS): Use it.
5390
5391 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
5392
5393 Fix some "make check" problems with C++ reported by
5394 Albert Chin-A-Young for Tru64 C++ in this thread:
5395 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
5396
5397 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
5398 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
5399 Output to a .cc file for C++, not to a .c file.
5400 * tests/calc.at (AT_CHECK_CALC): Likewise.
5401 * tests/regression.at (AT_CHECK_DANCER): Likewise.
5402 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
5403
5404 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
5405
5406 * tests/calc.at, tests/actions.at: Workaround for SGI
5407 C++ compiler. (trivial change)
5408
5409 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
5410
5411 Spent a few hours checking out which prerequisite versions the
5412 current sources actually require. I went all the way back to
5413 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
5414 a seemingly endless set of combinations of versions more recent
5415 than that. The bottom line is that the current sources require
5416 fairly recent versions of the build tools, and it'll be some work
5417 to change this.
5418 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
5419 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
5420 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
5421 Add comments explaining why those particular versions are
5422 currently needed.
5423
5424 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
5425 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
5426 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
5427
5428 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
5429 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
5430
5431 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
5432
5433 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
5434 0.11.5. Suggested by Bruno Haible.
5435 * bootstrap: Remove gettext version checking.
5436
5437 * doc/bison.texinfo (Decl Summary): Also mention that %union
5438 can depend on prerequisite types. Problem reported by Tim
5439 Van Holder.
5440
5441 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
5442
5443 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
5444 * README-alpha: Don't tell people not to package this.
5445
5446 * bootstrap: Don't assume $(...) works; use `...` instead.
5447 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
5448 gettext better.
5449
5450 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
5451 put into the -d output file, and mention what to do if YYSTYPE is
5452 defined as a macro.
5453
5454 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
5455
5456 Undo change made earlier today: it caused autopoint to not bring
5457 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
5458 autopoint's.
5459
5460 * bootstrap: Check that gettext version matches what's in
5461 configure.ac. Warn users to ignore robots.txt ERROR 404.
5462 * bootstrap: Undo today's earlier change (logged below).
5463 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
5464
5465 The gettext version checking is causing more trouble than it's
5466 curing; remove it. Problem reported by Paul Hilfinger.
5467
5468 * bootstrap: Issue a warning that one can expect a message
5469 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
5470 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
5471
5472 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
5473
5474 Ensure that the C++ compiler used for testing actually works on a
5475 simple test program; if not, skip the C++-related tests. Problem
5476 reported by Vin Shelton in:
5477 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
5478
5479 * m4/cxx.m4: New file.
5480 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
5481 * tests/atlocal.in (BISON_CXX_WORKS): Add.
5482 * tests/local.at (AT_COMPILE_CXX): Use it.
5483
5484 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
5485
5486 * data/glr.c (yylloc): Output this macro even if locations are not
5487 being generated, as the GLR parser needs it even in that case.
5488 Problem reported by Troy A. Johnson
5489 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
5490
5491 * configure.ac (AC_INIT): Update to 1.875e.
5492
5493 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
5494
5495 * NEWS: Version 1.875d.
5496 * configure.ac (AC_INIT): Likewise.
5497 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
5498
5499 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
5500 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
5501 lalr1.cc runs afoul of the first, and the last two are no longer
5502 supported by GCC 3.4.0.
5503 * README: Mention GNU m4 1.4 or later; mention m4 patches.
5504 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
5505
5506 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
5507
5508 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
5509 unsigned int, for compatibility with latest gnulib hash module.
5510 * src/state.c (state_hash, state_hasher): Likewise.
5511 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
5512 * src/uniqstr.c (hash_uniqstr): Likewise.
5513
5514 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
5515
5516 * NEWS: Unescaped newlines are no longer allowed in char & strings.
5517
5518 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
5519 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
5520 character and string literals.
5521 (unexpected_end): New function.
5522 (unexpected_eof): Use it.
5523 (unexpected_newline): New function.
5524 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
5525 actions.
5526
5527 * NEWS: Document %expect-rr.
5528
5529 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
5530 Fix typo by replacing $1 with $option.
5531 Remove more 'intl'-related files.
5532 Don't DEFUN AM_INTL_SUBDIR twice.
5533
5534 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
5535 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
5536 strtoul.c.
5537 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
5538 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
5539 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
5540 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
5541 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
5542 * src/.cvsignore: Add *.output.
5543
5544 * src/parse-gram.y: Put copyright notice inside %{ %} so it
5545 gets copied to the output file.
5546
5547 2004-04-28 Paul Eggert <eggert@twinsun.com>
5548
5549 Get files from the gnulib and po repositories, instead of relying
5550 on them being in our CVS. Upgrade to latest versions of gnulib
5551 and Automake.
5552
5553 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
5554 * bootstrap: Bootstrap from gnulib and po repositories.
5555 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
5556 * README-cvs: Document these changes. Remove version numbers from
5557 mentions of build tools, since they change so often. Mention Flex.
5558
5559 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
5560 (gl_USE_SYSTEM_EXTENSIONS): Add.
5561 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
5562 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
5563 does this for us.
5564 (AC_ISC_POSIX): Remove; we no longer support this
5565 ancient OS, as it gets in the way of latest Autoconf & gnulib.
5566 (AC_HEADER_STDC): Remove: we now assume C89 or better.
5567 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
5568 Do not check for C89 headers, except for locale.h which is used
5569 by the Yacc library and must port to K&R hosts.
5570 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
5571 Do not check for C89 functions, except for setlocale which is
5572 used by the Yacc library.
5573 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
5574 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
5575 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
5576 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
5577 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
5578 AM_GNU_GETTEXT): Remove; now done by:
5579 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
5580 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
5581 for us.
5582
5583 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
5584 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
5585 Define to empty, as gnulib.mk will do the rest for us.
5586 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
5587 for us.
5588 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
5589 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
5590
5591 * src/files.c: Include gnulib's xstrndup.h.
5592
5593 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
5594 (REALLOC): Use xnrealloc, for likewise.
5595 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
5596 (strnlen, memrchr): Remove decls; functions no longer used.
5597 Include <stpcpy.h>.
5598
5599 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
5600 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
5601 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
5602 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
5603 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
5604 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
5605 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
5606 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
5607 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
5608 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
5609 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
5610 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
5611 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
5612 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
5613 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
5614 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
5615 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
5616 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
5617 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
5618 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
5619 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
5620 Remove, as these files are now generated automatically
5621 by bootstrap or automake.
5622
5623 * po/ChangeLog: Remove: all but one entry was a duplicate
5624 of this file, and I moved that 2000-11-02 entry here.
5625
5626 * config/.cvsignore: Add Makefile, depcomp, install-sh.
5627 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
5628 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
5629 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
5630 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
5631 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
5632 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
5633 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
5634 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
5635 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
5636 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
5637 xstrndup.h.
5638 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
5639 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
5640 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
5641 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
5642 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
5643 * src/.cvsignore: Remove *_.c.
5644
5645
5646 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
5647 support it. (The latest stable gzip doesn't.)
5648
5649 2004-04-27 Paul Eggert <eggert@twinsun.com>
5650
5651 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
5652 case, as stos_ is now used by destructors due to the 2004-02-09
5653 change.
5654
5655 Remove more K&R C support.
5656 * lib/libiberty.y (PARAMS): Remove. All uses removed.
5657 * lib/subpipe.c (errno): Remove decl.
5658 Include <stdlib.h> unconditionally.
5659 (EXIT_FAILURE): Remove macro.
5660 * src/complain.c (vfprintf, strerror): Remove.
5661 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
5662 unconditionally.
5663 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
5664 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
5665 (strchr, strspn, memchr): Remove decls.
5666 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
5667 unconditionally. Do not declare perror.
5668 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
5669 unconditionally.
5670
5671 * src/complain.c (_): Remove useless defn, as system.h defines this.
5672
5673 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
5674 with latest obstack.h.
5675 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
5676 to procedure types, as obstack.h now does that for us.
5677 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
5678
5679 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
5680 so that this include file can stand alone.
5681 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
5682 does this now. Include subpipe.h first after config.h, to
5683 test whether it can stand alone.
5684
5685 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
5686 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
5687 unused declaration.
5688
5689 * tests/synclines.at (%union synch line): Put a dummy member in
5690 the union, because empty unions aren't allowed in C. Caught
5691 by GCC 3.4.0.
5692
5693 2004-04-13 Jim Meyering <jim@meyering.net>
5694
5695 * src/conflicts.c (conflicts_print): Correct format string typo:
5696 use `%%' to produce literal `%'. (trivial change)
5697
5698 2004-03-30 Paul Eggert <eggert@twinsun.com>
5699
5700 * src/getargs.c (version): Update copyright year to 2004.
5701
5702 * data/c.m4 (b4_int_type): Use 'short int' rather than
5703 'short', and similarly for 'long', 'unsigned', etc.
5704 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
5705 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
5706 yy_yypstack, yydumpstack): Likewise.
5707 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
5708 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
5709 Likewise.
5710 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
5711 yy_stack_print, yyparse): Likewise.
5712 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
5713 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
5714 * lib/bitset.c (bitset_print): Likewise.
5715 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
5716 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
5717 * lib/bitsetv.c (bitsetv_dump): Likewise.
5718 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
5719 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
5720 Likewise.
5721 * src/LR0.c (allocate_itemsets): Likewise.
5722 * src/gram.h (rule_number, rule): Likewise.
5723 * src/lalr.h (goto_number): Likewise.
5724 * src/nullable.c (nullable_compute): Likewise.
5725 * src/output.c (prepare_rules): Likewise.
5726 * src/relation.c (relation_print, relation_digraph): Likewise.
5727 * src/relation.h (relation_node): Likewise.
5728 * src/state.h (state_number, transitions, errs, reductions,
5729 struct state): Likewise.
5730 * src/symtab.h (symbol_number, struct symbol): Likewise.
5731 * src/tables.c (vector_number, tally, action_number,
5732 default_goto, goto_actions): Likewise.
5733 * tests/existing.at (GNU Cim Grammar): Likewise.
5734 * tests/regression.at (Web2c Actions): Likewise.
5735
5736 * src/output.c (muscle_insert_short_int_table): Renamed from
5737 muscle_insert_short_table. All uses changed.
5738
5739 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5740
5741 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
5742 (declaration): Replace expected_conflicts with expected_sr_conflicts.
5743 Add %expect-rr rule.
5744
5745 * src/scan-gram.l: Recognize %expect-rr.
5746
5747 * src/conflicts.h (expected_sr_conflicts): Rename from
5748 expected_conflicts.
5749 (expected_rr_conflicts): Declare.
5750
5751 * src/conflicts.c (expected_sr_conflicts): Rename from
5752 expected_conflicts.
5753 (expected_rr_conflicts): Define.
5754 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
5755 for GLR parsers.
5756 Use expected_sr_conflicts in place of expected_conflicts.
5757 Warn if expected_rr_conflicts used in non-GLR parser.
5758
5759 * doc/bison.texinfo: Add documentation for %expect-rr.
5760
5761 2004-03-08 Paul Eggert <eggert@gnu.org>
5762
5763 Add support for hex token numbers. Suggested by Odd Arild Olsen in
5764 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
5765
5766 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
5767 in lalr1.cc.
5768 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
5769 * src/scan-gram.l (scan_integer): New function.
5770 ({int}): Use it.
5771 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
5772 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
5773 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
5774 Say "long int", not "long", for uniformity with GNU style.
5775
5776 2004-02-25 Paul Eggert <eggert@twinsun.com>
5777
5778 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
5779 compilers. This fixes a problem with Intel's C++ compiler being
5780 chatty, reported by Guido Trentalancia in
5781 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
5782
5783 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
5784
5785 Support %destructor and merge error locations in lalr1.cc.
5786
5787 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
5788 (Parser::stos_): Define unconditionally.
5789 (Parser::destruct_): New method. Generate its body with
5790 b4_yydestruct_generate.
5791 (Parser::error_start_): New attribute.
5792 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
5793 token which are discarded.
5794 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
5795 error_start_ when erroneous token are discarded.
5796 (Parser::parse) <yyerrlab1>: Compute the location of the error
5797 token so that it covers all the discarded tokens.
5798 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
5799 it can be called with `%skeleton "lalr1.cc"', and do that.
5800
5801 2004-02-02 Paul Eggert <eggert@twinsun.com>
5802
5803 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
5804 $(top_srcdir)/lib and ../lib. This fixes a bug reported
5805 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
5806 There's no need to mention top_builddir since Automake does that
5807 for us.
5808 (INCLUDES): Remove, as Automake says it's obsolescent.
5809 Contents migrated into AM_CPPFLAGS as described above.
5810 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
5811
5812 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
5813
5814 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
5815 (yyreportSyntaxError): Handle case where lookahead token is
5816 YYEMPTY.
5817
5818 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5819
5820 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
5821 resulting parsers are compilable with C++.
5822
5823 2003-12-23 Paul Eggert <eggert@twinsun.com>
5824
5825 * config/depcomp, config/install-sh: Sync with Automake 1.8.
5826 * src/output.c (output_skeleton): Rename local var.
5827 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
5828 Bison tokens, as this runs afoul of the 2003-10-07 change that
5829 disallowed NUL bytes in character constants or string literals.
5830
5831 * tests/local.at: Require Autoconf 2.59's Autotest.
5832 * tests/testsuite.at: Don't include local.at, since we now assume
5833 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
5834 including it.
5835 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
5836 multiple inclusion warnings.
5837
5838 2003-12-02 Akim Demaille <akim@epita.fr>
5839
5840 * doc/bison.texinfo (How Can I Reset the Parser): More about start
5841 conditions.
5842 From Bruno Haible.
5843
5844 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
5845
5846 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
5847
5848 2003-10-07 Paul Eggert <eggert@twinsun.com>
5849
5850 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
5851 if testsuite doesn't exist.
5852
5853 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
5854 literals, unfortunately.
5855 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
5856 Complain about NUL bytes in character constants or string literals.
5857
5858 2003-10-05 Paul Eggert <eggert@twinsun.com>
5859
5860 * NEWS: Don't document %no-default-prec, as it's still
5861 too experimental.
5862 * doc/bison.texinfo: Document %no-default-prec only if
5863 the defaultprec flag is set. Normally it's not.
5864
5865 2003-10-04 Paul Eggert <eggert@twinsun.com>
5866
5867 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
5868 non-modifiable lvalue, instead of a modifiable one.
5869 * doc/bison.texinfo (Actions): Document that $$ can
5870 be assigned to. Do not claim that $$ and $N are
5871 array element references: user code should not rely on this.
5872
5873 2003-10-01 Paul Eggert <eggert@twinsun.com>
5874
5875 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
5876 (grammar_declaration): Use it.
5877 * src/scan-gram.l: New token %no-default-prec.
5878 * tests/conflicts.at: Revamp tests to use %no-default-prec.
5879 * NEWS, doc/bison.texinfo: Document the above.
5880
5881 2003-10-01 Akim Demaille <akim@epita.fr>
5882
5883 VCG no longer supports long_straight_phase.
5884
5885 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
5886 * src/print_graph.c (print_graph): Adjust.
5887
5888 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
5889 and Paul Eggert <eggert@twinsun.com>
5890
5891 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
5892 Table of Symbols): Document %default-prec.
5893 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
5894 (grammar_declaration): Set default_prec on %default-prec.
5895 * src/scan-gram.l (%default-prec): New token.
5896 * src/reader.h (default_prec): New flag.
5897 * src/reader.c: Likewise.
5898 (packgram): Handle it.
5899 * tests/conflicts.at (%default-prec without %prec,
5900 %default-prec with %prec, %default-prec 1): New tests.
5901
5902 2003-09-30 Paul Eggert <eggert@twinsun.com>
5903
5904 * tests/testsuite.at: Include local.at, not input.at, fixing
5905 a typo in the 2003-08-25 patch.
5906
5907 2003-08-27 Akim Demaille <akim@epita.fr>
5908
5909 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
5910 GCC warnings.
5911
5912 2003-08-26 Akim Demaille <akim@epita.fr>
5913
5914 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
5915 "<\#" to avoid magic from Gnus when posting parts of this script.
5916
5917 2003-08-26 Akim Demaille <akim@epita.fr>
5918
5919 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
5920 (Parser::parse): here.
5921 Adjust: nerrs and errstatus is now replaced by...
5922 (Parser::nerrs_, Parser::errstatus_): New.
5923
5924 2003-08-25 Akim Demaille <akim@epita.fr>
5925
5926 * config/announce-gen, Makefile.cfg: New.
5927 * Makefile.am: Adjust.
5928 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
5929 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
5930
5931 2003-08-25 Akim Demaille <akim@epita.fr>
5932
5933 When reducing initial empty rules, Bison parser read an initial
5934 location that is not defined. This results in garbage, and that
5935 affects Bison's own parser. Therefore we need (i) to extend Bison
5936 to support a means to initialize this location, and (ii) to use
5937 this CVS Bison to fix CVS Bison's parser.
5938
5939 * src/reader.h, reader.c (epilogue_augment): Remove, replace
5940 with...
5941 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
5942 * src/parse-gram.y: Adjust.
5943 (%initial-action): New.
5944 (%error-verbose): Since we require CVS Bison, there is no reason
5945 not to use it.
5946 * src/scan-gram.l: Adjust.
5947 * src/Makefile.am (YACC): New, to make sure we use our own parser.
5948 * data/yacc.c (yyparse): Use b4_initial_action.
5949
5950 2003-08-25 Akim Demaille <akim@epita.fr>
5951
5952 * doc/bison.texinfo: Don't promote stdout for error messages.
5953
5954 2003-08-25 Akim Demaille <akim@epita.fr>
5955
5956 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
5957 From Alexandre Duret-Lutz.
5958
5959 2003-08-25 Akim Demaille <akim@epita.fr>
5960
5961 Version 1.875c.
5962
5963 2003-08-25 Akim Demaille <akim@epita.fr>
5964
5965 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
5966 Use them.
5967
5968 2003-08-25 Akim Demaille <akim@epita.fr>
5969
5970 * data/lalr1.cc (Parser::reduce_print_): New.
5971 Use it.
5972
5973 2003-08-25 Akim Demaille <akim@epita.fr>
5974
5975 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
5976 error recovery loops. This patch is based on
5977 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
5978 Also, augment the similarity between lalr1.cc and yacc.c.
5979 Note: the locations of error recovery rules are not correct yet.
5980
5981 * data/lalr1.cc: Comment changes to augment the similarity between
5982 lalr1.cc and yacc.c.
5983 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
5984 (yyerrlab1): Remove, but where it used to be (now the bottom part of
5985 yyerrlab), when hitting EOF, pop the whole stack here instead of
5986 merely falling thru the default error handling mechanism.
5987 (yyerrorlab): New label, with the old contents of YYERROR,
5988 plus the following change: pop the stack of rhs corresponding
5989 to the production that invoked YYERROR. That is how Yacc
5990 behaves (required by POSIX).
5991 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
5992 fail.
5993
5994 2003-08-25 Akim Demaille <akim@epita.fr>
5995
5996 Tune local.at so that people can "autom4te -l autotest calc.at -o
5997 calc" for instance, to extract a sub test suite.
5998
5999 * tests/testsuite.at: Move the initialization, Autotest version
6000 requirement, and AT_TESTED invocation into...
6001 * tests/local.at: here.
6002 * tests/testsuite.at: Include it for compatibility with Autoconf
6003 2.57.
6004 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
6005 be ignore.
6006
6007 2003-08-04 Paul Eggert <eggert@twinsun.com>
6008
6009 Rework code slightly to avoid gcc -Wtraditional warnings.
6010 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
6011 The returned value is now stored in *YY0. All callers changed.
6012 * src/output.c (merge_output): Adjust to the above change.
6013
6014 2003-07-26 Paul Eggert <eggert@twinsun.com>
6015
6016 * data/glr.c (YYASSERT): New macro.
6017 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
6018 yyresolveStates, yyprocessOneStack):
6019 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
6020 Derived from a suggestion by Frank Heckenbach.
6021
6022 2003-07-25 Paul Eggert <eggert@twinsun.com>
6023
6024 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
6025 for portability to K&R C (after ansi2knr, presumably). See
6026 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
6027 by Frank Heckenbach, though I have omitted the structure-initialization
6028 part of his glr-knr.diff patch since I recall that the Portable
6029 C Compiler didn't require that change.
6030
6031 Let the user specify how to allocate and free memory.
6032 Derived from a suggestion by Frank Heckenbach in
6033 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
6034 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
6035 All uses of free, malloc, realloc changed to use these macros,
6036 and unnecessary casts removed.
6037 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
6038
6039 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
6040
6041 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
6042 use s.empty() rather than s == "" to test for empty string; see
6043 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
6044 (trivial change)
6045
6046 2003-06-25 Akim Demaille <akim@epita.fr>
6047
6048 * config/depcomp, config/install-sh: Update from masters.
6049
6050 2003-06-20 Paul Eggert <eggert@twinsun.com>
6051
6052 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
6053 and return properly parenthesized result.
6054 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
6055 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
6056 Remove unnecessary parentheses from uses.
6057 * doc/bison.texinfo (Location Default Action): Describe the
6058 conventions for parentheses.
6059
6060 2003-06-19 Paul Eggert <eggert@twinsun.com>
6061
6062 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
6063 yyreportTree): Do not assume that size_t is the same width as int,
6064 when printing sizes. Print sizes using an unsigned format.
6065 Problem reported by Frank Heckenbach in
6066 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
6067
6068 Port to Forte Developer 7 C compiler.
6069 * data/glr.c (struct YYLTYPE): If locations are not being used,
6070 declare a single dummy member, as empty structs do not conform
6071 to the C standard.
6072 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
6073 the Forte Developer 7 C compiler complains that end-of-loop
6074 code is not reached.
6075
6076 2003-06-17 Paul Eggert <eggert@twinsun.com>
6077
6078 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
6079 avoid warnings from picky compilers about redefinition of PARAMS.
6080
6081 2003-06-17 Paul Eggert <eggert@twinsun.com>
6082
6083 Version 1.875b.
6084
6085 * NEWS: Document 1.875b.
6086
6087 * lib/bbitset.h: Do not include config.h; that's the includer's job.
6088 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
6089 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
6090 Don't use 'index' in comments, as it's a builtin fn on some hosts.
6091 * lib/bitset_stats.c: Include gettext.h unconditionally, as
6092 per recent gettext manual's suggestion.
6093 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
6094 Use prototypes, not old-style definitions.
6095 * lib/lbitset.c (lbitset_unused_clear): Likewise.
6096 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
6097 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
6098 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
6099 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
6100 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
6101 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
6102 vbitset_or_and_cmp, vbitset_copy): Likewise.
6103
6104 * lib/libiberty.h: Do not include config.h; that's the includer's job.
6105 Do not include <stdlib.h>.
6106 (PARAMS): Define unconditionally for C89.
6107 (ATTRIBUTE_NORETURN): Remove.
6108 (ATTRIBUTE_UNUSED): Define unconditionally.
6109
6110 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
6111 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
6112 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
6113 * lib/vbitset.c, lib/vbitset.h: New files.
6114 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
6115 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
6116 from libbitset.
6117
6118 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
6119 `How Can I Reset @code{yyparse}', since texinfo does not allow
6120 arbitrary @ in node names.
6121
6122 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
6123 shouldn't be needed according to the gettext 0.12.1 documentation
6124 but which seem to be needed anyway: codeset.m4 glibc21.m4
6125 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
6126 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
6127 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
6128
6129 * lib/.cvsignore: Add stdbool.h.
6130 * m4/.cvsignore: Add nls.m4, po.m4.
6131
6132 Upgrade to CVS gnulib.
6133 * stdbool_.h: File renamed from stdbool.h.in.
6134 * configure.ac (AM_STDBOOL_H): Invoke this instead of
6135 AC_HEADER_STDBOOL.
6136 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
6137 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
6138 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
6139 (MOSTLYCLEANFILES): New var.
6140 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
6141 (stdbool.h): New rule.
6142 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
6143 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
6144 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
6145 m4/quote.m4: Upgrade to today's gnulib.
6146
6147 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
6148 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
6149 the tests right now.
6150 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
6151 yyerror are declared before use; C99 requires this.
6152
6153 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6154
6155 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
6156 first.
6157 (yyrecoverSyntaxError): Correct the logic for setting and testing
6158 yyerrState.
6159 Correct comment on handling EOF.
6160 Allow states with only a default reduction, rather than failing
6161 (I can't quite reconstruct why these were not allowed before).
6162
6163 Fixes to avoid problem that $-N rules in GLR parsers can cause
6164 buffer overruns, corrupting state.
6165
6166 * src/output.c (prepare_rules): Output max_left_semantic_context
6167 definition.
6168 * src/reader.h (max_left_semantic_context): New variable declaration.
6169 * src/scan-gram.l (max_left_semantic_context): Define.
6170 (handle_action_dollar): Update max_left_semantic_context.
6171 * data/glr.c (YYMAXLEFT): New definition.
6172 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
6173 (yyresolveAction): Ditto.
6174
6175 Fixes to problems with location handling in GLR parsers reported by
6176 Frank Heckenbach (2003/06/05).
6177
6178 * data/glr.c (YYLTYPE): Make trivial if locations not used.
6179 (YYRHSLOC): Add parentheses, and define only if locations used.
6180 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
6181 locations not used.
6182 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
6183 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
6184
6185 * tests/cxx-type.at: Exercise location information; update tests
6186 to differentiate output with and without locations.
6187 Remove forward declarations of yylex and yyerror---caused errors
6188 because default YYLTYPE not yet defined.
6189 Change semantic actions to compute strings, rather than printing
6190 them directly (to test proper passing of semantics values). Change
6191 output to prefix notation and update test data and expected results.
6192 (yylex): Track locations.
6193 (stmtMerge): Return value rather than printing, and include arguments
6194 in value.
6195
6196 2003-06-03 Paul Eggert <eggert@twinsun.com>
6197
6198 Avoid warnings generated by GCC 2.95.4 when Bison is
6199 configured with --enable-gcc-warnings.
6200 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
6201 yy::]b4_parser_class_name[::translate_,
6202 yy::Stack::operator[] (unsigned),
6203 yy::Stack::operator[] (unsigned) const,
6204 yy::Slice::operator[] (unsigned),
6205 yy::Slice::operator[] (unsigned) const):
6206 Rename local vars to avoid warnings.
6207 * tests/glr-regression.at (Improper handling of embedded actions
6208 and $-N in GLR parsers): Remove unused local variable from yylex.
6209 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
6210 (void) as arg when not pure, since we now assume C89 when building
6211 Bison. Pacify GCC by using parameter.
6212
6213 2003-06-02 Paul Eggert <eggert@twinsun.com>
6214
6215 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
6216 yy::Location::lines, yy::Location::columns): Rename arguments
6217 to avoid shadowing; this removes a warning generated by GCC 3.3.
6218
6219 2003-06-01 Paul Eggert <eggert@twinsun.com>
6220
6221 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
6222 to g++, as GCC 3.3 complains if you do it.
6223 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
6224 everything that WARNING_CFLAGS has, except omit warnings
6225 not suitable for C++.
6226 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
6227 * tests/atlocal.in (CXXFLAGS): New var.
6228 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
6229
6230 Fix a GLR parser bug I reported in February; see
6231 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
6232 The problem was that GLR parsers did not conform to the C standard,
6233 because actions like { $1 = $2 + $3; } expanded to expressions
6234 that invoked YYFILL in separate subexpressions, and YYFILL assigned
6235 to a local variable. The C standard says that expressions
6236 like (var = f ()) + (var = f ()) have undefined behavior.
6237 Another problem was that GCC sometimes issues warnings that
6238 yyfill and its parameters are unused.
6239
6240 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
6241 as possibly unused.
6242 (yyfill): New function.
6243 (YYFILL): Use it.
6244 (yyuserAction): Change type of yynormal to bool, so that it matches
6245 the new yyfill signature. Mark it as possibly unused.
6246
6247
6248 Follow up on a bug I reported in February, where a Bison-generated
6249 parser can loop. Provide a test case and a fix for yacc.c. I
6250 don't have a fix for lalr1.cc or for glr.c, unfortunately.
6251 The original bug report is in:
6252 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
6253
6254 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
6255 macro's size was becoming unwieldy.
6256 (yyerrlab): Do not discard an empty lookahead symbol, as this
6257 might destroy garbage.
6258 (yyerrorlab): New label, with the old contents of YYERROR,
6259 plus the following change: pop the stack of rhs corresponding
6260 to the production that invoked YYERROR. That is how Yacc
6261 behaves, and POSIX requires this behavior.
6262 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
6263 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
6264 Define 'alarm' to do nothing if unistd.h is not available.
6265 Add a new rule "exp: '-' error;" to test the above change to
6266 data/yacc.c. Use 'alarm' to abort any test taking longer than
6267 10 seconds, as it's probably looping.
6268 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
6269 Also, the new yacc.c generates two fewer diagnostics for an
6270 existing test.
6271
6272 2003-05-24 Paul Eggert <eggert@twinsun.com>
6273
6274 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
6275 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
6276 This fixes a problem reported by John Bowman when the Compaq/HP
6277 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
6278 -ansi -Wall -gall).
6279 * data/yacc.c (union yyalloc): Likewise.
6280 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
6281
6282 Switch from 'int' to 'bool' where that makes sense.
6283
6284 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
6285 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
6286 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
6287 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
6288 Return or accept bool, not int. All callers changed.
6289 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
6290 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
6291 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
6292 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
6293 bitset_or_and_cmp_): Likewise.
6294 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
6295 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
6296 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
6297 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
6298 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
6299 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
6300 bitset_stats_or_and_cmp): Likewise.
6301 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
6302 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
6303 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
6304 ebitset_xor_cmp): Likewise.
6305 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
6306 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
6307 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
6308 lbitset_xor_cmp): Likewise.
6309 * lib/bbitset.h: Include <stdbool.h>.
6310 (struct bitset_vtable): The following members now return bool, not
6311 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
6312 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
6313 or_and_cmp).
6314 * src/conflicts.c (count_rr_conflicts): Likewise.
6315 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
6316 All uses changed.
6317 * lib/ebitset.c (ebitset_obstack_init): Likewise.
6318 * lib/lbitset.c (lbitset_obstack_init): Likewise.
6319 * src/getargs.c (debug_flag, defines_flag, locations_flag,
6320 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
6321 graph_flag): Likewise.
6322 * src/getargs.h (debug_flag, defines_flag, locations_flag,
6323 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
6324 graph_flag): Likewise.
6325 * src/output.c (error_verbose): Likewise.
6326 * src/output.h (error_verbose): Likewise.
6327 * src/reader.c (start_flag, typed): Likewise.
6328 * src/reader.h (typed): Likewise.
6329 * src/getargs.c (LOCATIONS_OPTION): New constant.
6330 (long_options, getargs): Use it.
6331 * src/lalr.c (build_relations): Use bool, not int.
6332 * src/nullable.c (nullable_compute): Likewise.
6333 * src/print.c (print_reductions): Likewise.
6334 * src/tables.c (action_row, pack_vector): Likewise.
6335 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
6336 * src/output.c (prepare): Use it.
6337 * src/output.c (token_definitions_output,
6338 symbol_destructors_output, symbol_destructors_output): Use string,
6339 not boolean integer, to keep track of whether to output separator.
6340 * src/print_graph.c (print_core): Likewise.
6341 * src/state.c (state_rule_lookaheads_print): Likewise.
6342
6343 * config/install-sh: Sync from automake 1.7.5.
6344
6345 2003-05-14 Paul Eggert <eggert@twinsun.com>
6346
6347 * src/parse-gram.y (rules_or_grammar_declaration): Require a
6348 semicolon after a grammar declaration, in the interest of possible
6349 future changes to the Bison input language.
6350 Do not allow a stray semicolon at the start of the grammar.
6351 (rhses.1): Allow one or more semicolons after any rule, including
6352 just before "|" as required by POSIX.
6353 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
6354 grammar.
6355
6356 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
6357
6358 %parse-param support for lalr1.cc.
6359
6360 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
6361 b4_cc_constructor_calls, b4_cc_constructor_call,
6362 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
6363 definitions.
6364 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
6365 parse-param arguments.
6366 (yy::b4_parser_class_name): Declare instance variables to
6367 hold parse-param arguments.
6368 * tests/calc.at: s/value/semantic_value/ because value clashes
6369 with a member of yy::b4_parser_class_name. Adjust C++ code
6370 to handle %parse-param. Enable %parse-param test in C++.
6371
6372 2003-05-12 Paul Eggert <eggert@twinsun.com>
6373
6374 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
6375 English a bit. Fix fclose typo. Change "const char" to "char
6376 const", and use ANSI C rather than K&R for "main". Suggest
6377 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
6378 and suggest yy_switch_to_buffer.
6379
6380 2003-05-05 Paul Eggert <eggert@twinsun.com>
6381
6382 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
6383 C89. This avoids a diagnostic on compilers that define __STDC__
6384 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
6385 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
6386
6387 2003-05-03 Paul Eggert <eggert@twinsun.com>
6388
6389 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
6390 Do not overrun array bounds.
6391 This should fix a bug reported today by Olatunji Oluwabukunmi in
6392 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
6393
6394 2003-04-29 Akim Demaille <akim@epita.fr>
6395
6396 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
6397 * src/getargs.c, src/getargs.h: here, as bool, not int.
6398 (nondeterministic_parser): New.
6399 * src/parse-gram.y, src/scan-gram.l: Support
6400 %nondeterministic-parser.
6401 * src/output.c (prepare): Use nondeterministic_parser instead
6402 of glr_parser where appropriate.
6403 * src/tables.c (conflict_row, action_row, save_row)
6404 (token_actions, token_actions, pack_vector): Ditto.
6405
6406 2003-04-29 Akim Demaille <akim@epita.fr>
6407
6408 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
6409
6410 2003-04-29 Akim Demaille <akim@epita.fr>
6411
6412 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
6413 with %pure-parser and %locations to exercise the patch from Yakov
6414 Markovitch below.
6415
6416 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
6417
6418 * data/yacc.c: (b4_lex_param): Corrected for the case where
6419 %lex-param is provided and %pure-parser isn't.
6420
6421 2003-04-27 Paul Eggert <eggert@twinsun.com>
6422
6423 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
6424 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
6425 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
6426 if it is not defined.
6427 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
6428
6429 2003-04-26 Paul Eggert <eggert@twinsun.com>
6430
6431 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
6432 Declare to be of type suitable for the ninf value itself, not of
6433 type suitable for the corresponding table, since the latter might
6434 be unsigned but the ninf value might be negative. This fixes a
6435 bug reported by Alexandre Duret-Lutz in
6436 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
6437
6438 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
6439 invokes it. We shouldn't invoke it twice because it will attempt
6440 to put error.o in the archive twice. This fixes a glitch reported
6441 by Martin Mokrejs in
6442 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
6443
6444 2003-04-21 Paul Eggert <eggert@twinsun.com>
6445
6446 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
6447 to gnulib.
6448
6449 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
6450
6451 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
6452 Fix obvious typo that results in uncompilable GLR parsers
6453 when both %pure-parser and %locations are used. (trivial change)
6454
6455 2003-04-17 Paul Eggert <eggert@twinsun.com>
6456
6457 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
6458 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
6459 Do not insert the expected token via unput, as this runs afoul
6460 of a POSIX-compatibility bug in flex 2.5.31.
6461 All uses changed to BEGIN the parent state,
6462 since we no longer insert the expected token via unput.
6463 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
6464 that is no longer emitted after the above change.
6465
6466 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
6467 the first one. This change is from Paul Hilfinger, and it fixes
6468 regression reported by Werner Lemberg in
6469 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
6470
6471 (resolve_sr_conflict): Don't invoke state_errs_set
6472 unless one or more tokens have been explicitly made errors.
6473 Otherwise, the above change causes Bison to abort.
6474
6475 * tests/existing.at (GNU pic Grammar): New test case, taken from
6476 Lemberg's email.
6477
6478 2003-03-31 Akim Demaille <akim@epita.fr>
6479
6480 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
6481
6482 2003-03-31 Akim Demaille <akim@epita.fr>
6483
6484 * src/output.c (prepare_symbols): Avoid trailing spaces in the
6485 output.
6486
6487 2003-03-31 Akim Demaille <akim@epita.fr>
6488
6489 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
6490 From Paul Hilfinger.
6491
6492 2003-03-29 Akim Demaille <akim@epita.fr>
6493
6494 * m4/error.m4: Do not put under dynamic conditions some code which
6495 expansion is under static control.
6496
6497 2003-03-29 Akim Demaille <akim@epita.fr>
6498
6499 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
6500
6501 2003-03-29 Akim Demaille <akim@epita.fr>
6502
6503 * doc/bison.texinfo (Strings are Destroyed): New.
6504
6505 2003-03-13 Paul Eggert <eggert@twinsun.com>
6506
6507 * .cvsignore: Add configure.lineno.
6508 * src/.cvsignore: Add yacc.
6509 * tests/.cvsignore: Add testsuite.log.
6510 * doc/fdl.texi: Sync with latest FSF version.
6511
6512 2003-03-12 Paul Eggert <eggert@twinsun.com>
6513
6514 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
6515 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
6516 cursor, instead of leaving it undefined. This fixes a bug
6517 reported by Tim Van Holder in
6518 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
6519 * tests/input.at (Torturing the Scanner): Test the scanner on
6520 an empty input file, which was Tim Van Holder's test case.
6521
6522 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
6523 <sys/resource.h> can be included, include sys/time.h and
6524 sys/times.h first, if available. This works around the SunOS
6525 4.1.4 porting bug reported by Bruce Becker in
6526 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
6527
6528 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
6529 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
6530 AC_HEADER_SYS_WAIT.
6531
6532 Merge changes from gnulib. This was prompted because the CVS
6533 snapshot didn't build on Solaris 7 due to strnlen problems.
6534
6535 These changes need to be merged back into gnulib:
6536 * lib/hash.c: Include <stdbool.h> unconditionally.
6537 * m4/onceonly.m4 (m4_quote): New macro.
6538 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
6539 Quote AC_FOREACH variable-expansions properly.
6540 The 2003-01-03 obstack.h change also needs merging.
6541 {end of changes requiring merging}
6542
6543 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
6544 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
6545 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
6546 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
6547 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
6548 New files, imported from gnulib.
6549 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
6550 above.
6551
6552 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
6553 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
6554 gnulib sources.
6555
6556 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
6557 Add.
6558 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
6559 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
6560 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
6561 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
6562 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
6563 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
6564 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
6565 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
6566 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
6567 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
6568 (jm_PREREQ_ARGMATCH): Remove.
6569 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
6570 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
6571
6572 * src/system.h: Include <stdbool.h> unconditionally.
6573
6574 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
6575 assuming at least C89 in the bitset code for some time now.
6576
6577 2003-03-03 Akim Demaille <akim@epita.fr>
6578
6579 * ro.po: New.
6580
6581 2003-03-02 Akim Demaille <akim@epita.fr>
6582
6583 * doc/bison.texinfo (Table of Symbols): Reactivate the
6584 documentation for %lex-param, and %parse-param.
6585
6586 2003-03-02 Akim Demaille <akim@epita.fr>
6587
6588 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
6589 generate verbose error messages.
6590 Use the number of tokens as an upper bound in yytname, as it
6591 cannot be a non terminal.
6592
6593 2003-03-02 Akim Demaille <akim@epita.fr>
6594
6595 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
6596 message.
6597
6598 2003-03-02 Akim Demaille <akim@epita.fr>
6599
6600 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
6601 Use them to exercise yycheck overrun.
6602 Based on Andrew Suffield's grammar.
6603
6604 2003-03-02 Akim Demaille <akim@epita.fr>
6605
6606 Create tests/local.at for Bison generic testing macros.
6607
6608 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
6609 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
6610 This new file.
6611 * tests/calc.at (AT_CHECK_CALC): Adjust.
6612 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
6613 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
6614 * tests/local.at: here.
6615 (AT_COMPILE_CXX): Tags the tests using it as c++.
6616 Ignore the test if CXX is not functional.
6617
6618 2003-03-01 Paul Eggert <eggert@twinsun.com>
6619
6620 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
6621 not loc->end, since loc->end might contain garbage and this leads
6622 to undefined behavior on some platforms.
6623 (id_loc, token_start): Use (IF_LINTed) initial values that do not
6624 depend on *loc, so that the reader doesn't give the the false
6625 impression that *loc is initialized.
6626 (<INITIAL>"%%"): Do not bother setting code_start, since its value
6627 does not survive the return.
6628
6629 2003-03-01 Akim Demaille <akim@epita.fr>
6630
6631 * src/scan-gram.l (code_start): Always initialize it when entering
6632 into yylex, as SC_EPILOGUE is activated *before* the corresponding
6633 yylex invocation. An alternative would be making it static, but
6634 then it starts with the second %%'s beginning, instead of its end.
6635
6636 2003-02-28 Paul Eggert <eggert@twinsun.com>
6637
6638 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
6639 around a UnixWare 7.1.1 porting bug reported by John Hughes in
6640 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
6641
6642 2003-02-26 Paul Eggert <eggert@twinsun.com>
6643
6644 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
6645 Remove Sequent/Pyramid discussion (nobody uses them any more).
6646 Merge VMS and MS-DOS discussion; these ports may well be dead
6647 but let's keep mentioning them for now. Put <> around email
6648 addresses. Add copyright notice.
6649
6650 2003-02-24 Paul Eggert <eggert@twinsun.com>
6651
6652 * data/glr.c (yy_reduce_print): yylineno -> yylno,
6653 to avoid collision with flex use of yylineno.
6654 Problem reported by Bruce Lilly in
6655 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
6656 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
6657 * data/yacc.c (yy_reduce_print): Likewise.
6658
6659 * config/depcomp: Sync with Automake 1.7.3.
6660
6661 2003-02-21 Akim Demaille <akim@epita.fr>
6662
6663 * data/lalr1.cc: Use temporary variables instead of casts to
6664 change integer types.
6665 Suggested by Paul Eggert.
6666
6667 2003-02-21 Akim Demaille <akim@epita.fr>
6668
6669 * doc/bison.texinfo: Use "location" consistently to refer to @n,
6670 to avoid confusions with lalr1.cc's notion of Position.
6671 Suggested by Paul Eggert.
6672
6673 2003-02-20 Akim Demaille <akim@epita.fr>
6674
6675 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
6676 before initial_columns.
6677 (location.hh): Use consistent variable names when defining the
6678 operator<<.
6679 Use "last" so that we subtract from Positions, not from unsigned.
6680
6681 2003-02-20 Akim Demaille <akim@epita.fr>
6682
6683 * data/lalr1.cc (position.hh): New subfile, including the extended
6684 and Doxygen'ed documentation of class Position.
6685 (location.hh): Use it.
6686 Document a` la Doxygen.
6687 With the help of Benoit Perrot.
6688
6689 2003-02-20 Akim Demaille <akim@epita.fr>
6690
6691 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
6692 AT_YACC_IF.
6693 Redefine AT_YYERROR_SEES_LOC_IF using it.
6694 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
6695 not defined.
6696 Don't use the location in yy::Parser::error_ and
6697 yy::Parser::print_ when not %locations.
6698 Activate more lalr1.cc tests.
6699
6700 2003-02-19 Akim Demaille <akim@epita.fr>
6701
6702 * data/lalr1.cc: When displaying a line number, be sure to make it
6703 an int.
6704
6705 2003-02-19 Akim Demaille <akim@epita.fr>
6706
6707 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
6708 Remove, useless.
6709 (YYABORT, YYACCEPT, YYERROR): New.
6710 * tests/calc.at: Renable the lalr1.cc test.
6711
6712 2003-02-19 Akim Demaille <akim@epita.fr>
6713
6714 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
6715 error recovery, mixing with/without pops and discarding of the
6716 lookahead.
6717 Exercise YYERROR.
6718 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
6719
6720 2003-02-17 Paul Eggert <eggert@twinsun.com>
6721
6722 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
6723 * tests/testsuite.at (AT_COMPILE): Use them.
6724 This fixes the testsuite problem reported by Robert Lentz in
6725 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
6726
6727 2003-02-12 Paul Eggert <eggert@twinsun.com>
6728
6729 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
6730 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
6731 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
6732 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
6733 Check for malloc failure, for consistency with yacc.c.
6734 (yytname_size): Remove, for consistency with yacc.c.
6735
6736 The bug still remains in data/lalr1.cc, as I didn't have time
6737 to fix it there.
6738
6739 2003-02-06 Akim Demaille <akim@epita.fr>
6740
6741 * configure.ac (GXX): Rename as...
6742 (CXX): this, to keep the original Autoconf semantics.
6743 Require 2.57.
6744 * data/lalr1.cc: Fix b4_copyright invocations.
6745 If YYDEBUG is not defined, don't depend upon name_ being defined.
6746 (location.hh): Include string and iostream.
6747 (Position::filename): New member.
6748 (Position::Position ()): New.
6749 (operator<< (Position)): New.
6750 (operator- (Position, int)): New.
6751 (Location::first, Location::last): Rename as...
6752 (Location::begin, Location::end): these, to mock the conventional
6753 iterator names.
6754 (operator<< (Location)): New.
6755 * tests/atlocal.in (CXX): New.
6756 * tests/testsuite.at (AT_COMPILE_CXX): New.
6757 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
6758 locations in a more synthetic way.
6759 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
6760 lalr1.cc is used.
6761 Adjust the C locations to match those from Emacs: first column is
6762 column 0.
6763 Change all the expected results.
6764 Conform to the GCS: simplify the locations when applicable.
6765 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
6766 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
6767 these CPP macros with the m4 macros new defined by...
6768 (AT_CHECK_PUSHDEFS): this, i.e.:
6769 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
6770 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
6771 New macros.
6772 (AT_CHECK_POPDEFS): Undefine them.
6773 (AT_CHECK_CALC_LALR1_CC): New.
6774 Use it for the first lalr1.cc test.
6775
6776 2003-02-04 Akim Demaille <akim@epita.fr>
6777
6778 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
6779 Location as is defined.
6780
6781 2003-02-04 Akim Demaille <akim@epita.fr>
6782
6783 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
6784 name_ being defined.
6785
6786 2003-02-03 Paul Eggert <eggert@twinsun.com>
6787
6788 * src/gram.h (start_symbol): Remove unused decl.
6789
6790 Use more-consistent naming conventions for local vars.
6791
6792 * src/derives.c (derives_compute): Change type of local var from
6793 int to rule_number.
6794 * src/gram.c (grammar_rules_partial_print): Likewise.
6795 * src/print.c (print_core): Likewise.
6796 * src/reduce.c (reduce_grammar_tables): Likewise.
6797
6798 * src/gram.c (grammar_dump): Change name of item_number *
6799 local var from r to rp.
6800 * src/nullable.c (nullable_compute): Likewise.
6801
6802 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
6803
6804 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
6805 for symbol or symbol_number var.
6806 * src/reader.c (grammar_start_symbol_set): Likewise.
6807 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
6808 Likewise.
6809 * src/state.c (transitions_to): Likewise.
6810 * src/state.h: Likewise.
6811 * src/tables.c (symbol_number_to_vector_number): Likewise.
6812
6813 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
6814 char * var.
6815
6816 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
6817 var.
6818
6819 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
6820 var.
6821
6822 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
6823 Use str, not s, for char * var. Use ch, not c, for character var.
6824 Use size for size var.
6825
6826 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
6827 char * var.
6828 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
6829 uniqstr var.
6830 * src/uniqstr.h: Likewise.
6831
6832 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
6833 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
6834 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
6835 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
6836 param to have same name as that of enum, so that we don't use
6837 "s" to stand for a non-state.
6838
6839 2003-02-02 Akim Demaille <akim@epita.fr>
6840
6841 * src/scan-skel.l: Scan more than one inert character per yylex
6842 invocation.
6843
6844 2003-02-01 Paul Eggert <eggert@twinsun.com>
6845
6846 Version 1.875a.
6847
6848 * po/LINGUAS: Add ms.
6849
6850 2003-01-30 Akim Demaille <akim@epita.fr>
6851
6852 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
6853
6854 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6855
6856 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
6857 of $1.
6858
6859 Changes in response to error report by S. Eken: GLR mode does not
6860 handle negative $ indices or $ indices in embedded rules correctly.
6861 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
6862
6863 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
6864 (b4_rhs_location): Ditto.
6865 (yyfill): New function to copy from stack tree into array
6866 incrementally.
6867 (yyuserAction): Modify to allow incremental move of semantic values
6868 to rhs array when in GLR mode.
6869 Define YYFILL to use in user-defined actions to fill semantic array
6870 as needed.
6871 Remove dummy use of yystack, as there is now a guaranteed use.
6872 (yydoAction): Modify to allow incremental move of semantic values
6873 to rhs array when in GLR mode.
6874 (yyresolveAction): Ditto.
6875 (yyglrShiftDefer): Update comment.
6876 (yyresolveStates): Use X == NULL for pointers, not !X.
6877 (yyglrReduce): Ditto.
6878 (yydoAction): Ditto
6879
6880 * tests/glr-regr1.at: Rename to ...
6881 * tests/glr-regression.at: Add new regression test for the problems
6882 described above (adapted from S. Eken).
6883 Update copyright notice.
6884 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
6885 * tests/Makefile.am: Ditto.
6886
6887 2003-01-28 Paul Eggert <eggert@twinsun.com>
6888
6889 * data/lalr1.cc: Do not use @output_header_name@ unless
6890 b4_defines_flag is set. This fixes two bugs reported by
6891 Tim Van Holder in
6892 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
6893 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
6894
6895 2003-01-21 Paul Eggert <eggert@twinsun.com>
6896
6897 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
6898 we don't need to worry about yyerrlab1 being reported as an
6899 "unused label" by non-GCC C compilers. The downside is that if
6900 locations are used then a couple of statements are duplicated each
6901 time YYERROR is invoked, but the upside is that the warnings
6902 should vanish.
6903 (yyerrlab1): Move code to YERROR.
6904 (yyerrlab2): Remove. Change uses back to yyerrlab1.
6905 This reverts some of the 2002-12-27 change.
6906
6907 2003-01-17 Paul Eggert <eggert@twinsun.com>
6908
6909 * src/output.c (symbol_printers_output): Fix typo that led
6910 to core dump. Problem reported by Antonio Rus in
6911 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
6912
6913 2003-01-13 Akim Demaille <akim@epita.fr>,
6914 Quoc Peyrot <chojin@lrde.epita.fr>,
6915 Robert Anisko <anisko_r@lrde.epita.fr>
6916
6917 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
6918 when the stacks contain one element, as the loop would otherwise
6919 free the last state, and then use the top state (the one we just
6920 popped). This means that the initial elements will not be freed
6921 explicitly, as is the case in yacc.c; it is not a problem, as
6922 these elements have fake values.
6923
6924 2003-01-11 Paul Eggert <eggert@twinsun.com>
6925
6926 * NEWS: %expect-violations are now just warnings, reverting
6927 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
6928 bootstrapping problem reported by Matthias Klose; see
6929 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
6930 * src/conflicts.c (conflicts_print): Likewise.
6931 * tests/conflicts.at (%expect not enough, %expect too much,
6932 %expect with reduce conflicts): Likewise.
6933 * doc/bison.texinfo (Expect Decl): Document this. Also mention
6934 that the warning is enabled if the number of conflicts changes
6935 (not necessarily increases).
6936
6937 * src/getargs.c (version): Update copyright year.
6938
6939 2003-01-09 Akim Demaille <akim@epita.fr>
6940
6941 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
6942
6943 2003-01-08 Paul Eggert <eggert@twinsun.com>
6944
6945 * Makefile.maint (WGETFLAGS):
6946 New macro, containing "-C off" to disable proxy caches.
6947 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
6948 (rel-check): Use $(WGET) instead of wget.
6949
6950 2003-01-06 Paul Eggert <eggert@twinsun.com>
6951
6952 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
6953 the GLR paper of Scott, Johnstone and Hussain.
6954
6955 2003-01-04 Paul Eggert <eggert@twinsun.com>
6956
6957 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
6958 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
6959 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
6960 (EXTRA_LIBRARIES): New var, for liby.a.
6961 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
6962 (EXTRA_SCRIPTS): New var, for yacc.
6963
6964 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
6965 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
6966 Problem reported by Nelson H. F. Beebe.
6967
6968 2003-01-03 Paul Eggert <eggert@twinsun.com>
6969
6970 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
6971 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
6972 when compiling Bison 1.875's `bitset bset = obstack_alloc
6973 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
6974
6975 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
6976 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
6977 grow to a huge size with typical invocation.
6978
6979 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
6980 Use the pattern recommended by Autoconf 2.57, except also protect
6981 against double-definition.
6982 * src/system.h: Likewise.
6983 Portability issues reported by Nelson H. F. Beebe.
6984
6985 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
6986 All uses changed. Provide a definition in both C and C++.
6987 (yytrue, yyfalse): Define even if defined (__cplusplus).
6988
6989 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
6990 Reported by Nelson H. F. Beebe.
6991
6992 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
6993
6994 2003-01-02 Paul Eggert <eggert@twinsun.com>
6995
6996 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
6997 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
6998 Bug reported by Nelson H. F. Beebe.
6999
7000 2003-01-01 Paul Eggert <eggert@twinsun.com>
7001
7002 * Version 1.875.
7003
7004 2002-12-30 Paul Eggert <eggert@twinsun.com>
7005
7006 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
7007 Moved here from...
7008 (<INITIAL>","): Here. This causes stray "," to be treated
7009 more uniformly.
7010
7011 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
7012 last brace in braced code when not in Yacc mode, for compatibility
7013 with Bison 1.35. This resurrects the 2001-12-15 patch to
7014 src/reader.c.
7015
7016 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
7017 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
7018
7019 2002-12-28 Paul Eggert <eggert@twinsun.com>
7020
7021 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
7022 that of SYM's type. This fixes Debian bug 168069, reported by
7023 Thomas Olsson.
7024
7025 2002-12-28 Paul Eggert <eggert@twinsun.com>
7026
7027 Version 1.75f.
7028
7029 Switch back to the Yacc style of conflict reports, undoing some
7030 of the 2002-07-30 change.
7031 * doc/bison.texinfo (Understanding): Use Yacc style for
7032 conflict reports. Also, use new way of locating rules.
7033 * src/conflicts.c (conflict_report):
7034 Renamed from conflict_report_yacc, removing the old
7035 'conflict_report'. Translate the entire conflict report at once,
7036 so that we don't assume that "," has the same interpretation in
7037 all languages.
7038 (conflicts_output): Use Yacc-style conflict report for each state,
7039 instead of our more-complicated style.
7040 (conflicts_print): Use Yacc-style conflict report, except print
7041 the input file name when not emulating Yacc.
7042 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
7043 Conflicted Reduction, %expect not enough, %expect too much,
7044 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
7045 * tests/existing.at (GNU Cim Grammar): Likewise.
7046 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
7047
7048 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
7049 fatal): Don't invoke fflush; it's not needed and it might even be
7050 harmful for stdout, as stdout might not be open.
7051 * src/reduce.c (reduce_print): Likewise.
7052
7053 2002-12-27 Paul Eggert <eggert@twinsun.com>
7054
7055 Fix a bug where error locations were not being recorded correctly.
7056 This problem was originally reported by Paul Hilfinger in
7057 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
7058
7059 * data/yacc.c (yyparse): New local var yylerrsp, to record the
7060 top of the location stack's error locations.
7061 (yyerrlab): Set it. When discarding a token, push its location
7062 onto yylerrsp so that we don't lose track of the error's end.
7063 (yyerrlab1): Now is only the target of YYERROR, so that we can
7064 properly record the location of the action that failed. For GCC
7065 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
7066 GCC warning about yyerrlab1 being unused if YYERROR is unused.
7067 (yyerrlab2): New label, which yyerrlab now falls through to.
7068 Compute the error's location by applying YYLLOC_DEFAULT to
7069 the locations of all the symbols that went into the error.
7070 * doc/bison.texinfo (Location Default Action): Mention that
7071 YYLLOC_DEFAULT is also invoked for syntax errors.
7072 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
7073 Error locations include the locations of all the tokens that were
7074 discarded, not just the last token.
7075
7076 2002-12-26 Paul Eggert <eggert@twinsun.com>
7077
7078 * src/files.c: Include quote.h.
7079 (compute_output_file_names): Warn if we detect conflicting
7080 outputs to the same file. This should catch the misunderstanding
7081 exemplified by Debian Bug 165349, reported by Bruce Stephens..
7082
7083 * src/conflicts.c (conflicts_print): If the user specifies
7084 "%expect N", report an error if there are any reduce/reduce
7085 conflicts. This is what the manual says should happen.
7086 This fixes Debian bug 130890, reported by Anthony DeRobertis.
7087 * tests/conflicts.at (%expect with reduce conflicts): New test.
7088
7089 Don't use m4_include on relative file names, as it doesn't work as
7090 desired if there happens to be a file with that name under ".".
7091
7092 * m4sugar/version.m4: Remove; it was included but it wasn't used.
7093 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
7094 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
7095 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
7096 * src/output.c (output_skeleton): Use full path names when
7097 specifying a file to include; don't rely on include path, as
7098 it's unreliable when the working file contains a file with
7099 that name.
7100
7101 2002-12-25 Paul Eggert <eggert@twinsun.com>
7102
7103 Remove obsolete references to bison.simple and bison.hairy.
7104 Problem mentioned by Aubin Mahe in
7105 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
7106 * data/glr.c: Comment fix.
7107 * doc/bison.1: Remove references. Also, mention "yacc".
7108
7109 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
7110 with -g option.
7111
7112 * src/parse-gram.y (declaration): Use enum "report_states" rather
7113 than its numeric value 1.
7114
7115 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
7116 opening a new one. This fixes Debian bug 165349, reported by
7117 Bruce Stephens.
7118
7119 2002-12-24 Paul Eggert <eggert@twinsun.com>
7120
7121 Version 1.75e.
7122
7123 * Makefile.maint (cvs-update): Don't assume that the shell
7124 supports $(...), as Solaris sh doesn't.
7125
7126 * src/parse-gram.y (lloc_default): Remove test for empty
7127 nonterminals at the end, since it didn't change the result.
7128
7129 2002-12-24 Paul Eggert <eggert@twinsun.com>
7130
7131 If the user does not define YYSTYPE as a macro, Bison now declares it
7132 using typedef instead of defining it as a macro. POSIX requires this.
7133 For consistency, YYLTYPE is also declared instead of defined.
7134
7135 %union directives can now have a tag before the `{', e.g., the
7136 directive `%union foo {...}' now generates the C code
7137 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
7138 The default union tag is `YYSTYPE', for compatibility with Solaris 9
7139 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
7140 instead of `yyltype'.
7141
7142 `yystype' and `yyltype' are now obsolescent macros instead of being
7143 typedefs or tags; they are no longer documented and will be
7144 withdrawn in a future release.
7145
7146 * data/glr.c (b4_location_type): Remove.
7147 (YYSTYPE): Renamed from yystype.
7148 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
7149 (struct YYLTYPE): Renamed from struct yyltype.
7150 (YYLTYPE): Renamed from yyltype.
7151 (yyltype, yystype): New (and obsolescent) macros,
7152 for backward compatibility.
7153 * data/yacc.c: Likewise.
7154
7155 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
7156 does not specify a union tag. This is for compatibility with
7157 Solaris 9 yacc.
7158
7159 * src/parse-gram.y (add_param): 2nd arg is now char * not char
7160 const *, since it is now modified by stripping surrounding { }.
7161 (current_braced_code): Remove.
7162 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
7163 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
7164 trailing " {...}". Now of type <chars>.
7165 (grammar_declaration): Adjust to bundled tokens.
7166 (code_content): Remove; stripping is now done by add_param.
7167 (print_token_value): Print contents of bundled tokens.
7168 (token_name): New function.
7169
7170 * src/reader.h (braced_code, current_braced_code): Remove.
7171 (token_name): New decl.
7172
7173 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
7174 token_type, not braced_code code_kind. All uses changed.
7175 (SC_PRE_CODE): New state, for scanning after a keyword that
7176 has (or usually has) an immediately-following braced code.
7177 (token_type): New local var, to keep track of which token type
7178 to return when scanning braced code.
7179 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
7180 <INITIAL>"%parse-param", <INITIAL>"%printer",
7181 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
7182 instead of returning a token type immediately.
7183 (<INITIAL>"{"): Set token type.
7184 (<SC_BRACED_CODE>"}"): Use it.
7185 (handle_action_dollar, handle_action_at): Now returns bool
7186 indicating success. Fail if ! current_rule; this prevents a core dump.
7187 (handle_symbol_code_dollar, handle_symbol_code_at):
7188 Remove; merge body into caller.
7189 (handle_dollar, handle_at): Complain in invalid contexts.
7190
7191 * NEWS, doc/bison.texinfo: Document the above.
7192 * NEWS: Fix years and program names in copyright notice.
7193
7194 2002-12-17 Paul Eggert <eggert@twinsun.com>
7195
7196 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
7197 Reporting, Table of Symbols): Omit mentions of %lex-param and
7198 %parse-param from the documentation for now.
7199
7200 2002-12-15 Paul Eggert <eggert@twinsun.com>
7201
7202 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
7203 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
7204 lookahead symbol, and which sets yychar in parser actions) and it
7205 disagreed with the Bison documentation. Bug
7206 reported by Andrew Walrond.
7207
7208 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
7209 as the caller now does that.
7210 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
7211 (YYEMPTY): Parenthesize right hand side, since others use it.
7212 (yyparse): Don't assume that our generated code is the only code
7213 that sets yychar.
7214
7215 2002-12-13 Paul Eggert <eggert@twinsun.com>
7216
7217 Version 1.75d.
7218
7219 POSIX requires a "yacc" command.
7220 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
7221 (MOSTLYCLEANFILES): Add yacc.
7222 (yacc): New rule.
7223 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
7224 as an alias for bison y.
7225
7226 * po/LINGUAS: Add da.
7227
7228 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
7229 problem with latest <getopt.h>.
7230 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
7231
7232 * doc/fdl.texi: Upgrade to 1.2.
7233 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
7234 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
7235 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
7236 gnulib.
7237 * config/install-sh: Sync with autotools.
7238
7239 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
7240 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
7241 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
7242 locations are requested.
7243 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
7244 locations are requested.
7245
7246 2002-12-12 Paul Eggert <eggert@twinsun.com>
7247
7248 Remove unportable casts and storage allocation tricks.
7249 While we're at it, remove almost all casts, since they
7250 usually aren't needed and are a sign of trouble.
7251
7252 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
7253
7254 * src/derives.c (derives_compute): Do not subtract NTOKENS from
7255 the pointer DSET returned by malloc; this isn't portable.
7256 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
7257 Similarly for DERIVES.
7258 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
7259 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
7260 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
7261
7262 * src/derives.c (derives_compute): Do not bother invoking
7263 int_of_rule_number, since rule numbers are integers.
7264
7265 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
7266 rather than XMALLOC (char, N).
7267
7268 * src/files.c (filename_split): Rewrite to avoid cast.
7269
7270 * src/gram.h (symbol_number_as_item_number,
7271 item_number_as_symbol_number, rule_number_as_item_number,
7272 item_number_as_rule_number):
7273 Now inline functions rather than macros, to avoid casts.
7274 * src/state.h (state_number_as_int): Likewise.
7275 * src/tables.c (state_number_to_vector_number,
7276 symbol_number_to_vector_number): Likewise.
7277
7278 * src/gram.h (int_of_rule_number): Remove; no longer used.
7279
7280 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
7281 since the resulting storage is always stored into.
7282
7283 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
7284 where it's needed.
7285
7286 * src/muscle_tab.c (muscle_m4_output):
7287 Now inline. Return bool, not int.
7288 * src/state.c (state_compare): Likewise.
7289 * src/symtab.c (symbol_check_defined,
7290 symbol_check_alias_consistency, symbol_pack, symbol_translation,
7291 hash_compare_symbol, hash_symbol):
7292 Likewise.
7293 * src/uniqstr.c (uniqstr_print): Likewise.
7294 * src/muscle_tab.c (muscle_m4_output_processor):
7295 New function, to avoid casts.
7296 * src/state.c (state_comparator, stage_hasher): Likewise.
7297 * src/symtab.c (symbol_check_defined_processor,
7298 symbol_check_alias_consistency_processor, symbol_pack_processor,
7299 symbol_translation_processor, hash_symbol_comparator,
7300 hash_symbol_hasher): Likewise.
7301 * src/uniqstr.c (uniqstr_print_processor): Likewise.
7302 * src/muscle_tab.c (muscles_m4_output):
7303 Use new functions instead of casting old functions unportably.
7304 * src/state.c (state_hash_new): Likewise.
7305 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
7306 symbols_token_translations_init):
7307 Likewise.
7308 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
7309
7310 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
7311 var instead of casting to long, to avoid casts.
7312 (prepare_states): Use MALLOC rather than alloca, so that we don't
7313 have to worry about alloca.
7314 * src/state.c (state_hash_lookup): Likewise.
7315
7316 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
7317 local var instead of casting to unsigned char, to avoid casts.
7318
7319 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
7320 STATE_ALLOC): Remove.
7321 (transitions_new, errs_new, reductions_new, state_new): Use malloc
7322 rather than calloc, and use offsetof to avoid allocating slightly
7323 too much storage.
7324 (state_new): Initialize all members.
7325
7326 * src/state.c (state_hash): Use unsigned accumulator, not signed.
7327
7328 * src/symtab.c (symbol_free): Remove; unused.
7329 (symbol_get): Remove cast in lhs of assignment.
7330 (symbols_do): Now static. Accept generic arguments, not
7331 hashing-related ones.
7332
7333 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
7334 (symbol_processor): Remove.
7335 (symbols_do): Remove decl; now static.
7336
7337 * src/system.h (alloca): Remove; decl no longer needed.
7338 (<stddef.h>): Include, for offsetof.
7339 (<inttypes.>, <stdint.h>): Include if available.
7340 (uintptr_t): New type, if system lacks it.
7341 (CALLOC, MALLOC, REALLOC): New macros.
7342 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
7343 new macros.
7344
7345 * src/tables.c (table_size): Now int, to pacify GCC.
7346 (table_grow, table_ninf_remap): Use signed table size.
7347 (save_row): Don't bother initializing locals when not needed.
7348 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
7349 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
7350
7351 * src/vcg.h: Correct misspellings.
7352
7353 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
7354
7355
7356 * src/getargs.c (getargs): Don't assume EOF == -1.
7357
7358 2002-12-09 Paul Eggert <eggert@twinsun.com>
7359
7360 Change identifier spellings to avoid collisions with names
7361 that are reserved by POSIX.
7362
7363 Don't use names ending in _t, since POSIX reserves them.
7364 For consistency, remove _e and _s endings -- they're weren't
7365 needed to remove ambiguity. All uses changed.
7366 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
7367 turn was just renamed from struniq_t.
7368 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
7369 which in turn was just renamed from struniq_processor_t.
7370 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
7371 in turn was renamed from hash_compare_struniq_t.
7372 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
7373 (state_list): Renamed from state_list_t.
7374 * src/assoc.h (assoc): Renamed from assoc_t.
7375 * src/conflicts.c (enum conflict_resolution): Renamed from
7376 enum conflict_resolution_e.
7377 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
7378 (rule_list): Renamed from rule_list_t.
7379 * src/getargs.h (enum trace): Renamed from enum trace_e.
7380 (enum report): Renamed from enum report_e.
7381 * src/gram.h (item_number): Renamed from item_number_t.
7382 (rule_number): Renamed from rule_number_t.
7383 (struct rule_s): Remove the "rule_s" part; not used.
7384 (rule): Renamed from rule_t.
7385 (rule_filter): Renamed from rule_filter_t.
7386 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
7387 (goto_list): Renamed from goto_list_t.
7388 * src/lalr.h (goto_number): Renamed from goto_number_t.
7389 * src/location.h (location): Renamed from location_t.
7390 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
7391 and moved here from:
7392 * src/muscle_tab.h (muscle_entry_t): here.
7393 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
7394 (rule_list): Renamed from rule_list_t.
7395 * src/print_graph.c (static_graph): Renamed from graph.
7396 * src/reader.h (braced_code): Renamed from braced_code_t.
7397 Remove brace_code_e tag.
7398 * src/relation.h (relation_node): Renamed from relation_node_t.
7399 (relation_nodes): Renamed from relation_nodes_t.
7400 (relation): Renamed from relation_t.
7401 * src/state.h (state_number): Renamed from state_number_t.
7402 (struct state): Renamed from struct state_s.
7403 (state): Renamed from state_t.
7404 (transitions): Renamed from transitions_t. Unused (and
7405 misspelled) transtion_s tag removed.
7406 (errs): Renamed from errs_t. Unused errs_s tag removed.
7407 (reductions): Renamed from reductions_t. Unused tag
7408 reductions_s removed.
7409 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
7410 (struct symbol_list): Renamed from struct symbol_list_s.
7411 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
7412 (struct symbol): Renamed from struct symbol_s.
7413 (symbol): Renamed from symbol_t.
7414 * src/tables.c (vector_number): Renamed from vector_number_t.
7415 (action_number): Renamed from action_t.
7416 * src/tables.h (base_number): Renamed from base_t.
7417 * src/vcg.h (enum color): Renamed from enum color_e.
7418 (enum textmode): Renamed from enum textmode_e.
7419 (enum shape): Renamed from enum shape_e.
7420 (struct colorentry): Renamed from struct colorentry_s.
7421 (struct classname): Renamed from struct classname_s.
7422 (struct infoname): Renamed from struct infoname_s.
7423 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
7424 (enum decision): Renamed from enum decision_e.
7425 (enum orientation): Renamed from enum orientation_e.
7426 (enum alignment): Renamed from enum alignment_e.
7427 (enum arrow_mode): Renamed from enum arrow_mode_e.
7428 (enum crossing_type): Renamed from enum crossing_type_e.
7429 (enum view): Renamed from enum view_e.
7430 (struct node): Renamed from struct node_s.
7431 (node): Renamed from node_t.
7432 (enum linestyle): Renamed from enum linestyle_e.
7433 (enum arrowstyle): Renamed from enum arrowstyle_e.
7434 (struct edge): Renamed from struct edge.
7435 (edge): Renamed from edge_t.
7436 (struct graph): Renamed from struct graph_s.
7437 (graph): Renamed from graph_t.
7438 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
7439 Rename value_t -> value.
7440 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
7441 value_t_as_yystype -> value_as_yystype.
7442
7443 Don't include <errno.h> in the mainstream code, since it
7444 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
7445 * lib/get-errno.c, lib/get-errno.h: New files.
7446 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
7447 get-errno.c.
7448 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
7449 * src/output.c (output_skeleton): Likewise.
7450 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
7451 instead of errno.
7452 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
7453 Likewise.
7454 (handle_action_dollar, handle_action_at): Likewise.
7455 * src/system.h: Do not include <errno.h>.
7456 (TAB_EXT): Renamed from EXT_TAB.
7457 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
7458
7459 Avoid str[a-z]*, since <string.h> reserves that name space.
7460 Change all instances of "struniq" in names to "uniqstr", and
7461 likewise for "STRUNIQ" and "UNIQSTR".
7462 * src/uniqstr.c: Renamed from src/struniq.c.
7463 * src/uniqstr.h: Renamed from src/struniq.h.
7464 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
7465 * src/files.c (strsuffix): Remove; unused.
7466 (concat2): Renamed from stringappend. Now static.
7467 * src/files.h (strsuffix, stringappend): Remove; unused.
7468 * src/parse-gram.y (<chars>): Renamed from <string>.
7469 (<uniqstr>): Renamed from <struniq>.
7470 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
7471 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
7472 (struct graph_s.expand): Renamed from struct graph_s.stretch.
7473 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
7474 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
7475 (N_EXPAND): Renamed from N_STRETCH.
7476
7477 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
7478 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
7479 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
7480 Remove; unused.
7481 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
7482 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
7483 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
7484 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
7485 (BASE_MAXIMUM): Renamed from BASE_MAX.
7486 (BASE_MINIMUM): Renamed from BASE_MIN.
7487 (ACTION_MAX): Remove; unused.
7488 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
7489 Unnecessary casts removed from above defines.
7490
7491
7492 Fix misspelling in names.
7493 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
7494 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
7495 G_NODE_ALIGNEMENT.
7496
7497
7498 * lib/timevar.c (timevar_report): Renamed from time_report,
7499 for consistency with other names.
7500 * lib/timevar.h (timevar_report): New decl.
7501 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
7502
7503
7504 Sort include-file uses.
7505
7506 Reorder all include files under src to be in the order "system.h".
7507 then the ../lib include files in angle brackets (alphabetized),
7508 then the . include files in double-quotes (alphabetized). Fix
7509 dependency breakages encountered in this process, as follows:
7510 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
7511 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
7512 * src/state.h: Include "symtab.h".
7513
7514 2002-12-08 Paul Eggert <eggert@twinsun.com>
7515
7516 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
7517 since this causes problems when __file__ contains character
7518 sequences like "@" that are treated specially by src/scan-skel.l.
7519 Instead, just use the file's basename. This fixes the bug
7520 reported by Martin Mokrejs in
7521 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
7522
7523 2002-12-06 Paul Eggert <eggert@twinsun.com>
7524
7525 Add support for rules that do not have trailing semicolons, as
7526 POSIX requires. Improve the quality of locations in Bison
7527 diagnostics.
7528
7529 * src/location.c: Include <quotearg.h>.
7530 (empty_location): Now const.
7531 (location_print): New function. Follow the recommendation of the
7532 GNU Coding Standards for locations that span file boundaries.
7533 * src/location.h: Do not include <quotearg.h>; no longer needed.
7534 (boundary): New type.
7535 (location_t): Use it. This allows locations to span file boundaries.
7536 All member uses changed: file -> start.file or end.file (as needed),
7537 first_line -> start.line, first_column -> start.column,
7538 last_line -> end.line, last_column -> end.column.
7539 (equal_boundaries): New function.
7540 (LOCATION_RESET, LOCATION_STEP): Remove.
7541 (LOCATION_PRINT): Remove. All callers changed to use location_print.
7542 (empty_location): Now const.
7543 (location_print): New decl.
7544 * src/parse-gram.y (lloc_default): New function, which handles
7545 empty locations more accurately.
7546 (YYLLOC_DEFAULT): Use it.
7547 (%token COLON): Remove.
7548 (%token ID_COLON): New token.
7549 (rules): Use it.
7550 (declarations, rules): Remove trailing semicolon.
7551 (declaration, rules_or_grammar_declaration):
7552 Allow empty (";") declaration.
7553 (symbol_def): Remove empty actions; no longer needed.
7554 (rules_or_grammar_declaration): Remove trailing semicolon.
7555 (semi_colon.opt): Remove.
7556 * src/reader.h: Include location.h.
7557 (scanner_cursor): New decl.
7558 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
7559 rolling our own.
7560 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
7561 of *loc.
7562 (STEP): Remove. No longer needed, now that adjust_location does
7563 the work. All uses removed.
7564 (scanner_cursor): New var.
7565 (adjust_location): Renamed from extend_location. It now sets
7566 *loc and adjusts the scanner cursor. All uses changed.
7567 Don't bother testing for CR.
7568 (handle_syncline): Remove location arg; now updates scanner cursor.
7569 All callers changed.
7570 (unexpected_end_of_file): Now accepts start boundary of token or
7571 comment, not location. All callers changed. Update scanner cursor,
7572 not the location.
7573 (SC_AFTER_IDENTIFIER): New state.
7574 (context_state): Renamed from c_context. All uses changed.
7575 (id_loc, code_start, token_start): New local vars.
7576 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
7577 processing of Yacc white space and equivalents here.
7578 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
7579 instead of returning ID immediately, since we need to search for
7580 a subsequent colon.
7581 (<INITIAL>"'", "\""): Save token_start.
7582 (<INITIAL>"%{", "{", "%%"): Save code_start.
7583 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
7584 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
7585 BEGIN context_state at end, not INITIAL.
7586 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
7587 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
7588 Return correct token start.
7589 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
7590 the start of a character, string or multiline comment is found.
7591 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
7592 Reduction): Adjust reported locations to match the more-precise
7593 results now expected.
7594 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
7595 * tests/reduce.at (Useless Rules, Reduced Automaton,
7596 Underivable Rules): Likewise.
7597 * tests/regression.at (Invalid inputs): No longer `expecting ";"
7598 or "|"' now that so many other tokens are allowed by the new grammar.
7599
7600 * src/complain.h (current_file): Remove duplicate decl;
7601 current_file is now owned by files.h.
7602 * src/complain.c, src/scan-gram.l: Include files.h.
7603
7604 2002-12-06 Paul Eggert <eggert@twinsun.com>
7605
7606 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
7607 promotes to int; it might be unsigned int.
7608 * data/yacc.c (yy_reduce_print): Likewise.
7609
7610 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
7611 be #defined in the prologue, not in the Bison declarations.
7612 This fixes Debian Bug 102878, reported by Shaul Karl.
7613
7614 2002-12-02 Paul Eggert <eggert@twinsun.com>
7615
7616 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
7617 * lib/strtoul.c: New file, from gnulib.
7618 This fixes a porting bug reported by Peter Klein in
7619 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
7620
7621 2002-11-30 Paul Eggert <eggert@twinsun.com>
7622
7623 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
7624 and put only a forward declaration in the prologue. This is for
7625 consistency with the other scanner helper functions.
7626
7627 Type clashes now generate warnings, not errors, since it
7628 appears that POSIX may allow some grammars with type clashes.
7629 * src/reader.c (grammar_current_rule_check): Warn about
7630 type clashes instead of complaining.
7631 * tests/input.at (Type Clashes): Expect warnings, not complaints.
7632
7633 Add Yacc library, since POSIX requires it.
7634 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
7635 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
7636 * lib/main.c, lib/yyerror.c: New files.
7637
7638 gram_error can be static; it need not be extern.
7639 * src/reader.h (gram_error): Remove decl.
7640 * src/parse-gram.y (gram_error): Now static. Add static decl.
7641 (print_token_value): Omit parameter names from forward decl,
7642 for consistency.
7643
7644 2002-11-29 Paul Eggert <eggert@twinsun.com>
7645
7646 * doc/bison.texinfo: Emphasize that yylex and yyerror must
7647 be declared before being used. E.g., one should typically
7648 declare them in the prologue. Use GNU coding style in examples.
7649 Put "const" consistently after the type it modifies. Mention
7650 that C99 supports "inline". Mention that yyerror traditionally
7651 returns "int".
7652
7653 %parse-param and %lex-param now take just one argument, the
7654 declaration; the argument name is deduced from the declaration.
7655
7656 * doc/bison.texinfo (Parser Function, Pure Calling, Error
7657 Reporting, Table of Symbols): Document this.
7658 * src/parse-gram.y (add_param): New function.
7659 (COMMA): Remove.
7660 (declaration): Implement new rule for %parse-param and %lex-param.
7661 * src/scan-gram.l: "," now elicits a warning, rather than being
7662 a token; this is more compatible with byacc.
7663 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
7664
7665 2002-11-27 Paul Eggert <eggert@twinsun.com>
7666
7667 Rename identifiers to avoid real and potential collisions.
7668
7669 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
7670 to avoid collision with lex macro described by Bruce Lilly in
7671 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
7672 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
7673 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
7674 * src/parse-gram.y (print_token_value): Renamed from yyprint.
7675 All uses changed.
7676 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
7677 The name "yycontrol" violates the name space rules, and this stuff
7678 wasn't being used anyway.
7679 (input): Remove action; this stuff wasn't being used.
7680 (gram_error): Rename local variable yylloc -> loc.
7681 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
7682 (YY_DECL): Don't use "yy" at start of local variables.
7683 All uses changed, e.g., yylloc -> loc.
7684 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
7685 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
7686 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
7687 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
7688
7689 * src/parse-gram.y (gram_error): loc is now const *.
7690 * src/reader.h (gram_error): Likewise.
7691
7692 2002-11-24 Paul Eggert <eggert@twinsun.com>
7693
7694 Version 1.75c.
7695
7696 * tests/actions.at (Actions after errors): Use an output format
7697 more similar to that of the Printers and Destructors test.
7698 Test the position of the ';' token too.
7699 (Printers and Destructors): Likewise.
7700 (Printers and Destructors: %glr-parser): Remove for now, to avoid
7701 unnecessarily alarming people when the test fails.
7702
7703 * data/yacc.c (yyerrlab1): Move this label down, so that the
7704 parser does not discard the lookahead token if the user code
7705 invokes YYERROR. This change is required for POSIX conformance.
7706
7707 * lib/error.c: Sync with gnulib.
7708
7709 2002-11-22 Paul Eggert <eggert@twinsun.com>
7710
7711 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
7712 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
7713 * lib/xmalloc.c: Likewise.
7714
7715 2002-11-20 Paul Eggert <eggert@twinsun.com>
7716
7717 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
7718
7719 2002-11-20 Paul Eggert <eggert@twinsun.com>
7720
7721 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
7722 should use `if (! x) abort ();' rather than `assert (x);', and
7723 anyway it's one less thing to worry about configuring.
7724
7725 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
7726 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
7727 and replace all instances of assert with abort.
7728 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
7729 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
7730
7731 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
7732 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
7733 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
7734 hash_find_entry, hash_rehash, hash_insert): Likewise.
7735 * src/conflicts.c (resolve_sr_conflict): Likewise.
7736 * src/lalr.c (set_goto_map, map_goto): Likewise.
7737 * src/nullable.c (nullable_compute): Likewise.
7738 * src/output.c (prepare_rules, token_definitions_output): Likewise.
7739 * src/reader.c (packgram, reader): Likewise.
7740 * src/state.c (state_new, state_free, state_transitions_set,
7741 state_reduction_find): Likewise.
7742 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
7743 symbol_pack): Likewise.
7744 * src/tables.c (conflict_row, pack_vector): Likewise.
7745 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
7746 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
7747 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
7748 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
7749
7750 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
7751 (ARGMATCH_CONSTRAINT): New macro.
7752 (ARGMATCH_ASSERT): Use it.
7753
7754 * src/system.h (verify): New macro.
7755 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
7756 rather than assert.
7757 * src/tables.c (tables_generate): Likewise.
7758
7759 * src/struniq.c (struniq_assert): Now returns void, and aborts
7760 if the assertion is false.
7761 (struniq_assert_p): Remove.
7762 * src/struniq.h: Likewise.
7763
7764 2002-11-18 Paul Eggert <eggert@twinsun.com>
7765
7766 * data/glr.c (yygetLRActions): Replace `yyindex' with
7767 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
7768 This fixes the regression with Sun ONE Studio 7 cc that I reported in
7769 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
7770
7771 2002-11-18 Akim Demaille <akim@epita.fr>
7772
7773 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
7774 space.
7775 From Tim Van Holder.
7776
7777 2002-11-17 Paul Eggert <eggert@twinsun.com>
7778
7779 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
7780 to "SyntaxError" for consistency with my 2002-11-15 change.
7781
7782 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
7783 not define to {}, since this breaks the common use of `YYDPRINTF
7784 ((...));' if a single statement is desired (e.g. before `else').
7785 Work around GCC warnings by surrounding corresponding calls with
7786 {} if needed.
7787 (yyhasResolvedValue): Remove unused function.
7788 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
7789 loop body.
7790 (yyreportSyntaxError): Renamed from yyreportParseError.
7791 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
7792 All uses changed.
7793 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
7794 extern when possible. Remove unused initializations.
7795
7796 2002-11-16 Akim Demaille <akim@epita.fr>
7797
7798 Augment the similarity between GLR and LALR traces.
7799
7800 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
7801 (YY_REDUCE_PRINT): New.
7802 (yyparse): Use them.
7803 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
7804 YYDPRINT here.
7805 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
7806 state reached after the reduction/recovery, since...
7807 (yyparse, yyprocessOneStack): Report the state we are entering in.
7808
7809 2002-11-16 Akim Demaille <akim@epita.fr>
7810
7811 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
7812 Add support for --trace=skeleton.
7813 * src/scan-skel.l: %option debug.
7814 Scan strings of non-@ or \n instead of character by character.
7815 (scan_skel): Handle trace_skeleton.
7816 (QPUTS): New.
7817 (@output_parser_name@, @output_header_name@): ``Restore'' their
7818 support (used to be M4 macros).
7819 * data/yacc.c: Quote larger chunks, a la glr.c.
7820 * data/lalr1.cc: Likewise.
7821 The header guards are no longer available, so use some other
7822 string than `YYLSP_NEEDED'.
7823
7824 2002-11-16 Akim Demaille <akim@epita.fr>
7825
7826 Make the ``Printers and Destructors'' test more verbose, taking
7827 `yacc.c''s behavior as (possibly wrong) reference.
7828
7829 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
7830 instead of fprint on stdout.
7831 Set and report the last_line of the symbols.
7832 Consistently display values and locations.
7833
7834 2002-11-16 Paul Eggert <eggert@twinsun.com>
7835
7836 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
7837
7838 2002-11-15 Paul Eggert <eggert@twinsun.com>
7839
7840 * tests/actions.at (Actions after errors): New test case.
7841
7842 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
7843 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
7844 tests/action.at, tests/calc.at, tests/conflicts.at,
7845 tests/cxx-type.at, tests/regression.at:
7846 "parse error" -> "syntax error" for POSIX compatibility.
7847 "parsing stack overflow..." -> "parser stack overflow" so
7848 that code matches Bison documentation.
7849
7850 2002-11-15 Akim Demaille <akim@epita.fr>
7851
7852 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
7853 take two BRACED_CODE, not two string_content.
7854 Free the scanner's obstack when we are done.
7855 (code_content): New.
7856 * tests/calc.at: Adjust.
7857 * doc/bison.texinfo: Adjust.
7858 Also, make sure to include the `,' for these declarations.
7859
7860 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
7861
7862 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
7863 definition; avoids potential autoreconf problems.
7864
7865 2002-11-15 Akim Demaille <akim@epita.fr>
7866
7867 Always check the value returned by yyparse.
7868
7869 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
7870 returned by yyparse.
7871 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
7872 Adjust calls.
7873 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
7874 returned by yyparse.
7875
7876 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7877
7878 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
7879 on input.at test.
7880
7881 2002-11-14 Paul Eggert <eggert@twinsun.com>
7882
7883 * src/output.c (output_skeleton): Call xfopen instead of
7884 duplicating xfopen's body.
7885
7886 Fix bugs reported by Nelson H. F. Beebe in
7887 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
7888
7889 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
7890 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
7891 Group compiler. Instead, use "$CC -E bar.c". Include the .h
7892 file twice in the grammar, as an extra check.
7893
7894 * tests/input.at (Torturing the Scanner): Surround the
7895 backslash-newline tests with "#if 0", to make it less likely that
7896 we'll run into compiler bugs. Bring back solitary \ inside
7897 comment, but add a closing comment to work around HP C bug. Don't
7898 test backslash-newline in C character constant.
7899
7900 2002-11-14 Akim Demaille <akim@epita.fr>
7901
7902 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
7903 status of the compiler.
7904 Calling `exit 1' is no longer needed.
7905 Reported by Nelson H. F. Beebe.
7906
7907 2002-11-14 Akim Demaille <akim@epita.fr>
7908
7909 * tests/atlocal.in (CPPFLAGS): We have config.h.
7910 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
7911 New.
7912 * tests/actions.at, tests/calc.at, tests/conflicts.at,
7913 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
7914 * tests/regression.at, tests/torture.at: Use them for all the
7915 grammars that are to be compiled.
7916 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
7917 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
7918 * doc/bison.texinfo (GLR Parsers): Document `inline'.
7919
7920 2002-11-14 Akim Demaille <akim@epita.fr>
7921
7922 * doc/bison.texinfo: Various formatting changes (alignments in
7923 samples, additional @group/@end group, GCS in samples.
7924 Use @deffn instead of simple @table to define the directives,
7925 macros, variables etc.
7926
7927 2002-11-13 Paul Eggert <eggert@twinsun.com>
7928
7929 Fix some bugs reported by Albert Chin-A-Young in
7930 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
7931
7932 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
7933 -o c"; the HP C compiler chatters during compilation.
7934 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
7935 * tests/headers.at (export YYLTYPE): Likewise.
7936
7937 * tests/input.at (Torturing the Scanner): Remove lines containing
7938 solitary backslashes, as they tickle a bug in the HP C compiler.
7939
7940 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
7941 comments, since they're not portable. Use GNU coding style.
7942
7943 2002-11-13 Akim Demaille <akim@epita.fr>
7944
7945 * data/yacc.c: Leave bigger chunks of quoted text.
7946 (YYDSYMPRINTF): New.
7947 Use it to report symbol activities.
7948 * data/glr.c (YYDSYMPRINTF): New.
7949 Use it.
7950
7951 2002-11-12 Paul Eggert <eggert@twinsun.com>
7952
7953 Version 1.75b.
7954
7955 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
7956 (yyglrReduce): Return yyok, not 0.
7957 This should avoid the enumerated-type warnings reported
7958 by Nelson H. F. Beebe in
7959 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
7960
7961 * lib/bbitset.h (BITSET_INLINE): Remove.
7962 * lib/bitset.h [! BITSET_INLINE]: Remove.
7963 (bitset_set, bitset_reset, bitset_test): Rename local vars
7964 to avoid shadowing warnings by GCC.
7965
7966 * data/glr.c (inline): Remove #define. It's the user's
7967 responsibility to #define it away, just like 'const'.
7968 This fixes one of the bugs reported by Nelson H. F. Beebe in
7969 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
7970
7971 * Makefile.maint (po-check): Scan .l and .y files instead of the
7972 .c and the .h files that they generate. This fixes the bug
7973 reported by Tim Van Holder in:
7974 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
7975 Look for N_ as well as for _. Try to avoid matching #define for
7976 N_ and _.
7977 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
7978 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
7979 * src/scan-gram.l: Revamp regular expressions so that " and '
7980 do not confuse xgettext.
7981
7982 * src/struniq.h (struniq_new): Do not declare the return type
7983 to be 'const'; this violates the C standard.
7984 * src/struniq.c (struniq_new): Likewise.
7985
7986 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
7987
7988 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
7989 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
7990 linker.
7991
7992 2002-11-12 Akim Demaille <akim@epita.fr>
7993
7994 * Makefile.maint: Sync with Autoconf:
7995 (local_updates): New.
7996
7997 2002-11-12 Akim Demaille <akim@epita.fr>
7998
7999 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
8000
8001 2002-11-12 Akim Demaille <akim@epita.fr>
8002
8003 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
8004 locations.
8005
8006 2002-11-12 Akim Demaille <akim@epita.fr>
8007
8008 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
8009 not yyvalue.
8010
8011 2002-11-12 Akim Demaille <akim@epita.fr>
8012
8013 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
8014 Use it to test the GLR parser.
8015
8016 2002-11-12 Akim Demaille <akim@epita.fr>
8017
8018 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
8019 defines it.
8020 * data/glr.c (yystos): New.
8021 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
8022 (YYDSYMPRINT): New.
8023 (yyval): Don't define it, it is handled via M4.
8024 (yyrecoverParseError): Free verbosely the discarded symbols.
8025 * data/yacc.c (yysymprint): Remove, rather...
8026 (b4_yysymprint_generate): invoke.
8027 * data/c.m4 (b4_yysymprint_generate): New.
8028 Accept pointers as arguments, as opposed to the version from
8029 yacc.c.
8030 (b4_yydestruct_generate): Likewise.
8031 * tests/cations.at (Printers and Destructors): Use Bison directives
8032 instead of CPP macros.
8033 Don't rely on internal details.
8034
8035 2002-11-12 Akim Demaille <akim@epita.fr>
8036
8037 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
8038 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
8039 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
8040 it against YYEMPTY and so forth), work on yytoken (i.e., set
8041 it to YYEMPTY etc.).
8042 (yydestruct): Replace with a b4_yydestruct_generate invocation.
8043 (b4_symbol_actions): Remove.
8044 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
8045 for 0, end-of-input.
8046
8047 2002-11-12 Akim Demaille <akim@epita.fr>
8048
8049 * doc/bison.texinfo (Destructor Decl): New.
8050
8051 2002-11-12 Akim Demaille <akim@epita.fr>
8052
8053 * src/tables.c (tables_generate): Use free for pointers that
8054 cannot be NULL, not XFREE.
8055 (pack_vector): Use assert, not fatal, for bound violations.
8056 * src/state.c (state_new): Likewise.
8057 * src/reader.c (reader): Likewise.
8058 * src/lalr.c (set_goto_map): Likewise.
8059 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
8060 the file name.
8061
8062 2002-11-12 Akim Demaille <akim@epita.fr>
8063
8064 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
8065 Restore.
8066 * src/scan-gram.l (last_string): Is global to the file, not to
8067 yylex.
8068 * src/parse-gram.y (input): Don't append the epilogue here,
8069 (epilogue.opt): do it here, and free the scanner's obstack.
8070 * src/reader.c (epilogue_set): Rename as...
8071 (epilogue_augment): this.
8072 * data/c.m4 (b4_epilogue): Defaults to empty.
8073
8074 2002-11-12 Akim Demaille <akim@epita.fr>
8075
8076 * src/getargs.c (long_options): Remove duplicates.
8077 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
8078 Remove.
8079 * doc/bison.rnh: Remove.
8080 * doc/bison.texinfo (VMS Invocation): Remove.
8081
8082 2002-11-12 Akim Demaille <akim@epita.fr>
8083
8084 * src/struniq.h, src/struniq.c (struniq_t): Is const.
8085 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
8086
8087 Use struniq for symbols.
8088
8089 * src/symtab.h (symbol_t): The tag member is a struniq.
8090 (symbol_type_set): Adjust.
8091 * src/symtab.c (symbol_new): Takes a struniq.
8092 (symbol_free): Don't free the tag member.
8093 (hash_compare_symbol_t, hash_symbol_t): Rename as...
8094 (hash_compare_symbol, hash_symbol): these.
8095 Use the fact that tags as struniqs.
8096 (symbol_get): Use struniq_new.
8097 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
8098 Returns a strniq.
8099 * src/reader.h (merger_list, grammar_currentmerge_set): The name
8100 and type members are struniqs.
8101 * src/reader.c (get_merge_function)
8102 (grammar_current_rule_merge_set): Adjust.
8103 (TYPE, current_type): Are struniq.
8104
8105 Use struniq for file names.
8106
8107 * src/files.h, src/files.c (infile): Split into...
8108 (grammar_file, current_file): these.
8109 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
8110 * src/reduce.c (reduce_print): Likewise.
8111 * src/getargs.c (getargs): Likewise.
8112 * src/complain.h, src/complain.c: Likewise.
8113 * src/main.c (main): Call struniqs_new early enough to use it for
8114 file names.
8115 Don't free the input file name.
8116
8117 2002-11-12 Akim Demaille <akim@epita.fr>
8118
8119 * src/symtab.c (symbol_free): Remove dead deactivated code:
8120 type_name are properly removed.
8121 Don't use XFREE to free items that cannot be NULL.
8122 * src/struniq.h, src/struniq.c: New.
8123 * src/main.c (main): Initialize/free struniqs.
8124 * src/parse-gram.y (%union): Add astruniq member.
8125 (yyprint): Adjust.
8126 * src/scan-gram.l (<{tag}>): Return a struniq.
8127 Free the obstack bit that used to store it.
8128 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
8129
8130 2002-11-11 Paul Eggert <eggert@twinsun.com>
8131
8132 Revamp to fix many (but not all) of the C- and M4-related quoting
8133 problems. Among other things, this fixes the Bison bug reported
8134 by Jan Hubicka when processing the Bash grammar; see:
8135 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
8136
8137 Use new @ escapes consistently. Represent brackets with @{ and @}
8138 rather than @<:@ and @:>@, since this works a bit better with dumb
8139 editors like vi. Represent @ with @@, since @ is now consistently
8140 an escape. Use @oline@ and @ofile@ rather than __oline__ and
8141 __ofile__, to avoid unexpected expansions. Similarly, use @output
8142 rather than #output.
8143
8144 * data/c.m4 (b4_copyright): Omit file name from comment, since
8145 the file name could contain "*/".
8146 (b4_synclines_flag): Don't quote the 2nd argument; it should already
8147 be quoted. All uses changed.
8148
8149 * data/glr.c: Use new @ escapes consistently.
8150 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
8151 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
8152 Remove, since they couldn't handle arbitrary characters in file
8153 names.
8154 * data/lalr1.cc: Likewise.
8155 * data/yacc.c: Likewise.
8156
8157 * src/files.c (output_infix): Remove; all uses removed.
8158 * src/files.h: Likewise.
8159
8160 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
8161 mishandled funny characters in file names, and anyway it isn't
8162 needed any more.
8163 * data/yacc.c: Likewise.
8164 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
8165
8166 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
8167 * data/yacc.c: Likewise.
8168
8169 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
8170 strings now.
8171 (muscle_init): Quote filename as a C string.
8172 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
8173 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
8174 * src/output.c (escaped_file_name_output): New function.
8175 (prepare_symbols): Quote tokens for M4.
8176 (prepare): Don't insert output_infix, output_prefix,
8177 output_parser_name, output_header_name; this is now down by scan-skel.
8178 Insert skeleton as a C string.
8179
8180 * src/output.c (user_actions_output, symbol_destructors_output,
8181 symbol_printers_output): Quote filenames for C and M4.
8182 * src/reader.c (prologue_augment, epilogue_set): Likewise.
8183
8184 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
8185 escapes other than \\ and \'; this simplifies the code.
8186 (<SC_STRING>): Likewise, for \\ and \".
8187 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
8188 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
8189 Use new escapes @{ and @} for [ and ].
8190
8191 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
8192 them with auto vars.
8193 Switch to new escape scheme, where @ is the escape character uniformly.
8194 Abort if a stray escape character is found. Avoid unbounded input
8195 buffer when parsing non-escaped text.
8196
8197 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
8198 __oline__, #output, $@, and @{ do not have unintended meanings.
8199
8200 2002-11-09 Paul Eggert <eggert@twinsun.com>
8201
8202 Fix the test failure due to GCC warnings described in
8203 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
8204 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
8205 evaluate to 0 if it's impossible for NINF to be in the respective
8206 table.
8207 (yygetLRActions, yyrecoverParseError): Use them.
8208
8209 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
8210 counted in the token inserted at end of file. Now takes
8211 location_t *, not location_t, so that the location can be
8212 adjusted. All uses changed.
8213
8214 * tests/regression.at (Invalid inputs): Adjust wording in
8215 diagnostic to match the new behavior.
8216
8217 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
8218 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
8219 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
8220 abort ();'. This reduces the runtime of the "Many lookaheads"
8221 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
8222 GCC 3.2.
8223
8224 2002-11-07 Paul Eggert <eggert@twinsun.com>
8225
8226 * src/parse-gram.y (CHARACTER): Remove unused token.
8227 All uses removed.
8228
8229 * src/scan-gram.l: Remove stack option. We no longer use the
8230 stack, since the stack was never deeper than 1; instead, use the
8231 new auto var c_context to record the stacked value.
8232
8233 Remove nounput option. At an unexpected end of file, we now unput
8234 the minimal input necessary to end cleanly; this simplifies the
8235 code.
8236
8237 Avoid unbounded token sizes where this is easy.
8238
8239 (unexpected_end_of_file): New function.
8240 Use it to systematize the error message on unexpected EOF.
8241 (last-string): Now auto, not static.
8242 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
8243 (scanner_last_string_free): Remove; not used.
8244 (percent_percent_count): Move decl to just before use.
8245 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
8246 not the (never otherwised-used) CHARACTER.
8247
8248 2002-11-07 Akim Demaille <akim@epita.fr>
8249
8250 Let yyerror always receive the msg as last argument, so that
8251 yyerror can be variadic.
8252
8253 * data/yacc.c (b4_yyerror_args): New.
8254 Use it when calling yyerror.
8255 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
8256 Use it when calling yyerror.
8257 * doc/bison.texinfo (Error Reporting): Adjust.
8258 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
8259 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
8260
8261 2002-11-06 Akim Demaille <akim@epita.fr>
8262
8263 #line should have quoted strings.
8264 Ideally, this should be done by m4_quotearg.
8265
8266 * src/scan-skel.l: Include quotearg.h.
8267 Quote __ofile__.
8268 * src/output.c (symbol_printers_output)
8269 (symbol_destructors_output): Quote the file name.
8270
8271 2002-11-06 Akim Demaille <akim@epita.fr>
8272
8273 * tests/regression.at (Invalid inputs): Adjust to the recent
8274 messages.
8275
8276 2002-11-06 Akim Demaille <akim@epita.fr>
8277
8278 Restore --no-lines.
8279 Reported by Jim Kent.
8280
8281 * data/c.m4 (b4_syncline): New.
8282 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
8283 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
8284 * src/output.c (user_actions_output): Likewise.
8285 (prepare): Define 'b4_synclines_flag'.
8286 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
8287
8288 2002-11-06 Akim Demaille <akim@epita.fr>
8289
8290 * src/main.c (main): Free `infile'.
8291 * src/scan-gram.l (handle_syncline): New.
8292 Recognize `#line'.
8293 * src/output.c (user_actions_output, symbol_destructors_output)
8294 (symbol_printers_output): Use the location's file name, not
8295 infile.
8296 * src/reader.c (prologue_augment, epilogue_set): Likewise.
8297
8298 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8299
8300 * src/tables.c (matching_state): Don't allow states to match if
8301 either has GLR conflict entries.
8302
8303 2002-11-05 Paul Eggert <eggert@twinsun.com>
8304
8305 * src/scan-gram.l: Use more accurate diagnostics, e.g.
8306 "integer out of range" rather than "invalid value".
8307 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
8308 accordingly.
8309
8310 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
8311 Also, remove one static variable in the scanner.
8312
8313 * src/scan-gram.l (braces_level): Now auto, not static.
8314 Initialize to zero if the compiler is being picky.
8315 (INITIAL): Clear braces_level instead of incrementing it.
8316 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
8317 as POSIX 1003.1-2001 requires.
8318 * src/system.h (IF_LINT): New macro, taken from coreutils.
8319 * configure.ac: Define "lint" if --enable-gcc-warnings.
8320
8321 2002-11-05 Akim Demaille <akim@epita.fr>
8322
8323 * src/scan-gram.l: When it starts with `%', complain about the
8324 whole directive, not just that `invalid character: %'.
8325
8326 2002-11-04 Akim Demaille <akim@epita.fr>
8327
8328 * Makefile.maint: Update from Autoconf.
8329 (update, cvs-update, po-update, do-po-update): New.
8330
8331 2002-11-04 Akim Demaille <akim@epita.fr>
8332
8333 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
8334 and yyerror.
8335 Have yyerror `use' its arguments.
8336 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
8337 returns true when location & yacc & pure & parse-param.
8338 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
8339
8340 2002-11-04 Akim Demaille <akim@epita.fr>
8341
8342 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
8343 clashes.
8344 * src/scan-gram.l: Use [\'] instead of ['] to pacify
8345 font-lock-mode.
8346 Use complain_at.
8347 Use quote, not quote_n since LOCATION_PRINT no longer uses the
8348 slot 0.
8349
8350 2002-11-03 Paul Eggert <eggert@twinsun.com>
8351
8352 * src/reader.c (get_merge_function, grammar_current_rule_check):
8353 Use consistent diagnostics for reporting type name clashes.
8354 Quote the types with <>, for consistency with Yacc.
8355 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
8356
8357 2002-11-03 Akim Demaille <akim@epita.fr>
8358
8359 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
8360 New.
8361 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
8362 (b4_parse_param): Remove.
8363 Use b4_identification.
8364 Propagate b4_pure_args where needed to pass them to yyerror.
8365 * data/glr.m4 (b4_parse_param): Remove.
8366 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
8367 (b4_lpure_formals): New.
8368 Use b4_identification.
8369 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
8370 b4_user_formals and b4_user_args.
8371 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
8372 (yyreportAmbiguity): When using a pure parser, also need
8373 the location, and the parse-params.
8374 Adjust callers.
8375 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
8376 When using a pure parser, also need the parse-params.
8377 Adjust callers.
8378 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
8379 (%pure-parser + %parse-param) LALR and GLR parsers.
8380 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
8381 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
8382 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
8383 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
8384 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
8385 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
8386 * doc/bison.texinfo: Untabify the whole file.
8387 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
8388 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
8389 (Error Reporting): Adjust to these new directives.
8390 Document %error-verbose, deprecate YYERROR_VERBOSE.
8391
8392 2002-11-03 Akim Demaille <akim@epita.fr>
8393
8394 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
8395 AT_CHECK_CALC_GLR invocations to use % directives, instead of
8396 command line options.
8397 * tests/cxx-type.at: Formatting changes.
8398
8399 2002-11-03 Paul Eggert <eggert@twinsun.com>
8400
8401 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
8402 to count columns correctly, and to check for invalid inputs.
8403
8404 Use mbsnwidth to count columns correctly. Account for tabs, too.
8405 Include mbswidth.h.
8406 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
8407 (extend_location): New function.
8408 (YY_LINES): Remove.
8409
8410 Handle CRLF in C code rather than in Lex code.
8411 (YY_INPUT): New macro.
8412 (no_cr_read): New function.
8413
8414 Scan UCNs, even though we don't fully handle them yet.
8415 (convert_ucn_to_byte): New function.
8416
8417 Handle backslash-newline correctly in C code.
8418 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
8419 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
8420 all uses changed.
8421 (tag, splice): New EREs. Do not allow NUL or newline in tags.
8422 Use {splice} wherever C allows backslash-newline.
8423 YY_STEP after space, newline, vertical-tab.
8424 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
8425
8426 (letter, id): Don't assume ASCII; e.g., spell out a-z.
8427
8428 ({int}, handle_action_dollar, handle_action_at): Check for integer
8429 overflow.
8430
8431 (YY_STEP): Omit trailing semicolon, so that it's more like C.
8432
8433 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
8434 as well as \000. Check for UCHAR_MAX, not 255.
8435 Allow \x with an arbitrary positive number of digits, as in C.
8436 Check for overflow here.
8437 Allow \? and UCNs, for compatibility with C.
8438
8439 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
8440 with quote slot used by complain_at.
8441
8442 * tests/input.at: Add tests for backslash-newline, m4 quotes
8443 in symbols, long literals, and funny escapes in strings.
8444
8445 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
8446 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
8447 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
8448 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
8449 * m4/mbswidth.m4: New file, from GNU coreutils.
8450
8451 * doc/bison.texinfo (Grammar Outline): Document // comments.
8452 (Symbols): Document that trigraphs have no special meaning in Bison,
8453 nor is backslash-newline allowed.
8454 (Actions): Document that trigraphs have no special meaning.
8455
8456 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
8457 no longer used.
8458
8459 2002-11-02 Paul Eggert <eggert@twinsun.com>
8460
8461 * src/reader.c: Don't include quote.h; not needed.
8462 (get_merge_function): Reword warning to be consistent with
8463 type clash diagnostic in grammar_current_rule_check.
8464
8465 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
8466 bug in trigraph handling.
8467
8468 * src/output.c (prepare_symbols): When printing token names,
8469 escape "[" as "@<:@" and likewise for "]".
8470
8471 * src/system.h (errno): Remove declaration, as we are now
8472 assuming C89 or better, and C89 guarantees errno.
8473
8474 2002-10-30 Paul Eggert <eggert@twinsun.com>
8475
8476 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
8477 Check for close failures.
8478 * src/files.h (xfclose): Return void, not int, since it always
8479 returned zero.
8480 * src/files.c (xfclose): Likewise. Report I/O error if ferror
8481 indicates one.
8482 * src/output.c (output_skeleton): Use xfclose rather than fclose
8483 and ferror. xfclose now checks ferror.
8484
8485 * data/glr.c (YYLEFTMOST_STATE): Remove.
8486 (yyreportTree): Use a stack-based leftmost state. This avoids
8487 our continuing battles with bogus warnings about initializers.
8488
8489 2002-10-30 Akim Demaille <akim@epita.fr>
8490
8491 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
8492 #if.
8493
8494 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8495
8496 * tests/glr-regr1.at: New test for reported regressions.
8497 * tests/testsuite.at: Add glr-regr1.at test.
8498 * tests/Makefile.am: Add glr-regr1.at test.
8499
8500 2002-10-24 Paul Eggert <eggert@twinsun.com>
8501
8502 Version 1.75a.
8503
8504 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
8505 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
8506 we use malloc. Don't assume 'A' through 'Z' are contiguous.
8507 Don't assume strdup exists; POSIX says its an XSI extension.
8508 Check for buffer overflow on input.
8509
8510 2002-10-24 Akim Demaille <akim@epita.fr>
8511
8512 * src/output.c (output_skeleton): Don't disable M4sugar comments
8513 too soon: it results in comments being expanded.
8514 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
8515 first output.
8516
8517 2002-10-24 Akim Demaille <akim@epita.fr>
8518
8519 * data/yacc.c (m4_int_type): New.
8520 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
8521 char' as only yacc.c wants K&R portability.
8522 * data/glr.c (yysigned_char): Remove.
8523 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
8524 Reported by Quoc Peyrot.
8525
8526 2002-10-23 Paul Eggert <eggert@twinsun.com>
8527
8528 * src/main.c (main): With --trace=time, report times even if a
8529 non-fatal error occurs. Formerly, the times were reported in some
8530 such cases but not in others.
8531 * src/reader.c (reader): Just return if a complaint has been issued,
8532 instead of exiting, so that 'main' can report times.
8533
8534 2002-10-22 Akim Demaille <akim@epita.fr>
8535
8536 * src/system.h: Include sys/types.
8537 Reported by Bert Deknuydt.
8538
8539 2002-10-23 Paul Eggert <eggert@twinsun.com>
8540
8541 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
8542 Suggested by Art Haas.
8543
8544 2002-10-22 Paul Eggert <eggert@twinsun.com>
8545
8546 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
8547 decl; not needed any more.
8548 * src/main.c (main): Use return to exit, undoing yesterday's change.
8549 The last OS that we could find where this wouldn't work is
8550 SunOS 3.5, and that's too old to worry about now.
8551
8552 * data/glr.c (struct yyltype): Define members even when not
8553 doing locations. This is more consistent with yacc.c, and it
8554 works around the following bug reports:
8555 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
8556 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
8557
8558 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
8559 @acronym consistently. Standardize on "Yacc" instead of "YACC",
8560 "Algol" instead of "ALGOL". Give a bit more history about BNF.
8561
8562 2002-10-22 Akim Demaille <akim@epita.fr>
8563
8564 * data/README: New.
8565
8566 2002-10-21 Paul Eggert <eggert@twinsun.com>
8567
8568 Be consistent about 'bool'; the old code used an enum in one
8569 module and an int in another, and this violates the C standard.
8570 * m4/stdbool.m4: New file, from coreutils 4.5.3.
8571 * configure.ac (AC_HEADER_STDBOOL): Add.
8572 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
8573 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
8574 * src/symtab.c (hash_compare_symbol_t): Likewise.
8575 * src/system.h (bool, false, true): Use a definition consistent
8576 with ../lib/hash.c. All uses changed.
8577
8578 * src/complain.c (warning_issued): Renamed from warn_message_count,
8579 so that we needn't worry about integer overflow (!).
8580 Now of type bool. All uses changed.
8581 (complaint_issued): Renamed from complain_message_count; likewise.
8582
8583 * src/main.c (main): Use exit to exit with failure.
8584
8585 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
8586 rather than 1 and 0.
8587 * src/main.c (main): Likewise.
8588 * src/getargs.c (getargs): Likewise.
8589 * src/reader.c (reader): Likewise.
8590
8591 * src/getarg.c (getargs): Remove duplicate code for
8592 "Try `bison --help'".
8593
8594 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
8595 What was that "2" for?
8596
8597 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
8598 * src/getargs.c (usage): Likewise.
8599
8600 * src/getargs.c (getargs): When there are too few operands, report
8601 the last one. When there are too many, report the first extra
8602 one. This is how diffutils does it.
8603
8604 2002-10-20 Paul Eggert <eggert@twinsun.com>
8605
8606 Remove K&R vestiges.
8607 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
8608 * src/complain.c (VA_START): Remove. Assume prototypes.
8609 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
8610 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
8611 fatal): Assume prototypes.
8612 * src/complain.h: Assume prototypes.
8613 * src/system.h (PARAMS): Remove.
8614 Include <limits.h> unconditionally, since it's guaranteeed even
8615 for a freestanding C89 compiler.
8616 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
8617 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
8618
8619 2002-10-20 Akim Demaille <akim@epita.fr>
8620
8621 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
8622 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
8623 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
8624 (yyresolveStates, yyresolveAction, yyresolveStack)
8625 (yyprocessOneStack): Use them.
8626 (yy_reduce_print): New.
8627 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
8628
8629 2002-10-20 Akim Demaille <akim@epita.fr>
8630
8631 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
8632 arguments and output `void'.
8633 (b4_c_function): Rename as...
8634 (b4_c_function_def): this.
8635 (b4_c_function_decl, b4_c_ansi_function_def)
8636 (b4_c_ansi_function_decl): New.
8637 Change the interpretation of the arguments: before `int, foo', now
8638 `int foo, foo'.
8639 * data/yacc.c (yyparse): Prototype and define thanks to these.
8640 Adjust b4_c_function_def uses.
8641 * data/glr.c (yyparse): Likewise, but ANSI only.
8642
8643 2002-10-20 Akim Demaille <akim@epita.fr>
8644
8645 * src/output.c (prepare): Move the definition of `tokens_number',
8646 `nterms_number', `undef_token_number', `user_token_number_max'
8647 to...
8648 (prepare_tokens): Here.
8649 (prepare_tokens): Rename as...
8650 (prepare_symbols): this.
8651 (prepare): Move the definition of `rules_number' to...
8652 (prepare_rules): here.
8653 (prepare): Move the definition of `last', `final_state_number',
8654 `states_number' to...
8655 (prepare_states): here.
8656 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
8657
8658 2002-10-20 Akim Demaille <akim@epita.fr>
8659
8660 * src/tables.h, src/tables.c, src/output.c: Comment changes.
8661
8662 2002-10-20 Akim Demaille <akim@epita.fr>
8663
8664 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
8665 * data/c.m4: here.
8666
8667 2002-10-20 Akim Demaille <akim@epita.fr>
8668
8669 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
8670 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
8671 `pair'.
8672 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
8673 `name' to...
8674 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
8675 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
8676 These.
8677
8678 2002-10-19 Paul Eggert <eggert@twinsun.com>
8679
8680 Do not create a temporary file, as that involves security and
8681 cleanup headaches. Instead, use a pair of pipes.
8682 Derived from a suggestion by Florian Krohm.
8683 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
8684 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
8685 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
8686 (BISON_PREREQ_SUBPIPE): Add.
8687 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
8688 Add subpipe.h, subpipe.c.
8689 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
8690 * po/POTFILES.in: Add lib/subpipe.c.
8691 * src/output.c: Include "subpipe.h".
8692 (m4_invoke): Remove decl.
8693 (scan_skel): New decl.
8694 (output_skeleton): Use pipe rather than temporary file for m4 input.
8695 Check that m4sugar.m4 is readable, to avoid deadlock.
8696 Check for pipe I/O error.
8697 * src/scan-skel.l (readpipe): Remove decl.
8698 (scan_skel): New function, to be used in place of m4_invoke.
8699 Read from stream rather than file.
8700
8701 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
8702 float, as this generates a warning on Solaris 8 + GCC 3.2 with
8703 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
8704 this generates a more-accurate value anyway.
8705
8706 * lib/timevar.c (timervar_accumulate): Rename locals to
8707 avoid confusion with similarly-named more-global.
8708 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
8709
8710 * src/output.c (prepare): Use xstrdup to convert char const *
8711 to char *, to avoid GCC warning.
8712
8713 2002-10-19 Akim Demaille <akim@epita.fr>
8714
8715 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
8716 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
8717 Use them to have `calc.y' ready for %pure-parser.
8718 * data/yacc.c (YYLEX): Pass a yylex return type to
8719 b4_c_function_call.
8720
8721 2002-10-19 Akim Demaille <akim@epita.fr>
8722
8723 Prototype support of %lex-param and %parse-param.
8724
8725 * src/parse-gram.y: Add the definition of the %lex-param and
8726 %parse-param tokens, plus their rules.
8727 Drop the `_' version of %glr-parser.
8728 Add the "," token.
8729 * src/scan-gram.l (INITIAL): Scan them.
8730 * src/muscle_tab.c: Comment changes.
8731 (muscle_insert, muscle_find): Rename `pair' as `probe'.
8732 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
8733 (muscle_entry_s): The `value' member is no longer const.
8734 Adjust all dependencies.
8735 * src/muscle_tab.c (muscle_init): Adjust: use
8736 MUSCLE_INSERT_STRING.
8737 Initialize the obstack earlier.
8738 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
8739 (muscle_pair_list_grow): New.
8740 * data/c.m4 (b4_c_function_call, b4_c_args): New.
8741 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
8742 * tests/calc.at: Use %locations, not --locations.
8743 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
8744
8745 2002-10-19 Akim Demaille <akim@epita.fr>
8746
8747 * src/getargs.c (usage): Take status as argument and exit
8748 accordingly.
8749 Report the traditional `Try ... --help' message when status != 0.
8750 (usage, version): Don't take a FILE * as arg, it is pointless.
8751 (getargs): When there is an incorrect number of arguments, make it
8752 an error, and report it GNUlically thanks to `usage ()'.
8753
8754 2002-10-18 Paul Eggert <eggert@twinsun.com>
8755
8756 * data/glr.c (yyreportParseError): Don't assume that sprintf
8757 yields the length of the printed string, as this is not true
8758 on SunOS 4.1.4. Reported by Peter Klein.
8759
8760 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
8761 * tests/conflicts.at (%nonassoc and eof): Likewise.
8762 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
8763
8764 2002-10-17 Akim Demaille <akim@epita.fr>
8765
8766 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
8767 * src/getargs.c (trace_types, trace_args): Adjust.
8768 * src/reader.c (grammar_current_rule_prec_set)
8769 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
8770 Standardize error messages.
8771 And s/@prec/%prec/!
8772 (reader): Use trace_flag to enable scanner/parser debugging,
8773 instead of an adhoc scheme.
8774 * src/scan-gram.l: Remove trailing debugging code.
8775
8776 2002-10-16 Paul Eggert <eggert@twinsun.com>
8777
8778 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
8779 MUSCLE_TAB_H.
8780
8781 * NEWS: Officially drop support for building Bison with K&R C,
8782 since it didn't work anyway and it's not worth worrying about.
8783 * Makefile.maint (wget_files): Remove ansi2knr.c.
8784 (ansi2knr.c-url_prefix): Remove.
8785 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
8786 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
8787 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
8788
8789 2002-10-15 Paul Eggert <eggert@twinsun.com>
8790
8791 Stop using the "enum_" trick for K&R-style function definitions;
8792 it confused me, and I was the author! Instead, assume that people
8793 who want to use K&R C compilers (when using these modules in GCC,
8794 perhaps?) will run ansi2knr.
8795
8796 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
8797 All uses of "enum_" changed to "enum ".
8798 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
8799 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
8800
8801 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
8802 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
8803 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
8804 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
8805 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
8806 abitset_not, abitset_ones, abitset_or, abitset_or_and,
8807 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
8808 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
8809 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
8810 Use function prototypes; this removes the need for declaring
8811 static functions simply to provide their prototypes.
8812 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
8813 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
8814 bitset_count_, bitset_create, bitset_dump, bitset_first,
8815 bitset_free, bitset_init, bitset_last, bitset_next,
8816 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
8817 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
8818 bitset_print, bitset_release_memory, bitset_toggle_,
8819 bitset_type_choose, bitset_type_get, bitset_type_name_get,
8820 debug_bitset): Likewise.
8821 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
8822 * lib/bitset_stats.c (bitset_log_histogram_print,
8823 bitset_percent_histogram_print, bitset_stats_and,
8824 bitset_stats_and_cmp, bitset_stats_and_or,
8825 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
8826 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
8827 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
8828 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
8829 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
8830 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
8831 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
8832 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
8833 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
8834 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
8835 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
8836 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
8837 bitset_stats_zero): Likewise.
8838 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
8839 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
8840 bitsetv_dump, debug_bitsetv): Likewise.
8841 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
8842 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
8843 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
8844 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
8845 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
8846 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
8847 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
8848 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
8849 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
8850 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
8851 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
8852 Likewise.
8853 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
8854 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
8855 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
8856 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
8857 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
8858 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
8859 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
8860 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
8861 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
8862 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
8863 lbitset_xor_cmp, lbitset_zero): Likewise.
8864
8865 2002-10-14 Akim Demaille <akim@epita.fr>
8866
8867 Version 1.75.
8868
8869 2002-10-14 Akim Demaille <akim@epita.fr>
8870
8871 * tests/Makefile.am (maintainer-check-posix): New.
8872
8873 2002-10-14 Akim Demaille <akim@epita.fr>
8874
8875 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
8876 member.
8877
8878 2002-10-14 Akim Demaille <akim@epita.fr>
8879
8880 * src/tables.c (table_ninf_remap): base -> tab.
8881 Reported by Matt Rosing.
8882
8883 2002-10-14 Paul Eggert <eggert@twinsun.com>
8884
8885 * tests/action.at, tests/calc.at, tests/conflicts.at,
8886 tests/cxx-type.at, tests/headers.at, tests/input.at,
8887 tests/regression.at, tests/synclines.at, tests/torture.at:
8888 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
8889 so that the tests still work even if POSIXLY_CORRECT is set.
8890 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
8891
8892 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
8893 for portability to K&R hosts. Fix typo: signed char is guaranteed
8894 only to 127, not to 128.
8895 * data/glr.c (yysigned_char): New type.
8896 * data/yacc.c (yysigned_char): Likewise.
8897 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
8898
8899 2002-10-13 Paul Eggert <eggert@twinsun.com>
8900
8901 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
8902 true due to limited range of data type" warning from GCC.
8903
8904 * data/c.m4 (b4_token_defines): Protect against double-inclusion
8905 by wrapping enum yytokentype's definition inside #ifndef
8906 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
8907
8908 2002-10-13 Akim Demaille <akim@epita.fr>
8909
8910 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
8911 Un yy- yyrhs to avoid the name clash with the global YYRHS.
8912
8913 2002-10-13 Akim Demaille <akim@epita.fr>
8914
8915 * Makefile.maint: Update from Autoconf 2.54.
8916 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
8917
8918 2002-10-13 Akim Demaille <akim@epita.fr>
8919
8920 * src/print.c (print_state): Separate the list of solved conflicts
8921 from the other items.
8922 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
8923
8924 2002-10-13 Akim Demaille <akim@epita.fr>
8925
8926 Let nondeterministic skeletons be usable with deterministic
8927 tables.
8928
8929 With the patch, GAWK compiled by GCC without -O2 passes its test
8930 suite using a GLR parser driven by LALR tables. It fails with -O2
8931 because `struct stat' gives two different answers on my machine:
8932 88 (definition of an auto var) and later 96 (memset on this var).
8933 Hence the stack is badly corrumpted. The headers inclusion is to
8934 blame: if I move the awk.h inclusion before GLR's system header
8935 inclusion, the two struct stat have the same size.
8936
8937 * src/tables.c (pack_table): Always create conflict_table.
8938 (token_actions): Always create conflict_list.
8939 * data/glr.c (YYFLAG): Remove, unused.
8940
8941 2002-10-13 Akim Demaille <akim@epita.fr>
8942
8943 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
8944 (O0FLAGS): New.
8945 (VALGRIND, GXX): New.
8946 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
8947 * tests/bison.in: Run $PREBISON a pre-command.
8948 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
8949 (maintainer-check-g++): New.
8950 * Makefile.am (maintainer-check): New.
8951
8952 2002-10-13 Akim Demaille <akim@epita.fr>
8953
8954 * data/glr.c: Formatting changes.
8955 Tweak some trace messages to match yacc.c's.
8956
8957 2002-10-13 Akim Demaille <akim@epita.fr>
8958
8959 GLR parsers sometimes raise parse errors instead of performing the
8960 default reduction.
8961 Reported by Charles-Henry de Boysson.
8962
8963 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
8964 check the length of the traces when %glr.
8965 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
8966 GLR's traces.
8967 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
8968 Test GLR parsers.
8969 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
8970 (yyltype): Remove the yy prefix from the member names.
8971 (yytable): Complete its comment.
8972 (yygetLRActions): Map error action number from YYTABLE from
8973 YYTABLE_NINF to 0.
8974 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
8975 (which was a bug: it should have been YYTABEL_NINF, and yet it was
8976 not satisfying as we could compare an YYACTION computed from
8977 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
8978 only value for error actions.
8979 (yyreportParseError): In verbose parse error messages, don't issue
8980 `error' in the list of expected tokens.
8981 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
8982 next action to perform to match glr.c's decoding.
8983 (yytable): Complete its comment.
8984
8985 2002-10-13 Paul Eggert <eggert@twinsun.com>
8986
8987 Fix problem reported by Henrik Grubbstroem in
8988 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
8989 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
8990 because the Bison parser reads the second action before reducing
8991 the first one.
8992 * src/scan-gram.l (rule_length): New static var.
8993 Use it to keep track of the rule length in the scanner, since
8994 we can't expect the parser to be in lock-step sync with the scanner.
8995 (handle_action_dollar, handle_action_at): Use this var.
8996 * tests/actions.at (Exotic Dollars): Test for the problem.
8997
8998 2002-10-12 Paul Eggert <eggert@twinsun.com>
8999
9000 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
9001 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
9002 Include <sys/time.h> when checking for clock_t and struct tms.
9003 Use same include order as source.
9004 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
9005 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
9006
9007 * lib/timevar.c: Update copyright date and clarify comments.
9008 (get_time) [IN_GCC]: Keep the GCC version for reference.
9009
9010 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
9011 GCC version as of today, then merge Bison's changes.
9012 Change "GCC" to "Bison" in copyright notice. timevar.def's
9013 author is Akim, so change that too.
9014
9015 * src/reader.c (grammar_current_rule_check):
9016 Don't worry about the default action if $$ is untyped.
9017 Prevents bogus warnings reported by Jim Gifford in
9018 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
9019
9020 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
9021 * data/glr.c, data/lalr1.cc, data/yacc.c:
9022 Output token definitions before the first part of user declarations.
9023 Fixes compatibility problem reported by Jim Gifford for kbd in
9024 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
9025
9026 2002-10-11 Paul Eggert <eggert@twinsun.com>
9027
9028 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
9029 (yyparse): here. This undoes some of the 2002-07-25 change.
9030 Compatibility problem reported by Ralf S. Engelschall with
9031 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
9032
9033 2002-10-11 Akim Demaille <akim@epita.fr>
9034
9035 * tests/regression.at Characters Escapes): New.
9036 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
9037 characters.
9038 Reported by Jan Nieuwenhuizen.
9039
9040 2002-10-11 Akim Demaille <akim@epita.fr>
9041
9042 * po/id.po: New.
9043
9044 2002-10-10 Paul Eggert <eggert@twinsun.com>
9045
9046 Portability fixes for bitsets; this also avoids several GCC
9047 warnings.
9048
9049 * lib/abitset.c: Include <stddef.h>, for offsetof.
9050 * lib/lbitset.c: Likewise.
9051
9052 * lib/abitset.c (abitset_bytes): Return a size that is aligned
9053 properly for vectors of objects. Do not assume that adding a
9054 header size to a multiple of a word size yields a value that is
9055 properly aligned for the whole union.
9056 * lib/bitsetv.c (bitsetv_alloc): Likewise.
9057
9058 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
9059 unique names for structures.
9060 * lib/ebitset.c (ebitset_bytes): Likewise.
9061 * lib/lbitset.c (lbitset_bytes): Likewise.
9062
9063 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
9064 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
9065 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
9066 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
9067 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
9068 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
9069 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
9070 to improve the type-checking that GCC can do.
9071 * lib/bitset.c (bitset_op4_cmp): Likewise.
9072 * lib/bitset_stats.c (bitset_stats_count,
9073 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
9074 bitset_stats_copy, bitset_stats_disjoint_p,
9075 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
9076 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
9077 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
9078 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
9079 bitset_stats_and_or_cmp, bitset_stats_andn_or,
9080 bitset_stats_andn_or_cmp, bitset_stats_or_and,
9081 bitset_stats_or_and_cmp): Likewise.
9082 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
9083 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
9084 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
9085 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
9086
9087 * lib/abitset.h: Include bitset.h, not bbitset.h.
9088 * lib/ebitset.h: Likewise.
9089 * lib/lbitset.h: Likewise.
9090
9091 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
9092 All instances of parameters of type enum bitset_opts are now of
9093 type enum_bitset_opts, to conform to the C Standard, and similarly
9094 for enum_bitset_type.
9095 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
9096 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
9097
9098 Do not use "struct bitset_struct" to mean different things in
9099 different modules. Not only is this confusing, it violates
9100 the C Standard, which requires that structure types in different
9101 modules must be compatible if one is to be passed to the other.
9102 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
9103 All instances of "struct bitset_struct *" replaced with "bitset".
9104 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
9105 (union bitset_union, struct abitset_struct, struct ebitset_struct,
9106 struct lbitset_struct, struct bitset_stats_struct): New types.
9107 All uses of struct bitset_struct changed to union bitset_union,
9108 etc.
9109 * lib/abitset.c (struct abitset_struct, abitset,
9110 struct bitset_struct): Remove.
9111 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
9112 struct bitset_struct): Remove.
9113 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
9114 bitset_struct): Remove.
9115 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
9116 Likewise.
9117
9118 Do not call a function of type T using a call that assumes the
9119 function is of a different type U. Standard C requires that a
9120 function must be called with a type that is compatible with its
9121 definition.
9122 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
9123 New decls.
9124 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
9125 New functions.
9126 * lib/ebitset.c (PFV): Remove.
9127 * lib/lbitset.c (PFV): Likewise.
9128 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
9129 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
9130 decls.
9131 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
9132 (ebitset_vtable): Use them.
9133 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
9134 lbitset_xor): New functions.
9135 (lbitset_vtable): Use them.
9136
9137 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
9138 Declare.
9139
9140 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
9141 GCC warning.
9142 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
9143 Use offsetof, for simplicity.
9144
9145 2002-10-06 Paul Eggert <eggert@twinsun.com>
9146
9147 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
9148 the same width as int. This reapplies a hunk of the 2002-08-12 patch
9149 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
9150 which was inadvertently undone by the 2002-09-30 patch.
9151 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
9152 the same width as int.
9153
9154 2002-10-04 Paul Eggert <eggert@twinsun.com>
9155
9156 Version 1.50.
9157
9158 * configure.ac (AC_INIT), NEWS: Increment version number.
9159
9160 * doc/bison.texinfo: Minor spelling, grammar, and white space
9161 fixes.
9162 (Symbols): Mention that any negative value returned from yylex
9163 signifies end-of-input. Warn about negative chars. Mention
9164 the portable Standard C character set.
9165
9166 The GNU coding standard says CFLAGS and YFLAGS are reserved
9167 for the installer to set.
9168 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
9169 * src/Makefile.am (AM_CFLAGS): Likewise.
9170 (AM_YFLAGS): Renamed from YFLAGS.
9171
9172 Fix some MAX and MIN problems.
9173 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
9174 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
9175 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
9176 * src/reader.c (reader): Use it.
9177
9178 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
9179 POSIX 1003.1-2001 has removed fgrep.
9180
9181 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
9182
9183 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
9184 interpreted as signed.
9185 * lib/ebitset.c (ebitset_list): Fix bug.
9186
9187 2002-10-01 Paul Eggert <eggert@twinsun.com>
9188
9189 More fixes for 64-bit hosts and large bitsets.
9190
9191 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
9192 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
9193 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
9194 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
9195 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
9196 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
9197 bitset_count_): Likewise.
9198 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
9199 bitset_first, bitset_last): Likewise.
9200 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
9201 bitset_stats_list_reverse, bitset_stats_size,
9202 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
9203 Likewise.
9204 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
9205 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
9206 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
9207 bitsetv_reflexive_transitive_closure): Likewise.
9208 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
9209 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
9210 Likewise.
9211 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
9212 Likewise.
9213
9214 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
9215 Use size_t, not unsigned int, to count bytes.
9216 * lib/abitset.h (abitset_bytes): Likewise.
9217 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
9218 Likewise.
9219 * lib/bitset.h (bitset_bytes): Likewise.
9220 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
9221 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
9222 * lib/bitsetv.c (bitsetv_alloc): Likewise.
9223 * lib/ebitset.c (ebitset_bytes): Likewise.
9224 * lib/ebitset.h (ebitset_bytes): Likewise.
9225 * lib/lbitset.c (lbitset_bytes): Likewise.
9226 * lib/lbitset.h (lbitset_bytes): Likewise.
9227
9228 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
9229 abitset_subset_p, abitset_disjoint_p, abitset_and,
9230 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
9231 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
9232 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
9233 abitset_or_and, abitset_or_and_cmp):
9234 Use bitset_windex instead of unsigned int.
9235 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
9236 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
9237 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
9238 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
9239 Likewise.
9240 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
9241
9242 * lib/bitset.c (bitset_print):
9243 Use proper printf formats for widths of integer types.
9244 * lib/bitset_stats.c (bitset_percent_histogram_print,
9245 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
9246 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
9247 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
9248 * lib/lbitset.c (lbitset_bytes): Likewise.
9249
9250 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
9251 BITSET_SIZE_MAX): New macros.
9252 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
9253 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
9254 to BITSET_WINDEX_MAX.
9255
9256 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
9257 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
9258 since we now return the bitset_bindex type (not int).
9259
9260 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
9261 when computing sizes.
9262 * lib/ebitset.c (ebitset_elts_grow): Likewise.
9263
9264 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
9265 and avoid cast to unsigned.
9266
9267 2002-09-30 Akim Demaille <akim@epita.fr>
9268
9269 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
9270 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
9271 Updates from Michael Hayes.
9272
9273 2002-09-30 Art Haas <ahaas@neosoft.com>
9274
9275 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
9276 invocations.
9277 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
9278 defined.
9279
9280 2002-09-27 Akim Demaille <akim@epita.fr>
9281
9282 Version 1.49c.
9283
9284 2002-09-27 Akim Demaille <akim@epita.fr>
9285
9286 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
9287 (Because of AC_LIBSOURCE).
9288
9289 2002-09-27 Akim Demaille <akim@epita.fr>
9290
9291 Playing with Autoscan.
9292
9293 * configure.ac: Remove the old LIBOBJ tweaks.
9294 (AC_REPLACE_FUNCS): Add strrchr and strtol.
9295 * lib/strrchr.c: New.
9296 * lib/strtol.c: New, from the Coreutils 4.5.1.
9297
9298 2002-09-27 Akim Demaille <akim@epita.fr>
9299
9300 Playing with Autoscan.
9301
9302 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
9303 * lib/Makefile.am (libbison_a_SOURCES): No longer include
9304 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
9305 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
9306 Coreutils 4.5.1.
9307
9308 2002-09-24 Akim Demaille <akim@epita.fr>
9309
9310 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
9311 (Frequently Asked Questions, Parser Stack Overflow): New.
9312
9313 2002-09-13 Akim Demaille <akim@epita.fr>
9314
9315 Playing with autoscan.
9316
9317 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
9318 * src/files.c (skeleton_find): Remove, unused.
9319 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
9320 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
9321
9322 2002-09-13 Akim Demaille <akim@epita.fr>
9323
9324 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
9325 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
9326
9327 2002-09-13 Akim Demaille <akim@epita.fr>
9328
9329 * configure.ac: Require 2.54.
9330 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
9331 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
9332 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
9333 Remove, provided by Autoconf macros.
9334
9335 2002-09-12 Akim Demaille <akim@epita.fr>
9336
9337 * m4/prereq.m4: Update, from Coreutils 4.5.1.
9338
9339 2002-09-12 Akim Demaille <akim@epita.fr>
9340
9341 * m4/prereq.m4: Update, from Fileutils 4.1.5.
9342 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
9343 Reported by Martin Mokrejs.
9344
9345 2002-09-10 Akim Demaille <akim@epita.fr>
9346
9347 * src/parse-gram.y: Associate a human readable string to each
9348 token type.
9349 * tests/regression.at (Invalid inputs): Adjust.
9350
9351 2002-09-10 Gary V. Vaughan <gary@gnu.org>
9352
9353 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
9354 with an Autoconf-2.5x style configure.ac.
9355
9356 2002-09-06 Paul Eggert <eggert@twinsun.com>
9357
9358 * doc/bison.texinfo (Conditions): Make explicit that the GPL
9359 exception applies only to yacc.c. This is a modification of a
9360 patch originally suggested by Akim Demaille.
9361
9362 2002-09-06 Akim Demaille <akim@epita.fr>
9363
9364 * data/c.m4 (b4_copyright): Move the GPL exception comment from
9365 here to...
9366 * data/yacc.c: here.
9367
9368 * data/lalr1.cc (struct yyltype): Don't define it, since we use
9369 LocationType.
9370 (b4_ltype): Default to yy::Location from location.hh.
9371
9372 2002-09-04 Jim Meyering <jim@meyering.net>
9373
9374 * data/yacc.c: Guard the declaration of yytoknum also with
9375 `#ifdef YYPRINT', so it is declared only when used.
9376
9377 2002-09-04 Akim Demaille <akim@epita.fr>
9378
9379 * configure.in: Rename as...
9380 * configure.ac: this.
9381 Bump to 1.49c.
9382
9383 2002-09-04 Akim Demaille <akim@epita.fr>
9384
9385 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
9386 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
9387 translate maintainer only messages.
9388
9389 2002-08-12 Paul Eggert <eggert@twinsun.com>
9390
9391 Version 1.49b.
9392
9393 * Makefile.am (SUBDIRS): Remove intl.
9394 (DISTCLEANFILES): Remove.
9395 * NEWS: Mention that GNU M4 is now required. Clarify what is
9396 meant by "larger grammars". Mention the pt_BR translation.
9397 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
9398 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
9399 Bump version from 0.11.2 to 0.11.5.
9400 (BISON_PREREQ_STAGE): Remove.
9401 (AM_GNU_GETTEXT): Use external gettext.
9402 (AC_OUTPUT): Remove intl/Makefile.
9403
9404 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
9405
9406 * data/glr.c: Include string.h, for strlen.
9407 (yyreportParseError): Use size_t for yysize.
9408 (yy_yypstack): No longer nested inside yypstates, as nested
9409 functions are not portable. Do not assume size_t is the
9410 same width as int.
9411 (yypstates): Do not assume that ptrdiff_t is the same width
9412 as int, and similarly for yyposn and YYINDEX.
9413
9414 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
9415
9416 * lib/Makefile.am (INCLUDES): Do not include from the intl
9417 directory, which has been removed.
9418 * src/Makefile.am (INCLUDES): Likewise.
9419
9420 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
9421 (bitsets_sources, additional_bitsets_sources, timevars_sources):
9422 New vars.
9423
9424 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
9425 * tests/Makefile.am (EXTRA_DIST): Likewise.
9426
9427 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
9428 Do not assume that bitset_windex is the same width as unsigned.
9429
9430 * lib/abitset.c (abitset_unused_clear): Do not assume that
9431 bitset_word is the same width as int.
9432 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
9433 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
9434 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
9435 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
9436 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
9437
9438 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
9439 portability to one's complement hosts!).
9440 * lib/ebitset.c (ebitset_op1): Likewise.
9441 * lib/lbitset.c (lbitset_op1): Likewise.
9442
9443 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
9444 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
9445 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
9446 Sync with fileutils.
9447 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
9448 lib/gettext.h: Sync with diffutils.
9449
9450 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
9451 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
9452
9453 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
9454 PROTOTYPES to check for prototypes, and "defined __STDC__" to
9455 check for void *.
9456
9457 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
9458 size_t; the old version tried to do this but casted improperly.
9459 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
9460 (bitset_test): Now returns int, not unsigned long.
9461
9462 * lib/bitset_stats.c: Include "gettext.h".
9463 (_): New macro.
9464 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
9465 name locals "index", as it generates unnecessary warnings on some
9466 hosts that have an "index" function.
9467
9468 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
9469 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
9470 they need translation.
9471 * src/LR0.c (state_list_append, new_itemsets, get_state,
9472 append_states, generate_states): Likewise.
9473 * src/assoc.c (assoc_to_string): Likewise.
9474 * src/closure.c (print_closure, set_firsts, closure): Likewise.
9475 * src/gram.c (grammar_dump): Likewise.
9476 * src/injections.c (injections_compute): Likewise.
9477 * src/lalr.c (lookaheads_print): Likewise.
9478 * src/relation.c (relation_transpose): Likewise.
9479 * src/scan-gram.l: Likewise.
9480 * src/tables.c (table_grow, pack_vector): Likewise.
9481
9482 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
9483 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
9484 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
9485 * m4/mbstate_t.m4: Sync with fileutils.
9486 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
9487
9488 * po/LINGUAS: Add pt_BR.
9489 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
9490 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
9491 lib/timevar.c.
9492 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
9493 manual recommends.
9494 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
9495
9496 * src/complain.c (strerror_r): Remove decl; not needed.
9497 (strerror): Use same pattern as ../lib/error.c.
9498
9499 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
9500
9501 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
9502
9503 * src/main.c (main): Cast result of bindtextdomain and textdomain
9504 to void, to avoid a GCC warning when --disable-nls is in effect.
9505
9506 * src/scan-gram.l: Use strings rather than escapes when possible,
9507 to minimize the number of warnings from xgettext.
9508 (handle_action_dollar, handle_action_at): Don't use isdigit,
9509 as it mishandles negative chars and it may not work as expected
9510 outside the C locale.
9511
9512 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
9513 this is a GCC extension and is not portable to other compilers.
9514
9515 * src/system.h (alloca): Use same pattern as ../lib/error.c.
9516 Do not include <ctype.h>; no longer needed.
9517 Do not include <malloc.h>; no longer needed (and generates
9518 warnings on OpenBSD 3.0).
9519
9520 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
9521 it's not portable.
9522
9523 * tests/regression.at: Do not use 'cc -c input.c -o input';
9524 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
9525
9526 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
9527 exit status as failure, not just exit status 1. Sun C exits
9528 with status 2 sometimes.
9529
9530 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
9531 Use it for the two large tests.
9532
9533 2002-08-02 Akim Demaille <akim@epita.fr>
9534
9535 * src/conflicts.c (conflicts_output): Don't output rules never
9536 reduced here, since anyway that computation doesn't work.
9537 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
9538 (rule_useless_p, rule_never_reduced_p): New.
9539 (grammar_rules_partial_print): Use a filter instead of a range.
9540 Display the title only if needed.
9541 (grammar_rules_print): Adjust.
9542 (grammar_rules_never_reduced_report): New.
9543 * src/tables.c (action_row): Move the computation of rules never
9544 reduced to...
9545 (token_actions): here.
9546 * src/main.c (main): Make the parser before making the report, so
9547 that rules never reduced are computed.
9548 Call grammar_rules_never_reduced_report.
9549 * src/print.c (print_results): Report rules never reduced.
9550 * tests/conflicts.at, tests/reduce.at: Adjust.
9551
9552 2002-08-01 Akim Demaille <akim@epita.fr>
9553
9554 Instead of attaching lookaheads and duplicating the rules being
9555 reduced by a state, attach the lookaheads to the reductions.
9556
9557 * src/state.h (state_t): Remove the `lookaheads',
9558 `lookaheads_rule' member.
9559 (reductions_t): Add a `lookaheads' member.
9560 Use a regular array for the `rules'.
9561 * src/state.c (reductions_new): Initialize the lookaheads member
9562 to 0.
9563 (state_rule_lookaheads_print): Adjust.
9564 * src/state.h, src/state.c (state_reductions_find): New.
9565 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
9566 (count_rr_conflicts): Adjust.
9567 * src/lalr.c (LArule): Remove.
9568 (add_lookback_edge): Adjust.
9569 (state_lookaheads_count): New.
9570 (states_lookaheads_initialize): Merge into...
9571 (initialize_LA): this.
9572 (lalr_free): Adjust.
9573 * src/main.c (main): Don't free nullable and derives too early: it
9574 is used by --verbose.
9575 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
9576
9577 2002-08-01 Akim Demaille <akim@epita.fr>
9578
9579 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
9580 `rule_number_t**'.
9581 (set_derives, free_derives): Rename as...
9582 (derives_compute, derives_free): this.
9583 Adjust all dependencies.
9584 * src/nullable.c (set_nullable, free_nullable): Rename as...
9585 (nullable_compute, nullable_free): these.
9586 (rule_list_t): Store rule_t *, not rule_number_t.
9587 * src/state.c (state_rule_lookaheads_print): Directly compare rule
9588 pointers, instead of their numbers.
9589 * src/main.c (main): Call nullable_free, and derives_free earlier,
9590 as they were lo longer used.
9591
9592 2002-08-01 Akim Demaille <akim@epita.fr>
9593
9594 * lib/timevar.c (get_time): Include children time.
9595 * src/lalr.h (LA, LArule): Don't export them: used with the
9596 state_t.
9597 * src/lalr.c (LA, LArule): Static.
9598 * src/lalr.h, src/lalr.c (lalr_free): New.
9599 * src/main.c (main): Call it.
9600 * src/tables.c (pack_vector): Check whether loc is >= to the
9601 table_size, not >.
9602 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
9603 (tables_generate): do it, since that's also it which allocates
9604 them.
9605 Don't free LA and LArule, main does.
9606
9607 2002-07-31 Akim Demaille <akim@epita.fr>
9608
9609 Separate parser tables computation and output.
9610
9611 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
9612 (conflict_list, conflict_list_cnt, table, check, table_ninf)
9613 (yydefgoto, yydefact, high): Move to...
9614 * src/tables.h, src/tables.c: here.
9615 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
9616 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
9617 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
9618 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
9619 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
9620 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
9621 (action_row, save_row, token_actions, save_column, default_goto)
9622 (goto_actions, sort_actions, matching_state, pack_vector)
9623 (table_ninf_remap, pack_table, prepare_actions): Move to...
9624 * src/tables.c: here.
9625 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
9626 * src/output.c (token_actions, output_base, output_conflicts)
9627 (output_check): Merge into...
9628 (prepare_actions): this.
9629 (actions_output): Rename as...
9630 (user_actions_output): this.
9631 * src/main.c (main): Call tables_generate and tables_free.
9632
9633 2002-07-31 Akim Demaille <akim@epita.fr>
9634
9635 Steal GCC's --time-report support.
9636
9637 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
9638 stolen/adjusted from GCC.
9639 * m4/stage.m4: Remove time related checks.
9640 * m4/timevar.m4: New.
9641 * configure.in: Adjust.
9642 * src/system.h: Adjust to using timevar.h.
9643 * src/getargs.h, src/getargs.c: Support trace_time for
9644 --trace=time.
9645 * src/main.c (stage): Remove.
9646 (main): Replace `stage' invocations with timevar calls.
9647 * src/output.c: Insert pertinent timevar calls.
9648
9649 2002-07-31 Akim Demaille <akim@epita.fr>
9650
9651 Let --trace have arguments.
9652
9653 * src/getargs.h (enum trace_e): New.
9654 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
9655 (long_options, short_options): --trace/-T takes an optional
9656 argument.
9657 Change all the uses of trace_flag to reflect the new flags.
9658 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
9659
9660 Strengthen `stage' portability.
9661
9662 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
9663 * configure.in: Use it.
9664 Don't check for malloc.h and sys/times.h.
9665 * src/system.h: Include them when appropriate.
9666 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
9667 times and struct tms are available.
9668
9669 2002-07-30 Akim Demaille <akim@epita.fr>
9670
9671 In verbose parse error message, don't report `error' as an
9672 expected token.
9673 * tests/actions.at (Printers and Destructors): Adjust.
9674 * tests/calc.at (Calculator $1): Adjust.
9675 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
9676 error message, do not report the parser accepts the error token in
9677 that state.
9678
9679 2002-07-30 Akim Demaille <akim@epita.fr>
9680
9681 Normalize conflict related messages.
9682
9683 * src/complain.h, src/complain.c (warn, complain): New.
9684 * src/conflicts.c (conflicts_print): Use them.
9685 (conflict_report_yacc): New, extracted from...
9686 (conflicts_print): here.
9687 * tests/conflicts.at, tests/existing.at: Adjust.
9688
9689 2002-07-30 Akim Demaille <akim@epita.fr>
9690
9691 Report rules which are never reduced by the parser: those hidden
9692 by conflicts.
9693
9694 * src/LR0.c (save_reductions): Don't make the final state too
9695 different: save its reduction (accept) instead of having a state
9696 without any action (no shift or goto, no reduce).
9697 Note: the final state is now a ``regular'' state, i.e., the
9698 parsers now contain `reduce 0' as default reduction.
9699 Nevertheless, since they decide to `accept' when yystate =
9700 final_state, they still will not reduce rule 0.
9701 * src/print.c (print_actions, print_reduction): Adjust.
9702 * src/output.c (action_row): Track reduced rules.
9703 (token_actions): Report rules never reduced.
9704 * tests/conflicts.at, tests/regression.at: Adjust.
9705
9706 2002-07-30 Akim Demaille <akim@epita.fr>
9707
9708 `stage' was accidently included in a previous patch.
9709 Initiate its autoconfiscation.
9710
9711 * configure.in: Look for malloc.h and sys/times.h.
9712 * src/main.c (stage): Adjust.
9713 Report only when trace_flag.
9714
9715 2002-07-29 Akim Demaille <akim@epita.fr>
9716
9717 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
9718 state_number_t.
9719 (errs_t): symbol_t*, not symbol_number_t.
9720 (reductions_t): rule_t*, not rule_number_t.
9721 (FOR_EACH_SHIFT): New.
9722 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
9723 * src/print.c, src/print_graph.c: Adjust.
9724
9725 2002-07-29 Akim Demaille <akim@epita.fr>
9726
9727 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
9728
9729 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
9730 (endtoken, accept): these.
9731 * src/reader.c (reader): Set endtoken's default tag to "$end".
9732 Set undeftoken's tag to "$undefined" instead of "$undefined.".
9733 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
9734 Adjust.
9735
9736 2002-07-29 Akim Demaille <akim@epita.fr>
9737
9738 * src/reduce.c (reduce_grammar): When the language is empty,
9739 complain about the start symbol, not the axiom.
9740 Use its location.
9741 * tests/reduce.at (Empty Language): New.
9742
9743 2002-07-26 Akim Demaille <akim@epita.fr>
9744
9745 * src/reader.h, src/reader.c (gram_error): ... can't get
9746 yycontrol without making too strong assumptions on the parser
9747 itself.
9748 * src/output.c (prepare_tokens): Use the real 0th value of
9749 token_translations instead of `0'.
9750 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
9751 visible here.
9752 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
9753 for the time being: %locations ought to provide it to yyerror.
9754
9755 2002-07-25 Akim Demaille <akim@epita.fr>
9756
9757 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
9758 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
9759 * tests/regression.at (Web2c Actions): Adjust.
9760
9761 2002-07-25 Akim Demaille <akim@epita.fr>
9762
9763 Stop storing rules from 1 to nrules + 1.
9764
9765 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
9766 * src/nullable.c, src/output.c, src/print.c, src/reader.c
9767 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
9768 Iterate from 0 to nrules.
9769 Use rule_number_as_item_number and item_number_as_rule_number.
9770 Adjust to `derive' now containing possibly 0.
9771 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
9772 Handle the `- 1' part in rule numbers from/to item numbers.
9773 * src/conflicts.c (log_resolution): Fix the message which reversed
9774 shift and reduce.
9775 * src/output.c (action_row): Initialize default_rule to -1.
9776 (token_actions): Adjust.
9777 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
9778 expected output.
9779 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
9780
9781 2002-07-25 Akim Demaille <akim@epita.fr>
9782
9783 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
9784 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
9785 (b4_c_knr_arg_decl): New.
9786 * data/yacc.c: Use it to define yysymprint, yydestruct, and
9787 yyreport_parse_error.
9788
9789 2002-07-25 Akim Demaille <akim@epita.fr>
9790
9791 * data/yacc.c (yyreport_parse_error): New, extracted from...
9792 (yyparse): here.
9793 (yydestruct, yysymprint): Move above yyparse.
9794 Be K&R compliant.
9795
9796 2002-07-25 Akim Demaille <akim@epita.fr>
9797
9798 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
9799 replace...
9800 (b4_sint_type, b4_uint_type): these.
9801 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
9802 * tests/regression.at (Web2c Actions): Adjust.
9803
9804 2002-07-25 Akim Demaille <akim@epita.fr>
9805
9806 * src/gram.h (TIEM_NUMBER_MAX): New.
9807 (item_number_of_rule_number, rule_number_of_item_number): Rename
9808 as...
9809 (rule_number_as_item_number, item_number_as_rule_number): these.
9810 Adjust dependencies.
9811 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
9812 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
9813 (symbol_number_to_vector_number): New.
9814 (order): Of vector_number_t* type.
9815 (base_t, BASE_MAX, BASE_MIN): New.
9816 (froms, tos, width, pos, check): Of base_t type.
9817 (action_number_t, ACTION_MIN, ACTION_MAX): New.
9818 (actrow): Of action_number_t type.
9819 (conflrow): Of unsigned int type.
9820 (table_ninf, base_ninf): New.
9821 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
9822 (muscle_insert_int_table, muscle_insert_base_table)
9823 (muscle_insert_rule_number_table): New.
9824 (prepare_tokens): Output `toknum' as int_table.
9825 (action_row): Returns a rule_number_t.
9826 Use ACTION_MIN, not SHRT_MIN.
9827 (token_actions): yydefact is rule_number_t*.
9828 (table_ninf_remap): New.
9829 (pack_table): Use it for `base' and `table'.
9830 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
9831 replaced with...
9832 (YYPACT_NINF, YYTABLE_NINF): these.
9833 (yypact, yytable): Compute their types instead of hard-coded
9834 `short'.
9835 * tests/regression.at (Web2c Actions): Adjust.
9836
9837 2002-07-19 Akim Demaille <akim@epita.fr>
9838
9839 * src/scan-gram.l (id): Can start with an underscore.
9840
9841 2002-07-16 Akim Demaille <akim@epita.fr>
9842
9843 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
9844 Adjust all former `associativity' dependencies.
9845 * src/symtab.c (symbol_new): Default associativity is `undef', not
9846 `right'.
9847 (symbol_check_alias_consistence): Adjust.
9848
9849 2002-07-09 Akim Demaille <akim@epita.fr>
9850
9851 * doc/bison.texinfo: Properly set the ``header'' part.
9852 Use @dircategory ``GNU programming tools'' as per Texinfo's
9853 documentation.
9854 Use @copying.
9855
9856 2002-07-09 Akim Demaille <akim@epita.fr>
9857
9858 * lib/quotearg.h: Protect against multiple inclusions.
9859 * src/location.h (location_t): Add a `file' member.
9860 (LOCATION_RESET, LOCATION_PRINT): Adjust.
9861 * src/complain.c (warn_at, complain_at, fatal_at): Drop
9862 `error_one_per_line' support.
9863
9864 2002-07-09 Akim Demaille <akim@epita.fr>
9865
9866 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
9867 * src/reader.c (lineno): Remove.
9868 Adjust all dependencies.
9869 (get_merge_function): Take a location and use complain_at.
9870 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
9871 * tests/regression.at (Invalid inputs, Mixing %token styles):
9872 Adjust.
9873
9874 2002-07-09 Akim Demaille <akim@epita.fr>
9875
9876 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
9877 recovery rule, and forbid extensions when --yacc.
9878 (gram_error): Use complain_at.
9879 * src/reader.c (reader): Exit if there were parse errors.
9880
9881 2002-07-09 Akim Demaille <akim@epita.fr>
9882
9883 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
9884 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
9885 Reported by R Blake <blakers@mac.com>.
9886
9887 2002-07-09 Akim Demaille <akim@epita.fr>
9888
9889 * data/yacc.c: Output the copyright notive in the header.
9890
9891 2002-07-03 Akim Demaille <akim@epita.fr>
9892
9893 * src/output.c (froms, tos): Are state_number_t.
9894 (save_column): sp, sp1, and sp2 are state_number_t.
9895 (prepare): Rename `final' as `final_state_number', `nnts' as
9896 `nterms_number', `nrules' as `rules_number', `nstates' as
9897 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
9898 unused.
9899 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
9900 * data/lalr1.cc (nsym_): Remove, unused.
9901
9902 2002-07-03 Akim Demaille <akim@epita.fr>
9903
9904 * src/lalr.h, src/lalr.c (goto_number_t): New.
9905 * src/lalr.c (goto_list_t): New.
9906 Propagate them.
9907 * src/nullable.c (rule_list_t): New.
9908 Propagate.
9909 * src/types.h: Remove.
9910
9911 2002-07-03 Akim Demaille <akim@epita.fr>
9912
9913 * src/closure.c (print_fderives): Use rule_rhs_print.
9914 * src/derives.c (print_derives): Use rule_rhs_print.
9915 (rule_list_t): New, replaces `shorts'.
9916 (set_derives): Add comments.
9917 * tests/sets.at (Nullable, Firsts): Adjust.
9918
9919 2002-07-03 Akim Demaille <akim@epita.fr>
9920
9921 * src/output.c (prepare_actions): Free `tally' and `width'.
9922 (prepare_actions): Allocate and free `order'.
9923 * src/symtab.c (symbols_free): Free `symbols'.
9924 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
9925 * src/output.c (m4_invoke): Move to...
9926 * src/scan-skel.l: here.
9927 (<<EOF>>): Close yyout, and free its name.
9928
9929 2002-07-03 Akim Demaille <akim@epita.fr>
9930
9931 Fix some memory leaks, and fix a bug: state 0 was examined twice.
9932
9933 * src/LR0.c (new_state): Merge into...
9934 (state_list_append): this.
9935 (new_states): Merge into...
9936 (generate_states): here.
9937 (set_states): Don't ensure a proper `errs' state member here, do it...
9938 * src/conflicts.c (conflicts_solve): here.
9939 * src/state.h, src/state.c: Comment changes.
9940 (state_t): Rename member `shifts' as `transitions'.
9941 Adjust all dependencies.
9942 (errs_new): For consistency, also take the values as argument.
9943 (errs_dup): Remove.
9944 (state_errs_set): New.
9945 (state_reductions_set, state_transitions_set): Assert that no
9946 previous value was assigned.
9947 (state_free): New.
9948 (states_free): Use it.
9949 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
9950 temporary storage: use `errs' and `nerrs' as elsewhere.
9951 (set_conflicts): Allocate and free this `errs'.
9952
9953 2002-07-02 Akim Demaille <akim@epita.fr>
9954
9955 * lib/libiberty.h: New.
9956 * lib: Update the bitset implementation from upstream.
9957 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
9958 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
9959 * src/main.c: Adjust bitset stats calls.
9960
9961 2002-07-01 Paul Eggert <eggert@twinsun.com>
9962
9963 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
9964 char, so that negative chars don't collide with $.
9965
9966 2002-06-30 Akim Demaille <akim@epita.fr>
9967
9968 Have the GLR tests be `warning' checked, and fix the warnings.
9969
9970 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
9971 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
9972 (yyremoveDeletes): `yyi' and `yyj' are size_t.
9973 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
9974 (yyaddDeferredAction): static.
9975 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
9976 (yyreportParseError): yyprefix is const.
9977 yytokenp is used only when verbose.
9978 (yy__GNUC__): Replace with __GNUC__.
9979 (yypdumpstack): yyi is size_t.
9980 (yypreference): Un-yy local variables and arguments, to avoid
9981 clashes with `yyr1'. Anyway, we are not in the user name space.
9982 (yytname_size): be an int, as is compared with ints.
9983 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
9984 Use them.
9985 * tests/cxx-gram.at: Use quotation to protect $1.
9986 Use AT_COMPILE to enable warnings hunts.
9987 Prototype yylex and yyerror.
9988 `Use' argc.
9989 Include `string.h', not `strings.h'.
9990 Produce and prototype stmtMerge only when used.
9991 yylex takes a location.
9992
9993 2002-06-30 Akim Demaille <akim@epita.fr>
9994
9995 We spend a lot of time in quotearg, in particular when --verbose.
9996
9997 * src/symtab.c (symbol_get): Store a quoted version of the key.
9998 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
9999 Adjust all callers.
10000
10001 2002-06-30 Akim Demaille <akim@epita.fr>
10002
10003 * src/state.h (reductions_t): Rename member `nreds' as num.
10004 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
10005 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
10006
10007 2002-06-30 Akim Demaille <akim@epita.fr>
10008
10009 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
10010 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
10011 (shifts_to): Rename as...
10012 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
10013 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
10014 (TRANSITION_IS_DISABLED, transitions_to): these.
10015
10016 2002-06-30 Akim Demaille <akim@epita.fr>
10017
10018 * src/print.c (print_shifts, print_gotos): Merge into...
10019 (print_transitions): this.
10020 (print_transitions, print_errs, print_reductions): Align the
10021 lookaheads columns.
10022 (print_core, print_transitions, print_errs, print_state,
10023 print_grammar): Output empty lines separator before, not after.
10024 (state_default_rule_compute): Rename as...
10025 (state_default_rule): this.
10026 * tests/conflicts.at (Defaulted Conflicted Reduction),
10027 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
10028 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
10029
10030 2002-06-30 Akim Demaille <akim@epita.fr>
10031
10032 Display items as we display rules.
10033
10034 * src/gram.h, src/gram.c (rule_lhs_print): New.
10035 * src/gram.c (grammar_rules_partial_print): Use it.
10036 * src/print.c (print_core): Likewise.
10037 * tests/conflicts.at (Defaulted Conflicted Reduction),
10038 (Unresolved SR Conflicts): Adjust.
10039 (Unresolved SR Conflicts): Adjust and rename as...
10040 (Resolved SR Conflicts): this, as was meant.
10041 * tests/regression.at (Web2c Report): Adjust.
10042
10043 2002-06-30 Akim Demaille <akim@epita.fr>
10044
10045 * src/print.c (state_default_rule_compute): New, extracted from...
10046 (print_reductions): here.
10047 Pessimize, but clarify the code.
10048 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
10049
10050 2002-06-30 Akim Demaille <akim@epita.fr>
10051
10052 * src/output.c (action_row): Let default_rule be always a rule
10053 number.
10054
10055 2002-06-30 Akim Demaille <akim@epita.fr>
10056
10057 * src/closure.c (print_firsts, print_fderives, closure):
10058 Use BITSET_EXECUTE.
10059 * src/lalr.c (lookaheads_print): Likewise.
10060 * src/state.c (state_rule_lookaheads_print): Likewise.
10061 * src/print_graph.c (print_core): Likewise.
10062 * src/print.c (print_reductions): Likewise.
10063 * src/output.c (action_row): Likewise.
10064 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
10065
10066 2002-06-30 Akim Demaille <akim@epita.fr>
10067
10068 * src/print_graph.c: Use report_flag.
10069
10070 2002-06-30 Akim Demaille <akim@epita.fr>
10071
10072 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
10073 to...
10074 * src/relation.h, src/relation.c (traverse, relation_digraph)
10075 (relation_print, relation_transpose): New.
10076
10077 2002-06-30 Akim Demaille <akim@epita.fr>
10078
10079 * src/state.h, src/state.c (shifts_to): New.
10080 * src/lalr.c (build_relations): Use it.
10081
10082 2002-06-30 Akim Demaille <akim@epita.fr>
10083
10084 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
10085 (item_number_of_rule_number, rule_number_of_item_number): New.
10086 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
10087 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
10088 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
10089 Propagate their use.
10090 Much remains to be done, in particular wrt `shorts' from types.h.
10091
10092 2002-06-30 Akim Demaille <akim@epita.fr>
10093
10094 * src/symtab.c (symbol_new): Initialize the `printer' member.
10095
10096 2002-06-30 Akim Demaille <akim@epita.fr>
10097
10098 * src/LR0.c (save_reductions): Remove, replaced by...
10099 * src/state.h, src/state.c (state_reductions_set): New.
10100 (reductions, errs): Rename as...
10101 (reductions_t, errs_t): these.
10102 Adjust all dependencies.
10103
10104 2002-06-30 Akim Demaille <akim@epita.fr>
10105
10106 * src/LR0.c (state_list_t, state_list_append): New.
10107 (first_state, last_state): Now symbol_list_t.
10108 (this_state): Remove.
10109 (new_itemsets, append_states, save_reductions): Take a state_t as
10110 argument.
10111 (set_states, generate_states): Adjust.
10112 (save_shifts): Remove, replaced by...
10113 * src/state.h, src/state.c (state_shifts_set): New.
10114 (shifts): Rename as...
10115 (shifts_t): this.
10116 Adjust all dependencies.
10117 * src/state.h (state_t): Remove the `next' member.
10118
10119 2002-06-30 Akim Demaille <akim@epita.fr>
10120
10121 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
10122 escaped in slot 0.
10123
10124 2002-06-30 Akim Demaille <akim@epita.fr>
10125
10126 Use hash.h for the state hash table.
10127
10128 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
10129 (allocate_storage): Use state_hash_new.
10130 (free_storage): Use state_hash_free.
10131 (new_state, get_state): Adjust.
10132 * src/lalr.h, src/lalr.c (states): Move to...
10133 * src/states.h (state_t): Remove the `link' member, no longer
10134 used.
10135 * src/states.h, src/states.c: here.
10136 (state_hash_new, state_hash_free, state_hash_lookup)
10137 (state_hash_insert, states_free): New.
10138 * src/states.c (state_table, state_compare, state_hash): New.
10139 * src/output.c (output_actions): Do not free states now, since we
10140 still need to know the final_state number in `prepare', called
10141 afterwards. Do it...
10142 * src/main.c (main): here: call states_free after `output'.
10143
10144 2002-06-30 Akim Demaille <akim@epita.fr>
10145
10146 * src/state.h, src/state.c (state_new): New, extracted from...
10147 * src/LR0.c (new_state): here.
10148 * src/state.h (STATE_ALLOC): Move to...
10149 * src/state.c: here.
10150 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
10151 * src/state.h, src/state.c: here.
10152
10153 2002-06-30 Akim Demaille <akim@epita.fr>
10154
10155 * src/reader.c (gensym): Rename as...
10156 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
10157 (getsym): Rename as...
10158 (symbol_get): this.
10159
10160 2002-06-30 Akim Demaille <akim@epita.fr>
10161
10162 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
10163 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
10164 * src/output.c, src/print.c, src/print_graph.c: Propagate.
10165 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
10166
10167 2002-06-30 Akim Demaille <akim@epita.fr>
10168
10169 Make the test suite pass with warnings checked.
10170
10171 * tests/actions.at (Printers and Destructors): Improve.
10172 Avoid unsigned vs. signed issues.
10173 * tests/calc.at: Don't exercise the scanner here, do it...
10174 * tests/input.at (Torturing the Scanner): here.
10175
10176 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10177
10178 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
10179 reorganize first lines parallel to yacc.c.
10180
10181 2002-06-28 Akim Demaille <akim@epita.fr>
10182
10183 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
10184 (b4_token_enum, b4_token_defines): New, factored from...
10185 * data/lalr1.cc, data/yacc.c, glr.c: here.
10186
10187 2002-06-28 Akim Demaille <akim@epita.fr>
10188
10189 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
10190 unused variables.
10191 * src/output.c (merger_output): static.
10192
10193 2002-06-28 Akim Demaille <akim@epita.fr>
10194
10195 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
10196 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
10197 pacify GCC.
10198 * src/output.c (save_row): Initialize all the variables to pacify GCC.
10199
10200 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10201
10202 Accumulated changelog for new GLR parsing features.
10203
10204 * src/conflicts.c (count_total_conflicts): Change name to
10205 conflicts_total_count.
10206 * src/conflicts.h: Ditto.
10207 * src/output.c (token_actions): Use the new name.
10208 (output_conflicts): Change conflp => conflict_list_heads, and
10209 confl => conflict_list for better readability.
10210 * data/glr.c: Use the new names.
10211 * NEWS: Add self to GLR announcement.
10212
10213 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
10214
10215 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
10216 Akim Demaille.
10217
10218 * data/bison.glr: Change name to glr.c
10219 * data/glr.c: Renamed from bison.glr.
10220 * data/Makefile.am: Add glr.c
10221
10222 * src/getargs.c:
10223
10224 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
10225 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
10226
10227 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10228
10229 * data/bison.glr: Be sure to restore the
10230 current #line when returning to the skeleton contents after having
10231 exposed the input file's #line.
10232
10233 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10234
10235 * data/bison.glr: Bring up to date with changes to bison.simple.
10236
10237 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10238
10239 * data/bison.glr: Correct definitions that use b4_prefix.
10240 Various reformatting.
10241 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
10242 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
10243 yytokenp argument; now part of stack.
10244 (yychar): Define to behave as documented.
10245 (yyclearin): Ditto.
10246
10247 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10248
10249 * src/reader.h: Add declaration for free_merger_functions.
10250
10251 * src/reader.c (merge_functions): New variable.
10252 (get_merge_function): New function.
10253 (free_merger_functions): New function.
10254 (readgram): Check for %prec that is not followed by a symbol.
10255 Handle %dprec and %merge declarations.
10256 (packgram): Initialize dprec and merger fields in rules array.
10257
10258 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
10259 conflict_list_cnt, conflict_list_free): New variables.
10260 (table_grow): Also grow conflict_table.
10261 (prepare_rules): Output dprec and merger tables.
10262 (conflict_row): New function.
10263 (action_row): Output conflict lists for GLR parser. Don't use
10264 default reduction in conflicted states for GLR parser so that there
10265 are spaces for the conflict lists.
10266 (save_row): Also save conflict information.
10267 (token_actions): Allocate conflict list.
10268 (merger_output): New function.
10269 (pack_vector): Pack conflict table, too.
10270 (output_conflicts): New function to output yyconflp and yyconfl.
10271 (output_check): Allocate conflict_tos.
10272 (output_actions): Output conflict tables, also.
10273 (output_skeleton): Output b4_mergers definition.
10274 (prepare): Output b4_max_rhs_length definition.
10275 Use 'bison.glr' as default skeleton for GLR parsers.
10276
10277 * src/gram.c (glr_parser): New flag.
10278 (grammar_free): Call free_merger_functions.
10279
10280 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
10281 all pairs of conflicting reductions, rather than just all tokens
10282 causing conflicts. Needed to size conflict tables.
10283 (conflicts_output): Modify call to count_rr_conflicts for new
10284 interface.
10285 (conflicts_print): Ditto.
10286 (count_total_conflicts): New function.
10287
10288 * src/reader.h (merger_list): New type.
10289 (merge_functions): New variable.
10290
10291 * src/lex.h (tok_dprec, tok_merge): New token types.
10292
10293 * src/gram.h (rule_s): Add dprec and merger fields.
10294 (glr_parser): New flag.
10295
10296 * src/conflicts.h (count_total_conflicts): New function.
10297
10298 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
10299
10300 * doc/bison.texinfo (Generalized LR Parsing): New section.
10301 (GLR Parsers): New section.
10302 (Language and Grammar): Mention GLR parsing.
10303 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
10304 Correct typo ("tge" -> "the").
10305
10306 * data/bison.glr: New skeleton for GLR parsing.
10307
10308 * tests/cxx-gram.at: New tests for GLR parsing.
10309
10310 * tests/testsuite.at: Include cxx-gram.at.
10311
10312 * tests/Makefile.am: Add cxx-gram.at.
10313
10314 * src/parse-gram.y:
10315
10316 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
10317
10318 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
10319
10320 2002-06-27 Akim Demaille <akim@epita.fr>
10321
10322 * src/options.h, src/options.c: Remove.
10323 * src/getargs.c (short_options, long_options): New.
10324
10325 2002-06-27 Akim Demaille <akim@epita.fr>
10326
10327 * data/bison.simple, data/bison.c++: Rename as...
10328 * data/yacc.c, data/lalr1.cc: these.
10329 * doc/bison.texinfo (Environment Variables): Remove.
10330
10331 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
10332
10333 * src/getargs.c (report_argmatch): Initialize strtok().
10334
10335 2002-06-20 Akim Demaille <akim@epita.fr>
10336
10337 * data/bison.simple (b4_symbol_actions): New, replaces...
10338 (b4_symbol_destructor, b4_symbol_printer): these.
10339 (yysymprint): Be sure to call YYPRINT only for tokens, and using
10340 user token numbers.
10341
10342 2002-06-20 Akim Demaille <akim@epita.fr>
10343
10344 * data/bison.simple (yydestructor): Rename as...
10345 (yydestruct): this.
10346
10347 2002-06-20 Akim Demaille <akim@epita.fr>
10348
10349 * src/symtab.h, src/symtab.c (symbol_type_set)
10350 (symbol_destructor_set, symbol_precedence_set): The location is
10351 the last argument.
10352 Adjust all callers.
10353
10354 2002-06-20 Akim Demaille <akim@epita.fr>
10355
10356 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
10357 internals.
10358 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
10359 Takes a location.
10360 * src/symtab.h, src/symtab.c (symbol_class_set)
10361 (symbol_user_token_number_set): Likewise.
10362 Adjust all callers.
10363 Promote complain_at.
10364 * tests/input.at (Type Clashes): Adjust.
10365
10366 2002-06-20 Akim Demaille <akim@epita.fr>
10367
10368 * data/bison.simple (YYLEX): Fix the declaration when
10369 %pure-parser.
10370
10371 2002-06-20 Akim Demaille <akim@epita.fr>
10372
10373 * data/bison.simple (yysymprint): Don't print the token number,
10374 just its name.
10375 * tests/actions.at (Destructors): Rename as...
10376 (Printers and Destructors): this.
10377 Also exercise %printer.
10378
10379 2002-06-20 Akim Demaille <akim@epita.fr>
10380
10381 * data/bison.simple (YYDSYMPRINT): New.
10382 Use it to remove many of the #if YYDEBUG/if (yydebug).
10383
10384 2002-06-20 Akim Demaille <akim@epita.fr>
10385
10386 * src/symtab.h, src/symtab.c (symbol_t): printer and
10387 printer_location are new members.
10388 (symbol_printer_set): New.
10389 * src/parse-gram.y (PERCENT_PRINTER): New token.
10390 Handle its associated rule.
10391 * src/scan-gram.l: Adjust.
10392 (handle_destructor_at, handle_destructor_dollar): Rename as...
10393 (handle_symbol_code_at, handle_symbol_code_dollar): these.
10394 * src/output.c (symbol_printers_output): New.
10395 (output_skeleton): Call it.
10396 * data/bison.simple (yysymprint): New. Cannot be named yyprint
10397 since there are already many grammar files with a user `yyprint'.
10398 Replace the calls to YYPRINT to calls to yysymprint.
10399 * tests/calc.at: Adjust.
10400 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
10401 taking advantage of parser very internal details (stack size!).
10402
10403 2002-06-20 Akim Demaille <akim@epita.fr>
10404
10405 * src/scan-gram.l: Complete the scanner with the missing patterns
10406 to pacify Flex.
10407 Use `quote' and `symbol_tag_get' where appropriate.
10408
10409 2002-06-19 Akim Demaille <akim@epita.fr>
10410
10411 * tests/actions.at (Destructors): Augment to test locations.
10412 * data/bison.simple (yydestructor): Pass it the current location
10413 if locations are enabled.
10414 Prototype only when __STDC__ or C++.
10415 Change the argument names to move into the yy name space: there is
10416 user code here.
10417
10418 2002-06-19 Akim Demaille <akim@epita.fr>
10419
10420 * data/bison.simple (b4_pure_if): New.
10421 Use it instead of #ifdef YYPURE.
10422
10423 2002-06-19 Akim Demaille <akim@epita.fr>
10424
10425 * data/bison.simple (b4_location_if): New.
10426 Use it instead of #ifdef YYLSP_NEEDED.
10427
10428 2002-06-19 Akim Demaille <akim@epita.fr>
10429
10430 Prepare @$ in %destructor, but currently don't bind it in the
10431 skeleton, as %location use is not cleaned up yet.
10432
10433 * src/scan-gram.l (handle_dollar, handle_destructor_at)
10434 (handle_action_at): New.
10435 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
10436 a braced_code_t and a location as additional arguments.
10437 (handle_destructor_dollar): Instead of requiring `b4_eval', just
10438 unquote one when outputting `b4_dollar_dollar'.
10439 Adjust callers.
10440 * data/bison.simple (b4_eval): Remove.
10441 (b4_symbol_destructor): Adjust.
10442 * tests/input.at (Invalid @n): Adjust.
10443
10444 2002-06-19 Zack Weinberg <zack@codesourcery.com>
10445
10446 * doc/bison.texinfo: Document ability to have multiple
10447 prologue sections.
10448
10449 2002-06-18 Akim Demaille <akim@epita.fr>
10450
10451 * src/files.c (compute_base_names): When computing the output file
10452 names from the input file name, strip the directory part.
10453
10454 2002-06-18 Akim Demaille <akim@epita.fr>
10455
10456 * data/bison.simple.new: Comment changes.
10457 Reported by Andreas Schwab.
10458
10459 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
10460
10461 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
10462 there are no `label `yyoverflowlab' defined but not used' warnings
10463 when yyoverflow is defined.
10464
10465 2002-06-18 Akim Demaille <akim@epita.fr>
10466
10467 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
10468 new member.
10469 (symbol_destructor_set): Adjust.
10470 * src/output.c (symbol_destructors_output): Output the destructor
10471 locations.
10472 Output the symbol name.
10473 * data/bison.simple (b4_symbol_destructor): Adjust.
10474
10475 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
10476 and Akim Demaille <akim@epita.fr>
10477
10478 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
10479 what's left on the stack when the error recovery hits EOF.
10480 * tests/actions.at (Destructors): Complete to exercise this case.
10481
10482 2002-06-17 Akim Demaille <akim@epita.fr>
10483
10484 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
10485 arguments is really empty, not only equal to `[]'.
10486 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
10487 member.
10488 (symbol_destructor_set): New.
10489 * src/output.c (symbol_destructors_output): New.
10490 * src/reader.h (brace_code_t, current_braced_code): New.
10491 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
10492 (handle_dollar): Rename as...
10493 (handle_action_dollar): this.
10494 (handle_destructor_dollar): New.
10495 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
10496 (grammar_declaration): Use it.
10497 * data/bison.simple (yystos): Is always defined.
10498 (yydestructor): New.
10499 * tests/actions.at (Destructors): New.
10500 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
10501
10502 2002-06-17 Akim Demaille <akim@epita.fr>
10503
10504 * src/symlist.h, src/symlist.c (symbol_list_length): New.
10505 * src/scan-gram.l (handle_dollar, handle_at): Compute the
10506 rule_length only when needed.
10507 * src/output.c (actions_output, token_definitions_output): Output
10508 the full M4 block.
10509 * src/symtab.c: Don't access directly to the symbol tag, use
10510 symbol_tag_get.
10511 * src/parse-gram.y: Use symbol_list_free.
10512
10513 2002-06-17 Akim Demaille <akim@epita.fr>
10514
10515 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
10516 (symbol_list_prepend, get_type_name): Move to...
10517 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
10518 (symbol_list_prepend, symbol_list_n_type_name_get): here.
10519 Adjust all callers.
10520 (symbol_list_free): New.
10521 * src/scan-gram.l (handle_dollar): Takes a location.
10522 * tests/input.at (Invalid $n): Adjust.
10523
10524 2002-06-17 Akim Demaille <akim@epita.fr>
10525
10526 * src/reader.h, src/reader.c (symbol_list_new): Export it.
10527 (symbol_list_prepend): New.
10528 * src/parse-gram.y (%union): `list' is a new member.
10529 (symbols.1): New, replaces...
10530 (terms_to_prec.1, nterms_to_type.1): these.
10531 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
10532 Take a location as additional argument.
10533 Adjust all callers.
10534
10535 2002-06-15 Akim Demaille <akim@epita.fr>
10536
10537 * src/parse-gram.y: Move %token in the declaration section so that
10538 we don't depend upon CVS Bison.
10539
10540 2002-06-15 Akim Demaille <akim@epita.fr>
10541
10542 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
10543 * src/print.c (print_core): Use it.
10544
10545 2002-06-15 Akim Demaille <akim@epita.fr>
10546
10547 * src/conflicts.c (log_resolution): Accept the rule involved in
10548 the sr conflicts instead of the lookahead number that points to
10549 that rule.
10550 (flush_reduce): Accept the current lookahead vector as argument,
10551 instead of the index in LA.
10552 (resolve_sr_conflict): Accept the current number of lookahead
10553 bitset to consider for the STATE, instead of the index in LA.
10554 (set_conflicts): Adjust.
10555 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
10556
10557 2002-06-15 Akim Demaille <akim@epita.fr>
10558
10559 * src/state.h (state_t): Replace the `lookaheadsp' member, a
10560 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
10561 Adjust all dependencies.
10562 * src/lalr.c (initialize_lookaheads): Split into...
10563 (states_lookaheads_count, states_lookaheads_initialize): these.
10564 (lalr): Adjust.
10565
10566 2002-06-15 Akim Demaille <akim@epita.fr>
10567
10568 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
10569 out of...
10570 (grammar_rules_print): here.
10571 * src/reduce.c (reduce_output): Use it.
10572 * tests/reduce.at (Useless Rules, Reduced Automaton)
10573 (Underivable Rules): Adjust.
10574
10575 2002-06-15 Akim Demaille <akim@epita.fr>
10576
10577 Copy BYacc's nice way to report the grammar.
10578
10579 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
10580 New.
10581 Don't print the rules' location, it is confusing and useless.
10582 (rule_print): Use grammar_rhs_print.
10583 * src/print.c (print_grammar): Use grammar_rules_print.
10584
10585 2002-06-15 Akim Demaille <akim@epita.fr>
10586
10587 Complete and rationalize `useless thing' warnings.
10588
10589 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
10590 (symbol_tag_print): New.
10591 Use them everywhere in place of accessing directly the tag member.
10592 * src/gram.h, src/gram.c (rule_print): New.
10593 Use it where a rule used to be printed `by hand'.
10594 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
10595 (reduce_grammar_tables): Report the useless rules.
10596 (reduce_print): Useless things are a warning, not an error.
10597 Report it as such.
10598 * tests/reduce.at (Useless Nonterminals, Useless Rules):
10599 (Reduced Automaton, Underivable Rules): Adjust.
10600 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
10601 * tests/conflicts.at (Unresolved SR Conflicts)
10602 (Solved SR Conflicts): Adjust.
10603
10604 2002-06-15 Akim Demaille <akim@epita.fr>
10605
10606 Let symbols have a location.
10607
10608 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
10609 (getsym): Adjust.
10610 Adjust all callers.
10611 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
10612 Use location_t, not int.
10613 * src/symtab.c (symbol_check_defined): Take advantage of the
10614 location.
10615 * tests/regression.at (Invalid inputs): Adjust.
10616
10617 2002-06-15 Akim Demaille <akim@epita.fr>
10618
10619 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
10620 (input): Don't try to initialize yylloc here, do it in the
10621 scanner.
10622 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
10623 * src/gram.h (rule_t): Change line and action_line into location
10624 and action_location, of location_t type.
10625 Adjust all dependencies.
10626 * src/location.h, src/location.c (empty_location): New.
10627 * src/reader.h, src/reader.c (grammar_start_symbol_set)
10628 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
10629 (grammar_current_rule_symbol_append)
10630 (grammar_current_rule_action_append): Expect a location as argument.
10631 * src/reader.c (grammar_midrule_action): Adjust to attach an
10632 action's location as dummy symbol location.
10633 * src/symtab.h, src/symtab.c (startsymbol_location): New.
10634 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
10635 the line numbers.
10636
10637 2002-06-14 Akim Demaille <akim@epita.fr>
10638
10639 Grammar declarations may be found in the grammar section.
10640
10641 * src/parse-gram.y (rules_or_grammar_declaration): New.
10642 (declarations): Each declaration may end with a semicolon, not
10643 just...
10644 (grammar_declaration): `"%union"'.
10645 (grammar): Branch to rules_or_grammar_declaration.
10646
10647 2002-06-14 Akim Demaille <akim@epita.fr>
10648
10649 * src/main.c (main): Invoke scanner_free.
10650
10651 2002-06-14 Akim Demaille <akim@epita.fr>
10652
10653 * src/output.c (m4_invoke): Extracted from...
10654 (output_skeleton): here.
10655 Free tempfile.
10656
10657 2002-06-14 Akim Demaille <akim@epita.fr>
10658
10659 * src/parse-gram.y (directives, directive, gram)
10660 (grammar_directives, precedence_directives, precedence_directive):
10661 Rename as...
10662 (declarations, declaration, grammar, grammar_declaration)
10663 (precedence_declaration, precedence_declarator): these.
10664 (symbol_declaration): New.
10665
10666 2002-06-14 Akim Demaille <akim@epita.fr>
10667
10668 * src/files.c (action_obstack): Remove, unused.
10669 (output_obstack): Remove it, and all its dependencies, as it is no
10670 longer needed.
10671 * src/reader.c (epilogue_set): Build the epilogue in the
10672 muscle_obstack.
10673 * src/output.h, src/output.c (muscle_obstack): Move to...
10674 * src/muscle_tab.h, src/muscle_tab.h: here.
10675 (muscle_init): Initialize muscle_obstack.
10676 (muscle_free): New.
10677 * src/main.c (main): Call it.
10678
10679 2002-06-14 Akim Demaille <akim@epita.fr>
10680
10681 * src/location.h: New, extracted from...
10682 * src/reader.h: here.
10683 * src/Makefile.am (noinst_HEADERS): Merge into
10684 (bison_SOURCES): this.
10685 Add location.h.
10686 * src/parse-gram.y: Use location_t instead of Bison's.
10687 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
10688 Use location_t instead of ints.
10689
10690 2002-06-14 Akim Demaille <akim@epita.fr>
10691
10692 * data/bison.simple, data/bison.c++: Be sure to restore the
10693 current #line when returning to the skeleton contents after having
10694 exposed the input file's #line.
10695
10696 2002-06-12 Akim Demaille <akim@epita.fr>
10697
10698 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
10699 eager.
10700 * tests/actions.at (Exotic Dollars): New.
10701
10702 2002-06-12 Akim Demaille <akim@epita.fr>
10703
10704 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
10705 ['"/] too eagerly.
10706 * tests/input.at (Torturing the Scanner): New.
10707
10708 2002-06-11 Akim Demaille <akim@epita.fr>
10709
10710 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
10711 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
10712 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
10713 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
10714 * src/reader.c (reader): Use it.
10715
10716 2002-06-11 Akim Demaille <akim@epita.fr>
10717
10718 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
10719 Adjust all callers.
10720 (scanner_last_string_free): New.
10721
10722 2002-06-11 Akim Demaille <akim@epita.fr>
10723
10724 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
10725 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
10726 (last_string, YY_OBS_FREE): New.
10727 Use them when returning an ID.
10728
10729 2002-06-11 Akim Demaille <akim@epita.fr>
10730
10731 Have Bison grammars parsed by a Bison grammar.
10732
10733 * src/reader.c, src/reader.h (prologue_augment): New.
10734 * src/reader.c (copy_definition): Remove.
10735
10736 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
10737 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
10738 (grammar_current_rule_prec_set, grammar_current_rule_check)
10739 (grammar_current_rule_symbol_append)
10740 (grammar_current_rule_action_append): Export.
10741 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
10742 (symbol_list_action_append): Remove.
10743 Hook the routines from reader.
10744 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
10745 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
10746
10747 * src/reader.c (read_declarations): Remove, unused.
10748
10749 * src/parse-gram.y: Handle the epilogue.
10750 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
10751 (grammar_start_symbol_set): this.
10752 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
10753 * src/reader.c (readgram): Remove, unused.
10754 (reader): Adjust to insert eoftoken and axiom where appropriate.
10755
10756 * src/reader.c (copy_dollar): Replace with...
10757 * src/scan-gram.h (handle_dollar): this.
10758 * src/parse-gram.y: Remove `%thong'.
10759
10760 * src/reader.c (copy_at): Replace with...
10761 * src/scan-gram.h (handle_at): this.
10762
10763 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
10764 New.
10765
10766 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
10767 time being.
10768
10769 * src/reader.h, src/reader.c (grammar_rule_end): New.
10770
10771 * src/parse.y (current_type, current_class): New.
10772 Implement `%nterm', `%token' support.
10773 Merge `%term' into `%token'.
10774 (string_as_id): New.
10775 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
10776 type name.
10777
10778 * src/parse-gram.y: Be sure to handle properly the beginning of
10779 rules.
10780
10781 * src/parse-gram.y: Handle %type.
10782 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
10783
10784 * src/parse-gram.y: More directives support.
10785 * src/options.c: No longer handle source directives.
10786
10787 * src/parse-gram.y: Fix %output.
10788
10789 * src/parse-gram.y: Handle %union.
10790 Use the prologue locations.
10791 * src/reader.c (parse_union_decl): Remove.
10792
10793 * src/reader.h, src/reader.c (epilogue_set): New.
10794 * src/parse-gram.y: Use it.
10795
10796 * data/bison.simple, data/bison.c++: b4_stype is now either not
10797 defined, then default to int, or to the contents of %union,
10798 without `union' itself.
10799 Adjust.
10800 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
10801
10802 * src/output.c (actions_output): Don't output braces, as they are
10803 already handled by the scanner.
10804
10805 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
10806 characters to themselves.
10807
10808 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
10809 that the epilogue has a proper #line.
10810
10811 * src/parse-gram.y: Handle precedence/associativity.
10812
10813 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
10814 a terminal.
10815 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
10816 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
10817 at all to define terminals that cannot be emitted.
10818
10819 * src/scan-gram.l: Escape M4 characters.
10820
10821 * src/scan-gram.l: Working properly with escapes in user
10822 strings/characters.
10823
10824 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
10825 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
10826 grammar.
10827 Use more modest sizes, as for the time being the parser does not
10828 release memory, and therefore the process swallows a huge amount
10829 of memory.
10830
10831 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
10832 stricter %token grammar.
10833
10834 * src/symtab.h (associativity): Add `undef_assoc'.
10835 (symbol_precedence_set): Do nothing when passed an undef_assoc.
10836 * src/symtab.c (symbol_check_alias_consistence): Adjust.
10837
10838 * tests/regression.at (Invalid %directive): Remove, as it is now
10839 meaningless.
10840 (Invalid inputs): Adjust to the new error messages.
10841 (Token definitions): The new grammar doesn't allow too many
10842 eccentricities.
10843
10844 * src/lex.h, src/lex.c: Remove.
10845 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
10846 (copy_character, copy_string2, copy_string, copy_identifier)
10847 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
10848 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
10849 (parse_action): Remove.
10850 * po/POTFILES.in: Adjust.
10851
10852 2002-06-11 Akim Demaille <akim@epita.fr>
10853
10854 * src/reader.c (parse_action): Don't store directly into the
10855 rule's action member: return the action as a string.
10856 Don't require `rule_length' as an argument: compute it.
10857 (grammar_current_rule_symbol_append)
10858 (grammar_current_rule_action_append): New, eved out from
10859 (readgram): here.
10860 Remove `action_flag', `rulelength', unused now.
10861
10862 2002-06-11 Akim Demaille <akim@epita.fr>
10863
10864 * src/reader.c (grammar_current_rule_prec_set).
10865 (grammar_current_rule_check): New, eved out from...
10866 (readgram): here.
10867 Remove `xaction', `first_rhs': useless.
10868 * tests/input.at (Type clashes): New.
10869 * tests/existing.at (GNU Cim Grammar): Adjust.
10870
10871 2002-06-11 Akim Demaille <akim@epita.fr>
10872
10873 * src/reader.c (grammar_midrule_action): New, Eved out from
10874 (readgram): here.
10875
10876 2002-06-11 Akim Demaille <akim@epita.fr>
10877
10878 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
10879 New.
10880 (readgram): Use them as replacement of inlined code, crule and
10881 crule1.
10882
10883 2002-06-11 Akim Demaille <akim@epita.fr>
10884
10885 * src/reader.c (grammar_end, grammar_symbol_append): New.
10886 (readgram): Use them.
10887 Make the use of `p' as local as possible.
10888
10889 2002-06-10 Akim Demaille <akim@epita.fr>
10890
10891 GCJ's parser requires the tokens to be defined before the prologue.
10892
10893 * data/bison.simple: Output the token definition before the user's
10894 prologue.
10895 * tests/regression.at (Braces parsing, Duplicate string)
10896 (Mixing %token styles): Check the output from bison.
10897 (Early token definitions): New.
10898
10899 2002-06-10 Akim Demaille <akim@epita.fr>
10900
10901 * src/symtab.c (symbol_user_token_number_set): Don't complain when
10902 assigning twice the same user number to a token, so that we can
10903 use it in...
10904 * src/lex.c (lex): here.
10905 Also use `symbol_class_set' instead of hand written code.
10906 * src/reader.c (parse_assoc_decl): Likewise.
10907
10908 2002-06-10 Akim Demaille <akim@epita.fr>
10909
10910 * src/symtab.c, src/symtab.c (symbol_class_set)
10911 (symbol_user_token_number_set): New.
10912 * src/reader.c (parse_token_decl): Use them.
10913 Use a switch instead of ifs.
10914 Use a single argument.
10915
10916 2002-06-10 Akim Demaille <akim@epita.fr>
10917
10918 Remove `%thong' support as it is undocumented, unused, duplicates
10919 `%token's job, and creates useless e-mail traffic with people who
10920 want to know what it is, why it is undocumented, unused, and
10921 duplicates `%token's job.
10922
10923 * src/reader.c (parse_thong_decl): Remove.
10924 * src/options.c (option_table): Remove "thong".
10925 * src/lex.h (tok_thong): Remove.
10926
10927 2002-06-10 Akim Demaille <akim@epita.fr>
10928
10929 * src/symtab.c, src/symtab.c (symbol_type_set)
10930 (symbol_precedence_set): New.
10931 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
10932 (value_components_used): Remove, unused.
10933
10934 2002-06-09 Akim Demaille <akim@epita.fr>
10935
10936 Move symbols handling code out of the reader.
10937
10938 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
10939 (axiom): Move to...
10940 * src/symtab.h, src/symtab.c: here.
10941
10942 * src/gram.c (start_symbol): Remove: use startsymbol->number.
10943 * src/reader.c (startval): Rename as...
10944 * src/symtab.h, src/symtab.c (startsymbol): this.
10945 * src/reader.c: Adjust.
10946
10947 * src/reader.c (symbol_check_defined, symbol_make_alias)
10948 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
10949 (token_translations_init)
10950 Move to...
10951 * src/symtab.c: here.
10952 * src/reader.c (packsymbols): Move to...
10953 * src/symtab.h, src/symtab.c (symbols_pack): here.
10954 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
10955 argument.
10956
10957 2002-06-03 Akim Demaille <akim@epita.fr>
10958
10959 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
10960 then statements.
10961
10962 2002-06-03 Akim Demaille <akim@epita.fr>
10963
10964 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
10965 structs with non literals.
10966 * src/scan-skel.l: never-interactive.
10967 * src/conflicts.c (enum conflict_resolution_e): No trailing
10968 comma.
10969 * src/getargs.c (usage): Split long literal strings.
10970 Reported by Hans Aberg.
10971
10972 2002-05-28 Akim Demaille <akim@epita.fr>
10973
10974 * data/bison.c++: Use C++ ostreams.
10975 (cdebug_): New member.
10976
10977 2002-05-28 Akim Demaille <akim@epita.fr>
10978
10979 * src/output.c (output_skeleton): Be sure to allocate enough room
10980 for `/' _and_ for `\0' in full_skeleton.
10981
10982 2002-05-28 Akim Demaille <akim@epita.fr>
10983
10984 * data/bison.c++: Catch up with bison.simple:
10985 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10986 and Paul Eggert <eggert@twinsun.com>: `error' handing.
10987 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
10988 and popping traces.
10989
10990 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10991
10992 * src/output.c (output_skeleton): Put an explicit path in front of
10993 the skeleton file name, rather than relying on the -I directory,
10994 to partially alleviate effects of having a skeleton file lying around
10995 in the current directory.
10996
10997 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10998
10999 * src/conflicts.c (log_resolution): Correct typo:
11000 obstack_printf should be obstack_fgrow1.
11001
11002 2002-05-26 Akim Demaille <akim@epita.fr>
11003
11004 * src/state.h (state_t): `solved_conflicts' is a new member.
11005 * src/LR0.c (new_state): Set it to 0.
11006 * src/conflicts.h, src/conflicts.c (print_conflicts)
11007 (free_conflicts, solve_conflicts): Rename as...
11008 (conflicts_print, conflicts_free, conflicts_solve): these.
11009 Adjust callers.
11010 * src/conflicts.c (enum conflict_resolution_e)
11011 (solved_conflicts_obstack): New, used by...
11012 (log_resolution): this.
11013 Adjust to attach the conflict resolution to each state.
11014 Complete the description with the precedence/associativity
11015 information.
11016 (resolve_sr_conflict): Adjust.
11017 * src/print.c (print_state): Output its solved_conflicts.
11018 * tests/conflicts.at (Unresolved SR Conflicts)
11019 (Solved SR Conflicts): Exercise --report=all.
11020
11021 2002-05-26 Akim Demaille <akim@epita.fr>
11022
11023 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
11024 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
11025 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
11026 (token_number_t, item_number_as_token_number)
11027 (token_number_as_item_number, muscle_insert_token_number_table):
11028 Rename as...
11029 (symbol_number_t, item_number_as_symbol_number)
11030 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
11031 these, since it is more appropriate.
11032
11033 2002-05-26 Akim Demaille <akim@epita.fr>
11034
11035 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
11036 `Error:' lines.
11037 * data/bison.simple (yystos) [YYDEBUG]: New.
11038 (yyparse) [YYDEBUG]: Display the symbols which are popped during
11039 error recovery.
11040 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
11041
11042 2002-05-25 Akim Demaille <akim@epita.fr>
11043
11044 * doc/bison.texinfo (Debugging): Split into...
11045 (Tracing): this new section, its former contents, and...
11046 (Understanding): this new section.
11047 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
11048 by...
11049 (report_flag): this.
11050 Adjust all dependencies.
11051 (report_args, report_types, report_argmatch): New.
11052 (usage, getargs): Report/support -r, --report.
11053 * src/options.h
11054 (struct option_table_struct): Rename as..,
11055 (struct option_table_s): this.
11056 Rename the `set_flag' member to `flag' to match with getopt_long's
11057 struct.
11058 * src/options.c (option_table): Split verbose into an entry for
11059 %verbose, and another for --verbose.
11060 Support --report/-r, so remove -r from the obsolete --raw.
11061 * src/print.c: Attach full item sets and lookaheads reports to
11062 report_flag instead of trace_flag.
11063 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
11064
11065 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11066 and Paul Eggert <eggert@twinsun.com>
11067
11068 * data/bison.simple (yyparse): Correct error handling to conform to
11069 POSIX and yacc. Specifically, after syntax error is discovered,
11070 do not reduce further before shifting the error token.
11071 Clean up the code a bit by removing the labels yyerrdefault,
11072 yyerrhandle, yyerrpop.
11073 * NEWS: Document the above.
11074
11075 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11076
11077 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
11078 type; it isn't always big enough, since it doesn't necessarily
11079 include non-terminals.
11080 (yytranslate): Expand definition of yy_token_number_type, so that
11081 the latter can be removed.
11082 (yy_token_number_type): Remove, only one use.
11083 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
11084 don't use TokenNumberType as element type.
11085
11086 * tests/regression.at: Modify expected output to agree with change
11087 to yyr1 and yytranslate.
11088
11089 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
11090
11091 * src/reader.c (parse_action): Use copy_character instead of
11092 obstack_1grow.
11093
11094 2002-05-13 Akim Demaille <akim@epita.fr>
11095
11096 * tests/regression.at (Token definitions): Prototype yylex and
11097 yyerror.
11098
11099 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11100
11101 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
11102 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
11103 32-bit arithmetic.
11104 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
11105
11106 2002-05-07 Akim Demaille <akim@epita.fr>
11107
11108 * tests/synclines.at: Be sure to prototype yylex and yyerror to
11109 avoid GCC warnings.
11110
11111 2002-05-07 Akim Demaille <akim@epita.fr>
11112
11113 Kill GCC warnings.
11114
11115 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
11116 over the RHS of each rule.
11117 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
11118 * src/state.h (state_t): Member `nitems' is unsigned short.
11119 * src/LR0.c (get_state): Adjust.
11120 * src/reader.c (packgram): Likewise.
11121 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
11122 `Type'.
11123 (muscle_insert_int_table): Remove, unused.
11124 (prepare_rules): Remove `max'.
11125
11126 2002-05-06 Akim Demaille <akim@epita.fr>
11127
11128 * src/closure.c (print_firsts): Display of the symbol tags.
11129 (bitmatrix_print): Move to...
11130 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
11131 here.
11132 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
11133
11134 2002-05-06 Akim Demaille <akim@epita.fr>
11135
11136 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
11137 hash_do_for_each.
11138
11139 2002-05-06 Akim Demaille <akim@epita.fr>
11140
11141 * src/LR0.c (new_state, get_state): Instead of using the global
11142 `kernel_size' and `kernel_base', have two new arguments:
11143 `core_size' and `core'.
11144 Adjust callers.
11145
11146 2002-05-06 Akim Demaille <akim@epita.fr>
11147
11148 * src/reader.c (packgram): No longer end `ritem' with a 0
11149 sentinel: it is not used.
11150
11151 2002-05-05 Akim Demaille <akim@epita.fr>
11152
11153 New experimental feature: display the lookaheads in the report and
11154 graph.
11155
11156 * src/print (print_core): When --trace-flag, display the rules
11157 lookaheads.
11158 * src/print_graph.c (print_core): Likewise.
11159 Swap the arguments.
11160 Adjust caller.
11161
11162 2002-05-05 Akim Demaille <akim@epita.fr>
11163
11164 * tests/torture.at (Many lookaheads): New test.
11165
11166 2002-05-05 Akim Demaille <akim@epita.fr>
11167
11168 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
11169 (GENERATE_MUSCLE_INSERT_TABLE): this.
11170 (output_int_table, output_unsigned_int_table, output_short_table)
11171 (output_token_number_table, output_item_number_table): Replace with...
11172 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
11173 (muscle_insert_short_table, muscle_insert_token_number_table)
11174 (muscle_insert_item_number_table): these.
11175 Adjust all callers.
11176 (prepare_tokens): Don't free `translations', since...
11177 * src/reader.h, src/reader.c (grammar_free): do it.
11178 Move to...
11179 * src/gram.h, src/gram.c (grammar_free): here.
11180 * data/bison.simple, data/bison.c++: b4_token_number_max is now
11181 b4_translate_max.
11182
11183 2002-05-05 Akim Demaille <akim@epita.fr>
11184
11185 * src/output.c (output_unsigned_int_table): New.
11186 (prepare_rules): `i' is unsigned.
11187 `prhs', `rline', `r2' are unsigned int.
11188 Rename muscle `rhs_number_max' as `rhs_max'.
11189 Output muscles `prhs_max', `rline_max', and `r2_max'.
11190 Free rline and r1.
11191 * data/bison.simple, data/bison.c++: Adjust to use these muscles
11192 to compute types instead of constant types.
11193 * tests/regression.at (Web2c Actions): Adjust.
11194
11195 2002-05-04 Akim Demaille <akim@epita.fr>
11196
11197 * src/symtab.h (SALIAS, SUNDEF): Rename as...
11198 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
11199 Adjust dependencies.
11200 * src/output.c (token_definitions_output): Be sure not to output a
11201 `#define 'a'' when fed with `%token 'a' "a"'.
11202 * tests/regression.at (Token definitions): New.
11203
11204 2002-05-03 Paul Eggert <eggert@twinsun.com>
11205
11206 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
11207 for K&R C.
11208
11209 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
11210
11211 * Makefile.am (SUBDIRS): Remove intl.
11212 (EXTRA_DIST): Add config/config.rpath.
11213
11214 2002-05-03 Akim Demaille <akim@epita.fr>
11215
11216 * data/bison.simple (m4_if): Don't output empty enums.
11217 And actually, output valid enum definitions :(.
11218
11219 2002-05-03 Akim Demaille <akim@epita.fr>
11220
11221 * configure.bat: Remove, completely obsolete.
11222 * Makefile.am (EXTRA_DIST): Adjust.
11223 Don't distribute config.rpath...
11224 * config/Makefile.am (EXTRA_DIST): Do it.
11225
11226 2002-05-03 Akim Demaille <akim@epita.fr>
11227
11228 * configure.in (GETTEXT_VERSION): New.
11229 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
11230
11231 2002-05-03 Akim Demaille <akim@epita.fr>
11232
11233 * data/bison.simple (b4_token_enum): New.
11234 (b4_token_defines): Use it to output tokens both as #define and
11235 enums.
11236 Suggested by Paul Eggert.
11237 * src/output.c (token_definitions_output): Don't output spurious
11238 white spaces.
11239
11240 2002-05-03 Akim Demaille <akim@epita.fr>
11241
11242 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
11243
11244 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
11245
11246 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
11247 Update the stack class, give a try to deque as the default container.
11248
11249 2002-05-02 Akim Demaille <akim@epita.fr>
11250
11251 * data/bison.simple (yyparse): Do not implement @$ = @1.
11252 (YYLLOC_DEFAULT): Adjust to do it.
11253 * doc/bison.texinfo (Location Default Action): Fix.
11254
11255 2002-05-02 Akim Demaille <akim@epita.fr>
11256
11257 * src/reader.c (parse_braces): Merge into...
11258 (parse_action): this.
11259
11260 2002-05-02 Akim Demaille <akim@epita.fr>
11261
11262 * configure.in (ALL_LINGUAS): Remove.
11263 * po/LINGUAS, hr.po: New.
11264
11265 2002-05-02 Akim Demaille <akim@epita.fr>
11266
11267 Remove the so called hairy (semantic) parsers.
11268
11269 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
11270 * src/gram.h, src/gram.c (semantic_parser): Remove.
11271 (rule_t): Remove the guard and guard_line members.
11272 * src/lex.h (token_t): remove tok_guard.
11273 * src/options.c (option_table): Remove %guard and %semantic_parser
11274 support.
11275 * src/output.c, src/output.h (guards_output): Remove.
11276 (prepare): Adjust.
11277 (token_definitions_output): Don't output the `T'
11278 tokens (???).
11279 (output_skeleton): Don't output the guards.
11280 * src/files.c, src/files.c (attrsfile): Remove.
11281 * src/reader.c (symbol_list): Remove the guard and guard_line
11282 members.
11283 Adjust dependencies.
11284 (parse_guard): Remove.
11285 * data/bison.hairy: Remove.
11286 * doc/bison.texinfo (Environment Variables): Remove occurrences of
11287 BISON_HAIRY.
11288
11289 2002-05-02 Akim Demaille <akim@epita.fr>
11290
11291 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
11292 (parse_guard): Rename the formal argument `stack_offset' as
11293 `rule_length', which is more readable.
11294 Adjust callers.
11295 (copy_at, copy_dollar): Instead of outputting the hard coded
11296 values of $$, $n and so forth, output invocation to b4_lhs_value,
11297 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
11298 Note: this patch partially drops `semantic-parser' support: it
11299 always does `rule_length - n', where semantic parsers ought to
11300 always use `-n'.
11301 * data/bison.simple, data/bison.c++ (b4_lhs_value)
11302 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
11303
11304 2002-05-02 Akim Demaille <akim@epita.fr>
11305
11306 * configure.in (AC_INIT): Bump to 1.49b.
11307 (AM_INIT_AUTOMAKE): Short invocation.
11308
11309 2002-05-02 Akim Demaille <akim@epita.fr>
11310
11311 Version 1.49a.
11312
11313 2002-05-01 Akim Demaille <akim@epita.fr>
11314
11315 * src/skeleton.h: Remove.
11316
11317 2002-05-01 Akim Demaille <akim@epita.fr>
11318
11319 * src/skeleton.h: Fix the #endif.
11320 Reported by Magnus Fromreide.
11321
11322 2002-04-26 Paul Eggert <eggert@twinsun.com>
11323
11324 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
11325 Define if we define YYSTYPE and YYLTYPE, respectively.
11326 (YYCOPY): Fix [] quoting problem in the non-GCC case.
11327
11328 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
11329
11330 * src/scan-skel.l: Postprocess quadrigraphs.
11331
11332 * src/reader.c (copy_character): New function, used to output
11333 single characters while replacing `[' and `]' with quadrigraphs, to
11334 avoid troubles with M4 quotes.
11335 (copy_comment): Output characters with copy_character.
11336 (read_additionnal_code): Likewise.
11337 (copy_string2): Likewise.
11338 (copy_definition): Likewise.
11339
11340 * tests/calc.at: Exercise M4 quoting.
11341
11342 2002-04-25 Akim Demaille <akim@epita.fr>
11343
11344 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
11345 between `!' and the command.
11346 Reported by Paul Eggert.
11347
11348 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
11349
11350 * tests/calc.at: Exercise prologue splitting.
11351
11352 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
11353 `b4_post_prologue' instead of `b4_prologue'.
11354
11355 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
11356 muscles.
11357 (output): Free pre_prologue_obstack and post_prologue_obstack.
11358 * src/files.h, src/files.c (attrs_obstack): Remove.
11359 (pre_prologue_obstack, post_prologue_obstack): New.
11360 * src/reader.c (copy_definition): Add a parameter to specify the
11361 obstack to fill, instead of using attrs_obstack unconditionally.
11362 (read_declarations): Pass pre_prologue_obstack to copy_definition if
11363 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
11364
11365 2002-04-23 Paul Eggert <eggert@twinsun.com>
11366
11367 * data/bison.simple: Remove unnecessary commentary and white
11368 space differences from 1_29-branch.
11369 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
11370
11371 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
11372 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
11373 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
11374 constructors or destructors.
11375
11376 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
11377
11378 2002-04-23 Akim Demaille <akim@epita.fr>
11379
11380 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
11381 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
11382 location with columns.
11383 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
11384 All reported by Paul Eggert.
11385
11386 2002-04-22 Akim Demaille <akim@epita.fr>
11387
11388 * src/reduce.c (dump_grammar): Move to...
11389 * src/gram.h, src/gram.c (grammar_dump): here.
11390 Be sure to separate long item numbers.
11391 Don't read the members of a rule's prec if its nil.
11392
11393 2002-04-22 Akim Demaille <akim@epita.fr>
11394
11395 * src/output.c (table_size, table_grow): New.
11396 (MAXTABLE): Remove, replace uses with table_size.
11397 (pack_vector): Instead of dying when the table is too big, grow it.
11398
11399 2002-04-22 Akim Demaille <akim@epita.fr>
11400
11401 * data/bison.simple (yyr1): Its type is that of a token number.
11402 * data/bison.c++ (r1_): Likewise.
11403 * tests/regression.at (Web2c Actions): Adjust.
11404
11405 2002-04-22 Akim Demaille <akim@epita.fr>
11406
11407 * src/reader.c (token_translations_init): 256 is now the default
11408 value for the error token, i.e., it will be assigned another
11409 number if the user assigned 256 to one of her tokens.
11410 (reader): Don't force 256 to error.
11411 * doc/bison.texinfo (Symbols): Adjust.
11412 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
11413 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
11414 etc. instead of 10, 20, 30 (which was used to `jump' over error
11415 (256) and undefined (2)).
11416
11417 2002-04-22 Akim Demaille <akim@epita.fr>
11418
11419 Propagate more token_number_t.
11420
11421 * src/gram.h (token_number_as_item_number)
11422 (item_number_as_token_number): New.
11423 * src/output.c (GENERATE_OUTPUT_TABLE): New.
11424 Use it to create output_item_number_table and
11425 output_token_number_table.
11426 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
11427 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
11428 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
11429 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
11430
11431 2002-04-22 Akim Demaille <akim@epita.fr>
11432
11433 * src/output.h, src/output.c (get_lines_number): Remove.
11434
11435 2002-04-19 Akim Demaille <akim@epita.fr>
11436
11437 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
11438 as Lex/Flex'.
11439 (Debugging): More details about enabling the debugging features.
11440 (Table of Symbols): Describe $$, $n, @$, and @n.
11441 Suggested by Tim Josling.
11442
11443 2002-04-19 Akim Demaille <akim@epita.fr>
11444
11445 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
11446
11447 2002-04-10 Akim Demaille <akim@epita.fr>
11448
11449 * src/system.h: Rely on HAVE_LIMITS_H.
11450 Suggested by Paul Eggert.
11451
11452 2002-04-09 Akim Demaille <akim@epita.fr>
11453
11454 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
11455 full stderr, and strip it according to the bison options, instead
11456 of composing the error message from different bits.
11457 This makes it easier to check for several error messages.
11458 Adjust all the invocations.
11459 Add an invocation exercising the error token.
11460 Add an invocation demonstrating a stupid error message.
11461 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
11462 Adjust the tests.
11463 Error message are for stderr, not stdout.
11464
11465 2002-04-09 Akim Demaille <akim@epita.fr>
11466
11467 * src/gram.h, src/gram.c (error_token_number): Remove, use
11468 errtoken->number.
11469 * src/reader.c (reader): Don't specify the user token number (2)
11470 for $undefined, as it uselessly prevents using it.
11471 * src/gram.h (token_number_t): Move to...
11472 * src/symtab.h: here.
11473 (state_t.number): Is a token_number_t.
11474 * src/print.c, src/reader.c: Use undeftoken->number instead of
11475 hard coded 2.
11476 (Even though this 2 is not the same as above: the number of the
11477 undeftoken remains being 2, it is its user token number which
11478 might not be 2).
11479 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
11480 `user_token_number_max'.
11481 Output `undef_token_number'.
11482 * data/bison.simple, data/bison.c++: Use them.
11483 Be sure to map invalid yylex return values to
11484 `undef_token_number'. This saves us from gratuitous SEGV.
11485
11486 * tests/conflicts.at (Solved SR Conflicts)
11487 (Unresolved SR Conflicts): Adjust.
11488 * tests/regression.at (Web2c Actions): Adjust.
11489
11490 2002-04-08 Akim Demaille <akim@epita.fr>
11491
11492 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
11493 Adding #line.
11494 Remove the duplicate `typedefs'.
11495 (RhsNumberType): Fix the declaration and various other typos.
11496 Use __ofile__.
11497 * data/bison.simple: Use __ofile__.
11498 * src/scan-skel.l: Handle __ofile__.
11499
11500 2002-04-08 Akim Demaille <akim@epita.fr>
11501
11502 * src/gram.h (item_number_t): New, the type of item numbers in
11503 RITEM. Note that it must be able to code symbol numbers as
11504 positive number, and the negation of rule numbers as negative
11505 numbers.
11506 Adjust all dependencies (pretty many).
11507 * src/reduce.c (rule): Remove this `short *' pointer: use
11508 item_number_t.
11509 * src/system.h (MINSHORT, MAXSHORT): Remove.
11510 Include `limits.h'.
11511 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
11512 (shortcpy): Remove.
11513 (MAXTABLE): Move to...
11514 * src/output.c (MAXTABLE): here.
11515 (prepare_rules): Use output_int_table to output rhs.
11516 * data/bison.simple, data/bison.c++: Adjust.
11517 * tests/torture.at (Big triangle): Move the limit from 254 to
11518 500.
11519 * tests/regression.at (Web2c Actions): Ajust.
11520
11521 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
11522 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
11523 passes, but produces negative #line number, once fixed, GCC is
11524 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
11525 C), it passes.
11526 * src/state.h (state_h): Code input lines on ints, not shorts.
11527
11528 2002-04-08 Akim Demaille <akim@epita.fr>
11529
11530 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
11531 and then the grammar.
11532
11533 2002-04-08 Akim Demaille <akim@epita.fr>
11534
11535 * src/system.h: No longer using strndup.
11536
11537 2002-04-07 Akim Demaille <akim@epita.fr>
11538
11539 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
11540 * src/output.c (output_table_data): Return the longest number.
11541 (prepare_tokens): Output `token_number_max').
11542 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
11543 New.
11544 Use them to define yy_token_number_type/TokenNumberType.
11545 Use this type for yytranslate.
11546 * tests/torture.at (Big triangle): Push the limit from 124 to
11547 253.
11548 * tests/regression.at (Web2c Actions): Adjust.
11549
11550 2002-04-07 Akim Demaille <akim@epita.fr>
11551
11552 * tests/torture.at (Big triangle): New.
11553 (GNU AWK Grammar, GNU Cim Grammar): Move to...
11554 * tests/existing.at: here.
11555
11556 2002-04-07 Akim Demaille <akim@epita.fr>
11557
11558 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
11559 nritems.
11560 Adjust dependencies.
11561
11562 2002-04-07 Akim Demaille <akim@epita.fr>
11563
11564 * src/reader.c: Normalize increments to prefix form.
11565
11566 2002-04-07 Akim Demaille <akim@epita.fr>
11567
11568 * src/reader.c, symtab.c: Remove debugging code.
11569
11570 2002-04-07 Akim Demaille <akim@epita.fr>
11571
11572 Rename all the `bucket's as `symbol_t'.
11573
11574 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
11575 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
11576 * src/symtab.c, src/symtab.h (bucket): Rename as...
11577 (symbol_t): this.
11578 (symbol_list_new, bucket_check_defined, bucket_make_alias)
11579 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
11580 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
11581 (buckets_new, buckets_free, buckets_do): Rename as...
11582 (symbol_list_new, symbol_check_defined, symbol_make_alias)
11583 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
11584 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
11585 (symbols_new, symbols_free, symbols_do): these.
11586
11587 2002-04-07 Akim Demaille <akim@epita.fr>
11588
11589 Use lib/hash for the symbol table.
11590
11591 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
11592 EOF.
11593 * src/lex.c (lex): Set the `number' member of new terminals.
11594 * src/reader.c (bucket_check_defined, bucket_make_alias)
11595 (bucket_check_alias_consistence, bucket_translation): New.
11596 (reader, grammar_free, readgram, token_translations_init)
11597 (packsymbols): Adjust.
11598 (reader): Number the predefined tokens.
11599 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
11600 for predefined tokens.
11601 * src/symtab.h (bucket): Remove all the hash table related
11602 members.
11603 * src/symtab.c (symtab): Replace by...
11604 (bucket_table): this.
11605 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
11606 (buckets_new, buckets_do): New.
11607
11608 2002-04-07 Akim Demaille <akim@epita.fr>
11609
11610 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
11611 (start_symbol, max_user_token_number, semantic_parser)
11612 (error_token_number): Initialize.
11613 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
11614 Initialize.
11615 (reader): Don't.
11616 (errtoken, eoftoken, undeftoken, axiom): Extern.
11617
11618 2002-04-07 Akim Demaille <akim@epita.fr>
11619
11620 * src/gram.h (rule_s): prec and precsym are now pointers
11621 to the bucket giving the priority/associativity.
11622 Member `associativity' removed: useless.
11623 * src/reduce.c, src/conflicts.c: Adjust.
11624
11625 2002-04-07 Akim Demaille <akim@epita.fr>
11626
11627 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
11628 Properly escape the symbols' TAG when outputting them.
11629
11630 2002-04-07 Akim Demaille <akim@epita.fr>
11631
11632 * src/lalr.h (LA): Is a bitsetv, not bitset*.
11633
11634 2002-04-07 Akim Demaille <akim@epita.fr>
11635
11636 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
11637 (LArule): this, which is an array to rule_t*.
11638 * src/print.c, src/conflicts.c: Adjust.
11639
11640 2002-04-07 Akim Demaille <akim@epita.fr>
11641
11642 * src/gram.h (rule_t): Rename `number' as `user_number'.
11643 `number' is a new member.
11644 Adjust dependencies.
11645 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
11646
11647 2002-04-07 Akim Demaille <akim@epita.fr>
11648
11649 As a result of the previous patch, it is no longer needed
11650 to reorder ritem itself.
11651
11652 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
11653
11654 2002-04-07 Akim Demaille <akim@epita.fr>
11655
11656 Be sure never to walk through RITEMS, but use only data related to
11657 the rules themselves. RITEMS should be banished.
11658
11659 * src/output.c (output_token_translations): Rename as...
11660 (prepare_tokens): this.
11661 In addition to `translate', prepare the muscles `tname' and
11662 `toknum', which were handled by...
11663 (output_rule_data): this.
11664 Remove, and move the remainder of its outputs into...
11665 (prepare_rules): this new routines, which also merges content from
11666 (output_gram): this.
11667 (prepare_rules): Be sure never to walk through RITEMS.
11668 (output_stos): Rename as...
11669 (prepare_stos): this.
11670 (output): Always invoke prepare_states, after all, just don't use it
11671 in the output if you don't need it.
11672
11673 2002-04-07 Akim Demaille <akim@epita.fr>
11674
11675 * src/LR0.c (new_state): Display `nstates' as the name of the
11676 newly created state.
11677 Adjust to initialize first_state and last_state if needed.
11678 Be sure to distinguish the initial from the final state.
11679 (new_states): Create the itemset of the initial state, and use
11680 new_state.
11681 * src/closure.c (closure): Now that the initial state has its
11682 items properly set, there is no need for a special case when
11683 creating `ruleset'.
11684
11685 As a result, now the rule 0, reducing to $axiom, is visible in the
11686 outputs. Adjust the test suite.
11687
11688 * tests/conflicts.at (Solved SR Conflicts)
11689 (Unresolved SR Conflicts): Adjust.
11690 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
11691 * tests/conflicts.at (S/R in initial): New.
11692
11693 2002-04-07 Akim Demaille <akim@epita.fr>
11694
11695 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
11696 the RHS of the rules.
11697 * src/output.c (output_gram): Likewise.
11698
11699 2002-04-07 Akim Demaille <akim@epita.fr>
11700
11701 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
11702 bucket.
11703 Adjust all dependencies.
11704 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
11705 `number' of the buckets too.
11706 * src/gram.h: Include `symtab.h'.
11707 (associativity): Move to...
11708 * src/symtab.h: here.
11709 No longer include `gram.h'.
11710
11711 2002-04-07 Akim Demaille <akim@epita.fr>
11712
11713 * src/gram.h, src/gram.c (rules_rhs_length): New.
11714 (ritem_longest_rhs): Use it.
11715 * src/gram.h (rule_t): `number' is a new member.
11716 * src/reader.c (packgram): Set it.
11717 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
11718 the end of `rules', and count them out of `nrules'.
11719 (reduce_output, dump_grammar): Adjust.
11720 * src/print.c (print_grammar): It is no longer needed to check for
11721 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
11722 * tests/reduce.at (Reduced Automaton): New test.
11723
11724 2002-04-07 Akim Demaille <akim@epita.fr>
11725
11726 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
11727 lacking `+ 1' to nrules, Bison reported as useless a token if it
11728 was used solely to set the precedence of the last rule...
11729
11730 2002-04-07 Akim Demaille <akim@epita.fr>
11731
11732 * data/bison.c++, data/bison.simple: Don't output the current file
11733 name in #line, to avoid useless diffs between two identical
11734 outputs under different names.
11735
11736 2002-04-07 Akim Demaille <akim@epita.fr>
11737
11738 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
11739 Normalize loops to using `< nrules + 1', not `<= nrules'.
11740
11741 2002-04-07 Akim Demaille <akim@epita.fr>
11742
11743 * TODO: Update.
11744
11745 2002-04-07 Akim Demaille <akim@epita.fr>
11746
11747 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
11748 bucket.value as bucket.number.
11749
11750 2002-04-07 Akim Demaille <akim@epita.fr>
11751
11752 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
11753 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
11754 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
11755 RHS, instead of being an index in RITEMS.
11756
11757 2002-04-04 Paul Eggert <eggert@twinsun.com>
11758
11759 * doc/bison.texinfo: Update copyright date.
11760 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
11761 (Symbols): Warn about running Bison in one character set,
11762 but compiling and/or running in an incompatible one.
11763 Warn about character code 256, too.
11764
11765 2002-04-03 Paul Eggert <eggert@twinsun.com>
11766
11767 * src/bison.data (YYSTACK_ALLOC): Depend on whether
11768 YYERROR_VERBOSE is nonzero, not whether it is defined.
11769
11770 Merge changes from bison-1_29-branch.
11771
11772 2002-03-20 Paul Eggert <eggert@twinsun.com>
11773
11774 Merge fixes from Debian bison_1.34-1.diff.
11775
11776 * configure.in (AC_PREREQ): 2.53.
11777
11778 2002-03-20 Akim Demaille <akim@epita.fr>
11779
11780 * src/conflicts.c (log_resolution): Argument `resolution' is const.
11781
11782 2002-03-19 Paul Eggert <eggert@twinsun.com>
11783
11784 * src/bison.simple (YYCOPY): New macro.
11785 (YYSTACK_RELOCATE): Use it.
11786 Remove Type arg; no longer needed. All callers changed.
11787 (yymemcpy): Remove; no longer needed.
11788
11789 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
11790 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
11791
11792 2002-03-19 Akim Demaille <akim@epita.fr>
11793
11794 Test and fix the #line outputs.
11795
11796 * tests/atlocal.at (GCC): New.
11797 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
11798 (Prologue synch line, %union synch line, Postprologue synch line)
11799 (Action synch line, Epilogue synch line): New tests.
11800 * src/reader.c (parse_union_decl): Define the muscle stype_line.
11801 * data/bison.simple, data/bison.c++: Use it.
11802
11803 2002-03-19 Akim Demaille <akim@epita.fr>
11804
11805 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
11806 (Solved SR Conflicts, %expect not enough, %expect right)
11807 (%expect too much): Move to...
11808 * tests/conflicts.at: this new file.
11809
11810 2002-03-19 Akim Demaille <akim@epita.fr>
11811
11812 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
11813 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
11814 that we can move to enums for instance.
11815 * src/output.c (token_definitions_output): Output a list of
11816 `token-name, token-number' instead of the #define.
11817 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
11818
11819 2002-03-14 Akim Demaille <akim@epita.fr>
11820
11821 Use Gettext 0.11.1.
11822
11823 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
11824
11825 * data/bison.c++: Make the user able to add members to the generated
11826 parser by subclassing.
11827
11828 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
11829
11830 * src/reader.c (read_additionnal_code): `c' should be an integer, not
11831 a character.
11832 Reported by Nicolas Tisserand and Nicolas Burrus.
11833
11834 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
11835
11836 * src/reader.c: Warn about lacking semi-colons, do not complain.
11837
11838 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
11839
11840 * data/bison.c++: Remove a debug line.
11841
11842 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
11843
11844 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
11845 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
11846 provide a default implementation.
11847
11848 2002-03-04 Akim Demaille <akim@epita.fr>
11849
11850 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
11851 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
11852 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
11853 * tests/semantic.at (Parsing Guards): Similarly.
11854 * src/reader.at (readgram): Complain if the last rule is not ended
11855 with a semi-colon.
11856
11857 2002-03-04 Akim Demaille <akim@epita.fr>
11858
11859 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
11860 * src/closure.c: here.
11861 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
11862 RTC.
11863 * src/warshall.h, src/warshall.c: Remove.
11864 * tests/sets.at (Broken Closure): Adjust.
11865
11866 2002-03-04 Akim Demaille <akim@epita.fr>
11867
11868 * src/output.c (output_skeleton): tempdir is const.
11869 bytes_read is unused.
11870
11871 2002-03-04 Akim Demaille <akim@epita.fr>
11872
11873 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
11874 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
11875 Update.
11876 From Michael Hayes.
11877
11878 2002-03-04 Akim Demaille <akim@epita.fr>
11879
11880 * src/closure.c (closure): `r' is unused.
11881
11882 2002-03-04 Akim Demaille <akim@epita.fr>
11883
11884 * tests/sets.at (Broken Closure): Add the ending `;'.
11885 * src/reader.at (readgram): Complain if a rule is not ended with a
11886 semi-colon.
11887
11888 2002-03-04 Akim Demaille <akim@epita.fr>
11889
11890 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
11891 (count_sr_conflicts): Use bitset_count.
11892 * src/reduce.c (inaccessable_symbols): Ditto.
11893 (bits_size): Remove.
11894 * src/warshall.h, src/warshall.c: Convert to bitsetv.
11895
11896 2002-03-04 Akim Demaille <akim@epita.fr>
11897
11898 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
11899 * src/reduce.c: Remove the `bitset_zero's following the
11900 `bitset_create's, as now it is performed by the latter.
11901
11902 2002-03-04 Akim Demaille <akim@epita.fr>
11903
11904 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
11905 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
11906 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
11907 latest sources from Michael.
11908
11909 2002-03-04 Akim Demaille <akim@epita.fr>
11910
11911 * src/output.c (output): Don't free the grammar.
11912 * src/reader.c (grammar_free): New.
11913 * src/main.c (main): Call it and don't free symtab here.
11914
11915 2002-03-04 Akim Demaille <akim@epita.fr>
11916
11917 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
11918 before returning.
11919 Reported by Benoit Perrot.
11920
11921 2002-03-04 Akim Demaille <akim@epita.fr>
11922
11923 Use bitset operations when possible, not loops over bits.
11924
11925 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
11926 bitset_or.
11927 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
11928 * src/reduce.c (useless_nonterminals): Formatting changes.
11929 * src/warshall.c (TC): Use bitset_or.
11930
11931 2002-03-04 Akim Demaille <akim@epita.fr>
11932
11933 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
11934 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
11935 Ditto.
11936
11937 2002-03-04 Akim Demaille <akim@epita.fr>
11938
11939 * src/lalr.c (F): Now a bitset*.
11940 Adjust all dependencies.
11941
11942 2002-03-04 Akim Demaille <akim@epita.fr>
11943
11944 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
11945 Adjust all dependencies.
11946
11947 2002-03-04 Akim Demaille <akim@epita.fr>
11948
11949 * src/L0.c, src/LR0.h (nstates): Be size_t.
11950 Adjust comparisons (signed vs unsigned).
11951 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
11952 bitset*.
11953 Adjust all dependencies.
11954
11955 2002-03-04 Akim Demaille <akim@epita.fr>
11956
11957 * src/closure.c (firsts): Now, also a bitset.
11958 Adjust all dependencies.
11959 (varsetsize): Remove, now unused.
11960 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
11961
11962 2002-03-04 Akim Demaille <akim@epita.fr>
11963
11964 * src/print.c: Convert to use bitset.h, not hand coded iterations
11965 over ints.
11966
11967 2002-03-04 Akim Demaille <akim@epita.fr>
11968
11969 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
11970
11971 2002-03-04 Akim Demaille <akim@epita.fr>
11972
11973 * src/closure.c (ruleset): Be a bitset.
11974 (rulesetsize): Remove.
11975
11976 2002-03-04 Akim Demaille <akim@epita.fr>
11977
11978 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
11979 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
11980 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
11981 * src/closure.c (fderives): Be an array of bitsets.
11982
11983 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
11984
11985 * data/bison.c++: Merge the two generated headers. Insert a copyright
11986 notice in each output file.
11987
11988 2002-02-28 Akim Demaille <akim@epita.fr>
11989
11990 * data/bison.c++: Copy the prologue of bison.simple to fetch
11991 useful M4 definitions, such as b4_header_guard.
11992
11993 2002-02-25 Akim Demaille <akim@epita.fr>
11994
11995 * src/getargs.c (version): Give the name of the authors, and use a
11996 translator friendly scheme for the bgr
11997 copyright notice.
11998
11999 2002-02-25 Akim Demaille <akim@epita.fr>
12000
12001 * src/output.c (header_output): Remove, now handled completely via
12002 M4.
12003
12004 2002-02-25 Akim Demaille <akim@epita.fr>
12005
12006 * m4/m4.m4: New, from CVS Autoconf.
12007 * configure.in: Invoke it.
12008 * src/output.c (output_skeleton): Use its result instead of the
12009 hard coded name.
12010
12011 2002-02-25 Akim Demaille <akim@epita.fr>
12012
12013 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
12014 Fileutils 4.1.5.
12015 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
12016 * src/output.c (output_skeleton): Use mkstemp to create a real
12017 temporary file.
12018 Move the filling of `skeleton' and its muscle to...
12019 (prepare): here.
12020 (output): Move the definition of the prologue muscle to...
12021 (prepare): here.
12022 * src/system.h (DEFAULT_TMPDIR): New.
12023
12024 2002-02-14 Paul Eggert <eggert@twinsun.com>
12025
12026 Remove the support for C++ namespace cleanliness; it was
12027 causing more problems than it was curing, since it didn't work
12028 properly on some nonstandard C++ compilers. This can wait
12029 for a proper C++ parser.
12030
12031 * NEWS: Document this.
12032 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
12033 of C++, as it's treated like C now.
12034 * src/bison.simple (YYSTD): Remove.
12035 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
12036 Treat C++ just like Standard C instead of trying to support
12037 namespace cleanliness.
12038
12039 2002-02-14 Akim Demaille <akim@epita.fr>
12040
12041 * tests/regression.at (else): Adjust to Andreas' change.
12042
12043 2002-02-14 Akim Demaille <akim@epita.fr>
12044
12045 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
12046
12047 2002-02-13 Andreas Schwab <schwab@suse.de>
12048
12049 * src/output.c (output_rule_data): Don't output NULL, it might
12050 not be defined yet.
12051
12052 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
12053
12054 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
12055 (Copyright notice): Update.
12056
12057 2002-02-11 Akim Demaille <akim@epita.fr>
12058
12059 * tests/regression.at (%nonassoc and eof): Don't include
12060 nonportable headers.
12061
12062 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
12063
12064 * data/bison.c++: Correct error recovery. Make the user able to
12065 initialize the starting location.
12066
12067 2002-02-07 Akim Demaille <akim@epita.fr>
12068
12069 * tests/input.at: New.
12070
12071 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
12072
12073 * data/bison.c++: Replace some direct m4 expansions by constants. Be
12074 more consistent when naming methods and variables. Put preprocessor
12075 directives around tables only needed for debugging.
12076
12077 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
12078
12079 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
12080 C++ parsers.
12081 (yy::b4_name::parse): Use print_.
12082
12083 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
12084
12085 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
12086
12087 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
12088
12089 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
12090 C++ parsers.
12091 (yy::b4_name::parse): Build verbose error messages, and use error_.
12092
12093 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
12094
12095 * data/bison.c++: Fix m4 quoting in comments.
12096
12097 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
12098
12099 * data/bison.c++: Adjust the parser code. Fix some muscles that were
12100 not expanded by m4.
12101
12102 2002-02-05 Akim Demaille <akim@epita.fr>
12103
12104 * data/bison.c++: Adjust to the M4 back end.
12105 More is certainly needed.
12106
12107 2002-02-05 Akim Demaille <akim@epita.fr>
12108
12109 Give a try to M4 as a back end.
12110
12111 * lib/readpipe.c: New, from wdiff.
12112 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
12113 BISON_HAIRY.
12114 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
12115 specific values. Now it is m4 that performs the lookup.
12116 * src/parse-skel.y: Remove.
12117 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
12118 * src/output.c (actions_output, guards_output)
12119 (token_definitions_output): No longer keeps track of the output
12120 line number, hence remove the second argument.
12121 (guards_output): Check against the guard member of a rule, not the
12122 action member.
12123 Adjust callers.
12124 (output_skeleton): Don't look for the skeleton location, let m4 do
12125 that.
12126 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
12127 file will be used.
12128 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
12129 (prepare): Given that for the time being changesyntax is not
12130 usable in M4, rename the muscles using `-' to `_'.
12131 Define `defines_flag', `output_parser_name' and `output_header_name'.
12132 * src/output.h (actions_output, guards_output)
12133 (token_definitions_output): Adjust prototypes.
12134 * src/scan-skel.l: Instead of scanning the skeletons, it now
12135 processes the output of m4: `__oline__' and `#output'.
12136 * data/bison.simple: Adjust to be used by M4(sugar).
12137 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
12138 to date.
12139 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
12140 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
12141 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
12142 shamelessly stolen from CVS Autoconf.
12143
12144 2002-02-05 Akim Demaille <akim@epita.fr>
12145
12146 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
12147 * configure.in: Check for the declarations of free and malloc.
12148 * src/muscle_tab.c: Adjust.
12149
12150 2002-02-05 Akim Demaille <akim@epita.fr>
12151
12152 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
12153 which have no values.
12154
12155 2002-02-05 Akim Demaille <akim@epita.fr>
12156
12157 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
12158 * data/: here.
12159
12160 2002-01-29 Paul Eggert <eggert@twinsun.com>
12161
12162 * src/bison.simple (YYSIZE_T): Do not define merely because
12163 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
12164 On some platforms, <alloca.h> does not declare YYSTD (size_t).
12165
12166 2002-01-27 Akim Demaille <akim@epita.fr>
12167
12168 Fix `%nonassoc and eof'.
12169
12170 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
12171 which were not properly copied! Replace
12172 memcpy (res->errs, src->errs, src->nerrs);
12173 with
12174 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
12175 !!!
12176 * tests/regression.at (%nonassoc and eof): Adjust to newest
12177 Autotest: `.' is not in the PATH.
12178
12179 2002-01-27 Akim Demaille <akim@epita.fr>
12180
12181 * tests/sets.at (AT_EXTRACT_SETS): New.
12182 (Nullable): Use it.
12183 (Firsts): New.
12184
12185 2002-01-26 Akim Demaille <akim@epita.fr>
12186
12187 * tests/actions.at, tests/calc.at, tests/headers.at,
12188 * tests/torture.at: Adjust to the newest Autotest which no longer
12189 forces `.' in the PATH.
12190
12191 2002-01-25 Akim Demaille <akim@epita.fr>
12192
12193 * tests/regression.at (%nonassoc and eof): New.
12194 Suggested by Robert Anisko.
12195
12196 2002-01-24 Akim Demaille <akim@epita.fr>
12197
12198 Bison dumps core when trying to complain about broken input files.
12199 Reported by Cris van Pelt.
12200
12201 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
12202 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
12203 into...
12204 (Invalid inputs): Strengthen: exercise parse_percent_token.
12205
12206 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
12207
12208 * src/Makefile.am: Add bison.c++.
12209 * src/bison.c++: New skeleton.
12210
12211 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
12212
12213 * po/it.po: New.
12214
12215 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
12216
12217 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
12218
12219 2002-01-20 Marc Autret <marc@gnu.org>
12220
12221 * src/files.c (compute_output_file_names): Fix
12222
12223 2002-01-20 Marc Autret <marc@gnu.org>
12224
12225 * tests/output.at: New test.
12226 * src/files.c (compute_base_names): Don't map extensions when
12227 the YACC flag is set, use defaults.
12228 Reported by Evgeny Stambulchik.
12229
12230 2002-01-20 Marc Autret <marc@gnu.org>
12231
12232 * src/system.h: Need to define __attribute__ away for non-GCC
12233 compilers as well (i.e., the vendor C compiler).
12234 Suggested by Albert Chin-A-Young.
12235
12236 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
12237
12238 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
12239 canonical definition.
12240 * src/system.h: Use the canonical definition for PARAMS (avoids
12241 a conflict with the macro from lib/hash.h).
12242
12243 2002-01-11 Akim Demaille <akim@epita.fr>
12244
12245 * configure.in: Use AC_FUNC_STRNLEN.
12246 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
12247
12248 2002-01-09 Akim Demaille <akim@epita.fr>
12249
12250 * src/files.c, src/files.h (output_infix): New.
12251 (tab_extension): Remove.
12252 (compute_base_names): Compute the former, drop the latter.
12253 * src/output.c (prepare): Insert the muscles `output-infix', and
12254 `output-suffix'.
12255 * src/parse-skel.y (string, string.1): New.
12256 (section.header): Use it.
12257 (section.yacc): Remove.
12258 (prefix): Remove too.
12259 * src/scan-skel.l: Adjust.
12260 * src/bison.simple, src/bison.hairy: Adjust.
12261
12262 2002-01-09 Akim Demaille <akim@epita.fr>
12263
12264 * configure.in (WERROR_CFLAGS): Compute it.
12265 * src/Makefile.am (CFLAGS): Pass it.
12266 * tests/atlocal.in (CFLAGS): Idem.
12267 * src/files.c: Fix a few warnings.
12268 (get_extension_index): Remove, unused.
12269
12270 2002-01-08 Akim Demaille <akim@epita.fr>
12271
12272 * src/getargs.c (AS_FILE_NAME): New.
12273 (getargs): Use it to convert DOSish file names.
12274 * src/files.c (base_name): Rename as full_base_name to avoid
12275 clashes with `base_name ()'.
12276 (filename_split): New.
12277 (compute_base_names): N-th rewrite, using filename_split.
12278
12279 2002-01-08 Akim Demaille <akim@epita.fr>
12280
12281 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
12282 New, stolen from the Fileutils 4.1.
12283 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
12284 * configure.in: Check for the presence of memrchr, and of its
12285 prototype.
12286
12287 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
12288
12289 * lib/hash.h (__P): Added definition for this macro.
12290 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
12291 BUILT_SOURCES, to ensure they are generated first.
12292 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
12293 %error-verbose to allow bootstrapping with bison 1.30x.
12294
12295 2002-01-06 Akim Demaille <akim@epita.fr>
12296
12297 * src/reader.c (parse_braces): Don't fetch the next char, the
12298 convention is to fetch on entry.
12299 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
12300 'switch' without a following semicolon.
12301 * tests/regression.at (braces parsing): New.
12302
12303 2002-01-06 Akim Demaille <akim@epita.fr>
12304
12305 Bison is dead wrong in its RR conflict reports.
12306
12307 * tests/torture.at (GNU Cim Grammar): New.
12308 * src/conflicts.c (count_rr_conflicts): Fix.
12309
12310 2002-01-06 Akim Demaille <akim@epita.fr>
12311
12312 Creating package.m4 from configure.ac causes too many problems.
12313
12314 * tests/Makefile.am (package.m4): Create it by hand,
12315 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
12316
12317 2002-01-06 Akim Demaille <akim@epita.fr>
12318
12319 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
12320 skeleton.h.
12321
12322 2002-01-04 Paul Eggert <eggert@twinsun.com>
12323
12324 * doc/bison.texinfo (Debugging):
12325 Remove YYSTDERR; it's no longer defined or used.
12326 Also, s/cstdio.h/cstdio/.
12327
12328 2002-01-03 Akim Demaille <akim@epita.fr>
12329
12330 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
12331
12332 2002-01-03 Akim Demaille <akim@epita.fr>
12333
12334 * src/parse-skel.y (process_skeleton): Don't bind the parser's
12335 tracing code to --trace, wait for a better --trace option, with
12336 args.
12337
12338 2002-01-03 Akim Demaille <akim@epita.fr>
12339
12340 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
12341 The ISO C++ standard is extremely clear about it: stderr is
12342 considered a macro, not a regular symbol (see table 94 `Header
12343 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
12344 Therefore std:: does not apply to it. It still does with fprintf.
12345 Also, s/cstdio.h/cstdio/.
12346
12347 2002-01-03 Akim Demaille <akim@epita.fr>
12348
12349 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
12350 for non system headers.
12351
12352 2002-01-02 Akim Demaille <akim@epita.fr>
12353
12354 Equip the skeleton chain with location tracking, runtime trace,
12355 pure parser and scanner.
12356
12357 * src/parse-skel.y: Request a pure parser, locations, and prefix
12358 renaming.
12359 (%union): Having several members with the same type does not help
12360 type mismatches, simplify.
12361 (YYPRINT, yyprint): New.
12362 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
12363 (skel_error): this.
12364 Handle locations.
12365 * src/scan-skel.l: Adjust to these changes.
12366 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
12367 (LOCATION_PRINT, skel_control_t): New.
12368
12369 2001-12-30 Akim Demaille <akim@epita.fr>
12370
12371 * src/parse-skel.y: Get rid of the shift/reduce conflict:
12372 replace `gb' with BLANKS.
12373 * src/scan-skel.l: Adjust.
12374
12375 2001-12-30 Akim Demaille <akim@epita.fr>
12376
12377 * src/system.h: We don't need nor want bcopy.
12378 Throw away MS-DOS crap: we don't need getpid.
12379 * configure.in: We don't need strndup. It was even causing
12380 problems: because Flex includes the headers *before* us,
12381 _GNU_SOURCE is not defined by config.h, and therefore strndup was
12382 not visible.
12383 * lib/xstrndup.c: New.
12384 * src/scan-skel.l: Use it.
12385 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
12386 * src/parse-skel.y: Use %directives instead of #defines.
12387
12388 2001-12-30 Akim Demaille <akim@epita.fr>
12389
12390 * src/skeleton.h: New.
12391 * src/output.c (output_parser, output_master_parser): Remove, dead
12392 code.
12393 * src/output.h (get_lines_number, actions_output, guards_output)
12394 (token_definitions_output): Prototype them.
12395 * src/parse-skel.y: Add the license notice.
12396 Include output.h and skeleton.h.
12397 (process_skeleton): Returns void, and takes a single parameter.
12398 * src/scan-skel.l: Add the license notice.
12399 Include skeleton.h.
12400 Don't use %option yylineno: it seems that then Flex imagines
12401 REJECT has been used, and therefore it won't reallocate its
12402 buffers (which makes no other sense to me than a bug). It results
12403 in warnings for `unused: yy_flex_realloc'.
12404
12405 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
12406
12407 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
12408 (MUSCLE_INSERT_PREFIX): ...to there.
12409 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
12410 (MUSCLE_INSERT_PREFIX): Move from here...
12411
12412 * src/bison.hairy: Add a section directive. Put braces around muscle
12413 names. This parser skeleton is still broken, but Bison should not
12414 choke on a bad muscle 'syntax'.
12415 * src/bison.simple: Add a section directive. Put braces around muscle
12416 names.
12417
12418 * src/files.h (strsuffix, stringappend): Add declarations.
12419 (tab_extension): Add declaration.
12420 (short_base_name): Add declaration.
12421
12422 * src/files.c (strsuffix, stringappend): No longer static. These
12423 functions are used in the skeleton parser.
12424 (tab_extension): New.
12425 (compute_base_names): Use the computations done in this function
12426 to guess if the generated parsers should have '.tab' in their
12427 names.
12428 (short_base_name): No longer static.
12429
12430 * src/output.c (output_skeleton): New.
12431 (output): Disable call to output_master_parser, and give a try to
12432 a new skeleton handling system.
12433 (guards_output, actions_output): No longer static.
12434 (token_definitions_output, get_lines_number): No longer static.
12435
12436 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
12437
12438 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
12439 parse-skel.y.
12440
12441 * src/parse-skel.y: New file.
12442 * src/scan-skel.l: New file.
12443
12444 2001-12-29 Akim Demaille <akim@epita.fr>
12445
12446 %name-prefix is broken.
12447
12448 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
12449 Adjust all dependencies.
12450 * tests/headers.at (export YYLTYPE): Strengthen this test: use
12451 %name-prefix.
12452
12453 Renaming yylval but not yylloc is not consistent. Now we do.
12454
12455 * src/bison.simple: Prefix yylloc if used.
12456 * doc/bison.texinfo (Decl Summary): Document that.
12457
12458 2001-12-29 Akim Demaille <akim@epita.fr>
12459
12460 * doc/bison.texinfo: Promote `%long-directive' over
12461 `%long_directive'.
12462 Remove all references to fixed-output-files, yacc is enough.
12463
12464 2001-12-29 Akim Demaille <akim@epita.fr>
12465
12466 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
12467 user prologue. These are defaults.
12468 * tests/actions.at (Mid-rule actions): Make sure the user can
12469 define YYDEBUG and YYERROR_VERBOSE.
12470
12471 2001-12-29 Akim Demaille <akim@epita.fr>
12472
12473 * src/output.c (header_output): Don't forget to export YYLTYPE and
12474 yylloc.
12475 * tests/headers.at (export YYLTYPE): New, make sure it does.
12476 * tests/regression.at (%union and --defines, Invalid CPP headers):
12477 Move to...
12478 * tests/headers.at: here.
12479
12480 2001-12-29 Akim Demaille <akim@epita.fr>
12481
12482 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
12483
12484 2001-12-29 Akim Demaille <akim@epita.fr>
12485
12486 * tests/actions.at (Mid-rule actions): Output on a single line
12487 instead of several.
12488
12489 2001-12-29 Akim Demaille <akim@epita.fr>
12490
12491 * doc/bison.texinfo: Formatting changes.
12492
12493 2001-12-29 Akim Demaille <akim@epita.fr>
12494
12495 Don't store the token defs in a muscle, just be ready to output it
12496 on command. Now possible via `symbols'. Fixes a memory leak.
12497
12498 * src/output.c (token_definitions_output): New.
12499 (output_parser, header_output): Use it.
12500 * src/reader.c (symbols_save): Remove.
12501
12502 2001-12-29 Akim Demaille <akim@epita.fr>
12503
12504 * src/bison.simple: Do not provide a default for YYSTYPE and
12505 YYLTYPE before the user's prologue. Otherwise it's hardly... a
12506 default.
12507
12508 2001-12-29 Akim Demaille <akim@epita.fr>
12509
12510 Mid-rule actions are simply... ignored!
12511
12512 * src/reader.c (readgram): Be sure to attach mid-rule actions to
12513 the empty-rule associated to the dummy symbol, not to the host
12514 rule.
12515 * tests/actions.at (Mid-rule actions): New.
12516
12517 2001-12-29 Akim Demaille <akim@epita.fr>
12518
12519 Memory leak.
12520
12521 * src/reader.c (reader): Free grammar.
12522
12523 2001-12-29 Akim Demaille <akim@epita.fr>
12524
12525 Memory leak.
12526
12527 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
12528 since it allocates it for each state, although only one is needed.
12529 (allocate_storage): Do it here.
12530
12531 2001-12-29 Akim Demaille <akim@epita.fr>
12532
12533 * src/options.h, src/options.c (create_long_option_table): Rename
12534 as...
12535 (long_option_table_new): this, with a clearer prototype.
12536 (percent_table): Remove, unused,
12537 * src/getargs.c (getargs): Adjust.
12538
12539 2001-12-29 Akim Demaille <akim@epita.fr>
12540
12541 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
12542 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
12543 as states.
12544
12545 2001-12-29 Akim Demaille <akim@epita.fr>
12546
12547 * src/lalr.c (build_relations): Rename `states' as `states1'.
12548 Sorry, I don't understand exactly what it is, no better name...
12549
12550 2001-12-29 Akim Demaille <akim@epita.fr>
12551
12552 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
12553 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
12554 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
12555 as rules.
12556
12557 2001-12-29 Akim Demaille <akim@epita.fr>
12558
12559 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
12560 ago.
12561
12562 2001-12-29 Akim Demaille <akim@epita.fr>
12563
12564 * src/reader.c, src/reader.h (user_toknums): Remove.
12565 Adjust all users to use symbols[i]->user_token_number.
12566
12567 2001-12-29 Akim Demaille <akim@epita.fr>
12568
12569 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
12570 Adjust all users to use symbols[i]->prec or ->assoc.
12571
12572 2001-12-29 Akim Demaille <akim@epita.fr>
12573
12574 * src/reader.c, src/reader.h (tags): Remove.
12575 Adjust all users to use symbols[i]->tag.
12576
12577 2001-12-29 Akim Demaille <akim@epita.fr>
12578
12579 * src/gram.h, src/gram.c (symbols): New, similar to state_table
12580 and rule_table.
12581 * src/reader.c (packsymbols): Fill this table.
12582 Drop sprec.
12583 * src/conflicts.c (resolve_sr_conflict): Adjust.
12584 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
12585 single table.
12586 Use symbols[i]->tag instead of tags[i].
12587
12588 2001-12-29 Akim Demaille <akim@epita.fr>
12589
12590 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
12591 In addition, put a comment in there, to replace...
12592 * tests/regression.at (%union and C comments): Remove.
12593
12594 2001-12-29 Akim Demaille <akim@epita.fr>
12595
12596 * tests/regression.at (Web2c Actions): Blindly move the actual
12597 output as expected output. The contents *seem* right to me, but I
12598 can't pretend reading perfectly parser tables... Nonetheless, all
12599 the other tests pass correctly, the table look OK, even though the
12600 presence of `$axiom' is to be noted: AFAICS it is useless (but
12601 harmless).
12602
12603 2001-12-29 Akim Demaille <akim@epita.fr>
12604
12605 * src/reader.c (readgram): Don't add the rule 0 if there were no
12606 rules read. In other words, add it _after_ having performed
12607 grammar sanity checks.
12608 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
12609
12610 2001-12-29 Akim Demaille <akim@epita.fr>
12611
12612 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
12613 visible, and some states have now a different number.
12614
12615 2001-12-29 Akim Demaille <akim@epita.fr>
12616
12617 * src/reader.c (readgram): Bind the initial rule's lineno to that
12618 of the first rule.
12619 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
12620 (Solved SR Conflicts): Adjust rule 0's line number.
12621
12622 2001-12-29 Akim Demaille <akim@epita.fr>
12623
12624 Fix the `GAWK Grammar' failure.
12625
12626 * src/LR0.c (final_state): Initialize to -1 so that we do compute
12627 the reductions of the first state which was mistakenly confused
12628 with the final state because precisely final_state was initialized
12629 to 0.
12630 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
12631 now noticed by Bison.
12632 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
12633 have a reduction on $default.
12634
12635 2001-12-29 Akim Demaille <akim@epita.fr>
12636
12637 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
12638 rule line numbers.
12639 * src/closure.c (print_closure): Likewise.
12640 * src/derives.c (print_derives): Likewise.
12641 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
12642 now.
12643
12644 2001-12-29 Akim Demaille <akim@epita.fr>
12645
12646 * src/lalr.c (lookaheads_print): New.
12647 (lalr): Call it when --trace-flag.
12648 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
12649 are dumped.
12650
12651 2001-12-29 Akim Demaille <akim@epita.fr>
12652
12653 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
12654 when walking through ritem, even via rule->rhs.
12655 * src/reduce.c (dump_grammar, useful_production, reduce_output)
12656 (useful_production, useless_nonterminals): Likewise.
12657 (reduce_grammar_tables): Likewise, plus update nritems.
12658 * src/nullable.c (set_nullable): Likewise.
12659 * src/lalr.c (build_relations): Likewise.
12660 * tests/sets.at (Nullable): Adjust.
12661 Fortunately, now, the $axiom is no longer nullable.
12662
12663 2001-12-29 Akim Demaille <akim@epita.fr>
12664
12665 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
12666 the 0-sentinel.
12667 * src/gram.c (ritem_longest_rhs): Likewise.
12668 * src/reduce.c (nonterminals_reduce): Likewise.
12669 * src/print_graph.c (print_graph): Likewise.
12670 * src/output.c (output_rule_data): Likewise.
12671 * src/nullable.c (set_nullable): Likewise.
12672
12673 2001-12-29 Akim Demaille <akim@epita.fr>
12674
12675 * src/output.c: Comment changes.
12676
12677 2001-12-27 Paul Eggert <eggert@twinsun.com>
12678
12679 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
12680 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
12681 Sparc, as they were causing more porting problems than the
12682 (minor) performance improvement was worth.
12683
12684 Also, catch up with 1.31's YYSTD.
12685
12686 2001-12-27 Akim Demaille <akim@epita.fr>
12687
12688 * src/output.c (output_gram): Rely on nritems, not the
12689 0-sentinel. See below.
12690 Use -1 as separator, not 0.
12691 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
12692 Rely on -1 as separator in yyrhs, instead of 0.
12693 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
12694 twice `Now at end of input', therefore there are two lines less to
12695 expect.
12696
12697 2001-12-27 Akim Demaille <akim@epita.fr>
12698
12699 * tests/regression.at (Unresolved SR Conflicts):
12700 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
12701 below.
12702
12703 2001-12-27 Akim Demaille <akim@epita.fr>
12704
12705 * src/LR0.c (new_state): Recognize the final state by the fact it
12706 is reached by eoftoken.
12707 (insert_start_shifting_state, insert_eof_shifting_state)
12708 (insert_accepting_state, augment_automaton): Remove, since now
12709 these states are automatically computed from the initial state.
12710 (generate_states): Adjust.
12711 * src/print.c: When reporting a rule number to the user, substract
12712 1, so that the axiom rule is rule 0, and the first user rule is 1.
12713 * src/reduce.c: Likewise.
12714 * src/print_graph.c (print_core): For the time being, just as for
12715 the report, depend upon --trace-flags to dump the full set of
12716 items.
12717 * src/reader.c (readgram): Once the grammar read, insert the rule
12718 0: `$axiom: START-SYMBOL $'.
12719 * tests/set.at: Adjust: rule 0 is now displayed, and since the
12720 number of the states has changed (the final state is no longer
12721 necessarily the last), catch up.
12722
12723 2001-12-27 Akim Demaille <akim@epita.fr>
12724
12725 Try to make the use of the eoftoken valid. Given that its value
12726 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
12727 is used instead of > 0 where appropriate, (ii), depend upon nritems
12728 instead of the 0-sentinel.
12729
12730 * src/gram.h, src/gram.c (nritems): New.
12731 Expected to be duplication of nitems, but for the time being...
12732 * src/reader.c (packgram): Assert nritems and nitems are equal.
12733 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
12734 * src/closure.c (print_closure, print_fderives): Likewise.
12735 * src/gram.c (ritem_print): Likewise.
12736 * src/print.c (print_core, print_grammar): Likewise.
12737 * src/print_graph.c: Likewise.
12738
12739 2001-12-27 Akim Demaille <akim@epita.fr>
12740
12741 * src/main.c (main): If there are complains after grammar
12742 reductions, then output the report anyway if requested, then die.
12743 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
12744 * src/reader.c (eoftoken): New.
12745 (parse_token_decl): If the token being defined has value `0', it
12746 is the eoftoken.
12747 (packsymbols): No longer hack `tags' to insert `$' by hand.
12748 Be sure to preserve the value of the eoftoken.
12749 (reader): Make sure eoftoken is defined.
12750 Initialize nsyms to 0: now eoftoken is created just like the others.
12751 * src/print.c (print_grammar): Don't special case the eof token.
12752 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
12753 lie anyway, albeit pleasant.
12754 * tests/calc.at: Exercise error messages with eoftoken.
12755 Change the grammar so that empty input is invalid.
12756 Adjust expectations.
12757 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
12758
12759 2001-12-27 Akim Demaille <akim@epita.fr>
12760
12761 * configure.in: Check the protos of strchr ans strspn.
12762 Replace strchr if needed.
12763 * src/system.h: Provide the protos of strchr, strspn and memchr if
12764 missing.
12765 * lib/strchr.c: New.
12766 * src/reader.c (symbols_save): Use strchr.
12767
12768 2001-12-27 Akim Demaille <akim@epita.fr>
12769
12770 * src/print.c, src/print_graph.c (escape): New.
12771 Use it to quote the TAGS outputs.
12772 * src/print_graph.c (print_state): Now errors are in red, and
12773 reductions in green.
12774 Prefer high to wide: output the state number on a line of its own.
12775
12776 2001-12-27 Akim Demaille <akim@epita.fr>
12777
12778 * src/state.h, src/state.c (reductions_new): New.
12779 * src/LR0.c (set_state_table): Let all the states have a
12780 `reductions', even if reduced to 0.
12781 (save_reductions): Adjust.
12782 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
12783 * src/print.c (print_reductions, print_actions): Adjust.
12784 * src/output.c (action_row): Adjust.
12785
12786 2001-12-27 Akim Demaille <akim@epita.fr>
12787
12788 * src/state.h, src/state.c (errs_new, errs_dup): New.
12789 * src/LR0.c (set_state_table): Let all the states have an errs,
12790 even if reduced to 0.
12791 * src/print.c (print_errs, print_reductions): Adjust.
12792 * src/output.c (output_actions, action_row): Adjust.
12793 * src/conflicts.c (resolve_sr_conflict): Adjust.
12794
12795 2001-12-27 Akim Demaille <akim@epita.fr>
12796
12797 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
12798
12799 2001-12-27 Akim Demaille <akim@epita.fr>
12800
12801 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
12802 * src/print.c: here.
12803 (lookaheadset, shiftset): New, used as additional storage by
12804 print_reductions.
12805 (print_results): Adjust.
12806 (print_shifts, print_gotos, print_errs): New, extracted from...
12807 (print_actions): here.
12808 * src/print_graph.c (print_actions): Remove dead code.
12809
12810 2001-12-27 Akim Demaille <akim@epita.fr>
12811
12812 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
12813 `$n' and `@n'.
12814
12815 2001-12-27 Akim Demaille <akim@epita.fr>
12816
12817 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
12818 (build_relations): Adjust.
12819
12820 2001-12-27 Akim Demaille <akim@epita.fr>
12821
12822 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
12823 duplication.
12824
12825 2001-12-27 Akim Demaille <akim@epita.fr>
12826
12827 * src/reader.c (packgram): Catch nitems overflows.
12828
12829 2001-12-27 Akim Demaille <akim@epita.fr>
12830
12831 * src/files.c, src/files.h (guard_obstack): Remove.
12832 * src/output.c (output): Adjust.
12833 * src/reader.c (parse_braces): New, factoring...
12834 (copy_action, copy_guard): these two which are renamed as...
12835 (parse_action, parse_guard): these.
12836 As a voluntary consequence, using braces around guards is now
12837 mandatory.
12838
12839 2001-12-27 Akim Demaille <akim@epita.fr>
12840
12841 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
12842 * src/reader.c (symbol_list): `guard' and `guard_line' are new
12843 members.
12844 (symbol_list_new): Adjust.
12845 (copy_action): action_line is the first line, not the last.
12846 (copy_guard): Just as for actions, store the `action' only, not
12847 the switch/case/break flesh.
12848 Don't parse the user action that might follow the guard, let...
12849 (readgram): do it, i.e., now, there can be an action after a
12850 guard.
12851 In other words the guard is just explicitly optional.
12852 (packgram): Adjust.
12853 * src/output.c (guards_output): New.
12854 (output_parser): Call it when needed.
12855 (output): Also free the guard and attrs obstacks.
12856 * src/files.c, src/files.h (obstack_save): Remove.
12857 (output_files): Remove.
12858 As a result, if one needs the former `.act' file, using an
12859 appropriate skeleton which requires actions and guards is now
12860 required.
12861 * src/main.c (main): Adjust.
12862 * tests/semantic.at: New.
12863 * tests/regression.at: Use `input.y' as input file name.
12864 Avoid 8+3 problems by requiring input.c when the test needs the
12865 parser.
12866
12867 2001-12-27 Akim Demaille <akim@epita.fr>
12868
12869 * src/reader.c (symbol_list_new): Be sure to initialize all the
12870 fields.
12871
12872 2001-12-27 Akim Demaille <akim@epita.fr>
12873
12874 All the hacks using a final pseudo state are now useless.
12875
12876 * src/LR0.c (set_state_table): state_table holds exactly nstates.
12877 * src/lalr.c (nLA): New.
12878 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
12879 instead of lookaheadsp from the pseudo state (nstate + 1).
12880
12881 2001-12-27 Akim Demaille <akim@epita.fr>
12882
12883 * src/output.c (action_row, token_actions): Use a state_t instead
12884 of a integer, and nlookaheads instead of the following state's
12885 lookaheadsp.
12886
12887 2001-12-27 Akim Demaille <akim@epita.fr>
12888
12889 * src/conflicts.c (log_resolution, flush_shift)
12890 (resolve_sr_conflict, set_conflicts, solve_conflicts)
12891 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
12892 (conflicts_print, print_reductions): Use a state_t instead of an
12893 integer when referring to a state.
12894 As much as possible, depend upon nlookaheads, instead of the
12895 `lookaheadsp' member of the following state (since lookaheads of
12896 successive states are successive, the difference between state n + 1
12897 and n served as the number of lookaheads for state n).
12898 * src/lalr.c (add_lookback_edge): Likewise.
12899 * src/print.c (print_core, print_actions, print_state)
12900 (print_results): Likewise.
12901 * src/print_graph.c (print_core, print_actions, print_state)
12902 (print_graph): Likewise.
12903 * src/conflicts.h: Adjust.
12904
12905 2001-12-27 Akim Demaille <akim@epita.fr>
12906
12907 * src/bison.hairy: Formatting/comment changes.
12908 ANSIfy.
12909 Remove `register' indications.
12910 Add plenty of `static'.
12911
12912 2001-12-27 Akim Demaille <akim@epita.fr>
12913
12914 * src/output.c (prepare): Drop the muscle `ntbase' which
12915 duplicates ntokens.
12916 * src/bison.simple: Formatting/comment changes.
12917 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
12918 is an undocumented synonym.
12919
12920 2001-12-22 Akim Demaille <akim@epita.fr>
12921
12922 * src/output.c (output_table_data): Change the prototype to use
12923 `int' for array ranges: some invocations do pass an int, not a
12924 short.
12925 Reported by Wayne Green.
12926
12927 2001-12-22 Akim Demaille <akim@epita.fr>
12928
12929 Some actions of web2c.y are improperly triggered.
12930 Reported by Mike Castle.
12931
12932 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
12933 * tests/regression.at (Web2c): Rename as...
12934 (Web2c Report): this.
12935 (Web2c Actions): New.
12936
12937 2001-12-22 Akim Demaille <akim@epita.fr>
12938
12939 Reductions in web2c.y are improperly reported.
12940 Reported by Mike Castle.
12941
12942 * src/conflicts.c (print_reductions): Fix.
12943 * tests/regression.at (Web2c): New.
12944
12945 2001-12-18 Akim Demaille <akim@epita.fr>
12946
12947 Some host fail on `assert (!"foo")', which expands to
12948 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
12949 Reported by Nelson Beebee.
12950
12951 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
12952 `#define it_succeeded 0' and `assert (it_succeeded)'.
12953
12954 2001-12-17 Marc Autret <autret_m@epita.fr>
12955
12956 * src/bison.simple: Don't hard code the skeleton line and filename.
12957 * src/output.c (output_parser): Rename 'line' as 'output_line'.
12958 New line counter 'skeleton_line' (skeleton-line muscle).
12959
12960 2001-12-17 Paul Eggert <eggert@twinsun.com>
12961
12962 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
12963 YYDEBUG must be defined to a nonzero value.
12964
12965 * src/bison.simple (yytname): Do not assume that the user defines
12966 YYDEBUG to a properly parenthesized expression.
12967
12968 2001-12-17 Akim Demaille <akim@epita.fr>
12969
12970 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
12971 nlookaheads is a new member.
12972 Adjust all users.
12973 * src/lalr.h (nlookaheads): Remove this orphan declaration.
12974 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
12975 state.
12976
12977 2001-12-17 Akim Demaille <akim@epita.fr>
12978
12979 * src/files.h, src/files.c (open_files, close_files): Remove.
12980 * src/main.c (main): Don't open/close files, nor invoke lex_free,
12981 let...
12982 * src/reader.c (reader): Do it.
12983
12984 2001-12-17 Akim Demaille <akim@epita.fr>
12985
12986 * src/conflicts.c (print_reductions): Formatting changes.
12987
12988 2001-12-17 Akim Demaille <akim@epita.fr>
12989
12990 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
12991 (flush_reduce): New.
12992 (resolve_sr_conflict): Adjust.
12993
12994 2001-12-17 Akim Demaille <akim@epita.fr>
12995
12996 * src/output.c (output_obstack): Be static and rename as...
12997 (format_obstack): this, to avoid any confusion with files.c's
12998 output_obstack.
12999 * src/reader.h (muscle_obstack): Move to...
13000 * src/output.h: here, since it's defined in output.c.
13001
13002 2001-12-17 Akim Demaille <akim@epita.fr>
13003
13004 * src/output.c (action_row, save_column, default_goto)
13005 (sort_actions, matching_state, pack_vector): Better variable
13006 locality.
13007
13008 2001-12-17 Akim Demaille <akim@epita.fr>
13009
13010 * src/output.c: Various formatting changes.
13011
13012 2001-12-17 Akim Demaille <akim@epita.fr>
13013
13014 * src/files.c (output_files): Free the output_obstack.
13015 * src/main.c (main): Call print and print_graph conditionally.
13016 * src/print.c (print): Work unconditionally.
13017 * src/print_graph.c (print_graph): Work unconditionally.
13018 * src/conflicts.c (log_resolution): Output only if verbose_flag.
13019
13020 2001-12-16 Marc Autret <autret_m@epita.fr>
13021
13022 * src/output.c (actions_output): Fix. When we use %no-lines,
13023 there is one less line per action.
13024
13025 2001-12-16 Marc Autret <autret_m@epita.fr>
13026
13027 * src/bison.simple: Remove a useless #line directive.
13028 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
13029 * src/output.c (get_lines_number): New.
13030 (output_parser): Adjust, now takes care about the lines of a
13031 output muscles.
13032 Fix line numbering.
13033 (actions_output): Computes the number of lines taken by actions.
13034 (output_master_parser): Insert new skeleton which is the name of
13035 the output parser file name.
13036
13037 2001-12-15 Marc Autret <autret_m@epita.fr>
13038
13039 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
13040
13041 2001-12-15 Marc Autret <autret_m@epita.fr>
13042
13043 * src/output.c (output_gram): Keep track of the hairy one.
13044
13045 2001-12-15 Akim Demaille <akim@epita.fr>
13046
13047 Make `make distcheck' work.
13048
13049 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
13050 system.h which uses libgettext.h.
13051
13052 2001-12-15 Akim Demaille <akim@epita.fr>
13053
13054 * src/nullable.c (set_nullable): Useless rules must be skipped,
13055 otherwise, since we range over their symbols, we might look at a
13056 nonterminal which no longer ``exists'', i.e., it is not counted in
13057 `nvars', hence we overflow our arrays.
13058
13059 2001-12-15 Akim Demaille <akim@epita.fr>
13060
13061 The header can also be produced directly, without any obstack!
13062 Yahoo!
13063
13064 * src/files.c, src/files.h (defines_obstack): Remove.
13065 (compute_header_macro): Global.
13066 (defines_obstack_save): Remove.
13067 * src/reader.c (parse_union_decl): No longer output to
13068 defines_obstack: its content can be found in the `stype' muscle
13069 anyway.
13070 (output_token_translations): Merge into...
13071 (symbols_output): this.
13072 Rename as...
13073 (symbols_save): this.
13074 (reader): Adjust.
13075 * src/output.c (header_output): New.
13076 (output): Call it.
13077
13078 2001-12-15 Akim Demaille <akim@epita.fr>
13079
13080 * src/reader.c (parse_union_decl): Instead of handling two obstack
13081 simultaneously, use one to define the `stype' muscle, and use the
13082 value of the latter to fill defines_obstack.
13083 (copy_comment): Remove.
13084 (copy_comment2): Work for a single obstack.
13085 Rename as...
13086 (copy_comment): this.
13087
13088 2001-12-15 Akim Demaille <akim@epita.fr>
13089
13090 * src/lex.c, src/lex.h (xgetc): No longer static.
13091 * src/reader.c (parse_union_decl): Revamp.
13092
13093 2001-12-15 Akim Demaille <akim@epita.fr>
13094
13095 Still making progress in separating Bison into (i) input, (ii)
13096 process, (iii) output: now we can directly output the parser file
13097 without using table_obstack at all.
13098
13099 * src/files.c, src/files.h (table_obstack): Bye bye.
13100 (parser_file_name): New.
13101 * src/files.c (compute_output_file_names): Compute it.
13102 * src/output.c (actions_output, output_parser)
13103 (output_master_parser): To a file instead of an obstack.
13104
13105 2001-12-15 Akim Demaille <akim@epita.fr>
13106
13107 Attach actions to rules, instead of pre-outputting them to
13108 actions_obstack.
13109
13110 * src/gram.h (rule_t): action and action_line are new members.
13111 * src/reader.c (symbol_list): Likewise.
13112 (copy_action): Save the actions within the rule.
13113 (packgram): Save them in rule_table.
13114 * src/output.c (actions_output): New.
13115 (output_parser): Use it on `%%actions'.
13116 (output_rule_data): Don't free rule_table.
13117 (output): Do it.
13118 (prepare): Don't save the `action' muscle.
13119 * src/bison.simple: s/%%action/%%actions/.
13120
13121 2001-12-15 Akim Demaille <akim@epita.fr>
13122
13123 * src/reader.c (copy_action): When --yacc, don't append a `;'
13124 to the user action: let it fail if lacking.
13125 Suggested by Arnold Robbins and Tom Tromey.
13126
13127 2001-12-14 Akim Demaille <akim@epita.fr>
13128
13129 * src/lex.c (literalchar): Simply return the char you decoded, non
13130 longer mess around with obstacks and int pointers.
13131 Adjust all callers.
13132
13133 2001-12-14 Akim Demaille <akim@epita.fr>
13134
13135 * src/lex.c (literalchar): Don't escape the special characters,
13136 just decode them, and keep them as char (before, eol was output as
13137 the 2 char string `\n' etc.).
13138 * src/output.c (output_rule_data): Use quotearg to output the
13139 token strings.
13140
13141 2001-12-13 Paul Eggert <eggert@twinsun.com>
13142
13143 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
13144 Do not infringe on the global user namespace when using C++.
13145 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
13146 All uses of `fprintf' and `stderr' changed.
13147
13148 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
13149
13150 2001-12-13 Akim Demaille <akim@epita.fr>
13151
13152 The computation of nullable is broken: it doesn't handle empty
13153 RHS's properly.
13154
13155 * tests/torture.at (GNU AWK Grammar): New.
13156 * tests/sets.at (Nullable): New.
13157 * src/nullable.c (set_nullable): Instead of blindly looping over
13158 `ritems', loop over the rules, and then over their rhs's.
13159
13160 Work around Autotest bugs.
13161
13162 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
13163 frame, because Autotest understand lines starting with a `+' as
13164 traces from the shell. Then, they are not processed properly.
13165 Admittedly an Autotest bug, but we don't have time to wait for
13166 Autotest to catch up.
13167 * tests/regression.at (Broken Closure): Adjust to the new table
13168 frames.
13169 Move to...
13170 * tests/sets.at: here.
13171
13172 2001-12-13 Akim Demaille <akim@epita.fr>
13173
13174 * src/closure.c (closure): Use nrules instead of playing tricks
13175 with BITS_PER_WORD.
13176
13177 2001-12-13 Akim Demaille <akim@epita.fr>
13178
13179 * src/print.c (print_actions): Output the handling of `$' as the
13180 traces do: shifting the token EOF. Before EOF was treated as a
13181 nonterminal.
13182 * tests/regression.at: Adjust some tests.
13183 * src/print_graph.c (print_core): Complete the set of items via
13184 closure. The next-to-final and final states are still unsatisfying,
13185 but that's to be addressed elsewhere.
13186 No longer output the rule numbers, but do output the state number.
13187 A single loop for the shifts + gotos is enough, but picked a
13188 distinct color for each.
13189 (print_graph): Initialize and finalize closure.
13190
13191 2001-12-13 Akim Demaille <akim@epita.fr>
13192
13193 * src/reader.c (readgram): Remove dead code, an strip useless
13194 braces.
13195 (get_type): Remove, unused.
13196
13197 2001-12-12 Akim Demaille <akim@epita.fr>
13198
13199 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
13200 on that of lib/error.c.
13201
13202 2001-12-12 Akim Demaille <akim@epita.fr>
13203
13204 Some hosts don't like `/' in includes.
13205
13206 * src/system.h: Include libgettext.h without qualifying the path.
13207 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
13208 $(top_srcdir).
13209
13210 2001-12-11 Marc Autret <autret_m@epita.fr>
13211
13212 * src/output.c (output_parser): Remove useless muscle.
13213
13214 2001-12-11 Marc Autret <autret_m@epita.fr>
13215
13216 * src/bison.simple: Remove #line just before %%epilogue. It
13217 is now handled in ...
13218 * src/reader.c (read_additionnal_code): Add the output of a
13219 #line for the epilogue.
13220
13221 2001-12-10 Marc Autret <autret_m@epita.fr>
13222
13223 * src/reader.c (copy_definition): Re-use CPP-outed code which
13224 replace precedent remove.
13225 * src/bison.simple: Remove #line before %%prologue because
13226 %%input-line is wrong at this time.
13227
13228 2001-12-10 Marc Autret <autret_m@epita.fr>
13229
13230 * src/reader.c (symbols_output): Clean up.
13231 * src/output.c (output_gram, output): Clean up.
13232
13233 2001-12-10 Akim Demaille <akim@epita.fr>
13234
13235 * src/lalr.c (initialize_lookaheads): New. Extracted from...
13236 * src/LR0.c (set_state_table): here.
13237 * src/lalr.c (lalr): Call it.
13238
13239 2001-12-10 Akim Demaille <akim@epita.fr>
13240
13241 * src/state.h (shifts): Remove the `number' member: shifts are
13242 attached to state, hence no longer need to be labelled with a
13243 state number.
13244
13245 2001-12-10 Akim Demaille <akim@epita.fr>
13246
13247 Now that states have a complete set of members, the linked list of
13248 shifts is useless: just fill directly the state's shifts member.
13249
13250 * src/state.h (shifts): Remove the `next' member.
13251 * src/LR0.c (first_state, last_state): Remove.
13252 Adjust the callers.
13253 (augment_automaton): Don't look for the shifts that must be added
13254 a shift on EOF: it is those of the state we looked for! But now,
13255 since shifts are attached, it is no longer needed to looking
13256 merely by its id: its number.
13257
13258 2001-12-10 Akim Demaille <akim@epita.fr>
13259
13260 * src/LR0.c (augment_automaton): Better variable locality.
13261 Remove an impossible branch: if there is a state corresponding to
13262 the start symbol being shifted, then there is shift for the start
13263 symbol from the initial state.
13264
13265 2001-12-10 Akim Demaille <akim@epita.fr>
13266
13267 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
13268 only when appropriate: when insert_start_shifting_state' is not
13269 invoked.
13270 * tests/regression.at (Rule Line Numbers): Adjust.
13271
13272 2001-12-10 Akim Demaille <akim@epita.fr>
13273
13274 * src/LR0.c (augment_automaton): Now that all states have shifts,
13275 merge the two cases addition shifts to the initial state.
13276
13277 2001-12-10 Akim Demaille <akim@epita.fr>
13278
13279 * src/lalr.c (set_state_table): Move to...
13280 * src/LR0.c: here.
13281 * src/lalr.c (lalr): Don't call it...
13282 * src/LR0.c (generate_states): do it.
13283 * src/LR0.h (first_state): Remove, only the table is used.
13284
13285 2001-12-10 Akim Demaille <akim@epita.fr>
13286
13287 * src/LR0.h (first_shift, first_reduction): Remove.
13288 * src/lalr.c: Don't use first_shift: find shifts through the
13289 states.
13290
13291 2001-12-10 Akim Demaille <akim@epita.fr>
13292
13293 * src/LR0.c: Attach shifts to states as soon as they are
13294 computed.
13295 * src/lalr.c (set_state_table): Instead of assigning shifts to
13296 state, just assert that the mapping was properly done.
13297
13298 2001-12-10 Akim Demaille <akim@epita.fr>
13299
13300 * src/LR0.c (insert_start_shift): Rename as...
13301 (insert_start_shifting_state): this.
13302 (insert_eof_shifting_state, insert_accepting_state): New.
13303 (augment_automaton): Adjust.
13304 Better locality of the variables.
13305 When looking if the start_symbol is shifted from the initial
13306 state, using `while (... symbol != start_symbol ...)' sounds
13307 better than `while (... symbol < start_symbol ...)': If fail
13308 to see how the order between symbols could be relevant!
13309
13310 2001-12-10 Akim Demaille <akim@epita.fr>
13311
13312 * src/getargs.h: Don't declare `spec_name_prefix' and
13313 `spec_file_prefix', declared by src/files.h.
13314 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
13315 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
13316 * src/output.c (prepare): Adjust.
13317 * src/reader.c (symbols_output): Likewise.
13318 * src/vmsgetargs.c: Vaguely adjust, but who cares?
13319
13320 2001-12-10 Akim Demaille <akim@epita.fr>
13321
13322 * src/muscle_tab.c (muscle_init): NULL is a better default than
13323 `"0"'.
13324
13325 2001-12-10 Akim Demaille <akim@epita.fr>
13326
13327 * src/reader.c (reader): Calling symbols_output once is enough.
13328
13329 2001-12-10 Akim Demaille <akim@epita.fr>
13330
13331 Now that states have a complete set of members, the linked list of
13332 reductions is useless: just fill directly the state's reductions
13333 member.
13334
13335 * src/state.h (struct reductions): Remove member `number' and
13336 `next'.
13337 * src/LR0.c (first_reduction, last_reduction): Remove.
13338 (save_reductions): Don't link the new reductions, store them in
13339 this_state.
13340 * src/lalr.c (set_state_table): No need to attach reductions to
13341 states, it's already done.
13342 * src/output.c (output_actions): No longer free the shifts, then
13343 the reductions, then the states: free all the states and their
13344 members.
13345
13346 2001-12-10 Akim Demaille <akim@epita.fr>
13347
13348 * src/options.c (OPTN, DRTV, BOTH): New.
13349 (option_table): Use them.
13350
13351 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
13352 the job of system.h.
13353 * src/options.c: Don't include stdio.h and xalloc.h for the same
13354 reasons.
13355
13356 2001-12-10 Akim Demaille <akim@epita.fr>
13357
13358 * src/output.c (output, prepare): Make sure the values of the
13359 muscles `action' and `prologue' are 0-terminated.
13360
13361 2001-12-10 Akim Demaille <akim@epita.fr>
13362
13363 Clean up GCC warnings.
13364
13365 * src/reader.c (copy_action): `buf' is not used.
13366 (parse_skel_decl): Be static.
13367 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
13368 * src/options.h (create_long_option_table): Have a real prototype.
13369 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
13370 (hash_delete_at): Return const void *.
13371 Adjust casts to preserve the const.
13372
13373 2001-12-10 Akim Demaille <akim@epita.fr>
13374
13375 * configure.in: Require 2.52g.
13376 M4 is not needed, but AUTOM4TE is.
13377 * m4/m4.m4: Remove.
13378 * tests/Makefile.am: Adjust.
13379
13380 2001-12-10 Akim Demaille <akim@epita.fr>
13381
13382 One structure for states is enough, even though theoretically
13383 there are LR(0) states and LALR(1) states.
13384
13385 * src/lalr.h (state_t): Remove.
13386 (state_table): Be state_t **, not state_t *.
13387 * src/state.h (core, CORE_ALLOC): Rename as...
13388 (state_t, STATE_ALLOC): this.
13389 Add the LALR(1) members: shifts, reductions, errs.
13390 * src/LR0.c (state_table): Rename as...
13391 (state_hash): this, to avoid name clashes with the global
13392 `state_table'.
13393 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
13394 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
13395
13396 2001-12-10 Akim Demaille <akim@epita.fr>
13397
13398 Bison dumps core on bash.y.
13399 Reported by Pascal Bart.
13400
13401 * src/warshall.c (bitmatrix_print): New.
13402 (TC): Use it.
13403 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
13404 j must be the outer loop.
13405 * tests/regression.at (Broken Closure): New.
13406
13407 2001-12-05 Akim Demaille <akim@epita.fr>
13408
13409 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
13410 its argument.
13411 Reported by Peter Hamorsky.
13412
13413 2001-12-05 Akim Demaille <akim@epita.fr>
13414
13415 * src/conflicts.c (err_table): Remove.
13416 (resolve_sr_conflict): Adjust.
13417 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
13418 Rename as...
13419 (state_t.reductions, state_t.shifts): this.
13420
13421 2001-12-05 Akim Demaille <akim@epita.fr>
13422
13423 * src/reduce.c (reduce_grammar_tables): No longer disable the
13424 removal of useless rules via CPP but via `if (0)', so that the
13425 compiler still check the code is valid.
13426 For instance, it should have noticed `rline' no longer exists: use
13427 the `line' member of rule_t.
13428 * src/gram.c (dummy, rline): Remove, unused.
13429
13430 2001-12-05 Akim Demaille <akim@epita.fr>
13431
13432 * src/output.c (pack_vector): Use assert, not berror.
13433 * src/main.c (berror): Remove, unused.
13434
13435 2001-12-05 Akim Demaille <akim@epita.fr>
13436
13437 New experimental feature: if --verbose --trace output all the
13438 items of a state, not only its kernel.
13439
13440 * src/print.c (print_core): If `trace_flag', then invoke closure
13441 before outputting the items of the state (print_core is no longer
13442 a correct name them).
13443 (print_results): Invoke new_closure/free_closure if needed.
13444
13445 2001-12-05 Akim Demaille <akim@epita.fr>
13446
13447 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
13448 * src/closure.c, src/closure.h (itemsetsize): Rename as...
13449 (nitemset): for consistency with the rest of the project.
13450
13451 2001-12-05 Akim Demaille <akim@epita.fr>
13452
13453 * src/closure.c (print_closure): Improve.
13454 (closure): Use it for printing input and output.
13455
13456 2001-12-05 Akim Demaille <akim@epita.fr>
13457
13458 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
13459 indexed by nonterminals.
13460
13461 2001-12-05 Akim Demaille <akim@epita.fr>
13462
13463 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
13464 what it was!).
13465 * src/warshall.h: Remove accidental duplication of the content.
13466
13467 2001-12-05 Akim Demaille <akim@epita.fr>
13468
13469 * src/closure.c (set_fderives): De-obfuscate.
13470
13471 2001-12-05 Akim Demaille <akim@epita.fr>
13472
13473 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
13474
13475 2001-12-05 Akim Demaille <akim@epita.fr>
13476
13477 * src/closure.c (set_firsts): De-obfuscate.
13478
13479 2001-12-05 Akim Demaille <akim@epita.fr>
13480
13481 * src/output.c (action_row): De-obfuscate
13482 using the good o' techniques: arrays not pointers, variable
13483 locality, BITISSET, RESETBIT etc.
13484
13485 2001-12-05 Akim Demaille <akim@epita.fr>
13486
13487 Pessimize the code to simplify it: from now on, all the states
13488 have a valid SHIFTS, which NSHIFTS is possibly 0.
13489
13490 * src/LR0.c (shifts_new): Be global and move to..
13491 * src/state.c, src/state.h: here.
13492 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
13493 * src/print_graph: Adjust.
13494
13495 2001-12-05 Akim Demaille <akim@epita.fr>
13496
13497 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
13498 * src/conflicts.c: Use it.
13499 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
13500 incorrectly ``simplified''.
13501
13502 2001-12-05 Akim Demaille <akim@epita.fr>
13503
13504 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
13505 using the good o' techniques: arrays not pointers, variable
13506 locality, BITISSET, RESETBIT etc.
13507
13508 2001-12-05 Akim Demaille <akim@epita.fr>
13509
13510 * src/state.h (SHIFT_SYMBOL): New.
13511 * src/conflicts.c: Use it to deobfuscate.
13512
13513 2001-12-05 Akim Demaille <akim@epita.fr>
13514
13515 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
13516 (print_reductions): De-obfuscate using the good o' techniques:
13517 arrays not pointers, variable locality, BITISSET.
13518
13519 2001-12-05 Akim Demaille <akim@epita.fr>
13520
13521 * src/conflicts.c (print_reductions): Arrays, not pointers.
13522 Use BITISSET.
13523
13524 2001-12-05 Akim Demaille <akim@epita.fr>
13525
13526 * src/conflicts.c (print_reductions): Pessimize, but clarify.
13527
13528 2001-12-05 Akim Demaille <akim@epita.fr>
13529
13530 * src/conflicts.c (print_reductions): Improve variable locality.
13531
13532 2001-12-05 Akim Demaille <akim@epita.fr>
13533
13534 * src/conflicts.c (print_reductions): Pessimize, but clarify.
13535
13536 2001-12-05 Akim Demaille <akim@epita.fr>
13537
13538 * src/conflicts.c (print_reductions): Improve variable locality.
13539
13540 2001-12-05 Akim Demaille <akim@epita.fr>
13541
13542 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
13543 * src/lalr.c: Use them.
13544
13545 2001-12-05 Akim Demaille <akim@epita.fr>
13546
13547 * src/LR0.c (augment_automaton): Formatting changes.
13548 Better variable locality.
13549
13550 2001-12-05 Akim Demaille <akim@epita.fr>
13551
13552 * src/lalr.c (matrix_print): New.
13553 (transpose): Use it.
13554 Use arrays instead of pointers.
13555
13556 2001-12-05 Akim Demaille <akim@epita.fr>
13557
13558 * src/lalr.c (maxrhs): Move to...
13559 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
13560 * src/lalr.c (build_relations): Adjust.
13561
13562 2001-12-05 Akim Demaille <akim@epita.fr>
13563
13564 * src/lalr.c (transpose): Free the memory allocated to the
13565 argument, as it is replaced by the results by the unique caller.
13566 (build_relations): Merely invoke transpose: it handles the memory
13567 deallocation.
13568 Improve variable locality.
13569 Avoid variables used as mere abbreviations.
13570 (compute_lookaheads): Use arrays instead of pointers.
13571
13572 2001-12-05 Akim Demaille <akim@epita.fr>
13573
13574 * src/lalr.c (initialize_F): Improve variable locality.
13575 Avoid variables used as mere abbreviations.
13576
13577 2001-12-05 Akim Demaille <akim@epita.fr>
13578
13579 * src/derives.c (print_derives): Display the ruleno.
13580 * src/lalr.c (initialize_F, transpose): Better variable locality
13581 to improve readability.
13582 Avoid variables used as mere abbreviations.
13583
13584 2001-12-05 Akim Demaille <akim@epita.fr>
13585
13586 * src/lalr.c (traverse): Use arrays instead of pointers.
13587
13588 2001-12-05 Akim Demaille <akim@epita.fr>
13589
13590 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
13591 the handling of squeue.
13592 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
13593
13594 2001-12-05 Akim Demaille <akim@epita.fr>
13595
13596 Because useless nonterminals are now kept alive (instead of being
13597 `destroyed'), we now sometimes examine them, and store information
13598 related to them. Hence we need to know their number, and adjust
13599 memory allocations.
13600
13601 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
13602 static.
13603 * src/LR0.c (allocate_itemsets): The memory allocated to
13604 `symbol_count' was used for two different purpose: once to count
13605 the number of occurrences of each symbol, and later reassigned to
13606 `shift_symbol', containing the symbol that can be shifted from a
13607 given state.
13608 Deobfuscate, i.e., allocate, use and free `symbol_count' here
13609 only, and...
13610 (new_itemsets): Allocate `shift_symbol' here.
13611 (allocate_itemsets): symbol_count includes useless nonterminals.
13612 Make room for them.
13613 (free_storage): Use `free', not `XFREE', for pointers that cannot
13614 be null.
13615
13616 2001-12-05 Akim Demaille <akim@epita.fr>
13617
13618 * src/nullable.c (set_nullable): Deobfuscate the handling of
13619 ritem.
13620 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
13621
13622 2001-12-05 Akim Demaille <akim@epita.fr>
13623
13624 * src/gram.c, src/gram.h (ritem_print): New.
13625 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
13626 (This useless function was defined only to work around VMS linkers
13627 that can't handle compilation units with variables only).
13628 * src/reduce.c (dump_grammar): Use it to trace the construction of
13629 ritem.
13630
13631 2001-12-04 Paul Eggert <eggert@twinsun.com>
13632
13633 * src/bison.simple (union yyalloc): Change member names
13634 to be the same as the stack names.
13635 (yyparse): yyptr is now union yyalloc *, not char *.
13636 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
13637 and may generate better code on some machines.
13638 (yystpcpy): Use prototype if __STDC__ is defined, not just
13639 if __cplusplus is defined.
13640
13641 2001-11-30 Akim Demaille <akim@epita.fr>
13642
13643 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
13644 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
13645 Gettext doesn't compile cleanly, and dies with -Werror.
13646 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
13647 Include WARNING_CFLAGS here.
13648 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
13649 before being defined.
13650
13651 2001-11-27 Paul Eggert <eggert@twinsun.com>
13652
13653 * lib/quotearg.h (quotearg_n, quotearg_n_style):
13654 First arg is int, not unsigned.
13655 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
13656 (SIZE_MAX, UINT_MAX): New macros.
13657 (quotearg_n_options): Abort if N is negative.
13658 Avoid overflow check on hosts where size_t is 64 bits and int
13659 is 32 bits, as overflow is impossible there.
13660 Fix off-by-one typo that caused unnecessary reallocation.
13661
13662 2001-11-29 Paul Eggert <eggert@twinsun.com>
13663
13664 Name space cleanup in generated parser.
13665
13666 * doc/bison.texinfo (Bison Parser): Discuss system headers
13667 and their effect on the user name space.
13668
13669 * src/bison.simple:
13670 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
13671 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
13672 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
13673
13674 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
13675 on user names when possible.
13676
13677 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
13678 Simplify test for whather <alloca.h> exists.
13679
13680 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
13681
13682 (<stdio.h>): Include if YYDEBUG.
13683
13684 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
13685 ! defined (yyoverflow) && ! defined (yymemcpy).
13686
13687 (yymemcpy, yyparse): Rename local variables as needed so that
13688 they all begin with 'yy'.
13689
13690 (yystrlen, yystpcpy): New functions.
13691
13692 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
13693 All uses changed.
13694
13695 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
13696 instead of relying on string.h functions. Use YYSTACK_ALLOC
13697 and YYSTACK_FREE instead of malloc and free.
13698
13699 2001-11-30 Akim Demaille <akim@epita.fr>
13700
13701 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
13702 before their first uses.
13703 (YYBISON, YYPURE): Move to the top of the output.
13704
13705 2001-11-30 Akim Demaille <akim@epita.fr>
13706
13707 * tests/reduce.at (Useless Nonterminals): Fix.
13708
13709 2001-11-30 Akim Demaille <akim@epita.fr>
13710
13711 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
13712 if body instead of `;' to pacify GCC's warnings.
13713
13714 2001-11-30 Akim Demaille <akim@epita.fr>
13715
13716 Instead of mapping the LHS of unused rules to -1, keep the LHS
13717 valid, but flag the rules as invalid.
13718
13719 * src/gram.h (rule_t): `useful' is a new member.
13720 * src/print.c (print_grammar): Adjust.
13721 * src/derives.c (set_derives): Likewise.
13722 * src/reader.c (packgram, reduce_output): Likewise.
13723 * src/reduce.c (reduce_grammar_tables): Likewise.
13724 * tests/reduce.at (Underivable Rules, Useless Rules): New.
13725
13726 2001-11-30 Akim Demaille <akim@epita.fr>
13727
13728 * src/reduce.c (reduce_output): Formatting changes.
13729 * src/print.c (print_results, print_grammar): Likewise.
13730 * tests/regression.at (Rule Line Numbers)
13731 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
13732
13733 2001-11-30 Akim Demaille <akim@epita.fr>
13734
13735 * src/reduce.c (nonterminals_reduce): Instead of throwing away
13736 useless nonterminals, move them at the end of the symbol arrays.
13737 (reduce_output): Adjust.
13738 * tests/reduce.at (Useless Nonterminals): Adjust.
13739
13740 2001-11-30 Akim Demaille <akim@epita.fr>
13741
13742 * src/reduce.c: Various comment/formatting changes.
13743 (nonterminals_reduce): New, extracted from...
13744 (reduce_grammar_tables): here.
13745 (reduce_grammar): Call nonterminals_reduce.
13746
13747 2001-11-29 Paul Eggert <eggert@twinsun.com>
13748
13749 * src/bison.simple (YYSTACK_REALLOC): Remove.
13750 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
13751 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
13752 New macros.
13753 (union yyalloc): New type.
13754 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
13755 an arbitrary restriction on hosts where size_t is wider than int.
13756
13757 (yyparse): Don't dump core if alloca or malloc fails; instead, report
13758 a parser stack overflow. Allocate just one block of memory for all
13759 three stacks, instead of allocating three blocks; this typically is
13760 faster and reduces fragmentation.
13761
13762 Do not limit the number of items in the stack to a value that fits
13763 in 'int', as this is an arbitrary limit on hosts with 64-bit
13764 size_t and 32-bit int.
13765
13766 2001-11-29 Marc Autret <autret_m@epita.fr>
13767
13768 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
13769 of defining YYERROR_VERBOSE.
13770 [AT_DATA]: $4 is now out of C declarations in the prologue.
13771
13772 2001-11-28 Marc Autret <autret_m@epita.fr>
13773
13774 * src/reader.c (parse_dquoted_param): New.
13775 (parse_skel_decl): Use it.
13776 * src/lex.h: Add its prototype.
13777 * src/lex.c (literalchar): Become not static.
13778
13779 2001-11-28 Marc Autret <autret_m@epita.fr>
13780
13781 * src/output.h: And put its extern declaration here.
13782 * src/output.c (error_verbose): Define here.
13783 (prepare): Echo name modification.
13784 * src/getargs.h: Clean its extern declaration.
13785 * src/getargs.c (error_verbose_flag): Remove.
13786 (getargs): Remove case 'e'.
13787 * src/options.c (option_table): 'error-verbose' is now seen as simple
13788 percent option.
13789 Include output.h.
13790
13791 * src/reader.c (read_declarations): Remove case tok_include.
13792 (parse_include_decl): Remove.
13793 * src/lex.h (token_t): Remove tok_include.
13794 * src/options.c (option_table): 'include' is now a simple command line
13795 option.
13796
13797 2001-11-28 Marc Autret <autret_m@epita.fr>
13798
13799 * src/bison.simple: Adjust muscle names.
13800 * src/muscle_tab.c (muscle_init): Also rename the muscles.
13801 * src/output.c (prepare): s/_/-/ for the muscles names.
13802 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
13803
13804 2001-11-28 Marc Autret <autret_m@epita.fr>
13805
13806 * src/bison.simple: Fix debug.
13807 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
13808
13809 2001-11-28 Akim Demaille <akim@epita.fr>
13810
13811 * src/LR0.c (shifts_new): New.
13812 (save_shifts, insert_start_shift, augment_automaton): Use it.
13813
13814 2001-11-28 Akim Demaille <akim@epita.fr>
13815
13816 * src/closure.c (closure): `b' and `ruleno' denote the same value:
13817 keep ruleno only.
13818
13819 2001-11-28 Akim Demaille <akim@epita.fr>
13820
13821 * src/closure.c (closure): Instead of looping over word in array
13822 then bits in words, loop over bits in array.
13823
13824 2001-11-28 Akim Demaille <akim@epita.fr>
13825
13826 * src/closure.c (closure): No longer optimize the special case
13827 where all the bits of `ruleset[r]' are set to 0, to make the code
13828 clearer.
13829
13830 2001-11-28 Akim Demaille <akim@epita.fr>
13831
13832 * src/closure.c (closure): `r' and `c' are new variables, used to
13833 de-obfuscate accesses to RULESET and CORE.
13834
13835 2001-11-28 Akim Demaille <akim@epita.fr>
13836
13837 * src/reduce.c (reduce_print): Use ngettext.
13838 (dump_grammar): Improve the trace accuracy.
13839
13840 2001-11-28 Akim Demaille <akim@epita.fr>
13841
13842 * src/reduce.c (dump_grammar): Don't translate trace messages.
13843
13844 2001-11-28 Akim Demaille <akim@epita.fr>
13845
13846 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
13847 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
13848 as all tags are free'ed afterwards.
13849 From Enrico Scholz.
13850
13851 2001-11-27 Paul Eggert <eggert@twinsun.com>
13852
13853 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
13854 use alloca when we didn't want to, and vice versa.
13855
13856 2001-11-27 Marc Autret <autret_m@epita.fr>
13857
13858 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
13859 initialization.
13860 * src/output.c (prepare): Remove its update.
13861
13862 2001-11-27 Marc Autret <autret_m@epita.fr>
13863
13864 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
13865 Use %error-verbose.
13866
13867 2001-11-27 Marc Autret <autret_m@epita.fr>
13868
13869 * src/bison.simple: Remove YYERROR_VERBOSE using.
13870 Use %%error_verbose.
13871 (yyparse): Likewise.
13872 * src/output.c (prepare): Give its final value.
13873 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
13874 * src/getargs.h: Add its extern declaration.
13875 * src/getargs.c (error_verbose_flag): New int.
13876 (getargs): Update to catch new case.
13877 * src/options.c (option_table): 'error-verbose' is a new option.
13878 (shortopts): Update.
13879
13880 2001-11-27 Akim Demaille <akim@epita.fr>
13881
13882 * src/system.h: Use intl/libgettext.h.
13883 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
13884
13885 2001-11-27 Akim Demaille <akim@epita.fr>
13886
13887 * tests/torture.at (Exploding the Stack Size with Malloc):
13888 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
13889
13890 2001-11-27 Akim Demaille <akim@epita.fr>
13891
13892 * src/files.c: Include error.h.
13893 Reported by Hans Aberg.
13894
13895 2001-11-26 Marc Autret <autret_m@epita.fr>
13896
13897 * src/reader.c (parse_include_decl): New, not yet implemented.
13898 (read_declarations): Add case tok_include.
13899 * src/getargs.h (include): Add its extern definition.
13900 * src/getargs.c (include): New const char *.
13901 (getargs): Add case '-I'.
13902 * src/options.c (option_table): Add include as command line and
13903 percent option.
13904 * src/lex.h (token_t): Add tok_include.
13905
13906 2001-11-26 Akim Demaille <akim@epita.fr>
13907
13908 * src/reader.c (readgram): Make sure rules for mid-rule actions
13909 have a lineno equal to that of their host rule.
13910 Reported by Hans Aberg.
13911 * tests/regression.at (Rule Line Numbers): New.
13912
13913 2001-11-26 Akim Demaille <akim@epita.fr>
13914
13915 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
13916 size_ts.
13917
13918 2001-11-26 Akim Demaille <akim@epita.fr>
13919
13920 * src/complain.c, src/complain.h (error): Remove, provided by
13921 lib/error.[ch].
13922
13923 2001-11-26 Akim Demaille <akim@epita.fr>
13924
13925 * src/reader.c (read_declarations): Don't abort on tok_illegal,
13926 issue an error message.
13927 * tests/regression.at (Invalid %directive): New.
13928 Reported by Hans Aberg.
13929
13930 2001-11-26 Akim Demaille <akim@epita.fr>
13931
13932 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
13933 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
13934
13935 2001-11-26 Akim Demaille <akim@epita.fr>
13936
13937 * src/conflicts.c (conflicts_print): Don't complain at all when
13938 there are no reduce/reduce conflicts, and as many shift/reduce
13939 conflicts as expected.
13940 * tests/regression.at (%expect right): Adjust.
13941
13942 2001-11-23 Akim Demaille <akim@epita.fr>
13943
13944 * lib/alloca.c: Update, from fileutils.
13945
13946 2001-11-23 Akim Demaille <akim@epita.fr>
13947
13948 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
13949
13950 2001-11-23 Akim Demaille <akim@epita.fr>
13951
13952 * src/system.h: Include alloca.h.
13953 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
13954
13955 2001-11-23 Akim Demaille <akim@epita.fr>
13956
13957 * src/print_graph.c (print_actions): Remove `rule', unused.
13958 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
13959 pacify GCC's signed < unsigned warnings.
13960 * src/closure.c (itemsetsize): Likewise.
13961 * src/reader.c (symbol_list_new): Static.
13962
13963 2001-11-23 Akim Demaille <akim@epita.fr>
13964
13965 Attaching lineno to buckets is stupid, since only one copy of each
13966 symbol is kept, only the line of the first occurrence is kept too.
13967
13968 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
13969 * src/reader.c (rline_allocated): Remove, unused.
13970 (symbol_list): Have a `line' member.
13971 (symbol_list_new): New.
13972 (readgram): Use it.
13973 * src/print.c (print_grammar): Output the rule line numbers.
13974 * tests/regression.at (Solved SR Conflicts)
13975 (Unresolved SR Conflicts): Adjust.
13976 Reported by Hans Aberg.
13977
13978 2001-11-22 Marc Autret <autret_m@epita.fr>
13979
13980 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
13981
13982 2001-11-22 Marc Autret <autret_m@epita.fr>
13983
13984 * src/muscle_tab.c (muscle_init): Remove initialization of
13985 skeleton muscle.
13986 * src/output.c (output_master_parser): Do it here.
13987
13988 2001-11-20 Akim Demaille <akim@epita.fr>
13989
13990 * po/sv.po: New.
13991 * configure.in (ALL_LINGUAS): Adjust.
13992 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
13993 longer contains strings to translate.
13994
13995 2001-11-19 Akim Demaille <akim@epita.fr>
13996
13997 * src/conflicts.c (conflicts_print): Add a missing \n.
13998
13999 2001-11-19 Akim Demaille <akim@epita.fr>
14000
14001 * src/nullable.c (nullable_print): New.
14002 (set_nullable): Call it when tracing.
14003 Better locality of variables.
14004
14005 2001-11-19 Akim Demaille <akim@epita.fr>
14006
14007 * src/print.c (print_actions): Better locality of variables.
14008
14009 2001-11-19 Akim Demaille <akim@epita.fr>
14010
14011 * src/derives.c (print_derives): Fix and enrich.
14012 * src/closure.c (print_fderives): Likewise.
14013
14014 2001-11-19 Akim Demaille <akim@epita.fr>
14015
14016 * src/closure.c (itemsetend): Remove, replaced with...
14017 (itemsetsize): new.
14018
14019 2001-11-19 Akim Demaille <akim@epita.fr>
14020
14021 * src/LR0.c (kernel_end): Remove, replaced with...
14022 (kernel_size): new.
14023
14024 2001-11-19 Akim Demaille <akim@epita.fr>
14025
14026 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
14027 to clarify.
14028
14029 2001-11-19 Akim Demaille <akim@epita.fr>
14030
14031 * src/closure.c (closure): Use arrays instead of pointers to clarify.
14032
14033 2001-11-19 Akim Demaille <akim@epita.fr>
14034
14035 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
14036 trace messages.
14037 * src/LR0.c: Likewise.
14038 (allocate_itemsets): Use arrays instead of pointers to clarify.
14039
14040 2001-11-19 Akim Demaille <akim@epita.fr>
14041
14042 * src/getargs.c (statistics_flag): Replace with...
14043 (trace_flag): New.
14044 (longopts): Accept --trace instead of --statistics.
14045 * src/getargs.h, src/options.c: Adjust.
14046 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
14047 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
14048
14049 2001-11-19 Akim Demaille <akim@epita.fr>
14050
14051 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
14052 pointers to clarify the code.
14053 (save_reductions, save_shifts): Factor common parts of alternatives.
14054
14055 2001-11-19 Akim Demaille <akim@epita.fr>
14056
14057 * src/LR0.c (new_state, get_state): Complete TRACE code.
14058 * src/closure.c: Include `reader.h' to get `tags', needed by the
14059 trace code.
14060 Rename the conditional DEBUG as TRACE.
14061 Output consistently TRACEs to stderr, not stdout.
14062 * src/derives.c: Likewise.
14063 * src/reduce.c: (inaccessable_symbols): Using if is better style
14064 than goto.
14065 Use `#if TRACE' instead of `#if 0' for tracing code.
14066
14067 2001-11-19 Akim Demaille <akim@epita.fr>
14068
14069 * src/system.h (LIST_FREE, shortcpy): New.
14070 * src/LR0.c: Use them.
14071 * src/output.c (free_itemsets, free_reductions, free_shifts):
14072 Remove, replaced by LIST_FREE.
14073
14074 2001-11-19 Akim Demaille <akim@epita.fr>
14075
14076 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
14077 (REDUCTIONS_ALLOC): New.
14078 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
14079 allocation.
14080
14081 2001-11-19 Akim Demaille <akim@epita.fr>
14082
14083 * src/LR0.c (new_state): Complete trace code.
14084 * src/nullable.c (set_nullable): Don't translate traces.
14085
14086 2001-11-19 Akim Demaille <akim@epita.fr>
14087
14088 * src/print_graph.c (print_core): Better locality of variables.
14089 * src/print.c (print_core): Likewise.
14090
14091 2001-11-19 Akim Demaille <akim@epita.fr>
14092
14093 * src/vcg.c: You do the output, so you are responsible of the
14094 handling of VCG syntax, in particular: use quotearg.
14095 * src/print_graph.c: Don't.
14096 (print_actions): Don't output the actions as part of the nodes,
14097 since that's the job of the edges.
14098 (print_state): Don't output by hand: fill the node description,
14099 and ask for its output.
14100
14101 2001-11-19 Akim Demaille <akim@epita.fr>
14102
14103 * src/bison.simple (yyparse): When verbosely reporting an error,
14104 no longer put additional quotes around token names.
14105 * tests/calc.at: Adjust.
14106
14107 2001-11-19 Akim Demaille <akim@epita.fr>
14108
14109 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
14110 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
14111 * src/output.c: Adjust.
14112
14113 2001-11-19 Akim Demaille <akim@epita.fr>
14114
14115 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
14116 (rule_t): this.
14117 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
14118
14119 2001-11-19 Akim Demaille <akim@epita.fr>
14120
14121 * src/gram.h (rule_t): New.
14122 (rule_table): New.
14123 (rrhs, rlhs): Remove, part of state_t.
14124 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
14125 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
14126 * src/reader.c, src/reduce.c: Adjust.
14127
14128 2001-11-19 Akim Demaille <akim@epita.fr>
14129
14130 * src/reader.c (symbols_output): New, extracted from...
14131 (packsymbols): Here.
14132 (reader): Call it.
14133
14134 2001-11-19 Akim Demaille <akim@epita.fr>
14135
14136 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
14137 (maxrhs): this new function.
14138
14139 2001-11-19 Akim Demaille <akim@epita.fr>
14140
14141 * src/lalr.c (F): New macro to access the variable F.
14142 Adjust.
14143
14144 2001-11-19 Akim Demaille <akim@epita.fr>
14145
14146 * src/lalr.h (LA): New macro to access the variable LA.
14147 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
14148 * src/lalr.c: Adjust.
14149
14150 2001-11-19 Akim Demaille <akim@epita.fr>
14151
14152 * src/lalr.c (initialize_LA): Only initialize LA. Let...
14153 (set_state_table): handle the `lookaheads' members.
14154
14155 2001-11-19 Akim Demaille <akim@epita.fr>
14156
14157 * src/lalr.h (lookaheads): Removed array, whose contents is now
14158 a member of...
14159 (state_t): this structure.
14160 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
14161 Adjust.
14162
14163 2001-11-19 Akim Demaille <akim@epita.fr>
14164
14165 * src/lalr.h (consistent): Removed array, whose contents is now
14166 a member of...
14167 (state_t): this structure.
14168 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
14169 Adjust.
14170
14171 2001-11-19 Akim Demaille <akim@epita.fr>
14172
14173 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
14174 contents are now members of...
14175 (state_t): this structure.
14176 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
14177 Adjust.
14178
14179 2001-11-19 Akim Demaille <akim@epita.fr>
14180
14181 * src/lalr.h (state_t): New.
14182 (state_table): Be a state_t * instead of a core **.
14183 (accessing_symbol): Remove, part of state_t.
14184 * src/lalr.c: Adjust.
14185 (set_accessing_symbol): Merge into...
14186 (set_state_table): this.
14187 * src/print_graph.c, src/conflicts.c: Adjust.
14188
14189 2001-11-14 Akim Demaille <akim@epita.fr>
14190
14191 * tests/calc.at, tests/output.at, tests/regression.at,
14192 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
14193 now the tests are run in private dirs, therefore AC_CLEANUP and
14194 family can be simplified to 0-ary.
14195 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
14196 use abs. path to find config.h.
14197 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
14198 stderr, there can be way too much random noise.
14199 Instead pass -Werror to GCC and rely on the exit status.
14200 Reported by Wolfram Wagner.
14201
14202 2001-11-14 Akim Demaille <akim@epita.fr>
14203
14204 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
14205 defined only if yyoverflow is defined, to avoid `warning: unused
14206 variable `yyvs1''.
14207 Reported by The Test Suite.
14208
14209 2001-11-14 Akim Demaille <akim@epita.fr>
14210
14211 * src/print.c: Include reduce.h.
14212 Reported by Hans Aberg.
14213
14214 2001-11-14 Akim Demaille <akim@epita.fr>
14215
14216 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
14217 Revert a previous patch: these are really const.
14218 * src/conflicts.c (conflict_report): Additional useless pair of
14219 braces to pacify GCC's warnings for `if () if () {} else {}'.
14220 * src/lex.c (parse_percent_token): Replace equal_offset with
14221 arg_offset.
14222 arg is const.
14223 Be sure to strdup `arg' when used, since there is no reason for
14224 token_buffer not to change.
14225
14226 2001-11-14 Akim Demaille <akim@epita.fr>
14227
14228 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
14229 definition.
14230 * src/main.c (main): Use them.
14231 Suggested by Hans Aberg.
14232
14233 2001-11-12 Akim Demaille <akim@epita.fr>
14234
14235 * src/system.h (ngettext): Now that we use ngettext, be sure to
14236 provide a default definition when NLS are not used.
14237
14238 2001-11-12 Akim Demaille <akim@epita.fr>
14239
14240 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
14241 Use @kbd to denote user input.
14242 (Language and Grammar): ANSIfy the example.
14243 Adjust its layout for info/notinfo.
14244 (Location Tracking Calc): Output error messages to stderr.
14245 Output locations in a more GNUtically correct way.
14246 Fix a couple of Englishos.
14247 Adjust @group/@end group pairs.
14248
14249 2001-11-12 Akim Demaille <akim@epita.fr>
14250
14251 %expect was not functioning at all.
14252
14253 * src/conflicts.c (expected_conflicts): Set to -1.
14254 (conflict_report): Use ngettext.
14255 (conflicts_print): Check %expect and make its violation an error.
14256 * doc/bison.texinfo (Expect Decl): Adjust.
14257 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
14258 * tests/regression.at (%expect not enough, %expect right)
14259 (%expect too much): New.
14260
14261 2001-11-12 Akim Demaille <akim@epita.fr>
14262
14263 * tests/regression.at (Conflicts): Rename as...
14264 (Unresolved SR Conflicts): this.
14265 (Solved SR Conflicts): New.
14266
14267 2001-11-12 Akim Demaille <akim@epita.fr>
14268
14269 * src/reduce.c (print_results): Rename as...
14270 (reduce_output): This.
14271 Output to OUT, passed as argument, instead of output_obstack.
14272 (dump_grammar): Likewise.
14273 (reduce_free): New.
14274 Also free V1.
14275 (reduce_grammar): No longer call reduce_output, since...
14276 * src/print.c (print_results): do it.
14277 * src/main.c (main): Call reduce_free;
14278
14279 2001-11-12 Akim Demaille <akim@epita.fr>
14280
14281 * src/conflicts.c (print_reductions): Accept OUT as argument.
14282 Output to it, not to output_obstack.
14283 * src/print.c (print_actions): Adjust.
14284
14285 2001-11-12 Akim Demaille <akim@epita.fr>
14286
14287 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
14288 the result instead of using...
14289 (src_total, rrc_total, src_count, rrc_count): Remove.
14290 (any_conflicts): Remove.
14291 (print_conflicts): Split into...
14292 (conflicts_print, conflicts_output): New.
14293 * src/conflicts.h: Adjust.
14294 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
14295 * src/print.c (print_grammar): Issue `\n' between two rules.
14296 * tests/regression.at (Conflicts): New.
14297 Reported by Tom Lane.
14298
14299 2001-11-12 Akim Demaille <akim@epita.fr>
14300
14301 * tests/regression.at (Invalid input): Remove, duplicate with
14302 ``Invalid input: 1''.
14303
14304 2001-11-12 Akim Demaille <akim@epita.fr>
14305
14306 * tests/torture.at (AT_DATA_STACK_TORTURE)
14307 (Exploding the Stack Size with Alloca)
14308 (Exploding the Stack Size with Malloc): New.
14309
14310 2001-11-12 Akim Demaille <akim@epita.fr>
14311
14312 * src/bison.simple (YYSTACK_REALLOC): New.
14313 (yyparse) [!yyoverflow]: Use it and free the old stack.
14314 Reported by Per Allansson.
14315
14316 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
14317
14318 * src/bison.simple: Define type yystype instead of YYSTYPE, and
14319 define CPP macro, which substitute YYSTYPE by yystype.
14320 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
14321 with yyltype/YYLTYPE. This allows inclusion of the generated
14322 header within the parser if the compiler, such as GGC, accepts
14323 multiple equivalent #defines.
14324 From Akim.
14325
14326 2001-11-05 Akim Demaille <akim@epita.fr>
14327
14328 * src/reader.c (symbols_output): New, extracted from...
14329 (packsymbols): here.
14330 (reader): Adjust.
14331
14332 2001-11-05 Akim Demaille <akim@epita.fr>
14333
14334 * src/lex.c (parse_percent_token): s/quotearg/quote/.
14335
14336 2001-11-05 Akim Demaille <akim@epita.fr>
14337
14338 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
14339 pattern.
14340
14341 2001-11-05 Akim Demaille <akim@epita.fr>
14342
14343 * src/options.h (struct option_table_struct): set_flags is void*.
14344 * src/options.c (longopts): Support `--output' and `%output'.
14345 (usage): Adjust.
14346 * src/lex.h (tok_setopt): Remove, replaced with...
14347 (tok_intopt, tok_stropt): these new guys.
14348 * src/lex.c (getopt.h): Not needed.
14349 (token_buffer, unlexed_token_buffer): Not const.
14350 (percent_table): Promote `-' over `_' in directive names.
14351 Active `%name-prefix', `file-prefix', and `output'.
14352 (parse_percent_token): Accept possible arguments to directives.
14353 Promote `-' over `_' in directive names.
14354
14355 2001-11-04 Akim Demaille <akim@epita.fr>
14356
14357 * doc/bison.texinfo (Decl Summary): Split the list into
14358 `directives for grammars' and `directives for bison'.
14359 Sort'em.
14360 Add description of `%name-prefix', `file-prefix', and `output'.
14361 Promote `-' over `_' in directive names.
14362 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
14363 Simplify the description of `--name-prefix'.
14364 Promote `-' over `_' in directive names.
14365 Promote `--output' over `--output-file'.
14366 Fix the description of `--defines'.
14367 * tests/output.at: Exercise %file-prefix and %output.
14368
14369 2001-11-02 Akim Demaille <akim@epita.fr>
14370
14371 * doc/refcard.tex: Update.
14372
14373 2001-11-02 Akim Demaille <akim@epita.fr>
14374
14375 * src/symtab.h (SUNDEF): New.
14376 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
14377 stand for `uninitialized', instead of 0.
14378 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
14379 * src/lex.c (lex): Adjust.
14380
14381 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
14382 Number it 0.
14383 Let yylex return it instead of a plain 0.
14384 Reported by Dick Streefland.
14385
14386 2001-11-02 Akim Demaille <akim@epita.fr>
14387
14388 * tests/regression.at (Mixing %token styles): New test.
14389
14390 2001-11-02 Akim Demaille <akim@epita.fr>
14391
14392 * src/reader.c (parse_thong_decl): Formatting changes.
14393 (token_translations_init): New, extracted from...
14394 (packsymbols): Here.
14395 Adjust.
14396
14397 2001-11-01 Akim Demaille <akim@epita.fr>
14398
14399 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
14400 Check that `9foo.y' produces correct cpp guards.
14401 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
14402 guards.
14403 Reported by Wwp.
14404
14405 2001-11-01 Akim Demaille <akim@epita.fr>
14406
14407 * tests/regression.at (Invalid input: 2): New.
14408 * src/lex.c (unlexed_token_buffer): New.
14409 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
14410 too.
14411 Reported by Wwp.
14412
14413 2001-11-01 Akim Demaille <akim@epita.fr>
14414
14415 * tests/calc.at: Catch up with 1.30.
14416 * configure.in: Bump to 1.49a.
14417 Adjust to newer Autotest.
14418
14419 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
14420
14421 * src/conflicts.c: Move global variables rrc_total and src_total ...
14422 (print_conflicts): here.
14423 * src/output.c (output): Free global variable user_toknums.
14424 * src/lex.c (token_obstack): Become static.
14425
14426 2001-10-18 Akim Demaille <akim@epita.fr>
14427
14428 * tests/atlocal.in (GCC): Add.
14429 * tests/calc.at: s/m4_match/m4_bmatch/.
14430 s/m4_patsubst/m4_bpatsubst/.
14431 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
14432 * configure.in: AC_SUBST(GCC).
14433
14434 2001-10-14 Marc Autret <autret_m@epita.fr>
14435
14436 * src/options.c (create_long_option_table): Fix.
14437
14438 2001-10-10 Akim Demaille <akim@epita.fr>
14439
14440 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
14441
14442 2001-10-04 Akim Demaille <akim@epita.fr>
14443
14444 * src/reader.c (parse_union_decl): Push the caracters in
14445 union_obstack, not attrs_obstack.
14446
14447 2001-10-04 Akim Demaille <akim@epita.fr>
14448
14449 Merge in the branch 1.29.
14450
14451 * src/reader.c (packsymbols): Use a temporary obstack for
14452 `%%tokendef', since output_stack is already used elsewhere.
14453
14454 2001-10-02 Akim Demaille <akim@epita.fr>
14455
14456 Bump 1.29d.
14457
14458 2001-10-02 Akim Demaille <akim@epita.fr>
14459
14460 Version 1.29c.
14461
14462 2001-10-02 Akim Demaille <akim@epita.fr>
14463
14464 * tests/regression.at (Invalid CPP headers): New.
14465 From Alexander Belopolsky.
14466 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
14467
14468 2001-10-02 Akim Demaille <akim@epita.fr>
14469
14470 * tests/regression.at (Invalid input): New.
14471 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
14472 Reported by Shura.
14473
14474 2001-10-02 Akim Demaille <akim@epita.fr>
14475
14476 * tests/calc.at: Now that --debug works, the tests must be adjusted.
14477
14478 2001-10-02 Akim Demaille <akim@epita.fr>
14479
14480 * src/output.c (output_parser): Assert `skeleton'.
14481 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
14482 systems.
14483 From Shura.
14484
14485 2001-10-01 Marc Autret <autret_m@epita.fr>
14486
14487 * src/lex.h: Echo modifications.
14488 * src/lex.c (unlex): Parameter is now token_t.
14489 From Hans Aberg.
14490
14491 2001-10-01 Marc Autret <autret_m@epita.fr>
14492
14493 * src/main.c: Include lex.h.
14494 From Hans Aberg.
14495
14496 2001-09-29 Akim Demaille <akim@epita.fr>
14497
14498 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
14499
14500 2001-09-28 Akim Demaille <akim@epita.fr>
14501
14502 * tests/testsuite.at: Update to newer Autotest.
14503 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
14504
14505 2001-09-27 Akim Demaille <akim@epita.fr>
14506
14507 Position independent wrapper.
14508
14509 * tests/bison: Remove.
14510 * tests/bison.in: New.
14511 * configure.in: Adjust.
14512
14513 2001-09-27 Paul Eggert <eggert@twinsun.com>
14514
14515 Port quotearg fixes from tar 1.13.24.
14516
14517 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
14518 tm to be declared.
14519 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
14520 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
14521
14522 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
14523 * m4/mbrtowc.m4: New file.
14524 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
14525 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
14526
14527 2001-09-27 Akim Demaille <akim@epita.fr>
14528
14529 Bump to 1.29c.
14530
14531 2001-09-27 Akim Demaille <akim@epita.fr>
14532
14533 Version 1.29b.
14534
14535 2001-09-25 Akim Demaille <akim@epita.fr>
14536
14537 * src/system.h: Include `xalloc.h'.
14538 Remove it from the C files.
14539 * src/files.c (output_files): Free the obstacks.
14540 * src/lex.c (init_lex): Rename as...
14541 (lex_init): this.
14542 (lex_free): New.
14543 * src/main.c (main): Use it.
14544
14545 2001-09-24 Marc Autret <autret_m@epita.fr>
14546
14547 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
14548 to output informations in fout (FILE*).
14549 (open_graph, close_graph): Likewise.
14550 (output_graph, output_edge, output_node): Likewise.
14551 * src/vcg.h: Update function prototypes.
14552 * src/print_graph.c (print_graph): Open output graph file.
14553 (print_actions): Adjust.
14554 * src/files.h: Remove extern declaration.
14555 * src/files.c: Remove graph_obstack declaration.
14556 (open_files): Remove graph_obstack initialization.
14557 (output_files): Remove graph_obstack saving.
14558
14559 2001-09-24 Marc Autret <autret_m@epita.fr>
14560
14561 * src/files.c (compute_output_file_names): Fix.
14562
14563 2001-09-24 Marc Autret <autret_m@epita.fr>,
14564 Akim Demaille <akim@epita.fr>
14565
14566 * src/reader.c (reader): Remove call to free_symtab ().
14567 * src/main.c (main): Call it here.
14568 Include symtab.h.
14569 * src/conflicts.c (initialize_conflicts): Rename as...
14570 (solve_conflicts): this.
14571 * src/print.c (print_core, print_actions, print_state)
14572 (print_grammar): Dump to a file instead a `output_obstack'.
14573 (print_results): Dump `output_obstack', and then proceed with the
14574 FILE *.
14575 * src/files.c (compute_output_file_names, close_files): New.
14576 (output_files): Adjust.
14577 * src/main.c (main): Adjust.
14578
14579 2001-09-23 Marc Autret <autret_m@epita.fr>
14580
14581 * src/files.c (compute_header_macro): Computes header macro name
14582 from spec_defines_file when given.
14583
14584 2001-09-23 Marc Autret <autret_m@epita.fr>
14585
14586 * src/files.c (output_files): Add default extensions.
14587
14588 2001-09-22 Akim Demaille <akim@epita.fr>
14589
14590 * src/conflicts.c (finalize_conflicts): Rename as...
14591 (free_conflicts): this.
14592
14593 2001-09-22 Akim Demaille <akim@epita.fr>
14594
14595 * src/gram.c (gram_free): Rename back as...
14596 (dummy): this.
14597 (output_token_translations): Free `token_translations'.
14598 * src/symtab.c (free_symtab): Free the tag field.
14599
14600 2001-09-22 Akim Demaille <akim@epita.fr>
14601
14602 Remove `translations' as it is always set to true.
14603
14604 * src/gram.h: Adjust.
14605 * src/reader.c (packsymbols, parse_token_decl): Adjust
14606 * src/print.c (print_grammar): Adjust.
14607 * src/output.c (output_token_translations): Adjust.
14608 * src/lex.c (lex): Adjust.
14609 * src/gram.c: Be sure the set pointers to NULL.
14610 (dummy): Rename as...
14611 (gram_free): this.
14612
14613 2001-09-22 Akim Demaille <akim@epita.fr>
14614
14615 * configure.in: Invoke AM_LIB_DMALLOC.
14616 * src/system.h: Use dmalloc.
14617 * src/LR0.c: Be sure to have pointers initialized to NULL.
14618 (allocate_itemsets): Allocate kernel_items only if needed.
14619
14620 2001-09-22 Akim Demaille <akim@epita.fr>
14621
14622 * configure.in: Bump to 1.29b.
14623 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
14624 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
14625 need xmalloc.c in calc.y.
14626 From Pascal Bart.
14627
14628 2001-09-21 Akim Demaille <akim@epita.fr>
14629
14630 Version 1.29a.
14631 * Makefile.maint, config/config.guess, config/config.sub,
14632 * config/missing: Update from masters.
14633 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
14634 upon package.m4.
14635 * configure.in (ALL_LINGUAS): Add `tr'.
14636
14637 2001-09-21 Akim Demaille <akim@epita.fr>
14638
14639 * tests/Makefile.am (package.m4): Move to...
14640 ($(srcdir)/$(TESTSUITE)): here.
14641
14642 2001-09-20 Akim Demaille <akim@epita.fr>
14643
14644 * src/complain.c: No longer try to be standalone: use system.h.
14645 Don't assume __STDC__ is defined to 1. Just test if it is defined.
14646 * src/complain.h: Likewise.
14647 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
14648 Remove the unused variable `n'.
14649 From Albert Chin-A-Young.
14650
14651 2001-09-18 Marc Autret <autret_m@epita.fr>
14652
14653 * doc/bison.1: Update.
14654 * doc/bison.texinfo (Bison Options): Update --defines and --graph
14655 descriptions.
14656 (Option Cross Key): Update.
14657 Add --graph.
14658
14659 2001-09-18 Marc Autret <autret_m@epita.fr>
14660
14661 * tests/regression.at: New test (comment in %union).
14662
14663 2001-09-18 Marc Autret <autret_m@epita.fr>
14664
14665 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
14666 do that.
14667 Reported by Keith Browne.
14668
14669 2001-09-18 Marc Autret <autret_m@epita.fr>
14670
14671 * tests/output.at: Add tests for --defines and --graph.
14672
14673 2001-09-18 Marc Autret <autret_m@epita.fr>
14674
14675 * tests/output.at: Removes tests of %{header,src}_extension features.
14676
14677 2001-09-18 Akim Demaille <akim@epita.fr>
14678
14679 * tests/Makefile.am (package.m4): New.
14680 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
14681 (_AT_CHECK_CALC_ERROR): Likewise.
14682 Factor the `, ' part of verbose error messages.
14683
14684 2001-09-18 Marc Autret <autret_m@epita.fr>
14685
14686 * src/getargs.c (longopts): Declare --defines and --graph as options
14687 with optional arguments.
14688 * src/files.h: Add extern declarations.
14689 * src/files.c (spec_graph_file, spec_defines_file): New.
14690 (output_files): Update.
14691 Remove CPP-outed code.
14692
14693 2001-09-18 Marc Autret <autret_m@epita.fr>
14694
14695 Turn off %{source,header}_extension feature.
14696
14697 * src/files.c (compute_exts_from_gf): Update.
14698 (compute_exts_from_src): Update.
14699 (output_files): CPP-out useless code.
14700 * src/files.h: Remove {header,source}_extension extern declarations.
14701 * src/reader.c (parse_dquoted_param): CPP-out.
14702 (parse_header_extension_decl): Remove.
14703 (parse_source_extension_decl): Remove.
14704 (read_declarations): Remove cases tok_{hdrext,srcext}.
14705 * src/lex.c (percent_table): Remove {header,source}_extension entries.
14706 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
14707
14708 2001-09-10 Akim Demaille <akim@epita.fr>
14709
14710 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
14711 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
14712 (AT_CHECK_OUTPUT): this.
14713 Merely check ls' exit status, its output is useless.
14714
14715 2001-09-10 Akim Demaille <akim@epita.fr>
14716
14717 * tests/calc.at: Use m4_match.
14718 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
14719
14720 2001-09-10 Marc Autret <autret_m@epita.fr>,
14721 Akim Demaille <akim@epita.fr>
14722
14723 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
14724 enum color_e.
14725 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
14726 to `normal'.
14727 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
14728 * src/lex.h: Adjust prototype.
14729 (token_t): Add `tok_undef'.
14730 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
14731 (parse_percent_token): Now returns token_t.
14732 Add default statement in switch.
14733 (lex): Separate `c' as an input variable, from the token_t result
14734 part.
14735 (unlexed): Is a token_t.
14736
14737 2001-09-10 Akim Demaille <akim@epita.fr>
14738
14739 * configure.in: Bump to 1.29a.
14740
14741 2001-09-07 Akim Demaille <akim@epita.fr>
14742
14743 Version 1.29.
14744
14745 2001-08-30 Akim Demaille <akim@epita.fr>
14746
14747 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
14748 * m4/atconfig.m4: Remove.
14749 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
14750 * tests/bison: New.
14751 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
14752 m4_if, m4_patsubst, and m4_regexp.
14753 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
14754 `input' file instead of echo.
14755
14756 2001-08-29 Akim Demaille <akim@epita.fr>
14757
14758 Bump to 1.28e.
14759
14760 2001-08-29 Akim Demaille <akim@epita.fr>
14761
14762 Version 1.28d.
14763
14764 2001-08-29 Paul Eggert <eggert@twinsun.com>
14765
14766 * src/bison.simple (yyparse): Don't take the address of an
14767 item before the start of an array, as that doesn't conform to
14768 the C Standard.
14769
14770 2001-08-29 Robert Anisko <anisko_r@epita.fr>
14771
14772 * doc/bison.texinfo (Location Tracking Calc): New node.
14773
14774 2001-08-29 Paul Eggert <eggert@twinsun.com>
14775
14776 * src/output.c (output): Do not define const, as this now
14777 causes more problems than it cures.
14778
14779 2001-08-29 Akim Demaille <akim@epita.fr>
14780
14781 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
14782 the nodes.
14783 Be sure to tag the `detailmenu'.
14784
14785 2001-08-29 Akim Demaille <akim@epita.fr>
14786
14787 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
14788 download in a tmp dir.
14789
14790 2001-08-28 Marc Autret <autret_m@epita.fr>
14791
14792 * config/depcomp: New file.
14793
14794 2001-08-28 Marc Autret <autret_m@epita.fr>
14795
14796 * doc/bison.1 (mandoc): Adjust.
14797 From Juan Manuel Guerrero.
14798
14799 2001-08-28 Marc Autret <autret_m@epita.fr>
14800
14801 * src/print_graph.c (print_state): Fix.
14802
14803 2001-08-27 Marc Autret <autret_m@epita.fr>
14804
14805 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
14806 char * members.
14807 Echo modifications to the functions prototypes.
14808 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
14809
14810 2001-08-27 Marc Autret <autret_m@epita.fr>
14811
14812 * src/vcg.c: Include `xalloc.h'.
14813 (add_colorentry): New.
14814 (add_classname): New.
14815 (add_infoname): New.
14816 * src/vcg.h: Add new prototypes.
14817
14818 2001-08-27 Akim Demaille <akim@epita.fr>
14819
14820 * Makefile.maint: Sync. again with CVS Autoconf.
14821
14822 2001-08-27 Akim Demaille <akim@epita.fr>
14823
14824 * Makefile.maint: Formatting changes.
14825 (po-update, cvs-update, update): New targets.
14826 (AMTAR): Remove.
14827
14828 2001-08-27 Akim Demaille <akim@epita.fr>
14829
14830 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
14831 * Makefile.maint: Sync. with CVS Autoconf.
14832
14833 2001-08-27 Marc Autret <autret_m@epita.fr>
14834
14835 * src/vcg.h (struct infoname_s): New.
14836 (struct colorentry_s): New.
14837 (graph_s): New fields {vertical,horizontal}_order in structure.
14838 Add `infoname' field.
14839 Add `colorentry' field;
14840 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
14841 (G_HORIZONTAL_ORDER): New.
14842 (G_INFONAME): New.
14843 (G_COLORENTRY): New.
14844 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
14845 Add output of `infoname'.
14846 Add output of `colorentry'.
14847
14848 2001-08-27 Marc Autret <autret_m@epita.fr>
14849
14850 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
14851 This one shadowed a global parameter.
14852
14853 2001-08-24 Marc Autret <autret_m@epita.fr>
14854
14855 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
14856 instead of `unsigned'.
14857 (print_state): Do not call obstack_object_size () in obstack_grow ()
14858 to avoid macro variables shadowing.
14859
14860 2001-08-23 Marc Autret <autret_m@epita.fr>
14861
14862 * src/lex.c (percent_table): Typo: s/naem/name/.
14863 Add graph option.
14864 Normalize new options declarations.
14865
14866 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
14867
14868 * tests/suite.at: Exercise %header_extension and %source_extension.
14869
14870 2001-08-16 Marc Autret <autret_m@epita.fr>
14871
14872 * src/reader.c (parse_dquoted_param): New.
14873 (parse_header_extension_decl): Use it.
14874 (parse_source_extension_decl): Likewise.
14875
14876 2001-08-16 Marc Autret <autret_m@epita.fr>
14877
14878 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
14879 (get_xxxx_str): Use assert () instead of complain ().
14880 Remove return invokations in default cases.
14881 (get_decision_str): Modify default behaviour. Remove second argument.
14882 Echo modifications on calls.
14883 (output_graph): Fix.
14884
14885 2001-08-16 Marc Autret <autret_m@epita.fr>
14886
14887 * src/getargs.c (usage): Update with ``-g, --graph''.
14888
14889 2001-08-16 Marc Autret <autret_m@epita.fr>
14890
14891 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
14892 (Option Cross Key): Likewise.
14893 * doc/bison.1: Update.
14894
14895 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
14896
14897 * src/output.c (output_master_parser): Don't finish action_obstack.
14898 (output_parser): Don't care about the muscle action, here.
14899 (prepare): Copy the action_obstack in the action muscle.
14900 (output): Free action_obstack.
14901
14902 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
14903
14904 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
14905 will contain `%union' declaration.
14906 (parse_union_decl): Delete #line directive output.
14907 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
14908 informations about %union.
14909 (parse_union_decl): Copy the union_obstack in the muscle stype.
14910 * src/bison.simple: Add new #line directive.
14911 Add typdef %%stype YYSTYPE.
14912
14913 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
14914
14915 * src/bison.simple: Add new `#line' directive.
14916
14917 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
14918
14919 * src/bison.simple: New `#line' directive.
14920 * src/output.c (output_parser): Support new dynamic muscle input_line.
14921
14922 2001-09-22 Marc Autret <autret_m@epita.fr>
14923
14924 * src/output.c (output_master_parser): New.
14925 (output_parser): Be more re-entrant.
14926
14927 2001-09-21 Marc Autret <autret_m@epita.fr>
14928
14929 * src/reader.c (copy_definition, parse_union_decl): Update and use
14930 `linef' muscle.
14931 (copy_action): Likewise.
14932 Use obstack_1grow ().
14933 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
14934
14935 2001-09-21 Marc Autret <autret_m@epita.fr>
14936
14937 * src/options.c (option_table): Adjust.
14938 * src/lex.c (parse_percent_token): Fix.
14939
14940 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
14941
14942 * src/options.c (symtab.h): Include it, need by lex.h.
14943
14944 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
14945
14946 * src/lex.c (parse_percent_token): Change type of variable `tx', which
14947 is now an option_table_struct*.
14948 (option_strcmp): New function option_strcmp.
14949 (parse_percent_token): Call option_strcmp.
14950 * src/getargs.c (xalloc.h, options.h): Include it.
14951 (getargs): Call create_long_option_table.
14952 (getargs): Free longopts at the end of the function.
14953 (shortopts): Move in options.c.
14954 * src/options.c (create_long_option_table): New function. Convert
14955 information from option_table to option structure.
14956 * src/reader.c (options.h): Include it.
14957
14958 * src/Makefile.am: Adjust.
14959 * src/options.c (option_table): Create from longopts and percent_table.
14960 * src/getargs.c (longopts): Delete.
14961 * src/lex.c (struct percent_table_struct): Delete.
14962 (percent_table): Delete.
14963 (options.h): Include it.
14964 * src/options.c: Create.
14965 * src/options.h: Create.
14966 Declare enum opt_access_e.
14967 Define struct option_table_struct.
14968
14969 2001-09-20 Marc Autret <autret_m@epita.fr>
14970
14971 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
14972 sections of Bison.
14973
14974 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
14975
14976 * src/bison.simple: s/%%filename/%%skeleton.
14977 * src/muscle_tab.c (getargs.h): Include it.
14978 (muscle_init): Insert new muscle skeleton.
14979
14980 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
14981
14982 * src/output.c (output_parser): Delete unused variable actions_dumped.
14983
14984 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
14985
14986 * src/output.c (output): Delete call to reader_output_yylsp.
14987 * src/reader.c (reader): Likewise.
14988 * src/reader.h: Delete declaration of reader_output_yylsp.
14989
14990 2001-09-02 Marc Autret <autret_m@epita.fr>
14991
14992 * src/reader.c: Include muscle_tab.h.
14993 (parse_union_decl): Update.
14994 (parse_macro_decl): Rename parse_muscle_decl.
14995 Update to use renamed functions and variable.
14996 (read_declarations, copy_action, read_additionnal_code, : Updated
14997 with correct variables and functions names.
14998 (packsymbols, reader): Likewise.
14999
15000 * src/reader.h (muscle_obstack): Extern declaration update.
15001
15002 * src/output.c: Include muscle_tab.h
15003 In all functions using macro_insert, change by using muscle_insert ().
15004 (macro_obstack): Rename muscle_obstack.
15005 Echo modifications in the whole file.
15006 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
15007 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
15008 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
15009
15010 * src/muscle_tab.h: Update double inclusion macros.
15011 (macro_entry_s): Rename muscle_entry_s.
15012 Update prototypes.
15013
15014 * src/muscle_tab.c: Include muscle_tab.h.
15015 Rename macro_tabble to muscle_table.
15016 (mhash1, mhash2, mcmp): Use muscle_entry.
15017 (macro_init): Rename muscle_init. Update.
15018 (macro_insert): Rename muscle_insert. Update.
15019 (macro_find): Rename muscle_find. Update.
15020
15021 * src/main.c: Include muscle_tab.h.
15022 (main): Call muscle_init ().
15023 * src/Makefile.am (bison_SOURCES): Echo modifications.
15024
15025 2001-09-02 Marc Autret <autret_m@epita.fr>
15026
15027 Now the files macro_tab.[ch] are named muscle_tab.[ch].
15028
15029 * src/muscle_tab.c, src/muscle_tab.h: Add files.
15030
15031 2001-09-02 Marc Autret <autret_m@epita.fr>
15032
15033 * src/macrotab.c, src/macrotab.h: Remove.
15034
15035 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
15036
15037 * src/reader.c (copy_guard): Use muscle to specify the `#line'
15038 filename.
15039
15040 2001-09-01 Marc Autret <autret_m@epita.fr>
15041
15042 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
15043 to an explicit value to activate the feature. We do it here.
15044
15045 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
15046
15047 * src/output.c (prepare): Delete the `filename' muscule insertion.
15048 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
15049 (parse_union_decl): Likewise.
15050 * src/macrotab.c (macro_init): Initialize filename by infile.
15051
15052 2001-08-31 Marc Autret <autret_m@epita.fr>
15053
15054 * src/bison.simple (YYLSP_NEEDED): New definition.
15055 * src/output.c (prepare): Add macro insertion of `locations_flag'
15056
15057 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
15058
15059 * src/output.c (prepare): Delete insertion of previous muscles,
15060 and insert the `prefix' muscles.
15061 * src/macrotab.c (macro_init): Likewise.
15062 (macro_init): Initialization prefix directive by `yy'.
15063 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
15064 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
15065 yylval, yydebug, yyerror, yynerrs and yyparse.
15066 New directive `#define' to substitute yydebug, ... with option
15067 name_prefix.
15068
15069 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
15070
15071 * src/main.c (main): Standardize.
15072 * src/output.c (output_table_data, output_parser): Likewise.
15073 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
15074
15075 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
15076
15077 * src/reader.c (read_additionnal_code): Rename %%user_code to
15078 %%epilogue.
15079 * src/output.c (output): Rename %%declarations to %%prologue.
15080 * src/bison.simple: Echo modifications.
15081
15082 2001-08-31 Marc Autret <autret_m@epita.fr>
15083
15084 * src/reader.c (readgram): CleanUp.
15085 (output_token_defines): Likewise.
15086 (packsymbols): Likewise.
15087 (reader): Likewise.
15088 * src/output.c (output): CPP-out useless code.
15089
15090 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
15091
15092 * src/reader.c (reader): Delete obsolete call to function
15093 output_trailers and output_headers.
15094 * src/output.h: Remove obsolete functions prototypes of output_headers
15095 and output_trailers.
15096
15097 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
15098
15099 * src/main.c: Include macrotab.h.
15100 * src/macrotab.h (macro_entry_s): Constify fields.
15101 Adjust functions prototypes.
15102 * src/macrotab.c (macro_insert): Constify key and value.
15103 (macro_find): Constify key.
15104 (macro_insert): Include 'xalloc.h'
15105 (macro_insert): Use XMALLOC.
15106 (macro_find): Constify return value.
15107 * src/output.c (output_table_data): Rename table to table_data.
15108 (output_parser): Constify macro_key, macro_value.
15109
15110 2001-08-30 Marc Autret <autret_m@epita.fr>
15111
15112 * src/reader.c (parse_skel_decl): New.
15113 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
15114 * src/lex.h (token_t): New token `tok_skel'.
15115 * src/lex.c (percent_table): Add skeleton option entry.
15116 Standardize.
15117
15118 2001-08-29 Marc Autret <autret_m@epita.fr>
15119
15120 * src/bison.simple: Add %%user_code directive at the end.
15121 * src/reader.c (read_additionnal_code): New.
15122 (reader): Use it.
15123 * src/output.c (output_program): Remove.
15124 (output): Update.
15125
15126 2001-08-28 Marc Autret <autret_m@epita.fr>
15127
15128 * src/output.c (output_actions): Clean up.
15129 (output_gram): CPP-out useless code.
15130 * src/reader.c (reader): Clean up, CPP-out useless code.
15131
15132 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
15133
15134 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
15135 directive.
15136 * src/bison.simple: Add `%%definitions'.
15137
15138 2001-08-28 Marc Autret <autret_m@epita.fr>
15139
15140 * config/depcomp: New file.
15141
15142 2001-08-27 Paul Eggert <eggert@twinsun.com>
15143
15144 * src/bison.simple (yyparse): Don't take the address of an
15145 item before the start of an array, as that doesn't conform to
15146 the C Standard.
15147
15148 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
15149
15150 * src/output.c (output): Remove the initialization of the macro
15151 obstack. It was done too late here.
15152
15153 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
15154 completely wrong.
15155 (reader): Initialize the macro obstack here, since we need it to grow
15156 '%define' directives.
15157
15158 * src/reader.h: Declare the macro obstack as extern.
15159
15160 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
15161
15162 * src/output.c (output_parser): Fix. Store single '%' characters in
15163 the output obstack instead of throwing them away.
15164
15165 2001-08-27 Akim Demaille <akim@epita.fr>
15166
15167 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
15168
15169 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
15170
15171 * lib/Makefile.am: Adjust.
15172
15173 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
15174
15175 * src/bison.simple: Update and add '%%' directives.
15176
15177 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
15178
15179 * src/reader.c (reader): Remove calls to 'output_headers' and
15180 'output_trailers'. Remove some C output.
15181 (readgram): Disable a piece of code that was writing a default
15182 definition for 'YYSTYPE'.
15183 (reader_output_yylsp): Remove.
15184 (packsymbols): Output token defintions to a macro.
15185 (copy_definition): Disable C output.
15186
15187 * src/reader.c (parse_macro_decl): New function used to parse macro
15188 declarations.
15189 (copy_string2): Put the body of copy_string into this new function.
15190 Add a parameter to let the caller choose whether he wants to copy the
15191 string delimiters or not.
15192 (copy_string): Be a simple call to copy_string2 with the last argument
15193 bound to true.
15194 (read_declarations): Add case for macro definition.
15195 (copy_identifier): New.
15196 (parse_macro_decl): Read macro identifiers using copy_identifier
15197 rather than lex.
15198
15199 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
15200
15201 * src/output.c (prepare): Add prefixed names.
15202 (output_parser): Output semantic actions.
15203 (output_parser): Fix bug on '%%line' directives.
15204
15205 * src/output.c (output_headers): Remove. The C code printed by this
15206 function should now be in the skeletons.
15207 (output_trailers): Remove.
15208 (output): Disable call to 'reader_output_yylsp'.
15209 (output_rule_data): Do not output tables to the table obstack.
15210
15211 * src/output.c: Remove some C dedicated output.
15212 Improve the use of macro and output obstacks.
15213 (output_defines): Remove.
15214
15215 * src/output.c (output_token_translations): Associate 'translate'
15216 table with a macro. No output to the table obstack.
15217 (output_gram): Same for 'rhs' and 'prhs'.
15218 (output_stos): Same for 'stos'.
15219 (output_rule_data): Same for 'r1' and 'r2'.
15220 (token_actions): Same for 'defact'.
15221 (goto_actions): Same for 'defgoto'.
15222 (output_base): Same for 'pact' and 'pgoto'.
15223 (output_table): Same for 'table'.
15224 (output_check): Same for 'check'.
15225
15226 * src/output.c (output_table_data): New function.
15227 (output_short_table): Remove.
15228 (output_short_or_char_table): Remove.
15229
15230 * src/output.c (output_parser): Replace most of the skeleton copy code
15231 with something new. Skeletons are now processed character by character
15232 rather than line by line, and Bison looks for '%%' macros. This is the
15233 first step in making Bison's output process (a lot) more flexible.
15234 (output_parser): Use the macro table.
15235
15236 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
15237
15238 * src/main.c (main): Initialize the macro table.
15239
15240 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
15241
15242 * src/lex.c (percent_table): Add tok_define.
15243 * src/lex.h: Add tok_define.
15244
15245 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
15246
15247 * src/macrotab.c: New file.
15248 * src/macrotab.h: New file.
15249 * src/Makefile.am: Update.
15250
15251 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
15252
15253 * lib/hash.c: New file.
15254 * lib/hash.h: New file.
15255 * lib/Makefile.am: Update.
15256
15257 2001-08-15 Akim Demaille <akim@epita.fr>
15258
15259 Version 1.28c.
15260
15261 2001-08-15 Marc Autret <autret_m@epita.fr>
15262
15263 * src/reader.c (readgram): Indent output macro YYSTYPE.
15264 (packsymbols): Likewise.
15265 (output_token_defines): Likewise.
15266 * src/files.c: Standardize.
15267 (compute_header_macro): New.
15268 (defines_obstack_save): New. Use compute_header_macro.
15269 (output_files): Update. Use defines_obstack_save.
15270
15271 2001-08-15 Akim Demaille <akim@epita.fr>
15272
15273 * doc/bison.texinfo (Table of Symbols): Document
15274 YYSTACK_USE_ALLOCA.
15275
15276 2001-08-15 Akim Demaille <akim@epita.fr>
15277
15278 * missing: Update from CVS Automake.
15279 * config/config.guess, config/config.sub, config/texinfo.tex:
15280 Update from gnu.org.
15281
15282 2001-08-15 Akim Demaille <akim@epita.fr>
15283
15284 * Makefile.maint: Sync with CVS Autoconf.
15285
15286 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
15287
15288 * doc/bison.texinfo: Include GNU Free Documentation License from
15289 `fdl.texi'.
15290 * doc/fdl.texi: Add to package.
15291
15292 2001-08-14 Marc Autret <autret_m@epita.fr>
15293
15294 Turn on %{source,header}_extension features.
15295
15296 * src/lex.c (percent_table): Un-CPP out header_extension and
15297 source_extension.
15298 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
15299 (compute_exts_from_src): Remove conditions. It restores priorities
15300 between options.
15301
15302 2001-08-14 Marc Autret <autret_m@epita.fr>
15303
15304 * src/files.c (compute_base_names): Add extensions computing when
15305 `--file-prefix' used.
15306 Standardize function calls.
15307
15308 2001-08-13 Marc Autret <autret_m@epita.fr>
15309
15310 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
15311 defining it (defined but null disables alloca).
15312
15313 2001-08-13 Marc Autret <autret_m@epita.fr>
15314
15315 * src/bison.simple (_yy_memcpy): CPP reformat.
15316
15317 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
15318
15319 * tests/atconfig.in (CPPFLAGS): Fix.
15320
15321 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
15322
15323 * doc/bison.texinfo: Include GNU General Public License from
15324 `gpl.texi'.
15325 * doc/gpl.texi: Add to package.
15326
15327 2001-08-10 Marc Autret <autret_m@epita.fr>
15328
15329 * src/print_graph.h: Fix.
15330 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
15331
15332 2001-08-10 Akim Demaille <akim@epita.fr>
15333
15334 * src/system.h: Provide default declarations for stpcpy, strndup,
15335 and strnlen.
15336
15337 2001-08-10 Robert Anisko <anisko_r@epita.fr>
15338
15339 * doc/bison.texinfo (Locations): Update @$ stuff.
15340
15341 2001-08-09 Robert Anisko <anisko_r@epita.fr>
15342
15343 * src/bison.simple (YYLLOC_DEFAULT): Update.
15344 (yyparse): Adjust.
15345
15346 2001-08-08 Marc Autret <autret_m@epita.fr>
15347
15348 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
15349 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
15350 Reported by Fabrice Bauzac.
15351
15352 2001-08-08 Marc Autret <autret_m@epita.fr>
15353
15354 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
15355 * src/vcg.c (output_node): Fix.
15356 * src/vcg.h: Cleanup.
15357 * src/print_graph.c: Add comments.
15358 (node_output_size): New global variable. Simplify the formatting of
15359 the VCG graph output.
15360 (print_actions): Unused code is now used. It notifies the final state
15361 and no action states in the VCG graph. It also give the reduce actions.
15362 The `shift and goto' edges are red and the `go to state' edges are
15363 blue.
15364 Get the current node name and node_obstack by argument.
15365 (node_obstack): New variable.
15366 (print_state): Manage node_obstack.
15367 (print_core): Use node_obstack given by argument.
15368 A node is not only computed here but in print_actions also.
15369 (print_graph): CPP out useless code instead of commenting it.
15370
15371 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
15372
15373 * tests/atconfig.in (CPPFLAGS): Fix.
15374
15375 2001-08-07 Akim Demaille <akim@epita.fr>
15376
15377 * src/print_graph.c (quote): New.
15378 (print_core): Use it.
15379
15380 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
15381
15382 * src/vcg.c (complain.h): Include it.
15383 Unepitaize `return' invocations.
15384 [NDEBUG] (main): Remove.
15385 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
15386 * src/files.c (open_files): Initialize graph_obstack.
15387 * src/print_graph.c (print_actions): CPP out useless code.
15388 (print_core): Don't output the last `\n' in labels.
15389 Use `quote'.
15390 * src/files.c (output_files): Output the VCG file.
15391 * src/main.c (main): Invoke print_graph ();
15392
15393 2001-08-06 Marc Autret <autret_m@epita.fr>
15394
15395 Automaton VCG graph output.
15396 Using option ``-g'' or long option ``--graph'', you can generate
15397 a gram_filename.vcg file containing a VCG description of the LALR (1)
15398 automaton of your grammar.
15399
15400 * src/main.c: Call to print_graph() function.
15401 * src/getargs.h: Update.
15402 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
15403 (graph_flag): New flag.
15404 (longopts): Update.
15405 (getargs): Add case `g'.
15406 * src/files.c (graph_obstack): New obstack struct.
15407 (open_files): Initialize new obstack.
15408 (output_files): Saves graph_obstack if required.
15409 * src/files.h (graph_obstack): New extern declaration.
15410 * src/Makefile.am: Add new source files.
15411
15412 2001-08-06 Marc Autret <autret_m@epita.fr>
15413
15414 * src/print_graph.c, src/print_graph.h (graph): New.
15415 * src/vcg.h: New file.
15416 * src/vcg.c: New file, VCG graph handling.
15417
15418 2001-08-06 Marc Autret <autret_m@epita.fr>
15419
15420 Add of %source_extension and %header_extension which specify
15421 the source or/and the header output file extension.
15422
15423 * src/files.c (compute_base_names): Remove initialisation of
15424 src_extension and header_extension.
15425 (compute_exts_from_gf): Update.
15426 (compute_exts_from_src): Update.
15427 (output_files): Update.
15428 * src/reader.c (parse_header_extension_decl): New.
15429 (parse_source_extension_decl): New.
15430 (read_declarations): New case statements for the new tokens.
15431 * src/lex.c (percent_table): Add entries for %source_extension
15432 and %header_extension.
15433 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
15434
15435 2001-08-06 Marc Autret <autret_m@epita.fr>
15436
15437 * configure.in: Bump to 1.28c.
15438 * doc/bison.texinfo: Texinfo thingies.
15439
15440 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
15441
15442 * tests/atconfig.in (CPPFLAGS): Add.
15443 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
15444
15445 2001-08-03 Akim Demaille <akim@epita.fr>
15446
15447 Version 1.28b.
15448
15449 2001-08-03 Akim Demaille <akim@epita.fr>
15450
15451 * tests/Makefile.am (check-local): Ship testsuite.
15452 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
15453 Include `string.h'.
15454
15455 2001-08-03 Akim Demaille <akim@epita.fr>
15456
15457 * configure.in: Try using -Wformat when compiling.
15458
15459 2001-08-03 Akim Demaille <akim@epita.fr>
15460
15461 * configure.in: Bump to 1.28b.
15462
15463 2001-08-03 Akim Demaille <akim@epita.fr>
15464
15465 * src/complain.c: Adjust strerror_r portability issues.
15466
15467 2001-08-03 Akim Demaille <akim@epita.fr>
15468
15469 Version 1.28a.
15470
15471 2001-08-03 Akim Demaille <akim@epita.fr>
15472
15473 * src/getargs.c, src/getarg.h (skeleton)): Constify.
15474 * src/lex.c (literalchar): Avoid name clashes on `buf'.
15475 * src/getargs.c: Include complain.h.
15476 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
15477 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
15478
15479 2001-08-03 Akim Demaille <akim@epita.fr>
15480
15481 * src/reader.c (readgram): Display hidden chars in error messages.
15482
15483 2001-08-03 Akim Demaille <akim@epita.fr>
15484
15485 Update to gettext 0.10.39.
15486
15487 2001-08-03 Akim Demaille <akim@epita.fr>
15488
15489 * lib/strspn.c: New.
15490
15491 2001-08-01 Marc Autret <autret_m@epita.fr>
15492
15493 * doc/bison.texinfo: Update.
15494 * doc/bison.1 (mandoc): Update.
15495 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
15496 * src/files.c: Support output files extensions computing.
15497 (src_extension): New static variable.
15498 (header_extension): New static variable.
15499 (tr): New function.
15500 (get_extension_index): New function, gets the index of an extension
15501 filename in a string.
15502 (compute_exts_from_gf): New function, computes extensions from the
15503 grammar file extension.
15504 (compute_exts_from_src): New functions, computes extensions from the
15505 C source file extension, file given by ``-o'' option.
15506 (compute_base_names): Update.
15507 (output_files): Update.
15508
15509 2001-08-01 Robert Anisko <anisko_r@epita.fr>
15510
15511 * doc/bison.texi: Document @$.
15512 (Locations): New section.
15513
15514 2001-07-18 Akim Demaille <akim@epita.fr>
15515
15516 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
15517 * config/prev-version.txt, config/move-if-change: New.
15518 * Makefile.am: Adjust.
15519
15520 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
15521
15522 * src/bison.simple (yyparse): Suppress warning `comparaison
15523 between signed and unsigned'.
15524
15525 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
15526
15527 * src/getargs.h (raw_flag): Remove.
15528 * src/getargs.c: Die on `-r'/`--raw'.
15529 * src/lex.c (parse_percent_token): Die on `%raw'.
15530 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
15531 * tests/calc.at: Suppress test with option `--raw'.
15532
15533 2001-07-14 Akim Demaille <akim@epita.fr>
15534
15535 * config/: New.
15536 * configure.in: Require Autoconf 2.50.
15537 Update to gettext 0.10.38.
15538
15539 2001-03-16 Akim Demaille <akim@epita.fr>
15540
15541 * doc/bison.texinfo: ANSIfy the examples.
15542
15543 2001-03-16 Akim Demaille <akim@epita.fr>
15544
15545 * getargs.c (skeleton): New variable.
15546 (longopts): --skeleton is a new option.
15547 (shortopts, getargs): -S is a new option.
15548 * getargs.h: Declare skeleton.
15549 * output.c (output_parser): Use it.
15550
15551 2001-03-16 Akim Demaille <akim@epita.fr>
15552
15553 * m4/strerror_r.m4: New.
15554 * m4/error.m4: Run AC_FUNC_STRERROR_R.
15555 * lib/error.h, lib/error.c: Update.
15556
15557 2001-03-16 Akim Demaille <akim@epita.fr>
15558
15559 * src/getargs.c (longopts): Clean up.
15560
15561 2001-02-21 Akim Demaille <akim@epita.fr>
15562
15563 * src/reader.c (gensym): `gensym_count' is your own.
15564 Use a static buf to create the symbol name, as token_buffer is no
15565 longer a buffer.
15566
15567 2001-02-08 Akim Demaille <akim@epita.fr>
15568
15569 * src/conflicts.c (conflict_report): Be sure not to append to res
15570 between two calls, which could happen if both first sprintf were
15571 skipped, but not the first cp += strlen.
15572
15573 2001-02-08 Akim Demaille <akim@epita.fr>
15574
15575 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
15576 New, from fileutils 4.0.37.
15577 * configure.in: Require Autoconf 2.49c. I took some time before
15578 making this decision. This is the only way out for portability
15579 issues in Bison, it would mean way too much duplicate effort to
15580 import in Bison features implemented in 2.49c since 2.13.
15581 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
15582
15583 2001-02-02 Akim Demaille <akim@epita.fr>
15584
15585 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
15586 * lib/xalloc.h, lib/xmalloc.c: Update.
15587
15588 2001-01-19 Akim Demaille <akim@epita.fr>
15589
15590 Get rid of the ad hoc handling of token_buffer in the scanner: use
15591 the obstacks.
15592
15593 * src/lex.c (token_obstack): New.
15594 (init_lex): Initialize it. No longer call...
15595 (grow_token_buffer): this. Remove it.
15596 Adjust all the places which used it to use the obstack.
15597
15598 2001-01-19 Akim Demaille <akim@epita.fr>
15599
15600 * src/lex.h: Rename all the tokens:
15601 s/\bENDFILE\b/tok_eof/g;
15602 s/\bIDENTIFIER\b/tok_identifier/g;
15603 etc.
15604 Let them be enums, not #define, to ease debugging.
15605 Adjust all the code.
15606
15607 2001-01-18 Akim Demaille <akim@epita.fr>
15608
15609 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
15610 * src/lex.c (maxtoken, grow_token_buffer): Static.
15611
15612 2001-01-18 Akim Demaille <akim@epita.fr>
15613
15614 Since we now use obstacks, more % directives can be enabled.
15615
15616 * src/lex.c (percent_table): Also accept `%yacc',
15617 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
15618 `%debug'.
15619 Handle the actions for `%semantic_parser' and `%pure_parser' here,
15620 instead of returning a token.
15621 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
15622 * src/reader.c (read_declarations): Adjust.
15623 * src/files.c (open_files): Don't call `compute_base_names', don't
15624 compute `attrsfile' since they depend upon data which might be
15625 *in* the input file now.
15626 (output_files): Do it here.
15627 * src/output.c (output_headers): Document the fact that this patch
15628 introduces a guaranteed SEGV for semantic parsers.
15629 * doc/bison.texinfo: Document them.
15630 * tests/suite.at: Exercise these %options.
15631
15632 2000-12-20 Akim Demaille <akim@epita.fr>
15633
15634 Also handle the output file (--verbose) with obstacks.
15635
15636 * files.c (foutput): Remove.
15637 (output_obstack): New.
15638 Adjust all dependencies.
15639 * src/conflicts.c: Return a string.
15640 * src/system.h (obstack_grow_string): Rename as...
15641 (obstack_sgrow): this. Be ready to work with non literals.
15642 (obstack_fgrow4): New.
15643
15644 2000-12-20 Akim Demaille <akim@epita.fr>
15645
15646 * src/files.c (open_files): Fix the computation of short_base_name
15647 in the case of `-o foo.tab.c'.
15648
15649 2000-12-20 Akim Demaille <akim@epita.fr>
15650
15651 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
15652 (copy_dollar): Now that everything uses obstacks, get rid of the
15653 FILE * parameters.
15654
15655 2000-12-20 Akim Demaille <akim@epita.fr>
15656
15657 * src/files.c (open_files): Actually the `.output' file is based
15658 on the short_base_name, not base_name.
15659 * tests/suite.at (Checking output file names): Adjust.
15660
15661 2000-12-20 Akim Demaille <akim@epita.fr>
15662
15663 * src/bison.s1: Remove, we now use directly...
15664 * src/bison.simple: this.
15665 * src/Makefile.am: Use pkgdata instead of data.
15666
15667 2000-12-20 Akim Demaille <akim@epita.fr>
15668
15669 * src/files.c (guard_obstack): New.
15670 (open_files): Initialize it.
15671 (output_files): Dump it...
15672 * src/files.h: Export it.
15673 * src/reader.c (copy_guard): Use it.
15674
15675 2000-12-19 Akim Demaille <akim@epita.fr>
15676
15677 * src/files.c (outfile, defsfile, actfile): Removed as global
15678 vars.
15679 (open_files): Don't compute them.
15680 (output_files): Adjust.
15681 (base_name, short_base_name): Be global.
15682 Adjust dependencies.
15683
15684 2000-12-19 Akim Demaille <akim@epita.fr>
15685
15686 * src/files.c (strsuffix): New.
15687 (stringappend): Be just like strcat but allocate.
15688 (base_names): Eve out from open_files.
15689 Try to simplify the rather hairy computation of base_name and
15690 short_base_name.
15691 (open_files): Use it.
15692 * tests/suite.at (Checking output file names): New test.
15693
15694 2000-12-19 Akim Demaille <akim@epita.fr>
15695
15696 * src/system.h (obstack_grow_literal_string): Rename as...
15697 (obstack_grow_string): this.
15698 * src/output.c (output_parser): Recognize `%% actions' instead of
15699 `$'.
15700 * src/bison.s1: s/$/%% actions/.
15701 * src/bison.hairy: Likewise.
15702
15703 2000-12-19 Akim Demaille <akim@epita.fr>
15704
15705 * src/output.c (output_parser): Compute the `#line' lines when
15706 there are.
15707 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
15708 Suggested by Hans Aberg.
15709
15710 2000-12-19 Akim Demaille <akim@epita.fr>
15711
15712 Let the handling of the skeleton files be local to the procedures
15713 that use it.
15714
15715 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
15716 longer static.
15717 (fparser, open_extra_files): Remove.
15718 (open_files, output_files): Don't take care of fparser.
15719 * src/files.h: Adjust.
15720 * src/output.c (output_parser): Open and close the file to the
15721 skeleton.
15722 * src/reader.c (read_declarations): When %semantic_parser, open
15723 fguard.
15724
15725 2000-12-19 Akim Demaille <akim@epita.fr>
15726
15727 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
15728 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
15729
15730 2000-12-19 Akim Demaille <akim@epita.fr>
15731
15732 * src/files.c (open_files): Yipee! We no longer need all the code
15733 looking for `/tmp' since we have no tmp file.
15734
15735 2000-12-19 Akim Demaille <akim@epita.fr>
15736
15737 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
15738 New macros.
15739 * src/files.c (open_files): Less dependency on MSDOS etc.
15740
15741 2000-12-14 Akim Demaille <akim@epita.fr>
15742
15743 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
15744 Provide a default definition.
15745 Use it when executing the default @ action.
15746 * src/reader.c (reader_output_yylsp): No longer include
15747 `timestamp' and `text' in the default YYLTYPE.
15748
15749 2000-12-12 Akim Demaille <akim@epita.fr>
15750
15751 * src/reader.c (copy_definition, parse_union_decl, copy_action)
15752 (copy_guard): Quote the file names.
15753 Reported by Laurent Mascherpa.
15754
15755 2000-12-12 Akim Demaille <akim@epita.fr>
15756
15757 * src/output.c (output_headers, output_program, output): Be sure
15758 to escape special characters when outputting filenames.
15759 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
15760 (output_headers): Don't depend on them, Use ACTSTR.
15761
15762 2000-11-17 Akim Demaille <akim@epita.fr>
15763
15764 * lib/obstack.h: Formatting changes.
15765 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
15766 prevents type checking.
15767 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
15768 cast the value to (void *): assigning a `foo *' to a `void *'
15769 variable is valid.
15770 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
15771 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
15772 append characters.
15773
15774 2000-11-17 Akim Demaille <akim@epita.fr>
15775
15776 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
15777 as...
15778 (suite.m4, regression.m4, calc.m4): these.
15779 * tests/atgeneral.m4: Update from CVS Autoconf.
15780
15781 2000-11-17 Akim Demaille <akim@epita.fr>
15782
15783 * tests/regression.m4 (%union and --defines): New test,
15784 demonstrating a current bug in the obstack implementation.
15785
15786 2000-11-17 Akim Demaille <akim@epita.fr>
15787
15788 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
15789 macros.
15790 Use them to declare the variables which are global or local to
15791 `yyparse'.
15792
15793 2000-11-17 Akim Demaille <akim@epita.fr>
15794
15795 * acconfig.h: Remove, no longer used.
15796
15797 2000-11-07 Akim Demaille <akim@epita.fr>
15798
15799 * src: s/Copyright (C)/Copyright/g.
15800
15801 2000-11-07 Akim Demaille <akim@epita.fr>
15802
15803 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
15804 defining.
15805 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
15806
15807 2000-11-07 Akim Demaille <akim@epita.fr>
15808
15809 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
15810 Merge in a single CPP if/else.
15811
15812 2000-11-07 Akim Demaille <akim@epita.fr>
15813
15814 * src/output.c (output): Remove useless variables.
15815 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
15816 argument `data' for consistency with the prototypes.
15817 Qualify it `const'.
15818 (obstack_copy, obstack_copy0): Rename the second argument as
15819 `address' for consistency. Qualify it `const'.
15820 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
15821 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
15822 `const' their input argument (`data' or `address').
15823 Adjust the corresponding macros to include `const' in casts.
15824
15825 2000-11-03 Akim Demaille <akim@epita.fr>
15826
15827 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
15828 s/PFILE1/BISON_HAIRY/.
15829 Adjust dependencies.
15830
15831 2000-11-03 Akim Demaille <akim@epita.fr>
15832
15833 For some reason, this was not applied.
15834
15835 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
15836 `unlink': it's no longer used.
15837
15838 2000-11-03 Akim Demaille <akim@epita.fr>
15839
15840 * src/files.c (skeleton_find): New function, eved out of...
15841 (open_files, open_extra_files): here.
15842
15843 2000-11-03 Akim Demaille <akim@epita.fr>
15844
15845 Don't use `atexit'.
15846
15847 * src/files.c (obstack_save): New function.
15848 (done): Rename as...
15849 (output_files): this.
15850 Use `obstack_save'.
15851 * src/main.c (main): Don't use `atexit' to register `done', since
15852 it no longer has to remove tmp files, just call `output_files'
15853 when there are no errors.
15854
15855 2000-11-02 Akim Demaille <akim@epita.fr>
15856
15857 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
15858 `unlink': it's no longer used.
15859 * src/files.h: Formatting changes.
15860
15861 2000-11-02 Akim Demaille <akim@epita.fr>
15862
15863 Remove the last uses of mktemp and unlink/delete.
15864
15865 * src/files.c (fdefines, ftable): Removed.
15866 (defines_ostack, table_obstack): New.
15867 Adjust dependencies of the former into uses of the latter.
15868 * src/output.c (output_short_or_char_table, output_short_table):
15869 Convert to using obstacks.
15870 * src/reader.c (copy_comment2): Accept one FILE * and two
15871 obstacks.
15872 (output_token_defines, reader_output_yylsp): Use obstacks.
15873 * src/system.h (obstack_fgrow3): New.
15874 * po/POTFILES.in: Adjust.
15875
15876 2000-11-01 Akim Demaille <akim@epita.fr>
15877
15878 Change each use of `fattrs' into a use of `attrs_obstack'.
15879
15880 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
15881 * src/files.c (fattrs): Remove.
15882 (attrs_obstack): New.
15883 Adjust all dependencies.
15884 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
15885
15886 2000-11-01 Akim Demaille <akim@epita.fr>
15887
15888 Introduce obstacks.
15889 Change each use of `faction' into a use of `action_obstack'.
15890
15891 * lib/obstack.h, lib/obstack.c: New files.
15892 * src/files.c (faction): Remove.
15893 (action_obstack): New.
15894 Adjust all dependencies.
15895
15896 2000-10-20 Akim Demaille <akim@epita.fr>
15897
15898 * lib/quote.h (PARAMS): New macro. Use it.
15899
15900 2000-10-16 Akim Demaille <akim@epita.fr>
15901
15902 * src/output.c (output_short_or_char_table): New function.
15903 (output_short_table, output_token_translations): Use it.
15904 (goto_actions): Use output_short_table.
15905
15906 2000-10-16 Akim Demaille <akim@epita.fr>
15907
15908 * src/symtab.c (bucket_new): New function.
15909 (getsym): Use it.
15910
15911 * src/output.c (output_short_table): New argument to display the
15912 comment associated with the table.
15913 Adjust dependencies.
15914 (output_gram): Use it.
15915 (output_rule_data): Nicer output layout for YYTNAME.
15916
15917 2000-10-16 Akim Demaille <akim@epita.fr>
15918
15919 * src/lex.c (read_typename): New function.
15920 (lex): Use it.
15921 * src/reader.c (copy_dollar): Likewise.
15922
15923 2000-10-16 Akim Demaille <akim@epita.fr>
15924
15925 * src/reader.c (copy_comment2): Expect the input stream to be on
15926 the `/' which is suspected to open a comment, instead of being
15927 called after `//' or `/*' was read.
15928 (copy_comment, copy_definition, parse_union_decl, copy_action)
15929 (copy_guard): Adjust.
15930
15931 2000-10-16 Akim Demaille <akim@epita.fr>
15932
15933 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
15934 `read_signed_integer'.
15935
15936 2000-10-16 Akim Demaille <akim@epita.fr>
15937
15938 * src/reader.c (copy_dollar): New function.
15939 (copy_guard, copy_action): Use it.
15940
15941 2000-10-16 Akim Demaille <akim@epita.fr>
15942
15943 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
15944 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
15945 New files, from Fileutils 4.0.27.
15946 * src/main.c (printable_version): Remove.
15947 * src/lex.c, src/reader.c: Use `quote'.
15948
15949 2000-10-04 Akim Demaille <akim@epita.fr>
15950
15951 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
15952
15953 2000-10-04 Akim Demaille <akim@epita.fr>
15954
15955 * doc/bison.texinfo: Various typos spotted by Neil Booth.
15956
15957 2000-10-04 Akim Demaille <akim@epita.fr>
15958
15959 When a literal string is used to define two different tokens,
15960 `bison -v' segfaults.
15961 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
15962
15963 * tests/regression.m4: New file.
15964 Include the core of the sample provided by Piotr Gackiewicz.
15965 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
15966 properly.
15967
15968 2000-10-04 Akim Demaille <akim@epita.fr>
15969
15970 * src/reader.c (parse_expect_decl): Keep `count' within the size
15971 of `buffer'.
15972 From Neil Booth.
15973
15974 2000-10-02 Paul Eggert <eggert@twinsun.com>
15975
15976 * bison.s1 (yyparse): Assign the default value
15977 unconditionally, to avoid a GCC warning and make the parser a
15978 tad smaller.
15979
15980 2000-10-02 Akim Demaille <akim@epita.fr>
15981
15982 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
15983 options.
15984
15985 2000-10-02 Akim Demaille <akim@epita.fr>
15986
15987 * src/derives.c, src/print.c, src/reduce.c: To ease the
15988 translation, move some `\n' out of the translated strings.
15989
15990 2000-10-02 Akim Demaille <akim@epita.fr>
15991
15992 The location tracking mechanism is precious for parse error
15993 messages. Nevertheless, it is enabled only when `@n' is used in
15994 the grammar, which is a different issue (you can use it in error
15995 message, but not in the grammar per se). Therefore, there should
15996 be another means to enable it.
15997
15998 * src/getargs.c (getargs): Support `--locations'.
15999 (usage): Report it.
16000 * src/getargs.h (locationsflag): Export it.
16001 * src/lex.c (percent_table): Support `%locations'.
16002 * src/reader.c (yylsp_needed): Remove this variable, now replaced
16003 with `locationsflag'.
16004 * doc/bison.texinfo: Document `--locations' and `%locations'.
16005 Sort the options.
16006 * tests/calc.m4: Test it.
16007
16008 For regularity of the names, replace each
16009 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
16010 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
16011 In addition replace each `flag' with `_flag'.
16012
16013 2000-10-02 Akim Demaille <akim@epita.fr>
16014
16015 Also test parse error messages, including with YYERROR_VERBOSE.
16016
16017 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
16018 associative).
16019 Use it to check the computations.
16020 Use it to check `nonassoc' is honored.
16021 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
16022 `--yyerror-verbose'.
16023 (_AT_CHECK_CALC): Adjust to this option.
16024 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
16025
16026 2000-10-02 Akim Demaille <akim@epita.fr>
16027
16028 Test also `--verbose', `--defines' and `--name-prefix'. Testing
16029 the latter demonstrates a flaw in the handling of non debugging
16030 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
16031 was used in order to simplify:
16032
16033 #if YYDEBUG
16034 if (yydebug)
16035 {
16036 ...
16037 }
16038 #endif
16039
16040 into
16041
16042 if (yydebug)
16043 {
16044 ...
16045 }
16046
16047 unfortunately this leads to a CPP conflict when
16048 `--name-prefix=foo' is used since it produces `#define yydebug
16049 foodebug'.
16050
16051 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
16052 (YYDPRINTF): New macro.
16053 Spread its use.
16054 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
16055 the bison options.
16056 Also test `--verbose', `--defines' and `--name-prefix'.
16057
16058 2000-10-02 Akim Demaille <akim@epita.fr>
16059
16060 Improve the readability of the produced parsers.
16061
16062 * src/bison.s1: Formatting changes.
16063 Improve the comment related to the `$' mark.
16064 (yydefault): Don't fall through to `yyresume': `goto' there.
16065 * src/output.c (output_parser): When the `$' is met, skip the end
16066 of its line.
16067 New variable, `number_of_dollar_signs', to check there's exactly
16068 one `$' in the parser skeleton.
16069
16070 2000-10-02 Akim Demaille <akim@epita.fr>
16071
16072 * lib/xstrdup.c: New file, from the fileutils.
16073 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
16074 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
16075 instead of strlen + xmalloc + strcpy.
16076 * src/symtab.c (copys): Remove, use xstrdup instead.
16077
16078 2000-10-02 Akim Demaille <akim@epita.fr>
16079
16080 * src/gram.h (associativity): New enum type which replaces the
16081 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
16082 `right_assoc', `left_assoc' and `non_assoc'.
16083 Adjust all dependencies.
16084 * src/reader.c: Formatting changes.
16085 (LTYPESTR): Don't define it, use it as a literal in
16086 `reader_output_yylsp'.
16087 * src/symtab.h (symbol_class): New enum type which replaces the
16088 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
16089 `sunknown', `stoken and `snterm'.
16090
16091 2000-10-02 Akim Demaille <akim@epita.fr>
16092
16093 * src/getargs.c (fixed_outfiles): Rename as...
16094 (yaccflag): for consistency and accuracy.
16095 Adjust dependencies.
16096
16097 2000-10-02 Akim Demaille <akim@epita.fr>
16098
16099 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
16100 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
16101 difficult and introduced a lot of core dump. It turns out that
16102 Bison used an implementation of `xmalloc' based on `calloc', and
16103 at various places it does depend upon the initialization to 0. I
16104 have not tried to isolate the pertinent places, and all the former
16105 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
16106 someone should address this issue.
16107
16108 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
16109 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
16110 files.
16111 Adjust dependencies.
16112 * src/warshall.h: New file.
16113 Propagate.
16114
16115 2000-10-02 Akim Demaille <akim@epita.fr>
16116
16117 Various anti-`extern in *.c' changes.
16118
16119 * src/system.h: Include `assert.h'.
16120
16121 2000-10-02 Akim Demaille <akim@epita.fr>
16122
16123 * src/state.h (nstates, final_state, first_state, first_shift)
16124 (first_reduction): Move their exportation from here...
16125 * src/LR0.h: to here.
16126 Adjust dependencies.
16127 * src/getargs.c (statisticsflag): New variable.
16128 Add support for `--statistics'.
16129 Adjust dependencies.
16130
16131 Remove a lot of now useless `extern' statements in most files.
16132
16133 2000-10-02 Akim Demaille <akim@epita.fr>
16134
16135 * src/LR0.h: New file.
16136 Propagate its use.
16137
16138 2000-10-02 Akim Demaille <akim@epita.fr>
16139
16140 * src/print.h: New file.
16141 Propagate its use.
16142 * src/print.c: Formatting and ordering changes.
16143 (verbose, terse): Replace with...
16144 (print_results): this new function.
16145 Adjust dependencies.
16146
16147 2000-10-02 Akim Demaille <akim@epita.fr>
16148
16149 * src/conflicts.c (conflict_report): New function.
16150 (conflict_log, verbose_conflict_log): Replace with...
16151 (print_conflicts): this function.
16152 Adjust dependencies.
16153 * src/conflicts.h: New file.
16154 Propagate its inclusion.
16155
16156 2000-10-02 Akim Demaille <akim@epita.fr>
16157
16158 * src/nullable.h: New file.
16159 Propagate its inclusion.
16160 * src/nullable.c: Formatting changes.
16161
16162 2000-10-02 Akim Demaille <akim@epita.fr>
16163
16164 * src/reduce.h: New file.
16165 Propagate its inclusion.
16166 * src/reduce.c: Topological sort and other formatting changes.
16167 (bool, TRUE, FALSE): Move their definition to...
16168 * src/system.h: here.
16169
16170 2000-10-02 Akim Demaille <akim@epita.fr>
16171
16172 * src/files.c: Formatting changes.
16173 (tryopen, tryclose, openfiles): Rename as...
16174 (xfopen, xfclose, open_files): this.
16175 (stringappend): static.
16176 * src/files.h: Complete the list of exported symbols.
16177 Propagate its use.
16178
16179 2000-10-02 Akim Demaille <akim@epita.fr>
16180
16181 * src/reader.h: New file.
16182 Propagate its use instead of tedious list of `extern' and
16183 prototypes.
16184 * src/reader.c: Formatting changes, topological sort,
16185 s/register//.
16186
16187 2000-10-02 Akim Demaille <akim@epita.fr>
16188
16189 * src/lex.h: Prototype `lex.c' exported functions.
16190 * src/reader.c: Adjust.
16191 * src/lex.c: Formatting changes.
16192 (safegetc): Rename as...
16193 (xgetc): this.
16194
16195 2000-10-02 Akim Demaille <akim@epita.fr>
16196
16197 * src/lalr.h: New file.
16198 Propagate its inclusion instead of prototypes and `extern'.
16199 * src/lalr.c: Formatting changes, topological sorting etc.
16200
16201 2000-10-02 Akim Demaille <akim@epita.fr>
16202
16203 * src/output.c (token_actions): Introduce a temporary array,
16204 YYDEFACT, that makes it possible for this function to use
16205 output_short_table.
16206
16207 2000-10-02 Akim Demaille <akim@epita.fr>
16208
16209 `user_toknums' is output as a `short[]' in `output.c', while it is
16210 defined as a `int[]' in `reader.c'. For consistency with the
16211 other output tables, `user_toknums' is now defined as a table of
16212 shorts.
16213
16214 * src/reader.c (user_toknums): Be a short table instead of an int
16215 table.
16216 Adjust dependencies.
16217
16218 Factor the short table outputs.
16219
16220 * src/output.c (output_short_table): New function.
16221 * src/output.c (output_gram, output_stos, output_rule_data)
16222 (output_base, output_table, output_check): Use it.
16223
16224 2000-10-02 Akim Demaille <akim@epita.fr>
16225
16226 * src/output.c (output): Topological sort of the functions, in
16227 order to get rid of the `static' prototypes.
16228 No longer use `register'.
16229 * src/output.h: New file.
16230 Propagate its inclusion in files explicitly prototyping functions
16231 from output.c.
16232
16233 2000-09-21 Akim Demaille <akim@epita.fr>
16234
16235 * src/atgeneral.m4: Update from Autoconf.
16236
16237 2000-09-21 Akim Demaille <akim@epita.fr>
16238
16239 * src/closure.h: New file.
16240 * src/closure.c: Formatting changes, topological sort over the
16241 functions, use of closure.h.
16242 (initialize_closure, finalize_closure): Rename as...
16243 (new_closure, free_closure): these. Adjust dependencies.
16244 * src/LR0.c: Formatting changes, topological sort, use of
16245 cloture.h.
16246 (initialize_states): Rename as...
16247 (new_states): this.
16248 * src/Makefile.am (noinst_HEADERS): Adjust.
16249
16250 2000-09-20 Akim Demaille <akim@epita.fr>
16251
16252 * src/acconfig.h: Don't protect config.h against multiple
16253 inclusion.
16254 Don't define PARAMS.
16255 * src/system.h: Define PARAMS.
16256 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
16257 purpose of config.h. system.h must not try to fix wrong
16258 definitions in config.h.
16259
16260 2000-09-20 Akim Demaille <akim@epita.fr>
16261
16262 * src/derives.h: New file.
16263 * src/main.c, src/derives.h: Use it.
16264 Formatting changes.
16265 * src/Makefile.am (noinst_HEADERS): Adjust.
16266
16267 2000-09-20 Akim Demaille <akim@epita.fr>
16268
16269 * tests/atgeneral.m4: Update from Autoconf.
16270 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
16271 (AT_CHECK_CALC): New macros.
16272 Use these macros to test bison with options `', `--raw',
16273 `--debug', `--yacc', `--yacc --debug'.
16274
16275 2000-09-19 Akim Demaille <akim@epita.fr>
16276
16277 * src/output.c: Formatting changes.
16278 * src/machine.h: Remove, leaving its contents in...
16279 * src/system.h: here.
16280 Include stdio.h.
16281 Adjust all dependencies on stdio.h and machine.h.
16282 * src/getargs.h: New file.
16283 Let all `extern' declarations about getargs.c be replaced with
16284 inclusion of `getargs.h'.
16285 * src/Makefile.am (noinst_HEADERS): Adjust.
16286
16287 * tests/calc.m4 (yyin): Be initialized in main, not on the global
16288 scope.
16289 (yyerror): Returns void, not int.
16290 * doc/bison.texinfo: Formatting changes.
16291
16292 2000-09-19 Akim Demaille <akim@epita.fr>
16293
16294 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
16295 portable.
16296
16297 2000-09-18 Akim Demaille <akim@epita.fr>
16298
16299 * configure.in: Append WARNING_CFLAGS to CFLAGS.
16300 * src/Makefile.am (INCLUDES): Don't.
16301 Be ready to fetch headers in lib/.
16302
16303 2000-09-18 Akim Demaille <akim@epita.fr>
16304
16305 * doc/bison.texinfo: Update the copyright.
16306 ANSIfy and GNUify the examples.
16307 Remove the old menu.
16308
16309 2000-09-18 Akim Demaille <akim@epita.fr>
16310
16311 First set of tests: use the `calc' example from the documentation.
16312
16313 * src/bison.s1 (yyparse): Condition the code using `yytname' which
16314 is defined only when YYDEBUG is.
16315 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
16316 * src/files.c (tryopen, tryclose): Formatting changes.
16317 Move to the top and be static.
16318 * src/reader.c (read_signed_integer): Likewise.
16319 * tests/calc.m4: New file.
16320 * Makefile.am, suite.m4: Adjust.
16321 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
16322
16323 2000-09-18 Akim Demaille <akim@epita.fr>
16324
16325 Add support for an Autotest test suite for Bison.
16326
16327 * m4/m4.m4, m4/atconfig.m4: New files.
16328 * m4/Makefile.am (EXTRA_DIST): Adjust.
16329 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
16330 files.
16331 * src/getargs.c: Display a more standard --version message.
16332 * src/reader.c (reader): Formatting changes.
16333 No longer depend upon VERSION_STRING.
16334 * configure.in: No longer use `dnl'.
16335 Set up the test suite and the new directory `tests/.
16336 (VERSION_STRING): Remove.
16337
16338 2000-04-14 Akim Demaille <akim@epita.fr>
16339
16340 * src/reader.c (copy_comment2): New function, same as former
16341 `copy_comment', but outputs into two FILE *.
16342 (copy_comment): Use it.
16343 (parse_union_decl): Use it.
16344 (get_type, parse_start_decl): Use the same `invalid' message.
16345 (parse_start_decl, parse_union_decl): Use the same `multiple'
16346 message.
16347 (parse_union_decl, copy_guard, copy_action): Use the same
16348 `unmatched' message.
16349 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
16350
16351 2000-03-31 Akim Demaille <akim@epita.fr>
16352
16353 * src/files.c (tryopen, tryclose): Move to the top.
16354 Be static.
16355
16356 2000-03-31 Akim Demaille <akim@epita.fr>
16357
16358 * src/main.c (main): Don't call `done', exit does it.
16359
16360 2000-03-31 Akim Demaille <akim@epita.fr>
16361
16362 * allocate.c: s/return (foo)/return foo/.
16363 * lalr.c: Likewise.
16364 * LR0.c: Likewise.
16365 * output.c: Likewise.
16366 * reader.c: Likewise.
16367 * symtab.c: Likewise.
16368 * vmsgetargs.c: Likewise.
16369
16370 2000-03-31 Akim Demaille <akim@epita.fr>
16371
16372 Clean up the error reporting functions.
16373
16374 * src/report.c: New file.
16375 * src/report.h: Likewise.
16376 * src/Makefile.am: Adjust.
16377 * m4/error.m4: New file.
16378 * m4/Makefile.am: Adjust.
16379 * configure.in (jm_PREREQ_ERROR): Call it.
16380 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
16381 Remove.
16382 (fatal, fatals): Remove. All callers use complain.c::fatal.
16383 (warn, warni, warns, warnss, warnss): Remove. All callers use
16384 complain.c::complain.
16385 (toomany): Remove, use fatal instead.
16386 * src/files.c (done): No argument, use complain_message_count.
16387 * src/main.c (main): Register `done' to `atexit'.
16388
16389 * src/getargs.c (usage): More `fputs', less `fprintf'.
16390
16391 2000-03-28 Akim Demaille <akim@epita.fr>
16392
16393 * lib/: New directory.
16394 * Makefile.am (SUBDIRS): Adjust.
16395 * configure.in: Adjust.
16396 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
16397 useless.
16398 * src/alloca.c: Moved to lib/.
16399 * src/getopt.c: Likewise.
16400 * src/getopt1.c: Likewise.
16401 * src/getopt.h: Likewise.
16402 * src/ansi2knr.c: Likewise.
16403 * src/ansi2knr.1: Likewise.
16404 * src/Makefile.am: Adjust.
16405 * lib/Makefile.am: New file.
16406
16407 2000-03-28 Akim Demaille <akim@epita.fr>
16408
16409 * src/getargs.c (usage): Refresh the help message.
16410
16411 2000-03-17 Akim Demaille <akim@epita.fr>
16412
16413 * src/getopt1.c: Updated from textutils 2.0e
16414 * src/getopt.c: Likewise.
16415 * src/getopt.h: Likewise.
16416
16417 2000-03-17 Akim Demaille <akim@epita.fr>
16418
16419 * src/Makefile.am (bison.simple): Fix the awk program: quote only
16420 the file name, not the whole `#line LINE FILE'.
16421
16422 2000-03-17 Akim Demaille <akim@epita.fr>
16423
16424 On syntax errors, report the token on which we choked.
16425
16426 * src/bison.s1 (yyparse): In the label yyerrlab, when
16427 YYERROR_VERBOSE, add yychar in msg.
16428
16429 2000-03-17 Akim Demaille <akim@epita.fr>
16430
16431 * src/reader.c (copy_at): New function.
16432 (copy_guard): Use it.
16433 (copy_action): Use it.
16434
16435 2000-03-17 Akim Demaille <akim@epita.fr>
16436
16437 Be kind to translators, save some useless translations.
16438
16439 * src/main.c (banner): New function.
16440 (fatal_banner): Use it.
16441 (warn_banner): Use it.
16442
16443 2000-03-17 Akim Demaille <akim@epita.fr>
16444
16445 * src/reader.c (copy_definition): Use copy_string and
16446 copy_comment. Removed now unused `match', `ended',
16447 `cplus_comment'.
16448 (copy_comment, copy_string): Moved, to be visible from
16449 copy_definition.
16450
16451 2000-03-17 Akim Demaille <akim@epita.fr>
16452
16453 * src/reader.c (copy_string): Declare `static inline'. No
16454 problems with inline, since it is checked by configure.
16455 (copy_comment): Likewise.
16456
16457 2000-03-17 Akim Demaille <akim@epita.fr>
16458
16459 * src/reader.c (packsymbols): Formatting changes.
16460
16461 2000-03-17 Akim Demaille <akim@epita.fr>
16462
16463 * src/reader.c (copy_comment): New function, factored out from:
16464 (copy_action): Use it. Removed now unused `match', `ended',
16465 `cplus_comment'.
16466 (copy_guard): Likewise.
16467
16468 2000-03-17 Akim Demaille <akim@epita.fr>
16469
16470 * src/reader.c (copy_string): New function, factored out from:
16471 (copy_action): Use it.
16472 (copy_guard): Likewise.
16473
16474 2000-03-17 Akim Demaille <akim@epita.fr>
16475
16476 Change the handling of @s so that they behave exactly like $s.
16477 There is now a pseudo variable @$ (readble and writable), location
16478 of the lhs of the rule (by default ranging from the location of
16479 the first symbol of the rhs, to the location of the last symbol,
16480 or, if the rhs is empty, YYLLOC).
16481
16482 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
16483 yyval.
16484 (yyparse): When providing a default semantic action, provide a
16485 default location action.
16486 (after the $): No longer change `*YYLSP', just stack YYLOC the
16487 same way you stack YYVAL.
16488 * src/reader.c (read_declarations): Use warns.
16489 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
16490 (copy_action, case '@'): Likewise.
16491 Use a standard error message, to save useless work from
16492 translators.
16493
16494 2000-03-17 Akim Demaille <akim@epita.fr>
16495
16496 * src/bison.s1: Formatting and cosmetics changes.
16497 * src/reader.c: Likewise.
16498 Update the Copyright notice.
16499
16500 2000-03-17 Akim Demaille <akim@epita.fr>
16501
16502 * src/bison.s1 (#line): All set to `#line' only, since the
16503 Makefile now handles them.
16504
16505 2000-03-16 Akim Demaille <akim@epita.fr>
16506
16507 * src/output.c (output_rule_data): Output the documentation of
16508 some of the tables.
16509 (Copyright notice): Update.
16510 Formatting changes.
16511
16512 2000-03-16 Akim Demaille <akim@epita.fr>
16513
16514 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
16515 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
16516 One `#if YYDEBUG' remains, since it uses variables which are
16517 defined only if `YYDEBUG != 0'.
16518
16519 2000-03-16 Akim Demaille <akim@epita.fr>
16520
16521 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
16522 and related variables so that the similarities are highlighted.
16523
16524 2000-03-16 Akim Demaille <akim@epita.fr>
16525
16526 * src/bison.s1: Properly indent CPP directives.
16527
16528 2000-03-16 Akim Demaille <akim@epita.fr>
16529
16530 * src/bison.s1: Properly indent the `alloca' CPP section.
16531
16532 2000-03-16 Akim Demaille <akim@epita.fr>
16533
16534 Do not hard code values of directories in `configure.in'.
16535 Update the `configure' tool chain.
16536
16537 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
16538 src/makefile.am.
16539 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
16540 (AC_OUTPUT): Add m4/Makefile.
16541 Bump to bison 1.28a, 1.29 has never been released.
16542 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
16543 handled via src/Makefile.am.
16544 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
16545 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
16546 autoheader.
16547 * Makefile.am (SUBDIRS): Add m4.
16548 (ACLOCAL_AM_FLAGS): New variable.
16549 (AUTOMAKE_OPTIONS): Add check-news.
16550 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
16551 the proper line number and file name.
16552 (DEFS): Propagate the location of bison library files and of the
16553 locale files.
16554 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
16555 builddir.
16556 * acinclude.m4: Remove, replaced by the directory m4.
16557 * m4/Makefile.am (EXTRA_DIST): New variable.
16558 * m4/gettext.m4: New file, from the fileutils.
16559 * m4/lcmessage.m4: Likewise
16560 * m4/progtest.m4: Likewise.
16561 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
16562
16563 2000-03-10 Akim Demaille <akim@epita.fr>
16564
16565 * src/closure.c:
16566 Formatting changes of various comments.
16567 Respect the GNU coding standards at various places.
16568 Don't use `_()' when no translation is needed.
16569
16570 1999-12-13 Jesse Thilo <jthilo@gnu.org>
16571
16572 * src/files.c:
16573 OS/2 honors TMPDIR environment variable.
16574
16575 1999-12-13 Jesse Thilo <jthilo@gnu.org>
16576
16577 * doc/bison.texinfo: Tweaked spelling and grammar.
16578 Updated ISBN.
16579 Removed reference to price of printed copy.
16580 Mention BISON_SIMPLE and BISON_HAIRY.
16581
16582 1999-12-13 Jesse Thilo <jthilo@gnu.org>
16583
16584 * configure.in, NEWS:
16585 Bison 1.29 released.
16586
16587 1999-10-27 Jesse Thilo <jthilo@gnu.org>
16588
16589 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
16590 Added reference card.
16591
16592 1999-07-26 Jesse Thilo <jthilo@gnu.org>
16593
16594 * po/ru.po: Added Russian translation.
16595
16596 1999-07-26 Jesse Thilo <jthilo@gnu.org>
16597
16598 * configure.in: Added Russian translation.
16599
16600 1999-07-06 Jesse Thilo <jthilo@gnu.org>
16601
16602 * configure.in, NEWS, README:
16603 Released version 1.28.
16604
16605 1999-06-14 Jesse Thilo <jthilo@gnu.org>
16606
16607 * src/system.h:
16608 Squashed redefinition warning on some systems.
16609
16610 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
16611 Have configure build version string instead of relying on ANSI string
16612 concatentation.
16613
16614 1999-06-14 Jesse Thilo <jthilo@gnu.org>
16615
16616 * po/POTFILES.in: Got rid of version.c.
16617
16618 1999-06-14 Jesse Thilo <jthilo@gnu.org>
16619
16620 * acconfig.h, configure.in:
16621 Have configure build version string instead of relying on ANSI string
16622 concatentation.
16623
16624 1999-06-08 Jesse Thilo <jthilo@gnu.org>
16625
16626 * doc/bison.1:
16627 Dropped mention of `+' for long-named options.
16628
16629 1999-05-30 Jesse Thilo <jthilo@gnu.org>
16630
16631 * src/files.c: Added <unistd.h> for unlink().
16632
16633 * src/Makefile.am, src/system.h:
16634 I18n fixes.
16635
16636 1999-05-30 Jesse Thilo <jthilo@gnu.org>
16637
16638 * README: Added a FAQ list.
16639
16640 * configure.in, acconfig.h:
16641 I18n fixes.
16642
16643 1999-05-30 Jesse Thilo <jthilo@gnu.org>
16644
16645 * doc/FAQ, doc/Makefile.am:
16646 Added a FAQ list.
16647
16648 1999-05-19 Jesse Thilo <jthilo@gnu.org>
16649
16650 * src/alloc.h, src/symtab.h, src/version.c:
16651 Protected inclusion of "config.h" with HAVE_CONFIG_H.
16652
16653 1999-04-18 Jesse Thilo <jthilo@gnu.org>
16654
16655 * src/.cvsignore, src/Makefile.am:
16656 Reorganized: sources in `src', documentation in `doc'.
16657
16658 * src/lex.c (literalchar):
16659 fixed the code for escaping double quotes (thanks
16660 Jonathan Czisny.)
16661
16662 1999-04-18 Jesse Thilo <jthilo@gnu.org>
16663
16664 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
16665 Adjusted paths to reflect directory reorganization.
16666
16667 1999-04-18 Jesse Thilo <jthilo@gnu.org>
16668
16669 * doc/.cvsignore, doc/Makefile.am:
16670 Reorganized: sources in `src', documentation in `doc'.
16671
16672 1999-04-18 Jesse Thilo <jthilo@gnu.org>
16673
16674 * configure.in:
16675 Updated AC_INIT file to reflect directory reorganization.
16676
16677 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
16678 Reorganized: sources in `src', documentation in `doc'.
16679
16680 1999-04-13 Jesse Thilo <jthilo@gnu.org>
16681
16682 * src/allocate.c:
16683 Don't declare calloc() and realloc() if not necessary.
16684
16685 1999-04-13 Jesse Thilo <jthilo@gnu.org>
16686
16687 * configure.in, acconfig.h, acinclude.m4:
16688 Don't declare calloc() and realloc() if not necessary.
16689
16690 1999-03-23 Jesse Thilo <jthilo@gnu.org>
16691
16692 * po/.cvsignore: Added i18n support.
16693
16694 1999-03-23 Jesse Thilo <jthilo@gnu.org>
16695
16696 * acconfig.h, configure.in, Makefile.am:
16697 Added i18n support.
16698
16699 1999-03-22 Jesse Thilo <jthilo@gnu.org>
16700
16701 * src/bison.s1: Fixed #line numbers.
16702
16703 1999-03-15 Jesse Thilo <jthilo@gnu.org>
16704
16705 * po/es.po, po/fr.po, po/nl.po, po/de.po:
16706 Added PO files from Translation Project.
16707
16708 1999-03-03 Jesse Thilo <jthilo@gnu.org>
16709
16710 * Makefile.am:
16711 Added support for non-ANSI compilers (ansi2knr).
16712
16713 1999-02-16 Jesse Thilo <jthilo@gnu.org>
16714
16715 * configure.in: Bumped version number to 1.27.
16716
16717 * Makefile.am:
16718 Added `bison.simple' to list of files removed by `make distclean'.
16719
16720 1999-02-12 Jesse Thilo <jthilo@gnu.org>
16721
16722 * src/files.c, src/files.h:
16723 Defined locations of parser files in config.h instead of Makefile.
16724
16725 1999-02-12 Jesse Thilo <jthilo@gnu.org>
16726
16727 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
16728 Defined locations of parser files in config.h instead of Makefile.
16729
16730 1999-02-09 Jesse Thilo <jthilo@gnu.org>
16731
16732 * Makefile.am:
16733 Removed inappropriate use of $< macro.
16734
16735 1999-02-05 Jesse Thilo <jthilo@gnu.org>
16736
16737 * po/Makefile.in.in, po/POTFILES.in:
16738 Add `po' directory skeleton.
16739
16740 1999-01-27 Jesse Thilo <jthilo@gnu.org>
16741
16742 * README: Document help-bison list.
16743
16744 * configure.in: Add check for mkstemp().
16745
16746 1999-01-20 Jesse Thilo <jthilo@gnu.org>
16747
16748 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
16749 Hush a few compiler warnings.
16750
16751 * src/files.c:
16752 Add tryclose(), which verifies that fclose was successful.
16753 Hush a couple of compiler warnings.
16754
16755 1999-01-20 Jesse Thilo <jthilo@gnu.org>
16756
16757 * Makefile.am, OChangeLog:
16758 ChangeLog is now automatically generated. Include the old version as
16759 OChangeLog.
16760
16761 1999-01-14 Jesse Thilo <jthilo@gnu.org>
16762
16763 * 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:
16764 Update FSF address.
16765
16766 1999-01-14 Jesse Thilo <jthilo@gnu.org>
16767
16768 * doc/bison.texinfo: Fix formatting glitch.
16769
16770 * doc/bison.texinfo: Update FSF address.
16771
16772 1999-01-14 Jesse Thilo <jthilo@gnu.org>
16773
16774 * acconfig.h: Update FSF address.
16775
16776 1999-01-08 Jesse Thilo <jthilo@gnu.org>
16777
16778 * src/system.h:
16779 Don't define PACKAGE here, since config.h defines it.
16780
16781 1998-12-30 Jesse Thilo <jthilo@gnu.org>
16782
16783 * src/reader.c: Update copyright date.
16784
16785 * src/main.c:
16786 Ditch sprintf to statically-sized buffers in fatal/warn functions in
16787 favor of output directly to stderr (avoids buffer overruns).
16788
16789 * src/reader.c: Some checks for premature EOF.
16790
16791 * 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:
16792 Use prototypes if the compiler understands them.
16793
16794 * src/files.c: Honor TMPDIR on Unix hosts.
16795 Use prototypes if the compiler understands them.
16796
16797 * src/reader.c:
16798 Fix a couple of buffer overrun bugs.
16799 Use prototypes if the compiler understands them.
16800
16801 * src/system.h: Include unistd.h and ctype.h.
16802 Use #ifdef instead of #if for NLS symbols.
16803
16804 1998-12-30 Jesse Thilo <jthilo@gnu.org>
16805
16806 * doc/bison.texinfo:
16807 Delete comment "consider using @set for edition number, etc..." since
16808 we now are doing so.
16809
16810 1998-12-30 Jesse Thilo <jthilo@gnu.org>
16811
16812 * configure.in:
16813 Use prototypes if the compiler understands them.
16814
16815 * NEWS: Document 1.26 highlights.
16816
16817 * Makefile.am: Require Automake 1.3 or later.
16818
16819 * acconfig.h:
16820 Use prototypes if the compiler understands them.
16821
16822 1998-12-29 Jesse Thilo <jthilo@gnu.org>
16823
16824 * src/version.c:
16825 Use VERSION symbol from automake for version number.
16826
16827 1998-12-29 Jesse Thilo <jthilo@gnu.org>
16828
16829 * acconfig.h, configure.in, version.cin:
16830 Use VERSION symbol from automake for version number.
16831
16832 1998-11-28 Jesse Thilo <jthilo@gnu.org>
16833
16834 * Makefile.am:
16835 Distribute original version of simple parser (bison.s1), not built
16836 version (bison.simple).
16837
16838 1998-11-28 Jesse Thilo <jthilo@gnu.org>
16839
16840 * doc/bison.texinfo: Add info dir entry.
16841
16842 * doc/bison.texinfo:
16843 Let automake put version number into documentation.
16844
16845 1998-11-26 Jesse Thilo <jthilo@gnu.org>
16846
16847 * src/bison.cld, src/build.com, src/vmshlp.mar:
16848 Add non-RCS files from /gd/gnu/bison.
16849
16850 1998-11-26 Jesse Thilo <jthilo@gnu.org>
16851
16852 * doc/bison.1:
16853 Document the BISON_HAIRY and BISON_SIMPLE variables.
16854
16855 1998-11-25 Jesse Thilo <jthilo@gnu.org>
16856
16857 * src/version.c: Build version.c automatically.
16858
16859 * src/reader.c:
16860 Fix token numbering (used to start at 258, not 257).
16861
16862 * src/system.h: Include config.h.
16863
16864 * src/getargs.c: Update bug report address.
16865
16866 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
16867 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
16868
16869 1998-11-25 Jesse Thilo <jthilo@gnu.org>
16870
16871 * Makefile.am:
16872 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
16873
16874 * configure.in, version.cin:
16875 Build version.c automatically.
16876
16877 * AUTHORS: Add AUTHORS file.
16878
16879 * README: Update bug report address.
16880
16881 * bison.simple:
16882 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
16883
16884 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
16885 Add automake stuff.
16886
16887 1998-11-25 Jesse Thilo <jthilo@gnu.org>
16888
16889 * doc/bison.texinfo: Clean up some formatting.
16890
16891 1998-05-05 Richard Stallman <rms@gnu.org>
16892
16893 * doc/bison.texinfo:
16894 Explain better why to make a pure parser.
16895
16896 1998-01-05 Richard Stallman <rms@gnu.org>
16897
16898 * src/files.c (openfiles):
16899 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
16900 find a temporary directory, if possible. Do not unlink files while
16901 they are open.
16902
16903 1997-08-25 Richard Stallman <rms@gnu.org>
16904
16905 * src/reader.c (stack_offset;):
16906 Change some warni to warns.
16907
16908 * src/lex.c (literalchar): Use warns, not warni.
16909
16910 1997-06-28 Richard Stallman <rms@gnu.org>
16911
16912 * src/bison.s1: Add a Bison version comment.
16913
16914 * src/main.c (fatal, warn, berror):
16915 Use program_name.
16916
16917 1997-06-28 Richard Stallman <rms@gnu.org>
16918
16919 * Makefile.in (bison_version): New variable.
16920 (dist): Use that variable.
16921 (bison.s1): Substitute the Bison version into bison.simple.
16922
16923 * bison.simple: Add a Bison version comment.
16924
16925 1997-06-18 Richard Stallman <rms@gnu.org>
16926
16927 * src/main.c (fatal, warn, berror):
16928 Make error messages standard.
16929 (toomany): Improve error message text.
16930
16931 * 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:
16932 new.h renamed to alloc.h.
16933
16934 1997-06-18 Richard Stallman <rms@gnu.org>
16935
16936 * Makefile.in: new.h renamed to alloc.h.
16937
16938 1997-05-24 Richard Stallman <rms@gnu.org>
16939
16940 * src/lex.c (literalchar):
16941 Fix the code for escaping \, " and '.
16942
16943 (lex): Avoid trouble when there are many chars
16944 to discard in a char literal with just several chars in it.
16945
16946 1997-05-17 Richard Stallman <rms@gnu.org>
16947
16948 * src/bison.s1:
16949 Use malloc, if using alloca is troublesome.
16950 (YYSTACK_USE_ALLOCA): New flag macro.
16951 Define it for some systems and compilers.
16952 (YYSTACK_ALLOC): New macro.
16953 (yyparse): Use YYSTACK_ALLOC to allocate stack.
16954 If it was malloc'd, free it.
16955
16956 1997-05-17 Richard Stallman <rms@gnu.org>
16957
16958 * bison.simple:
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-04-23 Richard Stallman <rms@gnu.org>
16967
16968 * src/bison.s1:
16969 (alloca) [__hpux]: Always define as __builtin_alloca.
16970
16971 1997-04-23 Richard Stallman <rms@gnu.org>
16972
16973 * bison.simple:
16974 (alloca) [__hpux]: Always define as __builtin_alloca.
16975
16976 1997-04-22 Richard Stallman <rms@gnu.org>
16977
16978 * src/bison.s1:
16979 [__hpux]: Include alloca.h (right for HPUX 10)
16980 instead of declaring alloca (right for HPUX 9).
16981
16982 * src/bison.s1 (__yy_memcpy):
16983 Declare arg `count' as unsigned int.
16984 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
16985
16986 1997-04-22 Richard Stallman <rms@gnu.org>
16987
16988 * bison.simple:
16989 [__hpux]: Include alloca.h (right for HPUX 10)
16990 instead of declaring alloca (right for HPUX 9).
16991
16992 * bison.simple (__yy_memcpy):
16993 Declare arg `count' as unsigned int.
16994 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
16995
16996 1997-01-03 Richard Stallman <rms@gnu.org>
16997
16998 * src/allocate.c: [__STDC__ or _MSC_VER]:
16999 Declare calloc and realloc to return void *.
17000
17001 1997-01-02 Richard Stallman <rms@gnu.org>
17002
17003 * src/system.h:
17004 [_MSC_VER]: Include stdlib.h and process.h.
17005 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
17006
17007 * src/main.c (main): Return FAILURE as a value.
17008 (printable_version): Declare arg as int, not char.
17009
17010 1997-01-02 Richard Stallman <rms@gnu.org>
17011
17012 * Makefile.in (dist):
17013 Explicitly check for symlinks, and copy them.
17014
17015 1996-12-19 Richard Stallman <rms@gnu.org>
17016
17017 * src/files.c:
17018 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
17019
17020 1996-12-18 Paul Eggert <eggert@gnu.org>
17021
17022 * src/bison.s1 (yyparse):
17023 If __GNUC__ and YYPARSE_PARAM are both defined,
17024 declare yyparse to have a void * argument.
17025
17026 1996-12-18 Paul Eggert <eggert@gnu.org>
17027
17028 * bison.simple (yyparse):
17029 If __GNUC__ and YYPARSE_PARAM are both defined,
17030 declare yyparse to have a void * argument.
17031
17032 1996-12-17 Richard Stallman <rms@gnu.org>
17033
17034 * src/reduce.c (nbits): Add some casts.
17035
17036 1996-08-12 Richard Stallman <rms@gnu.org>
17037
17038 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
17039
17040 1996-08-12 Richard Stallman <rms@gnu.org>
17041
17042 * bison.simple: Test _MSDOS as well as _MSDOS_.
17043
17044 1996-07-31 Richard Stallman <rms@gnu.org>
17045
17046 * src/bison.s1:
17047 [__sun && __i386]: Include alloca.h.
17048
17049 1996-07-31 Richard Stallman <rms@gnu.org>
17050
17051 * bison.simple:
17052 [__sun && __i386]: Include alloca.h.
17053
17054 1996-07-30 Richard Stallman <rms@gnu.org>
17055
17056 * src/bison.s1: Comment change.
17057
17058 * src/bison.s1: Test _MSDOS_, not MSDOS.
17059
17060 1996-07-30 Richard Stallman <rms@gnu.org>
17061
17062 * bison.simple: Comment change.
17063
17064 * bison.simple: Test _MSDOS_, not MSDOS.
17065
17066 1996-06-01 Richard Stallman <rms@gnu.org>
17067
17068 * 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:
17069 Insert `_' macro around many string constants.
17070
17071 * src/main.c:
17072 Insert `_' macro around many string constants.
17073
17074 (main): Call setlocale, bindtextdomain and textdomain.
17075
17076 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
17077 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
17078 [ENABLE_NLS]: Include libintl.h.
17079 [ENABLE_NLS] (gettext): Define.
17080 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
17081 (N_, PACKAGE, LOCALEDIR): New macros.
17082
17083 1996-06-01 Richard Stallman <rms@gnu.org>
17084
17085 * POTFILES.in: New file.
17086
17087 * Makefile.in (allocate.o):
17088 Define target explicitly.
17089
17090 * Makefile.in (CFLAGS): Set to @CFLAGS@.
17091 (LDFLAGS): Set to @LDFLAGS@.
17092 (configure): Run autoconf only if preceding `cd' succeeds.
17093 (bison.s1): Redirect output to temporary file then move the
17094 temporary to the target, rather than redirecting directly to bison.s1.
17095 (clean): Remove config.status and config.log.
17096 (distclean): Don't remove config.status here.
17097
17098 1996-05-12 Richard Stallman <rms@gnu.org>
17099
17100 * src/bison.s1:
17101 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
17102
17103 1996-05-12 Richard Stallman <rms@gnu.org>
17104
17105 * bison.simple:
17106 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
17107
17108 1996-05-11 Richard Stallman <rms@gnu.org>
17109
17110 * src/bison.s1 (__yy_memcpy):
17111 Really reorder the args, as was supposedly done on Feb 14 1995.
17112 (yyparse): Calls changed accordingly.
17113
17114 1996-05-11 Richard Stallman <rms@gnu.org>
17115
17116 * Makefile.in (dist): Don't use $(srcdir).
17117
17118 * bison.simple (__yy_memcpy):
17119 Really reorder the args, as was supposedly done on Feb 14 1995.
17120 (yyparse): Calls changed accordingly.
17121
17122 1996-01-27 Richard Stallman <rms@gnu.org>
17123
17124 * src/output.c (output_rule_data):
17125 Test YYERROR_VERBOSE in the conditional
17126 around the definition of ttyname.
17127
17128 1995-12-29 Richard Stallman <rms@gnu.org>
17129
17130 * src/bison.s1:
17131 Fix line numbers in #line commands.
17132
17133 1995-12-29 Richard Stallman <rms@gnu.org>
17134
17135 * bison.simple:
17136 Fix line numbers in #line commands.
17137
17138 1995-12-27 Richard Stallman <rms@gnu.org>
17139
17140 * src/bison.s1 (YYPARSE_PARAM_DECL):
17141 In C++, make it always null.
17142 (YYPARSE_PARAM_ARG): New macro.
17143 (yyparse): Use YYPARSE_PARAM_ARG.
17144
17145 1995-12-27 Richard Stallman <rms@gnu.org>
17146
17147 * bison.simple (YYPARSE_PARAM_DECL):
17148 In C++, make it always null.
17149 (YYPARSE_PARAM_ARG): New macro.
17150 (yyparse): Use YYPARSE_PARAM_ARG.
17151
17152 1995-11-29 Richard Stallman <rms@gnu.org>
17153
17154 * doc/bison.texinfo:
17155 Describe literal string tokens, %raw, %no_lines, %token_table.
17156
17157 1995-11-29 Daniel Hagerty <hag@gnu.org>
17158
17159 * doc/bison.texinfo: Fixed update date
17160
17161 1995-10-16 Richard Stallman <rms@gnu.org>
17162
17163 * src/version.c: Version 1.25.
17164
17165 1995-10-16 Richard Stallman <rms@gnu.org>
17166
17167 * NEWS: *** empty log message ***
17168
17169 1995-10-16 Richard Stallman <rms@gnu.org>
17170
17171 * doc/bison.1, doc/bison.rnh:
17172 Add new options.
17173
17174 1995-10-15 Richard Stallman <rms@gnu.org>
17175
17176 * src/vmsgetargs.c, src/getargs.c:
17177 Added -n, -k, and -raw switches.
17178 (noparserflag, toknumflag, rawtoknumflag): New variables.
17179
17180 * src/symtab.h (SALIAS):
17181 New #define for adding aliases to %token.
17182 (struct bucket): Added `alias' field.
17183
17184 * src/reduce.c (reduce_grammar):
17185 Revise error message.
17186 (print_notices): Remove final `.' from error message.
17187
17188 * src/reader.c (reader_output_yylsp):
17189 New function.
17190 (readgram): Use `#if 0' around code that accepted %command
17191 inside grammar rules: The documentation doesn't allow it,
17192 and it will fail since the %command processors scan for the next %.
17193 (parse_token_decl): Extended the %token
17194 declaration to allow a multi-character symbol as an alias.
17195 (parse_thong_decl): New function.
17196 (read_declarations): Added %thong declarations.
17197 (read_declarations): Handle NOOP to deal with allowing
17198 % declarations as another means to specify the flags.
17199 (readgram): Allow %prec prior to semantics embedded in a rule.
17200 (skip_to_char, read_declarations, copy_definition)
17201 (parse_token_decl, parse_start_decl, parse_type_decl)
17202 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
17203 (get_type_name, copy_guard, copy_action, readgram)
17204 (get_type, packsymbols): Revised most error messages.
17205 Changed `fatal' to `warnxxx' to avoid aborting for error.
17206 Revised and use multiple warnxxx functions to avoid using VARARGS1.
17207 (read_declarations): Improve the error message for
17208 an invalid character. Do not abort.
17209 (read_declarations, copy_guard, copy_action): Use
17210 printable_version to avoid unprintable characters in printed output.
17211 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
17212 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
17213 Allow the type of a non-terminal can be given
17214 more than once, as long as all specifications give the same type.
17215
17216 * src/output.c:
17217 (output_headers, output_trailers, output, output_gram)
17218 (output_rule_data): Implement noparserflag variable.
17219 Implement toknumflag variable.
17220 (output): Call reader_output_yylsp to output LTYPESTR.
17221
17222 * src/main.c (main):
17223 If reader sees an error, don't process the grammar.
17224 (fatals): Updated to not use VARARGS1.
17225 (printable_version, int_to_string, warn, warni, warns, warnss)
17226 (warnsss): New error reporting functions. Avoid abort for error.
17227
17228 * src/lex.h:
17229 Added THONG and NOOP for alias processing.
17230 Added SETOPT for the new code that allows setting options with %flags.
17231
17232 * src/lex.c:
17233 Include getopt.h. Add some extern decls.
17234 (safegetc): New function to deal with EOF gracefully.
17235 (literalchar); new function to deal with reading \ escapes.
17236 (lex): Use literalchar.
17237 (lex): Implemented "..." tokens.
17238 (literalchar, lex, parse_percent_token): Made tokenbuffer
17239 always contain the token. This includes growing the token
17240 buffer while reading an integer.
17241 (parse_percent_token): Replaced if-else statement with percent_table.
17242 (parse_percent_token): Added % declarations as another
17243 way to specify the flags -n, -l, and -r. Also added hooks for
17244 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
17245 major changes to files.c.
17246 (lex) Retain in the incoming stream a character following
17247 an incorrect '/'.
17248 (skip_white_space, lex): Revised most error messages
17249 and changed fatal to warn to avoid aborting.
17250 (percent_table): Added %thong declarations.
17251
17252 * src/gram.h: Comment changes.
17253
17254 * src/files.c (openfiles, open_extra_files, done):
17255 Add faction flag
17256 and actfile file. Handle noparserflag. Both for -n switch.
17257
17258 * src/conflicts.c (resolve_sr_conflict):
17259 Remove use of alloca.
17260
17261 1995-06-01 Jim Meyering <meyering@gnu.org>
17262
17263 * doc/bison.texinfo: *** empty log message ***
17264
17265 1995-05-06 Richard Stallman <rms@gnu.org>
17266
17267 * src/bison.s1: Comment change.
17268
17269 1995-05-06 Richard Stallman <rms@gnu.org>
17270
17271 * bison.simple: Comment change.
17272
17273 1995-05-03 Richard Stallman <rms@gnu.org>
17274
17275 * src/version.c: Version now 1.24.
17276
17277 * src/bison.s1: Change distribution terms.
17278
17279 * src/version.c: Version now 1.23.
17280
17281 1995-05-03 Richard Stallman <rms@gnu.org>
17282
17283 * doc/bison.texinfo:
17284 Rewrite "Conditions for Using Bison".
17285 Update version to 1.24.
17286
17287 1995-05-03 Richard Stallman <rms@gnu.org>
17288
17289 * bison.simple: Change distribution terms.
17290
17291 1995-02-23 Richard Stallman <rms@gnu.org>
17292
17293 * src/files.c: Test __VMS_POSIX as well as VMS.
17294
17295 1995-02-14 Jim Meyering <meyering@gnu.org>
17296
17297 * src/bison.s1 (__yy_memcpy):
17298 Renamed from __yy_bcopy to avoid
17299 confusion. Reverse FROM and TO arguments to be consistent with
17300 those of memcpy.
17301
17302 1995-02-14 Jim Meyering <meyering@gnu.org>
17303
17304 * bison.simple (__yy_memcpy):
17305 Renamed from __yy_bcopy to avoid
17306 confusion. Reverse FROM and TO arguments to be consistent with
17307 those of memcpy.
17308
17309 1994-11-10 David J. MacKenzie <djm@gnu.org>
17310
17311 * NEWS: reformat
17312
17313 * NEWS: New file.
17314
17315 * Makefile.in (DISTFILES): Include NEWS.
17316
17317 * Makefile.in (DISTFILES):
17318 Include install-sh, not install.sh.
17319
17320 * configure.in: Update to Autoconf v2 macro names.
17321
17322 1994-10-05 David J. MacKenzie <djm@gnu.org>
17323
17324 * Makefile.in: fix typo
17325
17326 * Makefile.in (prefix, exec_prefix):
17327 Let configure set them.
17328
17329 1994-09-28 David J. MacKenzie <djm@gnu.org>
17330
17331 * Makefile.in: Set datadir to $(prefix)/share.
17332
17333 1994-09-15 Richard Stallman <rms@gnu.org>
17334
17335 * src/bison.s1:
17336 Update copyright notice and GPL version.
17337
17338 1994-09-15 Richard Stallman <rms@gnu.org>
17339
17340 * bison.simple:
17341 Update copyright notice and GPL version.
17342
17343 1994-07-12 Richard Stallman <rms@gnu.org>
17344
17345 * src/reduce.c, src/reader.c:
17346 entered into RCS
17347
17348 1994-05-05 David J. MacKenzie <djm@gnu.org>
17349
17350 * Makefile.in: entered into RCS
17351
17352 1994-03-26 Richard Stallman <rms@gnu.org>
17353
17354 * src/bison.s1: entered into RCS
17355
17356 1994-03-26 Richard Stallman <rms@gnu.org>
17357
17358 * bison.simple: entered into RCS
17359
17360 1994-03-25 Richard Stallman <rms@gnu.org>
17361
17362 * src/main.c: entered into RCS
17363
17364 1994-03-24 Richard Stallman <rms@gnu.org>
17365
17366 * src/conflicts.c: entered into RCS
17367
17368 1994-01-02 Richard Stallman <rms@gnu.org>
17369
17370 * Makefile.in: *** empty log message ***
17371
17372 1993-11-21 Richard Stallman <rms@gnu.org>
17373
17374 * src/bison.s1: *** empty log message ***
17375
17376 1993-11-21 Richard Stallman <rms@gnu.org>
17377
17378 * doc/bison.texinfo: entered into RCS
17379
17380 * doc/bison.texinfo: *** empty log message ***
17381
17382 1993-11-21 Richard Stallman <rms@gnu.org>
17383
17384 * bison.simple: *** empty log message ***
17385
17386 1993-10-25 David J. MacKenzie <djm@gnu.org>
17387
17388 * doc/bison.texinfo: *** empty log message ***
17389
17390 1993-10-19 Richard Stallman <rms@gnu.org>
17391
17392 * src/bison.s1: *** empty log message ***
17393
17394 1993-10-19 Richard Stallman <rms@gnu.org>
17395
17396 * bison.simple: *** empty log message ***
17397
17398 1993-10-14 Richard Stallman <rms@gnu.org>
17399
17400 * src/bison.s1: *** empty log message ***
17401
17402 1993-10-14 Richard Stallman <rms@gnu.org>
17403
17404 * bison.simple: *** empty log message ***
17405
17406 1993-09-14 David J. MacKenzie <djm@gnu.org>
17407
17408 * doc/bison.texinfo: *** empty log message ***
17409
17410 1993-09-13 Noah Friedman <friedman@gnu.org>
17411
17412 * Makefile.in: *** empty log message ***
17413
17414 1993-09-10 Richard Stallman <rms@gnu.org>
17415
17416 * src/conflicts.c: *** empty log message ***
17417
17418 * src/system.h: entered into RCS
17419
17420 1993-09-10 Richard Stallman <rms@gnu.org>
17421
17422 * doc/bison.1: entered into RCS
17423
17424 1993-09-06 Noah Friedman <friedman@gnu.org>
17425
17426 * src/version.c: entered into RCS
17427
17428 1993-09-06 Noah Friedman <friedman@gnu.org>
17429
17430 * Makefile.in: *** empty log message ***
17431
17432 1993-07-30 David J. MacKenzie <djm@gnu.org>
17433
17434 * Makefile.in: *** empty log message ***
17435
17436 1993-07-24 Richard Stallman <rms@gnu.org>
17437
17438 * src/bison.s1: *** empty log message ***
17439
17440 1993-07-24 Richard Stallman <rms@gnu.org>
17441
17442 * bison.simple: *** empty log message ***
17443
17444 1993-07-08 David J. MacKenzie <djm@gnu.org>
17445
17446 * Makefile.in: *** empty log message ***
17447
17448 1993-07-04 Richard Stallman <rms@gnu.org>
17449
17450 * src/bison.s1: *** empty log message ***
17451
17452 1993-07-04 Richard Stallman <rms@gnu.org>
17453
17454 * bison.simple: *** empty log message ***
17455
17456 1993-06-26 David J. MacKenzie <djm@gnu.org>
17457
17458 * src/getargs.c: entered into RCS
17459
17460 1993-06-26 David J. MacKenzie <djm@gnu.org>
17461
17462 * doc/bison.texinfo: *** empty log message ***
17463
17464 * doc/bison.1: New file.
17465
17466 1993-06-25 Richard Stallman <rms@gnu.org>
17467
17468 * src/getargs.c: New file.
17469
17470 1993-06-16 Richard Stallman <rms@gnu.org>
17471
17472 * src/bison.s1: *** empty log message ***
17473
17474 1993-06-16 Richard Stallman <rms@gnu.org>
17475
17476 * bison.simple: *** empty log message ***
17477
17478 1993-06-03 Richard Stallman <rms@gnu.org>
17479
17480 * src/bison.s1: New file.
17481
17482 1993-06-03 Richard Stallman <rms@gnu.org>
17483
17484 * doc/bison.texinfo: *** empty log message ***
17485
17486 1993-06-03 Richard Stallman <rms@gnu.org>
17487
17488 * bison.simple: New file.
17489
17490 1993-05-19 Richard Stallman <rms@gnu.org>
17491
17492 * doc/bison.texinfo: New file.
17493
17494 1993-05-07 Noah Friedman <friedman@gnu.org>
17495
17496 * Makefile.in: *** empty log message ***
17497
17498 1993-04-28 Noah Friedman <friedman@gnu.org>
17499
17500 * src/reader.c: *** empty log message ***
17501
17502 1993-04-23 Noah Friedman <friedman@gnu.org>
17503
17504 * src/alloc.h: entered into RCS
17505
17506 1993-04-20 David J. MacKenzie <djm@gnu.org>
17507
17508 * src/version.c: *** empty log message ***
17509
17510 * src/files.c, src/allocate.c:
17511 entered into RCS
17512
17513 * src/reader.c: *** empty log message ***
17514
17515 * src/lex.c: entered into RCS
17516
17517 * src/conflicts.c: New file.
17518
17519 * src/symtab.c: entered into RCS
17520
17521 * src/alloc.h: New file.
17522
17523 * src/LR0.c: entered into RCS
17524
17525 1993-04-18 Noah Friedman <friedman@gnu.org>
17526
17527 * src/reader.c: New file.
17528
17529 * src/version.c: *** empty log message ***
17530
17531 1993-04-18 Noah Friedman <friedman@gnu.org>
17532
17533 * Makefile.in: *** empty log message ***
17534
17535 1993-04-17 Noah Friedman <friedman@gnu.org>
17536
17537 * Makefile.in: *** empty log message ***
17538
17539 1993-04-15 Richard Stallman <rms@gnu.org>
17540
17541 * src/main.c, src/files.c:
17542 New file.
17543
17544 1993-04-15 Noah Friedman <friedman@gnu.org>
17545
17546 * configure.in: entered into RCS
17547
17548 * configure.in: *** empty log message ***
17549
17550 * configure.in: New file.
17551
17552 1993-04-14 Richard Stallman <rms@gnu.org>
17553
17554 * Makefile.in: New file.
17555
17556 1993-04-13 Richard Stallman <rms@gnu.org>
17557
17558 * src/version.c: New file.
17559
17560 1993-03-25 Richard Stallman <rms@gnu.org>
17561
17562 * src/output.c: entered into RCS
17563
17564 1992-09-25 Richard Stallman <rms@gnu.org>
17565
17566 * configure.bat: entered into RCS
17567
17568 1992-06-22 Richard Stallman <rms@gnu.org>
17569
17570 * src/vmsgetargs.c: entered into RCS
17571
17572 1992-06-22 Richard Stallman <rms@gnu.org>
17573
17574 * doc/bison.rnh: entered into RCS
17575
17576 1992-04-20 David J. MacKenzie <djm@gnu.org>
17577
17578 * README: entered into RCS
17579
17580 1992-01-22 Richard Stallman <rms@gnu.org>
17581
17582 * src/machine.h: entered into RCS
17583
17584 1991-12-21 Richard Stallman <rms@gnu.org>
17585
17586 * src/lalr.c, src/closure.c:
17587 entered into RCS
17588
17589 1991-12-20 Richard Stallman <rms@gnu.org>
17590
17591 * src/state.h: entered into RCS
17592
17593 1991-12-18 Richard Stallman <rms@gnu.org>
17594
17595 * src/print.c, src/nullable.c, src/derives.c:
17596 entered into RCS
17597
17598 1991-11-03 David J. MacKenzie <djm@gnu.org>
17599
17600 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
17601 entered into RCS
17602
17603 1988-09-09 Richard Stallman <rms@gnu.org>
17604
17605 * src/bison.hairy: entered into RCS
17606
17607 1987-12-16 Richard Stallman <rms@gnu.org>
17608
17609 * REFERENCES: entered into RCS
17610
17611
17612 -----
17613
17614 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
17615 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free
17616 Software Foundation, Inc.
17617
17618 Copying and distribution of this file, with or without
17619 modification, are permitted provided the copyright notice and this
17620 notice are preserved.
17621
17622 $Id$