]> git.saurik.com Git - bison.git/blob - ChangeLog
51bf11b5a0fe9f4fe0ca937230fd0ab2c88b1bd5
[bison.git] / ChangeLog
1 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2
3 * lib/subpipe.c: New function end_of_output_subpipe() added
4 to allow support for non-posix systems. This is a no-op function
5 for posix systems.
6
7 * lib/subpipe.h: New function end_of_output_subpipe() added
8 to allow support for non-posix systems. This is a no-op function
9 for posix systems.
10
11 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
12 handle the lack of pipe/fork functionality on non-posix systems.
13
14 * djgpp/Makefile.maint: DJGPP specific file.
15
16 * djgpp/README.in: DJGPP specific file.
17
18 * djgpp/config.bat: DJGPP specific configuration file.
19
20 * djgpp/config.sed: DJGPP specific configuration file.
21
22 * djgpp/config.site: DJGPP specific configuration file.
23
24 * djgpp/config_h.sed: DJGPP specific configuration file.
25
26 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
27
28 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
29
30 2005-10-02 Akim Demaille <akim@epita.fr>
31
32 * data/location.cc: New, extract from...
33 * data/lalr1.cc: here.
34 (location.hh): Include it after the user prologue, in case the
35 filename type is defined by the user.
36 Forward declation location and position before the pre-prologue.
37 (yyresult_): Rename as...
38 (yyresult): this, it's a local variable, not an attribute.
39 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
40
41 2005-10-01 Akim Demaille <akim@epita.fr>
42
43 * examples/extexi: Restore the #line generation.
44
45 2005-09-30 Akim Demaille <akim@epita.fr>,
46 Alexandre Duret-Lutz <adl@gnu.org>
47
48 Move the token type and YYSTYPE in the parser class.
49 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
50 (parser::token): New, from the moved free definition of tokens.
51 (parser::semantic_value): Now a full definition instead of an
52 indirection to YYSTYPE.
53 (b4_post_prologue): No longer included in the header file, but
54 in the implementation file.
55 * doc/bison.texi (C+ Language Interface): Update.
56 * src/parse-gram.y: Support unary %define.
57 * tests/actions.at: Define global_tokens_and_yystype for backward
58 compatibility until we update the tests.
59 * tests/calc.at: Idem.
60 (first_line, first_column, last_line, last_column): Define for lalr1.cc
61 to simplify the code.
62
63 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
64
65 Port to SunOS 4.1.4, which lacks strtoul and strerror.
66 Ah, the good old days! Problem reported by Peter Klein.
67 * bootstrap (gnulib_modules): Add strerror, strtoul.
68 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
69 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
70
71 2005-09-29 Akim Demaille <akim@epita.fr>
72
73 * data/c.m4 (b4_error_verbose_if): New.
74 * data/lalr1.cc: Use it.
75 (YYERROR_VERBOSE_IF): Remove.
76 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
77 parser members, replaced by...
78 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
79 local variables.
80 (yysyntax_error_): Takes the state number as argument.
81 (yyreduce_print_): Use the argument yyrule, not the former
82 attribute yyn_.
83
84 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
85
86 * bootstrap (gnulib_modules): Add verify.
87 * lib/.cvsignore: Add verify.h.
88 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
89 * src/system.h (verify): Remove.
90 Include verify.h instead.
91 * src/tables.c (tables_generate): Use new API for 'verify'.
92
93 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
94
95 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
96 local variables whose names begin with 'yy'.
97 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
98 Trivial changes from Joel E. Denny.
99
100 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
101 it itself.
102 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
103 don't use alloca any more.
104
105 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
106 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
107 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
108 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
109 to match yacc.c, to test more hosts.
110
111 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
112
113 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
114 doesn't affect behavior.
115 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
116 Solaris, AIX, MSC.
117 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
118 This works a bit better with glibc, if user code has already included
119 stdlib.h.
120 * doc/bison.texinfo (Bison Parser): Document that users can't
121 arbitrarily use malloc and free for other purposes. Document
122 that <alloca.h> and <malloc.h> might be included.
123 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
124 user must declare alloca.
125
126 * HACKING (release): Forwarn the Translation Project about
127 stable releses.
128
129 2005-09-20 Akim Demaille <akim@epita.fr>
130
131 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
132
133 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
134
135 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
136 (YYSTACK_ALLOC_MAXIMUM): Use it.
137 (yysyntax_error): New function.
138 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
139 multiple syntax errors are reported, and alloca is being used.
140 Instead, reallocate buffers twice as big each time, so that
141 we waste at most half the allocated memory. Start with a small
142 (128-byte) buffer that will suffice in most cases anyway.
143 Use yysyntax_error to do most of the work.
144
145 * doc/bison.texinfo (Error Reporting, Table of Symbols):
146 yynerrs is the number of errors reported, not the number of
147 errors encountered.
148
149 * tests/glr-regression.at (Duplicated user destructor for lookahead):
150 Mark it as expected to fail.
151 Cast result of malloc; problem reported by twlevo@xs4all.nl.
152 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
153 Don't start user-code symbols with "yy", to avoid name space problems.
154
155 2005-09-19 Akim Demaille <akim@epita.fr>
156
157 Remove the traits, failed experiment.
158 It never proved useful, and anyway because of the current
159 definition, it was not possible to have several specialization of
160 this traits, making it useless.
161 * data/lalr1.cc (yy:traits): Remove.
162 Inline its definitions in the parser class.
163
164 2005-09-19 Akim Demaille <akim@epita.fr>
165
166 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
167 least Mac OSX with a /usr/local install of gettext.
168
169 2005-09-19 Akim Demaille <akim@epita.fr>
170
171 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
172 and yytoken for similarity with the other skeletons.
173
174 2005-09-19 Akim Demaille <akim@epita.fr>
175
176 * NEWS, configure.ac: Bump to 2.1a.
177
178 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
179
180 * NEWS: Version 2.1.
181
182 * NEWS: Remove notice of yytname change, since it was never in an
183 official release.
184 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
185 diagnostic.
186 * src/output.c (prepare): Likewise.
187 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
188 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
189 is not defined. This is an awful hack, but it's enough for now.
190 All callers changed.
191 * tests/glr-regression-at (make_value): Args are const pointers now,
192 to avoid GCC warning.
193 (Duplicated user destructor for lookahead): New test. Currently
194 skipped. It fails on my host but I'm not sure it'll always fail.
195
196 2005-09-16 Akim Demaille <akim@epita.fr>
197
198 * src/symtab.h (struct symbol): Declare the printer and destructor
199 as const, to avoid accidental calls to free.
200 (symbol_destructor_set, symbol_printer_set): Adjust.
201 * src/symtab.c: Adjust.
202
203 2005-09-16 Akim Demaille <akim@epita.fr>
204
205 * data/c.m4 (b4_token_enums): New.
206 (b4_token_defines): Rename as...
207 (b4_token_enums_defines): this.
208 (b4_token_defines): New, output only the #defines.
209 * data/yacc.c, data/glr.c: Adjust.
210 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
211 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
212 as default values.
213
214 2005-09-16 Akim Demaille <akim@epita.fr>
215
216 * data/lalr1.cc (yylex_): Remove, inline its code.
217 (yyreport_syntax_error_): Remove, replaced by...
218 (yysyntax_error_): this which returns a string and leaves to the
219 caller the call to the users' error function.
220 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
221 Move from members of the parser object...
222 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
223 to local variables of the parse function.
224
225 2005-09-16 Akim Demaille <akim@epita.fr>
226
227 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
228 since it's in Bison's name space.
229
230 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
231
232 * data/glr.c (yyresolveValue): Add default case to pacify
233 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
234
235 * NEWS: Document when yyparse started to return 2.
236 * doc/bison.texinfo (Parser Function): Document when yyparse
237 returns 2.
238
239 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
240 (b4_filename_type): Renamed back from b4_file_name_type. All uses
241 changed.
242 (class position): file_name -> filename (reverting). All uses changed.
243
244 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
245
246 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
247 do anything if $@ exists. This reverts part of the 2005-07-07
248 patch.
249
250 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
251
252 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
253 contains obsolete information and isn't worth distributing as a
254 separate file anyway.
255 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
256 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
257 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
258 (yyparse): Abort if user code uses longjmp to throw an unexpected
259 value.
260
261 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
262
263 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
264 Suggested by twlevo@xs4all.nl.
265
266 * data/glr.c (YYCHK1): Do not assume YYE is in range.
267 This avoids a diagnostic from gcc -Wswitch-enum.
268 Problem reported by twlevo@xs4all.nl.
269
270 * doc/bison.texinfo: Don't use "filename", as per GNU coding
271 standards. Use "file name" or "file" or "name", depending on
272 the context.
273 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
274 not to hack/foo.tab.c.
275 (Calc++ Top Level): 2nd arg of main is not const.
276 * data/glr.c: b4_filename -> b4_file_name.
277 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
278 All uses changed.
279 (class position): filename -> file_name. All uses changed.
280 * data/yacc.c: b4_filename -> b4_file_name.
281 * lib/bitset.h: filename -> file_name in local vars.
282 * lib/bitset_stats.c: Likewise.
283 * src/files.c: Likewise.
284 * src/scan-skel.l ("@output ".*\n): Likewise.
285 * src/files.c (file_name_split): Renamed from filename_split.
286 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
287
288 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
289
290 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
291 to accommodate latest gnulib.
292
293 * tests/glr-regression.at (Duplicate representation of merged trees):
294 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
295
296 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
297 needed.
298
299 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
300
301 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
302 All uses changed. Invoke user destructor after an error during a
303 split parse (trivial change from Joel E. Denny).
304
305 * tests/glr-regression.at
306 (User destructor after an error during a split parse): New test case.
307 Problem reported by Joel E. Denny in:
308 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
309
310 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
311
312 * README-cvs: Give URLs for recommended tools.
313 Mention Gzip version problem, and bootstrapping issues.
314 Remove troubleshooting section, as it's somewhat obsolete.
315
316 * bootstrap (no_cache): New var, to accommodate different wget
317 variants. Use it instead of '-C off'. Problem reported by
318 twlevo@xs4all.nl.
319
320 * data/glr.c (yydestroyStackItem): New function.
321 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
322 debugging information. Problem reported by Joel E. Denny.
323
324 2005-08-25 Akim Demaille <akim@epita.fr>
325
326 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
327
328 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
329
330 * data/glr.c (yyrecoverSyntaxError, yyreturn):
331 Don't invoke destructor on unresolved entries.
332 * tests/glr-regression.at
333 (User destructor for unresolved GLR semantic value): New test case.
334 Problem reported by Joel E. Denny in:
335 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
336
337 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
338
339 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
340 Add strnlen.c.
341 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
342 lib-prefix.m4, po.m4.
343
344 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
345 in yydestruct diagnostic, since it might not be an error.
346 Problem reported by Joel Denny near end of
347 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
348 * data/lalr1.cc (yyerturn): Likewise.
349 * data/yacc.c (yyreturn): Likewise.
350 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
351
352 * src/files.c: Remove obsolete FIXME comment.
353
354 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
355 with the other templates, and to fix bogus run-on messages such
356 as the one reported at the end of
357 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
358 All callers changed to avoid the newline.
359 (yyprocessOneStack): Output two lines rather than one, to accommodate
360 the above change. This changes the debug output format slightly.
361
362 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
363 reported by Joel E. Denny in
364 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
365 (trivial change).
366 * tests/glr-regression.at (Duplicate representation of merged trees):
367 New test, from Joel E. Denny in:
368 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
369 * THANKS: Add Joel E. Denny.
370
371 * configure.ac (AC_INIT): Bump to 2.0c.
372
373 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
374
375 * NEWS: Version 2.0b.
376
377 * Makefile.am (SUBDIRS): Put examples before tests, so that
378 "make check" doesn't finish with "All 1 tests passed".
379
380 * tests/regression.at (Token definitions): Don't rely on
381 AT_PARSER_CHECK for data that contains backslashes. It currently
382 uses 'echo', and 'echo' isn't portable if its argument contains
383 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
384 that the byte '\0xff' is not printable in the C locale; it is,
385 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
386 not printable, so use '\0x81' to test.
387
388 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
389 version of GCC, since the macro is used with non-GCC compilers.
390
391 Fix core dump reported by Pablo De Napoli in
392 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
393 * tests/regression.at (Invalid inputs with {}): New test.
394 * src/parse-gram.y (token_name): Translate type before using
395 it as an index.
396
397 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
398 the user's name space. All uses changed to __attribute__
399 ((__unused__)).
400 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
401 Add __attribute__ ((__noreturn__)).
402
403 * etc/clcommit: Remove. We weren't using it, and it failed
404 "make maintainer-distcheck".
405 * Makefile.maint: Merge from coreutils.
406 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
407 (syntax-check-rules): Change list of rules as described below.
408 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
409 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
410 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
411 (sc_trailing_space): New rules.
412 (sc_xalloc_h_in_src): Remove.
413 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
414 (sc_space_tab, sc_error_exit_success, sc_changelog):
415 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
416 (makefile-check, po-check, author_mark_check):
417 (makefile_path_separator_check, copyright-check):
418 Use grep -n, to make it easier to find violations.
419 Use CVS_LIST and CVS_LIST_EXCEPT.
420 (header_regexp, h_re): Remove.
421 (dd_c): New macro.
422 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
423 (my-distcheck): Use more-modern GCC flags.
424 (signatures, %.asc): Remove.
425 (rel-files, announcement): Remove signatures.
426 Restore old updating code, even though we don't use it, so
427 that we're the same as coreutils.
428 (alpha, beta, major): Depend on news-date-check.
429 Make the upload commands.
430
431 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
432 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
433 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
434 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
435 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
436 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
437 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
438 * tests/sets.at: Likewise.
439
440 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
441 we comment out the Autoconf version number.
442 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
443 it's error-prone and "make maintainer-distcheck" rejects it.
444
445 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
446 Indent calls to "error" to pacify "make maintainer-distcheck",
447 when the calls are not intended to be translated.
448 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
449
450 * src/Makefile.am (DEFS): Use +=, to pacify
451 "make maintainer-distcheck".
452 (bison_SOURCES): Add scan-skel.h.
453 (sc_tight_scope): New rule, from coreutils.
454
455 * src/files.c (src_extension, header_extension):
456 Now static, not extern.
457 * src/getargs.c (short_options): Likewise.
458 * src/muscle_tab.c (muscle_table): Likewise.
459 * src/parse-gram.y (current_class, current_type, current_prec):
460 Likewise.
461 * src/reader.c (grammar_end, previous_rule_end): Likewise.
462 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
463 * src/main.c (main): Cast bindtextdomain and textdomain calls to
464 void, to avoid warning when NLS is disabled.
465 * src/output.c: Include scan-skel.h.
466 (scan_skel): Remove decl, since scan-skel.h does this.
467 (output_skeleton):
468 Indent calls to "error" to pacify "make maintainer-distcheck".
469 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
470 * src/reader.h (gram_end, gram_lineno): New decls to pacify
471 "make maintainer-distcheck".
472 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
473 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
474 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
475 (skel_lex_destroy, scan_skel): Move these decls to...
476 * src/scan-skel.h: New file.
477 * src/uniqstr.c (uniqstr_assert):
478 Indent calls to "error" to pacify "make maintainer-distcheck".
479
480 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
481 not @VAR@.
482
483 * tests/torture.at: Revamp to avoid misuse of atoi that
484 "make maintainer-distcheck" complained about.
485
486 * examples/extexi (message): Don't print a message more than once,
487 and omit line-number decoration that makes Emacs compile think
488 that informative messages are worth worrying about.
489
490 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
491
492 * configure.ac: Update version number.
493
494 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
495 accidentally.
496 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
497 autogenerated by the maintainer.
498 * examples/calc++/.cvsignore: Add *.yy.
499
500 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
501 * lib/bitset_stats.c (bitset_stats_init): Likewise.
502 * lib/bitsetv.c (bitsetv_alloc): Likewise.
503
504 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
505
506 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
507 from maintainer-distcheck about casting the argument of 'free'.
508
509 * NEWS: Mention recent yytname changes.
510 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
511
512 * bootstrap: For translations that have not yet been upgraded to
513 the new runtime-po domain, prime the pump by extracting the
514 relevant strings from the obsolete translations. This code can be
515 removed once the bison-runtime domain has been translated by each
516 team.
517
518 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
519 now that token names are already quoted.
520
521 Fix problem reported by Anthony Heading.
522 * data/glr.c (YYTOKEN_TABLE): New macro.
523 (yytname): Define if YYTOKEN_TABLE.
524 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
525 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
526 (YYERROR_VERBOSE): Define the same way the other skeletons do.
527 * src/output.c (prepare_symbols): Output token_table_flag.
528
529 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
530
531 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
532 again if the first call fails.
533
534 * data/glr.c (yytnamerr): New function.
535 (yyreportSyntaxError): Use it to dequote most string literals.
536 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
537 with other skeletons. All uses changed.
538 (yytnameerr_): New function.
539 (yyreport_syntax_error): Use it to dequote most string literals.
540 * data/yacc.c (yytnamerr): New function.
541 (yyerrlab): Use it to decode most string literals.
542 * doc/bison.texinfo (Decl Summary, Calling Convention):
543 Clarify quoting convention of yytname.
544 * src/output.c (prepare_symbols): Quote all names. This undoes
545 the 2005-04-17 change, which is now accomplished (mostly) via
546 changes in the parsers as described above.
547 * tests/regression.at (Token definitions, Web2c Actions):
548 Undo most 2005-04-17 change here, too.
549
550 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
551
552 Fix more problems reported by twlevo@xs4all.nl.
553 * tests/cxx-type.at: Don't pipe output of ./types through sed to
554 remove trailing spaces. This loses the exit status of ./types,
555 and isn't needed since ./types shouldn't be emitting trailing
556 spaces.
557 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
558 as the stack isn't valid in that case.
559
560 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
561 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
562 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
563 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
564 is used.
565 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
566 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
567 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
568 Likewise.
569
570 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
571 overly-picky compilers that reject 'char *foo = "bar";'.
572
573 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
574 to FILE * parameter, not to stderr. This fixes a typo introduced
575 in the 2005-07-12 change.
576
577 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
578 warnings from GCC 4.
579
580 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
581 (yyglrShiftDefer, yysplitStack):
582 Remove unused parameters b4_pure_formals. All uses changed.
583 (yyglrShift): Remove unused parameters b4_user_formals.
584 All uses changed.
585 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
586
587 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
588
589 Destructor cleanups and regularization among the three skeletons.
590 * NEWS: Document the behavior changes.
591 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
592 stack before failing, as the cleanup code will do it for us now.
593 * data/lalr1.cc (yyerrlab): Likewise.
594 * data/glr.c (yyparse): Pop everything off the stack before
595 freeing it, so that destructors get called properly.
596 * data/lalr1.cc (yyreturn): Likewise.
597 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
598 This is more consistent.
599 * doc/bison.texinfo (Destructor Decl): Mention more reasons
600 why destructors might be called. 1.875 -> 2.1.
601 (Destructor Decl, Decl Summary, Table of Symbols):
602 Some English-language cleanups for %destructor.
603 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
604 Add output line for destructor of start symbol.
605 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
606 because of that same extra output line.
607
608 * NEWS: Document minor wording changes in diagnostics of
609 Bison-generated parsers.
610 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
611 Remove unused formals. All uses changed.
612 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
613 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
614 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
615 Rename yyoverflowab to yyexhaustedlab.
616 When memory exhaustion occurs during syntax-error reporting,
617 report it separately rather than in a single diagnostic; this
618 eases translation.
619 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
620 (Memory Exhausted): Renamed from Parser Stack Overflow.
621 Revamp wording slightly to prefer "memory exhaustion".
622 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
623
624 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
625
626 Add i18n support to the GLR skeleton. Partially fix the C++
627 skeleton; a C++ expert needs to finish this. Remove debugging
628 msgids; there's little point to having them translated, since they
629 can be understood only by someone who can read the
630 (English-language) source code.
631
632 Generate runtime-po/bison-runtime.pot automatically, so that we
633 don't have to worry about garbage getting in that file. We'll
634 make sure after the next official release that old msgids don't
635 get lost. See
636 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
637
638 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
639 Now auto-generated.
640 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
641 Fix typos in explanations of the runtime file.
642 * bootstrap: Change gettext keyword from YYI18N to YY_.
643 Use standard Makefile.in.in in runtime-po, since we'll arrange
644 for backward-compatible bison-runtime.po files in a different way.
645 * data/glr.c (YY_): New macro, from yacc.c.
646 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
647 Translate messages intended for users.
648 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
649 the wording in the other skeletons. We don't know that the memory
650 is virtual.
651 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
652 Use same method that yacc.c uses.
653 Don't translate debugging messages.
654 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
655 it doesn't work (yet), and requires C++ expertise to fix.
656 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
657 Move defn to a more logical place, to be consistent with other
658 skeletons.
659 Don't translate debugging messages.
660 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
661 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
662 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
663 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
664
665 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
666 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
667 void, not int.
668 * tests/glr-regression.at (Badly Collapsed GLR States):
669 Likewise.
670 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
671 yylex should return 0 at EOF rather than aborting.
672
673 Improve tests for stack overflow in GLR parser.
674 Problem reported by twlevo@xs4all.nl.
675 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
676 All uses removed.
677 (yyStackOverflow): Just longjmp, but with value 2 so that caller
678 can handle the problem.
679 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
680 (yyparse): New local variable yyresult to record the result.
681 Use result of setjmp to set it, rather than storing itinto
682 struct.
683 (yyDone): Remove label.
684 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
685 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
686 if YYABORT is used).
687 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
688 yyparse status; put status > 1 into diagnostic.
689 Check that status==2 works.
690 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
691 Use exit status 3 for failure to open (which shouldn't happen).
692
693 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
694
695 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
696 1 on syntax error; just let yyparse do its thing.
697 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
698 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
699 (Exploding the Stack Size with Alloca):
700 (Exploding the Stack Size with Malloc):
701 Expect exit status 2, not 1, since the parser is supposed to blow
702 its stack. Problem reported by twlevo@xs4all.nl.
703
704 * data/glr.c (yyparse): Don't assume that the initial calls
705 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
706 Print a stack-overflow message and fail instead.
707 Initialize the line-number information before creating the stack,
708 so that the stack-overflow message can report line zero safely.
709
710 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
711
712 Fix problems reported by twlevo@xs4all.nl.
713 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
714 (yyuserMerge): Provide a default case if b4_mergers is empty.
715 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
716 * tests/glr-regression.at
717 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
718 Add casts to pacify C++ compilers.
719 * tests/glr-regression.at (Improper merging of GLR delayed action
720 sets): Declare yylex before using it.
721 * tests/Makefile.am (maintainer-check-g++): Fix a stray
722 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
723 test for valgrind; valgrind is independent of g++.
724 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
725 for compatibility with POSIX 1003.1-2001 (if running coreutils).
726 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
727 Use a destructor, so that we can expand the stack. Change
728 YYSTYPE to char * so that we can free it. Cast result of malloc.
729
730 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
731
732 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
733 a valgrind failure. Problem reported by twlevo@xs4all.nl.
734
735 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
736
737 * PACKAGING: New file, suggested by Bruno Haible and taken from
738 similar wording in gettext's PACKAGING file.
739 * NEWS: Mention PACKAGING.
740 * Makefile.am (EXTRA_DIST): Add PACKAGING.
741
742 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
743
744 * NEWS: Document recent i18n improvements.
745 * bootstrap: Get runtime translations into runtime-po.
746 Create runtime-po files automatically, if possible.
747 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
748 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
749 does not infringe on the user's name space.
750 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
751 * doc/bison.texinfo (Internationalization): Revamp the English
752 and Texinfo syntax a bit, to try to make it clearer.
753 (Bison Options, Option Cross Key): Mention --print-localedir.
754 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
755 YYENABLE_NLS. Quote a bit more.
756 * runtime-po/.cvsignore: New file.
757 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
758 * runtime-po/Rules-quot: Remove; now created by bootstrap.
759 * runtime-po/quot.sed: Likewise.
760 * runtime-po/boldquot.sed: Likewise.
761 * runtime-po/en@quot.header: Likewise.
762 * runtime-po/en@boldquot.header: Likewise.
763 * runtime-po/insert-header.sin: Likewise.
764 * runtime-po/remove-potcdate.sin: Likewise.
765 * runtime-po/Makevars: Likewise.
766 * runtime-po/LINGUAS: Likewise.
767 * runtime-po/de.po: Likewise; we will rely on the translation project
768 to maintain this, so "bootstrap" should get it.
769 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
770 its value.
771 * src/main.c (main): Bind the bison-runtime domain, too.
772
773 2005-07-12 Bruno Haible <bruno@clisp.org>
774
775 * data/yacc.c: Include <libintl.h> when NLS is enabled.
776 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
777 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
778 * runtime-po: New directory.
779 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
780 $(DOMAIN).pot-update rule, so that old messages are never dropped.
781 * runtime-po/Rules-quot: New file, copied from po/.
782 * runtime-po/quot.sed: Likewise.
783 * runtime-po/boldquot.sed: Likewise.
784 * runtime-po/en@quot.header: Likewise.
785 * runtime-po/en@boldquot.header: Likewise.
786 * runtime-po/insert-header.sin: Likewise.
787 * runtime-po/remove-potcdate.sin: Likewise.
788 * runtime-po/Makevars: New file.
789 * runtime-po/POTFILES.in: New file.
790 * runtime-po/LINGUAS: New file.
791 * runtime-po/bison-runtime.pot: New file.
792 * runtime-po/de.po: New file.
793 * m4/bison.m4: New file.
794 * Makefile.am (SUBDIRS): Add runtime-po.
795 (aclocaldir, aclocal_DATA): New variables.
796 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
797 Define aclocaldir.
798 * src/getargs.c (usage): Document --print-localedir option.
799 (PRINT_LOCALEDIR_OPTION): New enum item.
800 (long_options): Add --print-localedir option.
801 (getargs): Handle --print-localedir option.
802 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
803 (Internationalization): New section.
804
805 2005-07-12 Akim Demaille <akim@epita.fr>
806
807 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
808 for consistency with the rest of the code.
809 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
810 Add separators.
811
812 2005-07-12 Akim Demaille <akim@epita.fr>
813
814 * src/parse-gram.y: Use %printer instead of YYPRINT.
815
816 2005-07-12 Akim Demaille <akim@epita.fr>
817
818 * src/symtab.h, src/symtab.c (symbol_print): New.
819 * src/symlist.h, src/symlist.c (symbol_list_print): New.
820 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
821
822 2005-07-12 Akim Demaille <akim@epita.fr>
823
824 * data/glr.c (b4_syncline): Fix (swap) the definitions of
825 b4_at_dollar and b4_dollar_dollar.
826
827 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
828
829 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
830 and Pennello's paper.
831
832 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
833
834 * data/yacc.c (yyparse): Undo previous patch. Instead,
835 set yylsp[0] and yyvsp[0] only if the initial action
836 sets yylloc and yylval, respectively.
837
838 * data/yacc.c (yyparse): In the initial action, set
839 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
840 This avoids the use of undefined variables if the initial
841 action does not set yylloc and/or yylval.
842
843 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
844
845 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
846 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
847 Remove from CVS. These files are automatically generated.
848 * examples/extexi: Clarify that this file is now part of Bison,
849 not GNU M4, and that it works with any POSIX-compatible Awk.
850 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
851 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
852 so that we also get calc++-parser.yy. Geneate it.
853 Use $(AWK), not gawk, since any conforming Awk will do.
854 Put comment before action, since older 'make' can't handle comment
855 in action.
856 $(BUILT_SOURCES): List all built sources, not just some of them.
857 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
858 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
859 $($(calc_sources_generated)): Remove unnecessary test for existence
860 of target. (This had a shell syntax error anyway; a stray "x".)
861 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
862 calc++-parser.yy.
863 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
864
865 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
866 implied by the other modules.
867
868 2005-07-06 Akim Demaille <akim@epita.fr>
869
870 Bind examples/calc++ to the package.
871 * examples/calc++/Makefile: Remove, replaced by...
872 * examples/calc++/Makefile.am: ... this new file.
873 * examples/calc++/test: Remove input.
874 * examples/calc++/compile: Remove.
875 * examples/Makefile.am: New.
876 * configure.ac, Makefile.am: Adjust.
877 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
878
879 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
880
881 * data/glr.c (yyFail): Drastically simplify; since the format argument
882 never had any % directives, we can simply pass it to yyerror.
883 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
884 be modified later, as that is the usual style in glr.c.
885 Problems reported by Paul Hilfinger.
886
887 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
888 and size overflow errors.
889 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
890 in case the user prolog sets feature-test macros like _GNU_SOURCE.
891 (YYSIZEMAX): New macro.
892 (yystpcpy): New function, taken from yacc.c.
893 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
894 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
895 so that we don't have to maintain their signatures.
896 (yyFail): Check for buffer overflow, by using vsnprintf rather
897 than vsprintf. Allocate a bigger buffer if possible.
898 Report an error if buffer allocation fails.
899 (yyStackOverflow): New function.
900 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
901 the initialization was successful. It might fail if storage was
902 exhausted.
903 (yyexpandGLRStack): Add more checks for storage allocation failure.
904 Use yyStackOverflow to report failures.
905 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
906 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
907 Don't assume stack number fits in int.
908 (yysplitStack): Check for storage allocation failure.
909 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
910 can print diagnostics on storage allocation failure. All callers
911 changed.
912 (yyresolveValue): Use yybool for boolean.
913 (yyreportSyntaxError): Check for size-calculation overflow.
914 This code is taken from yacc.c.
915 (yyparse): Check for storage allocation errors when allocating
916 the initial stack.
917
918 2005-07-05 Akim Demaille <akim@epita.fr>
919
920 Extract calc++ from the documentation.
921 * doc/bison.texinfo (Calc++): Add the extraction marks.
922 * examples/extexi: New, from the aborted GNU Programming 2E.
923 Separate the different paragraph of a file with empty lines.
924 * examples/Makefile: Use it to extract the whole calc++ example.
925
926 2005-06-24 Akim Demaille <akim@epita.fr>
927
928 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
929 class typedefs.
930
931 2005-06-22 Akim Demaille <akim@epita.fr>
932
933 * doc/bison.texinfo (C++ Language Interface): First stab.
934 (C++ Parsers): Remove.
935
936 2005-06-22 Akim Demaille <akim@epita.fr>
937
938 * data/lalr1.cc (yylex_): Honor %lex-param.
939
940 2005-06-22 Akim Demaille <akim@epita.fr>
941
942 Start a set of simple examples.
943 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
944 * examples/calc++/calc++-driver.hh,
945 * examples/calc++/calc++-parser.yy,
946 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
947 * examples/calc++/compile, examples/calc++/test: New.
948
949 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
950
951 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
952 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
953 which stems from the 2005-05-27 patch.
954
955 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
956
957 * data/glr.c: Modify treatment of unused parameters to permit use
958 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
959
960 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
961
962 Fix infringement on user name space reported by Janos Zoltan Szabo.
963 * data/yacc.c (yyparse): strlen -> yystrlen.
964
965 2005-05-30 Akim Demaille <akim@epita.fr>
966
967 * data/lalr1.cc (_): New.
968 Translate the various messages.
969
970 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
971
972 Fix infringement on user name space reported by Bruno Haible.
973 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
974 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
975 the user's name space.
976 (alloca): Include <stdlib.h> to get it, if it's not built in.
977 (YYMALLOC, YYFREE): Define only if needed.
978 (malloc, free): Declare, but only if needed, as this infringes on
979 the user name space.
980
981 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
982
983 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
984 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
985 with %d format.
986 * lib/ebitset.c (min, max): Undef before defining.
987 * lib/vbitset.c (min, max): Likewise.
988 * lib/subpipe.c (create_subpipe): Save local variables in case
989 vfork clobbers them.
990
991 2005-05-24 Bruno Haible <bruno@clisp.org>
992
993 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
994 error message syntax used by gcc-4.0.
995
996 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
997
998 * README: Mention m4 1.4.3. Remove obsolete advice about
999 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
1000
1001 * bootstrap: Remove workaround for problem I encountered with
1002 gettext 0.14.1; it seems to be fixed now.
1003
1004 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
1005
1006 * NEWS: Version 2.0a.
1007
1008 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
1009 the previous change.
1010
1011 Various maintainer cleanups.
1012 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
1013 conftest*, for benefit of CVS commands run at the same time as
1014 "configure". Add build-aux, since "bootstrap" now creates it and
1015 its subfiles.
1016 * Makefile.cfg (move_if_change): Remove.
1017 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
1018 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
1019 (po_repo, do-po-update, po-update, wget_files, get-targets):
1020 (config.guess-url_prefix, config.sub-url_prefix):
1021 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
1022 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
1023 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
1024 Remove.
1025 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
1026 this is now the recommended name.
1027 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
1028 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
1029 ylwrap. These files now go into build-aux.
1030 * config/move-if-change: Remove.
1031 * config/prev-version.txt: Bump from 1.75 to 2.0.
1032
1033 * bootstrap: Add stdio-safer, unistd-safer modules.
1034 Remove m4/glibc2.m4 (introduced by latest gnulib, but
1035 we don't need it).
1036 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
1037 fopen-safer.c, stdio-safer.h, unistd-safer.h.
1038 * lib/subpipe.c: Include "unistd-safer.h".
1039 (create_subpipe): Make sure all the newly-created
1040 file descriptors are > 2, so that diagnostics don't
1041 get sent down them (which might cause Bison to hang, in theory).
1042 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
1043 * src/files.c (xfopen): Use fopen_safer, not fopen.
1044
1045 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
1046 yesterday's yacc.c fix.
1047
1048 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
1049
1050 * data/glr.c, data/lalr1.cc: Update copyright date.
1051
1052 Fix a destructor bug reported by Wolfgang Spraul in
1053 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
1054 * data/yacc.c (yyabortlab): Don't call destructor, and
1055 don't set yychar to EMPTY.
1056 (yyoverflowlab): Don't call destructor.
1057 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
1058 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
1059 since we no longer output the message "discarding lookahead token
1060 end of input ()".
1061
1062 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
1063
1064 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
1065 fix a small glitch in debugging output.
1066 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
1067 after YY_SYMBOL_PRINT where needed.
1068
1069 (struct yyGLRState): Add some comments.
1070 (struct yySemanticOption): Add some comments.
1071 (union yyGLRStackItem): Add comment.
1072
1073 (yymergeOptionSets): Correct this to properly perform the union,
1074 avoiding infinite reported by Michael Rosien.
1075 Update comment.
1076
1077 * tests/glr-regression.at: Add test for GLR merging error reported
1078 by M. Rosien.
1079
1080 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
1081
1082 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
1083 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
1084 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
1085 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
1086 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
1087 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
1088 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
1089 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
1090 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
1091 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
1092 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
1093 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
1094 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
1095 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
1096 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
1097 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
1098 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
1099 src/derives.h, src/files.c, src/files.h, src/getargs.c,
1100 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
1101 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
1102 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
1103 src/output.h, src/parse-gram.c, src/parse-gram.h,
1104 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
1105 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
1106 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
1107 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
1108 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
1109 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
1110 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
1111 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
1112 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
1113 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
1114 tests/reduce.at, tests/regression.at, tests/sets.at,
1115 tests/synclines.at, tests/testsuite.at, tests/torture.at:
1116 Update FSF postal mail address.
1117
1118 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
1119
1120 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
1121 Problem reported by Ralf Menzel.
1122
1123 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
1124
1125 * tests/actions.at: Test that stack overflow invokes destructors.
1126 From Marcus Holland-Moritz.
1127 * data/yacc.c (yyerrlab): Move the code that destroys the stack
1128 from here....
1129 (yyreturn): to here. That way, destructors are called properly
1130 even if the stack overflows, or the user calls YYACCEPT or
1131 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
1132 (yyoverflowlab): Destroy the lookahead.
1133
1134 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
1135
1136 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
1137
1138 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
1139
1140 * NEWS: Bison-generated C parsers no longer quote literal strings
1141 associated with tokens.
1142 * src/output.c (prepare_symbols): Don't escape strings,
1143 since users don't want to see C escapes.
1144 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
1145 in diagnostics.
1146 * tests/input.at (Torturing the Scanner): Likewise.
1147 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
1148
1149 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
1150
1151 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
1152 the data size is known to be too small and we can't increase it.
1153 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
1154
1155 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
1156
1157 * src/parse-gram.y: Include quotearg.h.
1158 (string_as_id): Quote $1 before using it as a key, since the
1159 lexer no longer quotes it for us.
1160 (string_content): Don't strip quotes, since lexer no longer
1161 quotes it for us.
1162 * src/scan-gram.l: Include quotearg.h.
1163 ("\""): Omit quote.
1164 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
1165 a key, since the rest of the lexer doesn't quote it.
1166 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
1167 * tests/regression.at (Token definitions): Check for backslashes
1168 in token strings.
1169
1170 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
1171 (YYSIZE_T): Define to unsigned long int when using an older compiler.
1172 (yyparse): Revamp code to generate long syntax error message, to
1173 make it easier to translate, and to avoid problems with arithmetic
1174 overflow. Change "virtual memory" to "memory" in diagnostic, since
1175 we don't know whether the memory is virtual.
1176
1177 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
1178
1179 * NEWS: Bison-generated C parsers now use the _ macro to
1180 translate strings.
1181 * data/yacc.c (_) [!defined _]: New macro.
1182 All English strings wrapped inside this macro.
1183 * doc/bison.texinfo (Bison Parser): Document _.
1184 * po/POTFILES.in: Include src/parse-gram.c, since it now
1185 includes translateable strings that parse-gram.y doesn't.
1186
1187 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
1188
1189 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
1190 reverting the 2004-10-11 change to this function.
1191 (symbol_check_alias_consistency): Don't call symbol_type_set
1192 if the type name is already correct.
1193 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
1194
1195 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
1196
1197 * tests/regression.at (Token definitions): Don't use a token named
1198 c, as that generates a "#define c ..." that runs afoul of buggy
1199 stdlib.h that uses the identifier c as a member of struct
1200 drand48_data. Problem reported by Horst Wente.
1201
1202 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
1203
1204 * bootstrap: Change translation URL from
1205 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
1206 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
1207 redirection glitches. Problem reported by twlevo@xs4all.nl.
1208
1209 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
1210
1211 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
1212 after operands; POSIX says this isn't portable for the c99 command.
1213
1214 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
1215
1216 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
1217 immediately if a data overrun has occurred; this may help us track
1218 down what may be a spurious failure on MacOS.
1219
1220 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
1221
1222 Respond to problems reported by twlevo@xs4all.nl.
1223
1224 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
1225
1226 * src/vcg.h: Comment fix.
1227 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
1228 (G_CMAX): Change to -1 instead of INT_MAX.
1229
1230 * data/yacc.c (yyparse): Omit spaces before #line.
1231
1232 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
1233
1234 * src/tables.c (state_number_to_vector_number): Put it inside an
1235 "#if 0", since it's not currently used. Problem reported by
1236 Roland McGrath.
1237
1238 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
1239
1240 * src/output.c (escaped_output): Renamed from
1241 escaped_file_name_output, since we now use it for symbol tags as
1242 well. All uses changed.
1243 (symbol_destructors_output, symbol_printers_output):
1244 Escape symbol tags too.
1245 Problem reported by Matyas Forstner in
1246 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
1247
1248 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
1249 not needed.
1250 * src/output.c (user_actions_output, token_definitions_output,
1251 symbol_destructors_output, symbol_printers_output): Likewise.
1252 * src/reader.c (prologue_augment): Likewise.
1253 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
1254
1255 * src/vcg.c (output_edge): Don't quote linestyle arg.
1256 Problem reported by twlevo@xs4all.nl.
1257
1258 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
1259
1260 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
1261 example, reported by Derek M Jones. Also, make the example even
1262 more outrageous, to better illustrate how bad the problem is.
1263
1264 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
1265
1266 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
1267 putsym. Typo reported by Sebastian Piping.
1268
1269 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
1270
1271 * doc/bison.texinfo (Language and Grammar): some -> same
1272 (Epilogue): int he -> in the
1273 Typos reported by Sebastian Piping via Justin Pence.
1274
1275 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
1276
1277 * tests/glr-regression.at (Improper handling of embedded actions
1278 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
1279 embedded actions and $-N in GLR parsers", work around an Autoconf bug
1280 with dollar signs in test names.
1281 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
1282 for a similar reason.
1283
1284 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
1285
1286 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
1287 wants to redefine G_VIEW.
1288
1289 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
1290
1291 * src/vcg.c (get_view_str): Remove case for normal_view.
1292 Problem reported by twlevo@xs4all.nl.
1293
1294 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
1295
1296 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
1297 Problem reported by twlevo@xs4all.nl.
1298
1299 * doc/bison.texinfo: Change @dircategory from "GNU programming
1300 tools" to "Software development". Requested by Richard Stallman
1301 via Karl Berry.
1302
1303 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
1304
1305 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
1306 Problem reported by twlevo@xs4all.nl.
1307
1308 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
1309
1310 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
1311 keyword; it's not needed with modern compilers, and it doesn't
1312 affect correctness with older compilers. Suggested by
1313 twlevo@xs4all.nl.
1314
1315 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
1316
1317 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
1318 gcc -Wswitch-default.
1319 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
1320 * data/yacc.c (yyparse): Likewise.
1321
1322 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
1323
1324 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
1325 already. Let config.h define any nonstandard values.
1326
1327 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
1328
1329 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
1330 for the benefit of slower hosts. Problem reported by
1331 Nelson H. F. Beebe.
1332
1333 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
1334
1335 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
1336 being defined and not used.
1337 * data/lalr1.cc (yyparse): Likewise.
1338 Use "if (false)" rather than "if (0)".
1339
1340 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
1341
1342 * TODO: Mention that we should allow NUL bytes in tokens.
1343
1344 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
1345
1346 * src/scan-skel.l (<<EOF>>): Don't close standard output.
1347 Problem reported by Hans Aberg.
1348
1349 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
1350
1351 * src/getargs.c (version): Happy new year; update overall
1352 program copyright date from 2004 to 2005.
1353
1354 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
1355 Problem reported by Hans Aberg.
1356 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
1357 (Output file names.): Add a test for the case when standard output
1358 is closed.
1359
1360 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
1361
1362 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
1363 to fix an oversight in the Bison 2.0 manual.
1364
1365 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
1366
1367 * NEWS: Version 2.0. Reformat the existing news items since
1368 1.875, so that related items are grouped together.
1369 * configure.ac (AC_INIT): Bump version to 2.0.
1370 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
1371
1372 * tests/torture.at (Exploding the Stack Size with Alloca): Set
1373 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
1374 otherwise, we're not testing alloca. Unfortunately there's no
1375 simple way to consult HAVE_ALLOCA here.
1376
1377 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
1378 for yymsg, too.
1379
1380 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
1381 hand. This avoids a warning about comparing int to size_t when
1382 GCC warnings are enabled.
1383
1384 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
1385
1386 * NEWS: Bison-generated parsers no longer default to using the
1387 alloca function (when available) to extend the parser stack, due
1388 to widespread problems in unchecked stack-overflow detection.
1389 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
1390 responsibility to set it to a positive value. This lets the user
1391 specify a value that is not a preprocessor constant.
1392 * data/yacc.c (YYMAXDEPTH): Likewise.
1393 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
1394 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
1395 to be a compile-time constant. However, explain the constraints on it.
1396 Also, explain the constraints on YYINITDEPTH.
1397 (Table of Symbols): Explain that alloca is no longer the default.
1398 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
1399 to 1.
1400
1401 * doc/bison.texinfo (Location Default Action): Mention that n must
1402 be zero when k is zero. Suggested by Frank Heckenbach.
1403
1404 2004-12-22 Akim Demaille <akim@epita.fr>
1405
1406 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
1407 (parser::state_type, parser::semantic_type, parser::location_type):
1408 Private, not public.
1409 (parser::parse): Return ints, not bool.
1410 Returning a bool introduces a problem: 0 corresponds to false, and
1411 it seems weird to return false on success. Returning true changes
1412 the conventions for yyparse.
1413 Alternatively we could return void and send an exception.
1414 There is no clear consensus (yet?).
1415 (state_stack, semantic_stack, location_stack): Rename as...
1416 (state_stack_type, semantic_stack_type, location_stack_type): these.
1417 Private, not public.
1418 * tests/c++.at: New.
1419 * tests/testsuite.at, tests/Makefile.am: Adjust.
1420
1421 2004-12-21 Akim Demaille <akim@epita.fr>
1422
1423 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
1424
1425 2004-12-21 Akim Demaille <akim@epita.fr>
1426
1427 Don't impose std::string for filenames.
1428
1429 * data/lalr1.cc (b4_filename_type): New.
1430 (position::filename): Use it.
1431 (parser.hh): Move the inclusion of stack.hh and location.hh below
1432 the user code, so that needed headers for the filename type can be
1433 included first.
1434 Forward declare them before the user code.
1435 * tests/Makefile.am (check-local, installcheck-local): Pass
1436 TESTSUITEFLAGS to the TESTSUITE.
1437
1438 2004-12-20 Akim Demaille <akim@epita.fr>
1439
1440 Use more STL like names: my_class instead of MyClass.
1441
1442 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
1443 (SemanticStack, SemanticType, StateStack, StateType)
1444 (TokenNumberType, Stack, Slice, Traits, Parser::location)
1445 (Parser::value): Rename as...
1446 (location_stack, location_type, rhs_number_type, semantic_stack)
1447 (semantic_type, state_stack, state_type, token_number_type, stack)
1448 (slice, traits, parser::yylloc, parser::yylval): these.
1449
1450 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
1451
1452 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
1453
1454 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
1455 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
1456
1457 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
1458
1459 Remove uses of 'short int' and 'unsigned short int'. This raises
1460 some arbitrary limits. It uses more memory but nowadays that's
1461 not much of an issue.
1462
1463 This change does not affect the generated parsers; that's a different
1464 task, as some users will want to conserve memory there.
1465
1466 Ideally we should use size_t to represent all object counts, and
1467 something like ptrdiff_t to represent signed differences of object
1468 counts; but that will require more code-cleanup than I have the
1469 time to do right now.
1470
1471 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
1472 Use size_t, not int or short int, to count objects.
1473 * src/closure.c (nritemset, closure): Likewise.
1474 * src/closure.h (nritemset, closure): Likewise.
1475 * src/nullable.c (nullable_compute): Likewise.
1476 * src/print.c (print_core): Likewise.
1477 * src/print_graph.c (print_core): Likewise.
1478 * src/state.c (state_compare, state_hash): Likewise.
1479 * src/state.h (struct state): Likewise.
1480 * src/tables.c (default_goto, goto_actions): Likewise.
1481
1482 * src/gram.h (rule_number, rule): Use int, not short int.
1483 * src/output.c (prepare_rules): Likewise.
1484 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
1485 errs, reductions): Likewise.
1486 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
1487 Likewise.
1488 * src/tables.c (vector_number, tally, action_number,
1489 ACTION_NUMBER_MINIMUM): Likewise.
1490 * src/output.c (muscle_insert_short_int_table): Remove.
1491
1492 2004-12-17 Akim Demaille <akim@epita.fr>
1493
1494 * data/lalr1.cc: Extensive Doxygenation.
1495 (error_): Rename as...
1496 (error): this, since it is visible to the user.
1497 Adjust callers.
1498 (Parser::message): Now an automatic variable from...
1499 (Parser::yyreport_syntax_error_): here.
1500 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
1501 Parser::error.
1502 * tests/input.at: Escape $.
1503
1504 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
1505
1506 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
1507 Parenthesize rhs to avoid obscure problems with mistakes like
1508 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
1509 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
1510 b4_rhs_location): Likewise.
1511 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
1512 b4_rhs_location): Likewise.
1513
1514 2004-12-16 Akim Demaille <akim@epita.fr>
1515
1516 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
1517 yacc.c: be sure to stay within yycheck_.
1518 * tests/actions.at: Re-enable C++ tests.
1519
1520 2004-12-16 Akim Demaille <akim@epita.fr>
1521
1522 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
1523 real.
1524
1525 2004-12-16 Akim Demaille <akim@epita.fr>
1526
1527 Use #define to handle the %name-prefix.
1528
1529 * data/glr.c, data/yacc.c: Comment changes.
1530 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
1531 so that one can refer to yylex in the parser file, and have it
1532 renamed, as is the case with other skeletons.
1533
1534 2004-12-16 Akim Demaille <akim@epita.fr>
1535
1536 Move lalr1.cc internals into yy*.
1537
1538 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
1539 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
1540 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
1541 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
1542 (empty_, final_, terror_, errcode_, ntokens_)
1543 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
1544 (looka_, ilooka_, error_range_, nerrs_):
1545 Rename as...
1546 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
1547 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
1548 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
1549 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
1550 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
1551 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
1552 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
1553 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
1554 these.
1555
1556 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
1557
1558 Fix some problems reported by twlevo at xs4all.
1559 * src/symtab.c (symbol_new): Report an error if the input grammar
1560 contains too many symbols. This is better than calling abort() later.
1561 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
1562 (struct node, struct graph):
1563 Rename member expand to stretch. All uses changed.
1564 (struct graph): Remove member layoutalgorithm. All uses removed.
1565 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
1566 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
1567 All uses changed.
1568 (N_STRETCH): Rename from N_EXPAND. All uses changed.
1569
1570 2004-12-15 Akim Demaille <akim@epita.fr>
1571
1572 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
1573 Add more Doxygen comments.
1574 (symprint_, stack_print_, reduce_print_, destruct_, pop)
1575 (report_syntax_error_, translate_): Rename as...
1576 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
1577 (yypop_, yyreport_syntax_error_, yytranslate_): this.
1578
1579 2004-12-15 Akim Demaille <akim@epita.fr>
1580
1581 * data/lalr1.cc (lex_): Rename as...
1582 (yylex_): this.
1583 Move the trace here.
1584 Take the %name-prefix into account.
1585 Reported by Alexandre Duret-Lutz.
1586
1587 2004-12-15 Akim Demaille <akim@epita.fr>
1588
1589 Simplify the C++ parser constructor.
1590
1591 * data/lalr1.cc (debug_): Rename as...
1592 (yydebug_): so that the parser's internals are always in the yy*
1593 pseudo namespace.
1594 Adjust uses.
1595 (b4_parse_param_decl): Remove the leading comma as it is now only
1596 called as unique argument list.
1597 (Parser::Parser): Remove the constructor accepting a location and
1598 an initial debugging level.
1599 Remove from the other ctor the argument for the debugging level.
1600 (debug_level_type, debug_level, set_debug_level): New.
1601
1602 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
1603 constructor calls.
1604
1605 2004-12-15 Akim Demaille <akim@epita.fr>
1606
1607 Remove b4_root related material: failure experiment
1608 (which goal was to allow to derive from a class).
1609
1610 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
1611 definitions and uses.
1612
1613 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
1614
1615 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
1616 not 2, since it's not portable to subtract 1 from the start of an
1617 array. The new item 0 is never set or used. All uses changed.
1618
1619 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
1620 the default definition of YYLLOC_DEFAULT. Problem reported
1621 by Frank Heckenbach.
1622
1623 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
1624
1625 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
1626 the normal case and one for the error case. Just use the
1627 first one uniformly. Problem reported by Frank Heckenbach.
1628 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
1629 use exactly the same macro in both places.
1630 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
1631 so that the normal-case YYRHSLOC works for the error case too.
1632 All uses changed.
1633 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
1634 (YYLLOC_DEFAULT): Use the same macro as glr.c.
1635 * doc/bison.texinfo (Location Default Action): Don't claim that
1636 we have an array of locations. Use the same macro for both glr
1637 and lalr parsers. Mention YYRHSLOC. Mention what happens when
1638 the index is 0.
1639
1640 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
1641
1642 * HACKING: Update email addresses to send announcements to.
1643
1644 * configure.ac (AC_INIT): Bump version to 1.875f.
1645
1646 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
1647
1648 * NEWS: Version 1.875e.
1649 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
1650
1651 * src/scan-skel.l: Include "complain.h", for "fatal".
1652
1653 * src/relation.h (relation_print, relation_digraph):
1654 Relation sizes are of type relation_node, not size_t (this is
1655 merely a doc fix, since the two types are equivalent).
1656 (relation_transpose): Relation sizes are of type relation_node,
1657 not int.
1658 * src/relation.c: Likewise.
1659 (top, infinity): Now of type relation_node, not int.
1660 (traverse, relation_transpose): Use relation_node, not int.
1661
1662 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
1663 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
1664 (yyparse): Remove unused local introduced in 2004-10-25 patch.
1665
1666 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
1667 specifying whether the test should be skipped. Use it tp
1668 specify that the [%defines %skeleton "lalr1.cc"] tests currently
1669 fail on some hosts, and should be skipped.
1670
1671 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
1672
1673 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
1674 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
1675 unless otherwise specified below.
1676
1677 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
1678 to allocate kernel_base, kernel_items, kernel_size, since
1679 they needn't be initialized to 0.
1680 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
1681 * src/closure.c (new_closure): Likewise, for itemset.
1682 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
1683 * src/lalr.c (set_goto_map): Likewise, for temp_map.
1684 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
1685 (build_relations): Likewise for edge, states1, includes.
1686 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
1687 * src/reader.c (packgram): Likewise, for ritem, rules.
1688 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
1689 * src/relation.c (relation_digraph): Likewise for VERTICES.
1690 (relation_transpose): Likewise for new_R, end_R.
1691 * src/symtab.c (symbols_token_translations_init): Likewise for
1692 token_translations.
1693 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
1694 (token_actions): Likewise for yydefact, actrow, conflrow,
1695 conflict_list.
1696 (save_column): Likewise for froms[symno], tos[symno].
1697 (goto_actions): Likewise for state_count.
1698 (pack_table): Likewise for base, pos, check.
1699 (tables_generate): Likewise for width.
1700
1701 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
1702 for initial core. Just have a separate core, so we needn't worry
1703 about whether kernel_size and kernel_base are initialized.
1704
1705 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
1706 kernel_size, kernel_items): Remove unnecessary initialization.
1707 * src/conflicts.c (conflicts): Likewise.
1708 * src/derives.c (derives): Likewise.
1709 * src/muscle_tablc (muscle_insert): Likewise.
1710 * src/relation.c (relation_digraph): Likewise.
1711 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
1712 conflrow, conflict_table, conflict_list, table, check):
1713 Likewise.
1714
1715 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
1716 This is because all callers pass unsigned int.
1717 * src/closure.h (new_closure): Likewise.
1718
1719 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
1720 (build_relations): Initialize includes[i] in all cases.
1721 * src/reader.c (packgram): Always initialize rules[ruleno].prec
1722 and rules[ruleno].precsym. Initialize members in order.
1723 * src/relation.c (relation_transpose): Always initialize new_R[i]
1724 and end_R[i].
1725 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
1726
1727 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
1728 conflict_list[0] was always 0, but now it isn't initialized.
1729
1730 * src/table.c (table_grow): When conflict_table grew, the grown
1731 area wasn't cleared. Fix this.
1732
1733 * lib/.cvsignore: Add strdup.c, strdup.h.
1734 * m4/.cvsignore: Add strdup.m4.
1735
1736 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
1737
1738 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
1739 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
1740 GOTO_NUMBER_MAXIMUM, since we occasionally compute
1741 ngotos + 1 without checking for overflow.
1742 (build_relations): Use END_NODE, not -1, to denote end of edges.
1743 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
1744 build_relations): Use goto_number, not int, for goto numbers.
1745 * src/tables.c (save_column, default_goto): Likewise.
1746
1747 2004-11-23 Akim Demaille <akim@epita.fr>
1748
1749 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
1750 of #defining from yystype.
1751 Don't typedef yystype, C++ does not need it.
1752 This lets it possible to forward declare it as union.
1753
1754 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
1755
1756 * bootstrap (gnulib_modules): Add extensions.
1757 Problem reported by Jim Meyering.
1758
1759 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
1760
1761 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
1762 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
1763 src/system.h, src/tables.c: XFREE -> free, to accommodate
1764 recent change to gnulib xalloc.h.
1765 Problem reported by Jim Meyering.
1766
1767 2004-11-17 Akim Demaille <akim@epita.fr>
1768
1769 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
1770
1771 2004-10-28 Akim Demaille <akim@epita.fr>,
1772 Alexandre Duret-Lutz <adl@gnu.org>
1773
1774 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
1775 changes.
1776 (YYCDEBUG): Adjust.
1777 Use it instead of cdebug_.
1778 (Parser::debug_stream, Parser::set_debug_stream): New.
1779 (Parser::symprint_): Define cdebug_ for temporary backward
1780 compatibility.
1781 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
1782 debug_stream ().
1783
1784 2004-11-17 Akim Demaille <akim@epita.fr>
1785
1786 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
1787 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
1788 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
1789 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
1790
1791 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
1792
1793 * data/glr.c (yyloc_default): Remove; not used.
1794 Problem reported by Frank Heckenbach.
1795
1796 2004-10-25 Akim Demaille <akim@epita.fr>
1797
1798 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
1799 Introduce another definition to address simple location arrays.
1800 (yyGLRStack): New member: yyerror_range.
1801 (yyrecoverSyntaxError, yyparse): Update it.
1802 (yyrecoverSyntaxError): Use it when shifting the error token to
1803 have an accurate range, equivalent to the one computed by both
1804 yacc.c and lalr1.cc.
1805 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
1806 that column numbers start at column 0, as per GNU Coding
1807 Standards, the others tests, and the doc.
1808 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
1809 Adjust to the above change (first column is 0).
1810 And adjust the location of the "<error>", now covering the whole
1811 line.
1812
1813 2004-10-22 Akim Demaille <akim@epita.fr>
1814 and Paul Eggert <eggert@cs.ucla.edu>
1815
1816 Remove some arbitrary limits on goto numbers and relations.
1817 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
1818 initial values, since they're never used.
1819 (set_goto_map): ngotos is now unsigned, so test for overflow
1820 by seeing whether it wraps around to zero.
1821 * src/lalr.h (goto_number): Now size_t, not short int.
1822 (GOTO_NUMBER_MAXIMUM): Remove.
1823 * src/relation.c (relation_print, traverse, relation_transpose):
1824 Check for END_NODE rather than looking at sign.
1825 * src/relation.h (END_NODE): New macro.
1826 (relation_node): Now size_t, not short int.
1827
1828 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
1829
1830 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
1831 keyword, not an identifier. Problem reported by Baron Schwartz in
1832 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
1833
1834 2004-10-11 Akim Demaille <akim@epita.fr>
1835
1836 * src/symtab.c (symbol_check_alias_consistency): Also check
1837 type names, destructors, and printers.
1838 Reported by Alexandre Duret-Lutz.
1839 Recode the handling of associativity and precedence in terms
1840 of symbol_precedence_set.
1841 Accept no redeclaration at all, not even equal to the previous
1842 value.
1843 (redeclaration): New.
1844 Use it to factor redeclaration complaints.
1845 (symbol_make_alias): Don't set the type of the alias, let
1846 symbol_check_alias_consistency do it as for other features.
1847 * src/symtab.h (symbol): Add new member prec_location, and
1848 type_location.
1849 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
1850 * tests/input.at (Incompatible Aliases): New.
1851
1852 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
1853
1854 .cvsignore fixes to accommodate gnulib changes,
1855 and the practice of naming build directories "_build".
1856 * .cvsignore: Add "_*". Sort.
1857 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
1858 * m4/.cvsignore: Add "*_gl.m4".
1859
1860 2004-10-06 Akim Demaille <akim@epita.fr>
1861
1862 * src/parse-gram.y (add_param): Fix the truncation of trailing
1863 spaces.
1864
1865 2004-10-05 Akim Demaille <akim@epita.fr>
1866
1867 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
1868 whether the reducion was empty or not. This leaves room to
1869 improve the use of YYLLOC_DEFAULT in such a case.
1870 lalr1.cc is still experimental, so changing this is acceptable.
1871 And finally, there are probably not many users who changed the
1872 handling of locations in GLR, so changing is admissible too.
1873
1874 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
1875 empty reduction, set @$ to an empty location ending the previously
1876 stacked symbol.
1877 Adjust uses to make sure the code is triggered on empty
1878 reductions.
1879 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
1880 expected output: empty reductions have empty locations.
1881
1882 2004-09-29 Akim Demaille <akim@epita.fr>
1883
1884 * data/lalr1.cc: Move towards a more standard C++ coding style
1885 for templates: Class < T > -> Class<T>.
1886
1887 2004-09-29 Akim Demaille <akim@epita.fr>
1888
1889 * data/lalr1.cc: Reinstall the former ctor, for sake of
1890 compatibility, but warn it will be removed.
1891 Move towards a more standard C++ coding style (i.e., type *var ->
1892 type* var).
1893
1894 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
1895
1896 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
1897 since it's less likely to work if NULs are involved in the future.
1898
1899 2004-09-27 Akim Demaille <akim@epita.fr>
1900
1901 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
1902
1903 2004-09-27 Akim Demaille <akim@epita.fr>
1904
1905 * data/lalr1.cc (b4_parse_param_decl_1): New.
1906 (b4_parse_param_decl): Use it to have different names between attribute
1907 and argument names.
1908 (b4_cc_constructor_call): Likewise.
1909
1910 2004-09-24 Akim Demaille <akim@epita.fr>
1911
1912 * src/parse-gram.y (add_param): Strip the leading and trailing
1913 blanks from a formal argument declaration.
1914 (YY_LOCATION_PRINT): New.
1915
1916 2004-09-24 Akim Demaille <akim@epita.fr>
1917
1918 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
1919 after the location.
1920
1921 2004-09-24 Akim Demaille <akim@epita.fr>
1922
1923 * doc/bison.texinfo (Table of Symbols): Sort.
1924
1925 2004-09-21 Akim Demaille <akim@epita.fr>
1926
1927 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
1928 the useless parentheses.
1929 Suggested by Paul Eggert.
1930
1931 2004-09-20 Akim Demaille <akim@epita.fr>
1932
1933 Let the initial-action act on the look-ahead, and use it for the
1934 "initial push" (corresponding to an hypothetical beginning-of-file).
1935 And let lalr1.cc honor %initial-action.
1936
1937 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
1938 example.
1939 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
1940 (Parser::Parser): Remove the ctor that used to initialize it.
1941 (Parser::parse): Like in the other skeletons, issue the "starting
1942 parse" message before any action.
1943 Honor %initial-action.
1944 Initialize the stacks with the lookahead.
1945 * data/yacc.c: Let $$ and @$ in %initial-action designate the
1946 look-ahead.
1947 Push them in the stacks.
1948 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
1949
1950 2004-09-20 Akim Demaille <akim@epita.fr>
1951
1952 * doc/bison.texinfo (Initial Action Decl): New.
1953
1954 2004-09-20 Akim Demaille <akim@epita.fr>
1955
1956 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
1957 clearer criterion to define it.
1958 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
1959 When reducing on an empty RHS, use the latest stacked location as
1960 location.
1961 yylloc is not always available.
1962 * data/glr.c: Likewise.
1963 Also, honor initial-actions.
1964
1965 2004-09-20 Akim Demaille <akim@epita.fr>
1966
1967 * data/yacc.c (YY_LOCATION_PRINT): New.
1968 Define when we know YYLTYPE's structure, i.e., when the default
1969 YYLLOC_DEFAULT is used.
1970 * data/c.m4 (b4_yysymprint_generate): Use it.
1971 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
1972 value of the result.
1973 (error_start_): Replace with...
1974 (error_range_): this location array.
1975 This allows to replace code relying on the implementation of
1976 locations by portable code.
1977 * data/yacc.c (yylerrsp): Replace with...
1978 (yyerror_range): this.
1979 Every time a token is popped, update yyerror_range[0], to have an
1980 accurate location for the error token.
1981 * data/glr.c (YY_LOCATION_PRINT): New.
1982 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
1983 deference a pointer.
1984 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
1985 report the location in %printers.
1986
1987 * src/scan-skel.l: Instead of abort, report error messages to ease
1988 understanding skeleton scanning failures.
1989
1990 2004-09-16 Akim Demaille <akim@epita.fr>
1991
1992 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
1993 (iterator, const_iterator): these, to be more in the C++ spirit.
1994 Also, return reverse iterators so that when displaying the stack
1995 we display its bottom first.
1996 (Parser::stack_print_, Parser::reduce_print_): Match the messages
1997 from yacc.c.
1998 We should probably use vector here though.
1999
2000 2004-09-16 Akim Demaille <akim@epita.fr>
2001
2002 Have more complete shift traces.
2003
2004 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
2005 to report Shifts instead of ad hoc YYDPRINTF invocations,
2006 including for the error token.
2007 * data/lalr1.cc (symprint_): Output the location.
2008 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
2009 output the location within the %printer.
2010 Activate GLR tests, at least to make sure they compile properly.
2011 They still don't pass though.
2012 * tests/calc.at: Adjust expect verbose output, since now "Entering
2013 state..." is on a different line than the "Shifting" message.
2014
2015 2004-09-08 Akim Demaille <akim@epita.fr>
2016
2017 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
2018 Bison directive from the Bison file to the invocation of this
2019 macro, so that these directives are passed to
2020 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
2021 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
2022 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
2023 the extra Bison directives instead of the whole series.
2024 Change the grammar so that there are recoverable errors, and
2025 unrecoverable errors. Now we can have the parser give up before
2026 consuming the whole input. As a result we now can observe that
2027 the lookahead is freed when needed.
2028 Change the parser source to parse argv[1] instead of a hard coded
2029 string.
2030 Simplify yylex, and give a value and location to EOF.
2031 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
2032 passed directives already coded in the file.
2033 Add some tests to check the location of "error".
2034 For some tests, the C++ parser is correct, and not yacc.c.
2035 For other tests, they provide different, but unsatisfying, values,
2036 so keep the C++ value so that at least one parser is "correct"
2037 according to the test suite.
2038 (Actions after errors): Remove, this is subsumed by the
2039 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
2040
2041 2004-09-06 Akim Demaille <akim@epita.fr>
2042
2043 * data/lalr1.cc: Adjust the indentation of the labels.
2044 (Parser::pop): New.
2045 Use it.
2046
2047 2004-09-06 Akim Demaille <akim@epita.fr>
2048
2049 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
2050 argument, an informative message.
2051 Call YY_SYMBOL_PRINT.
2052 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
2053 * data/lalr1.cc (destruct_): Likewise.
2054 In addition, no longer depend on b4_yysymprint_generate and
2055 b4_yydestruct_generate to generate these functions, do it "by
2056 hand".
2057
2058 2004-09-03 Akim Demaille <akim@epita.fr>
2059
2060 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
2061 invoked, yydestruct the lookahead.
2062 * tests/calc.at (Calculator $1): Update the expected lengths of
2063 traces: there is an added line for the discarded lookahead.
2064 * doc/bison.texinfo (Destructor Decl): Some rewording.
2065 Define "discarded" symbols.
2066
2067 2004-09-02 Akim Demaille <akim@epita.fr>
2068
2069 * data/lalr1.cc (translate_, destruct_): No reason to be static.
2070
2071 2004-09-02 Akim Demaille <akim@epita.fr>
2072
2073 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
2074 (YYDSYMPRINTF): Rename as...
2075 (YY_SYMBOL_PRINT): this.
2076 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
2077 two.
2078 Use it instead of direct symprint_ calls.
2079 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
2080 one.
2081
2082 2004-09-02 Akim Demaille <akim@epita.fr>
2083
2084 * data/lalr1.cc (b4_yysymprint_generate): New.
2085 (symprint_): New member function, defined when YYDEBUG.
2086 Use it consistently instead of token/nterm debugging output by
2087 hand.
2088 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
2089 %printer calls to use cdebug_ when using lalr1.cc.
2090
2091 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
2092
2093 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
2094 with #ifdef YYDEBUG.
2095
2096 2004-08-26 Akim Demaille <akim@epita.fr>
2097
2098 * doc/bison.texinfo (Implementing Loops): Rename as...
2099 (Implementing Gotos/Loops): this.
2100
2101 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
2102
2103 Adjust to latest gnulib.
2104 * bootstrap (gnulib_modules): Add xalloc-die.
2105 Set LC_ALL=C so that file names sort consistently.
2106 Prefer the gnulib copies of gettext.m4, glibc21.m4,
2107 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
2108 uintmax_t.m4, ulonglong.m4.
2109 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
2110 po.m4 since we are now using _gl.m4 instead.
2111
2112 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
2113
2114 * src/scan-action.l: Remove. Scanning of semantic actions is
2115 handled in scan-gram.l.
2116
2117 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
2118
2119 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
2120
2121 * src/location.h (struct): The file member is a uniqstr.
2122 (equal_boundaries): Use UNIQSTR_EQ for comparison.
2123
2124 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
2125
2126 Fix bug with non-%union parsers that have printers or destructors,
2127 which led to a Bison core dump. Reported by Peter Fales in
2128 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
2129
2130 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
2131 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
2132 not to our own type.
2133 * src/output.c (symbol_destructors_output, symbol_printers_output):
2134 Don't assume %union.
2135 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
2136 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
2137 UNION-FLAG. All callers changed.
2138 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
2139 Use type char, not unsigned int, when declaring an array of char;
2140 this lets us remove a cast.
2141 (Printers and Destructors): Add non-%union test cases.
2142
2143 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
2144
2145 * doc/bison.texinfo: Minor editorial changes, mostly to the new
2146 GLR writeups. E.g., avoid frenchspacing and the future tense,
2147 change "lookahead" to "look-ahead", and change "wrt" to "with
2148 respect to".
2149
2150 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
2151
2152 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
2153 New sections, split off from the GLR Parsers section. Put the new
2154 Simple GLR Parser near the start of the GLR section, for clarity.
2155 Rewrite connective text.
2156
2157 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
2158
2159 * doc/bison.texinfo (Simple GLR Parsers): New section.
2160
2161 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
2162
2163 * NEWS, TODO, doc/bison.texinfo:
2164 Use "look-ahead" instead of "lookahead", to be consistent.
2165 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
2166 while we're fixing "look-ahead".
2167 * src/conflicts.c (shift_set): Renamed from shiftset.
2168 (look_ahead_set): Renamed from lookaheadset.
2169 * src/print.c: Likewise.
2170 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
2171 name for "lookahead".
2172 (report_types, usage): Likewise.
2173 * src/getargs.h (report_look_ahead_tokens): Renamed from
2174 report_lookaheads.
2175 * src/lalr.c (compute_look_ahead_tokens): Renamed from
2176 compute_lookaheads.
2177 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
2178 (look_ahead_tokens_print): Renamed from lookaheads_print.
2179 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
2180 state_rule_lookaheads_print.
2181 * src/state.h: Likewise.
2182 (reductions.look_ahead_tokens): Renamed from lookaheads.
2183 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
2184 AT_DATA_LOOKAHEADS_GRAMMAR.
2185
2186 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
2187
2188 * README: Update location of patched M4 distribution.
2189
2190 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
2191
2192 Don't assume the C++ compiler takes the same arguments as the C compiler
2193 (trivial change).
2194 * configure.ac (O0CXXFLAGS): New var.
2195 * tests/atlocal.in (CXXFLAGS): Use it.
2196
2197 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
2198
2199 Fix some "make check" problems with C++ reported by
2200 Albert Chin-A-Young for Tru64 C++ in this thread:
2201 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
2202
2203 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
2204 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
2205 Output to a .cc file for C++, not to a .c file.
2206 * tests/calc.at (AT_CHECK_CALC): Likewise.
2207 * tests/regression.at (AT_CHECK_DANCER): Likewise.
2208 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
2209
2210 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
2211
2212 * tests/calc.at, tests/actions.at: Workaround for SGI
2213 C++ compiler. (trivial change)
2214
2215 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
2216
2217 Spent a few hours checking out which prerequisite versions the
2218 current sources actually require. I went all the way back to
2219 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
2220 a seemingly endless set of combinations of versions more recent
2221 than that. The bottom line is that the current sources require
2222 fairly recent versions of the build tools, and it'll be some work
2223 to change this.
2224 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
2225 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
2226 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
2227 Add comments explaining why those particular versions are
2228 currently needed.
2229
2230 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
2231 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
2232 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
2233
2234 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
2235 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
2236
2237 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
2238
2239 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
2240 0.11.5. Suggested by Bruno Haible.
2241 * bootstrap: Remove gettext version checking.
2242
2243 * doc/bison.texinfo (Decl Summary): Also mention that %union
2244 can depend on prerequisite types. Problem reported by Tim
2245 Van Holder.
2246
2247 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
2248
2249 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
2250 * README-alpha: Don't tell people not to package this.
2251
2252 * bootstrap: Don't assume $(...) works; use `...` instead.
2253 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
2254 gettext better.
2255
2256 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
2257 put into the -d output file, and mention what to do if YYSTYPE is
2258 defined as a macro.
2259
2260 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
2261
2262 Undo change made earlier today: it caused autopoint to not bring
2263 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
2264 autopoint's.
2265
2266 * bootstrap: Check that gettext version matches what's in
2267 configure.ac. Warn users to ignore robots.txt ERROR 404.
2268 * bootstrap: Undo today's earlier change (logged below).
2269 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
2270
2271 The gettext version checking is causing more trouble than it's
2272 curing; remove it. Problem reported by Paul Hilfinger.
2273
2274 * bootstrap: Issue a warning that one can expect a message
2275 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
2276 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
2277
2278 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
2279
2280 Ensure that the C++ compiler used for testing actually works on a
2281 simple test program; if not, skip the C++-related tests. Problem
2282 reported by Vin Shelton in:
2283 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
2284
2285 * m4/cxx.m4: New file.
2286 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
2287 * tests/atlocal.in (BISON_CXX_WORKS): Add.
2288 * tests/local.at (AT_COMPILE_CXX): Use it.
2289
2290 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
2291
2292 * data/glr.c (yylloc): Output this macro even if locations are not
2293 being generated, as the GLR parser needs it even in that case.
2294 Problem reported by Troy A. Johnson
2295 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
2296
2297 * configure.ac (AC_INIT): Update to 1.875e.
2298
2299 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
2300
2301 * NEWS: Version 1.875d.
2302 * configure.ac (AC_INIT): Likewise.
2303 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
2304
2305 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
2306 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
2307 lalr1.cc runs afoul of the first, and the last two are no longer
2308 supported by GCC 3.4.0.
2309 * README: Mention GNU m4 1.4 or later; mention m4 patches.
2310 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
2311
2312 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
2313
2314 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
2315 unsigned int, for compatibility with latest gnulib hash module.
2316 * src/state.c (state_hash, state_hasher): Likewise.
2317 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
2318 * src/uniqstr.c (hash_uniqstr): Likewise.
2319
2320 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
2321
2322 * NEWS: Unescaped newlines are no longer allowed in char & strings.
2323
2324 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
2325 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
2326 character and string literals.
2327 (unexpected_end): New function.
2328 (unexpected_eof): Use it.
2329 (unexpected_newline): New function.
2330 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
2331 actions.
2332
2333 * NEWS: Document %expect-rr.
2334
2335 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
2336 Fix typo by replacing $1 with $option.
2337 Remove more 'intl'-related files.
2338 Don't DEFUN AM_INTL_SUBDIR twice.
2339
2340 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
2341 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
2342 strtoul.c.
2343 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
2344 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
2345 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
2346 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
2347 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
2348 * src/.cvsignore: Add *.output.
2349
2350 * src/parse-gram.y: Put copyright notice inside %{ %} so it
2351 gets copied to the output file.
2352
2353 2004-04-28 Paul Eggert <eggert@twinsun.com>
2354
2355 Get files from the gnulib and po repositories, instead of relying
2356 on them being in our CVS. Upgrade to latest versions of gnulib
2357 and Automake.
2358
2359 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
2360 * bootstrap: Bootstrap from gnulib and po repositories.
2361 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
2362 * README-cvs: Document these changes. Remove version numbers from
2363 mentions of build tools, since they change so often. Mention Flex.
2364
2365 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
2366 (gl_USE_SYSTEM_EXTENSIONS): Add.
2367 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
2368 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
2369 does this for us.
2370 (AC_ISC_POSIX): Remove; we no longer support this
2371 ancient OS, as it gets in the way of latest Autoconf & gnulib.
2372 (AC_HEADER_STDC): Remove: we now assume C89 or better.
2373 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
2374 Do not check for C89 headers, except for locale.h which is used
2375 by the Yacc library and must port to K&R hosts.
2376 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
2377 Do not check for C89 functions, except for setlocale which is
2378 used by the Yacc library.
2379 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
2380 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
2381 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
2382 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
2383 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
2384 AM_GNU_GETTEXT): Remove; now done by:
2385 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
2386 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
2387 for us.
2388
2389 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
2390 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
2391 Define to empty, as gnulib.mk will do the rest for us.
2392 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
2393 for us.
2394 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
2395 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
2396
2397 * src/files.c: Include gnulib's xstrndup.h.
2398
2399 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
2400 (REALLOC): Use xnrealloc, for likewise.
2401 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
2402 (strnlen, memrchr): Remove decls; functions no longer used.
2403 Include <stpcpy.h>.
2404
2405 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
2406 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
2407 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
2408 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
2409 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
2410 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
2411 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
2412 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
2413 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
2414 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
2415 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
2416 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
2417 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
2418 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
2419 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
2420 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
2421 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
2422 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
2423 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
2424 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
2425 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
2426 Remove, as these files are now generated automatically
2427 by bootstrap or automake.
2428
2429 * po/ChangeLog: Remove: all but one entry was a duplicate
2430 of this file, and I moved that 2000-11-02 entry here.
2431
2432 * config/.cvsignore: Add Makefile, depcomp, install-sh.
2433 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
2434 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
2435 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
2436 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
2437 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
2438 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
2439 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
2440 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
2441 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
2442 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
2443 xstrndup.h.
2444 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
2445 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
2446 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
2447 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
2448 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
2449 * src/.cvsignore: Remove *_.c.
2450
2451
2452 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
2453 support it. (The latest stable gzip doesn't.)
2454
2455 2004-04-27 Paul Eggert <eggert@twinsun.com>
2456
2457 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
2458 case, as stos_ is now used by destructors due to the 2004-02-09
2459 change.
2460
2461 Remove more K&R C support.
2462 * lib/libiberty.y (PARAMS): Remove. All uses removed.
2463 * lib/subpipe.c (errno): Remove decl.
2464 Include <stdlib.h> unconditionally.
2465 (EXIT_FAILURE): Remove macro.
2466 * src/complain.c (vfprintf, strerror): Remove.
2467 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
2468 unconditionally.
2469 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
2470 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
2471 (strchr, strspn, memchr): Remove decls.
2472 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
2473 unconditionally. Do not declare perror.
2474 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
2475 unconditionally.
2476
2477 * src/complain.c (_): Remove useless defn, as system.h defines this.
2478
2479 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
2480 with latest obstack.h.
2481 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
2482 to procedure types, as obstack.h now does that for us.
2483 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
2484
2485 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
2486 so that this include file can stand alone.
2487 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
2488 does this now. Include subpipe.h first after config.h, to
2489 test whether it can stand alone.
2490
2491 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
2492 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
2493 unused declaration.
2494
2495 * tests/synclines.at (%union synch line): Put a dummy member in
2496 the union, because empty unions aren't allowed in C. Caught
2497 by GCC 3.4.0.
2498
2499 2004-04-13 Jim Meyering <jim@meyering.net>
2500
2501 * src/conflicts.c (conflicts_print): Correct format string typo:
2502 use `%%' to produce literal `%'. (trivial change)
2503
2504 2004-03-30 Paul Eggert <eggert@twinsun.com>
2505
2506 * src/getargs.c (version): Update copyright year to 2004.
2507
2508 * data/c.m4 (b4_int_type): Use 'short int' rather than
2509 'short', and similarly for 'long', 'unsigned', etc.
2510 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
2511 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
2512 yy_yypstack, yydumpstack): Likewise.
2513 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
2514 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
2515 Likewise.
2516 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
2517 yy_stack_print, yyparse): Likewise.
2518 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
2519 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
2520 * lib/bitset.c (bitset_print): Likewise.
2521 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
2522 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
2523 * lib/bitsetv.c (bitsetv_dump): Likewise.
2524 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
2525 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
2526 Likewise.
2527 * src/LR0.c (allocate_itemsets): Likewise.
2528 * src/gram.h (rule_number, rule): Likewise.
2529 * src/lalr.h (goto_number): Likewise.
2530 * src/nullable.c (nullable_compute): Likewise.
2531 * src/output.c (prepare_rules): Likewise.
2532 * src/relation.c (relation_print, relation_digraph): Likewise.
2533 * src/relation.h (relation_node): Likewise.
2534 * src/state.h (state_number, transitions, errs, reductions,
2535 struct state): Likewise.
2536 * src/symtab.h (symbol_number, struct symbol): Likewise.
2537 * src/tables.c (vector_number, tally, action_number,
2538 default_goto, goto_actions): Likewise.
2539 * tests/existing.at (GNU Cim Grammar): Likewise.
2540 * tests/regression.at (Web2c Actions): Likewise.
2541
2542 * src/output.c (muscle_insert_short_int_table): Renamed from
2543 muscle_insert_short_table. All uses changed.
2544
2545 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
2546
2547 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
2548 (declaration): Replace expected_conflicts with expected_sr_conflicts.
2549 Add %expect-rr rule.
2550
2551 * src/scan-gram.l: Recognize %expect-rr.
2552
2553 * src/conflicts.h (expected_sr_conflicts): Rename from
2554 expected_conflicts.
2555 (expected_rr_conflicts): Declare.
2556
2557 * src/conflicts.c (expected_sr_conflicts): Rename from
2558 expected_conflicts.
2559 (expected_rr_conflicts): Define.
2560 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
2561 for GLR parsers.
2562 Use expected_sr_conflicts in place of expected_conflicts.
2563 Warn if expected_rr_conflicts used in non-GLR parser.
2564
2565 * doc/bison.texinfo: Add documentation for %expect-rr.
2566
2567 2004-03-08 Paul Eggert <eggert@gnu.org>
2568
2569 Add support for hex token numbers. Suggested by Odd Arild Olsen in
2570 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
2571
2572 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
2573 in lalr1.cc.
2574 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
2575 * src/scan-gram.l (scan_integer): New function.
2576 ({int}): Use it.
2577 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
2578 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
2579 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
2580 Say "long int", not "long", for uniformity with GNU style.
2581
2582 2004-02-25 Paul Eggert <eggert@twinsun.com>
2583
2584 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
2585 compilers. This fixes a problem with Intel's C++ compiler being
2586 chatty, reported by Guido Trentalancia in
2587 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
2588
2589 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
2590
2591 Support %destructor and merge error locations in lalr1.cc.
2592
2593 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
2594 (Parser::stos_): Define unconditionally.
2595 (Parser::destruct_): New method. Generate its body with
2596 b4_yydestruct_generate.
2597 (Parser::error_start_): New attribute.
2598 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
2599 token which are discarded.
2600 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
2601 error_start_ when erroneous token are discarded.
2602 (Parser::parse) <yyerrlab1>: Compute the location of the error
2603 token so that it covers all the discarded tokens.
2604 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
2605 it can be called with `%skeleton "lalr1.cc"', and do that.
2606
2607 2004-02-02 Paul Eggert <eggert@twinsun.com>
2608
2609 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
2610 $(top_srcdir)/lib and ../lib. This fixes a bug reported
2611 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
2612 There's no need to mention top_builddir since Automake does that
2613 for us.
2614 (INCLUDES): Remove, as Automake says it's obsolescent.
2615 Contents migrated into AM_CPPFLAGS as described above.
2616 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
2617
2618 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
2619
2620 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
2621 (yyreportSyntaxError): Handle case where lookahead token is
2622 YYEMPTY.
2623
2624 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2625
2626 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
2627 resulting parsers are compilable with C++.
2628
2629 2003-12-23 Paul Eggert <eggert@twinsun.com>
2630
2631 * config/depcomp, config/install-sh: Sync with Automake 1.8.
2632 * src/output.c (output_skeleton): Rename local var.
2633 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
2634 Bison tokens, as this runs afoul of the 2003-10-07 change that
2635 disallowed NUL bytes in character constants or string literals.
2636
2637 * tests/local.at: Require Autoconf 2.59's Autotest.
2638 * tests/testsuite.at: Don't include local.at, since we now assume
2639 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
2640 including it.
2641 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
2642 multiple inclusion warnings.
2643
2644 2003-12-02 Akim Demaille <akim@epita.fr>
2645
2646 * doc/bison.texinfo (How Can I Reset the Parser): More about start
2647 conditions.
2648 From Bruno Haible.
2649
2650 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
2651
2652 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
2653
2654 2003-10-07 Paul Eggert <eggert@twinsun.com>
2655
2656 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
2657 if testsuite doesn't exist.
2658
2659 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
2660 literals, unfortunately.
2661 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
2662 Complain about NUL bytes in character constants or string literals.
2663
2664 2003-10-05 Paul Eggert <eggert@twinsun.com>
2665
2666 * NEWS: Don't document %no-default-prec, as it's still
2667 too experimental.
2668 * doc/bison.texinfo: Document %no-default-prec only if
2669 the defaultprec flag is set. Normally it's not.
2670
2671 2003-10-04 Paul Eggert <eggert@twinsun.com>
2672
2673 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
2674 non-modifiable lvalue, instead of a modifiable one.
2675 * doc/bison.texinfo (Actions): Document that $$ can
2676 be assigned to. Do not claim that $$ and $N are
2677 array element references: user code should not rely on this.
2678
2679 2003-10-01 Paul Eggert <eggert@twinsun.com>
2680
2681 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
2682 (grammar_declaration): Use it.
2683 * src/scan-gram.l: New token %no-default-prec.
2684 * tests/conflicts.at: Revamp tests to use %no-default-prec.
2685 * NEWS, doc/bison.texinfo: Document the above.
2686
2687 2003-10-01 Akim Demaille <akim@epita.fr>
2688
2689 VCG no longer supports long_straight_phase.
2690
2691 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
2692 * src/print_graph.c (print_graph): Adjust.
2693
2694 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
2695 and Paul Eggert <eggert@twinsun.com>
2696
2697 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
2698 Table of Symbols): Document %default-prec.
2699 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
2700 (grammar_declaration): Set default_prec on %default-prec.
2701 * src/scan-gram.l (%default-prec): New token.
2702 * src/reader.h (default_prec): New flag.
2703 * src/reader.c: Likewise.
2704 (packgram): Handle it.
2705 * tests/conflicts.at (%default-prec without %prec,
2706 %default-prec with %prec, %default-prec 1): New tests.
2707
2708 2003-09-30 Paul Eggert <eggert@twinsun.com>
2709
2710 * tests/testsuite.at: Include local.at, not input.at, fixing
2711 a typo in the 2003-08-25 patch.
2712
2713 2003-08-27 Akim Demaille <akim@epita.fr>
2714
2715 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
2716 GCC warnings.
2717
2718 2003-08-26 Akim Demaille <akim@epita.fr>
2719
2720 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
2721 "<\#" to avoid magic from Gnus when posting parts of this script.
2722
2723 2003-08-26 Akim Demaille <akim@epita.fr>
2724
2725 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
2726 (Parser::parse): here.
2727 Adjust: nerrs and errstatus is now replaced by...
2728 (Parser::nerrs_, Parser::errstatus_): New.
2729
2730 2003-08-25 Akim Demaille <akim@epita.fr>
2731
2732 * config/announce-gen, Makefile.cfg: New.
2733 * Makefile.am: Adjust.
2734 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
2735 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
2736
2737 2003-08-25 Akim Demaille <akim@epita.fr>
2738
2739 When reducing initial empty rules, Bison parser read an initial
2740 location that is not defined. This results in garbage, and that
2741 affects Bison's own parser. Therefore we need (i) to extend Bison
2742 to support a means to initialize this location, and (ii) to use
2743 this CVS Bison to fix CVS Bison's parser.
2744
2745 * src/reader.h, reader.c (epilogue_augment): Remove, replace
2746 with...
2747 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
2748 * src/parse-gram.y: Adjust.
2749 (%initial-action): New.
2750 (%error-verbose): Since we require CVS Bison, there is no reason
2751 not to use it.
2752 * src/scan-gram.l: Adjust.
2753 * src/Makefile.am (YACC): New, to make sure we use our own parser.
2754 * data/yacc.c (yyparse): Use b4_initial_action.
2755
2756 2003-08-25 Akim Demaille <akim@epita.fr>
2757
2758 * doc/bison.texinfo: Don't promote stdout for error messages.
2759
2760 2003-08-25 Akim Demaille <akim@epita.fr>
2761
2762 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
2763 From Alexandre Duret-Lutz.
2764
2765 2003-08-25 Akim Demaille <akim@epita.fr>
2766
2767 Version 1.875c.
2768
2769 2003-08-25 Akim Demaille <akim@epita.fr>
2770
2771 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
2772 Use them.
2773
2774 2003-08-25 Akim Demaille <akim@epita.fr>
2775
2776 * data/lalr1.cc (Parser::reduce_print_): New.
2777 Use it.
2778
2779 2003-08-25 Akim Demaille <akim@epita.fr>
2780
2781 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
2782 error recovery loops. This patch is based on
2783 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
2784 Also, augment the similarity between lalr1.cc and yacc.c.
2785 Note: the locations of error recovery rules are not correct yet.
2786
2787 * data/lalr1.cc: Comment changes to augment the similarity between
2788 lalr1.cc and yacc.c.
2789 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
2790 (yyerrlab1): Remove, but where it used to be (now the bottom part of
2791 yyerrlab), when hitting EOF, pop the whole stack here instead of
2792 merely falling thru the default error handling mechanism.
2793 (yyerrorlab): New label, with the old contents of YYERROR,
2794 plus the following change: pop the stack of rhs corresponding
2795 to the production that invoked YYERROR. That is how Yacc
2796 behaves (required by POSIX).
2797 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
2798 fail.
2799
2800 2003-08-25 Akim Demaille <akim@epita.fr>
2801
2802 Tune local.at so that people can "autom4te -l autotest calc.at -o
2803 calc" for instance, to extract a sub test suite.
2804
2805 * tests/testsuite.at: Move the initialization, Autotest version
2806 requirement, and AT_TESTED invocation into...
2807 * tests/local.at: here.
2808 * tests/testsuite.at: Include it for compatibility with Autoconf
2809 2.57.
2810 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
2811 be ignore.
2812
2813 2003-08-04 Paul Eggert <eggert@twinsun.com>
2814
2815 Rework code slightly to avoid gcc -Wtraditional warnings.
2816 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
2817 The returned value is now stored in *YY0. All callers changed.
2818 * src/output.c (merge_output): Adjust to the above change.
2819
2820 2003-07-26 Paul Eggert <eggert@twinsun.com>
2821
2822 * data/glr.c (YYASSERT): New macro.
2823 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
2824 yyresolveStates, yyprocessOneStack):
2825 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
2826 Derived from a suggestion by Frank Heckenbach.
2827
2828 2003-07-25 Paul Eggert <eggert@twinsun.com>
2829
2830 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
2831 for portability to K&R C (after ansi2knr, presumably). See
2832 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
2833 by Frank Heckenbach, though I have omitted the structure-initialization
2834 part of his glr-knr.diff patch since I recall that the Portable
2835 C Compiler didn't require that change.
2836
2837 Let the user specify how to allocate and free memory.
2838 Derived from a suggestion by Frank Heckenbach in
2839 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
2840 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
2841 All uses of free, malloc, realloc changed to use these macros,
2842 and unnecessary casts removed.
2843 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
2844
2845 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
2846
2847 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
2848 use s.empty() rather than s == "" to test for empty string; see
2849 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
2850 (trivial change)
2851
2852 2003-06-25 Akim Demaille <akim@epita.fr>
2853
2854 * config/depcomp, config/install-sh: Update from masters.
2855
2856 2003-06-20 Paul Eggert <eggert@twinsun.com>
2857
2858 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
2859 and return properly parenthesized result.
2860 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
2861 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
2862 Remove unnecessary parentheses from uses.
2863 * doc/bison.texinfo (Location Default Action): Describe the
2864 conventions for parentheses.
2865
2866 2003-06-19 Paul Eggert <eggert@twinsun.com>
2867
2868 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
2869 yyreportTree): Do not assume that size_t is the same width as int,
2870 when printing sizes. Print sizes using an unsigned format.
2871 Problem reported by Frank Heckenbach in
2872 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
2873
2874 Port to Forte Developer 7 C compiler.
2875 * data/glr.c (struct YYLTYPE): If locations are not being used,
2876 declare a single dummy member, as empty structs do not conform
2877 to the C standard.
2878 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
2879 the Forte Developer 7 C compiler complains that end-of-loop
2880 code is not reached.
2881
2882 2003-06-17 Paul Eggert <eggert@twinsun.com>
2883
2884 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
2885 avoid warnings from picky compilers about redefinition of PARAMS.
2886
2887 2003-06-17 Paul Eggert <eggert@twinsun.com>
2888
2889 Version 1.875b.
2890
2891 * NEWS: Document 1.875b.
2892
2893 * lib/bbitset.h: Do not include config.h; that's the includer's job.
2894 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
2895 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
2896 Don't use 'index' in comments, as it's a builtin fn on some hosts.
2897 * lib/bitset_stats.c: Include gettext.h unconditionally, as
2898 per recent gettext manual's suggestion.
2899 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
2900 Use prototypes, not old-style definitions.
2901 * lib/lbitset.c (lbitset_unused_clear): Likewise.
2902 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
2903 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
2904 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
2905 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
2906 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
2907 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
2908 vbitset_or_and_cmp, vbitset_copy): Likewise.
2909
2910 * lib/libiberty.h: Do not include config.h; that's the includer's job.
2911 Do not include <stdlib.h>.
2912 (PARAMS): Define unconditionally for C89.
2913 (ATTRIBUTE_NORETURN): Remove.
2914 (ATTRIBUTE_UNUSED): Define unconditionally.
2915
2916 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
2917 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
2918 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
2919 * lib/vbitset.c, lib/vbitset.h: New files.
2920 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
2921 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
2922 from libbitset.
2923
2924 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
2925 `How Can I Reset @code{yyparse}', since texinfo does not allow
2926 arbitrary @ in node names.
2927
2928 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
2929 shouldn't be needed according to the gettext 0.12.1 documentation
2930 but which seem to be needed anyway: codeset.m4 glibc21.m4
2931 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
2932 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
2933 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
2934
2935 * lib/.cvsignore: Add stdbool.h.
2936 * m4/.cvsignore: Add nls.m4, po.m4.
2937
2938 Upgrade to CVS gnulib.
2939 * stdbool_.h: File renamed from stdbool.h.in.
2940 * configure.ac (AM_STDBOOL_H): Invoke this instead of
2941 AC_HEADER_STDBOOL.
2942 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
2943 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
2944 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
2945 (MOSTLYCLEANFILES): New var.
2946 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
2947 (stdbool.h): New rule.
2948 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
2949 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
2950 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
2951 m4/quote.m4: Upgrade to today's gnulib.
2952
2953 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
2954 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
2955 the tests right now.
2956 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
2957 yyerror are declared before use; C99 requires this.
2958
2959 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2960
2961 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
2962 first.
2963 (yyrecoverSyntaxError): Correct the logic for setting and testing
2964 yyerrState.
2965 Correct comment on handling EOF.
2966 Allow states with only a default reduction, rather than failing
2967 (I can't quite reconstruct why these were not allowed before).
2968
2969 Fixes to avoid problem that $-N rules in GLR parsers can cause
2970 buffer overruns, corrupting state.
2971
2972 * src/output.c (prepare_rules): Output max_left_semantic_context
2973 definition.
2974 * src/reader.h (max_left_semantic_context): New variable declaration.
2975 * src/scan-gram.l (max_left_semantic_context): Define.
2976 (handle_action_dollar): Update max_left_semantic_context.
2977 * data/glr.c (YYMAXLEFT): New definition.
2978 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
2979 (yyresolveAction): Ditto.
2980
2981 Fixes to problems with location handling in GLR parsers reported by
2982 Frank Heckenbach (2003/06/05).
2983
2984 * data/glr.c (YYLTYPE): Make trivial if locations not used.
2985 (YYRHSLOC): Add parentheses, and define only if locations used.
2986 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
2987 locations not used.
2988 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
2989 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
2990
2991 * tests/cxx-type.at: Exercise location information; update tests
2992 to differentiate output with and without locations.
2993 Remove forward declarations of yylex and yyerror---caused errors
2994 because default YYLTYPE not yet defined.
2995 Change semantic actions to compute strings, rather than printing
2996 them directly (to test proper passing of semantics values). Change
2997 output to prefix notation and update test data and expected results.
2998 (yylex): Track locations.
2999 (stmtMerge): Return value rather than printing, and include arguments
3000 in value.
3001
3002 2003-06-03 Paul Eggert <eggert@twinsun.com>
3003
3004 Avoid warnings generated by GCC 2.95.4 when Bison is
3005 configured with --enable-gcc-warnings.
3006 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
3007 yy::]b4_parser_class_name[::translate_,
3008 yy::Stack::operator[] (unsigned),
3009 yy::Stack::operator[] (unsigned) const,
3010 yy::Slice::operator[] (unsigned),
3011 yy::Slice::operator[] (unsigned) const):
3012 Rename local vars to avoid warnings.
3013 * tests/glr-regression.at (Improper handling of embedded actions
3014 and $-N in GLR parsers): Remove unused local variable from yylex.
3015 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
3016 (void) as arg when not pure, since we now assume C89 when building
3017 Bison. Pacify GCC by using parameter.
3018
3019 2003-06-02 Paul Eggert <eggert@twinsun.com>
3020
3021 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
3022 yy::Location::lines, yy::Location::columns): Rename arguments
3023 to avoid shadowing; this removes a warning generated by GCC 3.3.
3024
3025 2003-06-01 Paul Eggert <eggert@twinsun.com>
3026
3027 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
3028 to g++, as GCC 3.3 complains if you do it.
3029 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
3030 everything that WARNING_CFLAGS has, except omit warnings
3031 not suitable for C++.
3032 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
3033 * tests/atlocal.in (CXXFLAGS): New var.
3034 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
3035
3036 Fix a GLR parser bug I reported in February; see
3037 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
3038 The problem was that GLR parsers did not conform to the C standard,
3039 because actions like { $1 = $2 + $3; } expanded to expressions
3040 that invoked YYFILL in separate subexpressions, and YYFILL assigned
3041 to a local variable. The C standard says that expressions
3042 like (var = f ()) + (var = f ()) have undefined behavior.
3043 Another problem was that GCC sometimes issues warnings that
3044 yyfill and its parameters are unused.
3045
3046 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
3047 as possibly unused.
3048 (yyfill): New function.
3049 (YYFILL): Use it.
3050 (yyuserAction): Change type of yynormal to bool, so that it matches
3051 the new yyfill signature. Mark it as possibly unused.
3052
3053
3054 Follow up on a bug I reported in February, where a Bison-generated
3055 parser can loop. Provide a test case and a fix for yacc.c. I
3056 don't have a fix for lalr1.cc or for glr.c, unfortunately.
3057 The original bug report is in:
3058 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
3059
3060 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
3061 macro's size was becoming unwieldy.
3062 (yyerrlab): Do not discard an empty lookahead symbol, as this
3063 might destroy garbage.
3064 (yyerrorlab): New label, with the old contents of YYERROR,
3065 plus the following change: pop the stack of rhs corresponding
3066 to the production that invoked YYERROR. That is how Yacc
3067 behaves, and POSIX requires this behavior.
3068 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
3069 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
3070 Define 'alarm' to do nothing if unistd.h is not available.
3071 Add a new rule "exp: '-' error;" to test the above change to
3072 data/yacc.c. Use 'alarm' to abort any test taking longer than
3073 10 seconds, as it's probably looping.
3074 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
3075 Also, the new yacc.c generates two fewer diagnostics for an
3076 existing test.
3077
3078 2003-05-24 Paul Eggert <eggert@twinsun.com>
3079
3080 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
3081 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
3082 This fixes a problem reported by John Bowman when the Compaq/HP
3083 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
3084 -ansi -Wall -gall).
3085 * data/yacc.c (union yyalloc): Likewise.
3086 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
3087
3088 Switch from 'int' to 'bool' where that makes sense.
3089
3090 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
3091 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
3092 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
3093 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
3094 Return or accept bool, not int. All callers changed.
3095 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
3096 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
3097 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
3098 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
3099 bitset_or_and_cmp_): Likewise.
3100 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
3101 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
3102 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
3103 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
3104 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
3105 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
3106 bitset_stats_or_and_cmp): Likewise.
3107 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
3108 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
3109 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
3110 ebitset_xor_cmp): Likewise.
3111 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
3112 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
3113 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
3114 lbitset_xor_cmp): Likewise.
3115 * lib/bbitset.h: Include <stdbool.h>.
3116 (struct bitset_vtable): The following members now return bool, not
3117 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
3118 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
3119 or_and_cmp).
3120 * src/conflicts.c (count_rr_conflicts): Likewise.
3121 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
3122 All uses changed.
3123 * lib/ebitset.c (ebitset_obstack_init): Likewise.
3124 * lib/lbitset.c (lbitset_obstack_init): Likewise.
3125 * src/getargs.c (debug_flag, defines_flag, locations_flag,
3126 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
3127 graph_flag): Likewise.
3128 * src/getargs.h (debug_flag, defines_flag, locations_flag,
3129 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
3130 graph_flag): Likewise.
3131 * src/output.c (error_verbose): Likewise.
3132 * src/output.h (error_verbose): Likewise.
3133 * src/reader.c (start_flag, typed): Likewise.
3134 * src/reader.h (typed): Likewise.
3135 * src/getargs.c (LOCATIONS_OPTION): New constant.
3136 (long_options, getargs): Use it.
3137 * src/lalr.c (build_relations): Use bool, not int.
3138 * src/nullable.c (nullable_compute): Likewise.
3139 * src/print.c (print_reductions): Likewise.
3140 * src/tables.c (action_row, pack_vector): Likewise.
3141 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
3142 * src/output.c (prepare): Use it.
3143 * src/output.c (token_definitions_output,
3144 symbol_destructors_output, symbol_destructors_output): Use string,
3145 not boolean integer, to keep track of whether to output separator.
3146 * src/print_graph.c (print_core): Likewise.
3147 * src/state.c (state_rule_lookaheads_print): Likewise.
3148
3149 * config/install-sh: Sync from automake 1.7.5.
3150
3151 2003-05-14 Paul Eggert <eggert@twinsun.com>
3152
3153 * src/parse-gram.y (rules_or_grammar_declaration): Require a
3154 semicolon after a grammar declaration, in the interest of possible
3155 future changes to the Bison input language.
3156 Do not allow a stray semicolon at the start of the grammar.
3157 (rhses.1): Allow one or more semicolons after any rule, including
3158 just before "|" as required by POSIX.
3159 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
3160 grammar.
3161
3162 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
3163
3164 %parse-param support for lalr1.cc.
3165
3166 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
3167 b4_cc_constructor_calls, b4_cc_constructor_call,
3168 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
3169 definitions.
3170 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
3171 parse-param arguments.
3172 (yy::b4_parser_class_name): Declare instance variables to
3173 hold parse-param arguments.
3174 * tests/calc.at: s/value/semantic_value/ because value clashes
3175 with a member of yy::b4_parser_class_name. Adjust C++ code
3176 to handle %parse-param. Enable %parse-param test in C++.
3177
3178 2003-05-12 Paul Eggert <eggert@twinsun.com>
3179
3180 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
3181 English a bit. Fix fclose typo. Change "const char" to "char
3182 const", and use ANSI C rather than K&R for "main". Suggest
3183 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
3184 and suggest yy_switch_to_buffer.
3185
3186 2003-05-05 Paul Eggert <eggert@twinsun.com>
3187
3188 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
3189 C89. This avoids a diagnostic on compilers that define __STDC__
3190 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
3191 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
3192
3193 2003-05-03 Paul Eggert <eggert@twinsun.com>
3194
3195 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
3196 Do not overrun array bounds.
3197 This should fix a bug reported today by Olatunji Oluwabukunmi in
3198 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
3199
3200 2003-04-29 Akim Demaille <akim@epita.fr>
3201
3202 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
3203 * src/getargs.c, src/getargs.h: here, as bool, not int.
3204 (nondeterministic_parser): New.
3205 * src/parse-gram.y, src/scan-gram.l: Support
3206 %nondeterministic-parser.
3207 * src/output.c (prepare): Use nondeterministic_parser instead
3208 of glr_parser where appropriate.
3209 * src/tables.c (conflict_row, action_row, save_row)
3210 (token_actions, token_actions, pack_vector): Ditto.
3211
3212 2003-04-29 Akim Demaille <akim@epita.fr>
3213
3214 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
3215
3216 2003-04-29 Akim Demaille <akim@epita.fr>
3217
3218 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
3219 with %pure-parser and %locations to exercise the patch from Yakov
3220 Markovitch below.
3221
3222 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
3223
3224 * data/yacc.c: (b4_lex_param): Corrected for the case where
3225 %lex-param is provided and %pure-parser isn't.
3226
3227 2003-04-27 Paul Eggert <eggert@twinsun.com>
3228
3229 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
3230 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
3231 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
3232 if it is not defined.
3233 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
3234
3235 2003-04-26 Paul Eggert <eggert@twinsun.com>
3236
3237 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
3238 Declare to be of type suitable for the ninf value itself, not of
3239 type suitable for the corresponding table, since the latter might
3240 be unsigned but the ninf value might be negative. This fixes a
3241 bug reported by Alexandre Duret-Lutz in
3242 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
3243
3244 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
3245 invokes it. We shouldn't invoke it twice because it will attempt
3246 to put error.o in the archive twice. This fixes a glitch reported
3247 by Martin Mokrejs in
3248 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
3249
3250 2003-04-21 Paul Eggert <eggert@twinsun.com>
3251
3252 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
3253 to gnulib.
3254
3255 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
3256
3257 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
3258 Fix obvious typo that results in uncompilable GLR parsers
3259 when both %pure-parser and %locations are used. (trivial change)
3260
3261 2003-04-17 Paul Eggert <eggert@twinsun.com>
3262
3263 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
3264 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
3265 Do not insert the expected token via unput, as this runs afoul
3266 of a POSIX-compatibility bug in flex 2.5.31.
3267 All uses changed to BEGIN the parent state,
3268 since we no longer insert the expected token via unput.
3269 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
3270 that is no longer emitted after the above change.
3271
3272 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
3273 the first one. This change is from Paul Hilfinger, and it fixes
3274 regression reported by Werner Lemberg in
3275 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
3276
3277 (resolve_sr_conflict): Don't invoke state_errs_set
3278 unless one or more tokens have been explicitly made errors.
3279 Otherwise, the above change causes Bison to abort.
3280
3281 * tests/existing.at (GNU pic Grammar): New test case, taken from
3282 Lemberg's email.
3283
3284 2003-03-31 Akim Demaille <akim@epita.fr>
3285
3286 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
3287
3288 2003-03-31 Akim Demaille <akim@epita.fr>
3289
3290 * src/output.c (prepare_symbols): Avoid trailing spaces in the
3291 output.
3292
3293 2003-03-31 Akim Demaille <akim@epita.fr>
3294
3295 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
3296 From Paul Hilfinger.
3297
3298 2003-03-29 Akim Demaille <akim@epita.fr>
3299
3300 * m4/error.m4: Do not put under dynamic conditions some code which
3301 expansion is under static control.
3302
3303 2003-03-29 Akim Demaille <akim@epita.fr>
3304
3305 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
3306
3307 2003-03-29 Akim Demaille <akim@epita.fr>
3308
3309 * doc/bison.texinfo (Strings are Destroyed): New.
3310
3311 2003-03-13 Paul Eggert <eggert@twinsun.com>
3312
3313 * .cvsignore: Add configure.lineno.
3314 * src/.cvsignore: Add yacc.
3315 * tests/.cvsignore: Add testsuite.log.
3316 * doc/fdl.texi: Sync with latest FSF version.
3317
3318 2003-03-12 Paul Eggert <eggert@twinsun.com>
3319
3320 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
3321 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
3322 cursor, instead of leaving it undefined. This fixes a bug
3323 reported by Tim Van Holder in
3324 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
3325 * tests/input.at (Torturing the Scanner): Test the scanner on
3326 an empty input file, which was Tim Van Holder's test case.
3327
3328 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
3329 <sys/resource.h> can be included, include sys/time.h and
3330 sys/times.h first, if available. This works around the SunOS
3331 4.1.4 porting bug reported by Bruce Becker in
3332 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
3333
3334 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
3335 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
3336 AC_HEADER_SYS_WAIT.
3337
3338 Merge changes from gnulib. This was prompted because the CVS
3339 snapshot didn't build on Solaris 7 due to strnlen problems.
3340
3341 These changes need to be merged back into gnulib:
3342 * lib/hash.c: Include <stdbool.h> unconditionally.
3343 * m4/onceonly.m4 (m4_quote): New macro.
3344 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
3345 Quote AC_FOREACH variable-expansions properly.
3346 The 2003-01-03 obstack.h change also needs merging.
3347 {end of changes requiring merging}
3348
3349 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
3350 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
3351 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
3352 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
3353 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
3354 New files, imported from gnulib.
3355 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
3356 above.
3357
3358 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
3359 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
3360 gnulib sources.
3361
3362 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
3363 Add.
3364 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
3365 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
3366 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
3367 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
3368 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
3369 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
3370 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
3371 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
3372 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
3373 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
3374 (jm_PREREQ_ARGMATCH): Remove.
3375 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
3376 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
3377
3378 * src/system.h: Include <stdbool.h> unconditionally.
3379
3380 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
3381 assuming at least C89 in the bitset code for some time now.
3382
3383 2003-03-03 Akim Demaille <akim@epita.fr>
3384
3385 * ro.po: New.
3386
3387 2003-03-02 Akim Demaille <akim@epita.fr>
3388
3389 * doc/bison.texinfo (Table of Symbols): Reactivate the
3390 documentation for %lex-param, and %parse-param.
3391
3392 2003-03-02 Akim Demaille <akim@epita.fr>
3393
3394 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
3395 generate verbose error messages.
3396 Use the number of tokens as an upper bound in yytname, as it
3397 cannot be a non terminal.
3398
3399 2003-03-02 Akim Demaille <akim@epita.fr>
3400
3401 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
3402 message.
3403
3404 2003-03-02 Akim Demaille <akim@epita.fr>
3405
3406 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
3407 Use them to exercise yycheck overrun.
3408 Based on Andrew Suffield's grammar.
3409
3410 2003-03-02 Akim Demaille <akim@epita.fr>
3411
3412 Create tests/local.at for Bison generic testing macros.
3413
3414 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
3415 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
3416 This new file.
3417 * tests/calc.at (AT_CHECK_CALC): Adjust.
3418 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
3419 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
3420 * tests/local.at: here.
3421 (AT_COMPILE_CXX): Tags the tests using it as c++.
3422 Ignore the test if CXX is not functional.
3423
3424 2003-03-01 Paul Eggert <eggert@twinsun.com>
3425
3426 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
3427 not loc->end, since loc->end might contain garbage and this leads
3428 to undefined behavior on some platforms.
3429 (id_loc, token_start): Use (IF_LINTed) initial values that do not
3430 depend on *loc, so that the reader doesn't give the the false
3431 impression that *loc is initialized.
3432 (<INITIAL>"%%"): Do not bother setting code_start, since its value
3433 does not survive the return.
3434
3435 2003-03-01 Akim Demaille <akim@epita.fr>
3436
3437 * src/scan-gram.l (code_start): Always initialize it when entering
3438 into yylex, as SC_EPILOGUE is activated *before* the corresponding
3439 yylex invocation. An alternative would be making it static, but
3440 then it starts with the second %%'s beginning, instead of its end.
3441
3442 2003-02-28 Paul Eggert <eggert@twinsun.com>
3443
3444 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
3445 around a UnixWare 7.1.1 porting bug reported by John Hughes in
3446 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
3447
3448 2003-02-26 Paul Eggert <eggert@twinsun.com>
3449
3450 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
3451 Remove Sequent/Pyramid discussion (nobody uses them any more).
3452 Merge VMS and MS-DOS discussion; these ports may well be dead
3453 but let's keep mentioning them for now. Put <> around email
3454 addresses. Add copyright notice.
3455
3456 2003-02-24 Paul Eggert <eggert@twinsun.com>
3457
3458 * data/glr.c (yy_reduce_print): yylineno -> yylno,
3459 to avoid collision with flex use of yylineno.
3460 Problem reported by Bruce Lilly in
3461 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
3462 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
3463 * data/yacc.c (yy_reduce_print): Likewise.
3464
3465 * config/depcomp: Sync with Automake 1.7.3.
3466
3467 2003-02-21 Akim Demaille <akim@epita.fr>
3468
3469 * data/lalr1.cc: Use temporary variables instead of casts to
3470 change integer types.
3471 Suggested by Paul Eggert.
3472
3473 2003-02-21 Akim Demaille <akim@epita.fr>
3474
3475 * doc/bison.texinfo: Use "location" consistently to refer to @n,
3476 to avoid confusions with lalr1.cc's notion of Position.
3477 Suggested by Paul Eggert.
3478
3479 2003-02-20 Akim Demaille <akim@epita.fr>
3480
3481 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
3482 before initial_columns.
3483 (location.hh): Use consistent variable names when defining the
3484 operator<<.
3485 Use "last" so that we subtract from Positions, not from unsigned.
3486
3487 2003-02-20 Akim Demaille <akim@epita.fr>
3488
3489 * data/lalr1.cc (position.hh): New subfile, including the extended
3490 and Doxygen'ed documentation of class Position.
3491 (location.hh): Use it.
3492 Document a` la Doxygen.
3493 With the help of Benoit Perrot.
3494
3495 2003-02-20 Akim Demaille <akim@epita.fr>
3496
3497 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
3498 AT_YACC_IF.
3499 Redefine AT_YYERROR_SEES_LOC_IF using it.
3500 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
3501 not defined.
3502 Don't use the location in yy::Parser::error_ and
3503 yy::Parser::print_ when not %locations.
3504 Activate more lalr1.cc tests.
3505
3506 2003-02-19 Akim Demaille <akim@epita.fr>
3507
3508 * data/lalr1.cc: When displaying a line number, be sure to make it
3509 an int.
3510
3511 2003-02-19 Akim Demaille <akim@epita.fr>
3512
3513 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
3514 Remove, useless.
3515 (YYABORT, YYACCEPT, YYERROR): New.
3516 * tests/calc.at: Renable the lalr1.cc test.
3517
3518 2003-02-19 Akim Demaille <akim@epita.fr>
3519
3520 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
3521 error recovery, mixing with/without pops and discarding of the
3522 lookahead.
3523 Exercise YYERROR.
3524 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
3525
3526 2003-02-17 Paul Eggert <eggert@twinsun.com>
3527
3528 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
3529 * tests/testsuite.at (AT_COMPILE): Use them.
3530 This fixes the testsuite problem reported by Robert Lentz in
3531 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
3532
3533 2003-02-12 Paul Eggert <eggert@twinsun.com>
3534
3535 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
3536 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
3537 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
3538 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
3539 Check for malloc failure, for consistency with yacc.c.
3540 (yytname_size): Remove, for consistency with yacc.c.
3541
3542 The bug still remains in data/lalr1.cc, as I didn't have time
3543 to fix it there.
3544
3545 2003-02-06 Akim Demaille <akim@epita.fr>
3546
3547 * configure.ac (GXX): Rename as...
3548 (CXX): this, to keep the original Autoconf semantics.
3549 Require 2.57.
3550 * data/lalr1.cc: Fix b4_copyright invocations.
3551 If YYDEBUG is not defined, don't depend upon name_ being defined.
3552 (location.hh): Include string and iostream.
3553 (Position::filename): New member.
3554 (Position::Position ()): New.
3555 (operator<< (Position)): New.
3556 (operator- (Position, int)): New.
3557 (Location::first, Location::last): Rename as...
3558 (Location::begin, Location::end): these, to mock the conventional
3559 iterator names.
3560 (operator<< (Location)): New.
3561 * tests/atlocal.in (CXX): New.
3562 * tests/testsuite.at (AT_COMPILE_CXX): New.
3563 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
3564 locations in a more synthetic way.
3565 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
3566 lalr1.cc is used.
3567 Adjust the C locations to match those from Emacs: first column is
3568 column 0.
3569 Change all the expected results.
3570 Conform to the GCS: simplify the locations when applicable.
3571 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
3572 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
3573 these CPP macros with the m4 macros new defined by...
3574 (AT_CHECK_PUSHDEFS): this, i.e.:
3575 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
3576 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
3577 New macros.
3578 (AT_CHECK_POPDEFS): Undefine them.
3579 (AT_CHECK_CALC_LALR1_CC): New.
3580 Use it for the first lalr1.cc test.
3581
3582 2003-02-04 Akim Demaille <akim@epita.fr>
3583
3584 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
3585 Location as is defined.
3586
3587 2003-02-04 Akim Demaille <akim@epita.fr>
3588
3589 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
3590 name_ being defined.
3591
3592 2003-02-03 Paul Eggert <eggert@twinsun.com>
3593
3594 * src/gram.h (start_symbol): Remove unused decl.
3595
3596 Use more-consistent naming conventions for local vars.
3597
3598 * src/derives.c (derives_compute): Change type of local var from
3599 int to rule_number.
3600 * src/gram.c (grammar_rules_partial_print): Likewise.
3601 * src/print.c (print_core): Likewise.
3602 * src/reduce.c (reduce_grammar_tables): Likewise.
3603
3604 * src/gram.c (grammar_dump): Change name of item_number *
3605 local var from r to rp.
3606 * src/nullable.c (nullable_compute): Likewise.
3607
3608 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
3609
3610 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
3611 for symbol or symbol_number var.
3612 * src/reader.c (grammar_start_symbol_set): Likewise.
3613 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
3614 Likewise.
3615 * src/state.c (transitions_to): Likewise.
3616 * src/state.h: Likewise.
3617 * src/tables.c (symbol_number_to_vector_number): Likewise.
3618
3619 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
3620 char * var.
3621
3622 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
3623 var.
3624
3625 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
3626 var.
3627
3628 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
3629 Use str, not s, for char * var. Use ch, not c, for character var.
3630 Use size for size var.
3631
3632 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
3633 char * var.
3634 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
3635 uniqstr var.
3636 * src/uniqstr.h: Likewise.
3637
3638 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
3639 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
3640 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
3641 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
3642 param to have same name as that of enum, so that we don't use
3643 "s" to stand for a non-state.
3644
3645 2003-02-02 Akim Demaille <akim@epita.fr>
3646
3647 * src/scan-skel.l: Scan more than one inert character per yylex
3648 invocation.
3649
3650 2003-02-01 Paul Eggert <eggert@twinsun.com>
3651
3652 Version 1.875a.
3653
3654 * po/LINGUAS: Add ms.
3655
3656 2003-01-30 Akim Demaille <akim@epita.fr>
3657
3658 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
3659
3660 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3661
3662 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
3663 of $1.
3664
3665 Changes in response to error report by S. Eken: GLR mode does not
3666 handle negative $ indices or $ indices in embedded rules correctly.
3667 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
3668
3669 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
3670 (b4_rhs_location): Ditto.
3671 (yyfill): New function to copy from stack tree into array
3672 incrementally.
3673 (yyuserAction): Modify to allow incremental move of semantic values
3674 to rhs array when in GLR mode.
3675 Define YYFILL to use in user-defined actions to fill semantic array
3676 as needed.
3677 Remove dummy use of yystack, as there is now a guaranteed use.
3678 (yydoAction): Modify to allow incremental move of semantic values
3679 to rhs array when in GLR mode.
3680 (yyresolveAction): Ditto.
3681 (yyglrShiftDefer): Update comment.
3682 (yyresolveStates): Use X == NULL for pointers, not !X.
3683 (yyglrReduce): Ditto.
3684 (yydoAction): Ditto
3685
3686 * tests/glr-regr1.at: Rename to ...
3687 * tests/glr-regression.at: Add new regression test for the problems
3688 described above (adapted from S. Eken).
3689 Update copyright notice.
3690 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
3691 * tests/Makefile.am: Ditto.
3692
3693 2003-01-28 Paul Eggert <eggert@twinsun.com>
3694
3695 * data/lalr1.cc: Do not use @output_header_name@ unless
3696 b4_defines_flag is set. This fixes two bugs reported by
3697 Tim Van Holder in
3698 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
3699 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
3700
3701 2003-01-21 Paul Eggert <eggert@twinsun.com>
3702
3703 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
3704 we don't need to worry about yyerrlab1 being reported as an
3705 "unused label" by non-GCC C compilers. The downside is that if
3706 locations are used then a couple of statements are duplicated each
3707 time YYERROR is invoked, but the upside is that the warnings
3708 should vanish.
3709 (yyerrlab1): Move code to YERROR.
3710 (yyerrlab2): Remove. Change uses back to yyerrlab1.
3711 This reverts some of the 2002-12-27 change.
3712
3713 2003-01-17 Paul Eggert <eggert@twinsun.com>
3714
3715 * src/output.c (symbol_printers_output): Fix typo that led
3716 to core dump. Problem reported by Antonio Rus in
3717 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
3718
3719 2003-01-13 Akim Demaille <akim@epita.fr>,
3720 Quoc Peyrot <chojin@lrde.epita.fr>,
3721 Robert Anisko <anisko_r@lrde.epita.fr>
3722
3723 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
3724 when the stacks contain one element, as the loop would otherwise
3725 free the last state, and then use the top state (the one we just
3726 popped). This means that the initial elements will not be freed
3727 explicitly, as is the case in yacc.c; it is not a problem, as
3728 these elements have fake values.
3729
3730 2003-01-11 Paul Eggert <eggert@twinsun.com>
3731
3732 * NEWS: %expect-violations are now just warnings, reverting
3733 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
3734 bootstrapping problem reported by Matthias Klose; see
3735 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
3736 * src/conflicts.c (conflicts_print): Likewise.
3737 * tests/conflicts.at (%expect not enough, %expect too much,
3738 %expect with reduce conflicts): Likewise.
3739 * doc/bison.texinfo (Expect Decl): Document this. Also mention
3740 that the warning is enabled if the number of conflicts changes
3741 (not necessarily increases).
3742
3743 * src/getargs.c (version): Update copyright year.
3744
3745 2003-01-09 Akim Demaille <akim@epita.fr>
3746
3747 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
3748
3749 2003-01-08 Paul Eggert <eggert@twinsun.com>
3750
3751 * Makefile.maint (WGETFLAGS):
3752 New macro, containing "-C off" to disable proxy caches.
3753 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
3754 (rel-check): Use $(WGET) instead of wget.
3755
3756 2003-01-06 Paul Eggert <eggert@twinsun.com>
3757
3758 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
3759 the GLR paper of Scott, Johnstone and Hussain.
3760
3761 2003-01-04 Paul Eggert <eggert@twinsun.com>
3762
3763 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
3764 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
3765 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
3766 (EXTRA_LIBRARIES): New var, for liby.a.
3767 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
3768 (EXTRA_SCRIPTS): New var, for yacc.
3769
3770 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
3771 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
3772 Problem reported by Nelson H. F. Beebe.
3773
3774 2003-01-03 Paul Eggert <eggert@twinsun.com>
3775
3776 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
3777 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
3778 when compiling Bison 1.875's `bitset bset = obstack_alloc
3779 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
3780
3781 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
3782 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
3783 grow to a huge size with typical invocation.
3784
3785 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
3786 Use the pattern recommended by Autoconf 2.57, except also protect
3787 against double-definition.
3788 * src/system.h: Likewise.
3789 Portability issues reported by Nelson H. F. Beebe.
3790
3791 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
3792 All uses changed. Provide a definition in both C and C++.
3793 (yytrue, yyfalse): Define even if defined (__cplusplus).
3794
3795 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
3796 Reported by Nelson H. F. Beebe.
3797
3798 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
3799
3800 2003-01-02 Paul Eggert <eggert@twinsun.com>
3801
3802 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
3803 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
3804 Bug reported by Nelson H. F. Beebe.
3805
3806 2003-01-01 Paul Eggert <eggert@twinsun.com>
3807
3808 * Version 1.875.
3809
3810 2002-12-30 Paul Eggert <eggert@twinsun.com>
3811
3812 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
3813 Moved here from...
3814 (<INITIAL>","): Here. This causes stray "," to be treated
3815 more uniformly.
3816
3817 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
3818 last brace in braced code when not in Yacc mode, for compatibility
3819 with Bison 1.35. This resurrects the 2001-12-15 patch to
3820 src/reader.c.
3821
3822 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
3823 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
3824
3825 2002-12-28 Paul Eggert <eggert@twinsun.com>
3826
3827 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
3828 that of SYM's type. This fixes Debian bug 168069, reported by
3829 Thomas Olsson.
3830
3831 2002-12-28 Paul Eggert <eggert@twinsun.com>
3832
3833 Version 1.75f.
3834
3835 Switch back to the Yacc style of conflict reports, undoing some
3836 of the 2002-07-30 change.
3837 * doc/bison.texinfo (Understanding): Use Yacc style for
3838 conflict reports. Also, use new way of locating rules.
3839 * src/conflicts.c (conflict_report):
3840 Renamed from conflict_report_yacc, removing the old
3841 'conflict_report'. Translate the entire conflict report at once,
3842 so that we don't assume that "," has the same interpretation in
3843 all languages.
3844 (conflicts_output): Use Yacc-style conflict report for each state,
3845 instead of our more-complicated style.
3846 (conflicts_print): Use Yacc-style conflict report, except print
3847 the input file name when not emulating Yacc.
3848 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
3849 Conflicted Reduction, %expect not enough, %expect too much,
3850 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
3851 * tests/existing.at (GNU Cim Grammar): Likewise.
3852 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
3853
3854 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
3855 fatal): Don't invoke fflush; it's not needed and it might even be
3856 harmful for stdout, as stdout might not be open.
3857 * src/reduce.c (reduce_print): Likewise.
3858
3859 2002-12-27 Paul Eggert <eggert@twinsun.com>
3860
3861 Fix a bug where error locations were not being recorded correctly.
3862 This problem was originally reported by Paul Hilfinger in
3863 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
3864
3865 * data/yacc.c (yyparse): New local var yylerrsp, to record the
3866 top of the location stack's error locations.
3867 (yyerrlab): Set it. When discarding a token, push its location
3868 onto yylerrsp so that we don't lose track of the error's end.
3869 (yyerrlab1): Now is only the target of YYERROR, so that we can
3870 properly record the location of the action that failed. For GCC
3871 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
3872 GCC warning about yyerrlab1 being unused if YYERROR is unused.
3873 (yyerrlab2): New label, which yyerrlab now falls through to.
3874 Compute the error's location by applying YYLLOC_DEFAULT to
3875 the locations of all the symbols that went into the error.
3876 * doc/bison.texinfo (Location Default Action): Mention that
3877 YYLLOC_DEFAULT is also invoked for syntax errors.
3878 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
3879 Error locations include the locations of all the tokens that were
3880 discarded, not just the last token.
3881
3882 2002-12-26 Paul Eggert <eggert@twinsun.com>
3883
3884 * src/files.c: Include quote.h.
3885 (compute_output_file_names): Warn if we detect conflicting
3886 outputs to the same file. This should catch the misunderstanding
3887 exemplified by Debian Bug 165349, reported by Bruce Stephens..
3888
3889 * src/conflicts.c (conflicts_print): If the user specifies
3890 "%expect N", report an error if there are any reduce/reduce
3891 conflicts. This is what the manual says should happen.
3892 This fixes Debian bug 130890, reported by Anthony DeRobertis.
3893 * tests/conflicts.at (%expect with reduce conflicts): New test.
3894
3895 Don't use m4_include on relative file names, as it doesn't work as
3896 desired if there happens to be a file with that name under ".".
3897
3898 * m4sugar/version.m4: Remove; it was included but it wasn't used.
3899 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
3900 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
3901 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
3902 * src/output.c (output_skeleton): Use full path names when
3903 specifying a file to include; don't rely on include path, as
3904 it's unreliable when the working file contains a file with
3905 that name.
3906
3907 2002-12-25 Paul Eggert <eggert@twinsun.com>
3908
3909 Remove obsolete references to bison.simple and bison.hairy.
3910 Problem mentioned by Aubin Mahe in
3911 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
3912 * data/glr.c: Comment fix.
3913 * doc/bison.1: Remove references. Also, mention "yacc".
3914
3915 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
3916 with -g option.
3917
3918 * src/parse-gram.y (declaration): Use enum "report_states" rather
3919 than its numeric value 1.
3920
3921 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
3922 opening a new one. This fixes Debian bug 165349, reported by
3923 Bruce Stephens.
3924
3925 2002-12-24 Paul Eggert <eggert@twinsun.com>
3926
3927 Version 1.75e.
3928
3929 * Makefile.maint (cvs-update): Don't assume that the shell
3930 supports $(...), as Solaris sh doesn't.
3931
3932 * src/parse-gram.y (lloc_default): Remove test for empty
3933 nonterminals at the end, since it didn't change the result.
3934
3935 2002-12-24 Paul Eggert <eggert@twinsun.com>
3936
3937 If the user does not define YYSTYPE as a macro, Bison now declares it
3938 using typedef instead of defining it as a macro. POSIX requires this.
3939 For consistency, YYLTYPE is also declared instead of defined.
3940
3941 %union directives can now have a tag before the `{', e.g., the
3942 directive `%union foo {...}' now generates the C code
3943 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
3944 The default union tag is `YYSTYPE', for compatibility with Solaris 9
3945 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
3946 instead of `yyltype'.
3947
3948 `yystype' and `yyltype' are now obsolescent macros instead of being
3949 typedefs or tags; they are no longer documented and will be
3950 withdrawn in a future release.
3951
3952 * data/glr.c (b4_location_type): Remove.
3953 (YYSTYPE): Renamed from yystype.
3954 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
3955 (struct YYLTYPE): Renamed from struct yyltype.
3956 (YYLTYPE): Renamed from yyltype.
3957 (yyltype, yystype): New (and obsolescent) macros,
3958 for backward compatibility.
3959 * data/yacc.c: Likewise.
3960
3961 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
3962 does not specify a union tag. This is for compatibility with
3963 Solaris 9 yacc.
3964
3965 * src/parse-gram.y (add_param): 2nd arg is now char * not char
3966 const *, since it is now modified by stripping surrounding { }.
3967 (current_braced_code): Remove.
3968 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
3969 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
3970 trailing " {...}". Now of type <chars>.
3971 (grammar_declaration): Adjust to bundled tokens.
3972 (code_content): Remove; stripping is now done by add_param.
3973 (print_token_value): Print contents of bundled tokens.
3974 (token_name): New function.
3975
3976 * src/reader.h (braced_code, current_braced_code): Remove.
3977 (token_name): New decl.
3978
3979 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
3980 token_type, not braced_code code_kind. All uses changed.
3981 (SC_PRE_CODE): New state, for scanning after a keyword that
3982 has (or usually has) an immediately-following braced code.
3983 (token_type): New local var, to keep track of which token type
3984 to return when scanning braced code.
3985 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
3986 <INITIAL>"%parse-param", <INITIAL>"%printer",
3987 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
3988 instead of returning a token type immediately.
3989 (<INITIAL>"{"): Set token type.
3990 (<SC_BRACED_CODE>"}"): Use it.
3991 (handle_action_dollar, handle_action_at): Now returns bool
3992 indicating success. Fail if ! current_rule; this prevents a core dump.
3993 (handle_symbol_code_dollar, handle_symbol_code_at):
3994 Remove; merge body into caller.
3995 (handle_dollar, handle_at): Complain in invalid contexts.
3996
3997 * NEWS, doc/bison.texinfo: Document the above.
3998 * NEWS: Fix years and program names in copyright notice.
3999
4000 2002-12-17 Paul Eggert <eggert@twinsun.com>
4001
4002 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
4003 Reporting, Table of Symbols): Omit mentions of %lex-param and
4004 %parse-param from the documentation for now.
4005
4006 2002-12-15 Paul Eggert <eggert@twinsun.com>
4007
4008 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
4009 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
4010 lookahead symbol, and which sets yychar in parser actions) and it
4011 disagreed with the Bison documentation. Bug
4012 reported by Andrew Walrond.
4013
4014 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
4015 as the caller now does that.
4016 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
4017 (YYEMPTY): Parenthesize right hand side, since others use it.
4018 (yyparse): Don't assume that our generated code is the only code
4019 that sets yychar.
4020
4021 2002-12-13 Paul Eggert <eggert@twinsun.com>
4022
4023 Version 1.75d.
4024
4025 POSIX requires a "yacc" command.
4026 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
4027 (MOSTLYCLEANFILES): Add yacc.
4028 (yacc): New rule.
4029 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
4030 as an alias for bison y.
4031
4032 * po/LINGUAS: Add da.
4033
4034 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
4035 problem with latest <getopt.h>.
4036 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
4037
4038 * doc/fdl.texi: Upgrade to 1.2.
4039 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
4040 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
4041 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
4042 gnulib.
4043 * config/install-sh: Sync with autotools.
4044
4045 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
4046 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
4047 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
4048 locations are requested.
4049 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
4050 locations are requested.
4051
4052 2002-12-12 Paul Eggert <eggert@twinsun.com>
4053
4054 Remove unportable casts and storage allocation tricks.
4055 While we're at it, remove almost all casts, since they
4056 usually aren't needed and are a sign of trouble.
4057
4058 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
4059
4060 * src/derives.c (derives_compute): Do not subtract NTOKENS from
4061 the pointer DSET returned by malloc; this isn't portable.
4062 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
4063 Similarly for DERIVES.
4064 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
4065 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
4066 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
4067
4068 * src/derives.c (derives_compute): Do not bother invoking
4069 int_of_rule_number, since rule numbers are integers.
4070
4071 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
4072 rather than XMALLOC (char, N).
4073
4074 * src/files.c (filename_split): Rewrite to avoid cast.
4075
4076 * src/gram.h (symbol_number_as_item_number,
4077 item_number_as_symbol_number, rule_number_as_item_number,
4078 item_number_as_rule_number):
4079 Now inline functions rather than macros, to avoid casts.
4080 * src/state.h (state_number_as_int): Likewise.
4081 * src/tables.c (state_number_to_vector_number,
4082 symbol_number_to_vector_number): Likewise.
4083
4084 * src/gram.h (int_of_rule_number): Remove; no longer used.
4085
4086 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
4087 since the resulting storage is always stored into.
4088
4089 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
4090 where it's needed.
4091
4092 * src/muscle_tab.c (muscle_m4_output):
4093 Now inline. Return bool, not int.
4094 * src/state.c (state_compare): Likewise.
4095 * src/symtab.c (symbol_check_defined,
4096 symbol_check_alias_consistency, symbol_pack, symbol_translation,
4097 hash_compare_symbol, hash_symbol):
4098 Likewise.
4099 * src/uniqstr.c (uniqstr_print): Likewise.
4100 * src/muscle_tab.c (muscle_m4_output_processor):
4101 New function, to avoid casts.
4102 * src/state.c (state_comparator, stage_hasher): Likewise.
4103 * src/symtab.c (symbol_check_defined_processor,
4104 symbol_check_alias_consistency_processor, symbol_pack_processor,
4105 symbol_translation_processor, hash_symbol_comparator,
4106 hash_symbol_hasher): Likewise.
4107 * src/uniqstr.c (uniqstr_print_processor): Likewise.
4108 * src/muscle_tab.c (muscles_m4_output):
4109 Use new functions instead of casting old functions unportably.
4110 * src/state.c (state_hash_new): Likewise.
4111 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
4112 symbols_token_translations_init):
4113 Likewise.
4114 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
4115
4116 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
4117 var instead of casting to long, to avoid casts.
4118 (prepare_states): Use MALLOC rather than alloca, so that we don't
4119 have to worry about alloca.
4120 * src/state.c (state_hash_lookup): Likewise.
4121
4122 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
4123 local var instead of casting to unsigned char, to avoid casts.
4124
4125 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
4126 STATE_ALLOC): Remove.
4127 (transitions_new, errs_new, reductions_new, state_new): Use malloc
4128 rather than calloc, and use offsetof to avoid allocating slightly
4129 too much storage.
4130 (state_new): Initialize all members.
4131
4132 * src/state.c (state_hash): Use unsigned accumulator, not signed.
4133
4134 * src/symtab.c (symbol_free): Remove; unused.
4135 (symbol_get): Remove cast in lhs of assignment.
4136 (symbols_do): Now static. Accept generic arguments, not
4137 hashing-related ones.
4138
4139 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
4140 (symbol_processor): Remove.
4141 (symbols_do): Remove decl; now static.
4142
4143 * src/system.h (alloca): Remove; decl no longer needed.
4144 (<stddef.h>): Include, for offsetof.
4145 (<inttypes.>, <stdint.h>): Include if available.
4146 (uintptr_t): New type, if system lacks it.
4147 (CALLOC, MALLOC, REALLOC): New macros.
4148 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
4149 new macros.
4150
4151 * src/tables.c (table_size): Now int, to pacify GCC.
4152 (table_grow, table_ninf_remap): Use signed table size.
4153 (save_row): Don't bother initializing locals when not needed.
4154 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
4155 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
4156
4157 * src/vcg.h: Correct misspellings.
4158
4159 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
4160
4161
4162 * src/getargs.c (getargs): Don't assume EOF == -1.
4163
4164 2002-12-09 Paul Eggert <eggert@twinsun.com>
4165
4166 Change identifier spellings to avoid collisions with names
4167 that are reserved by POSIX.
4168
4169 Don't use names ending in _t, since POSIX reserves them.
4170 For consistency, remove _e and _s endings -- they're weren't
4171 needed to remove ambiguity. All uses changed.
4172 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
4173 turn was just renamed from struniq_t.
4174 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
4175 which in turn was just renamed from struniq_processor_t.
4176 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
4177 in turn was renamed from hash_compare_struniq_t.
4178 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
4179 (state_list): Renamed from state_list_t.
4180 * src/assoc.h (assoc): Renamed from assoc_t.
4181 * src/conflicts.c (enum conflict_resolution): Renamed from
4182 enum conflict_resolution_e.
4183 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
4184 (rule_list): Renamed from rule_list_t.
4185 * src/getargs.h (enum trace): Renamed from enum trace_e.
4186 (enum report): Renamed from enum report_e.
4187 * src/gram.h (item_number): Renamed from item_number_t.
4188 (rule_number): Renamed from rule_number_t.
4189 (struct rule_s): Remove the "rule_s" part; not used.
4190 (rule): Renamed from rule_t.
4191 (rule_filter): Renamed from rule_filter_t.
4192 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
4193 (goto_list): Renamed from goto_list_t.
4194 * src/lalr.h (goto_number): Renamed from goto_number_t.
4195 * src/location.h (location): Renamed from location_t.
4196 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
4197 and moved here from:
4198 * src/muscle_tab.h (muscle_entry_t): here.
4199 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
4200 (rule_list): Renamed from rule_list_t.
4201 * src/print_graph.c (static_graph): Renamed from graph.
4202 * src/reader.h (braced_code): Renamed from braced_code_t.
4203 Remove brace_code_e tag.
4204 * src/relation.h (relation_node): Renamed from relation_node_t.
4205 (relation_nodes): Renamed from relation_nodes_t.
4206 (relation): Renamed from relation_t.
4207 * src/state.h (state_number): Renamed from state_number_t.
4208 (struct state): Renamed from struct state_s.
4209 (state): Renamed from state_t.
4210 (transitions): Renamed from transitions_t. Unused (and
4211 misspelled) transtion_s tag removed.
4212 (errs): Renamed from errs_t. Unused errs_s tag removed.
4213 (reductions): Renamed from reductions_t. Unused tag
4214 reductions_s removed.
4215 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
4216 (struct symbol_list): Renamed from struct symbol_list_s.
4217 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
4218 (struct symbol): Renamed from struct symbol_s.
4219 (symbol): Renamed from symbol_t.
4220 * src/tables.c (vector_number): Renamed from vector_number_t.
4221 (action_number): Renamed from action_t.
4222 * src/tables.h (base_number): Renamed from base_t.
4223 * src/vcg.h (enum color): Renamed from enum color_e.
4224 (enum textmode): Renamed from enum textmode_e.
4225 (enum shape): Renamed from enum shape_e.
4226 (struct colorentry): Renamed from struct colorentry_s.
4227 (struct classname): Renamed from struct classname_s.
4228 (struct infoname): Renamed from struct infoname_s.
4229 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
4230 (enum decision): Renamed from enum decision_e.
4231 (enum orientation): Renamed from enum orientation_e.
4232 (enum alignment): Renamed from enum alignment_e.
4233 (enum arrow_mode): Renamed from enum arrow_mode_e.
4234 (enum crossing_type): Renamed from enum crossing_type_e.
4235 (enum view): Renamed from enum view_e.
4236 (struct node): Renamed from struct node_s.
4237 (node): Renamed from node_t.
4238 (enum linestyle): Renamed from enum linestyle_e.
4239 (enum arrowstyle): Renamed from enum arrowstyle_e.
4240 (struct edge): Renamed from struct edge.
4241 (edge): Renamed from edge_t.
4242 (struct graph): Renamed from struct graph_s.
4243 (graph): Renamed from graph_t.
4244 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
4245 Rename value_t -> value.
4246 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
4247 value_t_as_yystype -> value_as_yystype.
4248
4249 Don't include <errno.h> in the mainstream code, since it
4250 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
4251 * lib/get-errno.c, lib/get-errno.h: New files.
4252 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
4253 get-errno.c.
4254 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
4255 * src/output.c (output_skeleton): Likewise.
4256 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
4257 instead of errno.
4258 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
4259 Likewise.
4260 (handle_action_dollar, handle_action_at): Likewise.
4261 * src/system.h: Do not include <errno.h>.
4262 (TAB_EXT): Renamed from EXT_TAB.
4263 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
4264
4265 Avoid str[a-z]*, since <string.h> reserves that name space.
4266 Change all instances of "struniq" in names to "uniqstr", and
4267 likewise for "STRUNIQ" and "UNIQSTR".
4268 * src/uniqstr.c: Renamed from src/struniq.c.
4269 * src/uniqstr.h: Renamed from src/struniq.h.
4270 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
4271 * src/files.c (strsuffix): Remove; unused.
4272 (concat2): Renamed from stringappend. Now static.
4273 * src/files.h (strsuffix, stringappend): Remove; unused.
4274 * src/parse-gram.y (<chars>): Renamed from <string>.
4275 (<uniqstr>): Renamed from <struniq>.
4276 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
4277 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
4278 (struct graph_s.expand): Renamed from struct graph_s.stretch.
4279 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
4280 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
4281 (N_EXPAND): Renamed from N_STRETCH.
4282
4283 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
4284 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
4285 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
4286 Remove; unused.
4287 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
4288 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
4289 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
4290 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
4291 (BASE_MAXIMUM): Renamed from BASE_MAX.
4292 (BASE_MINIMUM): Renamed from BASE_MIN.
4293 (ACTION_MAX): Remove; unused.
4294 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
4295 Unnecessary casts removed from above defines.
4296
4297
4298 Fix misspelling in names.
4299 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
4300 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
4301 G_NODE_ALIGNEMENT.
4302
4303
4304 * lib/timevar.c (timevar_report): Renamed from time_report,
4305 for consistency with other names.
4306 * lib/timevar.h (timevar_report): New decl.
4307 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
4308
4309
4310 Sort include-file uses.
4311
4312 Reorder all include files under src to be in the order "system.h".
4313 then the ../lib include files in angle brackets (alphabetized),
4314 then the . include files in double-quotes (alphabetized). Fix
4315 dependency breakages encountered in this process, as follows:
4316 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
4317 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
4318 * src/state.h: Include "symtab.h".
4319
4320 2002-12-08 Paul Eggert <eggert@twinsun.com>
4321
4322 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
4323 since this causes problems when __file__ contains character
4324 sequences like "@" that are treated specially by src/scan-skel.l.
4325 Instead, just use the file's basename. This fixes the bug
4326 reported by Martin Mokrejs in
4327 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
4328
4329 2002-12-06 Paul Eggert <eggert@twinsun.com>
4330
4331 Add support for rules that do not have trailing semicolons, as
4332 POSIX requires. Improve the quality of locations in Bison
4333 diagnostics.
4334
4335 * src/location.c: Include <quotearg.h>.
4336 (empty_location): Now const.
4337 (location_print): New function. Follow the recommendation of the
4338 GNU Coding Standards for locations that span file boundaries.
4339 * src/location.h: Do not include <quotearg.h>; no longer needed.
4340 (boundary): New type.
4341 (location_t): Use it. This allows locations to span file boundaries.
4342 All member uses changed: file -> start.file or end.file (as needed),
4343 first_line -> start.line, first_column -> start.column,
4344 last_line -> end.line, last_column -> end.column.
4345 (equal_boundaries): New function.
4346 (LOCATION_RESET, LOCATION_STEP): Remove.
4347 (LOCATION_PRINT): Remove. All callers changed to use location_print.
4348 (empty_location): Now const.
4349 (location_print): New decl.
4350 * src/parse-gram.y (lloc_default): New function, which handles
4351 empty locations more accurately.
4352 (YYLLOC_DEFAULT): Use it.
4353 (%token COLON): Remove.
4354 (%token ID_COLON): New token.
4355 (rules): Use it.
4356 (declarations, rules): Remove trailing semicolon.
4357 (declaration, rules_or_grammar_declaration):
4358 Allow empty (";") declaration.
4359 (symbol_def): Remove empty actions; no longer needed.
4360 (rules_or_grammar_declaration): Remove trailing semicolon.
4361 (semi_colon.opt): Remove.
4362 * src/reader.h: Include location.h.
4363 (scanner_cursor): New decl.
4364 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
4365 rolling our own.
4366 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
4367 of *loc.
4368 (STEP): Remove. No longer needed, now that adjust_location does
4369 the work. All uses removed.
4370 (scanner_cursor): New var.
4371 (adjust_location): Renamed from extend_location. It now sets
4372 *loc and adjusts the scanner cursor. All uses changed.
4373 Don't bother testing for CR.
4374 (handle_syncline): Remove location arg; now updates scanner cursor.
4375 All callers changed.
4376 (unexpected_end_of_file): Now accepts start boundary of token or
4377 comment, not location. All callers changed. Update scanner cursor,
4378 not the location.
4379 (SC_AFTER_IDENTIFIER): New state.
4380 (context_state): Renamed from c_context. All uses changed.
4381 (id_loc, code_start, token_start): New local vars.
4382 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
4383 processing of Yacc white space and equivalents here.
4384 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
4385 instead of returning ID immediately, since we need to search for
4386 a subsequent colon.
4387 (<INITIAL>"'", "\""): Save token_start.
4388 (<INITIAL>"%{", "{", "%%"): Save code_start.
4389 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
4390 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
4391 BEGIN context_state at end, not INITIAL.
4392 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
4393 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
4394 Return correct token start.
4395 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
4396 the start of a character, string or multiline comment is found.
4397 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
4398 Reduction): Adjust reported locations to match the more-precise
4399 results now expected.
4400 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
4401 * tests/reduce.at (Useless Rules, Reduced Automaton,
4402 Underivable Rules): Likewise.
4403 * tests/regression.at (Invalid inputs): No longer `expecting ";"
4404 or "|"' now that so many other tokens are allowed by the new grammar.
4405
4406 * src/complain.h (current_file): Remove duplicate decl;
4407 current_file is now owned by files.h.
4408 * src/complain.c, src/scan-gram.l: Include files.h.
4409
4410 2002-12-06 Paul Eggert <eggert@twinsun.com>
4411
4412 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
4413 promotes to int; it might be unsigned int.
4414 * data/yacc.c (yy_reduce_print): Likewise.
4415
4416 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
4417 be #defined in the prologue, not in the Bison declarations.
4418 This fixes Debian Bug 102878, reported by Shaul Karl.
4419
4420 2002-12-02 Paul Eggert <eggert@twinsun.com>
4421
4422 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
4423 * lib/strtoul.c: New file, from gnulib.
4424 This fixes a porting bug reported by Peter Klein in
4425 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
4426
4427 2002-11-30 Paul Eggert <eggert@twinsun.com>
4428
4429 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
4430 and put only a forward declaration in the prologue. This is for
4431 consistency with the other scanner helper functions.
4432
4433 Type clashes now generate warnings, not errors, since it
4434 appears that POSIX may allow some grammars with type clashes.
4435 * src/reader.c (grammar_current_rule_check): Warn about
4436 type clashes instead of complaining.
4437 * tests/input.at (Type Clashes): Expect warnings, not complaints.
4438
4439 Add Yacc library, since POSIX requires it.
4440 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
4441 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
4442 * lib/main.c, lib/yyerror.c: New files.
4443
4444 gram_error can be static; it need not be extern.
4445 * src/reader.h (gram_error): Remove decl.
4446 * src/parse-gram.y (gram_error): Now static. Add static decl.
4447 (print_token_value): Omit parameter names from forward decl,
4448 for consistency.
4449
4450 2002-11-29 Paul Eggert <eggert@twinsun.com>
4451
4452 * doc/bison.texinfo: Emphasize that yylex and yyerror must
4453 be declared before being used. E.g., one should typically
4454 declare them in the prologue. Use GNU coding style in examples.
4455 Put "const" consistently after the type it modifies. Mention
4456 that C99 supports "inline". Mention that yyerror traditionally
4457 returns "int".
4458
4459 %parse-param and %lex-param now take just one argument, the
4460 declaration; the argument name is deduced from the declaration.
4461
4462 * doc/bison.texinfo (Parser Function, Pure Calling, Error
4463 Reporting, Table of Symbols): Document this.
4464 * src/parse-gram.y (add_param): New function.
4465 (COMMA): Remove.
4466 (declaration): Implement new rule for %parse-param and %lex-param.
4467 * src/scan-gram.l: "," now elicits a warning, rather than being
4468 a token; this is more compatible with byacc.
4469 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
4470
4471 2002-11-27 Paul Eggert <eggert@twinsun.com>
4472
4473 Rename identifiers to avoid real and potential collisions.
4474
4475 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
4476 to avoid collision with lex macro described by Bruce Lilly in
4477 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
4478 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
4479 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
4480 * src/parse-gram.y (print_token_value): Renamed from yyprint.
4481 All uses changed.
4482 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
4483 The name "yycontrol" violates the name space rules, and this stuff
4484 wasn't being used anyway.
4485 (input): Remove action; this stuff wasn't being used.
4486 (gram_error): Rename local variable yylloc -> loc.
4487 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
4488 (YY_DECL): Don't use "yy" at start of local variables.
4489 All uses changed, e.g., yylloc -> loc.
4490 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
4491 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
4492 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
4493 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
4494
4495 * src/parse-gram.y (gram_error): loc is now const *.
4496 * src/reader.h (gram_error): Likewise.
4497
4498 2002-11-24 Paul Eggert <eggert@twinsun.com>
4499
4500 Version 1.75c.
4501
4502 * tests/actions.at (Actions after errors): Use an output format
4503 more similar to that of the Printers and Destructors test.
4504 Test the position of the ';' token too.
4505 (Printers and Destructors): Likewise.
4506 (Printers and Destructors: %glr-parser): Remove for now, to avoid
4507 unnecessarily alarming people when the test fails.
4508
4509 * data/yacc.c (yyerrlab1): Move this label down, so that the
4510 parser does not discard the lookahead token if the user code
4511 invokes YYERROR. This change is required for POSIX conformance.
4512
4513 * lib/error.c: Sync with gnulib.
4514
4515 2002-11-22 Paul Eggert <eggert@twinsun.com>
4516
4517 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
4518 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
4519 * lib/xmalloc.c: Likewise.
4520
4521 2002-11-20 Paul Eggert <eggert@twinsun.com>
4522
4523 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
4524
4525 2002-11-20 Paul Eggert <eggert@twinsun.com>
4526
4527 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
4528 should use `if (! x) abort ();' rather than `assert (x);', and
4529 anyway it's one less thing to worry about configuring.
4530
4531 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
4532 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
4533 and replace all instances of assert with abort.
4534 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
4535 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
4536
4537 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
4538 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
4539 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
4540 hash_find_entry, hash_rehash, hash_insert): Likewise.
4541 * src/conflicts.c (resolve_sr_conflict): Likewise.
4542 * src/lalr.c (set_goto_map, map_goto): Likewise.
4543 * src/nullable.c (nullable_compute): Likewise.
4544 * src/output.c (prepare_rules, token_definitions_output): Likewise.
4545 * src/reader.c (packgram, reader): Likewise.
4546 * src/state.c (state_new, state_free, state_transitions_set,
4547 state_reduction_find): Likewise.
4548 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
4549 symbol_pack): Likewise.
4550 * src/tables.c (conflict_row, pack_vector): Likewise.
4551 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
4552 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
4553 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
4554 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
4555
4556 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
4557 (ARGMATCH_CONSTRAINT): New macro.
4558 (ARGMATCH_ASSERT): Use it.
4559
4560 * src/system.h (verify): New macro.
4561 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
4562 rather than assert.
4563 * src/tables.c (tables_generate): Likewise.
4564
4565 * src/struniq.c (struniq_assert): Now returns void, and aborts
4566 if the assertion is false.
4567 (struniq_assert_p): Remove.
4568 * src/struniq.h: Likewise.
4569
4570 2002-11-18 Paul Eggert <eggert@twinsun.com>
4571
4572 * data/glr.c (yygetLRActions): Replace `yyindex' with
4573 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
4574 This fixes the regression with Sun ONE Studio 7 cc that I reported in
4575 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
4576
4577 2002-11-18 Akim Demaille <akim@epita.fr>
4578
4579 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
4580 space.
4581 From Tim Van Holder.
4582
4583 2002-11-17 Paul Eggert <eggert@twinsun.com>
4584
4585 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
4586 to "SyntaxError" for consistency with my 2002-11-15 change.
4587
4588 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
4589 not define to {}, since this breaks the common use of `YYDPRINTF
4590 ((...));' if a single statement is desired (e.g. before `else').
4591 Work around GCC warnings by surrounding corresponding calls with
4592 {} if needed.
4593 (yyhasResolvedValue): Remove unused function.
4594 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
4595 loop body.
4596 (yyreportSyntaxError): Renamed from yyreportParseError.
4597 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
4598 All uses changed.
4599 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
4600 extern when possible. Remove unused initializations.
4601
4602 2002-11-16 Akim Demaille <akim@epita.fr>
4603
4604 Augment the similarity between GLR and LALR traces.
4605
4606 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
4607 (YY_REDUCE_PRINT): New.
4608 (yyparse): Use them.
4609 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
4610 YYDPRINT here.
4611 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
4612 state reached after the reduction/recovery, since...
4613 (yyparse, yyprocessOneStack): Report the state we are entering in.
4614
4615 2002-11-16 Akim Demaille <akim@epita.fr>
4616
4617 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
4618 Add support for --trace=skeleton.
4619 * src/scan-skel.l: %option debug.
4620 Scan strings of non-@ or \n instead of character by character.
4621 (scan_skel): Handle trace_skeleton.
4622 (QPUTS): New.
4623 (@output_parser_name@, @output_header_name@): ``Restore'' their
4624 support (used to be M4 macros).
4625 * data/yacc.c: Quote larger chunks, a la glr.c.
4626 * data/lalr1.cc: Likewise.
4627 The header guards are no longer available, so use some other
4628 string than `YYLSP_NEEDED'.
4629
4630 2002-11-16 Akim Demaille <akim@epita.fr>
4631
4632 Make the ``Printers and Destructors'' test more verbose, taking
4633 `yacc.c''s behavior as (possibly wrong) reference.
4634
4635 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
4636 instead of fprint on stdout.
4637 Set and report the last_line of the symbols.
4638 Consistently display values and locations.
4639
4640 2002-11-16 Paul Eggert <eggert@twinsun.com>
4641
4642 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
4643
4644 2002-11-15 Paul Eggert <eggert@twinsun.com>
4645
4646 * tests/actions.at (Actions after errors): New test case.
4647
4648 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
4649 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
4650 tests/action.at, tests/calc.at, tests/conflicts.at,
4651 tests/cxx-type.at, tests/regression.at:
4652 "parse error" -> "syntax error" for POSIX compatibility.
4653 "parsing stack overflow..." -> "parser stack overflow" so
4654 that code matches Bison documentation.
4655
4656 2002-11-15 Akim Demaille <akim@epita.fr>
4657
4658 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
4659 take two BRACED_CODE, not two string_content.
4660 Free the scanner's obstack when we are done.
4661 (code_content): New.
4662 * tests/calc.at: Adjust.
4663 * doc/bison.texinfo: Adjust.
4664 Also, make sure to include the `,' for these declarations.
4665
4666 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
4667
4668 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
4669 definition; avoids potential autoreconf problems.
4670
4671 2002-11-15 Akim Demaille <akim@epita.fr>
4672
4673 Always check the value returned by yyparse.
4674
4675 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
4676 returned by yyparse.
4677 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
4678 Adjust calls.
4679 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
4680 returned by yyparse.
4681
4682 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4683
4684 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
4685 on input.at test.
4686
4687 2002-11-14 Paul Eggert <eggert@twinsun.com>
4688
4689 * src/output.c (output_skeleton): Call xfopen instead of
4690 duplicating xfopen's body.
4691
4692 Fix bugs reported by Nelson H. F. Beebe in
4693 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
4694
4695 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
4696 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
4697 Group compiler. Instead, use "$CC -E bar.c". Include the .h
4698 file twice in the grammar, as an extra check.
4699
4700 * tests/input.at (Torturing the Scanner): Surround the
4701 backslash-newline tests with "#if 0", to make it less likely that
4702 we'll run into compiler bugs. Bring back solitary \ inside
4703 comment, but add a closing comment to work around HP C bug. Don't
4704 test backslash-newline in C character constant.
4705
4706 2002-11-14 Akim Demaille <akim@epita.fr>
4707
4708 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
4709 status of the compiler.
4710 Calling `exit 1' is no longer needed.
4711 Reported by Nelson H. F. Beebe.
4712
4713 2002-11-14 Akim Demaille <akim@epita.fr>
4714
4715 * tests/atlocal.in (CPPFLAGS): We have config.h.
4716 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
4717 New.
4718 * tests/actions.at, tests/calc.at, tests/conflicts.at,
4719 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
4720 * tests/regression.at, tests/torture.at: Use them for all the
4721 grammars that are to be compiled.
4722 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
4723 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
4724 * doc/bison.texinfo (GLR Parsers): Document `inline'.
4725
4726 2002-11-14 Akim Demaille <akim@epita.fr>
4727
4728 * doc/bison.texinfo: Various formatting changes (alignments in
4729 samples, additional @group/@end group, GCS in samples.
4730 Use @deffn instead of simple @table to define the directives,
4731 macros, variables etc.
4732
4733 2002-11-13 Paul Eggert <eggert@twinsun.com>
4734
4735 Fix some bugs reported by Albert Chin-A-Young in
4736 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
4737
4738 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
4739 -o c"; the HP C compiler chatters during compilation.
4740 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
4741 * tests/headers.at (export YYLTYPE): Likewise.
4742
4743 * tests/input.at (Torturing the Scanner): Remove lines containing
4744 solitary backslashes, as they tickle a bug in the HP C compiler.
4745
4746 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
4747 comments, since they're not portable. Use GNU coding style.
4748
4749 2002-11-13 Akim Demaille <akim@epita.fr>
4750
4751 * data/yacc.c: Leave bigger chunks of quoted text.
4752 (YYDSYMPRINTF): New.
4753 Use it to report symbol activities.
4754 * data/glr.c (YYDSYMPRINTF): New.
4755 Use it.
4756
4757 2002-11-12 Paul Eggert <eggert@twinsun.com>
4758
4759 Version 1.75b.
4760
4761 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
4762 (yyglrReduce): Return yyok, not 0.
4763 This should avoid the enumerated-type warnings reported
4764 by Nelson H. F. Beebe in
4765 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
4766
4767 * lib/bbitset.h (BITSET_INLINE): Remove.
4768 * lib/bitset.h [! BITSET_INLINE]: Remove.
4769 (bitset_set, bitset_reset, bitset_test): Rename local vars
4770 to avoid shadowing warnings by GCC.
4771
4772 * data/glr.c (inline): Remove #define. It's the user's
4773 responsibility to #define it away, just like 'const'.
4774 This fixes one of the bugs reported by Nelson H. F. Beebe in
4775 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
4776
4777 * Makefile.maint (po-check): Scan .l and .y files instead of the
4778 .c and the .h files that they generate. This fixes the bug
4779 reported by Tim Van Holder in:
4780 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
4781 Look for N_ as well as for _. Try to avoid matching #define for
4782 N_ and _.
4783 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
4784 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
4785 * src/scan-gram.l: Revamp regular expressions so that " and '
4786 do not confuse xgettext.
4787
4788 * src/struniq.h (struniq_new): Do not declare the return type
4789 to be 'const'; this violates the C standard.
4790 * src/struniq.c (struniq_new): Likewise.
4791
4792 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
4793
4794 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
4795 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
4796 linker.
4797
4798 2002-11-12 Akim Demaille <akim@epita.fr>
4799
4800 * Makefile.maint: Sync with Autoconf:
4801 (local_updates): New.
4802
4803 2002-11-12 Akim Demaille <akim@epita.fr>
4804
4805 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
4806
4807 2002-11-12 Akim Demaille <akim@epita.fr>
4808
4809 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
4810 locations.
4811
4812 2002-11-12 Akim Demaille <akim@epita.fr>
4813
4814 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
4815 not yyvalue.
4816
4817 2002-11-12 Akim Demaille <akim@epita.fr>
4818
4819 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
4820 Use it to test the GLR parser.
4821
4822 2002-11-12 Akim Demaille <akim@epita.fr>
4823
4824 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
4825 defines it.
4826 * data/glr.c (yystos): New.
4827 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
4828 (YYDSYMPRINT): New.
4829 (yyval): Don't define it, it is handled via M4.
4830 (yyrecoverParseError): Free verbosely the discarded symbols.
4831 * data/yacc.c (yysymprint): Remove, rather...
4832 (b4_yysymprint_generate): invoke.
4833 * data/c.m4 (b4_yysymprint_generate): New.
4834 Accept pointers as arguments, as opposed to the version from
4835 yacc.c.
4836 (b4_yydestruct_generate): Likewise.
4837 * tests/cations.at (Printers and Destructors): Use Bison directives
4838 instead of CPP macros.
4839 Don't rely on internal details.
4840
4841 2002-11-12 Akim Demaille <akim@epita.fr>
4842
4843 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
4844 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
4845 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
4846 it against YYEMPTY and so forth), work on yytoken (i.e., set
4847 it to YYEMPTY etc.).
4848 (yydestruct): Replace with a b4_yydestruct_generate invocation.
4849 (b4_symbol_actions): Remove.
4850 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
4851 for 0, end-of-input.
4852
4853 2002-11-12 Akim Demaille <akim@epita.fr>
4854
4855 * doc/bison.texinfo (Destructor Decl): New.
4856
4857 2002-11-12 Akim Demaille <akim@epita.fr>
4858
4859 * src/tables.c (tables_generate): Use free for pointers that
4860 cannot be NULL, not XFREE.
4861 (pack_vector): Use assert, not fatal, for bound violations.
4862 * src/state.c (state_new): Likewise.
4863 * src/reader.c (reader): Likewise.
4864 * src/lalr.c (set_goto_map): Likewise.
4865 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
4866 the file name.
4867
4868 2002-11-12 Akim Demaille <akim@epita.fr>
4869
4870 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
4871 Restore.
4872 * src/scan-gram.l (last_string): Is global to the file, not to
4873 yylex.
4874 * src/parse-gram.y (input): Don't append the epilogue here,
4875 (epilogue.opt): do it here, and free the scanner's obstack.
4876 * src/reader.c (epilogue_set): Rename as...
4877 (epilogue_augment): this.
4878 * data/c.m4 (b4_epilogue): Defaults to empty.
4879
4880 2002-11-12 Akim Demaille <akim@epita.fr>
4881
4882 * src/getargs.c (long_options): Remove duplicates.
4883 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
4884 Remove.
4885 * doc/bison.rnh: Remove.
4886 * doc/bison.texinfo (VMS Invocation): Remove.
4887
4888 2002-11-12 Akim Demaille <akim@epita.fr>
4889
4890 * src/struniq.h, src/struniq.c (struniq_t): Is const.
4891 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
4892
4893 Use struniq for symbols.
4894
4895 * src/symtab.h (symbol_t): The tag member is a struniq.
4896 (symbol_type_set): Adjust.
4897 * src/symtab.c (symbol_new): Takes a struniq.
4898 (symbol_free): Don't free the tag member.
4899 (hash_compare_symbol_t, hash_symbol_t): Rename as...
4900 (hash_compare_symbol, hash_symbol): these.
4901 Use the fact that tags as struniqs.
4902 (symbol_get): Use struniq_new.
4903 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
4904 Returns a strniq.
4905 * src/reader.h (merger_list, grammar_currentmerge_set): The name
4906 and type members are struniqs.
4907 * src/reader.c (get_merge_function)
4908 (grammar_current_rule_merge_set): Adjust.
4909 (TYPE, current_type): Are struniq.
4910
4911 Use struniq for file names.
4912
4913 * src/files.h, src/files.c (infile): Split into...
4914 (grammar_file, current_file): these.
4915 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
4916 * src/reduce.c (reduce_print): Likewise.
4917 * src/getargs.c (getargs): Likewise.
4918 * src/complain.h, src/complain.c: Likewise.
4919 * src/main.c (main): Call struniqs_new early enough to use it for
4920 file names.
4921 Don't free the input file name.
4922
4923 2002-11-12 Akim Demaille <akim@epita.fr>
4924
4925 * src/symtab.c (symbol_free): Remove dead deactivated code:
4926 type_name are properly removed.
4927 Don't use XFREE to free items that cannot be NULL.
4928 * src/struniq.h, src/struniq.c: New.
4929 * src/main.c (main): Initialize/free struniqs.
4930 * src/parse-gram.y (%union): Add astruniq member.
4931 (yyprint): Adjust.
4932 * src/scan-gram.l (<{tag}>): Return a struniq.
4933 Free the obstack bit that used to store it.
4934 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
4935
4936 2002-11-11 Paul Eggert <eggert@twinsun.com>
4937
4938 Revamp to fix many (but not all) of the C- and M4-related quoting
4939 problems. Among other things, this fixes the Bison bug reported
4940 by Jan Hubicka when processing the Bash grammar; see:
4941 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
4942
4943 Use new @ escapes consistently. Represent brackets with @{ and @}
4944 rather than @<:@ and @:>@, since this works a bit better with dumb
4945 editors like vi. Represent @ with @@, since @ is now consistently
4946 an escape. Use @oline@ and @ofile@ rather than __oline__ and
4947 __ofile__, to avoid unexpected expansions. Similarly, use @output
4948 rather than #output.
4949
4950 * data/c.m4 (b4_copyright): Omit file name from comment, since
4951 the file name could contain "*/".
4952 (b4_synclines_flag): Don't quote the 2nd argument; it should already
4953 be quoted. All uses changed.
4954
4955 * data/glr.c: Use new @ escapes consistently.
4956 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
4957 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
4958 Remove, since they couldn't handle arbitrary characters in file
4959 names.
4960 * data/lalr1.cc: Likewise.
4961 * data/yacc.c: Likewise.
4962
4963 * src/files.c (output_infix): Remove; all uses removed.
4964 * src/files.h: Likewise.
4965
4966 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
4967 mishandled funny characters in file names, and anyway it isn't
4968 needed any more.
4969 * data/yacc.c: Likewise.
4970 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
4971
4972 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
4973 * data/yacc.c: Likewise.
4974
4975 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
4976 strings now.
4977 (muscle_init): Quote filename as a C string.
4978 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
4979 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
4980 * src/output.c (escaped_file_name_output): New function.
4981 (prepare_symbols): Quote tokens for M4.
4982 (prepare): Don't insert output_infix, output_prefix,
4983 output_parser_name, output_header_name; this is now down by scan-skel.
4984 Insert skeleton as a C string.
4985
4986 * src/output.c (user_actions_output, symbol_destructors_output,
4987 symbol_printers_output): Quote filenames for C and M4.
4988 * src/reader.c (prologue_augment, epilogue_set): Likewise.
4989
4990 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
4991 escapes other than \\ and \'; this simplifies the code.
4992 (<SC_STRING>): Likewise, for \\ and \".
4993 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
4994 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
4995 Use new escapes @{ and @} for [ and ].
4996
4997 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
4998 them with auto vars.
4999 Switch to new escape scheme, where @ is the escape character uniformly.
5000 Abort if a stray escape character is found. Avoid unbounded input
5001 buffer when parsing non-escaped text.
5002
5003 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
5004 __oline__, #output, $@, and @{ do not have unintended meanings.
5005
5006 2002-11-09 Paul Eggert <eggert@twinsun.com>
5007
5008 Fix the test failure due to GCC warnings described in
5009 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
5010 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
5011 evaluate to 0 if it's impossible for NINF to be in the respective
5012 table.
5013 (yygetLRActions, yyrecoverParseError): Use them.
5014
5015 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
5016 counted in the token inserted at end of file. Now takes
5017 location_t *, not location_t, so that the location can be
5018 adjusted. All uses changed.
5019
5020 * tests/regression.at (Invalid inputs): Adjust wording in
5021 diagnostic to match the new behavior.
5022
5023 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
5024 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
5025 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
5026 abort ();'. This reduces the runtime of the "Many lookaheads"
5027 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
5028 GCC 3.2.
5029
5030 2002-11-07 Paul Eggert <eggert@twinsun.com>
5031
5032 * src/parse-gram.y (CHARACTER): Remove unused token.
5033 All uses removed.
5034
5035 * src/scan-gram.l: Remove stack option. We no longer use the
5036 stack, since the stack was never deeper than 1; instead, use the
5037 new auto var c_context to record the stacked value.
5038
5039 Remove nounput option. At an unexpected end of file, we now unput
5040 the minimal input necessary to end cleanly; this simplifies the
5041 code.
5042
5043 Avoid unbounded token sizes where this is easy.
5044
5045 (unexpected_end_of_file): New function.
5046 Use it to systematize the error message on unexpected EOF.
5047 (last-string): Now auto, not static.
5048 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
5049 (scanner_last_string_free): Remove; not used.
5050 (percent_percent_count): Move decl to just before use.
5051 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
5052 not the (never otherwised-used) CHARACTER.
5053
5054 2002-11-07 Akim Demaille <akim@epita.fr>
5055
5056 Let yyerror always receive the msg as last argument, so that
5057 yyerror can be variadic.
5058
5059 * data/yacc.c (b4_yyerror_args): New.
5060 Use it when calling yyerror.
5061 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
5062 Use it when calling yyerror.
5063 * doc/bison.texinfo (Error Reporting): Adjust.
5064 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
5065 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
5066
5067 2002-11-06 Akim Demaille <akim@epita.fr>
5068
5069 #line should have quoted strings.
5070 Ideally, this should be done by m4_quotearg.
5071
5072 * src/scan-skel.l: Include quotearg.h.
5073 Quote __ofile__.
5074 * src/output.c (symbol_printers_output)
5075 (symbol_destructors_output): Quote the file name.
5076
5077 2002-11-06 Akim Demaille <akim@epita.fr>
5078
5079 * tests/regression.at (Invalid inputs): Adjust to the recent
5080 messages.
5081
5082 2002-11-06 Akim Demaille <akim@epita.fr>
5083
5084 Restore --no-lines.
5085 Reported by Jim Kent.
5086
5087 * data/c.m4 (b4_syncline): New.
5088 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
5089 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
5090 * src/output.c (user_actions_output): Likewise.
5091 (prepare): Define 'b4_synclines_flag'.
5092 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
5093
5094 2002-11-06 Akim Demaille <akim@epita.fr>
5095
5096 * src/main.c (main): Free `infile'.
5097 * src/scan-gram.l (handle_syncline): New.
5098 Recognize `#line'.
5099 * src/output.c (user_actions_output, symbol_destructors_output)
5100 (symbol_printers_output): Use the location's file name, not
5101 infile.
5102 * src/reader.c (prologue_augment, epilogue_set): Likewise.
5103
5104 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5105
5106 * src/tables.c (matching_state): Don't allow states to match if
5107 either has GLR conflict entries.
5108
5109 2002-11-05 Paul Eggert <eggert@twinsun.com>
5110
5111 * src/scan-gram.l: Use more accurate diagnostics, e.g.
5112 "integer out of range" rather than "invalid value".
5113 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
5114 accordingly.
5115
5116 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
5117 Also, remove one static variable in the scanner.
5118
5119 * src/scan-gram.l (braces_level): Now auto, not static.
5120 Initialize to zero if the compiler is being picky.
5121 (INITIAL): Clear braces_level instead of incrementing it.
5122 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
5123 as POSIX 1003.1-2001 requires.
5124 * src/system.h (IF_LINT): New macro, taken from coreutils.
5125 * configure.ac: Define "lint" if --enable-gcc-warnings.
5126
5127 2002-11-05 Akim Demaille <akim@epita.fr>
5128
5129 * src/scan-gram.l: When it starts with `%', complain about the
5130 whole directive, not just that `invalid character: %'.
5131
5132 2002-11-04 Akim Demaille <akim@epita.fr>
5133
5134 * Makefile.maint: Update from Autoconf.
5135 (update, cvs-update, po-update, do-po-update): New.
5136
5137 2002-11-04 Akim Demaille <akim@epita.fr>
5138
5139 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
5140 and yyerror.
5141 Have yyerror `use' its arguments.
5142 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
5143 returns true when location & yacc & pure & parse-param.
5144 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
5145
5146 2002-11-04 Akim Demaille <akim@epita.fr>
5147
5148 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
5149 clashes.
5150 * src/scan-gram.l: Use [\'] instead of ['] to pacify
5151 font-lock-mode.
5152 Use complain_at.
5153 Use quote, not quote_n since LOCATION_PRINT no longer uses the
5154 slot 0.
5155
5156 2002-11-03 Paul Eggert <eggert@twinsun.com>
5157
5158 * src/reader.c (get_merge_function, grammar_current_rule_check):
5159 Use consistent diagnostics for reporting type name clashes.
5160 Quote the types with <>, for consistency with Yacc.
5161 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
5162
5163 2002-11-03 Akim Demaille <akim@epita.fr>
5164
5165 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
5166 New.
5167 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
5168 (b4_parse_param): Remove.
5169 Use b4_identification.
5170 Propagate b4_pure_args where needed to pass them to yyerror.
5171 * data/glr.m4 (b4_parse_param): Remove.
5172 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
5173 (b4_lpure_formals): New.
5174 Use b4_identification.
5175 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
5176 b4_user_formals and b4_user_args.
5177 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
5178 (yyreportAmbiguity): When using a pure parser, also need
5179 the location, and the parse-params.
5180 Adjust callers.
5181 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
5182 When using a pure parser, also need the parse-params.
5183 Adjust callers.
5184 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
5185 (%pure-parser + %parse-param) LALR and GLR parsers.
5186 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
5187 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
5188 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
5189 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
5190 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
5191 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
5192 * doc/bison.texinfo: Untabify the whole file.
5193 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
5194 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
5195 (Error Reporting): Adjust to these new directives.
5196 Document %error-verbose, deprecate YYERROR_VERBOSE.
5197
5198 2002-11-03 Akim Demaille <akim@epita.fr>
5199
5200 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
5201 AT_CHECK_CALC_GLR invocations to use % directives, instead of
5202 command line options.
5203 * tests/cxx-type.at: Formatting changes.
5204
5205 2002-11-03 Paul Eggert <eggert@twinsun.com>
5206
5207 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
5208 to count columns correctly, and to check for invalid inputs.
5209
5210 Use mbsnwidth to count columns correctly. Account for tabs, too.
5211 Include mbswidth.h.
5212 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
5213 (extend_location): New function.
5214 (YY_LINES): Remove.
5215
5216 Handle CRLF in C code rather than in Lex code.
5217 (YY_INPUT): New macro.
5218 (no_cr_read): New function.
5219
5220 Scan UCNs, even though we don't fully handle them yet.
5221 (convert_ucn_to_byte): New function.
5222
5223 Handle backslash-newline correctly in C code.
5224 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
5225 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
5226 all uses changed.
5227 (tag, splice): New EREs. Do not allow NUL or newline in tags.
5228 Use {splice} wherever C allows backslash-newline.
5229 YY_STEP after space, newline, vertical-tab.
5230 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
5231
5232 (letter, id): Don't assume ASCII; e.g., spell out a-z.
5233
5234 ({int}, handle_action_dollar, handle_action_at): Check for integer
5235 overflow.
5236
5237 (YY_STEP): Omit trailing semicolon, so that it's more like C.
5238
5239 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
5240 as well as \000. Check for UCHAR_MAX, not 255.
5241 Allow \x with an arbitrary positive number of digits, as in C.
5242 Check for overflow here.
5243 Allow \? and UCNs, for compatibility with C.
5244
5245 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
5246 with quote slot used by complain_at.
5247
5248 * tests/input.at: Add tests for backslash-newline, m4 quotes
5249 in symbols, long literals, and funny escapes in strings.
5250
5251 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
5252 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
5253 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
5254 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
5255 * m4/mbswidth.m4: New file, from GNU coreutils.
5256
5257 * doc/bison.texinfo (Grammar Outline): Document // comments.
5258 (Symbols): Document that trigraphs have no special meaning in Bison,
5259 nor is backslash-newline allowed.
5260 (Actions): Document that trigraphs have no special meaning.
5261
5262 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
5263 no longer used.
5264
5265 2002-11-02 Paul Eggert <eggert@twinsun.com>
5266
5267 * src/reader.c: Don't include quote.h; not needed.
5268 (get_merge_function): Reword warning to be consistent with
5269 type clash diagnostic in grammar_current_rule_check.
5270
5271 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
5272 bug in trigraph handling.
5273
5274 * src/output.c (prepare_symbols): When printing token names,
5275 escape "[" as "@<:@" and likewise for "]".
5276
5277 * src/system.h (errno): Remove declaration, as we are now
5278 assuming C89 or better, and C89 guarantees errno.
5279
5280 2002-10-30 Paul Eggert <eggert@twinsun.com>
5281
5282 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
5283 Check for close failures.
5284 * src/files.h (xfclose): Return void, not int, since it always
5285 returned zero.
5286 * src/files.c (xfclose): Likewise. Report I/O error if ferror
5287 indicates one.
5288 * src/output.c (output_skeleton): Use xfclose rather than fclose
5289 and ferror. xfclose now checks ferror.
5290
5291 * data/glr.c (YYLEFTMOST_STATE): Remove.
5292 (yyreportTree): Use a stack-based leftmost state. This avoids
5293 our continuing battles with bogus warnings about initializers.
5294
5295 2002-10-30 Akim Demaille <akim@epita.fr>
5296
5297 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
5298 #if.
5299
5300 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5301
5302 * tests/glr-regr1.at: New test for reported regressions.
5303 * tests/testsuite.at: Add glr-regr1.at test.
5304 * tests/Makefile.am: Add glr-regr1.at test.
5305
5306 2002-10-24 Paul Eggert <eggert@twinsun.com>
5307
5308 Version 1.75a.
5309
5310 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
5311 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
5312 we use malloc. Don't assume 'A' through 'Z' are contiguous.
5313 Don't assume strdup exists; POSIX says its an XSI extension.
5314 Check for buffer overflow on input.
5315
5316 2002-10-24 Akim Demaille <akim@epita.fr>
5317
5318 * src/output.c (output_skeleton): Don't disable M4sugar comments
5319 too soon: it results in comments being expanded.
5320 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
5321 first output.
5322
5323 2002-10-24 Akim Demaille <akim@epita.fr>
5324
5325 * data/yacc.c (m4_int_type): New.
5326 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
5327 char' as only yacc.c wants K&R portability.
5328 * data/glr.c (yysigned_char): Remove.
5329 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
5330 Reported by Quoc Peyrot.
5331
5332 2002-10-23 Paul Eggert <eggert@twinsun.com>
5333
5334 * src/main.c (main): With --trace=time, report times even if a
5335 non-fatal error occurs. Formerly, the times were reported in some
5336 such cases but not in others.
5337 * src/reader.c (reader): Just return if a complaint has been issued,
5338 instead of exiting, so that 'main' can report times.
5339
5340 2002-10-22 Akim Demaille <akim@epita.fr>
5341
5342 * src/system.h: Include sys/types.
5343 Reported by Bert Deknuydt.
5344
5345 2002-10-23 Paul Eggert <eggert@twinsun.com>
5346
5347 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
5348 Suggested by Art Haas.
5349
5350 2002-10-22 Paul Eggert <eggert@twinsun.com>
5351
5352 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
5353 decl; not needed any more.
5354 * src/main.c (main): Use return to exit, undoing yesterday's change.
5355 The last OS that we could find where this wouldn't work is
5356 SunOS 3.5, and that's too old to worry about now.
5357
5358 * data/glr.c (struct yyltype): Define members even when not
5359 doing locations. This is more consistent with yacc.c, and it
5360 works around the following bug reports:
5361 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
5362 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
5363
5364 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
5365 @acronym consistently. Standardize on "Yacc" instead of "YACC",
5366 "Algol" instead of "ALGOL". Give a bit more history about BNF.
5367
5368 2002-10-22 Akim Demaille <akim@epita.fr>
5369
5370 * data/README: New.
5371
5372 2002-10-21 Paul Eggert <eggert@twinsun.com>
5373
5374 Be consistent about 'bool'; the old code used an enum in one
5375 module and an int in another, and this violates the C standard.
5376 * m4/stdbool.m4: New file, from coreutils 4.5.3.
5377 * configure.ac (AC_HEADER_STDBOOL): Add.
5378 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
5379 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
5380 * src/symtab.c (hash_compare_symbol_t): Likewise.
5381 * src/system.h (bool, false, true): Use a definition consistent
5382 with ../lib/hash.c. All uses changed.
5383
5384 * src/complain.c (warning_issued): Renamed from warn_message_count,
5385 so that we needn't worry about integer overflow (!).
5386 Now of type bool. All uses changed.
5387 (complaint_issued): Renamed from complain_message_count; likewise.
5388
5389 * src/main.c (main): Use exit to exit with failure.
5390
5391 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
5392 rather than 1 and 0.
5393 * src/main.c (main): Likewise.
5394 * src/getargs.c (getargs): Likewise.
5395 * src/reader.c (reader): Likewise.
5396
5397 * src/getarg.c (getargs): Remove duplicate code for
5398 "Try `bison --help'".
5399
5400 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
5401 What was that "2" for?
5402
5403 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
5404 * src/getargs.c (usage): Likewise.
5405
5406 * src/getargs.c (getargs): When there are too few operands, report
5407 the last one. When there are too many, report the first extra
5408 one. This is how diffutils does it.
5409
5410 2002-10-20 Paul Eggert <eggert@twinsun.com>
5411
5412 Remove K&R vestiges.
5413 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
5414 * src/complain.c (VA_START): Remove. Assume prototypes.
5415 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
5416 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
5417 fatal): Assume prototypes.
5418 * src/complain.h: Assume prototypes.
5419 * src/system.h (PARAMS): Remove.
5420 Include <limits.h> unconditionally, since it's guaranteeed even
5421 for a freestanding C89 compiler.
5422 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
5423 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
5424
5425 2002-10-20 Akim Demaille <akim@epita.fr>
5426
5427 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
5428 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
5429 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
5430 (yyresolveStates, yyresolveAction, yyresolveStack)
5431 (yyprocessOneStack): Use them.
5432 (yy_reduce_print): New.
5433 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
5434
5435 2002-10-20 Akim Demaille <akim@epita.fr>
5436
5437 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
5438 arguments and output `void'.
5439 (b4_c_function): Rename as...
5440 (b4_c_function_def): this.
5441 (b4_c_function_decl, b4_c_ansi_function_def)
5442 (b4_c_ansi_function_decl): New.
5443 Change the interpretation of the arguments: before `int, foo', now
5444 `int foo, foo'.
5445 * data/yacc.c (yyparse): Prototype and define thanks to these.
5446 Adjust b4_c_function_def uses.
5447 * data/glr.c (yyparse): Likewise, but ANSI only.
5448
5449 2002-10-20 Akim Demaille <akim@epita.fr>
5450
5451 * src/output.c (prepare): Move the definition of `tokens_number',
5452 `nterms_number', `undef_token_number', `user_token_number_max'
5453 to...
5454 (prepare_tokens): Here.
5455 (prepare_tokens): Rename as...
5456 (prepare_symbols): this.
5457 (prepare): Move the definition of `rules_number' to...
5458 (prepare_rules): here.
5459 (prepare): Move the definition of `last', `final_state_number',
5460 `states_number' to...
5461 (prepare_states): here.
5462 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
5463
5464 2002-10-20 Akim Demaille <akim@epita.fr>
5465
5466 * src/tables.h, src/tables.c, src/output.c: Comment changes.
5467
5468 2002-10-20 Akim Demaille <akim@epita.fr>
5469
5470 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
5471 * data/c.m4: here.
5472
5473 2002-10-20 Akim Demaille <akim@epita.fr>
5474
5475 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
5476 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
5477 `pair'.
5478 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
5479 `name' to...
5480 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
5481 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
5482 These.
5483
5484 2002-10-19 Paul Eggert <eggert@twinsun.com>
5485
5486 Do not create a temporary file, as that involves security and
5487 cleanup headaches. Instead, use a pair of pipes.
5488 Derived from a suggestion by Florian Krohm.
5489 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
5490 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
5491 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
5492 (BISON_PREREQ_SUBPIPE): Add.
5493 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
5494 Add subpipe.h, subpipe.c.
5495 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
5496 * po/POTFILES.in: Add lib/subpipe.c.
5497 * src/output.c: Include "subpipe.h".
5498 (m4_invoke): Remove decl.
5499 (scan_skel): New decl.
5500 (output_skeleton): Use pipe rather than temporary file for m4 input.
5501 Check that m4sugar.m4 is readable, to avoid deadlock.
5502 Check for pipe I/O error.
5503 * src/scan-skel.l (readpipe): Remove decl.
5504 (scan_skel): New function, to be used in place of m4_invoke.
5505 Read from stream rather than file.
5506
5507 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
5508 float, as this generates a warning on Solaris 8 + GCC 3.2 with
5509 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
5510 this generates a more-accurate value anyway.
5511
5512 * lib/timevar.c (timervar_accumulate): Rename locals to
5513 avoid confusion with similarly-named more-global.
5514 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
5515
5516 * src/output.c (prepare): Use xstrdup to convert char const *
5517 to char *, to avoid GCC warning.
5518
5519 2002-10-19 Akim Demaille <akim@epita.fr>
5520
5521 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
5522 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
5523 Use them to have `calc.y' ready for %pure-parser.
5524 * data/yacc.c (YYLEX): Pass a yylex return type to
5525 b4_c_function_call.
5526
5527 2002-10-19 Akim Demaille <akim@epita.fr>
5528
5529 Prototype support of %lex-param and %parse-param.
5530
5531 * src/parse-gram.y: Add the definition of the %lex-param and
5532 %parse-param tokens, plus their rules.
5533 Drop the `_' version of %glr-parser.
5534 Add the "," token.
5535 * src/scan-gram.l (INITIAL): Scan them.
5536 * src/muscle_tab.c: Comment changes.
5537 (muscle_insert, muscle_find): Rename `pair' as `probe'.
5538 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
5539 (muscle_entry_s): The `value' member is no longer const.
5540 Adjust all dependencies.
5541 * src/muscle_tab.c (muscle_init): Adjust: use
5542 MUSCLE_INSERT_STRING.
5543 Initialize the obstack earlier.
5544 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
5545 (muscle_pair_list_grow): New.
5546 * data/c.m4 (b4_c_function_call, b4_c_args): New.
5547 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
5548 * tests/calc.at: Use %locations, not --locations.
5549 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
5550
5551 2002-10-19 Akim Demaille <akim@epita.fr>
5552
5553 * src/getargs.c (usage): Take status as argument and exit
5554 accordingly.
5555 Report the traditional `Try ... --help' message when status != 0.
5556 (usage, version): Don't take a FILE * as arg, it is pointless.
5557 (getargs): When there is an incorrect number of arguments, make it
5558 an error, and report it GNUlically thanks to `usage ()'.
5559
5560 2002-10-18 Paul Eggert <eggert@twinsun.com>
5561
5562 * data/glr.c (yyreportParseError): Don't assume that sprintf
5563 yields the length of the printed string, as this is not true
5564 on SunOS 4.1.4. Reported by Peter Klein.
5565
5566 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
5567 * tests/conflicts.at (%nonassoc and eof): Likewise.
5568 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
5569
5570 2002-10-17 Akim Demaille <akim@epita.fr>
5571
5572 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
5573 * src/getargs.c (trace_types, trace_args): Adjust.
5574 * src/reader.c (grammar_current_rule_prec_set)
5575 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
5576 Standardize error messages.
5577 And s/@prec/%prec/!
5578 (reader): Use trace_flag to enable scanner/parser debugging,
5579 instead of an adhoc scheme.
5580 * src/scan-gram.l: Remove trailing debugging code.
5581
5582 2002-10-16 Paul Eggert <eggert@twinsun.com>
5583
5584 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
5585 MUSCLE_TAB_H.
5586
5587 * NEWS: Officially drop support for building Bison with K&R C,
5588 since it didn't work anyway and it's not worth worrying about.
5589 * Makefile.maint (wget_files): Remove ansi2knr.c.
5590 (ansi2knr.c-url_prefix): Remove.
5591 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
5592 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
5593 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
5594
5595 2002-10-15 Paul Eggert <eggert@twinsun.com>
5596
5597 Stop using the "enum_" trick for K&R-style function definitions;
5598 it confused me, and I was the author! Instead, assume that people
5599 who want to use K&R C compilers (when using these modules in GCC,
5600 perhaps?) will run ansi2knr.
5601
5602 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
5603 All uses of "enum_" changed to "enum ".
5604 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
5605 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
5606
5607 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
5608 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
5609 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
5610 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
5611 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
5612 abitset_not, abitset_ones, abitset_or, abitset_or_and,
5613 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
5614 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
5615 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
5616 Use function prototypes; this removes the need for declaring
5617 static functions simply to provide their prototypes.
5618 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
5619 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
5620 bitset_count_, bitset_create, bitset_dump, bitset_first,
5621 bitset_free, bitset_init, bitset_last, bitset_next,
5622 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
5623 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
5624 bitset_print, bitset_release_memory, bitset_toggle_,
5625 bitset_type_choose, bitset_type_get, bitset_type_name_get,
5626 debug_bitset): Likewise.
5627 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
5628 * lib/bitset_stats.c (bitset_log_histogram_print,
5629 bitset_percent_histogram_print, bitset_stats_and,
5630 bitset_stats_and_cmp, bitset_stats_and_or,
5631 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
5632 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
5633 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
5634 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
5635 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
5636 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
5637 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
5638 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
5639 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
5640 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
5641 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
5642 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
5643 bitset_stats_zero): Likewise.
5644 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
5645 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
5646 bitsetv_dump, debug_bitsetv): Likewise.
5647 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
5648 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
5649 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
5650 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
5651 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
5652 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
5653 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
5654 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
5655 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
5656 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
5657 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
5658 Likewise.
5659 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
5660 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
5661 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
5662 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
5663 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
5664 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
5665 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
5666 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
5667 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
5668 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
5669 lbitset_xor_cmp, lbitset_zero): Likewise.
5670
5671 2002-10-14 Akim Demaille <akim@epita.fr>
5672
5673 Version 1.75.
5674
5675 2002-10-14 Akim Demaille <akim@epita.fr>
5676
5677 * tests/Makefile.am (maintainer-check-posix): New.
5678
5679 2002-10-14 Akim Demaille <akim@epita.fr>
5680
5681 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
5682 member.
5683
5684 2002-10-14 Akim Demaille <akim@epita.fr>
5685
5686 * src/tables.c (table_ninf_remap): base -> tab.
5687 Reported by Matt Rosing.
5688
5689 2002-10-14 Paul Eggert <eggert@twinsun.com>
5690
5691 * tests/action.at, tests/calc.at, tests/conflicts.at,
5692 tests/cxx-type.at, tests/headers.at, tests/input.at,
5693 tests/regression.at, tests/synclines.at, tests/torture.at:
5694 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
5695 so that the tests still work even if POSIXLY_CORRECT is set.
5696 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
5697
5698 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
5699 for portability to K&R hosts. Fix typo: signed char is guaranteed
5700 only to 127, not to 128.
5701 * data/glr.c (yysigned_char): New type.
5702 * data/yacc.c (yysigned_char): Likewise.
5703 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
5704
5705 2002-10-13 Paul Eggert <eggert@twinsun.com>
5706
5707 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
5708 true due to limited range of data type" warning from GCC.
5709
5710 * data/c.m4 (b4_token_defines): Protect against double-inclusion
5711 by wrapping enum yytokentype's definition inside #ifndef
5712 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
5713
5714 2002-10-13 Akim Demaille <akim@epita.fr>
5715
5716 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
5717 Un yy- yyrhs to avoid the name clash with the global YYRHS.
5718
5719 2002-10-13 Akim Demaille <akim@epita.fr>
5720
5721 * Makefile.maint: Update from Autoconf 2.54.
5722 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
5723
5724 2002-10-13 Akim Demaille <akim@epita.fr>
5725
5726 * src/print.c (print_state): Separate the list of solved conflicts
5727 from the other items.
5728 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
5729
5730 2002-10-13 Akim Demaille <akim@epita.fr>
5731
5732 Let nondeterministic skeletons be usable with deterministic
5733 tables.
5734
5735 With the patch, GAWK compiled by GCC without -O2 passes its test
5736 suite using a GLR parser driven by LALR tables. It fails with -O2
5737 because `struct stat' gives two different answers on my machine:
5738 88 (definition of an auto var) and later 96 (memset on this var).
5739 Hence the stack is badly corrumpted. The headers inclusion is to
5740 blame: if I move the awk.h inclusion before GLR's system header
5741 inclusion, the two struct stat have the same size.
5742
5743 * src/tables.c (pack_table): Always create conflict_table.
5744 (token_actions): Always create conflict_list.
5745 * data/glr.c (YYFLAG): Remove, unused.
5746
5747 2002-10-13 Akim Demaille <akim@epita.fr>
5748
5749 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
5750 (O0FLAGS): New.
5751 (VALGRIND, GXX): New.
5752 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
5753 * tests/bison.in: Run $PREBISON a pre-command.
5754 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
5755 (maintainer-check-g++): New.
5756 * Makefile.am (maintainer-check): New.
5757
5758 2002-10-13 Akim Demaille <akim@epita.fr>
5759
5760 * data/glr.c: Formatting changes.
5761 Tweak some trace messages to match yacc.c's.
5762
5763 2002-10-13 Akim Demaille <akim@epita.fr>
5764
5765 GLR parsers sometimes raise parse errors instead of performing the
5766 default reduction.
5767 Reported by Charles-Henry de Boysson.
5768
5769 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
5770 check the length of the traces when %glr.
5771 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
5772 GLR's traces.
5773 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
5774 Test GLR parsers.
5775 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
5776 (yyltype): Remove the yy prefix from the member names.
5777 (yytable): Complete its comment.
5778 (yygetLRActions): Map error action number from YYTABLE from
5779 YYTABLE_NINF to 0.
5780 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
5781 (which was a bug: it should have been YYTABEL_NINF, and yet it was
5782 not satisfying as we could compare an YYACTION computed from
5783 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
5784 only value for error actions.
5785 (yyreportParseError): In verbose parse error messages, don't issue
5786 `error' in the list of expected tokens.
5787 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
5788 next action to perform to match glr.c's decoding.
5789 (yytable): Complete its comment.
5790
5791 2002-10-13 Paul Eggert <eggert@twinsun.com>
5792
5793 Fix problem reported by Henrik Grubbstroem in
5794 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
5795 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
5796 because the Bison parser reads the second action before reducing
5797 the first one.
5798 * src/scan-gram.l (rule_length): New static var.
5799 Use it to keep track of the rule length in the scanner, since
5800 we can't expect the parser to be in lock-step sync with the scanner.
5801 (handle_action_dollar, handle_action_at): Use this var.
5802 * tests/actions.at (Exotic Dollars): Test for the problem.
5803
5804 2002-10-12 Paul Eggert <eggert@twinsun.com>
5805
5806 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
5807 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
5808 Include <sys/time.h> when checking for clock_t and struct tms.
5809 Use same include order as source.
5810 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
5811 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
5812
5813 * lib/timevar.c: Update copyright date and clarify comments.
5814 (get_time) [IN_GCC]: Keep the GCC version for reference.
5815
5816 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
5817 GCC version as of today, then merge Bison's changes.
5818 Change "GCC" to "Bison" in copyright notice. timevar.def's
5819 author is Akim, so change that too.
5820
5821 * src/reader.c (grammar_current_rule_check):
5822 Don't worry about the default action if $$ is untyped.
5823 Prevents bogus warnings reported by Jim Gifford in
5824 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
5825
5826 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
5827 * data/glr.c, data/lalr1.cc, data/yacc.c:
5828 Output token definitions before the first part of user declarations.
5829 Fixes compatibility problem reported by Jim Gifford for kbd in
5830 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
5831
5832 2002-10-11 Paul Eggert <eggert@twinsun.com>
5833
5834 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
5835 (yyparse): here. This undoes some of the 2002-07-25 change.
5836 Compatibility problem reported by Ralf S. Engelschall with
5837 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
5838
5839 2002-10-11 Akim Demaille <akim@epita.fr>
5840
5841 * tests/regression.at Characters Escapes): New.
5842 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
5843 characters.
5844 Reported by Jan Nieuwenhuizen.
5845
5846 2002-10-11 Akim Demaille <akim@epita.fr>
5847
5848 * po/id.po: New.
5849
5850 2002-10-10 Paul Eggert <eggert@twinsun.com>
5851
5852 Portability fixes for bitsets; this also avoids several GCC
5853 warnings.
5854
5855 * lib/abitset.c: Include <stddef.h>, for offsetof.
5856 * lib/lbitset.c: Likewise.
5857
5858 * lib/abitset.c (abitset_bytes): Return a size that is aligned
5859 properly for vectors of objects. Do not assume that adding a
5860 header size to a multiple of a word size yields a value that is
5861 properly aligned for the whole union.
5862 * lib/bitsetv.c (bitsetv_alloc): Likewise.
5863
5864 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
5865 unique names for structures.
5866 * lib/ebitset.c (ebitset_bytes): Likewise.
5867 * lib/lbitset.c (lbitset_bytes): Likewise.
5868
5869 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
5870 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
5871 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
5872 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
5873 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
5874 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
5875 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
5876 to improve the type-checking that GCC can do.
5877 * lib/bitset.c (bitset_op4_cmp): Likewise.
5878 * lib/bitset_stats.c (bitset_stats_count,
5879 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
5880 bitset_stats_copy, bitset_stats_disjoint_p,
5881 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
5882 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
5883 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
5884 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
5885 bitset_stats_and_or_cmp, bitset_stats_andn_or,
5886 bitset_stats_andn_or_cmp, bitset_stats_or_and,
5887 bitset_stats_or_and_cmp): Likewise.
5888 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
5889 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
5890 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
5891 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
5892
5893 * lib/abitset.h: Include bitset.h, not bbitset.h.
5894 * lib/ebitset.h: Likewise.
5895 * lib/lbitset.h: Likewise.
5896
5897 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
5898 All instances of parameters of type enum bitset_opts are now of
5899 type enum_bitset_opts, to conform to the C Standard, and similarly
5900 for enum_bitset_type.
5901 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
5902 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
5903
5904 Do not use "struct bitset_struct" to mean different things in
5905 different modules. Not only is this confusing, it violates
5906 the C Standard, which requires that structure types in different
5907 modules must be compatible if one is to be passed to the other.
5908 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
5909 All instances of "struct bitset_struct *" replaced with "bitset".
5910 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
5911 (union bitset_union, struct abitset_struct, struct ebitset_struct,
5912 struct lbitset_struct, struct bitset_stats_struct): New types.
5913 All uses of struct bitset_struct changed to union bitset_union,
5914 etc.
5915 * lib/abitset.c (struct abitset_struct, abitset,
5916 struct bitset_struct): Remove.
5917 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
5918 struct bitset_struct): Remove.
5919 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
5920 bitset_struct): Remove.
5921 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
5922 Likewise.
5923
5924 Do not call a function of type T using a call that assumes the
5925 function is of a different type U. Standard C requires that a
5926 function must be called with a type that is compatible with its
5927 definition.
5928 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
5929 New decls.
5930 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
5931 New functions.
5932 * lib/ebitset.c (PFV): Remove.
5933 * lib/lbitset.c (PFV): Likewise.
5934 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
5935 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
5936 decls.
5937 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
5938 (ebitset_vtable): Use them.
5939 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
5940 lbitset_xor): New functions.
5941 (lbitset_vtable): Use them.
5942
5943 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
5944 Declare.
5945
5946 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
5947 GCC warning.
5948 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
5949 Use offsetof, for simplicity.
5950
5951 2002-10-06 Paul Eggert <eggert@twinsun.com>
5952
5953 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
5954 the same width as int. This reapplies a hunk of the 2002-08-12 patch
5955 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
5956 which was inadvertently undone by the 2002-09-30 patch.
5957 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
5958 the same width as int.
5959
5960 2002-10-04 Paul Eggert <eggert@twinsun.com>
5961
5962 Version 1.50.
5963
5964 * configure.ac (AC_INIT), NEWS: Increment version number.
5965
5966 * doc/bison.texinfo: Minor spelling, grammar, and white space
5967 fixes.
5968 (Symbols): Mention that any negative value returned from yylex
5969 signifies end-of-input. Warn about negative chars. Mention
5970 the portable Standard C character set.
5971
5972 The GNU coding standard says CFLAGS and YFLAGS are reserved
5973 for the installer to set.
5974 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
5975 * src/Makefile.am (AM_CFLAGS): Likewise.
5976 (AM_YFLAGS): Renamed from YFLAGS.
5977
5978 Fix some MAX and MIN problems.
5979 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
5980 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
5981 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
5982 * src/reader.c (reader): Use it.
5983
5984 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
5985 POSIX 1003.1-2001 has removed fgrep.
5986
5987 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
5988
5989 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
5990 interpreted as signed.
5991 * lib/ebitset.c (ebitset_list): Fix bug.
5992
5993 2002-10-01 Paul Eggert <eggert@twinsun.com>
5994
5995 More fixes for 64-bit hosts and large bitsets.
5996
5997 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
5998 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
5999 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
6000 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
6001 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
6002 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
6003 bitset_count_): Likewise.
6004 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
6005 bitset_first, bitset_last): Likewise.
6006 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
6007 bitset_stats_list_reverse, bitset_stats_size,
6008 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
6009 Likewise.
6010 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
6011 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
6012 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
6013 bitsetv_reflexive_transitive_closure): Likewise.
6014 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
6015 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
6016 Likewise.
6017 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
6018 Likewise.
6019
6020 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
6021 Use size_t, not unsigned int, to count bytes.
6022 * lib/abitset.h (abitset_bytes): Likewise.
6023 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
6024 Likewise.
6025 * lib/bitset.h (bitset_bytes): Likewise.
6026 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
6027 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
6028 * lib/bitsetv.c (bitsetv_alloc): Likewise.
6029 * lib/ebitset.c (ebitset_bytes): Likewise.
6030 * lib/ebitset.h (ebitset_bytes): Likewise.
6031 * lib/lbitset.c (lbitset_bytes): Likewise.
6032 * lib/lbitset.h (lbitset_bytes): Likewise.
6033
6034 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
6035 abitset_subset_p, abitset_disjoint_p, abitset_and,
6036 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
6037 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
6038 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
6039 abitset_or_and, abitset_or_and_cmp):
6040 Use bitset_windex instead of unsigned int.
6041 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
6042 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
6043 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
6044 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
6045 Likewise.
6046 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
6047
6048 * lib/bitset.c (bitset_print):
6049 Use proper printf formats for widths of integer types.
6050 * lib/bitset_stats.c (bitset_percent_histogram_print,
6051 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
6052 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
6053 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
6054 * lib/lbitset.c (lbitset_bytes): Likewise.
6055
6056 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
6057 BITSET_SIZE_MAX): New macros.
6058 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
6059 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
6060 to BITSET_WINDEX_MAX.
6061
6062 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
6063 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
6064 since we now return the bitset_bindex type (not int).
6065
6066 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
6067 when computing sizes.
6068 * lib/ebitset.c (ebitset_elts_grow): Likewise.
6069
6070 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
6071 and avoid cast to unsigned.
6072
6073 2002-09-30 Akim Demaille <akim@epita.fr>
6074
6075 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
6076 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
6077 Updates from Michael Hayes.
6078
6079 2002-09-30 Art Haas <ahaas@neosoft.com>
6080
6081 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
6082 invocations.
6083 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
6084 defined.
6085
6086 2002-09-27 Akim Demaille <akim@epita.fr>
6087
6088 Version 1.49c.
6089
6090 2002-09-27 Akim Demaille <akim@epita.fr>
6091
6092 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
6093 (Because of AC_LIBSOURCE).
6094
6095 2002-09-27 Akim Demaille <akim@epita.fr>
6096
6097 Playing with Autoscan.
6098
6099 * configure.ac: Remove the old LIBOBJ tweaks.
6100 (AC_REPLACE_FUNCS): Add strrchr and strtol.
6101 * lib/strrchr.c: New.
6102 * lib/strtol.c: New, from the Coreutils 4.5.1.
6103
6104 2002-09-27 Akim Demaille <akim@epita.fr>
6105
6106 Playing with Autoscan.
6107
6108 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
6109 * lib/Makefile.am (libbison_a_SOURCES): No longer include
6110 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
6111 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
6112 Coreutils 4.5.1.
6113
6114 2002-09-24 Akim Demaille <akim@epita.fr>
6115
6116 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
6117 (Frequently Asked Questions, Parser Stack Overflow): New.
6118
6119 2002-09-13 Akim Demaille <akim@epita.fr>
6120
6121 Playing with autoscan.
6122
6123 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
6124 * src/files.c (skeleton_find): Remove, unused.
6125 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
6126 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
6127
6128 2002-09-13 Akim Demaille <akim@epita.fr>
6129
6130 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
6131 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
6132
6133 2002-09-13 Akim Demaille <akim@epita.fr>
6134
6135 * configure.ac: Require 2.54.
6136 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
6137 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
6138 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
6139 Remove, provided by Autoconf macros.
6140
6141 2002-09-12 Akim Demaille <akim@epita.fr>
6142
6143 * m4/prereq.m4: Update, from Coreutils 4.5.1.
6144
6145 2002-09-12 Akim Demaille <akim@epita.fr>
6146
6147 * m4/prereq.m4: Update, from Fileutils 4.1.5.
6148 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
6149 Reported by Martin Mokrejs.
6150
6151 2002-09-10 Akim Demaille <akim@epita.fr>
6152
6153 * src/parse-gram.y: Associate a human readable string to each
6154 token type.
6155 * tests/regression.at (Invalid inputs): Adjust.
6156
6157 2002-09-10 Gary V. Vaughan <gary@gnu.org>
6158
6159 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
6160 with an Autoconf-2.5x style configure.ac.
6161
6162 2002-09-06 Paul Eggert <eggert@twinsun.com>
6163
6164 * doc/bison.texinfo (Conditions): Make explicit that the GPL
6165 exception applies only to yacc.c. This is a modification of a
6166 patch originally suggested by Akim Demaille.
6167
6168 2002-09-06 Akim Demaille <akim@epita.fr>
6169
6170 * data/c.m4 (b4_copyright): Move the GPL exception comment from
6171 here to...
6172 * data/yacc.c: here.
6173
6174 * data/lalr1.cc (struct yyltype): Don't define it, since we use
6175 LocationType.
6176 (b4_ltype): Default to yy::Location from location.hh.
6177
6178 2002-09-04 Jim Meyering <jim@meyering.net>
6179
6180 * data/yacc.c: Guard the declaration of yytoknum also with
6181 `#ifdef YYPRINT', so it is declared only when used.
6182
6183 2002-09-04 Akim Demaille <akim@epita.fr>
6184
6185 * configure.in: Rename as...
6186 * configure.ac: this.
6187 Bump to 1.49c.
6188
6189 2002-09-04 Akim Demaille <akim@epita.fr>
6190
6191 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
6192 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
6193 translate maintainer only messages.
6194
6195 2002-08-12 Paul Eggert <eggert@twinsun.com>
6196
6197 Version 1.49b.
6198
6199 * Makefile.am (SUBDIRS): Remove intl.
6200 (DISTCLEANFILES): Remove.
6201 * NEWS: Mention that GNU M4 is now required. Clarify what is
6202 meant by "larger grammars". Mention the pt_BR translation.
6203 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
6204 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
6205 Bump version from 0.11.2 to 0.11.5.
6206 (BISON_PREREQ_STAGE): Remove.
6207 (AM_GNU_GETTEXT): Use external gettext.
6208 (AC_OUTPUT): Remove intl/Makefile.
6209
6210 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
6211
6212 * data/glr.c: Include string.h, for strlen.
6213 (yyreportParseError): Use size_t for yysize.
6214 (yy_yypstack): No longer nested inside yypstates, as nested
6215 functions are not portable. Do not assume size_t is the
6216 same width as int.
6217 (yypstates): Do not assume that ptrdiff_t is the same width
6218 as int, and similarly for yyposn and YYINDEX.
6219
6220 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
6221
6222 * lib/Makefile.am (INCLUDES): Do not include from the intl
6223 directory, which has been removed.
6224 * src/Makefile.am (INCLUDES): Likewise.
6225
6226 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
6227 (bitsets_sources, additional_bitsets_sources, timevars_sources):
6228 New vars.
6229
6230 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
6231 * tests/Makefile.am (EXTRA_DIST): Likewise.
6232
6233 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
6234 Do not assume that bitset_windex is the same width as unsigned.
6235
6236 * lib/abitset.c (abitset_unused_clear): Do not assume that
6237 bitset_word is the same width as int.
6238 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
6239 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
6240 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
6241 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
6242 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
6243
6244 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
6245 portability to one's complement hosts!).
6246 * lib/ebitset.c (ebitset_op1): Likewise.
6247 * lib/lbitset.c (lbitset_op1): Likewise.
6248
6249 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
6250 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
6251 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
6252 Sync with fileutils.
6253 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
6254 lib/gettext.h: Sync with diffutils.
6255
6256 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
6257 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
6258
6259 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
6260 PROTOTYPES to check for prototypes, and "defined __STDC__" to
6261 check for void *.
6262
6263 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
6264 size_t; the old version tried to do this but casted improperly.
6265 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
6266 (bitset_test): Now returns int, not unsigned long.
6267
6268 * lib/bitset_stats.c: Include "gettext.h".
6269 (_): New macro.
6270 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
6271 name locals "index", as it generates unnecessary warnings on some
6272 hosts that have an "index" function.
6273
6274 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
6275 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
6276 they need translation.
6277 * src/LR0.c (state_list_append, new_itemsets, get_state,
6278 append_states, generate_states): Likewise.
6279 * src/assoc.c (assoc_to_string): Likewise.
6280 * src/closure.c (print_closure, set_firsts, closure): Likewise.
6281 * src/gram.c (grammar_dump): Likewise.
6282 * src/injections.c (injections_compute): Likewise.
6283 * src/lalr.c (lookaheads_print): Likewise.
6284 * src/relation.c (relation_transpose): Likewise.
6285 * src/scan-gram.l: Likewise.
6286 * src/tables.c (table_grow, pack_vector): Likewise.
6287
6288 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
6289 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
6290 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
6291 * m4/mbstate_t.m4: Sync with fileutils.
6292 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
6293
6294 * po/LINGUAS: Add pt_BR.
6295 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
6296 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
6297 lib/timevar.c.
6298 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
6299 manual recommends.
6300 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
6301
6302 * src/complain.c (strerror_r): Remove decl; not needed.
6303 (strerror): Use same pattern as ../lib/error.c.
6304
6305 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
6306
6307 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
6308
6309 * src/main.c (main): Cast result of bindtextdomain and textdomain
6310 to void, to avoid a GCC warning when --disable-nls is in effect.
6311
6312 * src/scan-gram.l: Use strings rather than escapes when possible,
6313 to minimize the number of warnings from xgettext.
6314 (handle_action_dollar, handle_action_at): Don't use isdigit,
6315 as it mishandles negative chars and it may not work as expected
6316 outside the C locale.
6317
6318 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
6319 this is a GCC extension and is not portable to other compilers.
6320
6321 * src/system.h (alloca): Use same pattern as ../lib/error.c.
6322 Do not include <ctype.h>; no longer needed.
6323 Do not include <malloc.h>; no longer needed (and generates
6324 warnings on OpenBSD 3.0).
6325
6326 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
6327 it's not portable.
6328
6329 * tests/regression.at: Do not use 'cc -c input.c -o input';
6330 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
6331
6332 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
6333 exit status as failure, not just exit status 1. Sun C exits
6334 with status 2 sometimes.
6335
6336 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
6337 Use it for the two large tests.
6338
6339 2002-08-02 Akim Demaille <akim@epita.fr>
6340
6341 * src/conflicts.c (conflicts_output): Don't output rules never
6342 reduced here, since anyway that computation doesn't work.
6343 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
6344 (rule_useless_p, rule_never_reduced_p): New.
6345 (grammar_rules_partial_print): Use a filter instead of a range.
6346 Display the title only if needed.
6347 (grammar_rules_print): Adjust.
6348 (grammar_rules_never_reduced_report): New.
6349 * src/tables.c (action_row): Move the computation of rules never
6350 reduced to...
6351 (token_actions): here.
6352 * src/main.c (main): Make the parser before making the report, so
6353 that rules never reduced are computed.
6354 Call grammar_rules_never_reduced_report.
6355 * src/print.c (print_results): Report rules never reduced.
6356 * tests/conflicts.at, tests/reduce.at: Adjust.
6357
6358 2002-08-01 Akim Demaille <akim@epita.fr>
6359
6360 Instead of attaching lookaheads and duplicating the rules being
6361 reduced by a state, attach the lookaheads to the reductions.
6362
6363 * src/state.h (state_t): Remove the `lookaheads',
6364 `lookaheads_rule' member.
6365 (reductions_t): Add a `lookaheads' member.
6366 Use a regular array for the `rules'.
6367 * src/state.c (reductions_new): Initialize the lookaheads member
6368 to 0.
6369 (state_rule_lookaheads_print): Adjust.
6370 * src/state.h, src/state.c (state_reductions_find): New.
6371 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
6372 (count_rr_conflicts): Adjust.
6373 * src/lalr.c (LArule): Remove.
6374 (add_lookback_edge): Adjust.
6375 (state_lookaheads_count): New.
6376 (states_lookaheads_initialize): Merge into...
6377 (initialize_LA): this.
6378 (lalr_free): Adjust.
6379 * src/main.c (main): Don't free nullable and derives too early: it
6380 is used by --verbose.
6381 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
6382
6383 2002-08-01 Akim Demaille <akim@epita.fr>
6384
6385 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
6386 `rule_number_t**'.
6387 (set_derives, free_derives): Rename as...
6388 (derives_compute, derives_free): this.
6389 Adjust all dependencies.
6390 * src/nullable.c (set_nullable, free_nullable): Rename as...
6391 (nullable_compute, nullable_free): these.
6392 (rule_list_t): Store rule_t *, not rule_number_t.
6393 * src/state.c (state_rule_lookaheads_print): Directly compare rule
6394 pointers, instead of their numbers.
6395 * src/main.c (main): Call nullable_free, and derives_free earlier,
6396 as they were lo longer used.
6397
6398 2002-08-01 Akim Demaille <akim@epita.fr>
6399
6400 * lib/timevar.c (get_time): Include children time.
6401 * src/lalr.h (LA, LArule): Don't export them: used with the
6402 state_t.
6403 * src/lalr.c (LA, LArule): Static.
6404 * src/lalr.h, src/lalr.c (lalr_free): New.
6405 * src/main.c (main): Call it.
6406 * src/tables.c (pack_vector): Check whether loc is >= to the
6407 table_size, not >.
6408 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
6409 (tables_generate): do it, since that's also it which allocates
6410 them.
6411 Don't free LA and LArule, main does.
6412
6413 2002-07-31 Akim Demaille <akim@epita.fr>
6414
6415 Separate parser tables computation and output.
6416
6417 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
6418 (conflict_list, conflict_list_cnt, table, check, table_ninf)
6419 (yydefgoto, yydefact, high): Move to...
6420 * src/tables.h, src/tables.c: here.
6421 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
6422 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
6423 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
6424 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
6425 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
6426 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
6427 (action_row, save_row, token_actions, save_column, default_goto)
6428 (goto_actions, sort_actions, matching_state, pack_vector)
6429 (table_ninf_remap, pack_table, prepare_actions): Move to...
6430 * src/tables.c: here.
6431 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
6432 * src/output.c (token_actions, output_base, output_conflicts)
6433 (output_check): Merge into...
6434 (prepare_actions): this.
6435 (actions_output): Rename as...
6436 (user_actions_output): this.
6437 * src/main.c (main): Call tables_generate and tables_free.
6438
6439 2002-07-31 Akim Demaille <akim@epita.fr>
6440
6441 Steal GCC's --time-report support.
6442
6443 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
6444 stolen/adjusted from GCC.
6445 * m4/stage.m4: Remove time related checks.
6446 * m4/timevar.m4: New.
6447 * configure.in: Adjust.
6448 * src/system.h: Adjust to using timevar.h.
6449 * src/getargs.h, src/getargs.c: Support trace_time for
6450 --trace=time.
6451 * src/main.c (stage): Remove.
6452 (main): Replace `stage' invocations with timevar calls.
6453 * src/output.c: Insert pertinent timevar calls.
6454
6455 2002-07-31 Akim Demaille <akim@epita.fr>
6456
6457 Let --trace have arguments.
6458
6459 * src/getargs.h (enum trace_e): New.
6460 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
6461 (long_options, short_options): --trace/-T takes an optional
6462 argument.
6463 Change all the uses of trace_flag to reflect the new flags.
6464 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
6465
6466 Strengthen `stage' portability.
6467
6468 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
6469 * configure.in: Use it.
6470 Don't check for malloc.h and sys/times.h.
6471 * src/system.h: Include them when appropriate.
6472 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
6473 times and struct tms are available.
6474
6475 2002-07-30 Akim Demaille <akim@epita.fr>
6476
6477 In verbose parse error message, don't report `error' as an
6478 expected token.
6479 * tests/actions.at (Printers and Destructors): Adjust.
6480 * tests/calc.at (Calculator $1): Adjust.
6481 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
6482 error message, do not report the parser accepts the error token in
6483 that state.
6484
6485 2002-07-30 Akim Demaille <akim@epita.fr>
6486
6487 Normalize conflict related messages.
6488
6489 * src/complain.h, src/complain.c (warn, complain): New.
6490 * src/conflicts.c (conflicts_print): Use them.
6491 (conflict_report_yacc): New, extracted from...
6492 (conflicts_print): here.
6493 * tests/conflicts.at, tests/existing.at: Adjust.
6494
6495 2002-07-30 Akim Demaille <akim@epita.fr>
6496
6497 Report rules which are never reduced by the parser: those hidden
6498 by conflicts.
6499
6500 * src/LR0.c (save_reductions): Don't make the final state too
6501 different: save its reduction (accept) instead of having a state
6502 without any action (no shift or goto, no reduce).
6503 Note: the final state is now a ``regular'' state, i.e., the
6504 parsers now contain `reduce 0' as default reduction.
6505 Nevertheless, since they decide to `accept' when yystate =
6506 final_state, they still will not reduce rule 0.
6507 * src/print.c (print_actions, print_reduction): Adjust.
6508 * src/output.c (action_row): Track reduced rules.
6509 (token_actions): Report rules never reduced.
6510 * tests/conflicts.at, tests/regression.at: Adjust.
6511
6512 2002-07-30 Akim Demaille <akim@epita.fr>
6513
6514 `stage' was accidently included in a previous patch.
6515 Initiate its autoconfiscation.
6516
6517 * configure.in: Look for malloc.h and sys/times.h.
6518 * src/main.c (stage): Adjust.
6519 Report only when trace_flag.
6520
6521 2002-07-29 Akim Demaille <akim@epita.fr>
6522
6523 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
6524 state_number_t.
6525 (errs_t): symbol_t*, not symbol_number_t.
6526 (reductions_t): rule_t*, not rule_number_t.
6527 (FOR_EACH_SHIFT): New.
6528 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
6529 * src/print.c, src/print_graph.c: Adjust.
6530
6531 2002-07-29 Akim Demaille <akim@epita.fr>
6532
6533 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
6534
6535 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
6536 (endtoken, accept): these.
6537 * src/reader.c (reader): Set endtoken's default tag to "$end".
6538 Set undeftoken's tag to "$undefined" instead of "$undefined.".
6539 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
6540 Adjust.
6541
6542 2002-07-29 Akim Demaille <akim@epita.fr>
6543
6544 * src/reduce.c (reduce_grammar): When the language is empty,
6545 complain about the start symbol, not the axiom.
6546 Use its location.
6547 * tests/reduce.at (Empty Language): New.
6548
6549 2002-07-26 Akim Demaille <akim@epita.fr>
6550
6551 * src/reader.h, src/reader.c (gram_error): ... can't get
6552 yycontrol without making too strong assumptions on the parser
6553 itself.
6554 * src/output.c (prepare_tokens): Use the real 0th value of
6555 token_translations instead of `0'.
6556 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
6557 visible here.
6558 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
6559 for the time being: %locations ought to provide it to yyerror.
6560
6561 2002-07-25 Akim Demaille <akim@epita.fr>
6562
6563 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
6564 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
6565 * tests/regression.at (Web2c Actions): Adjust.
6566
6567 2002-07-25 Akim Demaille <akim@epita.fr>
6568
6569 Stop storing rules from 1 to nrules + 1.
6570
6571 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
6572 * src/nullable.c, src/output.c, src/print.c, src/reader.c
6573 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
6574 Iterate from 0 to nrules.
6575 Use rule_number_as_item_number and item_number_as_rule_number.
6576 Adjust to `derive' now containing possibly 0.
6577 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
6578 Handle the `- 1' part in rule numbers from/to item numbers.
6579 * src/conflicts.c (log_resolution): Fix the message which reversed
6580 shift and reduce.
6581 * src/output.c (action_row): Initialize default_rule to -1.
6582 (token_actions): Adjust.
6583 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
6584 expected output.
6585 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
6586
6587 2002-07-25 Akim Demaille <akim@epita.fr>
6588
6589 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
6590 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
6591 (b4_c_knr_arg_decl): New.
6592 * data/yacc.c: Use it to define yysymprint, yydestruct, and
6593 yyreport_parse_error.
6594
6595 2002-07-25 Akim Demaille <akim@epita.fr>
6596
6597 * data/yacc.c (yyreport_parse_error): New, extracted from...
6598 (yyparse): here.
6599 (yydestruct, yysymprint): Move above yyparse.
6600 Be K&R compliant.
6601
6602 2002-07-25 Akim Demaille <akim@epita.fr>
6603
6604 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
6605 replace...
6606 (b4_sint_type, b4_uint_type): these.
6607 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
6608 * tests/regression.at (Web2c Actions): Adjust.
6609
6610 2002-07-25 Akim Demaille <akim@epita.fr>
6611
6612 * src/gram.h (TIEM_NUMBER_MAX): New.
6613 (item_number_of_rule_number, rule_number_of_item_number): Rename
6614 as...
6615 (rule_number_as_item_number, item_number_as_rule_number): these.
6616 Adjust dependencies.
6617 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
6618 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
6619 (symbol_number_to_vector_number): New.
6620 (order): Of vector_number_t* type.
6621 (base_t, BASE_MAX, BASE_MIN): New.
6622 (froms, tos, width, pos, check): Of base_t type.
6623 (action_number_t, ACTION_MIN, ACTION_MAX): New.
6624 (actrow): Of action_number_t type.
6625 (conflrow): Of unsigned int type.
6626 (table_ninf, base_ninf): New.
6627 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
6628 (muscle_insert_int_table, muscle_insert_base_table)
6629 (muscle_insert_rule_number_table): New.
6630 (prepare_tokens): Output `toknum' as int_table.
6631 (action_row): Returns a rule_number_t.
6632 Use ACTION_MIN, not SHRT_MIN.
6633 (token_actions): yydefact is rule_number_t*.
6634 (table_ninf_remap): New.
6635 (pack_table): Use it for `base' and `table'.
6636 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
6637 replaced with...
6638 (YYPACT_NINF, YYTABLE_NINF): these.
6639 (yypact, yytable): Compute their types instead of hard-coded
6640 `short'.
6641 * tests/regression.at (Web2c Actions): Adjust.
6642
6643 2002-07-19 Akim Demaille <akim@epita.fr>
6644
6645 * src/scan-gram.l (id): Can start with an underscore.
6646
6647 2002-07-16 Akim Demaille <akim@epita.fr>
6648
6649 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
6650 Adjust all former `associativity' dependencies.
6651 * src/symtab.c (symbol_new): Default associativity is `undef', not
6652 `right'.
6653 (symbol_check_alias_consistence): Adjust.
6654
6655 2002-07-09 Akim Demaille <akim@epita.fr>
6656
6657 * doc/bison.texinfo: Properly set the ``header'' part.
6658 Use @dircategory ``GNU programming tools'' as per Texinfo's
6659 documentation.
6660 Use @copying.
6661
6662 2002-07-09 Akim Demaille <akim@epita.fr>
6663
6664 * lib/quotearg.h: Protect against multiple inclusions.
6665 * src/location.h (location_t): Add a `file' member.
6666 (LOCATION_RESET, LOCATION_PRINT): Adjust.
6667 * src/complain.c (warn_at, complain_at, fatal_at): Drop
6668 `error_one_per_line' support.
6669
6670 2002-07-09 Akim Demaille <akim@epita.fr>
6671
6672 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
6673 * src/reader.c (lineno): Remove.
6674 Adjust all dependencies.
6675 (get_merge_function): Take a location and use complain_at.
6676 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
6677 * tests/regression.at (Invalid inputs, Mixing %token styles):
6678 Adjust.
6679
6680 2002-07-09 Akim Demaille <akim@epita.fr>
6681
6682 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
6683 recovery rule, and forbid extensions when --yacc.
6684 (gram_error): Use complain_at.
6685 * src/reader.c (reader): Exit if there were parse errors.
6686
6687 2002-07-09 Akim Demaille <akim@epita.fr>
6688
6689 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
6690 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
6691 Reported by R Blake <blakers@mac.com>.
6692
6693 2002-07-09 Akim Demaille <akim@epita.fr>
6694
6695 * data/yacc.c: Output the copyright notive in the header.
6696
6697 2002-07-03 Akim Demaille <akim@epita.fr>
6698
6699 * src/output.c (froms, tos): Are state_number_t.
6700 (save_column): sp, sp1, and sp2 are state_number_t.
6701 (prepare): Rename `final' as `final_state_number', `nnts' as
6702 `nterms_number', `nrules' as `rules_number', `nstates' as
6703 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
6704 unused.
6705 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
6706 * data/lalr1.cc (nsym_): Remove, unused.
6707
6708 2002-07-03 Akim Demaille <akim@epita.fr>
6709
6710 * src/lalr.h, src/lalr.c (goto_number_t): New.
6711 * src/lalr.c (goto_list_t): New.
6712 Propagate them.
6713 * src/nullable.c (rule_list_t): New.
6714 Propagate.
6715 * src/types.h: Remove.
6716
6717 2002-07-03 Akim Demaille <akim@epita.fr>
6718
6719 * src/closure.c (print_fderives): Use rule_rhs_print.
6720 * src/derives.c (print_derives): Use rule_rhs_print.
6721 (rule_list_t): New, replaces `shorts'.
6722 (set_derives): Add comments.
6723 * tests/sets.at (Nullable, Firsts): Adjust.
6724
6725 2002-07-03 Akim Demaille <akim@epita.fr>
6726
6727 * src/output.c (prepare_actions): Free `tally' and `width'.
6728 (prepare_actions): Allocate and free `order'.
6729 * src/symtab.c (symbols_free): Free `symbols'.
6730 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
6731 * src/output.c (m4_invoke): Move to...
6732 * src/scan-skel.l: here.
6733 (<<EOF>>): Close yyout, and free its name.
6734
6735 2002-07-03 Akim Demaille <akim@epita.fr>
6736
6737 Fix some memory leaks, and fix a bug: state 0 was examined twice.
6738
6739 * src/LR0.c (new_state): Merge into...
6740 (state_list_append): this.
6741 (new_states): Merge into...
6742 (generate_states): here.
6743 (set_states): Don't ensure a proper `errs' state member here, do it...
6744 * src/conflicts.c (conflicts_solve): here.
6745 * src/state.h, src/state.c: Comment changes.
6746 (state_t): Rename member `shifts' as `transitions'.
6747 Adjust all dependencies.
6748 (errs_new): For consistency, also take the values as argument.
6749 (errs_dup): Remove.
6750 (state_errs_set): New.
6751 (state_reductions_set, state_transitions_set): Assert that no
6752 previous value was assigned.
6753 (state_free): New.
6754 (states_free): Use it.
6755 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
6756 temporary storage: use `errs' and `nerrs' as elsewhere.
6757 (set_conflicts): Allocate and free this `errs'.
6758
6759 2002-07-02 Akim Demaille <akim@epita.fr>
6760
6761 * lib/libiberty.h: New.
6762 * lib: Update the bitset implementation from upstream.
6763 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
6764 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
6765 * src/main.c: Adjust bitset stats calls.
6766
6767 2002-07-01 Paul Eggert <eggert@twinsun.com>
6768
6769 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
6770 char, so that negative chars don't collide with $.
6771
6772 2002-06-30 Akim Demaille <akim@epita.fr>
6773
6774 Have the GLR tests be `warning' checked, and fix the warnings.
6775
6776 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
6777 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
6778 (yyremoveDeletes): `yyi' and `yyj' are size_t.
6779 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
6780 (yyaddDeferredAction): static.
6781 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
6782 (yyreportParseError): yyprefix is const.
6783 yytokenp is used only when verbose.
6784 (yy__GNUC__): Replace with __GNUC__.
6785 (yypdumpstack): yyi is size_t.
6786 (yypreference): Un-yy local variables and arguments, to avoid
6787 clashes with `yyr1'. Anyway, we are not in the user name space.
6788 (yytname_size): be an int, as is compared with ints.
6789 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
6790 Use them.
6791 * tests/cxx-gram.at: Use quotation to protect $1.
6792 Use AT_COMPILE to enable warnings hunts.
6793 Prototype yylex and yyerror.
6794 `Use' argc.
6795 Include `string.h', not `strings.h'.
6796 Produce and prototype stmtMerge only when used.
6797 yylex takes a location.
6798
6799 2002-06-30 Akim Demaille <akim@epita.fr>
6800
6801 We spend a lot of time in quotearg, in particular when --verbose.
6802
6803 * src/symtab.c (symbol_get): Store a quoted version of the key.
6804 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
6805 Adjust all callers.
6806
6807 2002-06-30 Akim Demaille <akim@epita.fr>
6808
6809 * src/state.h (reductions_t): Rename member `nreds' as num.
6810 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
6811 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
6812
6813 2002-06-30 Akim Demaille <akim@epita.fr>
6814
6815 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
6816 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
6817 (shifts_to): Rename as...
6818 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
6819 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
6820 (TRANSITION_IS_DISABLED, transitions_to): these.
6821
6822 2002-06-30 Akim Demaille <akim@epita.fr>
6823
6824 * src/print.c (print_shifts, print_gotos): Merge into...
6825 (print_transitions): this.
6826 (print_transitions, print_errs, print_reductions): Align the
6827 lookaheads columns.
6828 (print_core, print_transitions, print_errs, print_state,
6829 print_grammar): Output empty lines separator before, not after.
6830 (state_default_rule_compute): Rename as...
6831 (state_default_rule): this.
6832 * tests/conflicts.at (Defaulted Conflicted Reduction),
6833 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
6834 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
6835
6836 2002-06-30 Akim Demaille <akim@epita.fr>
6837
6838 Display items as we display rules.
6839
6840 * src/gram.h, src/gram.c (rule_lhs_print): New.
6841 * src/gram.c (grammar_rules_partial_print): Use it.
6842 * src/print.c (print_core): Likewise.
6843 * tests/conflicts.at (Defaulted Conflicted Reduction),
6844 (Unresolved SR Conflicts): Adjust.
6845 (Unresolved SR Conflicts): Adjust and rename as...
6846 (Resolved SR Conflicts): this, as was meant.
6847 * tests/regression.at (Web2c Report): Adjust.
6848
6849 2002-06-30 Akim Demaille <akim@epita.fr>
6850
6851 * src/print.c (state_default_rule_compute): New, extracted from...
6852 (print_reductions): here.
6853 Pessimize, but clarify the code.
6854 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
6855
6856 2002-06-30 Akim Demaille <akim@epita.fr>
6857
6858 * src/output.c (action_row): Let default_rule be always a rule
6859 number.
6860
6861 2002-06-30 Akim Demaille <akim@epita.fr>
6862
6863 * src/closure.c (print_firsts, print_fderives, closure):
6864 Use BITSET_EXECUTE.
6865 * src/lalr.c (lookaheads_print): Likewise.
6866 * src/state.c (state_rule_lookaheads_print): Likewise.
6867 * src/print_graph.c (print_core): Likewise.
6868 * src/print.c (print_reductions): Likewise.
6869 * src/output.c (action_row): Likewise.
6870 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
6871
6872 2002-06-30 Akim Demaille <akim@epita.fr>
6873
6874 * src/print_graph.c: Use report_flag.
6875
6876 2002-06-30 Akim Demaille <akim@epita.fr>
6877
6878 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
6879 to...
6880 * src/relation.h, src/relation.c (traverse, relation_digraph)
6881 (relation_print, relation_transpose): New.
6882
6883 2002-06-30 Akim Demaille <akim@epita.fr>
6884
6885 * src/state.h, src/state.c (shifts_to): New.
6886 * src/lalr.c (build_relations): Use it.
6887
6888 2002-06-30 Akim Demaille <akim@epita.fr>
6889
6890 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
6891 (item_number_of_rule_number, rule_number_of_item_number): New.
6892 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
6893 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
6894 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
6895 Propagate their use.
6896 Much remains to be done, in particular wrt `shorts' from types.h.
6897
6898 2002-06-30 Akim Demaille <akim@epita.fr>
6899
6900 * src/symtab.c (symbol_new): Initialize the `printer' member.
6901
6902 2002-06-30 Akim Demaille <akim@epita.fr>
6903
6904 * src/LR0.c (save_reductions): Remove, replaced by...
6905 * src/state.h, src/state.c (state_reductions_set): New.
6906 (reductions, errs): Rename as...
6907 (reductions_t, errs_t): these.
6908 Adjust all dependencies.
6909
6910 2002-06-30 Akim Demaille <akim@epita.fr>
6911
6912 * src/LR0.c (state_list_t, state_list_append): New.
6913 (first_state, last_state): Now symbol_list_t.
6914 (this_state): Remove.
6915 (new_itemsets, append_states, save_reductions): Take a state_t as
6916 argument.
6917 (set_states, generate_states): Adjust.
6918 (save_shifts): Remove, replaced by...
6919 * src/state.h, src/state.c (state_shifts_set): New.
6920 (shifts): Rename as...
6921 (shifts_t): this.
6922 Adjust all dependencies.
6923 * src/state.h (state_t): Remove the `next' member.
6924
6925 2002-06-30 Akim Demaille <akim@epita.fr>
6926
6927 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
6928 escaped in slot 0.
6929
6930 2002-06-30 Akim Demaille <akim@epita.fr>
6931
6932 Use hash.h for the state hash table.
6933
6934 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
6935 (allocate_storage): Use state_hash_new.
6936 (free_storage): Use state_hash_free.
6937 (new_state, get_state): Adjust.
6938 * src/lalr.h, src/lalr.c (states): Move to...
6939 * src/states.h (state_t): Remove the `link' member, no longer
6940 used.
6941 * src/states.h, src/states.c: here.
6942 (state_hash_new, state_hash_free, state_hash_lookup)
6943 (state_hash_insert, states_free): New.
6944 * src/states.c (state_table, state_compare, state_hash): New.
6945 * src/output.c (output_actions): Do not free states now, since we
6946 still need to know the final_state number in `prepare', called
6947 afterwards. Do it...
6948 * src/main.c (main): here: call states_free after `output'.
6949
6950 2002-06-30 Akim Demaille <akim@epita.fr>
6951
6952 * src/state.h, src/state.c (state_new): New, extracted from...
6953 * src/LR0.c (new_state): here.
6954 * src/state.h (STATE_ALLOC): Move to...
6955 * src/state.c: here.
6956 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
6957 * src/state.h, src/state.c: here.
6958
6959 2002-06-30 Akim Demaille <akim@epita.fr>
6960
6961 * src/reader.c (gensym): Rename as...
6962 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
6963 (getsym): Rename as...
6964 (symbol_get): this.
6965
6966 2002-06-30 Akim Demaille <akim@epita.fr>
6967
6968 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
6969 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
6970 * src/output.c, src/print.c, src/print_graph.c: Propagate.
6971 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
6972
6973 2002-06-30 Akim Demaille <akim@epita.fr>
6974
6975 Make the test suite pass with warnings checked.
6976
6977 * tests/actions.at (Printers and Destructors): Improve.
6978 Avoid unsigned vs. signed issues.
6979 * tests/calc.at: Don't exercise the scanner here, do it...
6980 * tests/input.at (Torturing the Scanner): here.
6981
6982 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6983
6984 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
6985 reorganize first lines parallel to yacc.c.
6986
6987 2002-06-28 Akim Demaille <akim@epita.fr>
6988
6989 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
6990 (b4_token_enum, b4_token_defines): New, factored from...
6991 * data/lalr1.cc, data/yacc.c, glr.c: here.
6992
6993 2002-06-28 Akim Demaille <akim@epita.fr>
6994
6995 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
6996 unused variables.
6997 * src/output.c (merger_output): static.
6998
6999 2002-06-28 Akim Demaille <akim@epita.fr>
7000
7001 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
7002 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
7003 pacify GCC.
7004 * src/output.c (save_row): Initialize all the variables to pacify GCC.
7005
7006 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7007
7008 Accumulated changelog for new GLR parsing features.
7009
7010 * src/conflicts.c (count_total_conflicts): Change name to
7011 conflicts_total_count.
7012 * src/conflicts.h: Ditto.
7013 * src/output.c (token_actions): Use the new name.
7014 (output_conflicts): Change conflp => conflict_list_heads, and
7015 confl => conflict_list for better readability.
7016 * data/glr.c: Use the new names.
7017 * NEWS: Add self to GLR announcement.
7018
7019 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
7020
7021 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
7022 Akim Demaille.
7023
7024 * data/bison.glr: Change name to glr.c
7025 * data/glr.c: Renamed from bison.glr.
7026 * data/Makefile.am: Add glr.c
7027
7028 * src/getargs.c:
7029
7030 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
7031 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
7032
7033 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7034
7035 * data/bison.glr: Be sure to restore the
7036 current #line when returning to the skeleton contents after having
7037 exposed the input file's #line.
7038
7039 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7040
7041 * data/bison.glr: Bring up to date with changes to bison.simple.
7042
7043 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7044
7045 * data/bison.glr: Correct definitions that use b4_prefix.
7046 Various reformatting.
7047 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
7048 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
7049 yytokenp argument; now part of stack.
7050 (yychar): Define to behave as documented.
7051 (yyclearin): Ditto.
7052
7053 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7054
7055 * src/reader.h: Add declaration for free_merger_functions.
7056
7057 * src/reader.c (merge_functions): New variable.
7058 (get_merge_function): New function.
7059 (free_merger_functions): New function.
7060 (readgram): Check for %prec that is not followed by a symbol.
7061 Handle %dprec and %merge declarations.
7062 (packgram): Initialize dprec and merger fields in rules array.
7063
7064 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
7065 conflict_list_cnt, conflict_list_free): New variables.
7066 (table_grow): Also grow conflict_table.
7067 (prepare_rules): Output dprec and merger tables.
7068 (conflict_row): New function.
7069 (action_row): Output conflict lists for GLR parser. Don't use
7070 default reduction in conflicted states for GLR parser so that there
7071 are spaces for the conflict lists.
7072 (save_row): Also save conflict information.
7073 (token_actions): Allocate conflict list.
7074 (merger_output): New function.
7075 (pack_vector): Pack conflict table, too.
7076 (output_conflicts): New function to output yyconflp and yyconfl.
7077 (output_check): Allocate conflict_tos.
7078 (output_actions): Output conflict tables, also.
7079 (output_skeleton): Output b4_mergers definition.
7080 (prepare): Output b4_max_rhs_length definition.
7081 Use 'bison.glr' as default skeleton for GLR parsers.
7082
7083 * src/gram.c (glr_parser): New flag.
7084 (grammar_free): Call free_merger_functions.
7085
7086 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
7087 all pairs of conflicting reductions, rather than just all tokens
7088 causing conflicts. Needed to size conflict tables.
7089 (conflicts_output): Modify call to count_rr_conflicts for new
7090 interface.
7091 (conflicts_print): Ditto.
7092 (count_total_conflicts): New function.
7093
7094 * src/reader.h (merger_list): New type.
7095 (merge_functions): New variable.
7096
7097 * src/lex.h (tok_dprec, tok_merge): New token types.
7098
7099 * src/gram.h (rule_s): Add dprec and merger fields.
7100 (glr_parser): New flag.
7101
7102 * src/conflicts.h (count_total_conflicts): New function.
7103
7104 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
7105
7106 * doc/bison.texinfo (Generalized LR Parsing): New section.
7107 (GLR Parsers): New section.
7108 (Language and Grammar): Mention GLR parsing.
7109 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
7110 Correct typo ("tge" -> "the").
7111
7112 * data/bison.glr: New skeleton for GLR parsing.
7113
7114 * tests/cxx-gram.at: New tests for GLR parsing.
7115
7116 * tests/testsuite.at: Include cxx-gram.at.
7117
7118 * tests/Makefile.am: Add cxx-gram.at.
7119
7120 * src/parse-gram.y:
7121
7122 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
7123
7124 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
7125
7126 2002-06-27 Akim Demaille <akim@epita.fr>
7127
7128 * src/options.h, src/options.c: Remove.
7129 * src/getargs.c (short_options, long_options): New.
7130
7131 2002-06-27 Akim Demaille <akim@epita.fr>
7132
7133 * data/bison.simple, data/bison.c++: Rename as...
7134 * data/yacc.c, data/lalr1.cc: these.
7135 * doc/bison.texinfo (Environment Variables): Remove.
7136
7137 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
7138
7139 * src/getargs.c (report_argmatch): Initialize strtok().
7140
7141 2002-06-20 Akim Demaille <akim@epita.fr>
7142
7143 * data/bison.simple (b4_symbol_actions): New, replaces...
7144 (b4_symbol_destructor, b4_symbol_printer): these.
7145 (yysymprint): Be sure to call YYPRINT only for tokens, and using
7146 user token numbers.
7147
7148 2002-06-20 Akim Demaille <akim@epita.fr>
7149
7150 * data/bison.simple (yydestructor): Rename as...
7151 (yydestruct): this.
7152
7153 2002-06-20 Akim Demaille <akim@epita.fr>
7154
7155 * src/symtab.h, src/symtab.c (symbol_type_set)
7156 (symbol_destructor_set, symbol_precedence_set): The location is
7157 the last argument.
7158 Adjust all callers.
7159
7160 2002-06-20 Akim Demaille <akim@epita.fr>
7161
7162 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
7163 internals.
7164 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
7165 Takes a location.
7166 * src/symtab.h, src/symtab.c (symbol_class_set)
7167 (symbol_user_token_number_set): Likewise.
7168 Adjust all callers.
7169 Promote complain_at.
7170 * tests/input.at (Type Clashes): Adjust.
7171
7172 2002-06-20 Akim Demaille <akim@epita.fr>
7173
7174 * data/bison.simple (YYLEX): Fix the declaration when
7175 %pure-parser.
7176
7177 2002-06-20 Akim Demaille <akim@epita.fr>
7178
7179 * data/bison.simple (yysymprint): Don't print the token number,
7180 just its name.
7181 * tests/actions.at (Destructors): Rename as...
7182 (Printers and Destructors): this.
7183 Also exercise %printer.
7184
7185 2002-06-20 Akim Demaille <akim@epita.fr>
7186
7187 * data/bison.simple (YYDSYMPRINT): New.
7188 Use it to remove many of the #if YYDEBUG/if (yydebug).
7189
7190 2002-06-20 Akim Demaille <akim@epita.fr>
7191
7192 * src/symtab.h, src/symtab.c (symbol_t): printer and
7193 printer_location are new members.
7194 (symbol_printer_set): New.
7195 * src/parse-gram.y (PERCENT_PRINTER): New token.
7196 Handle its associated rule.
7197 * src/scan-gram.l: Adjust.
7198 (handle_destructor_at, handle_destructor_dollar): Rename as...
7199 (handle_symbol_code_at, handle_symbol_code_dollar): these.
7200 * src/output.c (symbol_printers_output): New.
7201 (output_skeleton): Call it.
7202 * data/bison.simple (yysymprint): New. Cannot be named yyprint
7203 since there are already many grammar files with a user `yyprint'.
7204 Replace the calls to YYPRINT to calls to yysymprint.
7205 * tests/calc.at: Adjust.
7206 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
7207 taking advantage of parser very internal details (stack size!).
7208
7209 2002-06-20 Akim Demaille <akim@epita.fr>
7210
7211 * src/scan-gram.l: Complete the scanner with the missing patterns
7212 to pacify Flex.
7213 Use `quote' and `symbol_tag_get' where appropriate.
7214
7215 2002-06-19 Akim Demaille <akim@epita.fr>
7216
7217 * tests/actions.at (Destructors): Augment to test locations.
7218 * data/bison.simple (yydestructor): Pass it the current location
7219 if locations are enabled.
7220 Prototype only when __STDC__ or C++.
7221 Change the argument names to move into the yy name space: there is
7222 user code here.
7223
7224 2002-06-19 Akim Demaille <akim@epita.fr>
7225
7226 * data/bison.simple (b4_pure_if): New.
7227 Use it instead of #ifdef YYPURE.
7228
7229 2002-06-19 Akim Demaille <akim@epita.fr>
7230
7231 * data/bison.simple (b4_location_if): New.
7232 Use it instead of #ifdef YYLSP_NEEDED.
7233
7234 2002-06-19 Akim Demaille <akim@epita.fr>
7235
7236 Prepare @$ in %destructor, but currently don't bind it in the
7237 skeleton, as %location use is not cleaned up yet.
7238
7239 * src/scan-gram.l (handle_dollar, handle_destructor_at)
7240 (handle_action_at): New.
7241 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
7242 a braced_code_t and a location as additional arguments.
7243 (handle_destructor_dollar): Instead of requiring `b4_eval', just
7244 unquote one when outputting `b4_dollar_dollar'.
7245 Adjust callers.
7246 * data/bison.simple (b4_eval): Remove.
7247 (b4_symbol_destructor): Adjust.
7248 * tests/input.at (Invalid @n): Adjust.
7249
7250 2002-06-19 Zack Weinberg <zack@codesourcery.com>
7251
7252 * doc/bison.texinfo: Document ability to have multiple
7253 prologue sections.
7254
7255 2002-06-18 Akim Demaille <akim@epita.fr>
7256
7257 * src/files.c (compute_base_names): When computing the output file
7258 names from the input file name, strip the directory part.
7259
7260 2002-06-18 Akim Demaille <akim@epita.fr>
7261
7262 * data/bison.simple.new: Comment changes.
7263 Reported by Andreas Schwab.
7264
7265 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
7266
7267 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
7268 there are no `label `yyoverflowlab' defined but not used' warnings
7269 when yyoverflow is defined.
7270
7271 2002-06-18 Akim Demaille <akim@epita.fr>
7272
7273 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
7274 new member.
7275 (symbol_destructor_set): Adjust.
7276 * src/output.c (symbol_destructors_output): Output the destructor
7277 locations.
7278 Output the symbol name.
7279 * data/bison.simple (b4_symbol_destructor): Adjust.
7280
7281 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
7282 and Akim Demaille <akim@epita.fr>
7283
7284 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
7285 what's left on the stack when the error recovery hits EOF.
7286 * tests/actions.at (Destructors): Complete to exercise this case.
7287
7288 2002-06-17 Akim Demaille <akim@epita.fr>
7289
7290 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
7291 arguments is really empty, not only equal to `[]'.
7292 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
7293 member.
7294 (symbol_destructor_set): New.
7295 * src/output.c (symbol_destructors_output): New.
7296 * src/reader.h (brace_code_t, current_braced_code): New.
7297 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
7298 (handle_dollar): Rename as...
7299 (handle_action_dollar): this.
7300 (handle_destructor_dollar): New.
7301 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
7302 (grammar_declaration): Use it.
7303 * data/bison.simple (yystos): Is always defined.
7304 (yydestructor): New.
7305 * tests/actions.at (Destructors): New.
7306 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
7307
7308 2002-06-17 Akim Demaille <akim@epita.fr>
7309
7310 * src/symlist.h, src/symlist.c (symbol_list_length): New.
7311 * src/scan-gram.l (handle_dollar, handle_at): Compute the
7312 rule_length only when needed.
7313 * src/output.c (actions_output, token_definitions_output): Output
7314 the full M4 block.
7315 * src/symtab.c: Don't access directly to the symbol tag, use
7316 symbol_tag_get.
7317 * src/parse-gram.y: Use symbol_list_free.
7318
7319 2002-06-17 Akim Demaille <akim@epita.fr>
7320
7321 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
7322 (symbol_list_prepend, get_type_name): Move to...
7323 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
7324 (symbol_list_prepend, symbol_list_n_type_name_get): here.
7325 Adjust all callers.
7326 (symbol_list_free): New.
7327 * src/scan-gram.l (handle_dollar): Takes a location.
7328 * tests/input.at (Invalid $n): Adjust.
7329
7330 2002-06-17 Akim Demaille <akim@epita.fr>
7331
7332 * src/reader.h, src/reader.c (symbol_list_new): Export it.
7333 (symbol_list_prepend): New.
7334 * src/parse-gram.y (%union): `list' is a new member.
7335 (symbols.1): New, replaces...
7336 (terms_to_prec.1, nterms_to_type.1): these.
7337 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
7338 Take a location as additional argument.
7339 Adjust all callers.
7340
7341 2002-06-15 Akim Demaille <akim@epita.fr>
7342
7343 * src/parse-gram.y: Move %token in the declaration section so that
7344 we don't depend upon CVS Bison.
7345
7346 2002-06-15 Akim Demaille <akim@epita.fr>
7347
7348 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
7349 * src/print.c (print_core): Use it.
7350
7351 2002-06-15 Akim Demaille <akim@epita.fr>
7352
7353 * src/conflicts.c (log_resolution): Accept the rule involved in
7354 the sr conflicts instead of the lookahead number that points to
7355 that rule.
7356 (flush_reduce): Accept the current lookahead vector as argument,
7357 instead of the index in LA.
7358 (resolve_sr_conflict): Accept the current number of lookahead
7359 bitset to consider for the STATE, instead of the index in LA.
7360 (set_conflicts): Adjust.
7361 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
7362
7363 2002-06-15 Akim Demaille <akim@epita.fr>
7364
7365 * src/state.h (state_t): Replace the `lookaheadsp' member, a
7366 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
7367 Adjust all dependencies.
7368 * src/lalr.c (initialize_lookaheads): Split into...
7369 (states_lookaheads_count, states_lookaheads_initialize): these.
7370 (lalr): Adjust.
7371
7372 2002-06-15 Akim Demaille <akim@epita.fr>
7373
7374 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
7375 out of...
7376 (grammar_rules_print): here.
7377 * src/reduce.c (reduce_output): Use it.
7378 * tests/reduce.at (Useless Rules, Reduced Automaton)
7379 (Underivable Rules): Adjust.
7380
7381 2002-06-15 Akim Demaille <akim@epita.fr>
7382
7383 Copy BYacc's nice way to report the grammar.
7384
7385 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
7386 New.
7387 Don't print the rules' location, it is confusing and useless.
7388 (rule_print): Use grammar_rhs_print.
7389 * src/print.c (print_grammar): Use grammar_rules_print.
7390
7391 2002-06-15 Akim Demaille <akim@epita.fr>
7392
7393 Complete and rationalize `useless thing' warnings.
7394
7395 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
7396 (symbol_tag_print): New.
7397 Use them everywhere in place of accessing directly the tag member.
7398 * src/gram.h, src/gram.c (rule_print): New.
7399 Use it where a rule used to be printed `by hand'.
7400 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
7401 (reduce_grammar_tables): Report the useless rules.
7402 (reduce_print): Useless things are a warning, not an error.
7403 Report it as such.
7404 * tests/reduce.at (Useless Nonterminals, Useless Rules):
7405 (Reduced Automaton, Underivable Rules): Adjust.
7406 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
7407 * tests/conflicts.at (Unresolved SR Conflicts)
7408 (Solved SR Conflicts): Adjust.
7409
7410 2002-06-15 Akim Demaille <akim@epita.fr>
7411
7412 Let symbols have a location.
7413
7414 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
7415 (getsym): Adjust.
7416 Adjust all callers.
7417 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
7418 Use location_t, not int.
7419 * src/symtab.c (symbol_check_defined): Take advantage of the
7420 location.
7421 * tests/regression.at (Invalid inputs): Adjust.
7422
7423 2002-06-15 Akim Demaille <akim@epita.fr>
7424
7425 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
7426 (input): Don't try to initialize yylloc here, do it in the
7427 scanner.
7428 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
7429 * src/gram.h (rule_t): Change line and action_line into location
7430 and action_location, of location_t type.
7431 Adjust all dependencies.
7432 * src/location.h, src/location.c (empty_location): New.
7433 * src/reader.h, src/reader.c (grammar_start_symbol_set)
7434 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
7435 (grammar_current_rule_symbol_append)
7436 (grammar_current_rule_action_append): Expect a location as argument.
7437 * src/reader.c (grammar_midrule_action): Adjust to attach an
7438 action's location as dummy symbol location.
7439 * src/symtab.h, src/symtab.c (startsymbol_location): New.
7440 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
7441 the line numbers.
7442
7443 2002-06-14 Akim Demaille <akim@epita.fr>
7444
7445 Grammar declarations may be found in the grammar section.
7446
7447 * src/parse-gram.y (rules_or_grammar_declaration): New.
7448 (declarations): Each declaration may end with a semicolon, not
7449 just...
7450 (grammar_declaration): `"%union"'.
7451 (grammar): Branch to rules_or_grammar_declaration.
7452
7453 2002-06-14 Akim Demaille <akim@epita.fr>
7454
7455 * src/main.c (main): Invoke scanner_free.
7456
7457 2002-06-14 Akim Demaille <akim@epita.fr>
7458
7459 * src/output.c (m4_invoke): Extracted from...
7460 (output_skeleton): here.
7461 Free tempfile.
7462
7463 2002-06-14 Akim Demaille <akim@epita.fr>
7464
7465 * src/parse-gram.y (directives, directive, gram)
7466 (grammar_directives, precedence_directives, precedence_directive):
7467 Rename as...
7468 (declarations, declaration, grammar, grammar_declaration)
7469 (precedence_declaration, precedence_declarator): these.
7470 (symbol_declaration): New.
7471
7472 2002-06-14 Akim Demaille <akim@epita.fr>
7473
7474 * src/files.c (action_obstack): Remove, unused.
7475 (output_obstack): Remove it, and all its dependencies, as it is no
7476 longer needed.
7477 * src/reader.c (epilogue_set): Build the epilogue in the
7478 muscle_obstack.
7479 * src/output.h, src/output.c (muscle_obstack): Move to...
7480 * src/muscle_tab.h, src/muscle_tab.h: here.
7481 (muscle_init): Initialize muscle_obstack.
7482 (muscle_free): New.
7483 * src/main.c (main): Call it.
7484
7485 2002-06-14 Akim Demaille <akim@epita.fr>
7486
7487 * src/location.h: New, extracted from...
7488 * src/reader.h: here.
7489 * src/Makefile.am (noinst_HEADERS): Merge into
7490 (bison_SOURCES): this.
7491 Add location.h.
7492 * src/parse-gram.y: Use location_t instead of Bison's.
7493 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
7494 Use location_t instead of ints.
7495
7496 2002-06-14 Akim Demaille <akim@epita.fr>
7497
7498 * data/bison.simple, data/bison.c++: Be sure to restore the
7499 current #line when returning to the skeleton contents after having
7500 exposed the input file's #line.
7501
7502 2002-06-12 Akim Demaille <akim@epita.fr>
7503
7504 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
7505 eager.
7506 * tests/actions.at (Exotic Dollars): New.
7507
7508 2002-06-12 Akim Demaille <akim@epita.fr>
7509
7510 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
7511 ['"/] too eagerly.
7512 * tests/input.at (Torturing the Scanner): New.
7513
7514 2002-06-11 Akim Demaille <akim@epita.fr>
7515
7516 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
7517 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
7518 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
7519 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
7520 * src/reader.c (reader): Use it.
7521
7522 2002-06-11 Akim Demaille <akim@epita.fr>
7523
7524 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
7525 Adjust all callers.
7526 (scanner_last_string_free): New.
7527
7528 2002-06-11 Akim Demaille <akim@epita.fr>
7529
7530 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
7531 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
7532 (last_string, YY_OBS_FREE): New.
7533 Use them when returning an ID.
7534
7535 2002-06-11 Akim Demaille <akim@epita.fr>
7536
7537 Have Bison grammars parsed by a Bison grammar.
7538
7539 * src/reader.c, src/reader.h (prologue_augment): New.
7540 * src/reader.c (copy_definition): Remove.
7541
7542 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
7543 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
7544 (grammar_current_rule_prec_set, grammar_current_rule_check)
7545 (grammar_current_rule_symbol_append)
7546 (grammar_current_rule_action_append): Export.
7547 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
7548 (symbol_list_action_append): Remove.
7549 Hook the routines from reader.
7550 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
7551 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
7552
7553 * src/reader.c (read_declarations): Remove, unused.
7554
7555 * src/parse-gram.y: Handle the epilogue.
7556 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
7557 (grammar_start_symbol_set): this.
7558 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
7559 * src/reader.c (readgram): Remove, unused.
7560 (reader): Adjust to insert eoftoken and axiom where appropriate.
7561
7562 * src/reader.c (copy_dollar): Replace with...
7563 * src/scan-gram.h (handle_dollar): this.
7564 * src/parse-gram.y: Remove `%thong'.
7565
7566 * src/reader.c (copy_at): Replace with...
7567 * src/scan-gram.h (handle_at): this.
7568
7569 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
7570 New.
7571
7572 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
7573 time being.
7574
7575 * src/reader.h, src/reader.c (grammar_rule_end): New.
7576
7577 * src/parse.y (current_type, current_class): New.
7578 Implement `%nterm', `%token' support.
7579 Merge `%term' into `%token'.
7580 (string_as_id): New.
7581 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
7582 type name.
7583
7584 * src/parse-gram.y: Be sure to handle properly the beginning of
7585 rules.
7586
7587 * src/parse-gram.y: Handle %type.
7588 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
7589
7590 * src/parse-gram.y: More directives support.
7591 * src/options.c: No longer handle source directives.
7592
7593 * src/parse-gram.y: Fix %output.
7594
7595 * src/parse-gram.y: Handle %union.
7596 Use the prologue locations.
7597 * src/reader.c (parse_union_decl): Remove.
7598
7599 * src/reader.h, src/reader.c (epilogue_set): New.
7600 * src/parse-gram.y: Use it.
7601
7602 * data/bison.simple, data/bison.c++: b4_stype is now either not
7603 defined, then default to int, or to the contents of %union,
7604 without `union' itself.
7605 Adjust.
7606 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
7607
7608 * src/output.c (actions_output): Don't output braces, as they are
7609 already handled by the scanner.
7610
7611 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
7612 characters to themselves.
7613
7614 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
7615 that the epilogue has a proper #line.
7616
7617 * src/parse-gram.y: Handle precedence/associativity.
7618
7619 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
7620 a terminal.
7621 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
7622 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
7623 at all to define terminals that cannot be emitted.
7624
7625 * src/scan-gram.l: Escape M4 characters.
7626
7627 * src/scan-gram.l: Working properly with escapes in user
7628 strings/characters.
7629
7630 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
7631 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
7632 grammar.
7633 Use more modest sizes, as for the time being the parser does not
7634 release memory, and therefore the process swallows a huge amount
7635 of memory.
7636
7637 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
7638 stricter %token grammar.
7639
7640 * src/symtab.h (associativity): Add `undef_assoc'.
7641 (symbol_precedence_set): Do nothing when passed an undef_assoc.
7642 * src/symtab.c (symbol_check_alias_consistence): Adjust.
7643
7644 * tests/regression.at (Invalid %directive): Remove, as it is now
7645 meaningless.
7646 (Invalid inputs): Adjust to the new error messages.
7647 (Token definitions): The new grammar doesn't allow too many
7648 eccentricities.
7649
7650 * src/lex.h, src/lex.c: Remove.
7651 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
7652 (copy_character, copy_string2, copy_string, copy_identifier)
7653 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
7654 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
7655 (parse_action): Remove.
7656 * po/POTFILES.in: Adjust.
7657
7658 2002-06-11 Akim Demaille <akim@epita.fr>
7659
7660 * src/reader.c (parse_action): Don't store directly into the
7661 rule's action member: return the action as a string.
7662 Don't require `rule_length' as an argument: compute it.
7663 (grammar_current_rule_symbol_append)
7664 (grammar_current_rule_action_append): New, eved out from
7665 (readgram): here.
7666 Remove `action_flag', `rulelength', unused now.
7667
7668 2002-06-11 Akim Demaille <akim@epita.fr>
7669
7670 * src/reader.c (grammar_current_rule_prec_set).
7671 (grammar_current_rule_check): New, eved out from...
7672 (readgram): here.
7673 Remove `xaction', `first_rhs': useless.
7674 * tests/input.at (Type clashes): New.
7675 * tests/existing.at (GNU Cim Grammar): Adjust.
7676
7677 2002-06-11 Akim Demaille <akim@epita.fr>
7678
7679 * src/reader.c (grammar_midrule_action): New, Eved out from
7680 (readgram): here.
7681
7682 2002-06-11 Akim Demaille <akim@epita.fr>
7683
7684 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
7685 New.
7686 (readgram): Use them as replacement of inlined code, crule and
7687 crule1.
7688
7689 2002-06-11 Akim Demaille <akim@epita.fr>
7690
7691 * src/reader.c (grammar_end, grammar_symbol_append): New.
7692 (readgram): Use them.
7693 Make the use of `p' as local as possible.
7694
7695 2002-06-10 Akim Demaille <akim@epita.fr>
7696
7697 GCJ's parser requires the tokens to be defined before the prologue.
7698
7699 * data/bison.simple: Output the token definition before the user's
7700 prologue.
7701 * tests/regression.at (Braces parsing, Duplicate string)
7702 (Mixing %token styles): Check the output from bison.
7703 (Early token definitions): New.
7704
7705 2002-06-10 Akim Demaille <akim@epita.fr>
7706
7707 * src/symtab.c (symbol_user_token_number_set): Don't complain when
7708 assigning twice the same user number to a token, so that we can
7709 use it in...
7710 * src/lex.c (lex): here.
7711 Also use `symbol_class_set' instead of hand written code.
7712 * src/reader.c (parse_assoc_decl): Likewise.
7713
7714 2002-06-10 Akim Demaille <akim@epita.fr>
7715
7716 * src/symtab.c, src/symtab.c (symbol_class_set)
7717 (symbol_user_token_number_set): New.
7718 * src/reader.c (parse_token_decl): Use them.
7719 Use a switch instead of ifs.
7720 Use a single argument.
7721
7722 2002-06-10 Akim Demaille <akim@epita.fr>
7723
7724 Remove `%thong' support as it is undocumented, unused, duplicates
7725 `%token's job, and creates useless e-mail traffic with people who
7726 want to know what it is, why it is undocumented, unused, and
7727 duplicates `%token's job.
7728
7729 * src/reader.c (parse_thong_decl): Remove.
7730 * src/options.c (option_table): Remove "thong".
7731 * src/lex.h (tok_thong): Remove.
7732
7733 2002-06-10 Akim Demaille <akim@epita.fr>
7734
7735 * src/symtab.c, src/symtab.c (symbol_type_set)
7736 (symbol_precedence_set): New.
7737 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
7738 (value_components_used): Remove, unused.
7739
7740 2002-06-09 Akim Demaille <akim@epita.fr>
7741
7742 Move symbols handling code out of the reader.
7743
7744 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
7745 (axiom): Move to...
7746 * src/symtab.h, src/symtab.c: here.
7747
7748 * src/gram.c (start_symbol): Remove: use startsymbol->number.
7749 * src/reader.c (startval): Rename as...
7750 * src/symtab.h, src/symtab.c (startsymbol): this.
7751 * src/reader.c: Adjust.
7752
7753 * src/reader.c (symbol_check_defined, symbol_make_alias)
7754 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
7755 (token_translations_init)
7756 Move to...
7757 * src/symtab.c: here.
7758 * src/reader.c (packsymbols): Move to...
7759 * src/symtab.h, src/symtab.c (symbols_pack): here.
7760 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
7761 argument.
7762
7763 2002-06-03 Akim Demaille <akim@epita.fr>
7764
7765 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
7766 then statements.
7767
7768 2002-06-03 Akim Demaille <akim@epita.fr>
7769
7770 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
7771 structs with non literals.
7772 * src/scan-skel.l: never-interactive.
7773 * src/conflicts.c (enum conflict_resolution_e): No trailing
7774 comma.
7775 * src/getargs.c (usage): Split long literal strings.
7776 Reported by Hans Aberg.
7777
7778 2002-05-28 Akim Demaille <akim@epita.fr>
7779
7780 * data/bison.c++: Use C++ ostreams.
7781 (cdebug_): New member.
7782
7783 2002-05-28 Akim Demaille <akim@epita.fr>
7784
7785 * src/output.c (output_skeleton): Be sure to allocate enough room
7786 for `/' _and_ for `\0' in full_skeleton.
7787
7788 2002-05-28 Akim Demaille <akim@epita.fr>
7789
7790 * data/bison.c++: Catch up with bison.simple:
7791 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7792 and Paul Eggert <eggert@twinsun.com>: `error' handing.
7793 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
7794 and popping traces.
7795
7796 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7797
7798 * src/output.c (output_skeleton): Put an explicit path in front of
7799 the skeleton file name, rather than relying on the -I directory,
7800 to partially alleviate effects of having a skeleton file lying around
7801 in the current directory.
7802
7803 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7804
7805 * src/conflicts.c (log_resolution): Correct typo:
7806 obstack_printf should be obstack_fgrow1.
7807
7808 2002-05-26 Akim Demaille <akim@epita.fr>
7809
7810 * src/state.h (state_t): `solved_conflicts' is a new member.
7811 * src/LR0.c (new_state): Set it to 0.
7812 * src/conflicts.h, src/conflicts.c (print_conflicts)
7813 (free_conflicts, solve_conflicts): Rename as...
7814 (conflicts_print, conflicts_free, conflicts_solve): these.
7815 Adjust callers.
7816 * src/conflicts.c (enum conflict_resolution_e)
7817 (solved_conflicts_obstack): New, used by...
7818 (log_resolution): this.
7819 Adjust to attach the conflict resolution to each state.
7820 Complete the description with the precedence/associativity
7821 information.
7822 (resolve_sr_conflict): Adjust.
7823 * src/print.c (print_state): Output its solved_conflicts.
7824 * tests/conflicts.at (Unresolved SR Conflicts)
7825 (Solved SR Conflicts): Exercise --report=all.
7826
7827 2002-05-26 Akim Demaille <akim@epita.fr>
7828
7829 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
7830 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
7831 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
7832 (token_number_t, item_number_as_token_number)
7833 (token_number_as_item_number, muscle_insert_token_number_table):
7834 Rename as...
7835 (symbol_number_t, item_number_as_symbol_number)
7836 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
7837 these, since it is more appropriate.
7838
7839 2002-05-26 Akim Demaille <akim@epita.fr>
7840
7841 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
7842 `Error:' lines.
7843 * data/bison.simple (yystos) [YYDEBUG]: New.
7844 (yyparse) [YYDEBUG]: Display the symbols which are popped during
7845 error recovery.
7846 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
7847
7848 2002-05-25 Akim Demaille <akim@epita.fr>
7849
7850 * doc/bison.texinfo (Debugging): Split into...
7851 (Tracing): this new section, its former contents, and...
7852 (Understanding): this new section.
7853 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
7854 by...
7855 (report_flag): this.
7856 Adjust all dependencies.
7857 (report_args, report_types, report_argmatch): New.
7858 (usage, getargs): Report/support -r, --report.
7859 * src/options.h
7860 (struct option_table_struct): Rename as..,
7861 (struct option_table_s): this.
7862 Rename the `set_flag' member to `flag' to match with getopt_long's
7863 struct.
7864 * src/options.c (option_table): Split verbose into an entry for
7865 %verbose, and another for --verbose.
7866 Support --report/-r, so remove -r from the obsolete --raw.
7867 * src/print.c: Attach full item sets and lookaheads reports to
7868 report_flag instead of trace_flag.
7869 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
7870
7871 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7872 and Paul Eggert <eggert@twinsun.com>
7873
7874 * data/bison.simple (yyparse): Correct error handling to conform to
7875 POSIX and yacc. Specifically, after syntax error is discovered,
7876 do not reduce further before shifting the error token.
7877 Clean up the code a bit by removing the labels yyerrdefault,
7878 yyerrhandle, yyerrpop.
7879 * NEWS: Document the above.
7880
7881 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7882
7883 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
7884 type; it isn't always big enough, since it doesn't necessarily
7885 include non-terminals.
7886 (yytranslate): Expand definition of yy_token_number_type, so that
7887 the latter can be removed.
7888 (yy_token_number_type): Remove, only one use.
7889 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
7890 don't use TokenNumberType as element type.
7891
7892 * tests/regression.at: Modify expected output to agree with change
7893 to yyr1 and yytranslate.
7894
7895 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
7896
7897 * src/reader.c (parse_action): Use copy_character instead of
7898 obstack_1grow.
7899
7900 2002-05-13 Akim Demaille <akim@epita.fr>
7901
7902 * tests/regression.at (Token definitions): Prototype yylex and
7903 yyerror.
7904
7905 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7906
7907 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
7908 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
7909 32-bit arithmetic.
7910 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
7911
7912 2002-05-07 Akim Demaille <akim@epita.fr>
7913
7914 * tests/synclines.at: Be sure to prototype yylex and yyerror to
7915 avoid GCC warnings.
7916
7917 2002-05-07 Akim Demaille <akim@epita.fr>
7918
7919 Kill GCC warnings.
7920
7921 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
7922 over the RHS of each rule.
7923 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
7924 * src/state.h (state_t): Member `nitems' is unsigned short.
7925 * src/LR0.c (get_state): Adjust.
7926 * src/reader.c (packgram): Likewise.
7927 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
7928 `Type'.
7929 (muscle_insert_int_table): Remove, unused.
7930 (prepare_rules): Remove `max'.
7931
7932 2002-05-06 Akim Demaille <akim@epita.fr>
7933
7934 * src/closure.c (print_firsts): Display of the symbol tags.
7935 (bitmatrix_print): Move to...
7936 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
7937 here.
7938 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
7939
7940 2002-05-06 Akim Demaille <akim@epita.fr>
7941
7942 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
7943 hash_do_for_each.
7944
7945 2002-05-06 Akim Demaille <akim@epita.fr>
7946
7947 * src/LR0.c (new_state, get_state): Instead of using the global
7948 `kernel_size' and `kernel_base', have two new arguments:
7949 `core_size' and `core'.
7950 Adjust callers.
7951
7952 2002-05-06 Akim Demaille <akim@epita.fr>
7953
7954 * src/reader.c (packgram): No longer end `ritem' with a 0
7955 sentinel: it is not used.
7956
7957 2002-05-05 Akim Demaille <akim@epita.fr>
7958
7959 New experimental feature: display the lookaheads in the report and
7960 graph.
7961
7962 * src/print (print_core): When --trace-flag, display the rules
7963 lookaheads.
7964 * src/print_graph.c (print_core): Likewise.
7965 Swap the arguments.
7966 Adjust caller.
7967
7968 2002-05-05 Akim Demaille <akim@epita.fr>
7969
7970 * tests/torture.at (Many lookaheads): New test.
7971
7972 2002-05-05 Akim Demaille <akim@epita.fr>
7973
7974 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
7975 (GENERATE_MUSCLE_INSERT_TABLE): this.
7976 (output_int_table, output_unsigned_int_table, output_short_table)
7977 (output_token_number_table, output_item_number_table): Replace with...
7978 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
7979 (muscle_insert_short_table, muscle_insert_token_number_table)
7980 (muscle_insert_item_number_table): these.
7981 Adjust all callers.
7982 (prepare_tokens): Don't free `translations', since...
7983 * src/reader.h, src/reader.c (grammar_free): do it.
7984 Move to...
7985 * src/gram.h, src/gram.c (grammar_free): here.
7986 * data/bison.simple, data/bison.c++: b4_token_number_max is now
7987 b4_translate_max.
7988
7989 2002-05-05 Akim Demaille <akim@epita.fr>
7990
7991 * src/output.c (output_unsigned_int_table): New.
7992 (prepare_rules): `i' is unsigned.
7993 `prhs', `rline', `r2' are unsigned int.
7994 Rename muscle `rhs_number_max' as `rhs_max'.
7995 Output muscles `prhs_max', `rline_max', and `r2_max'.
7996 Free rline and r1.
7997 * data/bison.simple, data/bison.c++: Adjust to use these muscles
7998 to compute types instead of constant types.
7999 * tests/regression.at (Web2c Actions): Adjust.
8000
8001 2002-05-04 Akim Demaille <akim@epita.fr>
8002
8003 * src/symtab.h (SALIAS, SUNDEF): Rename as...
8004 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
8005 Adjust dependencies.
8006 * src/output.c (token_definitions_output): Be sure not to output a
8007 `#define 'a'' when fed with `%token 'a' "a"'.
8008 * tests/regression.at (Token definitions): New.
8009
8010 2002-05-03 Paul Eggert <eggert@twinsun.com>
8011
8012 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
8013 for K&R C.
8014
8015 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
8016
8017 * Makefile.am (SUBDIRS): Remove intl.
8018 (EXTRA_DIST): Add config/config.rpath.
8019
8020 2002-05-03 Akim Demaille <akim@epita.fr>
8021
8022 * data/bison.simple (m4_if): Don't output empty enums.
8023 And actually, output valid enum definitions :(.
8024
8025 2002-05-03 Akim Demaille <akim@epita.fr>
8026
8027 * configure.bat: Remove, completely obsolete.
8028 * Makefile.am (EXTRA_DIST): Adjust.
8029 Don't distribute config.rpath...
8030 * config/Makefile.am (EXTRA_DIST): Do it.
8031
8032 2002-05-03 Akim Demaille <akim@epita.fr>
8033
8034 * configure.in (GETTEXT_VERSION): New.
8035 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
8036
8037 2002-05-03 Akim Demaille <akim@epita.fr>
8038
8039 * data/bison.simple (b4_token_enum): New.
8040 (b4_token_defines): Use it to output tokens both as #define and
8041 enums.
8042 Suggested by Paul Eggert.
8043 * src/output.c (token_definitions_output): Don't output spurious
8044 white spaces.
8045
8046 2002-05-03 Akim Demaille <akim@epita.fr>
8047
8048 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
8049
8050 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
8051
8052 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
8053 Update the stack class, give a try to deque as the default container.
8054
8055 2002-05-02 Akim Demaille <akim@epita.fr>
8056
8057 * data/bison.simple (yyparse): Do not implement @$ = @1.
8058 (YYLLOC_DEFAULT): Adjust to do it.
8059 * doc/bison.texinfo (Location Default Action): Fix.
8060
8061 2002-05-02 Akim Demaille <akim@epita.fr>
8062
8063 * src/reader.c (parse_braces): Merge into...
8064 (parse_action): this.
8065
8066 2002-05-02 Akim Demaille <akim@epita.fr>
8067
8068 * configure.in (ALL_LINGUAS): Remove.
8069 * po/LINGUAS, hr.po: New.
8070
8071 2002-05-02 Akim Demaille <akim@epita.fr>
8072
8073 Remove the so called hairy (semantic) parsers.
8074
8075 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
8076 * src/gram.h, src/gram.c (semantic_parser): Remove.
8077 (rule_t): Remove the guard and guard_line members.
8078 * src/lex.h (token_t): remove tok_guard.
8079 * src/options.c (option_table): Remove %guard and %semantic_parser
8080 support.
8081 * src/output.c, src/output.h (guards_output): Remove.
8082 (prepare): Adjust.
8083 (token_definitions_output): Don't output the `T'
8084 tokens (???).
8085 (output_skeleton): Don't output the guards.
8086 * src/files.c, src/files.c (attrsfile): Remove.
8087 * src/reader.c (symbol_list): Remove the guard and guard_line
8088 members.
8089 Adjust dependencies.
8090 (parse_guard): Remove.
8091 * data/bison.hairy: Remove.
8092 * doc/bison.texinfo (Environment Variables): Remove occurrences of
8093 BISON_HAIRY.
8094
8095 2002-05-02 Akim Demaille <akim@epita.fr>
8096
8097 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
8098 (parse_guard): Rename the formal argument `stack_offset' as
8099 `rule_length', which is more readable.
8100 Adjust callers.
8101 (copy_at, copy_dollar): Instead of outputting the hard coded
8102 values of $$, $n and so forth, output invocation to b4_lhs_value,
8103 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
8104 Note: this patch partially drops `semantic-parser' support: it
8105 always does `rule_length - n', where semantic parsers ought to
8106 always use `-n'.
8107 * data/bison.simple, data/bison.c++ (b4_lhs_value)
8108 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
8109
8110 2002-05-02 Akim Demaille <akim@epita.fr>
8111
8112 * configure.in (AC_INIT): Bump to 1.49b.
8113 (AM_INIT_AUTOMAKE): Short invocation.
8114
8115 2002-05-02 Akim Demaille <akim@epita.fr>
8116
8117 Version 1.49a.
8118
8119 2002-05-01 Akim Demaille <akim@epita.fr>
8120
8121 * src/skeleton.h: Remove.
8122
8123 2002-05-01 Akim Demaille <akim@epita.fr>
8124
8125 * src/skeleton.h: Fix the #endif.
8126 Reported by Magnus Fromreide.
8127
8128 2002-04-26 Paul Eggert <eggert@twinsun.com>
8129
8130 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
8131 Define if we define YYSTYPE and YYLTYPE, respectively.
8132 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8133
8134 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
8135
8136 * src/scan-skel.l: Postprocess quadrigraphs.
8137
8138 * src/reader.c (copy_character): New function, used to output
8139 single characters while replacing `[' and `]' with quadrigraphs, to
8140 avoid troubles with M4 quotes.
8141 (copy_comment): Output characters with copy_character.
8142 (read_additionnal_code): Likewise.
8143 (copy_string2): Likewise.
8144 (copy_definition): Likewise.
8145
8146 * tests/calc.at: Exercise M4 quoting.
8147
8148 2002-04-25 Akim Demaille <akim@epita.fr>
8149
8150 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
8151 between `!' and the command.
8152 Reported by Paul Eggert.
8153
8154 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
8155
8156 * tests/calc.at: Exercise prologue splitting.
8157
8158 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
8159 `b4_post_prologue' instead of `b4_prologue'.
8160
8161 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
8162 muscles.
8163 (output): Free pre_prologue_obstack and post_prologue_obstack.
8164 * src/files.h, src/files.c (attrs_obstack): Remove.
8165 (pre_prologue_obstack, post_prologue_obstack): New.
8166 * src/reader.c (copy_definition): Add a parameter to specify the
8167 obstack to fill, instead of using attrs_obstack unconditionally.
8168 (read_declarations): Pass pre_prologue_obstack to copy_definition if
8169 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
8170
8171 2002-04-23 Paul Eggert <eggert@twinsun.com>
8172
8173 * data/bison.simple: Remove unnecessary commentary and white
8174 space differences from 1_29-branch.
8175 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
8176
8177 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
8178 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
8179 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
8180 constructors or destructors.
8181
8182 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
8183
8184 2002-04-23 Akim Demaille <akim@epita.fr>
8185
8186 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
8187 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
8188 location with columns.
8189 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
8190 All reported by Paul Eggert.
8191
8192 2002-04-22 Akim Demaille <akim@epita.fr>
8193
8194 * src/reduce.c (dump_grammar): Move to...
8195 * src/gram.h, src/gram.c (grammar_dump): here.
8196 Be sure to separate long item numbers.
8197 Don't read the members of a rule's prec if its nil.
8198
8199 2002-04-22 Akim Demaille <akim@epita.fr>
8200
8201 * src/output.c (table_size, table_grow): New.
8202 (MAXTABLE): Remove, replace uses with table_size.
8203 (pack_vector): Instead of dying when the table is too big, grow it.
8204
8205 2002-04-22 Akim Demaille <akim@epita.fr>
8206
8207 * data/bison.simple (yyr1): Its type is that of a token number.
8208 * data/bison.c++ (r1_): Likewise.
8209 * tests/regression.at (Web2c Actions): Adjust.
8210
8211 2002-04-22 Akim Demaille <akim@epita.fr>
8212
8213 * src/reader.c (token_translations_init): 256 is now the default
8214 value for the error token, i.e., it will be assigned another
8215 number if the user assigned 256 to one of her tokens.
8216 (reader): Don't force 256 to error.
8217 * doc/bison.texinfo (Symbols): Adjust.
8218 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
8219 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
8220 etc. instead of 10, 20, 30 (which was used to `jump' over error
8221 (256) and undefined (2)).
8222
8223 2002-04-22 Akim Demaille <akim@epita.fr>
8224
8225 Propagate more token_number_t.
8226
8227 * src/gram.h (token_number_as_item_number)
8228 (item_number_as_token_number): New.
8229 * src/output.c (GENERATE_OUTPUT_TABLE): New.
8230 Use it to create output_item_number_table and
8231 output_token_number_table.
8232 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
8233 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
8234 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
8235 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
8236
8237 2002-04-22 Akim Demaille <akim@epita.fr>
8238
8239 * src/output.h, src/output.c (get_lines_number): Remove.
8240
8241 2002-04-19 Akim Demaille <akim@epita.fr>
8242
8243 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
8244 as Lex/Flex'.
8245 (Debugging): More details about enabling the debugging features.
8246 (Table of Symbols): Describe $$, $n, @$, and @n.
8247 Suggested by Tim Josling.
8248
8249 2002-04-19 Akim Demaille <akim@epita.fr>
8250
8251 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
8252
8253 2002-04-10 Akim Demaille <akim@epita.fr>
8254
8255 * src/system.h: Rely on HAVE_LIMITS_H.
8256 Suggested by Paul Eggert.
8257
8258 2002-04-09 Akim Demaille <akim@epita.fr>
8259
8260 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
8261 full stderr, and strip it according to the bison options, instead
8262 of composing the error message from different bits.
8263 This makes it easier to check for several error messages.
8264 Adjust all the invocations.
8265 Add an invocation exercising the error token.
8266 Add an invocation demonstrating a stupid error message.
8267 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
8268 Adjust the tests.
8269 Error message are for stderr, not stdout.
8270
8271 2002-04-09 Akim Demaille <akim@epita.fr>
8272
8273 * src/gram.h, src/gram.c (error_token_number): Remove, use
8274 errtoken->number.
8275 * src/reader.c (reader): Don't specify the user token number (2)
8276 for $undefined, as it uselessly prevents using it.
8277 * src/gram.h (token_number_t): Move to...
8278 * src/symtab.h: here.
8279 (state_t.number): Is a token_number_t.
8280 * src/print.c, src/reader.c: Use undeftoken->number instead of
8281 hard coded 2.
8282 (Even though this 2 is not the same as above: the number of the
8283 undeftoken remains being 2, it is its user token number which
8284 might not be 2).
8285 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
8286 `user_token_number_max'.
8287 Output `undef_token_number'.
8288 * data/bison.simple, data/bison.c++: Use them.
8289 Be sure to map invalid yylex return values to
8290 `undef_token_number'. This saves us from gratuitous SEGV.
8291
8292 * tests/conflicts.at (Solved SR Conflicts)
8293 (Unresolved SR Conflicts): Adjust.
8294 * tests/regression.at (Web2c Actions): Adjust.
8295
8296 2002-04-08 Akim Demaille <akim@epita.fr>
8297
8298 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
8299 Adding #line.
8300 Remove the duplicate `typedefs'.
8301 (RhsNumberType): Fix the declaration and various other typos.
8302 Use __ofile__.
8303 * data/bison.simple: Use __ofile__.
8304 * src/scan-skel.l: Handle __ofile__.
8305
8306 2002-04-08 Akim Demaille <akim@epita.fr>
8307
8308 * src/gram.h (item_number_t): New, the type of item numbers in
8309 RITEM. Note that it must be able to code symbol numbers as
8310 positive number, and the negation of rule numbers as negative
8311 numbers.
8312 Adjust all dependencies (pretty many).
8313 * src/reduce.c (rule): Remove this `short *' pointer: use
8314 item_number_t.
8315 * src/system.h (MINSHORT, MAXSHORT): Remove.
8316 Include `limits.h'.
8317 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
8318 (shortcpy): Remove.
8319 (MAXTABLE): Move to...
8320 * src/output.c (MAXTABLE): here.
8321 (prepare_rules): Use output_int_table to output rhs.
8322 * data/bison.simple, data/bison.c++: Adjust.
8323 * tests/torture.at (Big triangle): Move the limit from 254 to
8324 500.
8325 * tests/regression.at (Web2c Actions): Ajust.
8326
8327 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
8328 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
8329 passes, but produces negative #line number, once fixed, GCC is
8330 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
8331 C), it passes.
8332 * src/state.h (state_h): Code input lines on ints, not shorts.
8333
8334 2002-04-08 Akim Demaille <akim@epita.fr>
8335
8336 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
8337 and then the grammar.
8338
8339 2002-04-08 Akim Demaille <akim@epita.fr>
8340
8341 * src/system.h: No longer using strndup.
8342
8343 2002-04-07 Akim Demaille <akim@epita.fr>
8344
8345 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
8346 * src/output.c (output_table_data): Return the longest number.
8347 (prepare_tokens): Output `token_number_max').
8348 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
8349 New.
8350 Use them to define yy_token_number_type/TokenNumberType.
8351 Use this type for yytranslate.
8352 * tests/torture.at (Big triangle): Push the limit from 124 to
8353 253.
8354 * tests/regression.at (Web2c Actions): Adjust.
8355
8356 2002-04-07 Akim Demaille <akim@epita.fr>
8357
8358 * tests/torture.at (Big triangle): New.
8359 (GNU AWK Grammar, GNU Cim Grammar): Move to...
8360 * tests/existing.at: here.
8361
8362 2002-04-07 Akim Demaille <akim@epita.fr>
8363
8364 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
8365 nritems.
8366 Adjust dependencies.
8367
8368 2002-04-07 Akim Demaille <akim@epita.fr>
8369
8370 * src/reader.c: Normalize increments to prefix form.
8371
8372 2002-04-07 Akim Demaille <akim@epita.fr>
8373
8374 * src/reader.c, symtab.c: Remove debugging code.
8375
8376 2002-04-07 Akim Demaille <akim@epita.fr>
8377
8378 Rename all the `bucket's as `symbol_t'.
8379
8380 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
8381 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
8382 * src/symtab.c, src/symtab.h (bucket): Rename as...
8383 (symbol_t): this.
8384 (symbol_list_new, bucket_check_defined, bucket_make_alias)
8385 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
8386 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
8387 (buckets_new, buckets_free, buckets_do): Rename as...
8388 (symbol_list_new, symbol_check_defined, symbol_make_alias)
8389 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
8390 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
8391 (symbols_new, symbols_free, symbols_do): these.
8392
8393 2002-04-07 Akim Demaille <akim@epita.fr>
8394
8395 Use lib/hash for the symbol table.
8396
8397 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
8398 EOF.
8399 * src/lex.c (lex): Set the `number' member of new terminals.
8400 * src/reader.c (bucket_check_defined, bucket_make_alias)
8401 (bucket_check_alias_consistence, bucket_translation): New.
8402 (reader, grammar_free, readgram, token_translations_init)
8403 (packsymbols): Adjust.
8404 (reader): Number the predefined tokens.
8405 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
8406 for predefined tokens.
8407 * src/symtab.h (bucket): Remove all the hash table related
8408 members.
8409 * src/symtab.c (symtab): Replace by...
8410 (bucket_table): this.
8411 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
8412 (buckets_new, buckets_do): New.
8413
8414 2002-04-07 Akim Demaille <akim@epita.fr>
8415
8416 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
8417 (start_symbol, max_user_token_number, semantic_parser)
8418 (error_token_number): Initialize.
8419 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
8420 Initialize.
8421 (reader): Don't.
8422 (errtoken, eoftoken, undeftoken, axiom): Extern.
8423
8424 2002-04-07 Akim Demaille <akim@epita.fr>
8425
8426 * src/gram.h (rule_s): prec and precsym are now pointers
8427 to the bucket giving the priority/associativity.
8428 Member `associativity' removed: useless.
8429 * src/reduce.c, src/conflicts.c: Adjust.
8430
8431 2002-04-07 Akim Demaille <akim@epita.fr>
8432
8433 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
8434 Properly escape the symbols' TAG when outputting them.
8435
8436 2002-04-07 Akim Demaille <akim@epita.fr>
8437
8438 * src/lalr.h (LA): Is a bitsetv, not bitset*.
8439
8440 2002-04-07 Akim Demaille <akim@epita.fr>
8441
8442 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
8443 (LArule): this, which is an array to rule_t*.
8444 * src/print.c, src/conflicts.c: Adjust.
8445
8446 2002-04-07 Akim Demaille <akim@epita.fr>
8447
8448 * src/gram.h (rule_t): Rename `number' as `user_number'.
8449 `number' is a new member.
8450 Adjust dependencies.
8451 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
8452
8453 2002-04-07 Akim Demaille <akim@epita.fr>
8454
8455 As a result of the previous patch, it is no longer needed
8456 to reorder ritem itself.
8457
8458 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
8459
8460 2002-04-07 Akim Demaille <akim@epita.fr>
8461
8462 Be sure never to walk through RITEMS, but use only data related to
8463 the rules themselves. RITEMS should be banished.
8464
8465 * src/output.c (output_token_translations): Rename as...
8466 (prepare_tokens): this.
8467 In addition to `translate', prepare the muscles `tname' and
8468 `toknum', which were handled by...
8469 (output_rule_data): this.
8470 Remove, and move the remainder of its outputs into...
8471 (prepare_rules): this new routines, which also merges content from
8472 (output_gram): this.
8473 (prepare_rules): Be sure never to walk through RITEMS.
8474 (output_stos): Rename as...
8475 (prepare_stos): this.
8476 (output): Always invoke prepare_states, after all, just don't use it
8477 in the output if you don't need it.
8478
8479 2002-04-07 Akim Demaille <akim@epita.fr>
8480
8481 * src/LR0.c (new_state): Display `nstates' as the name of the
8482 newly created state.
8483 Adjust to initialize first_state and last_state if needed.
8484 Be sure to distinguish the initial from the final state.
8485 (new_states): Create the itemset of the initial state, and use
8486 new_state.
8487 * src/closure.c (closure): Now that the initial state has its
8488 items properly set, there is no need for a special case when
8489 creating `ruleset'.
8490
8491 As a result, now the rule 0, reducing to $axiom, is visible in the
8492 outputs. Adjust the test suite.
8493
8494 * tests/conflicts.at (Solved SR Conflicts)
8495 (Unresolved SR Conflicts): Adjust.
8496 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
8497 * tests/conflicts.at (S/R in initial): New.
8498
8499 2002-04-07 Akim Demaille <akim@epita.fr>
8500
8501 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
8502 the RHS of the rules.
8503 * src/output.c (output_gram): Likewise.
8504
8505 2002-04-07 Akim Demaille <akim@epita.fr>
8506
8507 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
8508 bucket.
8509 Adjust all dependencies.
8510 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
8511 `number' of the buckets too.
8512 * src/gram.h: Include `symtab.h'.
8513 (associativity): Move to...
8514 * src/symtab.h: here.
8515 No longer include `gram.h'.
8516
8517 2002-04-07 Akim Demaille <akim@epita.fr>
8518
8519 * src/gram.h, src/gram.c (rules_rhs_length): New.
8520 (ritem_longest_rhs): Use it.
8521 * src/gram.h (rule_t): `number' is a new member.
8522 * src/reader.c (packgram): Set it.
8523 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
8524 the end of `rules', and count them out of `nrules'.
8525 (reduce_output, dump_grammar): Adjust.
8526 * src/print.c (print_grammar): It is no longer needed to check for
8527 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
8528 * tests/reduce.at (Reduced Automaton): New test.
8529
8530 2002-04-07 Akim Demaille <akim@epita.fr>
8531
8532 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
8533 lacking `+ 1' to nrules, Bison reported as useless a token if it
8534 was used solely to set the precedence of the last rule...
8535
8536 2002-04-07 Akim Demaille <akim@epita.fr>
8537
8538 * data/bison.c++, data/bison.simple: Don't output the current file
8539 name in #line, to avoid useless diffs between two identical
8540 outputs under different names.
8541
8542 2002-04-07 Akim Demaille <akim@epita.fr>
8543
8544 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
8545 Normalize loops to using `< nrules + 1', not `<= nrules'.
8546
8547 2002-04-07 Akim Demaille <akim@epita.fr>
8548
8549 * TODO: Update.
8550
8551 2002-04-07 Akim Demaille <akim@epita.fr>
8552
8553 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
8554 bucket.value as bucket.number.
8555
8556 2002-04-07 Akim Demaille <akim@epita.fr>
8557
8558 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
8559 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
8560 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
8561 RHS, instead of being an index in RITEMS.
8562
8563 2002-04-04 Paul Eggert <eggert@twinsun.com>
8564
8565 * doc/bison.texinfo: Update copyright date.
8566 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
8567 (Symbols): Warn about running Bison in one character set,
8568 but compiling and/or running in an incompatible one.
8569 Warn about character code 256, too.
8570
8571 2002-04-03 Paul Eggert <eggert@twinsun.com>
8572
8573 * src/bison.data (YYSTACK_ALLOC): Depend on whether
8574 YYERROR_VERBOSE is nonzero, not whether it is defined.
8575
8576 Merge changes from bison-1_29-branch.
8577
8578 2002-03-20 Paul Eggert <eggert@twinsun.com>
8579
8580 Merge fixes from Debian bison_1.34-1.diff.
8581
8582 * configure.in (AC_PREREQ): 2.53.
8583
8584 2002-03-20 Akim Demaille <akim@epita.fr>
8585
8586 * src/conflicts.c (log_resolution): Argument `resolution' is const.
8587
8588 2002-03-19 Paul Eggert <eggert@twinsun.com>
8589
8590 * src/bison.simple (YYCOPY): New macro.
8591 (YYSTACK_RELOCATE): Use it.
8592 Remove Type arg; no longer needed. All callers changed.
8593 (yymemcpy): Remove; no longer needed.
8594
8595 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
8596 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
8597
8598 2002-03-19 Akim Demaille <akim@epita.fr>
8599
8600 Test and fix the #line outputs.
8601
8602 * tests/atlocal.at (GCC): New.
8603 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
8604 (Prologue synch line, %union synch line, Postprologue synch line)
8605 (Action synch line, Epilogue synch line): New tests.
8606 * src/reader.c (parse_union_decl): Define the muscle stype_line.
8607 * data/bison.simple, data/bison.c++: Use it.
8608
8609 2002-03-19 Akim Demaille <akim@epita.fr>
8610
8611 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
8612 (Solved SR Conflicts, %expect not enough, %expect right)
8613 (%expect too much): Move to...
8614 * tests/conflicts.at: this new file.
8615
8616 2002-03-19 Akim Demaille <akim@epita.fr>
8617
8618 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
8619 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
8620 that we can move to enums for instance.
8621 * src/output.c (token_definitions_output): Output a list of
8622 `token-name, token-number' instead of the #define.
8623 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
8624
8625 2002-03-14 Akim Demaille <akim@epita.fr>
8626
8627 Use Gettext 0.11.1.
8628
8629 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
8630
8631 * data/bison.c++: Make the user able to add members to the generated
8632 parser by subclassing.
8633
8634 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
8635
8636 * src/reader.c (read_additionnal_code): `c' should be an integer, not
8637 a character.
8638 Reported by Nicolas Tisserand and Nicolas Burrus.
8639
8640 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
8641
8642 * src/reader.c: Warn about lacking semi-colons, do not complain.
8643
8644 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
8645
8646 * data/bison.c++: Remove a debug line.
8647
8648 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
8649
8650 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
8651 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
8652 provide a default implementation.
8653
8654 2002-03-04 Akim Demaille <akim@epita.fr>
8655
8656 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
8657 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
8658 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
8659 * tests/semantic.at (Parsing Guards): Similarly.
8660 * src/reader.at (readgram): Complain if the last rule is not ended
8661 with a semi-colon.
8662
8663 2002-03-04 Akim Demaille <akim@epita.fr>
8664
8665 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
8666 * src/closure.c: here.
8667 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
8668 RTC.
8669 * src/warshall.h, src/warshall.c: Remove.
8670 * tests/sets.at (Broken Closure): Adjust.
8671
8672 2002-03-04 Akim Demaille <akim@epita.fr>
8673
8674 * src/output.c (output_skeleton): tempdir is const.
8675 bytes_read is unused.
8676
8677 2002-03-04 Akim Demaille <akim@epita.fr>
8678
8679 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
8680 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
8681 Update.
8682 From Michael Hayes.
8683
8684 2002-03-04 Akim Demaille <akim@epita.fr>
8685
8686 * src/closure.c (closure): `r' is unused.
8687
8688 2002-03-04 Akim Demaille <akim@epita.fr>
8689
8690 * tests/sets.at (Broken Closure): Add the ending `;'.
8691 * src/reader.at (readgram): Complain if a rule is not ended with a
8692 semi-colon.
8693
8694 2002-03-04 Akim Demaille <akim@epita.fr>
8695
8696 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
8697 (count_sr_conflicts): Use bitset_count.
8698 * src/reduce.c (inaccessable_symbols): Ditto.
8699 (bits_size): Remove.
8700 * src/warshall.h, src/warshall.c: Convert to bitsetv.
8701
8702 2002-03-04 Akim Demaille <akim@epita.fr>
8703
8704 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
8705 * src/reduce.c: Remove the `bitset_zero's following the
8706 `bitset_create's, as now it is performed by the latter.
8707
8708 2002-03-04 Akim Demaille <akim@epita.fr>
8709
8710 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
8711 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
8712 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
8713 latest sources from Michael.
8714
8715 2002-03-04 Akim Demaille <akim@epita.fr>
8716
8717 * src/output.c (output): Don't free the grammar.
8718 * src/reader.c (grammar_free): New.
8719 * src/main.c (main): Call it and don't free symtab here.
8720
8721 2002-03-04 Akim Demaille <akim@epita.fr>
8722
8723 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
8724 before returning.
8725 Reported by Benoit Perrot.
8726
8727 2002-03-04 Akim Demaille <akim@epita.fr>
8728
8729 Use bitset operations when possible, not loops over bits.
8730
8731 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
8732 bitset_or.
8733 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
8734 * src/reduce.c (useless_nonterminals): Formatting changes.
8735 * src/warshall.c (TC): Use bitset_or.
8736
8737 2002-03-04 Akim Demaille <akim@epita.fr>
8738
8739 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
8740 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
8741 Ditto.
8742
8743 2002-03-04 Akim Demaille <akim@epita.fr>
8744
8745 * src/lalr.c (F): Now a bitset*.
8746 Adjust all dependencies.
8747
8748 2002-03-04 Akim Demaille <akim@epita.fr>
8749
8750 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
8751 Adjust all dependencies.
8752
8753 2002-03-04 Akim Demaille <akim@epita.fr>
8754
8755 * src/L0.c, src/LR0.h (nstates): Be size_t.
8756 Adjust comparisons (signed vs unsigned).
8757 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
8758 bitset*.
8759 Adjust all dependencies.
8760
8761 2002-03-04 Akim Demaille <akim@epita.fr>
8762
8763 * src/closure.c (firsts): Now, also a bitset.
8764 Adjust all dependencies.
8765 (varsetsize): Remove, now unused.
8766 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
8767
8768 2002-03-04 Akim Demaille <akim@epita.fr>
8769
8770 * src/print.c: Convert to use bitset.h, not hand coded iterations
8771 over ints.
8772
8773 2002-03-04 Akim Demaille <akim@epita.fr>
8774
8775 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
8776
8777 2002-03-04 Akim Demaille <akim@epita.fr>
8778
8779 * src/closure.c (ruleset): Be a bitset.
8780 (rulesetsize): Remove.
8781
8782 2002-03-04 Akim Demaille <akim@epita.fr>
8783
8784 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
8785 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
8786 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
8787 * src/closure.c (fderives): Be an array of bitsets.
8788
8789 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
8790
8791 * data/bison.c++: Merge the two generated headers. Insert a copyright
8792 notice in each output file.
8793
8794 2002-02-28 Akim Demaille <akim@epita.fr>
8795
8796 * data/bison.c++: Copy the prologue of bison.simple to fetch
8797 useful M4 definitions, such as b4_header_guard.
8798
8799 2002-02-25 Akim Demaille <akim@epita.fr>
8800
8801 * src/getargs.c (version): Give the name of the authors, and use a
8802 translator friendly scheme for the bgr
8803 copyright notice.
8804
8805 2002-02-25 Akim Demaille <akim@epita.fr>
8806
8807 * src/output.c (header_output): Remove, now handled completely via
8808 M4.
8809
8810 2002-02-25 Akim Demaille <akim@epita.fr>
8811
8812 * m4/m4.m4: New, from CVS Autoconf.
8813 * configure.in: Invoke it.
8814 * src/output.c (output_skeleton): Use its result instead of the
8815 hard coded name.
8816
8817 2002-02-25 Akim Demaille <akim@epita.fr>
8818
8819 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
8820 Fileutils 4.1.5.
8821 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
8822 * src/output.c (output_skeleton): Use mkstemp to create a real
8823 temporary file.
8824 Move the filling of `skeleton' and its muscle to...
8825 (prepare): here.
8826 (output): Move the definition of the prologue muscle to...
8827 (prepare): here.
8828 * src/system.h (DEFAULT_TMPDIR): New.
8829
8830 2002-02-14 Paul Eggert <eggert@twinsun.com>
8831
8832 Remove the support for C++ namespace cleanliness; it was
8833 causing more problems than it was curing, since it didn't work
8834 properly on some nonstandard C++ compilers. This can wait
8835 for a proper C++ parser.
8836
8837 * NEWS: Document this.
8838 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
8839 of C++, as it's treated like C now.
8840 * src/bison.simple (YYSTD): Remove.
8841 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
8842 Treat C++ just like Standard C instead of trying to support
8843 namespace cleanliness.
8844
8845 2002-02-14 Akim Demaille <akim@epita.fr>
8846
8847 * tests/regression.at (else): Adjust to Andreas' change.
8848
8849 2002-02-14 Akim Demaille <akim@epita.fr>
8850
8851 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
8852
8853 2002-02-13 Andreas Schwab <schwab@suse.de>
8854
8855 * src/output.c (output_rule_data): Don't output NULL, it might
8856 not be defined yet.
8857
8858 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
8859
8860 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
8861 (Copyright notice): Update.
8862
8863 2002-02-11 Akim Demaille <akim@epita.fr>
8864
8865 * tests/regression.at (%nonassoc and eof): Don't include
8866 nonportable headers.
8867
8868 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
8869
8870 * data/bison.c++: Correct error recovery. Make the user able to
8871 initialize the starting location.
8872
8873 2002-02-07 Akim Demaille <akim@epita.fr>
8874
8875 * tests/input.at: New.
8876
8877 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
8878
8879 * data/bison.c++: Replace some direct m4 expansions by constants. Be
8880 more consistent when naming methods and variables. Put preprocessor
8881 directives around tables only needed for debugging.
8882
8883 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
8884
8885 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
8886 C++ parsers.
8887 (yy::b4_name::parse): Use print_.
8888
8889 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
8890
8891 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
8892
8893 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
8894
8895 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
8896 C++ parsers.
8897 (yy::b4_name::parse): Build verbose error messages, and use error_.
8898
8899 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
8900
8901 * data/bison.c++: Fix m4 quoting in comments.
8902
8903 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
8904
8905 * data/bison.c++: Adjust the parser code. Fix some muscles that were
8906 not expanded by m4.
8907
8908 2002-02-05 Akim Demaille <akim@epita.fr>
8909
8910 * data/bison.c++: Adjust to the M4 back end.
8911 More is certainly needed.
8912
8913 2002-02-05 Akim Demaille <akim@epita.fr>
8914
8915 Give a try to M4 as a back end.
8916
8917 * lib/readpipe.c: New, from wdiff.
8918 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
8919 BISON_HAIRY.
8920 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
8921 specific values. Now it is m4 that performs the lookup.
8922 * src/parse-skel.y: Remove.
8923 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
8924 * src/output.c (actions_output, guards_output)
8925 (token_definitions_output): No longer keeps track of the output
8926 line number, hence remove the second argument.
8927 (guards_output): Check against the guard member of a rule, not the
8928 action member.
8929 Adjust callers.
8930 (output_skeleton): Don't look for the skeleton location, let m4 do
8931 that.
8932 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
8933 file will be used.
8934 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
8935 (prepare): Given that for the time being changesyntax is not
8936 usable in M4, rename the muscles using `-' to `_'.
8937 Define `defines_flag', `output_parser_name' and `output_header_name'.
8938 * src/output.h (actions_output, guards_output)
8939 (token_definitions_output): Adjust prototypes.
8940 * src/scan-skel.l: Instead of scanning the skeletons, it now
8941 processes the output of m4: `__oline__' and `#output'.
8942 * data/bison.simple: Adjust to be used by M4(sugar).
8943 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
8944 to date.
8945 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
8946 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
8947 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
8948 shamelessly stolen from CVS Autoconf.
8949
8950 2002-02-05 Akim Demaille <akim@epita.fr>
8951
8952 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
8953 * configure.in: Check for the declarations of free and malloc.
8954 * src/muscle_tab.c: Adjust.
8955
8956 2002-02-05 Akim Demaille <akim@epita.fr>
8957
8958 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
8959 which have no values.
8960
8961 2002-02-05 Akim Demaille <akim@epita.fr>
8962
8963 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
8964 * data/: here.
8965
8966 2002-01-29 Paul Eggert <eggert@twinsun.com>
8967
8968 * src/bison.simple (YYSIZE_T): Do not define merely because
8969 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
8970 On some platforms, <alloca.h> does not declare YYSTD (size_t).
8971
8972 2002-01-27 Akim Demaille <akim@epita.fr>
8973
8974 Fix `%nonassoc and eof'.
8975
8976 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
8977 which were not properly copied! Replace
8978 memcpy (res->errs, src->errs, src->nerrs);
8979 with
8980 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
8981 !!!
8982 * tests/regression.at (%nonassoc and eof): Adjust to newest
8983 Autotest: `.' is not in the PATH.
8984
8985 2002-01-27 Akim Demaille <akim@epita.fr>
8986
8987 * tests/sets.at (AT_EXTRACT_SETS): New.
8988 (Nullable): Use it.
8989 (Firsts): New.
8990
8991 2002-01-26 Akim Demaille <akim@epita.fr>
8992
8993 * tests/actions.at, tests/calc.at, tests/headers.at,
8994 * tests/torture.at: Adjust to the newest Autotest which no longer
8995 forces `.' in the PATH.
8996
8997 2002-01-25 Akim Demaille <akim@epita.fr>
8998
8999 * tests/regression.at (%nonassoc and eof): New.
9000 Suggested by Robert Anisko.
9001
9002 2002-01-24 Akim Demaille <akim@epita.fr>
9003
9004 Bison dumps core when trying to complain about broken input files.
9005 Reported by Cris van Pelt.
9006
9007 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
9008 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
9009 into...
9010 (Invalid inputs): Strengthen: exercise parse_percent_token.
9011
9012 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
9013
9014 * src/Makefile.am: Add bison.c++.
9015 * src/bison.c++: New skeleton.
9016
9017 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
9018
9019 * po/it.po: New.
9020
9021 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
9022
9023 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
9024
9025 2002-01-20 Marc Autret <marc@gnu.org>
9026
9027 * src/files.c (compute_output_file_names): Fix
9028
9029 2002-01-20 Marc Autret <marc@gnu.org>
9030
9031 * tests/output.at: New test.
9032 * src/files.c (compute_base_names): Don't map extensions when
9033 the YACC flag is set, use defaults.
9034 Reported by Evgeny Stambulchik.
9035
9036 2002-01-20 Marc Autret <marc@gnu.org>
9037
9038 * src/system.h: Need to define __attribute__ away for non-GCC
9039 compilers as well (i.e. the vendor C compiler).
9040 Suggested by Albert Chin-A-Young.
9041
9042 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
9043
9044 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
9045 canonical definition.
9046 * src/system.h: Use the canonical definition for PARAMS (avoids
9047 a conflict with the macro from lib/hash.h).
9048
9049 2002-01-11 Akim Demaille <akim@epita.fr>
9050
9051 * configure.in: Use AC_FUNC_STRNLEN.
9052 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
9053
9054 2002-01-09 Akim Demaille <akim@epita.fr>
9055
9056 * src/files.c, src/files.h (output_infix): New.
9057 (tab_extension): Remove.
9058 (compute_base_names): Compute the former, drop the latter.
9059 * src/output.c (prepare): Insert the muscles `output-infix', and
9060 `output-suffix'.
9061 * src/parse-skel.y (string, string.1): New.
9062 (section.header): Use it.
9063 (section.yacc): Remove.
9064 (prefix): Remove too.
9065 * src/scan-skel.l: Adjust.
9066 * src/bison.simple, src/bison.hairy: Adjust.
9067
9068 2002-01-09 Akim Demaille <akim@epita.fr>
9069
9070 * configure.in (WERROR_CFLAGS): Compute it.
9071 * src/Makefile.am (CFLAGS): Pass it.
9072 * tests/atlocal.in (CFLAGS): Idem.
9073 * src/files.c: Fix a few warnings.
9074 (get_extension_index): Remove, unused.
9075
9076 2002-01-08 Akim Demaille <akim@epita.fr>
9077
9078 * src/getargs.c (AS_FILE_NAME): New.
9079 (getargs): Use it to convert DOSish file names.
9080 * src/files.c (base_name): Rename as full_base_name to avoid
9081 clashes with `base_name ()'.
9082 (filename_split): New.
9083 (compute_base_names): N-th rewrite, using filename_split.
9084
9085 2002-01-08 Akim Demaille <akim@epita.fr>
9086
9087 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
9088 New, stolen from the Fileutils 4.1.
9089 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
9090 * configure.in: Check for the presence of memrchr, and of its
9091 prototype.
9092
9093 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
9094
9095 * lib/hash.h (__P): Added definition for this macro.
9096 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
9097 BUILT_SOURCES, to ensure they are generated first.
9098 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
9099 %error-verbose to allow bootstrapping with bison 1.30x.
9100
9101 2002-01-06 Akim Demaille <akim@epita.fr>
9102
9103 * src/reader.c (parse_braces): Don't fetch the next char, the
9104 convention is to fetch on entry.
9105 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
9106 'switch' without a following semicolon.
9107 * tests/regression.at (braces parsing): New.
9108
9109 2002-01-06 Akim Demaille <akim@epita.fr>
9110
9111 Bison is dead wrong in its RR conflict reports.
9112
9113 * tests/torture.at (GNU Cim Grammar): New.
9114 * src/conflicts.c (count_rr_conflicts): Fix.
9115
9116 2002-01-06 Akim Demaille <akim@epita.fr>
9117
9118 Creating package.m4 from configure.ac causes too many problems.
9119
9120 * tests/Makefile.am (package.m4): Create it by hand,
9121 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
9122
9123 2002-01-06 Akim Demaille <akim@epita.fr>
9124
9125 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
9126 skeleton.h.
9127
9128 2002-01-04 Paul Eggert <eggert@twinsun.com>
9129
9130 * doc/bison.texinfo (Debugging):
9131 Remove YYSTDERR; it's no longer defined or used.
9132 Also, s/cstdio.h/cstdio/.
9133
9134 2002-01-03 Akim Demaille <akim@epita.fr>
9135
9136 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
9137
9138 2002-01-03 Akim Demaille <akim@epita.fr>
9139
9140 * src/parse-skel.y (process_skeleton): Don't bind the parser's
9141 tracing code to --trace, wait for a better --trace option, with
9142 args.
9143
9144 2002-01-03 Akim Demaille <akim@epita.fr>
9145
9146 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
9147 The ISO C++ standard is extremely clear about it: stderr is
9148 considered a macro, not a regular symbol (see table 94 `Header
9149 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
9150 Therefore std:: does not apply to it. It still does with fprintf.
9151 Also, s/cstdio.h/cstdio/.
9152
9153 2002-01-03 Akim Demaille <akim@epita.fr>
9154
9155 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
9156 for non system headers.
9157
9158 2002-01-02 Akim Demaille <akim@epita.fr>
9159
9160 Equip the skeleton chain with location tracking, runtime trace,
9161 pure parser and scanner.
9162
9163 * src/parse-skel.y: Request a pure parser, locations, and prefix
9164 renaming.
9165 (%union): Having several members with the same type does not help
9166 type mismatches, simplify.
9167 (YYPRINT, yyprint): New.
9168 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
9169 (skel_error): this.
9170 Handle locations.
9171 * src/scan-skel.l: Adjust to these changes.
9172 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
9173 (LOCATION_PRINT, skel_control_t): New.
9174
9175 2001-12-30 Akim Demaille <akim@epita.fr>
9176
9177 * src/parse-skel.y: Get rid of the shift/reduce conflict:
9178 replace `gb' with BLANKS.
9179 * src/scan-skel.l: Adjust.
9180
9181 2001-12-30 Akim Demaille <akim@epita.fr>
9182
9183 * src/system.h: We don't need nor want bcopy.
9184 Throw away MS-DOS crap: we don't need getpid.
9185 * configure.in: We don't need strndup. It was even causing
9186 problems: because Flex includes the headers *before* us,
9187 _GNU_SOURCE is not defined by config.h, and therefore strndup was
9188 not visible.
9189 * lib/xstrndup.c: New.
9190 * src/scan-skel.l: Use it.
9191 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
9192 * src/parse-skel.y: Use %directives instead of #defines.
9193
9194 2001-12-30 Akim Demaille <akim@epita.fr>
9195
9196 * src/skeleton.h: New.
9197 * src/output.c (output_parser, output_master_parser): Remove, dead
9198 code.
9199 * src/output.h (get_lines_number, actions_output, guards_output)
9200 (token_definitions_output): Prototype them.
9201 * src/parse-skel.y: Add the license notice.
9202 Include output.h and skeleton.h.
9203 (process_skeleton): Returns void, and takes a single parameter.
9204 * src/scan-skel.l: Add the license notice.
9205 Include skeleton.h.
9206 Don't use %option yylineno: it seems that then Flex imagines
9207 REJECT has been used, and therefore it won't reallocate its
9208 buffers (which makes no other sense to me than a bug). It results
9209 in warnings for `unused: yy_flex_realloc'.
9210
9211 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
9212
9213 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
9214 (MUSCLE_INSERT_PREFIX): ...to there.
9215 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
9216 (MUSCLE_INSERT_PREFIX): Move from here...
9217
9218 * src/bison.hairy: Add a section directive. Put braces around muscle
9219 names. This parser skeleton is still broken, but Bison should not
9220 choke on a bad muscle 'syntax'.
9221 * src/bison.simple: Add a section directive. Put braces around muscle
9222 names.
9223
9224 * src/files.h (strsuffix, stringappend): Add declarations.
9225 (tab_extension): Add declaration.
9226 (short_base_name): Add declaration.
9227
9228 * src/files.c (strsuffix, stringappend): No longer static. These
9229 functions are used in the skeleton parser.
9230 (tab_extension): New.
9231 (compute_base_names): Use the computations done in this function
9232 to guess if the generated parsers should have '.tab' in their
9233 names.
9234 (short_base_name): No longer static.
9235
9236 * src/output.c (output_skeleton): New.
9237 (output): Disable call to output_master_parser, and give a try to
9238 a new skeleton handling system.
9239 (guards_output, actions_output): No longer static.
9240 (token_definitions_output, get_lines_number): No longer static.
9241
9242 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
9243
9244 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9245 parse-skel.y.
9246
9247 * src/parse-skel.y: New file.
9248 * src/scan-skel.l: New file.
9249
9250 2001-12-29 Akim Demaille <akim@epita.fr>
9251
9252 %name-prefix is broken.
9253
9254 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
9255 Adjust all dependencies.
9256 * tests/headers.at (export YYLTYPE): Strengthen this test: use
9257 %name-prefix.
9258
9259 Renaming yylval but not yylloc is not consistent. Now we do.
9260
9261 * src/bison.simple: Prefix yylloc if used.
9262 * doc/bison.texinfo (Decl Summary): Document that.
9263
9264 2001-12-29 Akim Demaille <akim@epita.fr>
9265
9266 * doc/bison.texinfo: Promote `%long-directive' over
9267 `%long_directive'.
9268 Remove all references to fixed-output-files, yacc is enough.
9269
9270 2001-12-29 Akim Demaille <akim@epita.fr>
9271
9272 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
9273 user prologue. These are defaults.
9274 * tests/actions.at (Mid-rule actions): Make sure the user can
9275 define YYDEBUG and YYERROR_VERBOSE.
9276
9277 2001-12-29 Akim Demaille <akim@epita.fr>
9278
9279 * src/output.c (header_output): Don't forget to export YYLTYPE and
9280 yylloc.
9281 * tests/headers.at (export YYLTYPE): New, make sure it does.
9282 * tests/regression.at (%union and --defines, Invalid CPP headers):
9283 Move to...
9284 * tests/headers.at: here.
9285
9286 2001-12-29 Akim Demaille <akim@epita.fr>
9287
9288 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
9289
9290 2001-12-29 Akim Demaille <akim@epita.fr>
9291
9292 * tests/actions.at (Mid-rule actions): Output on a single line
9293 instead of several.
9294
9295 2001-12-29 Akim Demaille <akim@epita.fr>
9296
9297 * doc/bison.texinfo: Formatting changes.
9298
9299 2001-12-29 Akim Demaille <akim@epita.fr>
9300
9301 Don't store the token defs in a muscle, just be ready to output it
9302 on command. Now possible via `symbols'. Fixes a memory leak.
9303
9304 * src/output.c (token_definitions_output): New.
9305 (output_parser, header_output): Use it.
9306 * src/reader.c (symbols_save): Remove.
9307
9308 2001-12-29 Akim Demaille <akim@epita.fr>
9309
9310 * src/bison.simple: Do not provide a default for YYSTYPE and
9311 YYLTYPE before the user's prologue. Otherwise it's hardly... a
9312 default.
9313
9314 2001-12-29 Akim Demaille <akim@epita.fr>
9315
9316 Mid-rule actions are simply... ignored!
9317
9318 * src/reader.c (readgram): Be sure to attach mid-rule actions to
9319 the empty-rule associated to the dummy symbol, not to the host
9320 rule.
9321 * tests/actions.at (Mid-rule actions): New.
9322
9323 2001-12-29 Akim Demaille <akim@epita.fr>
9324
9325 Memory leak.
9326
9327 * src/reader.c (reader): Free grammar.
9328
9329 2001-12-29 Akim Demaille <akim@epita.fr>
9330
9331 Memory leak.
9332
9333 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
9334 since it allocates it for each state, although only one is needed.
9335 (allocate_storage): Do it here.
9336
9337 2001-12-29 Akim Demaille <akim@epita.fr>
9338
9339 * src/options.h, src/options.c (create_long_option_table): Rename
9340 as...
9341 (long_option_table_new): this, with a clearer prototype.
9342 (percent_table): Remove, unused,
9343 * src/getargs.c (getargs): Adjust.
9344
9345 2001-12-29 Akim Demaille <akim@epita.fr>
9346
9347 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
9348 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
9349 as states.
9350
9351 2001-12-29 Akim Demaille <akim@epita.fr>
9352
9353 * src/lalr.c (build_relations): Rename `states' as `states1'.
9354 Sorry, I don't understand exactly what it is, no better name...
9355
9356 2001-12-29 Akim Demaille <akim@epita.fr>
9357
9358 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
9359 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
9360 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
9361 as rules.
9362
9363 2001-12-29 Akim Demaille <akim@epita.fr>
9364
9365 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
9366 ago.
9367
9368 2001-12-29 Akim Demaille <akim@epita.fr>
9369
9370 * src/reader.c, src/reader.h (user_toknums): Remove.
9371 Adjust all users to use symbols[i]->user_token_number.
9372
9373 2001-12-29 Akim Demaille <akim@epita.fr>
9374
9375 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
9376 Adjust all users to use symbols[i]->prec or ->assoc.
9377
9378 2001-12-29 Akim Demaille <akim@epita.fr>
9379
9380 * src/reader.c, src/reader.h (tags): Remove.
9381 Adjust all users to use symbols[i]->tag.
9382
9383 2001-12-29 Akim Demaille <akim@epita.fr>
9384
9385 * src/gram.h, src/gram.c (symbols): New, similar to state_table
9386 and rule_table.
9387 * src/reader.c (packsymbols): Fill this table.
9388 Drop sprec.
9389 * src/conflicts.c (resolve_sr_conflict): Adjust.
9390 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
9391 single table.
9392 Use symbols[i]->tag instead of tags[i].
9393
9394 2001-12-29 Akim Demaille <akim@epita.fr>
9395
9396 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
9397 In addition, put a comment in there, to replace...
9398 * tests/regression.at (%union and C comments): Remove.
9399
9400 2001-12-29 Akim Demaille <akim@epita.fr>
9401
9402 * tests/regression.at (Web2c Actions): Blindly move the actual
9403 output as expected output. The contents *seem* right to me, but I
9404 can't pretend reading perfectly parser tables... Nonetheless, all
9405 the other tests pass correctly, the table look OK, even though the
9406 presence of `$axiom' is to be noted: AFAICS it is useless (but
9407 harmless).
9408
9409 2001-12-29 Akim Demaille <akim@epita.fr>
9410
9411 * src/reader.c (readgram): Don't add the rule 0 if there were no
9412 rules read. In other words, add it _after_ having performed
9413 grammar sanity checks.
9414 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
9415
9416 2001-12-29 Akim Demaille <akim@epita.fr>
9417
9418 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
9419 visible, and some states have now a different number.
9420
9421 2001-12-29 Akim Demaille <akim@epita.fr>
9422
9423 * src/reader.c (readgram): Bind the initial rule's lineno to that
9424 of the first rule.
9425 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
9426 (Solved SR Conflicts): Adjust rule 0's line number.
9427
9428 2001-12-29 Akim Demaille <akim@epita.fr>
9429
9430 Fix the `GAWK Grammar' failure.
9431
9432 * src/LR0.c (final_state): Initialize to -1 so that we do compute
9433 the reductions of the first state which was mistakenly confused
9434 with the final state because precisely final_state was initialized
9435 to 0.
9436 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
9437 now noticed by Bison.
9438 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
9439 have a reduction on $default.
9440
9441 2001-12-29 Akim Demaille <akim@epita.fr>
9442
9443 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
9444 rule line numbers.
9445 * src/closure.c (print_closure): Likewise.
9446 * src/derives.c (print_derives): Likewise.
9447 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
9448 now.
9449
9450 2001-12-29 Akim Demaille <akim@epita.fr>
9451
9452 * src/lalr.c (lookaheads_print): New.
9453 (lalr): Call it when --trace-flag.
9454 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
9455 are dumped.
9456
9457 2001-12-29 Akim Demaille <akim@epita.fr>
9458
9459 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
9460 when walking through ritem, even via rule->rhs.
9461 * src/reduce.c (dump_grammar, useful_production, reduce_output)
9462 (useful_production, useless_nonterminals): Likewise.
9463 (reduce_grammar_tables): Likewise, plus update nritems.
9464 * src/nullable.c (set_nullable): Likewise.
9465 * src/lalr.c (build_relations): Likewise.
9466 * tests/sets.at (Nullable): Adjust.
9467 Fortunately, now, the $axiom is no longer nullable.
9468
9469 2001-12-29 Akim Demaille <akim@epita.fr>
9470
9471 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
9472 the 0-sentinel.
9473 * src/gram.c (ritem_longest_rhs): Likewise.
9474 * src/reduce.c (nonterminals_reduce): Likewise.
9475 * src/print_graph.c (print_graph): Likewise.
9476 * src/output.c (output_rule_data): Likewise.
9477 * src/nullable.c (set_nullable): Likewise.
9478
9479 2001-12-29 Akim Demaille <akim@epita.fr>
9480
9481 * src/output.c: Comment changes.
9482
9483 2001-12-27 Paul Eggert <eggert@twinsun.com>
9484
9485 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
9486 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
9487 Sparc, as they were causing more porting problems than the
9488 (minor) performance improvement was worth.
9489
9490 Also, catch up with 1.31's YYSTD.
9491
9492 2001-12-27 Akim Demaille <akim@epita.fr>
9493
9494 * src/output.c (output_gram): Rely on nritems, not the
9495 0-sentinel. See below.
9496 Use -1 as separator, not 0.
9497 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
9498 Rely on -1 as separator in yyrhs, instead of 0.
9499 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
9500 twice `Now at end of input', therefore there are two lines less to
9501 expect.
9502
9503 2001-12-27 Akim Demaille <akim@epita.fr>
9504
9505 * tests/regression.at (Unresolved SR Conflicts):
9506 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
9507 below.
9508
9509 2001-12-27 Akim Demaille <akim@epita.fr>
9510
9511 * src/LR0.c (new_state): Recognize the final state by the fact it
9512 is reached by eoftoken.
9513 (insert_start_shifting_state, insert_eof_shifting_state)
9514 (insert_accepting_state, augment_automaton): Remove, since now
9515 these states are automatically computed from the initial state.
9516 (generate_states): Adjust.
9517 * src/print.c: When reporting a rule number to the user, substract
9518 1, so that the axiom rule is rule 0, and the first user rule is 1.
9519 * src/reduce.c: Likewise.
9520 * src/print_graph.c (print_core): For the time being, just as for
9521 the report, depend upon --trace-flags to dump the full set of
9522 items.
9523 * src/reader.c (readgram): Once the grammar read, insert the rule
9524 0: `$axiom: START-SYMBOL $'.
9525 * tests/set.at: Adjust: rule 0 is now displayed, and since the
9526 number of the states has changed (the final state is no longer
9527 necessarily the last), catch up.
9528
9529 2001-12-27 Akim Demaille <akim@epita.fr>
9530
9531 Try to make the use of the eoftoken valid. Given that its value
9532 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
9533 is used instead of > 0 where appropriate, (ii), depend upon nritems
9534 instead of the 0-sentinel.
9535
9536 * src/gram.h, src/gram.c (nritems): New.
9537 Expected to be duplication of nitems, but for the time being...
9538 * src/reader.c (packgram): Assert nritems and nitems are equal.
9539 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
9540 * src/closure.c (print_closure, print_fderives): Likewise.
9541 * src/gram.c (ritem_print): Likewise.
9542 * src/print.c (print_core, print_grammar): Likewise.
9543 * src/print_graph.c: Likewise.
9544
9545 2001-12-27 Akim Demaille <akim@epita.fr>
9546
9547 * src/main.c (main): If there are complains after grammar
9548 reductions, then output the report anyway if requested, then die.
9549 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
9550 * src/reader.c (eoftoken): New.
9551 (parse_token_decl): If the token being defined has value `0', it
9552 is the eoftoken.
9553 (packsymbols): No longer hack `tags' to insert `$' by hand.
9554 Be sure to preserve the value of the eoftoken.
9555 (reader): Make sure eoftoken is defined.
9556 Initialize nsyms to 0: now eoftoken is created just like the others.
9557 * src/print.c (print_grammar): Don't special case the eof token.
9558 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
9559 lie anyway, albeit pleasant.
9560 * tests/calc.at: Exercise error messages with eoftoken.
9561 Change the grammar so that empty input is invalid.
9562 Adjust expectations.
9563 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
9564
9565 2001-12-27 Akim Demaille <akim@epita.fr>
9566
9567 * configure.in: Check the protos of strchr ans strspn.
9568 Replace strchr if needed.
9569 * src/system.h: Provide the protos of strchr, strspn and memchr if
9570 missing.
9571 * lib/strchr.c: New.
9572 * src/reader.c (symbols_save): Use strchr.
9573
9574 2001-12-27 Akim Demaille <akim@epita.fr>
9575
9576 * src/print.c, src/print_graph.c (escape): New.
9577 Use it to quote the TAGS outputs.
9578 * src/print_graph.c (print_state): Now errors are in red, and
9579 reductions in green.
9580 Prefer high to wide: output the state number on a line of its own.
9581
9582 2001-12-27 Akim Demaille <akim@epita.fr>
9583
9584 * src/state.h, src/state.c (reductions_new): New.
9585 * src/LR0.c (set_state_table): Let all the states have a
9586 `reductions', even if reduced to 0.
9587 (save_reductions): Adjust.
9588 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
9589 * src/print.c (print_reductions, print_actions): Adjust.
9590 * src/output.c (action_row): Adjust.
9591
9592 2001-12-27 Akim Demaille <akim@epita.fr>
9593
9594 * src/state.h, src/state.c (errs_new, errs_dup): New.
9595 * src/LR0.c (set_state_table): Let all the states have an errs,
9596 even if reduced to 0.
9597 * src/print.c (print_errs, print_reductions): Adjust.
9598 * src/output.c (output_actions, action_row): Adjust.
9599 * src/conflicts.c (resolve_sr_conflict): Adjust.
9600
9601 2001-12-27 Akim Demaille <akim@epita.fr>
9602
9603 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
9604
9605 2001-12-27 Akim Demaille <akim@epita.fr>
9606
9607 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
9608 * src/print.c: here.
9609 (lookaheadset, shiftset): New, used as additional storage by
9610 print_reductions.
9611 (print_results): Adjust.
9612 (print_shifts, print_gotos, print_errs): New, extracted from...
9613 (print_actions): here.
9614 * src/print_graph.c (print_actions): Remove dead code.
9615
9616 2001-12-27 Akim Demaille <akim@epita.fr>
9617
9618 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
9619 `$n' and `@n'.
9620
9621 2001-12-27 Akim Demaille <akim@epita.fr>
9622
9623 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
9624 (build_relations): Adjust.
9625
9626 2001-12-27 Akim Demaille <akim@epita.fr>
9627
9628 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
9629 duplication.
9630
9631 2001-12-27 Akim Demaille <akim@epita.fr>
9632
9633 * src/reader.c (packgram): Catch nitems overflows.
9634
9635 2001-12-27 Akim Demaille <akim@epita.fr>
9636
9637 * src/files.c, src/files.h (guard_obstack): Remove.
9638 * src/output.c (output): Adjust.
9639 * src/reader.c (parse_braces): New, factoring...
9640 (copy_action, copy_guard): these two which are renamed as...
9641 (parse_action, parse_guard): these.
9642 As a voluntary consequence, using braces around guards is now
9643 mandatory.
9644
9645 2001-12-27 Akim Demaille <akim@epita.fr>
9646
9647 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
9648 * src/reader.c (symbol_list): `guard' and `guard_line' are new
9649 members.
9650 (symbol_list_new): Adjust.
9651 (copy_action): action_line is the first line, not the last.
9652 (copy_guard): Just as for actions, store the `action' only, not
9653 the switch/case/break flesh.
9654 Don't parse the user action that might follow the guard, let...
9655 (readgram): do it, i.e., now, there can be an action after a
9656 guard.
9657 In other words the guard is just explicitly optional.
9658 (packgram): Adjust.
9659 * src/output.c (guards_output): New.
9660 (output_parser): Call it when needed.
9661 (output): Also free the guard and attrs obstacks.
9662 * src/files.c, src/files.h (obstack_save): Remove.
9663 (output_files): Remove.
9664 As a result, if one needs the former `.act' file, using an
9665 appropriate skeleton which requires actions and guards is now
9666 required.
9667 * src/main.c (main): Adjust.
9668 * tests/semantic.at: New.
9669 * tests/regression.at: Use `input.y' as input file name.
9670 Avoid 8+3 problems by requiring input.c when the test needs the
9671 parser.
9672
9673 2001-12-27 Akim Demaille <akim@epita.fr>
9674
9675 * src/reader.c (symbol_list_new): Be sure to initialize all the
9676 fields.
9677
9678 2001-12-27 Akim Demaille <akim@epita.fr>
9679
9680 All the hacks using a final pseudo state are now useless.
9681
9682 * src/LR0.c (set_state_table): state_table holds exactly nstates.
9683 * src/lalr.c (nLA): New.
9684 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
9685 instead of lookaheadsp from the pseudo state (nstate + 1).
9686
9687 2001-12-27 Akim Demaille <akim@epita.fr>
9688
9689 * src/output.c (action_row, token_actions): Use a state_t instead
9690 of a integer, and nlookaheads instead of the following state's
9691 lookaheadsp.
9692
9693 2001-12-27 Akim Demaille <akim@epita.fr>
9694
9695 * src/conflicts.c (log_resolution, flush_shift)
9696 (resolve_sr_conflict, set_conflicts, solve_conflicts)
9697 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
9698 (conflicts_print, print_reductions): Use a state_t instead of an
9699 integer when referring to a state.
9700 As much as possible, depend upon nlookaheads, instead of the
9701 `lookaheadsp' member of the following state (since lookaheads of
9702 successive states are successive, the difference between state n + 1
9703 and n served as the number of lookaheads for state n).
9704 * src/lalr.c (add_lookback_edge): Likewise.
9705 * src/print.c (print_core, print_actions, print_state)
9706 (print_results): Likewise.
9707 * src/print_graph.c (print_core, print_actions, print_state)
9708 (print_graph): Likewise.
9709 * src/conflicts.h: Adjust.
9710
9711 2001-12-27 Akim Demaille <akim@epita.fr>
9712
9713 * src/bison.hairy: Formatting/comment changes.
9714 ANSIfy.
9715 Remove `register' indications.
9716 Add plenty of `static'.
9717
9718 2001-12-27 Akim Demaille <akim@epita.fr>
9719
9720 * src/output.c (prepare): Drop the muscle `ntbase' which
9721 duplicates ntokens.
9722 * src/bison.simple: Formatting/comment changes.
9723 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
9724 is an undocumented synonym.
9725
9726 2001-12-22 Akim Demaille <akim@epita.fr>
9727
9728 * src/output.c (output_table_data): Change the prototype to use
9729 `int' for array ranges: some invocations do pass an int, not a
9730 short.
9731 Reported by Wayne Green.
9732
9733 2001-12-22 Akim Demaille <akim@epita.fr>
9734
9735 Some actions of web2c.y are improperly triggered.
9736 Reported by Mike Castle.
9737
9738 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
9739 * tests/regression.at (Web2c): Rename as...
9740 (Web2c Report): this.
9741 (Web2c Actions): New.
9742
9743 2001-12-22 Akim Demaille <akim@epita.fr>
9744
9745 Reductions in web2c.y are improperly reported.
9746 Reported by Mike Castle.
9747
9748 * src/conflicts.c (print_reductions): Fix.
9749 * tests/regression.at (Web2c): New.
9750
9751 2001-12-18 Akim Demaille <akim@epita.fr>
9752
9753 Some host fail on `assert (!"foo")', which expands to
9754 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
9755 Reported by Nelson Beebee.
9756
9757 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
9758 `#define it_succeeded 0' and `assert (it_succeeded)'.
9759
9760 2001-12-17 Marc Autret <autret_m@epita.fr>
9761
9762 * src/bison.simple: Don't hard code the skeleton line and filename.
9763 * src/output.c (output_parser): Rename 'line' as 'output_line'.
9764 New line counter 'skeleton_line' (skeleton-line muscle).
9765
9766 2001-12-17 Paul Eggert <eggert@twinsun.com>
9767
9768 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
9769 YYDEBUG must be defined to a nonzero value.
9770
9771 * src/bison.simple (yytname): Do not assume that the user defines
9772 YYDEBUG to a properly parenthesized expression.
9773
9774 2001-12-17 Akim Demaille <akim@epita.fr>
9775
9776 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
9777 nlookaheads is a new member.
9778 Adjust all users.
9779 * src/lalr.h (nlookaheads): Remove this orphan declaration.
9780 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
9781 state.
9782
9783 2001-12-17 Akim Demaille <akim@epita.fr>
9784
9785 * src/files.h, src/files.c (open_files, close_files): Remove.
9786 * src/main.c (main): Don't open/close files, nor invoke lex_free,
9787 let...
9788 * src/reader.c (reader): Do it.
9789
9790 2001-12-17 Akim Demaille <akim@epita.fr>
9791
9792 * src/conflicts.c (print_reductions): Formatting changes.
9793
9794 2001-12-17 Akim Demaille <akim@epita.fr>
9795
9796 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
9797 (flush_reduce): New.
9798 (resolve_sr_conflict): Adjust.
9799
9800 2001-12-17 Akim Demaille <akim@epita.fr>
9801
9802 * src/output.c (output_obstack): Be static and rename as...
9803 (format_obstack): this, to avoid any confusion with files.c's
9804 output_obstack.
9805 * src/reader.h (muscle_obstack): Move to...
9806 * src/output.h: here, since it's defined in output.c.
9807
9808 2001-12-17 Akim Demaille <akim@epita.fr>
9809
9810 * src/output.c (action_row, save_column, default_goto)
9811 (sort_actions, matching_state, pack_vector): Better variable
9812 locality.
9813
9814 2001-12-17 Akim Demaille <akim@epita.fr>
9815
9816 * src/output.c: Various formatting changes.
9817
9818 2001-12-17 Akim Demaille <akim@epita.fr>
9819
9820 * src/files.c (output_files): Free the output_obstack.
9821 * src/main.c (main): Call print and print_graph conditionally.
9822 * src/print.c (print): Work unconditionally.
9823 * src/print_graph.c (print_graph): Work unconditionally.
9824 * src/conflicts.c (log_resolution): Output only if verbose_flag.
9825
9826 2001-12-16 Marc Autret <autret_m@epita.fr>
9827
9828 * src/output.c (actions_output): Fix. When we use %no-lines,
9829 there is one less line per action.
9830
9831 2001-12-16 Marc Autret <autret_m@epita.fr>
9832
9833 * src/bison.simple: Remove a useless #line directive.
9834 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
9835 * src/output.c (get_lines_number): New.
9836 (output_parser): Adjust, now takes care about the lines of a
9837 output muscles.
9838 Fix line numbering.
9839 (actions_output): Computes the number of lines taken by actions.
9840 (output_master_parser): Insert new skeleton which is the name of
9841 the output parser file name.
9842
9843 2001-12-15 Marc Autret <autret_m@epita.fr>
9844
9845 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
9846
9847 2001-12-15 Marc Autret <autret_m@epita.fr>
9848
9849 * src/output.c (output_gram): Keep track of the hairy one.
9850
9851 2001-12-15 Akim Demaille <akim@epita.fr>
9852
9853 Make `make distcheck' work.
9854
9855 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
9856 system.h which uses libgettext.h.
9857
9858 2001-12-15 Akim Demaille <akim@epita.fr>
9859
9860 * src/nullable.c (set_nullable): Useless rules must be skipped,
9861 otherwise, since we range over their symbols, we might look at a
9862 nonterminal which no longer ``exists'', i.e., it is not counted in
9863 `nvars', hence we overflow our arrays.
9864
9865 2001-12-15 Akim Demaille <akim@epita.fr>
9866
9867 The header can also be produced directly, without any obstack!
9868 Yahoo!
9869
9870 * src/files.c, src/files.h (defines_obstack): Remove.
9871 (compute_header_macro): Global.
9872 (defines_obstack_save): Remove.
9873 * src/reader.c (parse_union_decl): No longer output to
9874 defines_obstack: its content can be found in the `stype' muscle
9875 anyway.
9876 (output_token_translations): Merge into...
9877 (symbols_output): this.
9878 Rename as...
9879 (symbols_save): this.
9880 (reader): Adjust.
9881 * src/output.c (header_output): New.
9882 (output): Call it.
9883
9884 2001-12-15 Akim Demaille <akim@epita.fr>
9885
9886 * src/reader.c (parse_union_decl): Instead of handling two obstack
9887 simultaneously, use one to define the `stype' muscle, and use the
9888 value of the latter to fill defines_obstack.
9889 (copy_comment): Remove.
9890 (copy_comment2): Work for a single obstack.
9891 Rename as...
9892 (copy_comment): this.
9893
9894 2001-12-15 Akim Demaille <akim@epita.fr>
9895
9896 * src/lex.c, src/lex.h (xgetc): No longer static.
9897 * src/reader.c (parse_union_decl): Revamp.
9898
9899 2001-12-15 Akim Demaille <akim@epita.fr>
9900
9901 Still making progress in separating Bison into (i) input, (ii)
9902 process, (iii) output: now we can directly output the parser file
9903 without using table_obstack at all.
9904
9905 * src/files.c, src/files.h (table_obstack): Bye bye.
9906 (parser_file_name): New.
9907 * src/files.c (compute_output_file_names): Compute it.
9908 * src/output.c (actions_output, output_parser)
9909 (output_master_parser): To a file instead of an obstack.
9910
9911 2001-12-15 Akim Demaille <akim@epita.fr>
9912
9913 Attach actions to rules, instead of pre-outputting them to
9914 actions_obstack.
9915
9916 * src/gram.h (rule_t): action and action_line are new members.
9917 * src/reader.c (symbol_list): Likewise.
9918 (copy_action): Save the actions within the rule.
9919 (packgram): Save them in rule_table.
9920 * src/output.c (actions_output): New.
9921 (output_parser): Use it on `%%actions'.
9922 (output_rule_data): Don't free rule_table.
9923 (output): Do it.
9924 (prepare): Don't save the `action' muscle.
9925 * src/bison.simple: s/%%action/%%actions/.
9926
9927 2001-12-15 Akim Demaille <akim@epita.fr>
9928
9929 * src/reader.c (copy_action): When --yacc, don't append a `;'
9930 to the user action: let it fail if lacking.
9931 Suggested by Arnold Robbins and Tom Tromey.
9932
9933 2001-12-14 Akim Demaille <akim@epita.fr>
9934
9935 * src/lex.c (literalchar): Simply return the char you decoded, non
9936 longer mess around with obstacks and int pointers.
9937 Adjust all callers.
9938
9939 2001-12-14 Akim Demaille <akim@epita.fr>
9940
9941 * src/lex.c (literalchar): Don't escape the special characters,
9942 just decode them, and keep them as char (before, eol was output as
9943 the 2 char string `\n' etc.).
9944 * src/output.c (output_rule_data): Use quotearg to output the
9945 token strings.
9946
9947 2001-12-13 Paul Eggert <eggert@twinsun.com>
9948
9949 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
9950 Do not infringe on the global user namespace when using C++.
9951 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
9952 All uses of `fprintf' and `stderr' changed.
9953
9954 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
9955
9956 2001-12-13 Akim Demaille <akim@epita.fr>
9957
9958 The computation of nullable is broken: it doesn't handle empty
9959 RHS's properly.
9960
9961 * tests/torture.at (GNU AWK Grammar): New.
9962 * tests/sets.at (Nullable): New.
9963 * src/nullable.c (set_nullable): Instead of blindly looping over
9964 `ritems', loop over the rules, and then over their rhs's.
9965
9966 Work around Autotest bugs.
9967
9968 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
9969 frame, because Autotest understand lines starting with a `+' as
9970 traces from the shell. Then, they are not processed properly.
9971 Admittedly an Autotest bug, but we don't have time to wait for
9972 Autotest to catch up.
9973 * tests/regression.at (Broken Closure): Adjust to the new table
9974 frames.
9975 Move to...
9976 * tests/sets.at: here.
9977
9978 2001-12-13 Akim Demaille <akim@epita.fr>
9979
9980 * src/closure.c (closure): Use nrules instead of playing tricks
9981 with BITS_PER_WORD.
9982
9983 2001-12-13 Akim Demaille <akim@epita.fr>
9984
9985 * src/print.c (print_actions): Output the handling of `$' as the
9986 traces do: shifting the token EOF. Before EOF was treated as a
9987 nonterminal.
9988 * tests/regression.at: Adjust some tests.
9989 * src/print_graph.c (print_core): Complete the set of items via
9990 closure. The next-to-final and final states are still unsatisfying,
9991 but that's to be addressed elsewhere.
9992 No longer output the rule numbers, but do output the state number.
9993 A single loop for the shifts + gotos is enough, but picked a
9994 distinct color for each.
9995 (print_graph): Initialize and finalize closure.
9996
9997 2001-12-13 Akim Demaille <akim@epita.fr>
9998
9999 * src/reader.c (readgram): Remove dead code, an strip useless
10000 braces.
10001 (get_type): Remove, unused.
10002
10003 2001-12-12 Akim Demaille <akim@epita.fr>
10004
10005 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
10006 on that of lib/error.c.
10007
10008 2001-12-12 Akim Demaille <akim@epita.fr>
10009
10010 Some hosts don't like `/' in includes.
10011
10012 * src/system.h: Include libgettext.h without qualifying the path.
10013 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
10014 $(top_srcdir).
10015
10016 2001-12-11 Marc Autret <autret_m@epita.fr>
10017
10018 * src/output.c (output_parser): Remove useless muscle.
10019
10020 2001-12-11 Marc Autret <autret_m@epita.fr>
10021
10022 * src/bison.simple: Remove #line just before %%epilogue. It
10023 is now handled in ...
10024 * src/reader.c (read_additionnal_code): Add the output of a
10025 #line for the epilogue.
10026
10027 2001-12-10 Marc Autret <autret_m@epita.fr>
10028
10029 * src/reader.c (copy_definition): Re-use CPP-outed code which
10030 replace precedent remove.
10031 * src/bison.simple: Remove #line before %%prologue because
10032 %%input-line is wrong at this time.
10033
10034 2001-12-10 Marc Autret <autret_m@epita.fr>
10035
10036 * src/reader.c (symbols_output): Clean up.
10037 * src/output.c (output_gram, output): Clean up.
10038
10039 2001-12-10 Akim Demaille <akim@epita.fr>
10040
10041 * src/lalr.c (initialize_lookaheads): New. Extracted from...
10042 * src/LR0.c (set_state_table): here.
10043 * src/lalr.c (lalr): Call it.
10044
10045 2001-12-10 Akim Demaille <akim@epita.fr>
10046
10047 * src/state.h (shifts): Remove the `number' member: shifts are
10048 attached to state, hence no longer need to be labelled with a
10049 state number.
10050
10051 2001-12-10 Akim Demaille <akim@epita.fr>
10052
10053 Now that states have a complete set of members, the linked list of
10054 shifts is useless: just fill directly the state's shifts member.
10055
10056 * src/state.h (shifts): Remove the `next' member.
10057 * src/LR0.c (first_state, last_state): Remove.
10058 Adjust the callers.
10059 (augment_automaton): Don't look for the shifts that must be added
10060 a shift on EOF: it is those of the state we looked for! But now,
10061 since shifts are attached, it is no longer needed to looking
10062 merely by its id: its number.
10063
10064 2001-12-10 Akim Demaille <akim@epita.fr>
10065
10066 * src/LR0.c (augment_automaton): Better variable locality.
10067 Remove an impossible branch: if there is a state corresponding to
10068 the start symbol being shifted, then there is shift for the start
10069 symbol from the initial state.
10070
10071 2001-12-10 Akim Demaille <akim@epita.fr>
10072
10073 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
10074 only when appropriate: when insert_start_shifting_state' is not
10075 invoked.
10076 * tests/regression.at (Rule Line Numbers): Adjust.
10077
10078 2001-12-10 Akim Demaille <akim@epita.fr>
10079
10080 * src/LR0.c (augment_automaton): Now that all states have shifts,
10081 merge the two cases addition shifts to the initial state.
10082
10083 2001-12-10 Akim Demaille <akim@epita.fr>
10084
10085 * src/lalr.c (set_state_table): Move to...
10086 * src/LR0.c: here.
10087 * src/lalr.c (lalr): Don't call it...
10088 * src/LR0.c (generate_states): do it.
10089 * src/LR0.h (first_state): Remove, only the table is used.
10090
10091 2001-12-10 Akim Demaille <akim@epita.fr>
10092
10093 * src/LR0.h (first_shift, first_reduction): Remove.
10094 * src/lalr.c: Don't use first_shift: find shifts through the
10095 states.
10096
10097 2001-12-10 Akim Demaille <akim@epita.fr>
10098
10099 * src/LR0.c: Attach shifts to states as soon as they are
10100 computed.
10101 * src/lalr.c (set_state_table): Instead of assigning shifts to
10102 state, just assert that the mapping was properly done.
10103
10104 2001-12-10 Akim Demaille <akim@epita.fr>
10105
10106 * src/LR0.c (insert_start_shift): Rename as...
10107 (insert_start_shifting_state): this.
10108 (insert_eof_shifting_state, insert_accepting_state): New.
10109 (augment_automaton): Adjust.
10110 Better locality of the variables.
10111 When looking if the start_symbol is shifted from the initial
10112 state, using `while (... symbol != start_symbol ...)' sounds
10113 better than `while (... symbol < start_symbol ...)': If fail
10114 to see how the order between symbols could be relevant!
10115
10116 2001-12-10 Akim Demaille <akim@epita.fr>
10117
10118 * src/getargs.h: Don't declare `spec_name_prefix' and
10119 `spec_file_prefix', declared by src/files.h.
10120 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
10121 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
10122 * src/output.c (prepare): Adjust.
10123 * src/reader.c (symbols_output): Likewise.
10124 * src/vmsgetargs.c: Vaguely adjust, but who cares?
10125
10126 2001-12-10 Akim Demaille <akim@epita.fr>
10127
10128 * src/muscle_tab.c (muscle_init): NULL is a better default than
10129 `"0"'.
10130
10131 2001-12-10 Akim Demaille <akim@epita.fr>
10132
10133 * src/reader.c (reader): Calling symbols_output once is enough.
10134
10135 2001-12-10 Akim Demaille <akim@epita.fr>
10136
10137 Now that states have a complete set of members, the linked list of
10138 reductions is useless: just fill directly the state's reductions
10139 member.
10140
10141 * src/state.h (struct reductions): Remove member `number' and
10142 `next'.
10143 * src/LR0.c (first_reduction, last_reduction): Remove.
10144 (save_reductions): Don't link the new reductions, store them in
10145 this_state.
10146 * src/lalr.c (set_state_table): No need to attach reductions to
10147 states, it's already done.
10148 * src/output.c (output_actions): No longer free the shifts, then
10149 the reductions, then the states: free all the states and their
10150 members.
10151
10152 2001-12-10 Akim Demaille <akim@epita.fr>
10153
10154 * src/options.c (OPTN, DRTV, BOTH): New.
10155 (option_table): Use them.
10156
10157 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
10158 the job of system.h.
10159 * src/options.c: Don't include stdio.h and xalloc.h for the same
10160 reasons.
10161
10162 2001-12-10 Akim Demaille <akim@epita.fr>
10163
10164 * src/output.c (output, prepare): Make sure the values of the
10165 muscles `action' and `prologue' are 0-terminated.
10166
10167 2001-12-10 Akim Demaille <akim@epita.fr>
10168
10169 Clean up GCC warnings.
10170
10171 * src/reader.c (copy_action): `buf' is not used.
10172 (parse_skel_decl): Be static.
10173 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
10174 * src/options.h (create_long_option_table): Have a real prototype.
10175 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
10176 (hash_delete_at): Return const void *.
10177 Adjust casts to preserve the const.
10178
10179 2001-12-10 Akim Demaille <akim@epita.fr>
10180
10181 * configure.in: Require 2.52g.
10182 M4 is not needed, but AUTOM4TE is.
10183 * m4/m4.m4: Remove.
10184 * tests/Makefile.am: Adjust.
10185
10186 2001-12-10 Akim Demaille <akim@epita.fr>
10187
10188 One structure for states is enough, even though theoretically
10189 there are LR(0) states and LALR(1) states.
10190
10191 * src/lalr.h (state_t): Remove.
10192 (state_table): Be state_t **, not state_t *.
10193 * src/state.h (core, CORE_ALLOC): Rename as...
10194 (state_t, STATE_ALLOC): this.
10195 Add the LALR(1) members: shifts, reductions, errs.
10196 * src/LR0.c (state_table): Rename as...
10197 (state_hash): this, to avoid name clashes with the global
10198 `state_table'.
10199 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
10200 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
10201
10202 2001-12-10 Akim Demaille <akim@epita.fr>
10203
10204 Bison dumps core on bash.y.
10205 Reported by Pascal Bart.
10206
10207 * src/warshall.c (bitmatrix_print): New.
10208 (TC): Use it.
10209 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
10210 j must be the outer loop.
10211 * tests/regression.at (Broken Closure): New.
10212
10213 2001-12-05 Akim Demaille <akim@epita.fr>
10214
10215 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
10216 its argument.
10217 Reported by Peter Hamorsky.
10218
10219 2001-12-05 Akim Demaille <akim@epita.fr>
10220
10221 * src/conflicts.c (err_table): Remove.
10222 (resolve_sr_conflict): Adjust.
10223 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
10224 Rename as...
10225 (state_t.reductions, state_t.shifts): this.
10226
10227 2001-12-05 Akim Demaille <akim@epita.fr>
10228
10229 * src/reduce.c (reduce_grammar_tables): No longer disable the
10230 removal of useless rules via CPP but via `if (0)', so that the
10231 compiler still check the code is valid.
10232 For instance, it should have noticed `rline' no longer exists: use
10233 the `line' member of rule_t.
10234 * src/gram.c (dummy, rline): Remove, unused.
10235
10236 2001-12-05 Akim Demaille <akim@epita.fr>
10237
10238 * src/output.c (pack_vector): Use assert, not berror.
10239 * src/main.c (berror): Remove, unused.
10240
10241 2001-12-05 Akim Demaille <akim@epita.fr>
10242
10243 New experimental feature: if --verbose --trace output all the
10244 items of a state, not only its kernel.
10245
10246 * src/print.c (print_core): If `trace_flag', then invoke closure
10247 before outputting the items of the state (print_core is no longer
10248 a correct name them).
10249 (print_results): Invoke new_closure/free_closure if needed.
10250
10251 2001-12-05 Akim Demaille <akim@epita.fr>
10252
10253 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
10254 * src/closure.c, src/closure.h (itemsetsize): Rename as...
10255 (nitemset): for consistency with the rest of the project.
10256
10257 2001-12-05 Akim Demaille <akim@epita.fr>
10258
10259 * src/closure.c (print_closure): Improve.
10260 (closure): Use it for printing input and output.
10261
10262 2001-12-05 Akim Demaille <akim@epita.fr>
10263
10264 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
10265 indexed by nonterminals.
10266
10267 2001-12-05 Akim Demaille <akim@epita.fr>
10268
10269 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
10270 what it was!).
10271 * src/warshall.h: Remove accidental duplication of the content.
10272
10273 2001-12-05 Akim Demaille <akim@epita.fr>
10274
10275 * src/closure.c (set_fderives): De-obfuscate.
10276
10277 2001-12-05 Akim Demaille <akim@epita.fr>
10278
10279 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
10280
10281 2001-12-05 Akim Demaille <akim@epita.fr>
10282
10283 * src/closure.c (set_firsts): De-obfuscate.
10284
10285 2001-12-05 Akim Demaille <akim@epita.fr>
10286
10287 * src/output.c (action_row): De-obfuscate
10288 using the good o' techniques: arrays not pointers, variable
10289 locality, BITISSET, RESETBIT etc.
10290
10291 2001-12-05 Akim Demaille <akim@epita.fr>
10292
10293 Pessimize the code to simplify it: from now on, all the states
10294 have a valid SHIFTS, which NSHIFTS is possibly 0.
10295
10296 * src/LR0.c (shifts_new): Be global and move to..
10297 * src/state.c, src/state.h: here.
10298 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
10299 * src/print_graph: Adjust.
10300
10301 2001-12-05 Akim Demaille <akim@epita.fr>
10302
10303 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
10304 * src/conflicts.c: Use it.
10305 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
10306 incorrectly ``simplified''.
10307
10308 2001-12-05 Akim Demaille <akim@epita.fr>
10309
10310 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
10311 using the good o' techniques: arrays not pointers, variable
10312 locality, BITISSET, RESETBIT etc.
10313
10314 2001-12-05 Akim Demaille <akim@epita.fr>
10315
10316 * src/state.h (SHIFT_SYMBOL): New.
10317 * src/conflicts.c: Use it to deobfuscate.
10318
10319 2001-12-05 Akim Demaille <akim@epita.fr>
10320
10321 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
10322 (print_reductions): De-obfuscate using the good o' techniques:
10323 arrays not pointers, variable locality, BITISSET.
10324
10325 2001-12-05 Akim Demaille <akim@epita.fr>
10326
10327 * src/conflicts.c (print_reductions): Arrays, not pointers.
10328 Use BITISSET.
10329
10330 2001-12-05 Akim Demaille <akim@epita.fr>
10331
10332 * src/conflicts.c (print_reductions): Pessimize, but clarify.
10333
10334 2001-12-05 Akim Demaille <akim@epita.fr>
10335
10336 * src/conflicts.c (print_reductions): Improve variable locality.
10337
10338 2001-12-05 Akim Demaille <akim@epita.fr>
10339
10340 * src/conflicts.c (print_reductions): Pessimize, but clarify.
10341
10342 2001-12-05 Akim Demaille <akim@epita.fr>
10343
10344 * src/conflicts.c (print_reductions): Improve variable locality.
10345
10346 2001-12-05 Akim Demaille <akim@epita.fr>
10347
10348 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
10349 * src/lalr.c: Use them.
10350
10351 2001-12-05 Akim Demaille <akim@epita.fr>
10352
10353 * src/LR0.c (augment_automaton): Formatting changes.
10354 Better variable locality.
10355
10356 2001-12-05 Akim Demaille <akim@epita.fr>
10357
10358 * src/lalr.c (matrix_print): New.
10359 (transpose): Use it.
10360 Use arrays instead of pointers.
10361
10362 2001-12-05 Akim Demaille <akim@epita.fr>
10363
10364 * src/lalr.c (maxrhs): Move to...
10365 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
10366 * src/lalr.c (build_relations): Adjust.
10367
10368 2001-12-05 Akim Demaille <akim@epita.fr>
10369
10370 * src/lalr.c (transpose): Free the memory allocated to the
10371 argument, as it is replaced by the results by the unique caller.
10372 (build_relations): Merely invoke transpose: it handles the memory
10373 deallocation.
10374 Improve variable locality.
10375 Avoid variables used as mere abbreviations.
10376 (compute_lookaheads): Use arrays instead of pointers.
10377
10378 2001-12-05 Akim Demaille <akim@epita.fr>
10379
10380 * src/lalr.c (initialize_F): Improve variable locality.
10381 Avoid variables used as mere abbreviations.
10382
10383 2001-12-05 Akim Demaille <akim@epita.fr>
10384
10385 * src/derives.c (print_derives): Display the ruleno.
10386 * src/lalr.c (initialize_F, transpose): Better variable locality
10387 to improve readability.
10388 Avoid variables used as mere abbreviations.
10389
10390 2001-12-05 Akim Demaille <akim@epita.fr>
10391
10392 * src/lalr.c (traverse): Use arrays instead of pointers.
10393
10394 2001-12-05 Akim Demaille <akim@epita.fr>
10395
10396 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
10397 the handling of squeue.
10398 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
10399
10400 2001-12-05 Akim Demaille <akim@epita.fr>
10401
10402 Because useless nonterminals are now kept alive (instead of being
10403 `destroyed'), we now sometimes examine them, and store information
10404 related to them. Hence we need to know their number, and adjust
10405 memory allocations.
10406
10407 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
10408 static.
10409 * src/LR0.c (allocate_itemsets): The memory allocated to
10410 `symbol_count' was used for two different purpose: once to count
10411 the number of occurrences of each symbol, and later reassigned to
10412 `shift_symbol', containing the symbol that can be shifted from a
10413 given state.
10414 Deobfuscate, i.e., allocate, use and free `symbol_count' here
10415 only, and...
10416 (new_itemsets): Allocate `shift_symbol' here.
10417 (allocate_itemsets): symbol_count includes useless nonterminals.
10418 Make room for them.
10419 (free_storage): Use `free', not `XFREE', for pointers that cannot
10420 be null.
10421
10422 2001-12-05 Akim Demaille <akim@epita.fr>
10423
10424 * src/nullable.c (set_nullable): Deobfuscate the handling of
10425 ritem.
10426 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
10427
10428 2001-12-05 Akim Demaille <akim@epita.fr>
10429
10430 * src/gram.c, src/gram.h (ritem_print): New.
10431 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
10432 (This useless function was defined only to work around VMS linkers
10433 that can't handle compilation units with variables only).
10434 * src/reduce.c (dump_grammar): Use it to trace the construction of
10435 ritem.
10436
10437 2001-12-04 Paul Eggert <eggert@twinsun.com>
10438
10439 * src/bison.simple (union yyalloc): Change member names
10440 to be the same as the stack names.
10441 (yyparse): yyptr is now union yyalloc *, not char *.
10442 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
10443 and may generate better code on some machines.
10444 (yystpcpy): Use prototype if __STDC__ is defined, not just
10445 if __cplusplus is defined.
10446
10447 2001-11-30 Akim Demaille <akim@epita.fr>
10448
10449 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
10450 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
10451 Gettext doesn't compile cleanly, and dies with -Werror.
10452 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
10453 Include WARNING_CFLAGS here.
10454 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
10455 before being defined.
10456
10457 2001-11-27 Paul Eggert <eggert@twinsun.com>
10458
10459 * lib/quotearg.h (quotearg_n, quotearg_n_style):
10460 First arg is int, not unsigned.
10461 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
10462 (SIZE_MAX, UINT_MAX): New macros.
10463 (quotearg_n_options): Abort if N is negative.
10464 Avoid overflow check on hosts where size_t is 64 bits and int
10465 is 32 bits, as overflow is impossible there.
10466 Fix off-by-one typo that caused unnecessary reallocation.
10467
10468 2001-11-29 Paul Eggert <eggert@twinsun.com>
10469
10470 Name space cleanup in generated parser.
10471
10472 * doc/bison.texinfo (Bison Parser): Discuss system headers
10473 and their effect on the user name space.
10474
10475 * src/bison.simple:
10476 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
10477 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
10478 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
10479
10480 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
10481 on user names when possible.
10482
10483 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
10484 Simplify test for whather <alloca.h> exists.
10485
10486 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
10487
10488 (<stdio.h>): Include if YYDEBUG.
10489
10490 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
10491 ! defined (yyoverflow) && ! defined (yymemcpy).
10492
10493 (yymemcpy, yyparse): Rename local variables as needed so that
10494 they all begin with 'yy'.
10495
10496 (yystrlen, yystpcpy): New functions.
10497
10498 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
10499 All uses changed.
10500
10501 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
10502 instead of relying on string.h functions. Use YYSTACK_ALLOC
10503 and YYSTACK_FREE instead of malloc and free.
10504
10505 2001-11-30 Akim Demaille <akim@epita.fr>
10506
10507 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
10508 before their first uses.
10509 (YYBISON, YYPURE): Move to the top of the output.
10510
10511 2001-11-30 Akim Demaille <akim@epita.fr>
10512
10513 * tests/reduce.at (Useless Nonterminals): Fix.
10514
10515 2001-11-30 Akim Demaille <akim@epita.fr>
10516
10517 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
10518 if body instead of `;' to pacify GCC's warnings.
10519
10520 2001-11-30 Akim Demaille <akim@epita.fr>
10521
10522 Instead of mapping the LHS of unused rules to -1, keep the LHS
10523 valid, but flag the rules as invalid.
10524
10525 * src/gram.h (rule_t): `useful' is a new member.
10526 * src/print.c (print_grammar): Adjust.
10527 * src/derives.c (set_derives): Likewise.
10528 * src/reader.c (packgram, reduce_output): Likewise.
10529 * src/reduce.c (reduce_grammar_tables): Likewise.
10530 * tests/reduce.at (Underivable Rules, Useless Rules): New.
10531
10532 2001-11-30 Akim Demaille <akim@epita.fr>
10533
10534 * src/reduce.c (reduce_output): Formatting changes.
10535 * src/print.c (print_results, print_grammar): Likewise.
10536 * tests/regression.at (Rule Line Numbers)
10537 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
10538
10539 2001-11-30 Akim Demaille <akim@epita.fr>
10540
10541 * src/reduce.c (nonterminals_reduce): Instead of throwing away
10542 useless nonterminals, move them at the end of the symbol arrays.
10543 (reduce_output): Adjust.
10544 * tests/reduce.at (Useless Nonterminals): Adjust.
10545
10546 2001-11-30 Akim Demaille <akim@epita.fr>
10547
10548 * src/reduce.c: Various comment/formatting changes.
10549 (nonterminals_reduce): New, extracted from...
10550 (reduce_grammar_tables): here.
10551 (reduce_grammar): Call nonterminals_reduce.
10552
10553 2001-11-29 Paul Eggert <eggert@twinsun.com>
10554
10555 * src/bison.simple (YYSTACK_REALLOC): Remove.
10556 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
10557 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
10558 New macros.
10559 (union yyalloc): New type.
10560 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
10561 an arbitrary restriction on hosts where size_t is wider than int.
10562
10563 (yyparse): Don't dump core if alloca or malloc fails; instead, report
10564 a parser stack overflow. Allocate just one block of memory for all
10565 three stacks, instead of allocating three blocks; this typically is
10566 faster and reduces fragmentation.
10567
10568 Do not limit the number of items in the stack to a value that fits
10569 in 'int', as this is an arbitrary limit on hosts with 64-bit
10570 size_t and 32-bit int.
10571
10572 2001-11-29 Marc Autret <autret_m@epita.fr>
10573
10574 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
10575 of defining YYERROR_VERBOSE.
10576 [AT_DATA]: $4 is now out of C declarations in the prologue.
10577
10578 2001-11-28 Marc Autret <autret_m@epita.fr>
10579
10580 * src/reader.c (parse_dquoted_param): New.
10581 (parse_skel_decl): Use it.
10582 * src/lex.h: Add its prototype.
10583 * src/lex.c (literalchar): Become not static.
10584
10585 2001-11-28 Marc Autret <autret_m@epita.fr>
10586
10587 * src/output.h: And put its extern declaration here.
10588 * src/output.c (error_verbose): Define here.
10589 (prepare): Echo name modification.
10590 * src/getargs.h: Clean its extern declaration.
10591 * src/getargs.c (error_verbose_flag): Remove.
10592 (getargs): Remove case 'e'.
10593 * src/options.c (option_table): 'error-verbose' is now seen as simple
10594 percent option.
10595 Include output.h.
10596
10597 * src/reader.c (read_declarations): Remove case tok_include.
10598 (parse_include_decl): Remove.
10599 * src/lex.h (token_t): Remove tok_include.
10600 * src/options.c (option_table): 'include' is now a simple command line
10601 option.
10602
10603 2001-11-28 Marc Autret <autret_m@epita.fr>
10604
10605 * src/bison.simple: Adjust muscle names.
10606 * src/muscle_tab.c (muscle_init): Also rename the muscles.
10607 * src/output.c (prepare): s/_/-/ for the muscles names.
10608 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
10609
10610 2001-11-28 Marc Autret <autret_m@epita.fr>
10611
10612 * src/bison.simple: Fix debug.
10613 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
10614
10615 2001-11-28 Akim Demaille <akim@epita.fr>
10616
10617 * src/LR0.c (shifts_new): New.
10618 (save_shifts, insert_start_shift, augment_automaton): Use it.
10619
10620 2001-11-28 Akim Demaille <akim@epita.fr>
10621
10622 * src/closure.c (closure): `b' and `ruleno' denote the same value:
10623 keep ruleno only.
10624
10625 2001-11-28 Akim Demaille <akim@epita.fr>
10626
10627 * src/closure.c (closure): Instead of looping over word in array
10628 then bits in words, loop over bits in array.
10629
10630 2001-11-28 Akim Demaille <akim@epita.fr>
10631
10632 * src/closure.c (closure): No longer optimize the special case
10633 where all the bits of `ruleset[r]' are set to 0, to make the code
10634 clearer.
10635
10636 2001-11-28 Akim Demaille <akim@epita.fr>
10637
10638 * src/closure.c (closure): `r' and `c' are new variables, used to
10639 de-obfuscate accesses to RULESET and CORE.
10640
10641 2001-11-28 Akim Demaille <akim@epita.fr>
10642
10643 * src/reduce.c (reduce_print): Use ngettext.
10644 (dump_grammar): Improve the trace accuracy.
10645
10646 2001-11-28 Akim Demaille <akim@epita.fr>
10647
10648 * src/reduce.c (dump_grammar): Don't translate trace messages.
10649
10650 2001-11-28 Akim Demaille <akim@epita.fr>
10651
10652 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
10653 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
10654 as all tags are free'ed afterwards.
10655 From Enrico Scholz.
10656
10657 2001-11-27 Paul Eggert <eggert@twinsun.com>
10658
10659 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
10660 use alloca when we didn't want to, and vice versa.
10661
10662 2001-11-27 Marc Autret <autret_m@epita.fr>
10663
10664 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
10665 initialization.
10666 * src/output.c (prepare): Remove its update.
10667
10668 2001-11-27 Marc Autret <autret_m@epita.fr>
10669
10670 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
10671 Use %error-verbose.
10672
10673 2001-11-27 Marc Autret <autret_m@epita.fr>
10674
10675 * src/bison.simple: Remove YYERROR_VERBOSE using.
10676 Use %%error_verbose.
10677 (yyparse): Likewise.
10678 * src/output.c (prepare): Give its final value.
10679 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
10680 * src/getargs.h: Add its extern declaration.
10681 * src/getargs.c (error_verbose_flag): New int.
10682 (getargs): Update to catch new case.
10683 * src/options.c (option_table): 'error-verbose' is a new option.
10684 (shortopts): Update.
10685
10686 2001-11-27 Akim Demaille <akim@epita.fr>
10687
10688 * src/system.h: Use intl/libgettext.h.
10689 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
10690
10691 2001-11-27 Akim Demaille <akim@epita.fr>
10692
10693 * tests/torture.at (Exploding the Stack Size with Malloc):
10694 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
10695
10696 2001-11-27 Akim Demaille <akim@epita.fr>
10697
10698 * src/files.c: Include error.h.
10699 Reported by Hans Aberg.
10700
10701 2001-11-26 Marc Autret <autret_m@epita.fr>
10702
10703 * src/reader.c (parse_include_decl): New, not yet implemented.
10704 (read_declarations): Add case tok_include.
10705 * src/getargs.h (include): Add its extern definition.
10706 * src/getargs.c (include): New const char *.
10707 (getargs): Add case '-I'.
10708 * src/options.c (option_table): Add include as command line and
10709 percent option.
10710 * src/lex.h (token_t): Add tok_include.
10711
10712 2001-11-26 Akim Demaille <akim@epita.fr>
10713
10714 * src/reader.c (readgram): Make sure rules for mid-rule actions
10715 have a lineno equal to that of their host rule.
10716 Reported by Hans Aberg.
10717 * tests/regression.at (Rule Line Numbers): New.
10718
10719 2001-11-26 Akim Demaille <akim@epita.fr>
10720
10721 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
10722 size_ts.
10723
10724 2001-11-26 Akim Demaille <akim@epita.fr>
10725
10726 * src/complain.c, src/complain.h (error): Remove, provided by
10727 lib/error.[ch].
10728
10729 2001-11-26 Akim Demaille <akim@epita.fr>
10730
10731 * src/reader.c (read_declarations): Don't abort on tok_illegal,
10732 issue an error message.
10733 * tests/regression.at (Invalid %directive): New.
10734 Reported by Hans Aberg.
10735
10736 2001-11-26 Akim Demaille <akim@epita.fr>
10737
10738 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
10739 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
10740
10741 2001-11-26 Akim Demaille <akim@epita.fr>
10742
10743 * src/conflicts.c (conflicts_print): Don't complain at all when
10744 there are no reduce/reduce conflicts, and as many shift/reduce
10745 conflicts as expected.
10746 * tests/regression.at (%expect right): Adjust.
10747
10748 2001-11-23 Akim Demaille <akim@epita.fr>
10749
10750 * lib/alloca.c: Update, from fileutils.
10751
10752 2001-11-23 Akim Demaille <akim@epita.fr>
10753
10754 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
10755
10756 2001-11-23 Akim Demaille <akim@epita.fr>
10757
10758 * src/system.h: Include alloca.h.
10759 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
10760
10761 2001-11-23 Akim Demaille <akim@epita.fr>
10762
10763 * src/print_graph.c (print_actions): Remove `rule', unused.
10764 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
10765 pacify GCC's signed < unsigned warnings.
10766 * src/closure.c (itemsetsize): Likewise.
10767 * src/reader.c (symbol_list_new): Static.
10768
10769 2001-11-23 Akim Demaille <akim@epita.fr>
10770
10771 Attaching lineno to buckets is stupid, since only one copy of each
10772 symbol is kept, only the line of the first occurrence is kept too.
10773
10774 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
10775 * src/reader.c (rline_allocated): Remove, unused.
10776 (symbol_list): Have a `line' member.
10777 (symbol_list_new): New.
10778 (readgram): Use it.
10779 * src/print.c (print_grammar): Output the rule line numbers.
10780 * tests/regression.at (Solved SR Conflicts)
10781 (Unresolved SR Conflicts): Adjust.
10782 Reported by Hans Aberg.
10783
10784 2001-11-22 Marc Autret <autret_m@epita.fr>
10785
10786 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
10787
10788 2001-11-22 Marc Autret <autret_m@epita.fr>
10789
10790 * src/muscle_tab.c (muscle_init): Remove initialization of
10791 skeleton muscle.
10792 * src/output.c (output_master_parser): Do it here.
10793
10794 2001-11-20 Akim Demaille <akim@epita.fr>
10795
10796 * po/sv.po: New.
10797 * configure.in (ALL_LINGUAS): Adjust.
10798 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
10799 longer contains strings to translate.
10800
10801 2001-11-19 Akim Demaille <akim@epita.fr>
10802
10803 * src/conflicts.c (conflicts_print): Add a missing \n.
10804
10805 2001-11-19 Akim Demaille <akim@epita.fr>
10806
10807 * src/nullable.c (nullable_print): New.
10808 (set_nullable): Call it when tracing.
10809 Better locality of variables.
10810
10811 2001-11-19 Akim Demaille <akim@epita.fr>
10812
10813 * src/print.c (print_actions): Better locality of variables.
10814
10815 2001-11-19 Akim Demaille <akim@epita.fr>
10816
10817 * src/derives.c (print_derives): Fix and enrich.
10818 * src/closure.c (print_fderives): Likewise.
10819
10820 2001-11-19 Akim Demaille <akim@epita.fr>
10821
10822 * src/closure.c (itemsetend): Remove, replaced with...
10823 (itemsetsize): new.
10824
10825 2001-11-19 Akim Demaille <akim@epita.fr>
10826
10827 * src/LR0.c (kernel_end): Remove, replaced with...
10828 (kernel_size): new.
10829
10830 2001-11-19 Akim Demaille <akim@epita.fr>
10831
10832 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
10833 to clarify.
10834
10835 2001-11-19 Akim Demaille <akim@epita.fr>
10836
10837 * src/closure.c (closure): Use arrays instead of pointers to clarify.
10838
10839 2001-11-19 Akim Demaille <akim@epita.fr>
10840
10841 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
10842 trace messages.
10843 * src/LR0.c: Likewise.
10844 (allocate_itemsets): Use arrays instead of pointers to clarify.
10845
10846 2001-11-19 Akim Demaille <akim@epita.fr>
10847
10848 * src/getargs.c (statistics_flag): Replace with...
10849 (trace_flag): New.
10850 (longopts): Accept --trace instead of --statistics.
10851 * src/getargs.h, src/options.c: Adjust.
10852 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
10853 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
10854
10855 2001-11-19 Akim Demaille <akim@epita.fr>
10856
10857 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
10858 pointers to clarify the code.
10859 (save_reductions, save_shifts): Factor common parts of alternatives.
10860
10861 2001-11-19 Akim Demaille <akim@epita.fr>
10862
10863 * src/LR0.c (new_state, get_state): Complete TRACE code.
10864 * src/closure.c: Include `reader.h' to get `tags', needed by the
10865 trace code.
10866 Rename the conditional DEBUG as TRACE.
10867 Output consistently TRACEs to stderr, not stdout.
10868 * src/derives.c: Likewise.
10869 * src/reduce.c: (inaccessable_symbols): Using if is better style
10870 than goto.
10871 Use `#if TRACE' instead of `#if 0' for tracing code.
10872
10873 2001-11-19 Akim Demaille <akim@epita.fr>
10874
10875 * src/system.h (LIST_FREE, shortcpy): New.
10876 * src/LR0.c: Use them.
10877 * src/output.c (free_itemsets, free_reductions, free_shifts):
10878 Remove, replaced by LIST_FREE.
10879
10880 2001-11-19 Akim Demaille <akim@epita.fr>
10881
10882 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
10883 (REDUCTIONS_ALLOC): New.
10884 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
10885 allocation.
10886
10887 2001-11-19 Akim Demaille <akim@epita.fr>
10888
10889 * src/LR0.c (new_state): Complete trace code.
10890 * src/nullable.c (set_nullable): Don't translate traces.
10891
10892 2001-11-19 Akim Demaille <akim@epita.fr>
10893
10894 * src/print_graph.c (print_core): Better locality of variables.
10895 * src/print.c (print_core): Likewise.
10896
10897 2001-11-19 Akim Demaille <akim@epita.fr>
10898
10899 * src/vcg.c: You do the output, so you are responsible of the
10900 handling of VCG syntax, in particular: use quotearg.
10901 * src/print_graph.c: Don't.
10902 (print_actions): Don't output the actions as part of the nodes,
10903 since that's the job of the edges.
10904 (print_state): Don't output by hand: fill the node description,
10905 and ask for its output.
10906
10907 2001-11-19 Akim Demaille <akim@epita.fr>
10908
10909 * src/bison.simple (yyparse): When verbosely reporting an error,
10910 no longer put additional quotes around token names.
10911 * tests/calc.at: Adjust.
10912
10913 2001-11-19 Akim Demaille <akim@epita.fr>
10914
10915 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
10916 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
10917 * src/output.c: Adjust.
10918
10919 2001-11-19 Akim Demaille <akim@epita.fr>
10920
10921 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
10922 (rule_t): this.
10923 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
10924
10925 2001-11-19 Akim Demaille <akim@epita.fr>
10926
10927 * src/gram.h (rule_t): New.
10928 (rule_table): New.
10929 (rrhs, rlhs): Remove, part of state_t.
10930 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
10931 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
10932 * src/reader.c, src/reduce.c: Adjust.
10933
10934 2001-11-19 Akim Demaille <akim@epita.fr>
10935
10936 * src/reader.c (symbols_output): New, extracted from...
10937 (packsymbols): Here.
10938 (reader): Call it.
10939
10940 2001-11-19 Akim Demaille <akim@epita.fr>
10941
10942 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
10943 (maxrhs): this new function.
10944
10945 2001-11-19 Akim Demaille <akim@epita.fr>
10946
10947 * src/lalr.c (F): New macro to access the variable F.
10948 Adjust.
10949
10950 2001-11-19 Akim Demaille <akim@epita.fr>
10951
10952 * src/lalr.h (LA): New macro to access the variable LA.
10953 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
10954 * src/lalr.c: Adjust.
10955
10956 2001-11-19 Akim Demaille <akim@epita.fr>
10957
10958 * src/lalr.c (initialize_LA): Only initialize LA. Let...
10959 (set_state_table): handle the `lookaheads' members.
10960
10961 2001-11-19 Akim Demaille <akim@epita.fr>
10962
10963 * src/lalr.h (lookaheads): Removed array, whose contents is now
10964 a member of...
10965 (state_t): this structure.
10966 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
10967 Adjust.
10968
10969 2001-11-19 Akim Demaille <akim@epita.fr>
10970
10971 * src/lalr.h (consistent): Removed array, whose contents is now
10972 a member of...
10973 (state_t): this structure.
10974 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
10975 Adjust.
10976
10977 2001-11-19 Akim Demaille <akim@epita.fr>
10978
10979 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
10980 contents are now members of...
10981 (state_t): this structure.
10982 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
10983 Adjust.
10984
10985 2001-11-19 Akim Demaille <akim@epita.fr>
10986
10987 * src/lalr.h (state_t): New.
10988 (state_table): Be a state_t * instead of a core **.
10989 (accessing_symbol): Remove, part of state_t.
10990 * src/lalr.c: Adjust.
10991 (set_accessing_symbol): Merge into...
10992 (set_state_table): this.
10993 * src/print_graph.c, src/conflicts.c: Adjust.
10994
10995 2001-11-14 Akim Demaille <akim@epita.fr>
10996
10997 * tests/calc.at, tests/output.at, tests/regression.at,
10998 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
10999 now the tests are run in private dirs, therefore AC_CLEANUP and
11000 family can be simplified to 0-ary.
11001 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
11002 use abs. path to find config.h.
11003 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
11004 stderr, there can be way too much random noise.
11005 Instead pass -Werror to GCC and rely on the exit status.
11006 Reported by Wolfram Wagner.
11007
11008 2001-11-14 Akim Demaille <akim@epita.fr>
11009
11010 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
11011 defined only if yyoverflow is defined, to avoid `warning: unused
11012 variable `yyvs1''.
11013 Reported by The Test Suite.
11014
11015 2001-11-14 Akim Demaille <akim@epita.fr>
11016
11017 * src/print.c: Include reduce.h.
11018 Reported by Hans Aberg.
11019
11020 2001-11-14 Akim Demaille <akim@epita.fr>
11021
11022 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
11023 Revert a previous patch: these are really const.
11024 * src/conflicts.c (conflict_report): Additional useless pair of
11025 braces to pacify GCC's warnings for `if () if () {} else {}'.
11026 * src/lex.c (parse_percent_token): Replace equal_offset with
11027 arg_offset.
11028 arg is const.
11029 Be sure to strdup `arg' when used, since there is no reason for
11030 token_buffer not to change.
11031
11032 2001-11-14 Akim Demaille <akim@epita.fr>
11033
11034 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
11035 definition.
11036 * src/main.c (main): Use them.
11037 Suggested by Hans Aberg.
11038
11039 2001-11-12 Akim Demaille <akim@epita.fr>
11040
11041 * src/system.h (ngettext): Now that we use ngettext, be sure to
11042 provide a default definition when NLS are not used.
11043
11044 2001-11-12 Akim Demaille <akim@epita.fr>
11045
11046 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
11047 Use @kbd to denote user input.
11048 (Language and Grammar): ANSIfy the example.
11049 Adjust its layout for info/notinfo.
11050 (Location Tracking Calc): Output error messages to stderr.
11051 Output locations in a more GNUtically correct way.
11052 Fix a couple of Englishos.
11053 Adjust @group/@end group pairs.
11054
11055 2001-11-12 Akim Demaille <akim@epita.fr>
11056
11057 %expect was not functioning at all.
11058
11059 * src/conflicts.c (expected_conflicts): Set to -1.
11060 (conflict_report): Use ngettext.
11061 (conflicts_print): Check %expect and make its violation an error.
11062 * doc/bison.texinfo (Expect Decl): Adjust.
11063 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
11064 * tests/regression.at (%expect not enough, %expect right)
11065 (%expect too much): New.
11066
11067 2001-11-12 Akim Demaille <akim@epita.fr>
11068
11069 * tests/regression.at (Conflicts): Rename as...
11070 (Unresolved SR Conflicts): this.
11071 (Solved SR Conflicts): New.
11072
11073 2001-11-12 Akim Demaille <akim@epita.fr>
11074
11075 * src/reduce.c (print_results): Rename as...
11076 (reduce_output): This.
11077 Output to OUT, passed as argument, instead of output_obstack.
11078 (dump_grammar): Likewise.
11079 (reduce_free): New.
11080 Also free V1.
11081 (reduce_grammar): No longer call reduce_output, since...
11082 * src/print.c (print_results): do it.
11083 * src/main.c (main): Call reduce_free;
11084
11085 2001-11-12 Akim Demaille <akim@epita.fr>
11086
11087 * src/conflicts.c (print_reductions): Accept OUT as argument.
11088 Output to it, not to output_obstack.
11089 * src/print.c (print_actions): Adjust.
11090
11091 2001-11-12 Akim Demaille <akim@epita.fr>
11092
11093 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
11094 the result instead of using...
11095 (src_total, rrc_total, src_count, rrc_count): Remove.
11096 (any_conflicts): Remove.
11097 (print_conflicts): Split into...
11098 (conflicts_print, conflicts_output): New.
11099 * src/conflicts.h: Adjust.
11100 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
11101 * src/print.c (print_grammar): Issue `\n' between two rules.
11102 * tests/regression.at (Conflicts): New.
11103 Reported by Tom Lane.
11104
11105 2001-11-12 Akim Demaille <akim@epita.fr>
11106
11107 * tests/regression.at (Invalid input): Remove, duplicate with
11108 ``Invalid input: 1''.
11109
11110 2001-11-12 Akim Demaille <akim@epita.fr>
11111
11112 * tests/torture.at (AT_DATA_STACK_TORTURE)
11113 (Exploding the Stack Size with Alloca)
11114 (Exploding the Stack Size with Malloc): New.
11115
11116 2001-11-12 Akim Demaille <akim@epita.fr>
11117
11118 * src/bison.simple (YYSTACK_REALLOC): New.
11119 (yyparse) [!yyoverflow]: Use it and free the old stack.
11120 Reported by Per Allansson.
11121
11122 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
11123
11124 * src/bison.simple: Define type yystype instead of YYSTYPE, and
11125 define CPP macro, which substitute YYSTYPE by yystype.
11126 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
11127 with yyltype/YYLTYPE. This allows inclusion of the generated
11128 header within the parser if the compiler, such as GGC, accepts
11129 multiple equivalent #defines.
11130 From Akim.
11131
11132 2001-11-05 Akim Demaille <akim@epita.fr>
11133
11134 * src/reader.c (symbols_output): New, extracted from...
11135 (packsymbols): here.
11136 (reader): Adjust.
11137
11138 2001-11-05 Akim Demaille <akim@epita.fr>
11139
11140 * src/lex.c (parse_percent_token): s/quotearg/quote/.
11141
11142 2001-11-05 Akim Demaille <akim@epita.fr>
11143
11144 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
11145 pattern.
11146
11147 2001-11-05 Akim Demaille <akim@epita.fr>
11148
11149 * src/options.h (struct option_table_struct): set_flags is void*.
11150 * src/options.c (longopts): Support `--output' and `%output'.
11151 (usage): Adjust.
11152 * src/lex.h (tok_setopt): Remove, replaced with...
11153 (tok_intopt, tok_stropt): these new guys.
11154 * src/lex.c (getopt.h): Not needed.
11155 (token_buffer, unlexed_token_buffer): Not const.
11156 (percent_table): Promote `-' over `_' in directive names.
11157 Active `%name-prefix', `file-prefix', and `output'.
11158 (parse_percent_token): Accept possible arguments to directives.
11159 Promote `-' over `_' in directive names.
11160
11161 2001-11-04 Akim Demaille <akim@epita.fr>
11162
11163 * doc/bison.texinfo (Decl Summary): Split the list into
11164 `directives for grammars' and `directives for bison'.
11165 Sort'em.
11166 Add description of `%name-prefix', `file-prefix', and `output'.
11167 Promote `-' over `_' in directive names.
11168 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
11169 Simplify the description of `--name-prefix'.
11170 Promote `-' over `_' in directive names.
11171 Promote `--output' over `--output-file'.
11172 Fix the description of `--defines'.
11173 * tests/output.at: Exercise %file-prefix and %output.
11174
11175 2001-11-02 Akim Demaille <akim@epita.fr>
11176
11177 * doc/refcard.tex: Update.
11178
11179 2001-11-02 Akim Demaille <akim@epita.fr>
11180
11181 * src/symtab.h (SUNDEF): New.
11182 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
11183 stand for `uninitialized', instead of 0.
11184 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
11185 * src/lex.c (lex): Adjust.
11186
11187 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
11188 Number it 0.
11189 Let yylex return it instead of a plain 0.
11190 Reported by Dick Streefland.
11191
11192 2001-11-02 Akim Demaille <akim@epita.fr>
11193
11194 * tests/regression.at (Mixing %token styles): New test.
11195
11196 2001-11-02 Akim Demaille <akim@epita.fr>
11197
11198 * src/reader.c (parse_thong_decl): Formatting changes.
11199 (token_translations_init): New, extracted from...
11200 (packsymbols): Here.
11201 Adjust.
11202
11203 2001-11-01 Akim Demaille <akim@epita.fr>
11204
11205 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
11206 Check that `9foo.y' produces correct cpp guards.
11207 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
11208 guards.
11209 Reported by Wwp.
11210
11211 2001-11-01 Akim Demaille <akim@epita.fr>
11212
11213 * tests/regression.at (Invalid input: 2): New.
11214 * src/lex.c (unlexed_token_buffer): New.
11215 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
11216 too.
11217 Reported by Wwp.
11218
11219 2001-11-01 Akim Demaille <akim@epita.fr>
11220
11221 * tests/calc.at: Catch up with 1.30.
11222 * configure.in: Bump to 1.49a.
11223 Adjust to newer Autotest.
11224
11225 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
11226
11227 * src/conflicts.c: Move global variables rrc_total and src_total ...
11228 (print_conflicts): here.
11229 * src/output.c (output): Free global variable user_toknums.
11230 * src/lex.c (token_obstack): Become static.
11231
11232 2001-10-18 Akim Demaille <akim@epita.fr>
11233
11234 * tests/atlocal.in (GCC): Add.
11235 * tests/calc.at: s/m4_match/m4_bmatch/.
11236 s/m4_patsubst/m4_bpatsubst/.
11237 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
11238 * configure.in: AC_SUBST(GCC).
11239
11240 2001-10-14 Marc Autret <autret_m@epita.fr>
11241
11242 * src/options.c (create_long_option_table): Fix.
11243
11244 2001-10-10 Akim Demaille <akim@epita.fr>
11245
11246 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
11247
11248 2001-10-04 Akim Demaille <akim@epita.fr>
11249
11250 * src/reader.c (parse_union_decl): Push the caracters in
11251 union_obstack, not attrs_obstack.
11252
11253 2001-10-04 Akim Demaille <akim@epita.fr>
11254
11255 Merge in the branch 1.29.
11256
11257 * src/reader.c (packsymbols): Use a temporary obstack for
11258 `%%tokendef', since output_stack is already used elsewhere.
11259
11260 2001-10-02 Akim Demaille <akim@epita.fr>
11261
11262 Bump 1.29d.
11263
11264 2001-10-02 Akim Demaille <akim@epita.fr>
11265
11266 Version 1.29c.
11267
11268 2001-10-02 Akim Demaille <akim@epita.fr>
11269
11270 * tests/regression.at (Invalid CPP headers): New.
11271 From Alexander Belopolsky.
11272 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
11273
11274 2001-10-02 Akim Demaille <akim@epita.fr>
11275
11276 * tests/regression.at (Invalid input): New.
11277 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
11278 Reported by Shura.
11279
11280 2001-10-02 Akim Demaille <akim@epita.fr>
11281
11282 * tests/calc.at: Now that --debug works, the tests must be adjusted.
11283
11284 2001-10-02 Akim Demaille <akim@epita.fr>
11285
11286 * src/output.c (output_parser): Assert `skeleton'.
11287 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
11288 systems.
11289 From Shura.
11290
11291 2001-10-01 Marc Autret <autret_m@epita.fr>
11292
11293 * src/lex.h: Echo modifications.
11294 * src/lex.c (unlex): Parameter is now token_t.
11295 From Hans Aberg.
11296
11297 2001-10-01 Marc Autret <autret_m@epita.fr>
11298
11299 * src/main.c: Include lex.h.
11300 From Hans Aberg.
11301
11302 2001-09-29 Akim Demaille <akim@epita.fr>
11303
11304 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
11305
11306 2001-09-28 Akim Demaille <akim@epita.fr>
11307
11308 * tests/testsuite.at: Update to newer Autotest.
11309 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
11310
11311 2001-09-27 Akim Demaille <akim@epita.fr>
11312
11313 Position independent wrapper.
11314
11315 * tests/bison: Remove.
11316 * tests/bison.in: New.
11317 * configure.in: Adjust.
11318
11319 2001-09-27 Paul Eggert <eggert@twinsun.com>
11320
11321 Port quotearg fixes from tar 1.13.24.
11322
11323 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
11324 tm to be declared.
11325 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
11326 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
11327
11328 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
11329 * m4/mbrtowc.m4: New file.
11330 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
11331 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
11332
11333 2001-09-27 Akim Demaille <akim@epita.fr>
11334
11335 Bump to 1.29c.
11336
11337 2001-09-27 Akim Demaille <akim@epita.fr>
11338
11339 Version 1.29b.
11340
11341 2001-09-25 Akim Demaille <akim@epita.fr>
11342
11343 * src/system.h: Include `xalloc.h'.
11344 Remove it from the C files.
11345 * src/files.c (output_files): Free the obstacks.
11346 * src/lex.c (init_lex): Rename as...
11347 (lex_init): this.
11348 (lex_free): New.
11349 * src/main.c (main): Use it.
11350
11351 2001-09-24 Marc Autret <autret_m@epita.fr>
11352
11353 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
11354 to output informations in fout (FILE*).
11355 (open_graph, close_graph): Likewise.
11356 (output_graph, output_edge, output_node): Likewise.
11357 * src/vcg.h: Update function prototypes.
11358 * src/print_graph.c (print_graph): Open output graph file.
11359 (print_actions): Adjust.
11360 * src/files.h: Remove extern declaration.
11361 * src/files.c: Remove graph_obstack declaration.
11362 (open_files): Remove graph_obstack initialization.
11363 (output_files): Remove graph_obstack saving.
11364
11365 2001-09-24 Marc Autret <autret_m@epita.fr>
11366
11367 * src/files.c (compute_output_file_names): Fix.
11368
11369 2001-09-24 Marc Autret <autret_m@epita.fr>,
11370 Akim Demaille <akim@epita.fr>
11371
11372 * src/reader.c (reader): Remove call to free_symtab ().
11373 * src/main.c (main): Call it here.
11374 Include symtab.h.
11375 * src/conflicts.c (initialize_conflicts): Rename as...
11376 (solve_conflicts): this.
11377 * src/print.c (print_core, print_actions, print_state)
11378 (print_grammar): Dump to a file instead a `output_obstack'.
11379 (print_results): Dump `output_obstack', and then proceed with the
11380 FILE *.
11381 * src/files.c (compute_output_file_names, close_files): New.
11382 (output_files): Adjust.
11383 * src/main.c (main): Adjust.
11384
11385 2001-09-23 Marc Autret <autret_m@epita.fr>
11386
11387 * src/files.c (compute_header_macro): Computes header macro name
11388 from spec_defines_file when given.
11389
11390 2001-09-23 Marc Autret <autret_m@epita.fr>
11391
11392 * src/files.c (output_files): Add default extensions.
11393
11394 2001-09-22 Akim Demaille <akim@epita.fr>
11395
11396 * src/conflicts.c (finalize_conflicts): Rename as...
11397 (free_conflicts): this.
11398
11399 2001-09-22 Akim Demaille <akim@epita.fr>
11400
11401 * src/gram.c (gram_free): Rename back as...
11402 (dummy): this.
11403 (output_token_translations): Free `token_translations'.
11404 * src/symtab.c (free_symtab): Free the tag field.
11405
11406 2001-09-22 Akim Demaille <akim@epita.fr>
11407
11408 Remove `translations' as it is always set to true.
11409
11410 * src/gram.h: Adjust.
11411 * src/reader.c (packsymbols, parse_token_decl): Adjust
11412 * src/print.c (print_grammar): Adjust.
11413 * src/output.c (output_token_translations): Adjust.
11414 * src/lex.c (lex): Adjust.
11415 * src/gram.c: Be sure the set pointers to NULL.
11416 (dummy): Rename as...
11417 (gram_free): this.
11418
11419 2001-09-22 Akim Demaille <akim@epita.fr>
11420
11421 * configure.in: Invoke AM_LIB_DMALLOC.
11422 * src/system.h: Use dmalloc.
11423 * src/LR0.c: Be sure to have pointers initialized to NULL.
11424 (allocate_itemsets): Allocate kernel_items only if needed.
11425
11426 2001-09-22 Akim Demaille <akim@epita.fr>
11427
11428 * configure.in: Bump to 1.29b.
11429 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
11430 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
11431 need xmalloc.c in calc.y.
11432 From Pascal Bart.
11433
11434 2001-09-21 Akim Demaille <akim@epita.fr>
11435
11436 Version 1.29a.
11437 * Makefile.maint, config/config.guess, config/config.sub,
11438 * config/missing: Update from masters.
11439 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
11440 upon package.m4.
11441 * configure.in (ALL_LINGUAS): Add `tr'.
11442
11443 2001-09-21 Akim Demaille <akim@epita.fr>
11444
11445 * tests/Makefile.am (package.m4): Move to...
11446 ($(srcdir)/$(TESTSUITE)): here.
11447
11448 2001-09-20 Akim Demaille <akim@epita.fr>
11449
11450 * src/complain.c: No longer try to be standalone: use system.h.
11451 Don't assume __STDC__ is defined to 1. Just test if it is defined.
11452 * src/complain.h: Likewise.
11453 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
11454 Remove the unused variable `n'.
11455 From Albert Chin-A-Young.
11456
11457 2001-09-18 Marc Autret <autret_m@epita.fr>
11458
11459 * doc/bison.1: Update.
11460 * doc/bison.texinfo (Bison Options): Update --defines and --graph
11461 descriptions.
11462 (Option Cross Key): Update.
11463 Add --graph.
11464
11465 2001-09-18 Marc Autret <autret_m@epita.fr>
11466
11467 * tests/regression.at: New test (comment in %union).
11468
11469 2001-09-18 Marc Autret <autret_m@epita.fr>
11470
11471 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
11472 do that.
11473 Reported by Keith Browne.
11474
11475 2001-09-18 Marc Autret <autret_m@epita.fr>
11476
11477 * tests/output.at: Add tests for --defines and --graph.
11478
11479 2001-09-18 Marc Autret <autret_m@epita.fr>
11480
11481 * tests/output.at: Removes tests of %{header,src}_extension features.
11482
11483 2001-09-18 Akim Demaille <akim@epita.fr>
11484
11485 * tests/Makefile.am (package.m4): New.
11486 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
11487 (_AT_CHECK_CALC_ERROR): Likewise.
11488 Factor the `, ' part of verbose error messages.
11489
11490 2001-09-18 Marc Autret <autret_m@epita.fr>
11491
11492 * src/getargs.c (longopts): Declare --defines and --graph as options
11493 with optional arguments.
11494 * src/files.h: Add extern declarations.
11495 * src/files.c (spec_graph_file, spec_defines_file): New.
11496 (output_files): Update.
11497 Remove CPP-outed code.
11498
11499 2001-09-18 Marc Autret <autret_m@epita.fr>
11500
11501 Turn off %{source,header}_extension feature.
11502
11503 * src/files.c (compute_exts_from_gf): Update.
11504 (compute_exts_from_src): Update.
11505 (output_files): CPP-out useless code.
11506 * src/files.h: Remove {header,source}_extension extern declarations.
11507 * src/reader.c (parse_dquoted_param): CPP-out.
11508 (parse_header_extension_decl): Remove.
11509 (parse_source_extension_decl): Remove.
11510 (read_declarations): Remove cases tok_{hdrext,srcext}.
11511 * src/lex.c (percent_table): Remove {header,source}_extension entries.
11512 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
11513
11514 2001-09-10 Akim Demaille <akim@epita.fr>
11515
11516 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
11517 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
11518 (AT_CHECK_OUTPUT): this.
11519 Merely check ls' exit status, its output is useless.
11520
11521 2001-09-10 Akim Demaille <akim@epita.fr>
11522
11523 * tests/calc.at: Use m4_match.
11524 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
11525
11526 2001-09-10 Marc Autret <autret_m@epita.fr>,
11527 Akim Demaille <akim@epita.fr>
11528
11529 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
11530 enum color_e.
11531 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
11532 to `normal'.
11533 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
11534 * src/lex.h: Adjust prototype.
11535 (token_t): Add `tok_undef'.
11536 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
11537 (parse_percent_token): Now returns token_t.
11538 Add default statement in switch.
11539 (lex): Separate `c' as an input variable, from the token_t result
11540 part.
11541 (unlexed): Is a token_t.
11542
11543 2001-09-10 Akim Demaille <akim@epita.fr>
11544
11545 * configure.in: Bump to 1.29a.
11546
11547 2001-09-07 Akim Demaille <akim@epita.fr>
11548
11549 Version 1.29.
11550
11551 2001-08-30 Akim Demaille <akim@epita.fr>
11552
11553 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
11554 * m4/atconfig.m4: Remove.
11555 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
11556 * tests/bison: New.
11557 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
11558 m4_if, m4_patsubst, and m4_regexp.
11559 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
11560 `input' file instead of echo.
11561
11562 2001-08-29 Akim Demaille <akim@epita.fr>
11563
11564 Bump to 1.28e.
11565
11566 2001-08-29 Akim Demaille <akim@epita.fr>
11567
11568 Version 1.28d.
11569
11570 2001-08-29 Paul Eggert <eggert@twinsun.com>
11571
11572 * src/bison.simple (yyparse): Don't take the address of an
11573 item before the start of an array, as that doesn't conform to
11574 the C Standard.
11575
11576 2001-08-29 Robert Anisko <anisko_r@epita.fr>
11577
11578 * doc/bison.texinfo (Location Tracking Calc): New node.
11579
11580 2001-08-29 Paul Eggert <eggert@twinsun.com>
11581
11582 * src/output.c (output): Do not define const, as this now
11583 causes more problems than it cures.
11584
11585 2001-08-29 Akim Demaille <akim@epita.fr>
11586
11587 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
11588 the nodes.
11589 Be sure to tag the `detailmenu'.
11590
11591 2001-08-29 Akim Demaille <akim@epita.fr>
11592
11593 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
11594 download in a tmp dir.
11595
11596 2001-08-28 Marc Autret <autret_m@epita.fr>
11597
11598 * config/depcomp: New file.
11599
11600 2001-08-28 Marc Autret <autret_m@epita.fr>
11601
11602 * doc/bison.1 (mandoc): Adjust.
11603 From Juan Manuel Guerrero.
11604
11605 2001-08-28 Marc Autret <autret_m@epita.fr>
11606
11607 * src/print_graph.c (print_state): Fix.
11608
11609 2001-08-27 Marc Autret <autret_m@epita.fr>
11610
11611 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
11612 char * members.
11613 Echo modifications to the functions prototypes.
11614 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
11615
11616 2001-08-27 Marc Autret <autret_m@epita.fr>
11617
11618 * src/vcg.c: Include `xalloc.h'.
11619 (add_colorentry): New.
11620 (add_classname): New.
11621 (add_infoname): New.
11622 * src/vcg.h: Add new prototypes.
11623
11624 2001-08-27 Akim Demaille <akim@epita.fr>
11625
11626 * Makefile.maint: Sync. again with CVS Autoconf.
11627
11628 2001-08-27 Akim Demaille <akim@epita.fr>
11629
11630 * Makefile.maint: Formatting changes.
11631 (po-update, cvs-update, update): New targets.
11632 (AMTAR): Remove.
11633
11634 2001-08-27 Akim Demaille <akim@epita.fr>
11635
11636 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
11637 * Makefile.maint: Sync. with CVS Autoconf.
11638
11639 2001-08-27 Marc Autret <autret_m@epita.fr>
11640
11641 * src/vcg.h (struct infoname_s): New.
11642 (struct colorentry_s): New.
11643 (graph_s): New fields {vertical,horizontal}_order in structure.
11644 Add `infoname' field.
11645 Add `colorentry' field;
11646 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
11647 (G_HORIZONTAL_ORDER): New.
11648 (G_INFONAME): New.
11649 (G_COLORENTRY): New.
11650 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
11651 Add output of `infoname'.
11652 Add output of `colorentry'.
11653
11654 2001-08-27 Marc Autret <autret_m@epita.fr>
11655
11656 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
11657 This one shadowed a global parameter.
11658
11659 2001-08-24 Marc Autret <autret_m@epita.fr>
11660
11661 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
11662 instead of `unsigned'.
11663 (print_state): Do not call obstack_object_size () in obstack_grow ()
11664 to avoid macro variables shadowing.
11665
11666 2001-08-23 Marc Autret <autret_m@epita.fr>
11667
11668 * src/lex.c (percent_table): Typo: s/naem/name/.
11669 Add graph option.
11670 Normalize new options declarations.
11671
11672 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
11673
11674 * tests/suite.at: Exercise %header_extension and %source_extension.
11675
11676 2001-08-16 Marc Autret <autret_m@epita.fr>
11677
11678 * src/reader.c (parse_dquoted_param): New.
11679 (parse_header_extension_decl): Use it.
11680 (parse_source_extension_decl): Likewise.
11681
11682 2001-08-16 Marc Autret <autret_m@epita.fr>
11683
11684 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
11685 (get_xxxx_str): Use assert () instead of complain ().
11686 Remove return invokations in default cases.
11687 (get_decision_str): Modify default behaviour. Remove second argument.
11688 Echo modifications on calls.
11689 (output_graph): Fix.
11690
11691 2001-08-16 Marc Autret <autret_m@epita.fr>
11692
11693 * src/getargs.c (usage): Update with ``-g, --graph''.
11694
11695 2001-08-16 Marc Autret <autret_m@epita.fr>
11696
11697 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
11698 (Option Cross Key): Likewise.
11699 * doc/bison.1: Update.
11700
11701 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
11702
11703 * src/output.c (output_master_parser): Don't finish action_obstack.
11704 (output_parser): Don't care about the muscle action, here.
11705 (prepare): Copy the action_obstack in the action muscle.
11706 (output): Free action_obstack.
11707
11708 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
11709
11710 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
11711 will contain `%union' declaration.
11712 (parse_union_decl): Delete #line directive output.
11713 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
11714 informations about %union.
11715 (parse_union_decl): Copy the union_obstack in the muscle stype.
11716 * src/bison.simple: Add new #line directive.
11717 Add typdef %%stype YYSTYPE.
11718
11719 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
11720
11721 * src/bison.simple: Add new `#line' directive.
11722
11723 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
11724
11725 * src/bison.simple: New `#line' directive.
11726 * src/output.c (output_parser): Support new dynamic muscle input_line.
11727
11728 2001-09-22 Marc Autret <autret_m@epita.fr>
11729
11730 * src/output.c (output_master_parser): New.
11731 (output_parser): Be more re-entrant.
11732
11733 2001-09-21 Marc Autret <autret_m@epita.fr>
11734
11735 * src/reader.c (copy_definition, parse_union_decl): Update and use
11736 `linef' muscle.
11737 (copy_action): Likewise.
11738 Use obstack_1grow ().
11739 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
11740
11741 2001-09-21 Marc Autret <autret_m@epita.fr>
11742
11743 * src/options.c (option_table): Adjust.
11744 * src/lex.c (parse_percent_token): Fix.
11745
11746 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
11747
11748 * src/options.c (symtab.h): Include it, need by lex.h.
11749
11750 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
11751
11752 * src/lex.c (parse_percent_token): Change type of variable `tx', which
11753 is now an option_table_struct*.
11754 (option_strcmp): New function option_strcmp.
11755 (parse_percent_token): Call option_strcmp.
11756 * src/getargs.c (xalloc.h, options.h): Include it.
11757 (getargs): Call create_long_option_table.
11758 (getargs): Free longopts at the end of the function.
11759 (shortopts): Move in options.c.
11760 * src/options.c (create_long_option_table): New function. Convert
11761 information from option_table to option structure.
11762 * src/reader.c (options.h): Include it.
11763
11764 * src/Makefile.am: Adjust.
11765 * src/options.c (option_table): Create from longopts and percent_table.
11766 * src/getargs.c (longopts): Delete.
11767 * src/lex.c (struct percent_table_struct): Delete.
11768 (percent_table): Delete.
11769 (options.h): Include it.
11770 * src/options.c: Create.
11771 * src/options.h: Create.
11772 Declare enum opt_access_e.
11773 Define struct option_table_struct.
11774
11775 2001-09-20 Marc Autret <autret_m@epita.fr>
11776
11777 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
11778 sections of Bison.
11779
11780 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
11781
11782 * src/bison.simple: s/%%filename/%%skeleton.
11783 * src/muscle_tab.c (getargs.h): Include it.
11784 (muscle_init): Insert new muscle skeleton.
11785
11786 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
11787
11788 * src/output.c (output_parser): Delete unused variable actions_dumped.
11789
11790 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
11791
11792 * src/output.c (output): Delete call to reader_output_yylsp.
11793 * src/reader.c (reader): Likewise.
11794 * src/reader.h: Delete declaration of reader_output_yylsp.
11795
11796 2001-09-02 Marc Autret <autret_m@epita.fr>
11797
11798 * src/reader.c: Include muscle_tab.h.
11799 (parse_union_decl): Update.
11800 (parse_macro_decl): Rename parse_muscle_decl.
11801 Update to use renamed functions and variable.
11802 (read_declarations, copy_action, read_additionnal_code, : Updated
11803 with correct variables and functions names.
11804 (packsymbols, reader): Likewise.
11805
11806 * src/reader.h (muscle_obstack): Extern declaration update.
11807
11808 * src/output.c: Include muscle_tab.h
11809 In all functions using macro_insert, change by using muscle_insert ().
11810 (macro_obstack): Rename muscle_obstack.
11811 Echo modifications in the whole file.
11812 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
11813 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
11814 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
11815
11816 * src/muscle_tab.h: Update double inclusion macros.
11817 (macro_entry_s): Rename muscle_entry_s.
11818 Update prototypes.
11819
11820 * src/muscle_tab.c: Include muscle_tab.h.
11821 Rename macro_tabble to muscle_table.
11822 (mhash1, mhash2, mcmp): Use muscle_entry.
11823 (macro_init): Rename muscle_init. Update.
11824 (macro_insert): Rename muscle_insert. Update.
11825 (macro_find): Rename muscle_find. Update.
11826
11827 * src/main.c: Include muscle_tab.h.
11828 (main): Call muscle_init ().
11829 * src/Makefile.am (bison_SOURCES): Echo modifications.
11830
11831 2001-09-02 Marc Autret <autret_m@epita.fr>
11832
11833 Now the files macro_tab.[ch] are named muscle_tab.[ch].
11834
11835 * src/muscle_tab.c, src/muscle_tab.h: Add files.
11836
11837 2001-09-02 Marc Autret <autret_m@epita.fr>
11838
11839 * src/macrotab.c, src/macrotab.h: Remove.
11840
11841 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
11842
11843 * src/reader.c (copy_guard): Use muscle to specify the `#line'
11844 filename.
11845
11846 2001-09-01 Marc Autret <autret_m@epita.fr>
11847
11848 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
11849 to an explicit value to activate the feature. We do it here.
11850
11851 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
11852
11853 * src/output.c (prepare): Delete the `filename' muscule insertion.
11854 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
11855 (parse_union_decl): Likewise.
11856 * src/macrotab.c (macro_init): Initialize filename by infile.
11857
11858 2001-08-31 Marc Autret <autret_m@epita.fr>
11859
11860 * src/bison.simple (YYLSP_NEEDED): New definition.
11861 * src/output.c (prepare): Add macro insertion of `locations_flag'
11862
11863 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
11864
11865 * src/output.c (prepare): Delete insertion of previous muscles,
11866 and insert the `prefix' muscles.
11867 * src/macrotab.c (macro_init): Likewise.
11868 (macro_init): Initialization prefix directive by `yy'.
11869 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
11870 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
11871 yylval, yydebug, yyerror, yynerrs and yyparse.
11872 New directive `#define' to substitute yydebug, ... with option
11873 name_prefix.
11874
11875 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
11876
11877 * src/main.c (main): Standardize.
11878 * src/output.c (output_table_data, output_parser): Likewise.
11879 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
11880
11881 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
11882
11883 * src/reader.c (read_additionnal_code): Rename %%user_code to
11884 %%epilogue.
11885 * src/output.c (output): Rename %%declarations to %%prologue.
11886 * src/bison.simple: Echo modifications.
11887
11888 2001-08-31 Marc Autret <autret_m@epita.fr>
11889
11890 * src/reader.c (readgram): CleanUp.
11891 (output_token_defines): Likewise.
11892 (packsymbols): Likewise.
11893 (reader): Likewise.
11894 * src/output.c (output): CPP-out useless code.
11895
11896 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
11897
11898 * src/reader.c (reader): Delete obsolete call to function
11899 output_trailers and output_headers.
11900 * src/output.h: Remove obsolete functions prototypes of output_headers
11901 and output_trailers.
11902
11903 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
11904
11905 * src/main.c: Include macrotab.h.
11906 * src/macrotab.h (macro_entry_s): Constify fields.
11907 Adjust functions prototypes.
11908 * src/macrotab.c (macro_insert): Constify key and value.
11909 (macro_find): Constify key.
11910 (macro_insert): Include 'xalloc.h'
11911 (macro_insert): Use XMALLOC.
11912 (macro_find): Constify return value.
11913 * src/output.c (output_table_data): Rename table to table_data.
11914 (output_parser): Constify macro_key, macro_value.
11915
11916 2001-08-30 Marc Autret <autret_m@epita.fr>
11917
11918 * src/reader.c (parse_skel_decl): New.
11919 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
11920 * src/lex.h (token_t): New token `tok_skel'.
11921 * src/lex.c (percent_table): Add skeleton option entry.
11922 Standardize.
11923
11924 2001-08-29 Marc Autret <autret_m@epita.fr>
11925
11926 * src/bison.simple: Add %%user_code directive at the end.
11927 * src/reader.c (read_additionnal_code): New.
11928 (reader): Use it.
11929 * src/output.c (output_program): Remove.
11930 (output): Update.
11931
11932 2001-08-28 Marc Autret <autret_m@epita.fr>
11933
11934 * src/output.c (output_actions): Clean up.
11935 (output_gram): CPP-out useless code.
11936 * src/reader.c (reader): Clean up, CPP-out useless code.
11937
11938 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
11939
11940 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
11941 directive.
11942 * src/bison.simple: Add `%%definitions'.
11943
11944 2001-08-28 Marc Autret <autret_m@epita.fr>
11945
11946 * config/depcomp: New file.
11947
11948 2001-08-27 Paul Eggert <eggert@twinsun.com>
11949
11950 * src/bison.simple (yyparse): Don't take the address of an
11951 item before the start of an array, as that doesn't conform to
11952 the C Standard.
11953
11954 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
11955
11956 * src/output.c (output): Remove the initialization of the macro
11957 obstack. It was done too late here.
11958
11959 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
11960 completely wrong.
11961 (reader): Initialize the macro obstack here, since we need it to grow
11962 '%define' directives.
11963
11964 * src/reader.h: Declare the macro obstack as extern.
11965
11966 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
11967
11968 * src/output.c (output_parser): Fix. Store single '%' characters in
11969 the output obstack instead of throwing them away.
11970
11971 2001-08-27 Akim Demaille <akim@epita.fr>
11972
11973 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
11974
11975 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
11976
11977 * lib/Makefile.am: Adjust.
11978
11979 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
11980
11981 * src/bison.simple: Update and add '%%' directives.
11982
11983 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
11984
11985 * src/reader.c (reader): Remove calls to 'output_headers' and
11986 'output_trailers'. Remove some C output.
11987 (readgram): Disable a piece of code that was writing a default
11988 definition for 'YYSTYPE'.
11989 (reader_output_yylsp): Remove.
11990 (packsymbols): Output token defintions to a macro.
11991 (copy_definition): Disable C output.
11992
11993 * src/reader.c (parse_macro_decl): New function used to parse macro
11994 declarations.
11995 (copy_string2): Put the body of copy_string into this new function.
11996 Add a parameter to let the caller choose whether he wants to copy the
11997 string delimiters or not.
11998 (copy_string): Be a simple call to copy_string2 with the last argument
11999 bound to true.
12000 (read_declarations): Add case for macro definition.
12001 (copy_identifier): New.
12002 (parse_macro_decl): Read macro identifiers using copy_identifier
12003 rather than lex.
12004
12005 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
12006
12007 * src/output.c (prepare): Add prefixed names.
12008 (output_parser): Output semantic actions.
12009 (output_parser): Fix bug on '%%line' directives.
12010
12011 * src/output.c (output_headers): Remove. The C code printed by this
12012 function should now be in the skeletons.
12013 (output_trailers): Remove.
12014 (output): Disable call to 'reader_output_yylsp'.
12015 (output_rule_data): Do not output tables to the table obstack.
12016
12017 * src/output.c: Remove some C dedicated output.
12018 Improve the use of macro and output obstacks.
12019 (output_defines): Remove.
12020
12021 * src/output.c (output_token_translations): Associate 'translate'
12022 table with a macro. No output to the table obstack.
12023 (output_gram): Same for 'rhs' and 'prhs'.
12024 (output_stos): Same for 'stos'.
12025 (output_rule_data): Same for 'r1' and 'r2'.
12026 (token_actions): Same for 'defact'.
12027 (goto_actions): Same for 'defgoto'.
12028 (output_base): Same for 'pact' and 'pgoto'.
12029 (output_table): Same for 'table'.
12030 (output_check): Same for 'check'.
12031
12032 * src/output.c (output_table_data): New function.
12033 (output_short_table): Remove.
12034 (output_short_or_char_table): Remove.
12035
12036 * src/output.c (output_parser): Replace most of the skeleton copy code
12037 with something new. Skeletons are now processed character by character
12038 rather than line by line, and Bison looks for '%%' macros. This is the
12039 first step in making Bison's output process (a lot) more flexible.
12040 (output_parser): Use the macro table.
12041
12042 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
12043
12044 * src/main.c (main): Initialize the macro table.
12045
12046 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
12047
12048 * src/lex.c (percent_table): Add tok_define.
12049 * src/lex.h: Add tok_define.
12050
12051 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
12052
12053 * src/macrotab.c: New file.
12054 * src/macrotab.h: New file.
12055 * src/Makefile.am: Update.
12056
12057 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
12058
12059 * lib/hash.c: New file.
12060 * lib/hash.h: New file.
12061 * lib/Makefile.am: Update.
12062
12063 2001-08-15 Akim Demaille <akim@epita.fr>
12064
12065 Version 1.28c.
12066
12067 2001-08-15 Marc Autret <autret_m@epita.fr>
12068
12069 * src/reader.c (readgram): Indent output macro YYSTYPE.
12070 (packsymbols): Likewise.
12071 (output_token_defines): Likewise.
12072 * src/files.c: Standardize.
12073 (compute_header_macro): New.
12074 (defines_obstack_save): New. Use compute_header_macro.
12075 (output_files): Update. Use defines_obstack_save.
12076
12077 2001-08-15 Akim Demaille <akim@epita.fr>
12078
12079 * doc/bison.texinfo (Table of Symbols): Document
12080 YYSTACK_USE_ALLOCA.
12081
12082 2001-08-15 Akim Demaille <akim@epita.fr>
12083
12084 * missing: Update from CVS Automake.
12085 * config/config.guess, config/config.sub, config/texinfo.tex:
12086 Update from gnu.org.
12087
12088 2001-08-15 Akim Demaille <akim@epita.fr>
12089
12090 * Makefile.maint: Sync with CVS Autoconf.
12091
12092 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
12093
12094 * doc/bison.texinfo: Include GNU Free Documentation License from
12095 `fdl.texi'.
12096 * doc/fdl.texi: Add to package.
12097
12098 2001-08-14 Marc Autret <autret_m@epita.fr>
12099
12100 Turn on %{source,header}_extension features.
12101
12102 * src/lex.c (percent_table): Un-CPP out header_extension and
12103 source_extension.
12104 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
12105 (compute_exts_from_src): Remove conditions. It restores priorities
12106 between options.
12107
12108 2001-08-14 Marc Autret <autret_m@epita.fr>
12109
12110 * src/files.c (compute_base_names): Add extensions computing when
12111 `--file-prefix' used.
12112 Standardize function calls.
12113
12114 2001-08-13 Marc Autret <autret_m@epita.fr>
12115
12116 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
12117 defining it (defined but null disables alloca).
12118
12119 2001-08-13 Marc Autret <autret_m@epita.fr>
12120
12121 * src/bison.simple (_yy_memcpy): CPP reformat.
12122
12123 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
12124
12125 * tests/atconfig.in (CPPFLAGS): Fix.
12126
12127 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
12128
12129 * doc/bison.texinfo: Include GNU General Public License from
12130 `gpl.texi'.
12131 * doc/gpl.texi: Add to package.
12132
12133 2001-08-10 Marc Autret <autret_m@epita.fr>
12134
12135 * src/print_graph.h: Fix.
12136 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
12137
12138 2001-08-10 Akim Demaille <akim@epita.fr>
12139
12140 * src/system.h: Provide default declarations for stpcpy, strndup,
12141 and strnlen.
12142
12143 2001-08-10 Robert Anisko <anisko_r@epita.fr>
12144
12145 * doc/bison.texinfo (Locations): Update @$ stuff.
12146
12147 2001-08-09 Robert Anisko <anisko_r@epita.fr>
12148
12149 * src/bison.simple (YYLLOC_DEFAULT): Update.
12150 (yyparse): Adjust.
12151
12152 2001-08-08 Marc Autret <autret_m@epita.fr>
12153
12154 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
12155 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
12156 Reported by Fabrice Bauzac.
12157
12158 2001-08-08 Marc Autret <autret_m@epita.fr>
12159
12160 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
12161 * src/vcg.c (output_node): Fix.
12162 * src/vcg.h: Cleanup.
12163 * src/print_graph.c: Add comments.
12164 (node_output_size): New global variable. Simplify the formatting of
12165 the VCG graph output.
12166 (print_actions): Unused code is now used. It notifies the final state
12167 and no action states in the VCG graph. It also give the reduce actions.
12168 The `shift and goto' edges are red and the `go to state' edges are
12169 blue.
12170 Get the current node name and node_obstack by argument.
12171 (node_obstack): New variable.
12172 (print_state): Manage node_obstack.
12173 (print_core): Use node_obstack given by argument.
12174 A node is not only computed here but in print_actions also.
12175 (print_graph): CPP out useless code instead of commenting it.
12176
12177 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
12178
12179 * tests/atconfig.in (CPPFLAGS): Fix.
12180
12181 2001-08-07 Akim Demaille <akim@epita.fr>
12182
12183 * src/print_graph.c (quote): New.
12184 (print_core): Use it.
12185
12186 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
12187
12188 * src/vcg.c (complain.h): Include it.
12189 Unepitaize `return' invocations.
12190 [NDEBUG] (main): Remove.
12191 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
12192 * src/files.c (open_files): Initialize graph_obstack.
12193 * src/print_graph.c (print_actions): CPP out useless code.
12194 (print_core): Don't output the last `\n' in labels.
12195 Use `quote'.
12196 * src/files.c (output_files): Output the VCG file.
12197 * src/main.c (main): Invoke print_graph ();
12198
12199 2001-08-06 Marc Autret <autret_m@epita.fr>
12200
12201 Automaton VCG graph output.
12202 Using option ``-g'' or long option ``--graph'', you can generate
12203 a gram_filename.vcg file containing a VCG description of the LALR (1)
12204 automaton of your grammar.
12205
12206 * src/main.c: Call to print_graph() function.
12207 * src/getargs.h: Update.
12208 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
12209 (graph_flag): New flag.
12210 (longopts): Update.
12211 (getargs): Add case `g'.
12212 * src/files.c (graph_obstack): New obstack struct.
12213 (open_files): Initialize new obstack.
12214 (output_files): Saves graph_obstack if required.
12215 * src/files.h (graph_obstack): New extern declaration.
12216 * src/Makefile.am: Add new source files.
12217
12218 2001-08-06 Marc Autret <autret_m@epita.fr>
12219
12220 * src/print_graph.c, src/print_graph.h (graph): New.
12221 * src/vcg.h: New file.
12222 * src/vcg.c: New file, VCG graph handling.
12223
12224 2001-08-06 Marc Autret <autret_m@epita.fr>
12225
12226 Add of %source_extension and %header_extension which specify
12227 the source or/and the header output file extension.
12228
12229 * src/files.c (compute_base_names): Remove initialisation of
12230 src_extension and header_extension.
12231 (compute_exts_from_gf): Update.
12232 (compute_exts_from_src): Update.
12233 (output_files): Update.
12234 * src/reader.c (parse_header_extension_decl): New.
12235 (parse_source_extension_decl): New.
12236 (read_declarations): New case statements for the new tokens.
12237 * src/lex.c (percent_table): Add entries for %source_extension
12238 and %header_extension.
12239 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
12240
12241 2001-08-06 Marc Autret <autret_m@epita.fr>
12242
12243 * configure.in: Bump to 1.28c.
12244 * doc/bison.texinfo: Texinfo thingies.
12245
12246 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
12247
12248 * tests/atconfig.in (CPPFLAGS): Add.
12249 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
12250
12251 2001-08-03 Akim Demaille <akim@epita.fr>
12252
12253 Version 1.28b.
12254
12255 2001-08-03 Akim Demaille <akim@epita.fr>
12256
12257 * tests/Makefile.am (check-local): Ship testsuite.
12258 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
12259 Include `string.h'.
12260
12261 2001-08-03 Akim Demaille <akim@epita.fr>
12262
12263 * configure.in: Try using -Wformat when compiling.
12264
12265 2001-08-03 Akim Demaille <akim@epita.fr>
12266
12267 * configure.in: Bump to 1.28b.
12268
12269 2001-08-03 Akim Demaille <akim@epita.fr>
12270
12271 * src/complain.c: Adjust strerror_r portability issues.
12272
12273 2001-08-03 Akim Demaille <akim@epita.fr>
12274
12275 Version 1.28a.
12276
12277 2001-08-03 Akim Demaille <akim@epita.fr>
12278
12279 * src/getargs.c, src/getarg.h (skeleton)): Constify.
12280 * src/lex.c (literalchar): Avoid name clashes on `buf'.
12281 * src/getargs.c: Include complain.h.
12282 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
12283 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
12284
12285 2001-08-03 Akim Demaille <akim@epita.fr>
12286
12287 * src/reader.c (readgram): Display hidden chars in error messages.
12288
12289 2001-08-03 Akim Demaille <akim@epita.fr>
12290
12291 Update to gettext 0.10.39.
12292
12293 2001-08-03 Akim Demaille <akim@epita.fr>
12294
12295 * lib/strspn.c: New.
12296
12297 2001-08-01 Marc Autret <autret_m@epita.fr>
12298
12299 * doc/bison.texinfo: Update.
12300 * doc/bison.1 (mandoc): Update.
12301 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
12302 * src/files.c: Support output files extensions computing.
12303 (src_extension): New static variable.
12304 (header_extension): New static variable.
12305 (tr): New function.
12306 (get_extension_index): New function, gets the index of an extension
12307 filename in a string.
12308 (compute_exts_from_gf): New function, computes extensions from the
12309 grammar file extension.
12310 (compute_exts_from_src): New functions, computes extensions from the
12311 C source file extension, file given by ``-o'' option.
12312 (compute_base_names): Update.
12313 (output_files): Update.
12314
12315 2001-08-01 Robert Anisko <anisko_r@epita.fr>
12316
12317 * doc/bison.texi: Document @$.
12318 (Locations): New section.
12319
12320 2001-07-18 Akim Demaille <akim@epita.fr>
12321
12322 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
12323 * config/prev-version.txt, config/move-if-change: New.
12324 * Makefile.am: Adjust.
12325
12326 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
12327
12328 * src/bison.simple (yyparse): Suppress warning `comparaison
12329 between signed and unsigned'.
12330
12331 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
12332
12333 * src/getargs.h (raw_flag): Remove.
12334 * src/getargs.c: Die on `-r'/`--raw'.
12335 * src/lex.c (parse_percent_token): Die on `%raw'.
12336 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
12337 * tests/calc.at: Suppress test with option `--raw'.
12338
12339 2001-07-14 Akim Demaille <akim@epita.fr>
12340
12341 * config/: New.
12342 * configure.in: Require Autoconf 2.50.
12343 Update to gettext 0.10.38.
12344
12345 2001-03-16 Akim Demaille <akim@epita.fr>
12346
12347 * doc/bison.texinfo: ANSIfy the examples.
12348
12349 2001-03-16 Akim Demaille <akim@epita.fr>
12350
12351 * getargs.c (skeleton): New variable.
12352 (longopts): --skeleton is a new option.
12353 (shortopts, getargs): -S is a new option.
12354 * getargs.h: Declare skeleton.
12355 * output.c (output_parser): Use it.
12356
12357 2001-03-16 Akim Demaille <akim@epita.fr>
12358
12359 * m4/strerror_r.m4: New.
12360 * m4/error.m4: Run AC_FUNC_STRERROR_R.
12361 * lib/error.h, lib/error.c: Update.
12362
12363 2001-03-16 Akim Demaille <akim@epita.fr>
12364
12365 * src/getargs.c (longopts): Clean up.
12366
12367 2001-02-21 Akim Demaille <akim@epita.fr>
12368
12369 * src/reader.c (gensym): `gensym_count' is your own.
12370 Use a static buf to create the symbol name, as token_buffer is no
12371 longer a buffer.
12372
12373 2001-02-08 Akim Demaille <akim@epita.fr>
12374
12375 * src/conflicts.c (conflict_report): Be sure not to append to res
12376 between two calls, which could happen if both first sprintf were
12377 skipped, but not the first cp += strlen.
12378
12379 2001-02-08 Akim Demaille <akim@epita.fr>
12380
12381 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
12382 New, from fileutils 4.0.37.
12383 * configure.in: Require Autoconf 2.49c. I took some time before
12384 making this decision. This is the only way out for portability
12385 issues in Bison, it would mean way too much duplicate effort to
12386 import in Bison features implemented in 2.49c since 2.13.
12387 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
12388
12389 2001-02-02 Akim Demaille <akim@epita.fr>
12390
12391 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
12392 * lib/xalloc.h, lib/xmalloc.c: Update.
12393
12394 2001-01-19 Akim Demaille <akim@epita.fr>
12395
12396 Get rid of the ad hoc handling of token_buffer in the scanner: use
12397 the obstacks.
12398
12399 * src/lex.c (token_obstack): New.
12400 (init_lex): Initialize it. No longer call...
12401 (grow_token_buffer): this. Remove it.
12402 Adjust all the places which used it to use the obstack.
12403
12404 2001-01-19 Akim Demaille <akim@epita.fr>
12405
12406 * src/lex.h: Rename all the tokens:
12407 s/\bENDFILE\b/tok_eof/g;
12408 s/\bIDENTIFIER\b/tok_identifier/g;
12409 etc.
12410 Let them be enums, not #define, to ease debugging.
12411 Adjust all the code.
12412
12413 2001-01-18 Akim Demaille <akim@epita.fr>
12414
12415 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
12416 * src/lex.c (maxtoken, grow_token_buffer): Static.
12417
12418 2001-01-18 Akim Demaille <akim@epita.fr>
12419
12420 Since we now use obstacks, more % directives can be enabled.
12421
12422 * src/lex.c (percent_table): Also accept `%yacc',
12423 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
12424 `%debug'.
12425 Handle the actions for `%semantic_parser' and `%pure_parser' here,
12426 instead of returning a token.
12427 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
12428 * src/reader.c (read_declarations): Adjust.
12429 * src/files.c (open_files): Don't call `compute_base_names', don't
12430 compute `attrsfile' since they depend upon data which might be
12431 *in* the input file now.
12432 (output_files): Do it here.
12433 * src/output.c (output_headers): Document the fact that this patch
12434 introduces a guaranteed SEGV for semantic parsers.
12435 * doc/bison.texinfo: Document them.
12436 * tests/suite.at: Exercise these %options.
12437
12438 2000-12-20 Akim Demaille <akim@epita.fr>
12439
12440 Also handle the output file (--verbose) with obstacks.
12441
12442 * files.c (foutput): Remove.
12443 (output_obstack): New.
12444 Adjust all dependencies.
12445 * src/conflicts.c: Return a string.
12446 * src/system.h (obstack_grow_string): Rename as...
12447 (obstack_sgrow): this. Be ready to work with non literals.
12448 (obstack_fgrow4): New.
12449
12450 2000-12-20 Akim Demaille <akim@epita.fr>
12451
12452 * src/files.c (open_files): Fix the computation of short_base_name
12453 in the case of `-o foo.tab.c'.
12454
12455 2000-12-20 Akim Demaille <akim@epita.fr>
12456
12457 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
12458 (copy_dollar): Now that everything uses obstacks, get rid of the
12459 FILE * parameters.
12460
12461 2000-12-20 Akim Demaille <akim@epita.fr>
12462
12463 * src/files.c (open_files): Actually the `.output' file is based
12464 on the short_base_name, not base_name.
12465 * tests/suite.at (Checking output file names): Adjust.
12466
12467 2000-12-20 Akim Demaille <akim@epita.fr>
12468
12469 * src/bison.s1: Remove, we now use directly...
12470 * src/bison.simple: this.
12471 * src/Makefile.am: Use pkgdata instead of data.
12472
12473 2000-12-20 Akim Demaille <akim@epita.fr>
12474
12475 * src/files.c (guard_obstack): New.
12476 (open_files): Initialize it.
12477 (output_files): Dump it...
12478 * src/files.h: Export it.
12479 * src/reader.c (copy_guard): Use it.
12480
12481 2000-12-19 Akim Demaille <akim@epita.fr>
12482
12483 * src/files.c (outfile, defsfile, actfile): Removed as global
12484 vars.
12485 (open_files): Don't compute them.
12486 (output_files): Adjust.
12487 (base_name, short_base_name): Be global.
12488 Adjust dependencies.
12489
12490 2000-12-19 Akim Demaille <akim@epita.fr>
12491
12492 * src/files.c (strsuffix): New.
12493 (stringappend): Be just like strcat but allocate.
12494 (base_names): Eve out from open_files.
12495 Try to simplify the rather hairy computation of base_name and
12496 short_base_name.
12497 (open_files): Use it.
12498 * tests/suite.at (Checking output file names): New test.
12499
12500 2000-12-19 Akim Demaille <akim@epita.fr>
12501
12502 * src/system.h (obstack_grow_literal_string): Rename as...
12503 (obstack_grow_string): this.
12504 * src/output.c (output_parser): Recognize `%% actions' instead of
12505 `$'.
12506 * src/bison.s1: s/$/%% actions/.
12507 * src/bison.hairy: Likewise.
12508
12509 2000-12-19 Akim Demaille <akim@epita.fr>
12510
12511 * src/output.c (output_parser): Compute the `#line' lines when
12512 there are.
12513 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
12514 Suggested by Hans Aberg.
12515
12516 2000-12-19 Akim Demaille <akim@epita.fr>
12517
12518 Let the handling of the skeleton files be local to the procedures
12519 that use it.
12520
12521 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
12522 longer static.
12523 (fparser, open_extra_files): Remove.
12524 (open_files, output_files): Don't take care of fparser.
12525 * src/files.h: Adjust.
12526 * src/output.c (output_parser): Open and close the file to the
12527 skeleton.
12528 * src/reader.c (read_declarations): When %semantic_parser, open
12529 fguard.
12530
12531 2000-12-19 Akim Demaille <akim@epita.fr>
12532
12533 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
12534 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
12535
12536 2000-12-19 Akim Demaille <akim@epita.fr>
12537
12538 * src/files.c (open_files): Yipee! We no longer need all the code
12539 looking for `/tmp' since we have no tmp file.
12540
12541 2000-12-19 Akim Demaille <akim@epita.fr>
12542
12543 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
12544 New macros.
12545 * src/files.c (open_files): Less dependency on MSDOS etc.
12546
12547 2000-12-14 Akim Demaille <akim@epita.fr>
12548
12549 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
12550 Provide a default definition.
12551 Use it when executing the default @ action.
12552 * src/reader.c (reader_output_yylsp): No longer include
12553 `timestamp' and `text' in the default YYLTYPE.
12554
12555 2000-12-12 Akim Demaille <akim@epita.fr>
12556
12557 * src/reader.c (copy_definition, parse_union_decl, copy_action)
12558 (copy_guard): Quote the file names.
12559 Reported by Laurent Mascherpa.
12560
12561 2000-12-12 Akim Demaille <akim@epita.fr>
12562
12563 * src/output.c (output_headers, output_program, output): Be sure
12564 to escape special characters when outputting filenames.
12565 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
12566 (output_headers): Don't depend on them, Use ACTSTR.
12567
12568 2000-11-17 Akim Demaille <akim@epita.fr>
12569
12570 * lib/obstack.h: Formatting changes.
12571 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
12572 prevents type checking.
12573 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
12574 cast the value to (void *): assigning a `foo *' to a `void *'
12575 variable is valid.
12576 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
12577 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
12578 append characters.
12579
12580 2000-11-17 Akim Demaille <akim@epita.fr>
12581
12582 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
12583 as...
12584 (suite.m4, regression.m4, calc.m4): these.
12585 * tests/atgeneral.m4: Update from CVS Autoconf.
12586
12587 2000-11-17 Akim Demaille <akim@epita.fr>
12588
12589 * tests/regression.m4 (%union and --defines): New test,
12590 demonstrating a current bug in the obstack implementation.
12591
12592 2000-11-17 Akim Demaille <akim@epita.fr>
12593
12594 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
12595 macros.
12596 Use them to declare the variables which are global or local to
12597 `yyparse'.
12598
12599 2000-11-17 Akim Demaille <akim@epita.fr>
12600
12601 * acconfig.h: Remove, no longer used.
12602
12603 2000-11-07 Akim Demaille <akim@epita.fr>
12604
12605 * src: s/Copyright (C)/Copyright/g.
12606
12607 2000-11-07 Akim Demaille <akim@epita.fr>
12608
12609 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
12610 defining.
12611 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
12612
12613 2000-11-07 Akim Demaille <akim@epita.fr>
12614
12615 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
12616 Merge in a single CPP if/else.
12617
12618 2000-11-07 Akim Demaille <akim@epita.fr>
12619
12620 * src/output.c (output): Remove useless variables.
12621 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
12622 argument `data' for consistency with the prototypes.
12623 Qualify it `const'.
12624 (obstack_copy, obstack_copy0): Rename the second argument as
12625 `address' for consistency. Qualify it `const'.
12626 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
12627 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
12628 `const' their input argument (`data' or `address').
12629 Adjust the corresponding macros to include `const' in casts.
12630
12631 2000-11-03 Akim Demaille <akim@epita.fr>
12632
12633 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
12634 s/PFILE1/BISON_HAIRY/.
12635 Adjust dependencies.
12636
12637 2000-11-03 Akim Demaille <akim@epita.fr>
12638
12639 For some reason, this was not applied.
12640
12641 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
12642 `unlink': it's no longer used.
12643
12644 2000-11-03 Akim Demaille <akim@epita.fr>
12645
12646 * src/files.c (skeleton_find): New function, eved out of...
12647 (open_files, open_extra_files): here.
12648
12649 2000-11-03 Akim Demaille <akim@epita.fr>
12650
12651 Don't use `atexit'.
12652
12653 * src/files.c (obstack_save): New function.
12654 (done): Rename as...
12655 (output_files): this.
12656 Use `obstack_save'.
12657 * src/main.c (main): Don't use `atexit' to register `done', since
12658 it no longer has to remove tmp files, just call `output_files'
12659 when there are no errors.
12660
12661 2000-11-02 Akim Demaille <akim@epita.fr>
12662
12663 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
12664 `unlink': it's no longer used.
12665 * src/files.h: Formatting changes.
12666
12667 2000-11-02 Akim Demaille <akim@epita.fr>
12668
12669 Remove the last uses of mktemp and unlink/delete.
12670
12671 * src/files.c (fdefines, ftable): Removed.
12672 (defines_ostack, table_obstack): New.
12673 Adjust dependencies of the former into uses of the latter.
12674 * src/output.c (output_short_or_char_table, output_short_table):
12675 Convert to using obstacks.
12676 * src/reader.c (copy_comment2): Accept one FILE * and two
12677 obstacks.
12678 (output_token_defines, reader_output_yylsp): Use obstacks.
12679 * src/system.h (obstack_fgrow3): New.
12680 * po/POTFILES.in: Adjust.
12681
12682 2000-11-01 Akim Demaille <akim@epita.fr>
12683
12684 Change each use of `fattrs' into a use of `attrs_obstack'.
12685
12686 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
12687 * src/files.c (fattrs): Remove.
12688 (attrs_obstack): New.
12689 Adjust all dependencies.
12690 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
12691
12692 2000-11-01 Akim Demaille <akim@epita.fr>
12693
12694 Introduce obstacks.
12695 Change each use of `faction' into a use of `action_obstack'.
12696
12697 * lib/obstack.h, lib/obstack.c: New files.
12698 * src/files.c (faction): Remove.
12699 (action_obstack): New.
12700 Adjust all dependencies.
12701
12702 2000-10-20 Akim Demaille <akim@epita.fr>
12703
12704 * lib/quote.h (PARAMS): New macro. Use it.
12705
12706 2000-10-16 Akim Demaille <akim@epita.fr>
12707
12708 * src/output.c (output_short_or_char_table): New function.
12709 (output_short_table, output_token_translations): Use it.
12710 (goto_actions): Use output_short_table.
12711
12712 2000-10-16 Akim Demaille <akim@epita.fr>
12713
12714 * src/symtab.c (bucket_new): New function.
12715 (getsym): Use it.
12716
12717 * src/output.c (output_short_table): New argument to display the
12718 comment associated with the table.
12719 Adjust dependencies.
12720 (output_gram): Use it.
12721 (output_rule_data): Nicer output layout for YYTNAME.
12722
12723 2000-10-16 Akim Demaille <akim@epita.fr>
12724
12725 * src/lex.c (read_typename): New function.
12726 (lex): Use it.
12727 * src/reader.c (copy_dollar): Likewise.
12728
12729 2000-10-16 Akim Demaille <akim@epita.fr>
12730
12731 * src/reader.c (copy_comment2): Expect the input stream to be on
12732 the `/' which is suspected to open a comment, instead of being
12733 called after `//' or `/*' was read.
12734 (copy_comment, copy_definition, parse_union_decl, copy_action)
12735 (copy_guard): Adjust.
12736
12737 2000-10-16 Akim Demaille <akim@epita.fr>
12738
12739 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
12740 `read_signed_integer'.
12741
12742 2000-10-16 Akim Demaille <akim@epita.fr>
12743
12744 * src/reader.c (copy_dollar): New function.
12745 (copy_guard, copy_action): Use it.
12746
12747 2000-10-16 Akim Demaille <akim@epita.fr>
12748
12749 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
12750 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
12751 New files, from Fileutils 4.0.27.
12752 * src/main.c (printable_version): Remove.
12753 * src/lex.c, src/reader.c: Use `quote'.
12754
12755 2000-10-04 Akim Demaille <akim@epita.fr>
12756
12757 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
12758
12759 2000-10-04 Akim Demaille <akim@epita.fr>
12760
12761 * doc/bison.texinfo: Various typos spotted by Neil Booth.
12762
12763 2000-10-04 Akim Demaille <akim@epita.fr>
12764
12765 When a literal string is used to define two different tokens,
12766 `bison -v' segfaults.
12767 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
12768
12769 * tests/regression.m4: New file.
12770 Include the core of the sample provided by Piotr Gackiewicz.
12771 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
12772 properly.
12773
12774 2000-10-04 Akim Demaille <akim@epita.fr>
12775
12776 * src/reader.c (parse_expect_decl): Keep `count' within the size
12777 of `buffer'.
12778 From Neil Booth.
12779
12780 2000-10-02 Paul Eggert <eggert@twinsun.com>
12781
12782 * bison.s1 (yyparse): Assign the default value
12783 unconditionally, to avoid a GCC warning and make the parser a
12784 tad smaller.
12785
12786 2000-10-02 Akim Demaille <akim@epita.fr>
12787
12788 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
12789 options.
12790
12791 2000-10-02 Akim Demaille <akim@epita.fr>
12792
12793 * src/derives.c, src/print.c, src/reduce.c: To ease the
12794 translation, move some `\n' out of the translated strings.
12795
12796 2000-10-02 Akim Demaille <akim@epita.fr>
12797
12798 The location tracking mechanism is precious for parse error
12799 messages. Nevertheless, it is enabled only when `@n' is used in
12800 the grammar, which is a different issue (you can use it in error
12801 message, but not in the grammar per se). Therefore, there should
12802 be another means to enable it.
12803
12804 * src/getargs.c (getargs): Support `--locations'.
12805 (usage): Report it.
12806 * src/getargs.h (locationsflag): Export it.
12807 * src/lex.c (percent_table): Support `%locations'.
12808 * src/reader.c (yylsp_needed): Remove this variable, now replaced
12809 with `locationsflag'.
12810 * doc/bison.texinfo: Document `--locations' and `%locations'.
12811 Sort the options.
12812 * tests/calc.m4: Test it.
12813
12814 For regularity of the names, replace each
12815 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
12816 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
12817 In addition replace each `flag' with `_flag'.
12818
12819 2000-10-02 Akim Demaille <akim@epita.fr>
12820
12821 Also test parse error messages, including with YYERROR_VERBOSE.
12822
12823 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
12824 associative).
12825 Use it to check the computations.
12826 Use it to check `nonassoc' is honored.
12827 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
12828 `--yyerror-verbose'.
12829 (_AT_CHECK_CALC): Adjust to this option.
12830 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
12831
12832 2000-10-02 Akim Demaille <akim@epita.fr>
12833
12834 Test also `--verbose', `--defines' and `--name-prefix'. Testing
12835 the latter demonstrates a flaw in the handling of non debugging
12836 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
12837 was used in order to simplify:
12838
12839 #if YYDEBUG
12840 if (yydebug)
12841 {
12842 ...
12843 }
12844 #endif
12845
12846 into
12847
12848 if (yydebug)
12849 {
12850 ...
12851 }
12852
12853 unfortunately this leads to a CPP conflict when
12854 `--name-prefix=foo' is used since it produces `#define yydebug
12855 foodebug'.
12856
12857 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
12858 (YYDPRINTF): New macro.
12859 Spread its use.
12860 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
12861 the bison options.
12862 Also test `--verbose', `--defines' and `--name-prefix'.
12863
12864 2000-10-02 Akim Demaille <akim@epita.fr>
12865
12866 Improve the readability of the produced parsers.
12867
12868 * src/bison.s1: Formatting changes.
12869 Improve the comment related to the `$' mark.
12870 (yydefault): Don't fall through to `yyresume': `goto' there.
12871 * src/output.c (output_parser): When the `$' is met, skip the end
12872 of its line.
12873 New variable, `number_of_dollar_signs', to check there's exactly
12874 one `$' in the parser skeleton.
12875
12876 2000-10-02 Akim Demaille <akim@epita.fr>
12877
12878 * lib/xstrdup.c: New file, from the fileutils.
12879 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
12880 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
12881 instead of strlen + xmalloc + strcpy.
12882 * src/symtab.c (copys): Remove, use xstrdup instead.
12883
12884 2000-10-02 Akim Demaille <akim@epita.fr>
12885
12886 * src/gram.h (associativity): New enum type which replaces the
12887 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
12888 `right_assoc', `left_assoc' and `non_assoc'.
12889 Adjust all dependencies.
12890 * src/reader.c: Formatting changes.
12891 (LTYPESTR): Don't define it, use it as a literal in
12892 `reader_output_yylsp'.
12893 * src/symtab.h (symbol_class): New enum type which replaces the
12894 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
12895 `sunknown', `stoken and `snterm'.
12896
12897 2000-10-02 Akim Demaille <akim@epita.fr>
12898
12899 * src/getargs.c (fixed_outfiles): Rename as...
12900 (yaccflag): for consistency and accuracy.
12901 Adjust dependencies.
12902
12903 2000-10-02 Akim Demaille <akim@epita.fr>
12904
12905 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
12906 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
12907 difficult and introduced a lot of core dump. It turns out that
12908 Bison used an implementation of `xmalloc' based on `calloc', and
12909 at various places it does depend upon the initialization to 0. I
12910 have not tried to isolate the pertinent places, and all the former
12911 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
12912 someone should address this issue.
12913
12914 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
12915 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
12916 files.
12917 Adjust dependencies.
12918 * src/warshall.h: New file.
12919 Propagate.
12920
12921 2000-10-02 Akim Demaille <akim@epita.fr>
12922
12923 Various anti-`extern in *.c' changes.
12924
12925 * src/system.h: Include `assert.h'.
12926
12927 2000-10-02 Akim Demaille <akim@epita.fr>
12928
12929 * src/state.h (nstates, final_state, first_state, first_shift)
12930 (first_reduction): Move their exportation from here...
12931 * src/LR0.h: to here.
12932 Adjust dependencies.
12933 * src/getargs.c (statisticsflag): New variable.
12934 Add support for `--statistics'.
12935 Adjust dependencies.
12936
12937 Remove a lot of now useless `extern' statements in most files.
12938
12939 2000-10-02 Akim Demaille <akim@epita.fr>
12940
12941 * src/LR0.h: New file.
12942 Propagate its use.
12943
12944 2000-10-02 Akim Demaille <akim@epita.fr>
12945
12946 * src/print.h: New file.
12947 Propagate its use.
12948 * src/print.c: Formatting and ordering changes.
12949 (verbose, terse): Replace with...
12950 (print_results): this new function.
12951 Adjust dependencies.
12952
12953 2000-10-02 Akim Demaille <akim@epita.fr>
12954
12955 * src/conflicts.c (conflict_report): New function.
12956 (conflict_log, verbose_conflict_log): Replace with...
12957 (print_conflicts): this function.
12958 Adjust dependencies.
12959 * src/conflicts.h: New file.
12960 Propagate its inclusion.
12961
12962 2000-10-02 Akim Demaille <akim@epita.fr>
12963
12964 * src/nullable.h: New file.
12965 Propagate its inclusion.
12966 * src/nullable.c: Formatting changes.
12967
12968 2000-10-02 Akim Demaille <akim@epita.fr>
12969
12970 * src/reduce.h: New file.
12971 Propagate its inclusion.
12972 * src/reduce.c: Topological sort and other formatting changes.
12973 (bool, TRUE, FALSE): Move their definition to...
12974 * src/system.h: here.
12975
12976 2000-10-02 Akim Demaille <akim@epita.fr>
12977
12978 * src/files.c: Formatting changes.
12979 (tryopen, tryclose, openfiles): Rename as...
12980 (xfopen, xfclose, open_files): this.
12981 (stringappend): static.
12982 * src/files.h: Complete the list of exported symbols.
12983 Propagate its use.
12984
12985 2000-10-02 Akim Demaille <akim@epita.fr>
12986
12987 * src/reader.h: New file.
12988 Propagate its use instead of tedious list of `extern' and
12989 prototypes.
12990 * src/reader.c: Formatting changes, topological sort,
12991 s/register//.
12992
12993 2000-10-02 Akim Demaille <akim@epita.fr>
12994
12995 * src/lex.h: Prototype `lex.c' exported functions.
12996 * src/reader.c: Adjust.
12997 * src/lex.c: Formatting changes.
12998 (safegetc): Rename as...
12999 (xgetc): this.
13000
13001 2000-10-02 Akim Demaille <akim@epita.fr>
13002
13003 * src/lalr.h: New file.
13004 Propagate its inclusion instead of prototypes and `extern'.
13005 * src/lalr.c: Formatting changes, topological sorting etc.
13006
13007 2000-10-02 Akim Demaille <akim@epita.fr>
13008
13009 * src/output.c (token_actions): Introduce a temporary array,
13010 YYDEFACT, that makes it possible for this function to use
13011 output_short_table.
13012
13013 2000-10-02 Akim Demaille <akim@epita.fr>
13014
13015 `user_toknums' is output as a `short[]' in `output.c', while it is
13016 defined as a `int[]' in `reader.c'. For consistency with the
13017 other output tables, `user_toknums' is now defined as a table of
13018 shorts.
13019
13020 * src/reader.c (user_toknums): Be a short table instead of an int
13021 table.
13022 Adjust dependencies.
13023
13024 Factor the short table outputs.
13025
13026 * src/output.c (output_short_table): New function.
13027 * src/output.c (output_gram, output_stos, output_rule_data)
13028 (output_base, output_table, output_check): Use it.
13029
13030 2000-10-02 Akim Demaille <akim@epita.fr>
13031
13032 * src/output.c (output): Topological sort of the functions, in
13033 order to get rid of the `static' prototypes.
13034 No longer use `register'.
13035 * src/output.h: New file.
13036 Propagate its inclusion in files explicitly prototyping functions
13037 from output.c.
13038
13039 2000-09-21 Akim Demaille <akim@epita.fr>
13040
13041 * src/atgeneral.m4: Update from Autoconf.
13042
13043 2000-09-21 Akim Demaille <akim@epita.fr>
13044
13045 * src/closure.h: New file.
13046 * src/closure.c: Formatting changes, topological sort over the
13047 functions, use of closure.h.
13048 (initialize_closure, finalize_closure): Rename as...
13049 (new_closure, free_closure): these. Adjust dependencies.
13050 * src/LR0.c: Formatting changes, topological sort, use of
13051 cloture.h.
13052 (initialize_states): Rename as...
13053 (new_states): this.
13054 * src/Makefile.am (noinst_HEADERS): Adjust.
13055
13056 2000-09-20 Akim Demaille <akim@epita.fr>
13057
13058 * src/acconfig.h: Don't protect config.h against multiple
13059 inclusion.
13060 Don't define PARAMS.
13061 * src/system.h: Define PARAMS.
13062 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
13063 purpose of config.h. system.h must not try to fix wrong
13064 definitions in config.h.
13065
13066 2000-09-20 Akim Demaille <akim@epita.fr>
13067
13068 * src/derives.h: New file.
13069 * src/main.c, src/derives.h: Use it.
13070 Formatting changes.
13071 * src/Makefile.am (noinst_HEADERS): Adjust.
13072
13073 2000-09-20 Akim Demaille <akim@epita.fr>
13074
13075 * tests/atgeneral.m4: Update from Autoconf.
13076 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
13077 (AT_CHECK_CALC): New macros.
13078 Use these macros to test bison with options `', `--raw',
13079 `--debug', `--yacc', `--yacc --debug'.
13080
13081 2000-09-19 Akim Demaille <akim@epita.fr>
13082
13083 * src/output.c: Formatting changes.
13084 * src/machine.h: Remove, leaving its contents in...
13085 * src/system.h: here.
13086 Include stdio.h.
13087 Adjust all dependencies on stdio.h and machine.h.
13088 * src/getargs.h: New file.
13089 Let all `extern' declarations about getargs.c be replaced with
13090 inclusion of `getargs.h'.
13091 * src/Makefile.am (noinst_HEADERS): Adjust.
13092
13093 * tests/calc.m4 (yyin): Be initialized in main, not on the global
13094 scope.
13095 (yyerror): Returns void, not int.
13096 * doc/bison.texinfo: Formatting changes.
13097
13098 2000-09-19 Akim Demaille <akim@epita.fr>
13099
13100 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
13101 portable.
13102
13103 2000-09-18 Akim Demaille <akim@epita.fr>
13104
13105 * configure.in: Append WARNING_CFLAGS to CFLAGS.
13106 * src/Makefile.am (INCLUDES): Don't.
13107 Be ready to fetch headers in lib/.
13108
13109 2000-09-18 Akim Demaille <akim@epita.fr>
13110
13111 * doc/bison.texinfo: Update the copyright.
13112 ANSIfy and GNUify the examples.
13113 Remove the old menu.
13114
13115 2000-09-18 Akim Demaille <akim@epita.fr>
13116
13117 First set of tests: use the `calc' example from the documentation.
13118
13119 * src/bison.s1 (yyparse): Condition the code using `yytname' which
13120 is defined only when YYDEBUG is.
13121 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
13122 * src/files.c (tryopen, tryclose): Formatting changes.
13123 Move to the top and be static.
13124 * src/reader.c (read_signed_integer): Likewise.
13125 * tests/calc.m4: New file.
13126 * Makefile.am, suite.m4: Adjust.
13127 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
13128
13129 2000-09-18 Akim Demaille <akim@epita.fr>
13130
13131 Add support for an Autotest test suite for Bison.
13132
13133 * m4/m4.m4, m4/atconfig.m4: New files.
13134 * m4/Makefile.am (EXTRA_DIST): Adjust.
13135 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
13136 files.
13137 * src/getargs.c: Display a more standard --version message.
13138 * src/reader.c (reader): Formatting changes.
13139 No longer depend upon VERSION_STRING.
13140 * configure.in: No longer use `dnl'.
13141 Set up the test suite and the new directory `tests/.
13142 (VERSION_STRING): Remove.
13143
13144 2000-04-14 Akim Demaille <akim@epita.fr>
13145
13146 * src/reader.c (copy_comment2): New function, same as former
13147 `copy_comment', but outputs into two FILE *.
13148 (copy_comment): Use it.
13149 (parse_union_decl): Use it.
13150 (get_type, parse_start_decl): Use the same `invalid' message.
13151 (parse_start_decl, parse_union_decl): Use the same `multiple'
13152 message.
13153 (parse_union_decl, copy_guard, copy_action): Use the same
13154 `unmatched' message.
13155 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
13156
13157 2000-03-31 Akim Demaille <akim@epita.fr>
13158
13159 * src/files.c (tryopen, tryclose): Move to the top.
13160 Be static.
13161
13162 2000-03-31 Akim Demaille <akim@epita.fr>
13163
13164 * src/main.c (main): Don't call `done', exit does it.
13165
13166 2000-03-31 Akim Demaille <akim@epita.fr>
13167
13168 * allocate.c: s/return (foo)/return foo/.
13169 * lalr.c: Likewise.
13170 * LR0.c: Likewise.
13171 * output.c: Likewise.
13172 * reader.c: Likewise.
13173 * symtab.c: Likewise.
13174 * vmsgetargs.c: Likewise.
13175
13176 2000-03-31 Akim Demaille <akim@epita.fr>
13177
13178 Clean up the error reporting functions.
13179
13180 * src/report.c: New file.
13181 * src/report.h: Likewise.
13182 * src/Makefile.am: Adjust.
13183 * m4/error.m4: New file.
13184 * m4/Makefile.am: Adjust.
13185 * configure.in (jm_PREREQ_ERROR): Call it.
13186 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
13187 Remove.
13188 (fatal, fatals): Remove. All callers use complain.c::fatal.
13189 (warn, warni, warns, warnss, warnss): Remove. All callers use
13190 complain.c::complain.
13191 (toomany): Remove, use fatal instead.
13192 * src/files.c (done): No argument, use complain_message_count.
13193 * src/main.c (main): Register `done' to `atexit'.
13194
13195 * src/getargs.c (usage): More `fputs', less `fprintf'.
13196
13197 2000-03-28 Akim Demaille <akim@epita.fr>
13198
13199 * lib/: New directory.
13200 * Makefile.am (SUBDIRS): Adjust.
13201 * configure.in: Adjust.
13202 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
13203 useless.
13204 * src/alloca.c: Moved to lib/.
13205 * src/getopt.c: Likewise.
13206 * src/getopt1.c: Likewise.
13207 * src/getopt.h: Likewise.
13208 * src/ansi2knr.c: Likewise.
13209 * src/ansi2knr.1: Likewise.
13210 * src/Makefile.am: Adjust.
13211 * lib/Makefile.am: New file.
13212
13213 2000-03-28 Akim Demaille <akim@epita.fr>
13214
13215 * src/getargs.c (usage): Refresh the help message.
13216
13217 2000-03-17 Akim Demaille <akim@epita.fr>
13218
13219 * src/getopt1.c: Updated from textutils 2.0e
13220 * src/getopt.c: Likewise.
13221 * src/getopt.h: Likewise.
13222
13223 2000-03-17 Akim Demaille <akim@epita.fr>
13224
13225 * src/Makefile.am (bison.simple): Fix the awk program: quote only
13226 the file name, not the whole `#line LINE FILE'.
13227
13228 2000-03-17 Akim Demaille <akim@epita.fr>
13229
13230 On syntax errors, report the token on which we choked.
13231
13232 * src/bison.s1 (yyparse): In the label yyerrlab, when
13233 YYERROR_VERBOSE, add yychar in msg.
13234
13235 2000-03-17 Akim Demaille <akim@epita.fr>
13236
13237 * src/reader.c (copy_at): New function.
13238 (copy_guard): Use it.
13239 (copy_action): Use it.
13240
13241 2000-03-17 Akim Demaille <akim@epita.fr>
13242
13243 Be kind to translators, save some useless translations.
13244
13245 * src/main.c (banner): New function.
13246 (fatal_banner): Use it.
13247 (warn_banner): Use it.
13248
13249 2000-03-17 Akim Demaille <akim@epita.fr>
13250
13251 * src/reader.c (copy_definition): Use copy_string and
13252 copy_comment. Removed now unused `match', `ended',
13253 `cplus_comment'.
13254 (copy_comment, copy_string): Moved, to be visible from
13255 copy_definition.
13256
13257 2000-03-17 Akim Demaille <akim@epita.fr>
13258
13259 * src/reader.c (copy_string): Declare `static inline'. No
13260 problems with inline, since it is checked by configure.
13261 (copy_comment): Likewise.
13262
13263 2000-03-17 Akim Demaille <akim@epita.fr>
13264
13265 * src/reader.c (packsymbols): Formatting changes.
13266
13267 2000-03-17 Akim Demaille <akim@epita.fr>
13268
13269 * src/reader.c (copy_comment): New function, factored out from:
13270 (copy_action): Use it. Removed now unused `match', `ended',
13271 `cplus_comment'.
13272 (copy_guard): Likewise.
13273
13274 2000-03-17 Akim Demaille <akim@epita.fr>
13275
13276 * src/reader.c (copy_string): New function, factored out from:
13277 (copy_action): Use it.
13278 (copy_guard): Likewise.
13279
13280 2000-03-17 Akim Demaille <akim@epita.fr>
13281
13282 Change the handling of @s so that they behave exactly like $s.
13283 There is now a pseudo variable @$ (readble and writable), location
13284 of the lhs of the rule (by default ranging from the location of
13285 the first symbol of the rhs, to the location of the last symbol,
13286 or, if the rhs is empty, YYLLOC).
13287
13288 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
13289 yyval.
13290 (yyparse): When providing a default semantic action, provide a
13291 default location action.
13292 (after the $): No longer change `*YYLSP', just stack YYLOC the
13293 same way you stack YYVAL.
13294 * src/reader.c (read_declarations): Use warns.
13295 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
13296 (copy_action, case '@'): Likewise.
13297 Use a standard error message, to save useless work from
13298 translators.
13299
13300 2000-03-17 Akim Demaille <akim@epita.fr>
13301
13302 * src/bison.s1: Formatting and cosmetics changes.
13303 * src/reader.c: Likewise.
13304 Update the Copyright notice.
13305
13306 2000-03-17 Akim Demaille <akim@epita.fr>
13307
13308 * src/bison.s1 (#line): All set to `#line' only, since the
13309 Makefile now handles them.
13310
13311 2000-03-16 Akim Demaille <akim@epita.fr>
13312
13313 * src/output.c (output_rule_data): Output the documentation of
13314 some of the tables.
13315 (Copyright notice): Update.
13316 Formatting changes.
13317
13318 2000-03-16 Akim Demaille <akim@epita.fr>
13319
13320 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
13321 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
13322 One `#if YYDEBUG' remains, since it uses variables which are
13323 defined only if `YYDEBUG != 0'.
13324
13325 2000-03-16 Akim Demaille <akim@epita.fr>
13326
13327 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
13328 and related variables so that the similarities are highlighted.
13329
13330 2000-03-16 Akim Demaille <akim@epita.fr>
13331
13332 * src/bison.s1: Properly indent CPP directives.
13333
13334 2000-03-16 Akim Demaille <akim@epita.fr>
13335
13336 * src/bison.s1: Properly indent the `alloca' CPP section.
13337
13338 2000-03-16 Akim Demaille <akim@epita.fr>
13339
13340 Do not hard code values of directories in `configure.in'.
13341 Update the `configure' tool chain.
13342
13343 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
13344 src/makefile.am.
13345 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
13346 (AC_OUTPUT): Add m4/Makefile.
13347 Bump to bison 1.28a, 1.29 has never been released.
13348 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
13349 handled via src/Makefile.am.
13350 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
13351 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
13352 autoheader.
13353 * Makefile.am (SUBDIRS): Add m4.
13354 (ACLOCAL_AM_FLAGS): New variable.
13355 (AUTOMAKE_OPTIONS): Add check-news.
13356 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
13357 the proper line number and file name.
13358 (DEFS): Propagate the location of bison library files and of the
13359 locale files.
13360 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
13361 builddir.
13362 * acinclude.m4: Remove, replaced by the directory m4.
13363 * m4/Makefile.am (EXTRA_DIST): New variable.
13364 * m4/gettext.m4: New file, from the fileutils.
13365 * m4/lcmessage.m4: Likewise
13366 * m4/progtest.m4: Likewise.
13367 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
13368
13369 2000-03-10 Akim Demaille <akim@epita.fr>
13370
13371 * src/closure.c:
13372 Formatting changes of various comments.
13373 Respect the GNU coding standards at various places.
13374 Don't use `_()' when no translation is needed.
13375
13376 1999-12-13 Jesse Thilo <jthilo@gnu.org>
13377
13378 * src/files.c:
13379 OS/2 honors TMPDIR environment variable.
13380
13381 1999-12-13 Jesse Thilo <jthilo@gnu.org>
13382
13383 * doc/bison.texinfo: Tweaked spelling and grammar.
13384 Updated ISBN.
13385 Removed reference to price of printed copy.
13386 Mention BISON_SIMPLE and BISON_HAIRY.
13387
13388 1999-12-13 Jesse Thilo <jthilo@gnu.org>
13389
13390 * configure.in, NEWS:
13391 Bison 1.29 released.
13392
13393 1999-10-27 Jesse Thilo <jthilo@gnu.org>
13394
13395 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
13396 Added reference card.
13397
13398 1999-07-26 Jesse Thilo <jthilo@gnu.org>
13399
13400 * po/ru.po: Added Russian translation.
13401
13402 1999-07-26 Jesse Thilo <jthilo@gnu.org>
13403
13404 * configure.in: Added Russian translation.
13405
13406 1999-07-06 Jesse Thilo <jthilo@gnu.org>
13407
13408 * configure.in, NEWS, README:
13409 Released version 1.28.
13410
13411 1999-06-14 Jesse Thilo <jthilo@gnu.org>
13412
13413 * src/system.h:
13414 Squashed redefinition warning on some systems.
13415
13416 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
13417 Have configure build version string instead of relying on ANSI string
13418 concatentation.
13419
13420 1999-06-14 Jesse Thilo <jthilo@gnu.org>
13421
13422 * po/POTFILES.in: Got rid of version.c.
13423
13424 1999-06-14 Jesse Thilo <jthilo@gnu.org>
13425
13426 * acconfig.h, configure.in:
13427 Have configure build version string instead of relying on ANSI string
13428 concatentation.
13429
13430 1999-06-08 Jesse Thilo <jthilo@gnu.org>
13431
13432 * doc/bison.1:
13433 Dropped mention of `+' for long-named options.
13434
13435 1999-05-30 Jesse Thilo <jthilo@gnu.org>
13436
13437 * src/files.c: Added <unistd.h> for unlink().
13438
13439 * src/Makefile.am, src/system.h:
13440 I18n fixes.
13441
13442 1999-05-30 Jesse Thilo <jthilo@gnu.org>
13443
13444 * README: Added a FAQ list.
13445
13446 * configure.in, acconfig.h:
13447 I18n fixes.
13448
13449 1999-05-30 Jesse Thilo <jthilo@gnu.org>
13450
13451 * doc/FAQ, doc/Makefile.am:
13452 Added a FAQ list.
13453
13454 1999-05-19 Jesse Thilo <jthilo@gnu.org>
13455
13456 * src/alloc.h, src/symtab.h, src/version.c:
13457 Protected inclusion of "config.h" with HAVE_CONFIG_H.
13458
13459 1999-04-18 Jesse Thilo <jthilo@gnu.org>
13460
13461 * src/.cvsignore, src/Makefile.am:
13462 Reorganized: sources in `src', documentation in `doc'.
13463
13464 * src/lex.c (literalchar):
13465 fixed the code for escaping double quotes (thanks
13466 Jonathan Czisny.)
13467
13468 1999-04-18 Jesse Thilo <jthilo@gnu.org>
13469
13470 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
13471 Adjusted paths to reflect directory reorganization.
13472
13473 1999-04-18 Jesse Thilo <jthilo@gnu.org>
13474
13475 * doc/.cvsignore, doc/Makefile.am:
13476 Reorganized: sources in `src', documentation in `doc'.
13477
13478 1999-04-18 Jesse Thilo <jthilo@gnu.org>
13479
13480 * configure.in:
13481 Updated AC_INIT file to reflect directory reorganization.
13482
13483 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
13484 Reorganized: sources in `src', documentation in `doc'.
13485
13486 1999-04-13 Jesse Thilo <jthilo@gnu.org>
13487
13488 * src/allocate.c:
13489 Don't declare calloc() and realloc() if not necessary.
13490
13491 1999-04-13 Jesse Thilo <jthilo@gnu.org>
13492
13493 * configure.in, acconfig.h, acinclude.m4:
13494 Don't declare calloc() and realloc() if not necessary.
13495
13496 1999-03-23 Jesse Thilo <jthilo@gnu.org>
13497
13498 * po/.cvsignore: Added i18n support.
13499
13500 1999-03-23 Jesse Thilo <jthilo@gnu.org>
13501
13502 * acconfig.h, configure.in, Makefile.am:
13503 Added i18n support.
13504
13505 1999-03-22 Jesse Thilo <jthilo@gnu.org>
13506
13507 * src/bison.s1: Fixed #line numbers.
13508
13509 1999-03-15 Jesse Thilo <jthilo@gnu.org>
13510
13511 * po/es.po, po/fr.po, po/nl.po, po/de.po:
13512 Added PO files from Translation Project.
13513
13514 1999-03-03 Jesse Thilo <jthilo@gnu.org>
13515
13516 * Makefile.am:
13517 Added support for non-ANSI compilers (ansi2knr).
13518
13519 1999-02-16 Jesse Thilo <jthilo@gnu.org>
13520
13521 * configure.in: Bumped version number to 1.27.
13522
13523 * Makefile.am:
13524 Added `bison.simple' to list of files removed by `make distclean'.
13525
13526 1999-02-12 Jesse Thilo <jthilo@gnu.org>
13527
13528 * src/files.c, src/files.h:
13529 Defined locations of parser files in config.h instead of Makefile.
13530
13531 1999-02-12 Jesse Thilo <jthilo@gnu.org>
13532
13533 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
13534 Defined locations of parser files in config.h instead of Makefile.
13535
13536 1999-02-09 Jesse Thilo <jthilo@gnu.org>
13537
13538 * Makefile.am:
13539 Removed inappropriate use of $< macro.
13540
13541 1999-02-05 Jesse Thilo <jthilo@gnu.org>
13542
13543 * po/Makefile.in.in, po/POTFILES.in:
13544 Add `po' directory skeleton.
13545
13546 1999-01-27 Jesse Thilo <jthilo@gnu.org>
13547
13548 * README: Document help-bison list.
13549
13550 * configure.in: Add check for mkstemp().
13551
13552 1999-01-20 Jesse Thilo <jthilo@gnu.org>
13553
13554 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
13555 Hush a few compiler warnings.
13556
13557 * src/files.c:
13558 Add tryclose(), which verifies that fclose was successful.
13559 Hush a couple of compiler warnings.
13560
13561 1999-01-20 Jesse Thilo <jthilo@gnu.org>
13562
13563 * Makefile.am, OChangeLog:
13564 ChangeLog is now automatically generated. Include the old version as
13565 OChangeLog.
13566
13567 1999-01-14 Jesse Thilo <jthilo@gnu.org>
13568
13569 * 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:
13570 Update FSF address.
13571
13572 1999-01-14 Jesse Thilo <jthilo@gnu.org>
13573
13574 * doc/bison.texinfo: Fix formatting glitch.
13575
13576 * doc/bison.texinfo: Update FSF address.
13577
13578 1999-01-14 Jesse Thilo <jthilo@gnu.org>
13579
13580 * acconfig.h: Update FSF address.
13581
13582 1999-01-08 Jesse Thilo <jthilo@gnu.org>
13583
13584 * src/system.h:
13585 Don't define PACKAGE here, since config.h defines it.
13586
13587 1998-12-30 Jesse Thilo <jthilo@gnu.org>
13588
13589 * src/reader.c: Update copyright date.
13590
13591 * src/main.c:
13592 Ditch sprintf to statically-sized buffers in fatal/warn functions in
13593 favor of output directly to stderr (avoids buffer overruns).
13594
13595 * src/reader.c: Some checks for premature EOF.
13596
13597 * 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:
13598 Use prototypes if the compiler understands them.
13599
13600 * src/files.c: Honor TMPDIR on Unix hosts.
13601 Use prototypes if the compiler understands them.
13602
13603 * src/reader.c:
13604 Fix a couple of buffer overrun bugs.
13605 Use prototypes if the compiler understands them.
13606
13607 * src/system.h: Include unistd.h and ctype.h.
13608 Use #ifdef instead of #if for NLS symbols.
13609
13610 1998-12-30 Jesse Thilo <jthilo@gnu.org>
13611
13612 * doc/bison.texinfo:
13613 Delete comment "consider using @set for edition number, etc..." since
13614 we now are doing so.
13615
13616 1998-12-30 Jesse Thilo <jthilo@gnu.org>
13617
13618 * configure.in:
13619 Use prototypes if the compiler understands them.
13620
13621 * NEWS: Document 1.26 highlights.
13622
13623 * Makefile.am: Require Automake 1.3 or later.
13624
13625 * acconfig.h:
13626 Use prototypes if the compiler understands them.
13627
13628 1998-12-29 Jesse Thilo <jthilo@gnu.org>
13629
13630 * src/version.c:
13631 Use VERSION symbol from automake for version number.
13632
13633 1998-12-29 Jesse Thilo <jthilo@gnu.org>
13634
13635 * acconfig.h, configure.in, version.cin:
13636 Use VERSION symbol from automake for version number.
13637
13638 1998-11-28 Jesse Thilo <jthilo@gnu.org>
13639
13640 * Makefile.am:
13641 Distribute original version of simple parser (bison.s1), not built
13642 version (bison.simple).
13643
13644 1998-11-28 Jesse Thilo <jthilo@gnu.org>
13645
13646 * doc/bison.texinfo: Add info dir entry.
13647
13648 * doc/bison.texinfo:
13649 Let automake put version number into documentation.
13650
13651 1998-11-26 Jesse Thilo <jthilo@gnu.org>
13652
13653 * src/bison.cld, src/build.com, src/vmshlp.mar:
13654 Add non-RCS files from /gd/gnu/bison.
13655
13656 1998-11-26 Jesse Thilo <jthilo@gnu.org>
13657
13658 * doc/bison.1:
13659 Document the BISON_HAIRY and BISON_SIMPLE variables.
13660
13661 1998-11-25 Jesse Thilo <jthilo@gnu.org>
13662
13663 * src/version.c: Build version.c automatically.
13664
13665 * src/reader.c:
13666 Fix token numbering (used to start at 258, not 257).
13667
13668 * src/system.h: Include config.h.
13669
13670 * src/getargs.c: Update bug report address.
13671
13672 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
13673 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
13674
13675 1998-11-25 Jesse Thilo <jthilo@gnu.org>
13676
13677 * Makefile.am:
13678 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
13679
13680 * configure.in, version.cin:
13681 Build version.c automatically.
13682
13683 * AUTHORS: Add AUTHORS file.
13684
13685 * README: Update bug report address.
13686
13687 * bison.simple:
13688 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
13689
13690 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
13691 Add automake stuff.
13692
13693 1998-11-25 Jesse Thilo <jthilo@gnu.org>
13694
13695 * doc/bison.texinfo: Clean up some formatting.
13696
13697 1998-05-05 Richard Stallman <rms@gnu.org>
13698
13699 * doc/bison.texinfo:
13700 Explain better why to make a pure parser.
13701
13702 1998-01-05 Richard Stallman <rms@gnu.org>
13703
13704 * src/files.c (openfiles):
13705 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
13706 find a temporary directory, if possible. Do not unlink files while
13707 they are open.
13708
13709 1997-08-25 Richard Stallman <rms@gnu.org>
13710
13711 * src/reader.c (stack_offset;):
13712 Change some warni to warns.
13713
13714 * src/lex.c (literalchar): Use warns, not warni.
13715
13716 1997-06-28 Richard Stallman <rms@gnu.org>
13717
13718 * src/bison.s1: Add a Bison version comment.
13719
13720 * src/main.c (fatal, warn, berror):
13721 Use program_name.
13722
13723 1997-06-28 Richard Stallman <rms@gnu.org>
13724
13725 * Makefile.in (bison_version): New variable.
13726 (dist): Use that variable.
13727 (bison.s1): Substitute the Bison version into bison.simple.
13728
13729 * bison.simple: Add a Bison version comment.
13730
13731 1997-06-18 Richard Stallman <rms@gnu.org>
13732
13733 * src/main.c (fatal, warn, berror):
13734 Make error messages standard.
13735 (toomany): Improve error message text.
13736
13737 * 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:
13738 new.h renamed to alloc.h.
13739
13740 1997-06-18 Richard Stallman <rms@gnu.org>
13741
13742 * Makefile.in: new.h renamed to alloc.h.
13743
13744 1997-05-24 Richard Stallman <rms@gnu.org>
13745
13746 * src/lex.c (literalchar):
13747 Fix the code for escaping \, " and '.
13748
13749 (lex): Avoid trouble when there are many chars
13750 to discard in a char literal with just several chars in it.
13751
13752 1997-05-17 Richard Stallman <rms@gnu.org>
13753
13754 * src/bison.s1:
13755 Use malloc, if using alloca is troublesome.
13756 (YYSTACK_USE_ALLOCA): New flag macro.
13757 Define it for some systems and compilers.
13758 (YYSTACK_ALLOC): New macro.
13759 (yyparse): Use YYSTACK_ALLOC to allocate stack.
13760 If it was malloc'd, free it.
13761
13762 1997-05-17 Richard Stallman <rms@gnu.org>
13763
13764 * bison.simple:
13765 Use malloc, if using alloca is troublesome.
13766 (YYSTACK_USE_ALLOCA): New flag macro.
13767 Define it for some systems and compilers.
13768 (YYSTACK_ALLOC): New macro.
13769 (yyparse): Use YYSTACK_ALLOC to allocate stack.
13770 If it was malloc'd, free it.
13771
13772 1997-04-23 Richard Stallman <rms@gnu.org>
13773
13774 * src/bison.s1:
13775 (alloca) [__hpux]: Always define as __builtin_alloca.
13776
13777 1997-04-23 Richard Stallman <rms@gnu.org>
13778
13779 * bison.simple:
13780 (alloca) [__hpux]: Always define as __builtin_alloca.
13781
13782 1997-04-22 Richard Stallman <rms@gnu.org>
13783
13784 * src/bison.s1:
13785 [__hpux]: Include alloca.h (right for HPUX 10)
13786 instead of declaring alloca (right for HPUX 9).
13787
13788 * src/bison.s1 (__yy_memcpy):
13789 Declare arg `count' as unsigned int.
13790 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
13791
13792 1997-04-22 Richard Stallman <rms@gnu.org>
13793
13794 * bison.simple:
13795 [__hpux]: Include alloca.h (right for HPUX 10)
13796 instead of declaring alloca (right for HPUX 9).
13797
13798 * bison.simple (__yy_memcpy):
13799 Declare arg `count' as unsigned int.
13800 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
13801
13802 1997-01-03 Richard Stallman <rms@gnu.org>
13803
13804 * src/allocate.c: [__STDC__ or _MSC_VER]:
13805 Declare calloc and realloc to return void *.
13806
13807 1997-01-02 Richard Stallman <rms@gnu.org>
13808
13809 * src/system.h:
13810 [_MSC_VER]: Include stdlib.h and process.h.
13811 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
13812
13813 * src/main.c (main): Return FAILURE as a value.
13814 (printable_version): Declare arg as int, not char.
13815
13816 1997-01-02 Richard Stallman <rms@gnu.org>
13817
13818 * Makefile.in (dist):
13819 Explicitly check for symlinks, and copy them.
13820
13821 1996-12-19 Richard Stallman <rms@gnu.org>
13822
13823 * src/files.c:
13824 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
13825
13826 1996-12-18 Paul Eggert <eggert@gnu.org>
13827
13828 * src/bison.s1 (yyparse):
13829 If __GNUC__ and YYPARSE_PARAM are both defined,
13830 declare yyparse to have a void * argument.
13831
13832 1996-12-18 Paul Eggert <eggert@gnu.org>
13833
13834 * bison.simple (yyparse):
13835 If __GNUC__ and YYPARSE_PARAM are both defined,
13836 declare yyparse to have a void * argument.
13837
13838 1996-12-17 Richard Stallman <rms@gnu.org>
13839
13840 * src/reduce.c (nbits): Add some casts.
13841
13842 1996-08-12 Richard Stallman <rms@gnu.org>
13843
13844 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
13845
13846 1996-08-12 Richard Stallman <rms@gnu.org>
13847
13848 * bison.simple: Test _MSDOS as well as _MSDOS_.
13849
13850 1996-07-31 Richard Stallman <rms@gnu.org>
13851
13852 * src/bison.s1:
13853 [__sun && __i386]: Include alloca.h.
13854
13855 1996-07-31 Richard Stallman <rms@gnu.org>
13856
13857 * bison.simple:
13858 [__sun && __i386]: Include alloca.h.
13859
13860 1996-07-30 Richard Stallman <rms@gnu.org>
13861
13862 * src/bison.s1: Comment change.
13863
13864 * src/bison.s1: Test _MSDOS_, not MSDOS.
13865
13866 1996-07-30 Richard Stallman <rms@gnu.org>
13867
13868 * bison.simple: Comment change.
13869
13870 * bison.simple: Test _MSDOS_, not MSDOS.
13871
13872 1996-06-01 Richard Stallman <rms@gnu.org>
13873
13874 * 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:
13875 Insert `_' macro around many string constants.
13876
13877 * src/main.c:
13878 Insert `_' macro around many string constants.
13879
13880 (main): Call setlocale, bindtextdomain and textdomain.
13881
13882 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
13883 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
13884 [ENABLE_NLS]: Include libintl.h.
13885 [ENABLE_NLS] (gettext): Define.
13886 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
13887 (N_, PACKAGE, LOCALEDIR): New macros.
13888
13889 1996-06-01 Richard Stallman <rms@gnu.org>
13890
13891 * POTFILES.in: New file.
13892
13893 * Makefile.in (allocate.o):
13894 Define target explicitly.
13895
13896 * Makefile.in (CFLAGS): Set to @CFLAGS@.
13897 (LDFLAGS): Set to @LDFLAGS@.
13898 (configure): Run autoconf only if preceding `cd' succeeds.
13899 (bison.s1): Redirect output to temporary file then move the
13900 temporary to the target, rather than redirecting directly to bison.s1.
13901 (clean): Remove config.status and config.log.
13902 (distclean): Don't remove config.status here.
13903
13904 1996-05-12 Richard Stallman <rms@gnu.org>
13905
13906 * src/bison.s1:
13907 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
13908
13909 1996-05-12 Richard Stallman <rms@gnu.org>
13910
13911 * bison.simple:
13912 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
13913
13914 1996-05-11 Richard Stallman <rms@gnu.org>
13915
13916 * src/bison.s1 (__yy_memcpy):
13917 Really reorder the args, as was supposedly done on Feb 14 1995.
13918 (yyparse): Calls changed accordingly.
13919
13920 1996-05-11 Richard Stallman <rms@gnu.org>
13921
13922 * Makefile.in (dist): Don't use $(srcdir).
13923
13924 * bison.simple (__yy_memcpy):
13925 Really reorder the args, as was supposedly done on Feb 14 1995.
13926 (yyparse): Calls changed accordingly.
13927
13928 1996-01-27 Richard Stallman <rms@gnu.org>
13929
13930 * src/output.c (output_rule_data):
13931 Test YYERROR_VERBOSE in the conditional
13932 around the definition of ttyname.
13933
13934 1995-12-29 Richard Stallman <rms@gnu.org>
13935
13936 * src/bison.s1:
13937 Fix line numbers in #line commands.
13938
13939 1995-12-29 Richard Stallman <rms@gnu.org>
13940
13941 * bison.simple:
13942 Fix line numbers in #line commands.
13943
13944 1995-12-27 Richard Stallman <rms@gnu.org>
13945
13946 * src/bison.s1 (YYPARSE_PARAM_DECL):
13947 In C++, make it always null.
13948 (YYPARSE_PARAM_ARG): New macro.
13949 (yyparse): Use YYPARSE_PARAM_ARG.
13950
13951 1995-12-27 Richard Stallman <rms@gnu.org>
13952
13953 * bison.simple (YYPARSE_PARAM_DECL):
13954 In C++, make it always null.
13955 (YYPARSE_PARAM_ARG): New macro.
13956 (yyparse): Use YYPARSE_PARAM_ARG.
13957
13958 1995-11-29 Richard Stallman <rms@gnu.org>
13959
13960 * doc/bison.texinfo:
13961 Describe literal string tokens, %raw, %no_lines, %token_table.
13962
13963 1995-11-29 Daniel Hagerty <hag@gnu.org>
13964
13965 * doc/bison.texinfo: Fixed update date
13966
13967 1995-10-16 Richard Stallman <rms@gnu.org>
13968
13969 * src/version.c: Version 1.25.
13970
13971 1995-10-16 Richard Stallman <rms@gnu.org>
13972
13973 * NEWS: *** empty log message ***
13974
13975 1995-10-16 Richard Stallman <rms@gnu.org>
13976
13977 * doc/bison.1, doc/bison.rnh:
13978 Add new options.
13979
13980 1995-10-15 Richard Stallman <rms@gnu.org>
13981
13982 * src/vmsgetargs.c, src/getargs.c:
13983 Added -n, -k, and -raw switches.
13984 (noparserflag, toknumflag, rawtoknumflag): New variables.
13985
13986 * src/symtab.h (SALIAS):
13987 New #define for adding aliases to %token.
13988 (struct bucket): Added `alias' field.
13989
13990 * src/reduce.c (reduce_grammar):
13991 Revise error message.
13992 (print_notices): Remove final `.' from error message.
13993
13994 * src/reader.c (reader_output_yylsp):
13995 New function.
13996 (readgram): Use `#if 0' around code that accepted %command
13997 inside grammar rules: The documentation doesn't allow it,
13998 and it will fail since the %command processors scan for the next %.
13999 (parse_token_decl): Extended the %token
14000 declaration to allow a multi-character symbol as an alias.
14001 (parse_thong_decl): New function.
14002 (read_declarations): Added %thong declarations.
14003 (read_declarations): Handle NOOP to deal with allowing
14004 % declarations as another means to specify the flags.
14005 (readgram): Allow %prec prior to semantics embedded in a rule.
14006 (skip_to_char, read_declarations, copy_definition)
14007 (parse_token_decl, parse_start_decl, parse_type_decl)
14008 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
14009 (get_type_name, copy_guard, copy_action, readgram)
14010 (get_type, packsymbols): Revised most error messages.
14011 Changed `fatal' to `warnxxx' to avoid aborting for error.
14012 Revised and use multiple warnxxx functions to avoid using VARARGS1.
14013 (read_declarations): Improve the error message for
14014 an invalid character. Do not abort.
14015 (read_declarations, copy_guard, copy_action): Use
14016 printable_version to avoid unprintable characters in printed output.
14017 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
14018 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
14019 Allow the type of a non-terminal can be given
14020 more than once, as long as all specifications give the same type.
14021
14022 * src/output.c:
14023 (output_headers, output_trailers, output, output_gram)
14024 (output_rule_data): Implement noparserflag variable.
14025 Implement toknumflag variable.
14026 (output): Call reader_output_yylsp to output LTYPESTR.
14027
14028 * src/main.c (main):
14029 If reader sees an error, don't process the grammar.
14030 (fatals): Updated to not use VARARGS1.
14031 (printable_version, int_to_string, warn, warni, warns, warnss)
14032 (warnsss): New error reporting functions. Avoid abort for error.
14033
14034 * src/lex.h:
14035 Added THONG and NOOP for alias processing.
14036 Added SETOPT for the new code that allows setting options with %flags.
14037
14038 * src/lex.c:
14039 Include getopt.h. Add some extern decls.
14040 (safegetc): New function to deal with EOF gracefully.
14041 (literalchar); new function to deal with reading \ escapes.
14042 (lex): Use literalchar.
14043 (lex): Implemented "..." tokens.
14044 (literalchar, lex, parse_percent_token): Made tokenbuffer
14045 always contain the token. This includes growing the token
14046 buffer while reading an integer.
14047 (parse_percent_token): Replaced if-else statement with percent_table.
14048 (parse_percent_token): Added % declarations as another
14049 way to specify the flags -n, -l, and -r. Also added hooks for
14050 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
14051 major changes to files.c.
14052 (lex) Retain in the incoming stream a character following
14053 an incorrect '/'.
14054 (skip_white_space, lex): Revised most error messages
14055 and changed fatal to warn to avoid aborting.
14056 (percent_table): Added %thong declarations.
14057
14058 * src/gram.h: Comment changes.
14059
14060 * src/files.c (openfiles, open_extra_files, done):
14061 Add faction flag
14062 and actfile file. Handle noparserflag. Both for -n switch.
14063
14064 * src/conflicts.c (resolve_sr_conflict):
14065 Remove use of alloca.
14066
14067 1995-06-01 Jim Meyering <meyering@gnu.org>
14068
14069 * doc/bison.texinfo: *** empty log message ***
14070
14071 1995-05-06 Richard Stallman <rms@gnu.org>
14072
14073 * src/bison.s1: Comment change.
14074
14075 1995-05-06 Richard Stallman <rms@gnu.org>
14076
14077 * bison.simple: Comment change.
14078
14079 1995-05-03 Richard Stallman <rms@gnu.org>
14080
14081 * src/version.c: Version now 1.24.
14082
14083 * src/bison.s1: Change distribution terms.
14084
14085 * src/version.c: Version now 1.23.
14086
14087 1995-05-03 Richard Stallman <rms@gnu.org>
14088
14089 * doc/bison.texinfo:
14090 Rewrite "Conditions for Using Bison".
14091 Update version to 1.24.
14092
14093 1995-05-03 Richard Stallman <rms@gnu.org>
14094
14095 * bison.simple: Change distribution terms.
14096
14097 1995-02-23 Richard Stallman <rms@gnu.org>
14098
14099 * src/files.c: Test __VMS_POSIX as well as VMS.
14100
14101 1995-02-14 Jim Meyering <meyering@gnu.org>
14102
14103 * src/bison.s1 (__yy_memcpy):
14104 Renamed from __yy_bcopy to avoid
14105 confusion. Reverse FROM and TO arguments to be consistent with
14106 those of memcpy.
14107
14108 1995-02-14 Jim Meyering <meyering@gnu.org>
14109
14110 * bison.simple (__yy_memcpy):
14111 Renamed from __yy_bcopy to avoid
14112 confusion. Reverse FROM and TO arguments to be consistent with
14113 those of memcpy.
14114
14115 1994-11-10 David J. MacKenzie <djm@gnu.org>
14116
14117 * NEWS: reformat
14118
14119 * NEWS: New file.
14120
14121 * Makefile.in (DISTFILES): Include NEWS.
14122
14123 * Makefile.in (DISTFILES):
14124 Include install-sh, not install.sh.
14125
14126 * configure.in: Update to Autoconf v2 macro names.
14127
14128 1994-10-05 David J. MacKenzie <djm@gnu.org>
14129
14130 * Makefile.in: fix typo
14131
14132 * Makefile.in (prefix, exec_prefix):
14133 Let configure set them.
14134
14135 1994-09-28 David J. MacKenzie <djm@gnu.org>
14136
14137 * Makefile.in: Set datadir to $(prefix)/share.
14138
14139 1994-09-15 Richard Stallman <rms@gnu.org>
14140
14141 * src/bison.s1:
14142 Update copyright notice and GPL version.
14143
14144 1994-09-15 Richard Stallman <rms@gnu.org>
14145
14146 * bison.simple:
14147 Update copyright notice and GPL version.
14148
14149 1994-07-12 Richard Stallman <rms@gnu.org>
14150
14151 * src/reduce.c, src/reader.c:
14152 entered into RCS
14153
14154 1994-05-05 David J. MacKenzie <djm@gnu.org>
14155
14156 * Makefile.in: entered into RCS
14157
14158 1994-03-26 Richard Stallman <rms@gnu.org>
14159
14160 * src/bison.s1: entered into RCS
14161
14162 1994-03-26 Richard Stallman <rms@gnu.org>
14163
14164 * bison.simple: entered into RCS
14165
14166 1994-03-25 Richard Stallman <rms@gnu.org>
14167
14168 * src/main.c: entered into RCS
14169
14170 1994-03-24 Richard Stallman <rms@gnu.org>
14171
14172 * src/conflicts.c: entered into RCS
14173
14174 1994-01-02 Richard Stallman <rms@gnu.org>
14175
14176 * Makefile.in: *** empty log message ***
14177
14178 1993-11-21 Richard Stallman <rms@gnu.org>
14179
14180 * src/bison.s1: *** empty log message ***
14181
14182 1993-11-21 Richard Stallman <rms@gnu.org>
14183
14184 * doc/bison.texinfo: entered into RCS
14185
14186 * doc/bison.texinfo: *** empty log message ***
14187
14188 1993-11-21 Richard Stallman <rms@gnu.org>
14189
14190 * bison.simple: *** empty log message ***
14191
14192 1993-10-25 David J. MacKenzie <djm@gnu.org>
14193
14194 * doc/bison.texinfo: *** empty log message ***
14195
14196 1993-10-19 Richard Stallman <rms@gnu.org>
14197
14198 * src/bison.s1: *** empty log message ***
14199
14200 1993-10-19 Richard Stallman <rms@gnu.org>
14201
14202 * bison.simple: *** empty log message ***
14203
14204 1993-10-14 Richard Stallman <rms@gnu.org>
14205
14206 * src/bison.s1: *** empty log message ***
14207
14208 1993-10-14 Richard Stallman <rms@gnu.org>
14209
14210 * bison.simple: *** empty log message ***
14211
14212 1993-09-14 David J. MacKenzie <djm@gnu.org>
14213
14214 * doc/bison.texinfo: *** empty log message ***
14215
14216 1993-09-13 Noah Friedman <friedman@gnu.org>
14217
14218 * Makefile.in: *** empty log message ***
14219
14220 1993-09-10 Richard Stallman <rms@gnu.org>
14221
14222 * src/conflicts.c: *** empty log message ***
14223
14224 * src/system.h: entered into RCS
14225
14226 1993-09-10 Richard Stallman <rms@gnu.org>
14227
14228 * doc/bison.1: entered into RCS
14229
14230 1993-09-06 Noah Friedman <friedman@gnu.org>
14231
14232 * src/version.c: entered into RCS
14233
14234 1993-09-06 Noah Friedman <friedman@gnu.org>
14235
14236 * Makefile.in: *** empty log message ***
14237
14238 1993-07-30 David J. MacKenzie <djm@gnu.org>
14239
14240 * Makefile.in: *** empty log message ***
14241
14242 1993-07-24 Richard Stallman <rms@gnu.org>
14243
14244 * src/bison.s1: *** empty log message ***
14245
14246 1993-07-24 Richard Stallman <rms@gnu.org>
14247
14248 * bison.simple: *** empty log message ***
14249
14250 1993-07-08 David J. MacKenzie <djm@gnu.org>
14251
14252 * Makefile.in: *** empty log message ***
14253
14254 1993-07-04 Richard Stallman <rms@gnu.org>
14255
14256 * src/bison.s1: *** empty log message ***
14257
14258 1993-07-04 Richard Stallman <rms@gnu.org>
14259
14260 * bison.simple: *** empty log message ***
14261
14262 1993-06-26 David J. MacKenzie <djm@gnu.org>
14263
14264 * src/getargs.c: entered into RCS
14265
14266 1993-06-26 David J. MacKenzie <djm@gnu.org>
14267
14268 * doc/bison.texinfo: *** empty log message ***
14269
14270 * doc/bison.1: New file.
14271
14272 1993-06-25 Richard Stallman <rms@gnu.org>
14273
14274 * src/getargs.c: New file.
14275
14276 1993-06-16 Richard Stallman <rms@gnu.org>
14277
14278 * src/bison.s1: *** empty log message ***
14279
14280 1993-06-16 Richard Stallman <rms@gnu.org>
14281
14282 * bison.simple: *** empty log message ***
14283
14284 1993-06-03 Richard Stallman <rms@gnu.org>
14285
14286 * src/bison.s1: New file.
14287
14288 1993-06-03 Richard Stallman <rms@gnu.org>
14289
14290 * doc/bison.texinfo: *** empty log message ***
14291
14292 1993-06-03 Richard Stallman <rms@gnu.org>
14293
14294 * bison.simple: New file.
14295
14296 1993-05-19 Richard Stallman <rms@gnu.org>
14297
14298 * doc/bison.texinfo: New file.
14299
14300 1993-05-07 Noah Friedman <friedman@gnu.org>
14301
14302 * Makefile.in: *** empty log message ***
14303
14304 1993-04-28 Noah Friedman <friedman@gnu.org>
14305
14306 * src/reader.c: *** empty log message ***
14307
14308 1993-04-23 Noah Friedman <friedman@gnu.org>
14309
14310 * src/alloc.h: entered into RCS
14311
14312 1993-04-20 David J. MacKenzie <djm@gnu.org>
14313
14314 * src/version.c: *** empty log message ***
14315
14316 * src/files.c, src/allocate.c:
14317 entered into RCS
14318
14319 * src/reader.c: *** empty log message ***
14320
14321 * src/lex.c: entered into RCS
14322
14323 * src/conflicts.c: New file.
14324
14325 * src/symtab.c: entered into RCS
14326
14327 * src/alloc.h: New file.
14328
14329 * src/LR0.c: entered into RCS
14330
14331 1993-04-18 Noah Friedman <friedman@gnu.org>
14332
14333 * src/reader.c: New file.
14334
14335 * src/version.c: *** empty log message ***
14336
14337 1993-04-18 Noah Friedman <friedman@gnu.org>
14338
14339 * Makefile.in: *** empty log message ***
14340
14341 1993-04-17 Noah Friedman <friedman@gnu.org>
14342
14343 * Makefile.in: *** empty log message ***
14344
14345 1993-04-15 Richard Stallman <rms@gnu.org>
14346
14347 * src/main.c, src/files.c:
14348 New file.
14349
14350 1993-04-15 Noah Friedman <friedman@gnu.org>
14351
14352 * configure.in: entered into RCS
14353
14354 * configure.in: *** empty log message ***
14355
14356 * configure.in: New file.
14357
14358 1993-04-14 Richard Stallman <rms@gnu.org>
14359
14360 * Makefile.in: New file.
14361
14362 1993-04-13 Richard Stallman <rms@gnu.org>
14363
14364 * src/version.c: New file.
14365
14366 1993-03-25 Richard Stallman <rms@gnu.org>
14367
14368 * src/output.c: entered into RCS
14369
14370 1992-09-25 Richard Stallman <rms@gnu.org>
14371
14372 * configure.bat: entered into RCS
14373
14374 1992-06-22 Richard Stallman <rms@gnu.org>
14375
14376 * src/vmsgetargs.c: entered into RCS
14377
14378 1992-06-22 Richard Stallman <rms@gnu.org>
14379
14380 * doc/bison.rnh: entered into RCS
14381
14382 1992-04-20 David J. MacKenzie <djm@gnu.org>
14383
14384 * README: entered into RCS
14385
14386 1992-01-22 Richard Stallman <rms@gnu.org>
14387
14388 * src/machine.h: entered into RCS
14389
14390 1991-12-21 Richard Stallman <rms@gnu.org>
14391
14392 * src/lalr.c, src/closure.c:
14393 entered into RCS
14394
14395 1991-12-20 Richard Stallman <rms@gnu.org>
14396
14397 * src/state.h: entered into RCS
14398
14399 1991-12-18 Richard Stallman <rms@gnu.org>
14400
14401 * src/print.c, src/nullable.c, src/derives.c:
14402 entered into RCS
14403
14404 1991-11-03 David J. MacKenzie <djm@gnu.org>
14405
14406 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
14407 entered into RCS
14408
14409 1988-09-09 Richard Stallman <rms@gnu.org>
14410
14411 * src/bison.hairy: entered into RCS
14412
14413 1987-12-16 Richard Stallman <rms@gnu.org>
14414
14415 * REFERENCES: entered into RCS
14416
14417
14418 -----
14419
14420 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
14421 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software
14422 Foundation, Inc.
14423
14424 Copying and distribution of this file, with or without
14425 modification, are permitted provided the copyright notice and this
14426 notice are preserved.