]> git.saurik.com Git - bison.git/blob - ChangeLog
* data/m4sugar/m4sugar.m4 (_m4_map): New macro.
[bison.git] / ChangeLog
1 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
2
3 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
4 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
5
6 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
7
8 Undo the parts of the unlocked-I/O change that substituted
9 putc or puts for printf. This might hurt performance a bit,
10 but some people prefer the printf style.
11 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
12 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
13 All uses replaced by YYFPRINTF and YYDPRINTF.
14 * data/yacc.c: Likewise.
15 * lib/bitset.c (bitset_print): Likewise.
16 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
17 putc and puts.
18 * lib/lbitset.c (debug_lbitset): Likewise.
19 * src/closure.c (print_firsts, print_fderives): Likewise.
20 * src/gram.c (grammar_dump): Likewise.
21 * src/lalr.c (look_ahead_tokens_print): Likewise.
22 * src/output.c (escaped_output): Likewise.
23 (user_actions_output): Break apart two printfs.
24 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
25 * src/reduce.c (reduce_print): Likewise.
26 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
27 * src/system.h: Include unlocked-io.h rathe than stdio.h.
28
29 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
30 Use assignments rather than casts-to-void to suppress
31 unused-variable warnings. This pacifies 'lint'.
32 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
33 unused-variable warnings.
34
35 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
36
37 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
38
39 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
40
41 Use unlocked I/O for a minor performance improvement on hosts like
42 GNU/Linux and Solaris that support unlocked I/O. The basic idea
43 is to use the gnlib unlocked-io module, and to prefer putc and
44 puts to printf when either will work (since the latter doesn't
45 come in an unlocked flavor).
46 * bootstrap (gnulib_modules): Add unlocked-io.
47 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
48 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
49 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
50 and similarly for puts and putc and printf.
51 * data/yacc.c: Likewise.
52 * lib/bitset.c (bitset_print): Likewise.
53 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
54 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
55 to printf.
56 * lib/lbitset.c (debug_lbitset): Likewise.
57 * src/closure.c (print_firsts, print_fderives): Likewise.
58 * src/gram.c (grammar_dump): Likewise.
59 * src/lalr.c (look_ahead_tokens_print): Likewise.
60 * src/output.c (escaped_output): Likewise.
61 (user_actions_output): Coalesce two printfs.
62 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
63 * src/reduce.c (reduce_print): Likewise.
64 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
65 * src/system.h: Include unlocked-io.h rather than stdio.h.
66
67 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
68 this confuses xgettext.
69
70 2005-10-02 Akim Demaille <akim@epita.fr>
71
72 * bootstrap (gnulib_modules): Add strverscmp.
73 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
74 * m4/.cvsignore: Add strverscmp.m4.
75 * src/parse-gram.y (%require): New token, new rule.
76 (version_check): New.
77 * src/scan-gram.l (%require): Adjust.
78 * tests/input.at (AT_REQUIRE): New.
79 Use it.
80 * doc/bison.texinfo (Require Decl): New.
81 (Calc++ Parser): Use %require.
82
83 2005-10-02 Akim Demaille <akim@epita.fr>
84
85 * data/location.cc: New.
86
87 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
88 Akim Demaille <akim@epita.fr>
89
90 Make sure -odir/foo.cc creates dir/location.hh etc.
91 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
92 (spec_file_prefix, spec_verbose_file, spec_graph_file)
93 (spec_defines_file): Now const.
94 (dir_prefix): New.
95 (short_base_name): Remove.
96 * src/files.c: Adjust.
97 (dirname.h): Include.
98 (base_name): Don't prototype it.
99 (finput): Remove, duplicates gram_in.
100 (full_base_name, short_base_name): Replace by...
101 (all_but_ext, all_but_tab_ext): these.
102 (compute_base_names): Rename as...
103 (compute_file_name_parts): this.
104 Update to compute the new variables, including dir_prefix.
105 Adjust dependencies.
106 * src/output.c (prepare): Output them.
107 * src/reader.c: Adjust to use gram_in, not finput.
108 * src/scan-skel.l (@dir_prefix@): New.
109
110 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
111
112 * lib/subpipe.c: New function end_of_output_subpipe() added
113 to allow support for non-posix systems. This is a no-op function
114 for posix systems.
115
116 * lib/subpipe.h: New function end_of_output_subpipe() added
117 to allow support for non-posix systems. This is a no-op function
118 for posix systems.
119
120 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
121 handle the lack of pipe/fork functionality on non-posix systems.
122
123 * djgpp/Makefile.maint: DJGPP specific file.
124
125 * djgpp/README.in: DJGPP specific file.
126
127 * djgpp/config.bat: DJGPP specific configuration file.
128
129 * djgpp/config.sed: DJGPP specific configuration file.
130
131 * djgpp/config.site: DJGPP specific configuration file.
132
133 * djgpp/config_h.sed: DJGPP specific configuration file.
134
135 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
136
137 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
138
139 2005-10-02 Akim Demaille <akim@epita.fr>
140
141 * data/location.cc: New, extract from...
142 * data/lalr1.cc: here.
143 (location.hh): Include it after the user prologue, in case the
144 filename type is defined by the user.
145 Forward declation location and position before the pre-prologue.
146 (yyresult_): Rename as...
147 (yyresult): this, it's a local variable, not an attribute.
148 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
149
150 2005-10-01 Akim Demaille <akim@epita.fr>
151
152 * examples/extexi: Restore the #line generation.
153
154 2005-09-30 Akim Demaille <akim@epita.fr>,
155 Alexandre Duret-Lutz <adl@gnu.org>
156
157 Move the token type and YYSTYPE in the parser class.
158 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
159 (parser::token): New, from the moved free definition of tokens.
160 (parser::semantic_value): Now a full definition instead of an
161 indirection to YYSTYPE.
162 (b4_post_prologue): No longer included in the header file, but
163 in the implementation file.
164 * doc/bison.texi (C+ Language Interface): Update.
165 * src/parse-gram.y: Support unary %define.
166 * tests/actions.at: Define global_tokens_and_yystype for backward
167 compatibility until we update the tests.
168 * tests/calc.at: Idem.
169 (first_line, first_column, last_line, last_column): Define for lalr1.cc
170 to simplify the code.
171
172 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
173
174 Port to SunOS 4.1.4, which lacks strtoul and strerror.
175 Ah, the good old days! Problem reported by Peter Klein.
176 * bootstrap (gnulib_modules): Add strerror, strtoul.
177 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
178 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
179
180 2005-09-29 Akim Demaille <akim@epita.fr>
181
182 * data/c.m4 (b4_error_verbose_if): New.
183 * data/lalr1.cc: Use it.
184 (YYERROR_VERBOSE_IF): Remove.
185 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
186 parser members, replaced by...
187 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
188 local variables.
189 (yysyntax_error_): Takes the state number as argument.
190 (yyreduce_print_): Use the argument yyrule, not the former
191 attribute yyn_.
192
193 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
194
195 * bootstrap (gnulib_modules): Add verify.
196 * lib/.cvsignore: Add verify.h.
197 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
198 * src/system.h (verify): Remove.
199 Include verify.h instead.
200 * src/tables.c (tables_generate): Use new API for 'verify'.
201
202 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
203
204 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
205 local variables whose names begin with 'yy'.
206 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
207 Trivial changes from Joel E. Denny.
208
209 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
210 it itself.
211 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
212 don't use alloca any more.
213
214 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
215 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
216 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
217 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
218 to match yacc.c, to test more hosts.
219
220 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
221
222 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
223 doesn't affect behavior.
224 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
225 Solaris, AIX, MSC.
226 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
227 This works a bit better with glibc, if user code has already included
228 stdlib.h.
229 * doc/bison.texinfo (Bison Parser): Document that users can't
230 arbitrarily use malloc and free for other purposes. Document
231 that <alloca.h> and <malloc.h> might be included.
232 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
233 user must declare alloca.
234
235 * HACKING (release): Forwarn the Translation Project about
236 stable releses.
237
238 2005-09-20 Akim Demaille <akim@epita.fr>
239
240 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
241
242 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
243
244 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
245 (YYSTACK_ALLOC_MAXIMUM): Use it.
246 (yysyntax_error): New function.
247 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
248 multiple syntax errors are reported, and alloca is being used.
249 Instead, reallocate buffers twice as big each time, so that
250 we waste at most half the allocated memory. Start with a small
251 (128-byte) buffer that will suffice in most cases anyway.
252 Use yysyntax_error to do most of the work.
253
254 * doc/bison.texinfo (Error Reporting, Table of Symbols):
255 yynerrs is the number of errors reported, not the number of
256 errors encountered.
257
258 * tests/glr-regression.at (Duplicated user destructor for lookahead):
259 Mark it as expected to fail.
260 Cast result of malloc; problem reported by twlevo@xs4all.nl.
261 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
262 Don't start user-code symbols with "yy", to avoid name space problems.
263
264 2005-09-19 Akim Demaille <akim@epita.fr>
265
266 Remove the traits, failed experiment.
267 It never proved useful, and anyway because of the current
268 definition, it was not possible to have several specialization of
269 this traits, making it useless.
270 * data/lalr1.cc (yy:traits): Remove.
271 Inline its definitions in the parser class.
272
273 2005-09-19 Akim Demaille <akim@epita.fr>
274
275 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
276 least Mac OSX with a /usr/local install of gettext.
277
278 2005-09-19 Akim Demaille <akim@epita.fr>
279
280 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
281 and yytoken for similarity with the other skeletons.
282
283 2005-09-19 Akim Demaille <akim@epita.fr>
284
285 * NEWS, configure.ac: Bump to 2.1a.
286
287 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
288
289 * NEWS: Version 2.1.
290
291 * NEWS: Remove notice of yytname change, since it was never in an
292 official release.
293 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
294 diagnostic.
295 * src/output.c (prepare): Likewise.
296 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
297 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
298 is not defined. This is an awful hack, but it's enough for now.
299 All callers changed.
300 * tests/glr-regression-at (make_value): Args are const pointers now,
301 to avoid GCC warning.
302 (Duplicated user destructor for lookahead): New test. Currently
303 skipped. It fails on my host but I'm not sure it'll always fail.
304
305 2005-09-16 Akim Demaille <akim@epita.fr>
306
307 * src/symtab.h (struct symbol): Declare the printer and destructor
308 as const, to avoid accidental calls to free.
309 (symbol_destructor_set, symbol_printer_set): Adjust.
310 * src/symtab.c: Adjust.
311
312 2005-09-16 Akim Demaille <akim@epita.fr>
313
314 * data/c.m4 (b4_token_enums): New.
315 (b4_token_defines): Rename as...
316 (b4_token_enums_defines): this.
317 (b4_token_defines): New, output only the #defines.
318 * data/yacc.c, data/glr.c: Adjust.
319 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
320 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
321 as default values.
322
323 2005-09-16 Akim Demaille <akim@epita.fr>
324
325 * data/lalr1.cc (yylex_): Remove, inline its code.
326 (yyreport_syntax_error_): Remove, replaced by...
327 (yysyntax_error_): this which returns a string and leaves to the
328 caller the call to the users' error function.
329 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
330 Move from members of the parser object...
331 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
332 to local variables of the parse function.
333
334 2005-09-16 Akim Demaille <akim@epita.fr>
335
336 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
337 since it's in Bison's name space.
338
339 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
340
341 * data/glr.c (yyresolveValue): Add default case to pacify
342 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
343
344 * NEWS: Document when yyparse started to return 2.
345 * doc/bison.texinfo (Parser Function): Document when yyparse
346 returns 2.
347
348 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
349 (b4_filename_type): Renamed back from b4_file_name_type. All uses
350 changed.
351 (class position): file_name -> filename (reverting). All uses changed.
352
353 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
354
355 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
356 do anything if $@ exists. This reverts part of the 2005-07-07
357 patch.
358
359 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
360
361 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
362 contains obsolete information and isn't worth distributing as a
363 separate file anyway.
364 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
365 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
366 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
367 (yyparse): Abort if user code uses longjmp to throw an unexpected
368 value.
369
370 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
371
372 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
373 Suggested by twlevo@xs4all.nl.
374
375 * data/glr.c (YYCHK1): Do not assume YYE is in range.
376 This avoids a diagnostic from gcc -Wswitch-enum.
377 Problem reported by twlevo@xs4all.nl.
378
379 * doc/bison.texinfo: Don't use "filename", as per GNU coding
380 standards. Use "file name" or "file" or "name", depending on
381 the context.
382 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
383 not to hack/foo.tab.c.
384 (Calc++ Top Level): 2nd arg of main is not const.
385 * data/glr.c: b4_filename -> b4_file_name.
386 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
387 All uses changed.
388 (class position): filename -> file_name. All uses changed.
389 * data/yacc.c: b4_filename -> b4_file_name.
390 * lib/bitset.h: filename -> file_name in local vars.
391 * lib/bitset_stats.c: Likewise.
392 * src/files.c: Likewise.
393 * src/scan-skel.l ("@output ".*\n): Likewise.
394 * src/files.c (file_name_split): Renamed from filename_split.
395 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
396
397 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
398
399 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
400 to accommodate latest gnulib.
401
402 * tests/glr-regression.at (Duplicate representation of merged trees):
403 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
404
405 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
406 needed.
407
408 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
409
410 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
411 All uses changed. Invoke user destructor after an error during a
412 split parse (trivial change from Joel E. Denny).
413
414 * tests/glr-regression.at
415 (User destructor after an error during a split parse): New test case.
416 Problem reported by Joel E. Denny in:
417 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
418
419 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
420
421 * README-cvs: Give URLs for recommended tools.
422 Mention Gzip version problem, and bootstrapping issues.
423 Remove troubleshooting section, as it's somewhat obsolete.
424
425 * bootstrap (no_cache): New var, to accommodate different wget
426 variants. Use it instead of '-C off'. Problem reported by
427 twlevo@xs4all.nl.
428
429 * data/glr.c (yydestroyStackItem): New function.
430 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
431 debugging information. Problem reported by Joel E. Denny.
432
433 2005-08-25 Akim Demaille <akim@epita.fr>
434
435 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
436
437 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
438
439 * data/glr.c (yyrecoverSyntaxError, yyreturn):
440 Don't invoke destructor on unresolved entries.
441 * tests/glr-regression.at
442 (User destructor for unresolved GLR semantic value): New test case.
443 Problem reported by Joel E. Denny in:
444 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
445
446 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
447
448 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
449 Add strnlen.c.
450 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
451 lib-prefix.m4, po.m4.
452
453 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
454 in yydestruct diagnostic, since it might not be an error.
455 Problem reported by Joel Denny near end of
456 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
457 * data/lalr1.cc (yyerturn): Likewise.
458 * data/yacc.c (yyreturn): Likewise.
459 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
460
461 * src/files.c: Remove obsolete FIXME comment.
462
463 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
464 with the other templates, and to fix bogus run-on messages such
465 as the one reported at the end of
466 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
467 All callers changed to avoid the newline.
468 (yyprocessOneStack): Output two lines rather than one, to accommodate
469 the above change. This changes the debug output format slightly.
470
471 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
472 reported by Joel E. Denny in
473 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
474 (trivial change).
475 * tests/glr-regression.at (Duplicate representation of merged trees):
476 New test, from Joel E. Denny in:
477 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
478 * THANKS: Add Joel E. Denny.
479
480 * configure.ac (AC_INIT): Bump to 2.0c.
481
482 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
483
484 * NEWS: Version 2.0b.
485
486 * Makefile.am (SUBDIRS): Put examples before tests, so that
487 "make check" doesn't finish with "All 1 tests passed".
488
489 * tests/regression.at (Token definitions): Don't rely on
490 AT_PARSER_CHECK for data that contains backslashes. It currently
491 uses 'echo', and 'echo' isn't portable if its argument contains
492 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
493 that the byte '\0xff' is not printable in the C locale; it is,
494 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
495 not printable, so use '\0x81' to test.
496
497 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
498 version of GCC, since the macro is used with non-GCC compilers.
499
500 Fix core dump reported by Pablo De Napoli in
501 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
502 * tests/regression.at (Invalid inputs with {}): New test.
503 * src/parse-gram.y (token_name): Translate type before using
504 it as an index.
505
506 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
507 the user's name space. All uses changed to __attribute__
508 ((__unused__)).
509 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
510 Add __attribute__ ((__noreturn__)).
511
512 * etc/clcommit: Remove. We weren't using it, and it failed
513 "make maintainer-distcheck".
514 * Makefile.maint: Merge from coreutils.
515 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
516 (syntax-check-rules): Change list of rules as described below.
517 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
518 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
519 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
520 (sc_trailing_space): New rules.
521 (sc_xalloc_h_in_src): Remove.
522 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
523 (sc_space_tab, sc_error_exit_success, sc_changelog):
524 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
525 (makefile-check, po-check, author_mark_check):
526 (makefile_path_separator_check, copyright-check):
527 Use grep -n, to make it easier to find violations.
528 Use CVS_LIST and CVS_LIST_EXCEPT.
529 (header_regexp, h_re): Remove.
530 (dd_c): New macro.
531 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
532 (my-distcheck): Use more-modern GCC flags.
533 (signatures, %.asc): Remove.
534 (rel-files, announcement): Remove signatures.
535 Restore old updating code, even though we don't use it, so
536 that we're the same as coreutils.
537 (alpha, beta, major): Depend on news-date-check.
538 Make the upload commands.
539
540 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
541 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
542 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
543 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
544 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
545 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
546 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
547 * tests/sets.at: Likewise.
548
549 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
550 we comment out the Autoconf version number.
551 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
552 it's error-prone and "make maintainer-distcheck" rejects it.
553
554 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
555 Indent calls to "error" to pacify "make maintainer-distcheck",
556 when the calls are not intended to be translated.
557 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
558
559 * src/Makefile.am (DEFS): Use +=, to pacify
560 "make maintainer-distcheck".
561 (bison_SOURCES): Add scan-skel.h.
562 (sc_tight_scope): New rule, from coreutils.
563
564 * src/files.c (src_extension, header_extension):
565 Now static, not extern.
566 * src/getargs.c (short_options): Likewise.
567 * src/muscle_tab.c (muscle_table): Likewise.
568 * src/parse-gram.y (current_class, current_type, current_prec):
569 Likewise.
570 * src/reader.c (grammar_end, previous_rule_end): Likewise.
571 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
572 * src/main.c (main): Cast bindtextdomain and textdomain calls to
573 void, to avoid warning when NLS is disabled.
574 * src/output.c: Include scan-skel.h.
575 (scan_skel): Remove decl, since scan-skel.h does this.
576 (output_skeleton):
577 Indent calls to "error" to pacify "make maintainer-distcheck".
578 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
579 * src/reader.h (gram_end, gram_lineno): New decls to pacify
580 "make maintainer-distcheck".
581 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
582 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
583 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
584 (skel_lex_destroy, scan_skel): Move these decls to...
585 * src/scan-skel.h: New file.
586 * src/uniqstr.c (uniqstr_assert):
587 Indent calls to "error" to pacify "make maintainer-distcheck".
588
589 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
590 not @VAR@.
591
592 * tests/torture.at: Revamp to avoid misuse of atoi that
593 "make maintainer-distcheck" complained about.
594
595 * examples/extexi (message): Don't print a message more than once,
596 and omit line-number decoration that makes Emacs compile think
597 that informative messages are worth worrying about.
598
599 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
600
601 * configure.ac: Update version number.
602
603 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
604 accidentally.
605 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
606 autogenerated by the maintainer.
607 * examples/calc++/.cvsignore: Add *.yy.
608
609 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
610 * lib/bitset_stats.c (bitset_stats_init): Likewise.
611 * lib/bitsetv.c (bitsetv_alloc): Likewise.
612
613 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
614
615 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
616 from maintainer-distcheck about casting the argument of 'free'.
617
618 * NEWS: Mention recent yytname changes.
619 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
620
621 * bootstrap: For translations that have not yet been upgraded to
622 the new runtime-po domain, prime the pump by extracting the
623 relevant strings from the obsolete translations. This code can be
624 removed once the bison-runtime domain has been translated by each
625 team.
626
627 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
628 now that token names are already quoted.
629
630 Fix problem reported by Anthony Heading.
631 * data/glr.c (YYTOKEN_TABLE): New macro.
632 (yytname): Define if YYTOKEN_TABLE.
633 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
634 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
635 (YYERROR_VERBOSE): Define the same way the other skeletons do.
636 * src/output.c (prepare_symbols): Output token_table_flag.
637
638 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
639
640 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
641 again if the first call fails.
642
643 * data/glr.c (yytnamerr): New function.
644 (yyreportSyntaxError): Use it to dequote most string literals.
645 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
646 with other skeletons. All uses changed.
647 (yytnameerr_): New function.
648 (yyreport_syntax_error): Use it to dequote most string literals.
649 * data/yacc.c (yytnamerr): New function.
650 (yyerrlab): Use it to decode most string literals.
651 * doc/bison.texinfo (Decl Summary, Calling Convention):
652 Clarify quoting convention of yytname.
653 * src/output.c (prepare_symbols): Quote all names. This undoes
654 the 2005-04-17 change, which is now accomplished (mostly) via
655 changes in the parsers as described above.
656 * tests/regression.at (Token definitions, Web2c Actions):
657 Undo most 2005-04-17 change here, too.
658
659 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
660
661 Fix more problems reported by twlevo@xs4all.nl.
662 * tests/cxx-type.at: Don't pipe output of ./types through sed to
663 remove trailing spaces. This loses the exit status of ./types,
664 and isn't needed since ./types shouldn't be emitting trailing
665 spaces.
666 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
667 as the stack isn't valid in that case.
668
669 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
670 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
671 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
672 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
673 is used.
674 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
675 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
676 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
677 Likewise.
678
679 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
680 overly-picky compilers that reject 'char *foo = "bar";'.
681
682 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
683 to FILE * parameter, not to stderr. This fixes a typo introduced
684 in the 2005-07-12 change.
685
686 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
687 warnings from GCC 4.
688
689 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
690 (yyglrShiftDefer, yysplitStack):
691 Remove unused parameters b4_pure_formals. All uses changed.
692 (yyglrShift): Remove unused parameters b4_user_formals.
693 All uses changed.
694 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
695
696 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
697
698 Destructor cleanups and regularization among the three skeletons.
699 * NEWS: Document the behavior changes.
700 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
701 stack before failing, as the cleanup code will do it for us now.
702 * data/lalr1.cc (yyerrlab): Likewise.
703 * data/glr.c (yyparse): Pop everything off the stack before
704 freeing it, so that destructors get called properly.
705 * data/lalr1.cc (yyreturn): Likewise.
706 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
707 This is more consistent.
708 * doc/bison.texinfo (Destructor Decl): Mention more reasons
709 why destructors might be called. 1.875 -> 2.1.
710 (Destructor Decl, Decl Summary, Table of Symbols):
711 Some English-language cleanups for %destructor.
712 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
713 Add output line for destructor of start symbol.
714 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
715 because of that same extra output line.
716
717 * NEWS: Document minor wording changes in diagnostics of
718 Bison-generated parsers.
719 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
720 Remove unused formals. All uses changed.
721 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
722 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
723 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
724 Rename yyoverflowab to yyexhaustedlab.
725 When memory exhaustion occurs during syntax-error reporting,
726 report it separately rather than in a single diagnostic; this
727 eases translation.
728 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
729 (Memory Exhausted): Renamed from Parser Stack Overflow.
730 Revamp wording slightly to prefer "memory exhaustion".
731 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
732
733 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
734
735 Add i18n support to the GLR skeleton. Partially fix the C++
736 skeleton; a C++ expert needs to finish this. Remove debugging
737 msgids; there's little point to having them translated, since they
738 can be understood only by someone who can read the
739 (English-language) source code.
740
741 Generate runtime-po/bison-runtime.pot automatically, so that we
742 don't have to worry about garbage getting in that file. We'll
743 make sure after the next official release that old msgids don't
744 get lost. See
745 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
746
747 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
748 Now auto-generated.
749 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
750 Fix typos in explanations of the runtime file.
751 * bootstrap: Change gettext keyword from YYI18N to YY_.
752 Use standard Makefile.in.in in runtime-po, since we'll arrange
753 for backward-compatible bison-runtime.po files in a different way.
754 * data/glr.c (YY_): New macro, from yacc.c.
755 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
756 Translate messages intended for users.
757 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
758 the wording in the other skeletons. We don't know that the memory
759 is virtual.
760 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
761 Use same method that yacc.c uses.
762 Don't translate debugging messages.
763 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
764 it doesn't work (yet), and requires C++ expertise to fix.
765 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
766 Move defn to a more logical place, to be consistent with other
767 skeletons.
768 Don't translate debugging messages.
769 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
770 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
771 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
772 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
773
774 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
775 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
776 void, not int.
777 * tests/glr-regression.at (Badly Collapsed GLR States):
778 Likewise.
779 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
780 yylex should return 0 at EOF rather than aborting.
781
782 Improve tests for stack overflow in GLR parser.
783 Problem reported by twlevo@xs4all.nl.
784 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
785 All uses removed.
786 (yyStackOverflow): Just longjmp, but with value 2 so that caller
787 can handle the problem.
788 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
789 (yyparse): New local variable yyresult to record the result.
790 Use result of setjmp to set it, rather than storing itinto
791 struct.
792 (yyDone): Remove label.
793 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
794 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
795 if YYABORT is used).
796 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
797 yyparse status; put status > 1 into diagnostic.
798 Check that status==2 works.
799 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
800 Use exit status 3 for failure to open (which shouldn't happen).
801
802 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
803
804 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
805 1 on syntax error; just let yyparse do its thing.
806 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
807 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
808 (Exploding the Stack Size with Alloca):
809 (Exploding the Stack Size with Malloc):
810 Expect exit status 2, not 1, since the parser is supposed to blow
811 its stack. Problem reported by twlevo@xs4all.nl.
812
813 * data/glr.c (yyparse): Don't assume that the initial calls
814 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
815 Print a stack-overflow message and fail instead.
816 Initialize the line-number information before creating the stack,
817 so that the stack-overflow message can report line zero safely.
818
819 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
820
821 Fix problems reported by twlevo@xs4all.nl.
822 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
823 (yyuserMerge): Provide a default case if b4_mergers is empty.
824 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
825 * tests/glr-regression.at
826 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
827 Add casts to pacify C++ compilers.
828 * tests/glr-regression.at (Improper merging of GLR delayed action
829 sets): Declare yylex before using it.
830 * tests/Makefile.am (maintainer-check-g++): Fix a stray
831 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
832 test for valgrind; valgrind is independent of g++.
833 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
834 for compatibility with POSIX 1003.1-2001 (if running coreutils).
835 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
836 Use a destructor, so that we can expand the stack. Change
837 YYSTYPE to char * so that we can free it. Cast result of malloc.
838
839 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
840
841 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
842 a valgrind failure. Problem reported by twlevo@xs4all.nl.
843
844 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
845
846 * PACKAGING: New file, suggested by Bruno Haible and taken from
847 similar wording in gettext's PACKAGING file.
848 * NEWS: Mention PACKAGING.
849 * Makefile.am (EXTRA_DIST): Add PACKAGING.
850
851 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
852
853 * NEWS: Document recent i18n improvements.
854 * bootstrap: Get runtime translations into runtime-po.
855 Create runtime-po files automatically, if possible.
856 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
857 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
858 does not infringe on the user's name space.
859 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
860 * doc/bison.texinfo (Internationalization): Revamp the English
861 and Texinfo syntax a bit, to try to make it clearer.
862 (Bison Options, Option Cross Key): Mention --print-localedir.
863 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
864 YYENABLE_NLS. Quote a bit more.
865 * runtime-po/.cvsignore: New file.
866 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
867 * runtime-po/Rules-quot: Remove; now created by bootstrap.
868 * runtime-po/quot.sed: Likewise.
869 * runtime-po/boldquot.sed: Likewise.
870 * runtime-po/en@quot.header: Likewise.
871 * runtime-po/en@boldquot.header: Likewise.
872 * runtime-po/insert-header.sin: Likewise.
873 * runtime-po/remove-potcdate.sin: Likewise.
874 * runtime-po/Makevars: Likewise.
875 * runtime-po/LINGUAS: Likewise.
876 * runtime-po/de.po: Likewise; we will rely on the translation project
877 to maintain this, so "bootstrap" should get it.
878 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
879 its value.
880 * src/main.c (main): Bind the bison-runtime domain, too.
881
882 2005-07-12 Bruno Haible <bruno@clisp.org>
883
884 * data/yacc.c: Include <libintl.h> when NLS is enabled.
885 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
886 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
887 * runtime-po: New directory.
888 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
889 $(DOMAIN).pot-update rule, so that old messages are never dropped.
890 * runtime-po/Rules-quot: New file, copied from po/.
891 * runtime-po/quot.sed: Likewise.
892 * runtime-po/boldquot.sed: Likewise.
893 * runtime-po/en@quot.header: Likewise.
894 * runtime-po/en@boldquot.header: Likewise.
895 * runtime-po/insert-header.sin: Likewise.
896 * runtime-po/remove-potcdate.sin: Likewise.
897 * runtime-po/Makevars: New file.
898 * runtime-po/POTFILES.in: New file.
899 * runtime-po/LINGUAS: New file.
900 * runtime-po/bison-runtime.pot: New file.
901 * runtime-po/de.po: New file.
902 * m4/bison.m4: New file.
903 * Makefile.am (SUBDIRS): Add runtime-po.
904 (aclocaldir, aclocal_DATA): New variables.
905 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
906 Define aclocaldir.
907 * src/getargs.c (usage): Document --print-localedir option.
908 (PRINT_LOCALEDIR_OPTION): New enum item.
909 (long_options): Add --print-localedir option.
910 (getargs): Handle --print-localedir option.
911 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
912 (Internationalization): New section.
913
914 2005-07-12 Akim Demaille <akim@epita.fr>
915
916 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
917 for consistency with the rest of the code.
918 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
919 Add separators.
920
921 2005-07-12 Akim Demaille <akim@epita.fr>
922
923 * src/parse-gram.y: Use %printer instead of YYPRINT.
924
925 2005-07-12 Akim Demaille <akim@epita.fr>
926
927 * src/symtab.h, src/symtab.c (symbol_print): New.
928 * src/symlist.h, src/symlist.c (symbol_list_print): New.
929 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
930
931 2005-07-12 Akim Demaille <akim@epita.fr>
932
933 * data/glr.c (b4_syncline): Fix (swap) the definitions of
934 b4_at_dollar and b4_dollar_dollar.
935
936 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
937
938 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
939 and Pennello's paper.
940
941 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
942
943 * data/yacc.c (yyparse): Undo previous patch. Instead,
944 set yylsp[0] and yyvsp[0] only if the initial action
945 sets yylloc and yylval, respectively.
946
947 * data/yacc.c (yyparse): In the initial action, set
948 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
949 This avoids the use of undefined variables if the initial
950 action does not set yylloc and/or yylval.
951
952 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
953
954 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
955 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
956 Remove from CVS. These files are automatically generated.
957 * examples/extexi: Clarify that this file is now part of Bison,
958 not GNU M4, and that it works with any POSIX-compatible Awk.
959 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
960 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
961 so that we also get calc++-parser.yy. Geneate it.
962 Use $(AWK), not gawk, since any conforming Awk will do.
963 Put comment before action, since older 'make' can't handle comment
964 in action.
965 $(BUILT_SOURCES): List all built sources, not just some of them.
966 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
967 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
968 $($(calc_sources_generated)): Remove unnecessary test for existence
969 of target. (This had a shell syntax error anyway; a stray "x".)
970 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
971 calc++-parser.yy.
972 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
973
974 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
975 implied by the other modules.
976
977 2005-07-06 Akim Demaille <akim@epita.fr>
978
979 Bind examples/calc++ to the package.
980 * examples/calc++/Makefile: Remove, replaced by...
981 * examples/calc++/Makefile.am: ... this new file.
982 * examples/calc++/test: Remove input.
983 * examples/calc++/compile: Remove.
984 * examples/Makefile.am: New.
985 * configure.ac, Makefile.am: Adjust.
986 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
987
988 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
989
990 * data/glr.c (yyFail): Drastically simplify; since the format argument
991 never had any % directives, we can simply pass it to yyerror.
992 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
993 be modified later, as that is the usual style in glr.c.
994 Problems reported by Paul Hilfinger.
995
996 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
997 and size overflow errors.
998 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
999 in case the user prolog sets feature-test macros like _GNU_SOURCE.
1000 (YYSIZEMAX): New macro.
1001 (yystpcpy): New function, taken from yacc.c.
1002 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
1003 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
1004 so that we don't have to maintain their signatures.
1005 (yyFail): Check for buffer overflow, by using vsnprintf rather
1006 than vsprintf. Allocate a bigger buffer if possible.
1007 Report an error if buffer allocation fails.
1008 (yyStackOverflow): New function.
1009 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
1010 the initialization was successful. It might fail if storage was
1011 exhausted.
1012 (yyexpandGLRStack): Add more checks for storage allocation failure.
1013 Use yyStackOverflow to report failures.
1014 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
1015 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
1016 Don't assume stack number fits in int.
1017 (yysplitStack): Check for storage allocation failure.
1018 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
1019 can print diagnostics on storage allocation failure. All callers
1020 changed.
1021 (yyresolveValue): Use yybool for boolean.
1022 (yyreportSyntaxError): Check for size-calculation overflow.
1023 This code is taken from yacc.c.
1024 (yyparse): Check for storage allocation errors when allocating
1025 the initial stack.
1026
1027 2005-07-05 Akim Demaille <akim@epita.fr>
1028
1029 Extract calc++ from the documentation.
1030 * doc/bison.texinfo (Calc++): Add the extraction marks.
1031 * examples/extexi: New, from the aborted GNU Programming 2E.
1032 Separate the different paragraph of a file with empty lines.
1033 * examples/Makefile: Use it to extract the whole calc++ example.
1034
1035 2005-06-24 Akim Demaille <akim@epita.fr>
1036
1037 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
1038 class typedefs.
1039
1040 2005-06-22 Akim Demaille <akim@epita.fr>
1041
1042 * doc/bison.texinfo (C++ Language Interface): First stab.
1043 (C++ Parsers): Remove.
1044
1045 2005-06-22 Akim Demaille <akim@epita.fr>
1046
1047 * data/lalr1.cc (yylex_): Honor %lex-param.
1048
1049 2005-06-22 Akim Demaille <akim@epita.fr>
1050
1051 Start a set of simple examples.
1052 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
1053 * examples/calc++/calc++-driver.hh,
1054 * examples/calc++/calc++-parser.yy,
1055 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
1056 * examples/calc++/compile, examples/calc++/test: New.
1057
1058 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
1059
1060 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
1061 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
1062 which stems from the 2005-05-27 patch.
1063
1064 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
1065
1066 * data/glr.c: Modify treatment of unused parameters to permit use
1067 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
1068
1069 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
1070
1071 Fix infringement on user name space reported by Janos Zoltan Szabo.
1072 * data/yacc.c (yyparse): strlen -> yystrlen.
1073
1074 2005-05-30 Akim Demaille <akim@epita.fr>
1075
1076 * data/lalr1.cc (_): New.
1077 Translate the various messages.
1078
1079 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
1080
1081 Fix infringement on user name space reported by Bruno Haible.
1082 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
1083 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
1084 the user's name space.
1085 (alloca): Include <stdlib.h> to get it, if it's not built in.
1086 (YYMALLOC, YYFREE): Define only if needed.
1087 (malloc, free): Declare, but only if needed, as this infringes on
1088 the user name space.
1089
1090 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
1091
1092 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
1093 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
1094 with %d format.
1095 * lib/ebitset.c (min, max): Undef before defining.
1096 * lib/vbitset.c (min, max): Likewise.
1097 * lib/subpipe.c (create_subpipe): Save local variables in case
1098 vfork clobbers them.
1099
1100 2005-05-24 Bruno Haible <bruno@clisp.org>
1101
1102 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
1103 error message syntax used by gcc-4.0.
1104
1105 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
1106
1107 * README: Mention m4 1.4.3. Remove obsolete advice about
1108 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
1109
1110 * bootstrap: Remove workaround for problem I encountered with
1111 gettext 0.14.1; it seems to be fixed now.
1112
1113 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
1114
1115 * NEWS: Version 2.0a.
1116
1117 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
1118 the previous change.
1119
1120 Various maintainer cleanups.
1121 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
1122 conftest*, for benefit of CVS commands run at the same time as
1123 "configure". Add build-aux, since "bootstrap" now creates it and
1124 its subfiles.
1125 * Makefile.cfg (move_if_change): Remove.
1126 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
1127 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
1128 (po_repo, do-po-update, po-update, wget_files, get-targets):
1129 (config.guess-url_prefix, config.sub-url_prefix):
1130 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
1131 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
1132 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
1133 Remove.
1134 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
1135 this is now the recommended name.
1136 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
1137 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
1138 ylwrap. These files now go into build-aux.
1139 * config/move-if-change: Remove.
1140 * config/prev-version.txt: Bump from 1.75 to 2.0.
1141
1142 * bootstrap: Add stdio-safer, unistd-safer modules.
1143 Remove m4/glibc2.m4 (introduced by latest gnulib, but
1144 we don't need it).
1145 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
1146 fopen-safer.c, stdio-safer.h, unistd-safer.h.
1147 * lib/subpipe.c: Include "unistd-safer.h".
1148 (create_subpipe): Make sure all the newly-created
1149 file descriptors are > 2, so that diagnostics don't
1150 get sent down them (which might cause Bison to hang, in theory).
1151 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
1152 * src/files.c (xfopen): Use fopen_safer, not fopen.
1153
1154 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
1155 yesterday's yacc.c fix.
1156
1157 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
1158
1159 * data/glr.c, data/lalr1.cc: Update copyright date.
1160
1161 Fix a destructor bug reported by Wolfgang Spraul in
1162 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
1163 * data/yacc.c (yyabortlab): Don't call destructor, and
1164 don't set yychar to EMPTY.
1165 (yyoverflowlab): Don't call destructor.
1166 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
1167 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
1168 since we no longer output the message "discarding lookahead token
1169 end of input ()".
1170
1171 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
1172
1173 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
1174 fix a small glitch in debugging output.
1175 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
1176 after YY_SYMBOL_PRINT where needed.
1177
1178 (struct yyGLRState): Add some comments.
1179 (struct yySemanticOption): Add some comments.
1180 (union yyGLRStackItem): Add comment.
1181
1182 (yymergeOptionSets): Correct this to properly perform the union,
1183 avoiding infinite reported by Michael Rosien.
1184 Update comment.
1185
1186 * tests/glr-regression.at: Add test for GLR merging error reported
1187 by M. Rosien.
1188
1189 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
1190
1191 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
1192 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
1193 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
1194 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
1195 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
1196 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
1197 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
1198 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
1199 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
1200 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
1201 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
1202 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
1203 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
1204 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
1205 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
1206 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
1207 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
1208 src/derives.h, src/files.c, src/files.h, src/getargs.c,
1209 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
1210 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
1211 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
1212 src/output.h, src/parse-gram.c, src/parse-gram.h,
1213 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
1214 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
1215 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
1216 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
1217 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
1218 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
1219 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
1220 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
1221 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
1222 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
1223 tests/reduce.at, tests/regression.at, tests/sets.at,
1224 tests/synclines.at, tests/testsuite.at, tests/torture.at:
1225 Update FSF postal mail address.
1226
1227 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
1228
1229 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
1230 Problem reported by Ralf Menzel.
1231
1232 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
1233
1234 * tests/actions.at: Test that stack overflow invokes destructors.
1235 From Marcus Holland-Moritz.
1236 * data/yacc.c (yyerrlab): Move the code that destroys the stack
1237 from here....
1238 (yyreturn): to here. That way, destructors are called properly
1239 even if the stack overflows, or the user calls YYACCEPT or
1240 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
1241 (yyoverflowlab): Destroy the lookahead.
1242
1243 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
1244
1245 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
1246
1247 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
1248
1249 * NEWS: Bison-generated C parsers no longer quote literal strings
1250 associated with tokens.
1251 * src/output.c (prepare_symbols): Don't escape strings,
1252 since users don't want to see C escapes.
1253 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
1254 in diagnostics.
1255 * tests/input.at (Torturing the Scanner): Likewise.
1256 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
1257
1258 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
1259
1260 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
1261 the data size is known to be too small and we can't increase it.
1262 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
1263
1264 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
1265
1266 * src/parse-gram.y: Include quotearg.h.
1267 (string_as_id): Quote $1 before using it as a key, since the
1268 lexer no longer quotes it for us.
1269 (string_content): Don't strip quotes, since lexer no longer
1270 quotes it for us.
1271 * src/scan-gram.l: Include quotearg.h.
1272 ("\""): Omit quote.
1273 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
1274 a key, since the rest of the lexer doesn't quote it.
1275 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
1276 * tests/regression.at (Token definitions): Check for backslashes
1277 in token strings.
1278
1279 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
1280 (YYSIZE_T): Define to unsigned long int when using an older compiler.
1281 (yyparse): Revamp code to generate long syntax error message, to
1282 make it easier to translate, and to avoid problems with arithmetic
1283 overflow. Change "virtual memory" to "memory" in diagnostic, since
1284 we don't know whether the memory is virtual.
1285
1286 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
1287
1288 * NEWS: Bison-generated C parsers now use the _ macro to
1289 translate strings.
1290 * data/yacc.c (_) [!defined _]: New macro.
1291 All English strings wrapped inside this macro.
1292 * doc/bison.texinfo (Bison Parser): Document _.
1293 * po/POTFILES.in: Include src/parse-gram.c, since it now
1294 includes translateable strings that parse-gram.y doesn't.
1295
1296 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
1297
1298 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
1299 reverting the 2004-10-11 change to this function.
1300 (symbol_check_alias_consistency): Don't call symbol_type_set
1301 if the type name is already correct.
1302 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
1303
1304 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
1305
1306 * tests/regression.at (Token definitions): Don't use a token named
1307 c, as that generates a "#define c ..." that runs afoul of buggy
1308 stdlib.h that uses the identifier c as a member of struct
1309 drand48_data. Problem reported by Horst Wente.
1310
1311 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
1312
1313 * bootstrap: Change translation URL from
1314 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
1315 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
1316 redirection glitches. Problem reported by twlevo@xs4all.nl.
1317
1318 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
1319
1320 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
1321 after operands; POSIX says this isn't portable for the c99 command.
1322
1323 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
1324
1325 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
1326 immediately if a data overrun has occurred; this may help us track
1327 down what may be a spurious failure on MacOS.
1328
1329 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
1330
1331 Respond to problems reported by twlevo@xs4all.nl.
1332
1333 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
1334
1335 * src/vcg.h: Comment fix.
1336 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
1337 (G_CMAX): Change to -1 instead of INT_MAX.
1338
1339 * data/yacc.c (yyparse): Omit spaces before #line.
1340
1341 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
1342
1343 * src/tables.c (state_number_to_vector_number): Put it inside an
1344 "#if 0", since it's not currently used. Problem reported by
1345 Roland McGrath.
1346
1347 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
1348
1349 * src/output.c (escaped_output): Renamed from
1350 escaped_file_name_output, since we now use it for symbol tags as
1351 well. All uses changed.
1352 (symbol_destructors_output, symbol_printers_output):
1353 Escape symbol tags too.
1354 Problem reported by Matyas Forstner in
1355 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
1356
1357 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
1358 not needed.
1359 * src/output.c (user_actions_output, token_definitions_output,
1360 symbol_destructors_output, symbol_printers_output): Likewise.
1361 * src/reader.c (prologue_augment): Likewise.
1362 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
1363
1364 * src/vcg.c (output_edge): Don't quote linestyle arg.
1365 Problem reported by twlevo@xs4all.nl.
1366
1367 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
1368
1369 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
1370 example, reported by Derek M Jones. Also, make the example even
1371 more outrageous, to better illustrate how bad the problem is.
1372
1373 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
1374
1375 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
1376 putsym. Typo reported by Sebastian Piping.
1377
1378 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
1379
1380 * doc/bison.texinfo (Language and Grammar): some -> same
1381 (Epilogue): int he -> in the
1382 Typos reported by Sebastian Piping via Justin Pence.
1383
1384 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
1385
1386 * tests/glr-regression.at (Improper handling of embedded actions
1387 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
1388 embedded actions and $-N in GLR parsers", work around an Autoconf bug
1389 with dollar signs in test names.
1390 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
1391 for a similar reason.
1392
1393 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
1394
1395 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
1396 wants to redefine G_VIEW.
1397
1398 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
1399
1400 * src/vcg.c (get_view_str): Remove case for normal_view.
1401 Problem reported by twlevo@xs4all.nl.
1402
1403 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
1404
1405 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
1406 Problem reported by twlevo@xs4all.nl.
1407
1408 * doc/bison.texinfo: Change @dircategory from "GNU programming
1409 tools" to "Software development". Requested by Richard Stallman
1410 via Karl Berry.
1411
1412 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
1413
1414 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
1415 Problem reported by twlevo@xs4all.nl.
1416
1417 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
1418
1419 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
1420 keyword; it's not needed with modern compilers, and it doesn't
1421 affect correctness with older compilers. Suggested by
1422 twlevo@xs4all.nl.
1423
1424 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
1425
1426 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
1427 gcc -Wswitch-default.
1428 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
1429 * data/yacc.c (yyparse): Likewise.
1430
1431 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
1432
1433 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
1434 already. Let config.h define any nonstandard values.
1435
1436 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
1437
1438 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
1439 for the benefit of slower hosts. Problem reported by
1440 Nelson H. F. Beebe.
1441
1442 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
1443
1444 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
1445 being defined and not used.
1446 * data/lalr1.cc (yyparse): Likewise.
1447 Use "if (false)" rather than "if (0)".
1448
1449 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
1450
1451 * TODO: Mention that we should allow NUL bytes in tokens.
1452
1453 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
1454
1455 * src/scan-skel.l (<<EOF>>): Don't close standard output.
1456 Problem reported by Hans Aberg.
1457
1458 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
1459
1460 * src/getargs.c (version): Happy new year; update overall
1461 program copyright date from 2004 to 2005.
1462
1463 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
1464 Problem reported by Hans Aberg.
1465 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
1466 (Output file names.): Add a test for the case when standard output
1467 is closed.
1468
1469 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
1470
1471 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
1472 to fix an oversight in the Bison 2.0 manual.
1473
1474 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
1475
1476 * NEWS: Version 2.0. Reformat the existing news items since
1477 1.875, so that related items are grouped together.
1478 * configure.ac (AC_INIT): Bump version to 2.0.
1479 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
1480
1481 * tests/torture.at (Exploding the Stack Size with Alloca): Set
1482 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
1483 otherwise, we're not testing alloca. Unfortunately there's no
1484 simple way to consult HAVE_ALLOCA here.
1485
1486 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
1487 for yymsg, too.
1488
1489 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
1490 hand. This avoids a warning about comparing int to size_t when
1491 GCC warnings are enabled.
1492
1493 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
1494
1495 * NEWS: Bison-generated parsers no longer default to using the
1496 alloca function (when available) to extend the parser stack, due
1497 to widespread problems in unchecked stack-overflow detection.
1498 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
1499 responsibility to set it to a positive value. This lets the user
1500 specify a value that is not a preprocessor constant.
1501 * data/yacc.c (YYMAXDEPTH): Likewise.
1502 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
1503 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
1504 to be a compile-time constant. However, explain the constraints on it.
1505 Also, explain the constraints on YYINITDEPTH.
1506 (Table of Symbols): Explain that alloca is no longer the default.
1507 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
1508 to 1.
1509
1510 * doc/bison.texinfo (Location Default Action): Mention that n must
1511 be zero when k is zero. Suggested by Frank Heckenbach.
1512
1513 2004-12-22 Akim Demaille <akim@epita.fr>
1514
1515 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
1516 (parser::state_type, parser::semantic_type, parser::location_type):
1517 Private, not public.
1518 (parser::parse): Return ints, not bool.
1519 Returning a bool introduces a problem: 0 corresponds to false, and
1520 it seems weird to return false on success. Returning true changes
1521 the conventions for yyparse.
1522 Alternatively we could return void and send an exception.
1523 There is no clear consensus (yet?).
1524 (state_stack, semantic_stack, location_stack): Rename as...
1525 (state_stack_type, semantic_stack_type, location_stack_type): these.
1526 Private, not public.
1527 * tests/c++.at: New.
1528 * tests/testsuite.at, tests/Makefile.am: Adjust.
1529
1530 2004-12-21 Akim Demaille <akim@epita.fr>
1531
1532 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
1533
1534 2004-12-21 Akim Demaille <akim@epita.fr>
1535
1536 Don't impose std::string for filenames.
1537
1538 * data/lalr1.cc (b4_filename_type): New.
1539 (position::filename): Use it.
1540 (parser.hh): Move the inclusion of stack.hh and location.hh below
1541 the user code, so that needed headers for the filename type can be
1542 included first.
1543 Forward declare them before the user code.
1544 * tests/Makefile.am (check-local, installcheck-local): Pass
1545 TESTSUITEFLAGS to the TESTSUITE.
1546
1547 2004-12-20 Akim Demaille <akim@epita.fr>
1548
1549 Use more STL like names: my_class instead of MyClass.
1550
1551 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
1552 (SemanticStack, SemanticType, StateStack, StateType)
1553 (TokenNumberType, Stack, Slice, Traits, Parser::location)
1554 (Parser::value): Rename as...
1555 (location_stack, location_type, rhs_number_type, semantic_stack)
1556 (semantic_type, state_stack, state_type, token_number_type, stack)
1557 (slice, traits, parser::yylloc, parser::yylval): these.
1558
1559 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
1560
1561 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
1562
1563 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
1564 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
1565
1566 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
1567
1568 Remove uses of 'short int' and 'unsigned short int'. This raises
1569 some arbitrary limits. It uses more memory but nowadays that's
1570 not much of an issue.
1571
1572 This change does not affect the generated parsers; that's a different
1573 task, as some users will want to conserve memory there.
1574
1575 Ideally we should use size_t to represent all object counts, and
1576 something like ptrdiff_t to represent signed differences of object
1577 counts; but that will require more code-cleanup than I have the
1578 time to do right now.
1579
1580 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
1581 Use size_t, not int or short int, to count objects.
1582 * src/closure.c (nritemset, closure): Likewise.
1583 * src/closure.h (nritemset, closure): Likewise.
1584 * src/nullable.c (nullable_compute): Likewise.
1585 * src/print.c (print_core): Likewise.
1586 * src/print_graph.c (print_core): Likewise.
1587 * src/state.c (state_compare, state_hash): Likewise.
1588 * src/state.h (struct state): Likewise.
1589 * src/tables.c (default_goto, goto_actions): Likewise.
1590
1591 * src/gram.h (rule_number, rule): Use int, not short int.
1592 * src/output.c (prepare_rules): Likewise.
1593 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
1594 errs, reductions): Likewise.
1595 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
1596 Likewise.
1597 * src/tables.c (vector_number, tally, action_number,
1598 ACTION_NUMBER_MINIMUM): Likewise.
1599 * src/output.c (muscle_insert_short_int_table): Remove.
1600
1601 2004-12-17 Akim Demaille <akim@epita.fr>
1602
1603 * data/lalr1.cc: Extensive Doxygenation.
1604 (error_): Rename as...
1605 (error): this, since it is visible to the user.
1606 Adjust callers.
1607 (Parser::message): Now an automatic variable from...
1608 (Parser::yyreport_syntax_error_): here.
1609 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
1610 Parser::error.
1611 * tests/input.at: Escape $.
1612
1613 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
1614
1615 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
1616 Parenthesize rhs to avoid obscure problems with mistakes like
1617 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
1618 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
1619 b4_rhs_location): Likewise.
1620 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
1621 b4_rhs_location): Likewise.
1622
1623 2004-12-16 Akim Demaille <akim@epita.fr>
1624
1625 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
1626 yacc.c: be sure to stay within yycheck_.
1627 * tests/actions.at: Re-enable C++ tests.
1628
1629 2004-12-16 Akim Demaille <akim@epita.fr>
1630
1631 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
1632 real.
1633
1634 2004-12-16 Akim Demaille <akim@epita.fr>
1635
1636 Use #define to handle the %name-prefix.
1637
1638 * data/glr.c, data/yacc.c: Comment changes.
1639 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
1640 so that one can refer to yylex in the parser file, and have it
1641 renamed, as is the case with other skeletons.
1642
1643 2004-12-16 Akim Demaille <akim@epita.fr>
1644
1645 Move lalr1.cc internals into yy*.
1646
1647 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
1648 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
1649 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
1650 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
1651 (empty_, final_, terror_, errcode_, ntokens_)
1652 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
1653 (looka_, ilooka_, error_range_, nerrs_):
1654 Rename as...
1655 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
1656 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
1657 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
1658 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
1659 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
1660 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
1661 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
1662 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
1663 these.
1664
1665 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
1666
1667 Fix some problems reported by twlevo at xs4all.
1668 * src/symtab.c (symbol_new): Report an error if the input grammar
1669 contains too many symbols. This is better than calling abort() later.
1670 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
1671 (struct node, struct graph):
1672 Rename member expand to stretch. All uses changed.
1673 (struct graph): Remove member layoutalgorithm. All uses removed.
1674 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
1675 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
1676 All uses changed.
1677 (N_STRETCH): Rename from N_EXPAND. All uses changed.
1678
1679 2004-12-15 Akim Demaille <akim@epita.fr>
1680
1681 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
1682 Add more Doxygen comments.
1683 (symprint_, stack_print_, reduce_print_, destruct_, pop)
1684 (report_syntax_error_, translate_): Rename as...
1685 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
1686 (yypop_, yyreport_syntax_error_, yytranslate_): this.
1687
1688 2004-12-15 Akim Demaille <akim@epita.fr>
1689
1690 * data/lalr1.cc (lex_): Rename as...
1691 (yylex_): this.
1692 Move the trace here.
1693 Take the %name-prefix into account.
1694 Reported by Alexandre Duret-Lutz.
1695
1696 2004-12-15 Akim Demaille <akim@epita.fr>
1697
1698 Simplify the C++ parser constructor.
1699
1700 * data/lalr1.cc (debug_): Rename as...
1701 (yydebug_): so that the parser's internals are always in the yy*
1702 pseudo namespace.
1703 Adjust uses.
1704 (b4_parse_param_decl): Remove the leading comma as it is now only
1705 called as unique argument list.
1706 (Parser::Parser): Remove the constructor accepting a location and
1707 an initial debugging level.
1708 Remove from the other ctor the argument for the debugging level.
1709 (debug_level_type, debug_level, set_debug_level): New.
1710
1711 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
1712 constructor calls.
1713
1714 2004-12-15 Akim Demaille <akim@epita.fr>
1715
1716 Remove b4_root related material: failure experiment
1717 (which goal was to allow to derive from a class).
1718
1719 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
1720 definitions and uses.
1721
1722 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
1723
1724 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
1725 not 2, since it's not portable to subtract 1 from the start of an
1726 array. The new item 0 is never set or used. All uses changed.
1727
1728 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
1729 the default definition of YYLLOC_DEFAULT. Problem reported
1730 by Frank Heckenbach.
1731
1732 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
1733
1734 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
1735 the normal case and one for the error case. Just use the
1736 first one uniformly. Problem reported by Frank Heckenbach.
1737 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
1738 use exactly the same macro in both places.
1739 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
1740 so that the normal-case YYRHSLOC works for the error case too.
1741 All uses changed.
1742 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
1743 (YYLLOC_DEFAULT): Use the same macro as glr.c.
1744 * doc/bison.texinfo (Location Default Action): Don't claim that
1745 we have an array of locations. Use the same macro for both glr
1746 and lalr parsers. Mention YYRHSLOC. Mention what happens when
1747 the index is 0.
1748
1749 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
1750
1751 * HACKING: Update email addresses to send announcements to.
1752
1753 * configure.ac (AC_INIT): Bump version to 1.875f.
1754
1755 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
1756
1757 * NEWS: Version 1.875e.
1758 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
1759
1760 * src/scan-skel.l: Include "complain.h", for "fatal".
1761
1762 * src/relation.h (relation_print, relation_digraph):
1763 Relation sizes are of type relation_node, not size_t (this is
1764 merely a doc fix, since the two types are equivalent).
1765 (relation_transpose): Relation sizes are of type relation_node,
1766 not int.
1767 * src/relation.c: Likewise.
1768 (top, infinity): Now of type relation_node, not int.
1769 (traverse, relation_transpose): Use relation_node, not int.
1770
1771 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
1772 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
1773 (yyparse): Remove unused local introduced in 2004-10-25 patch.
1774
1775 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
1776 specifying whether the test should be skipped. Use it tp
1777 specify that the [%defines %skeleton "lalr1.cc"] tests currently
1778 fail on some hosts, and should be skipped.
1779
1780 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
1781
1782 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
1783 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
1784 unless otherwise specified below.
1785
1786 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
1787 to allocate kernel_base, kernel_items, kernel_size, since
1788 they needn't be initialized to 0.
1789 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
1790 * src/closure.c (new_closure): Likewise, for itemset.
1791 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
1792 * src/lalr.c (set_goto_map): Likewise, for temp_map.
1793 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
1794 (build_relations): Likewise for edge, states1, includes.
1795 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
1796 * src/reader.c (packgram): Likewise, for ritem, rules.
1797 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
1798 * src/relation.c (relation_digraph): Likewise for VERTICES.
1799 (relation_transpose): Likewise for new_R, end_R.
1800 * src/symtab.c (symbols_token_translations_init): Likewise for
1801 token_translations.
1802 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
1803 (token_actions): Likewise for yydefact, actrow, conflrow,
1804 conflict_list.
1805 (save_column): Likewise for froms[symno], tos[symno].
1806 (goto_actions): Likewise for state_count.
1807 (pack_table): Likewise for base, pos, check.
1808 (tables_generate): Likewise for width.
1809
1810 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
1811 for initial core. Just have a separate core, so we needn't worry
1812 about whether kernel_size and kernel_base are initialized.
1813
1814 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
1815 kernel_size, kernel_items): Remove unnecessary initialization.
1816 * src/conflicts.c (conflicts): Likewise.
1817 * src/derives.c (derives): Likewise.
1818 * src/muscle_tablc (muscle_insert): Likewise.
1819 * src/relation.c (relation_digraph): Likewise.
1820 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
1821 conflrow, conflict_table, conflict_list, table, check):
1822 Likewise.
1823
1824 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
1825 This is because all callers pass unsigned int.
1826 * src/closure.h (new_closure): Likewise.
1827
1828 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
1829 (build_relations): Initialize includes[i] in all cases.
1830 * src/reader.c (packgram): Always initialize rules[ruleno].prec
1831 and rules[ruleno].precsym. Initialize members in order.
1832 * src/relation.c (relation_transpose): Always initialize new_R[i]
1833 and end_R[i].
1834 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
1835
1836 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
1837 conflict_list[0] was always 0, but now it isn't initialized.
1838
1839 * src/table.c (table_grow): When conflict_table grew, the grown
1840 area wasn't cleared. Fix this.
1841
1842 * lib/.cvsignore: Add strdup.c, strdup.h.
1843 * m4/.cvsignore: Add strdup.m4.
1844
1845 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
1846
1847 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
1848 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
1849 GOTO_NUMBER_MAXIMUM, since we occasionally compute
1850 ngotos + 1 without checking for overflow.
1851 (build_relations): Use END_NODE, not -1, to denote end of edges.
1852 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
1853 build_relations): Use goto_number, not int, for goto numbers.
1854 * src/tables.c (save_column, default_goto): Likewise.
1855
1856 2004-11-23 Akim Demaille <akim@epita.fr>
1857
1858 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
1859 of #defining from yystype.
1860 Don't typedef yystype, C++ does not need it.
1861 This lets it possible to forward declare it as union.
1862
1863 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
1864
1865 * bootstrap (gnulib_modules): Add extensions.
1866 Problem reported by Jim Meyering.
1867
1868 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
1869
1870 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
1871 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
1872 src/system.h, src/tables.c: XFREE -> free, to accommodate
1873 recent change to gnulib xalloc.h.
1874 Problem reported by Jim Meyering.
1875
1876 2004-11-17 Akim Demaille <akim@epita.fr>
1877
1878 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
1879
1880 2004-10-28 Akim Demaille <akim@epita.fr>,
1881 Alexandre Duret-Lutz <adl@gnu.org>
1882
1883 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
1884 changes.
1885 (YYCDEBUG): Adjust.
1886 Use it instead of cdebug_.
1887 (Parser::debug_stream, Parser::set_debug_stream): New.
1888 (Parser::symprint_): Define cdebug_ for temporary backward
1889 compatibility.
1890 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
1891 debug_stream ().
1892
1893 2004-11-17 Akim Demaille <akim@epita.fr>
1894
1895 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
1896 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
1897 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
1898 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
1899
1900 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
1901
1902 * data/glr.c (yyloc_default): Remove; not used.
1903 Problem reported by Frank Heckenbach.
1904
1905 2004-10-25 Akim Demaille <akim@epita.fr>
1906
1907 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
1908 Introduce another definition to address simple location arrays.
1909 (yyGLRStack): New member: yyerror_range.
1910 (yyrecoverSyntaxError, yyparse): Update it.
1911 (yyrecoverSyntaxError): Use it when shifting the error token to
1912 have an accurate range, equivalent to the one computed by both
1913 yacc.c and lalr1.cc.
1914 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
1915 that column numbers start at column 0, as per GNU Coding
1916 Standards, the others tests, and the doc.
1917 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
1918 Adjust to the above change (first column is 0).
1919 And adjust the location of the "<error>", now covering the whole
1920 line.
1921
1922 2004-10-22 Akim Demaille <akim@epita.fr>
1923 and Paul Eggert <eggert@cs.ucla.edu>
1924
1925 Remove some arbitrary limits on goto numbers and relations.
1926 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
1927 initial values, since they're never used.
1928 (set_goto_map): ngotos is now unsigned, so test for overflow
1929 by seeing whether it wraps around to zero.
1930 * src/lalr.h (goto_number): Now size_t, not short int.
1931 (GOTO_NUMBER_MAXIMUM): Remove.
1932 * src/relation.c (relation_print, traverse, relation_transpose):
1933 Check for END_NODE rather than looking at sign.
1934 * src/relation.h (END_NODE): New macro.
1935 (relation_node): Now size_t, not short int.
1936
1937 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
1938
1939 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
1940 keyword, not an identifier. Problem reported by Baron Schwartz in
1941 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
1942
1943 2004-10-11 Akim Demaille <akim@epita.fr>
1944
1945 * src/symtab.c (symbol_check_alias_consistency): Also check
1946 type names, destructors, and printers.
1947 Reported by Alexandre Duret-Lutz.
1948 Recode the handling of associativity and precedence in terms
1949 of symbol_precedence_set.
1950 Accept no redeclaration at all, not even equal to the previous
1951 value.
1952 (redeclaration): New.
1953 Use it to factor redeclaration complaints.
1954 (symbol_make_alias): Don't set the type of the alias, let
1955 symbol_check_alias_consistency do it as for other features.
1956 * src/symtab.h (symbol): Add new member prec_location, and
1957 type_location.
1958 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
1959 * tests/input.at (Incompatible Aliases): New.
1960
1961 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
1962
1963 .cvsignore fixes to accommodate gnulib changes,
1964 and the practice of naming build directories "_build".
1965 * .cvsignore: Add "_*". Sort.
1966 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
1967 * m4/.cvsignore: Add "*_gl.m4".
1968
1969 2004-10-06 Akim Demaille <akim@epita.fr>
1970
1971 * src/parse-gram.y (add_param): Fix the truncation of trailing
1972 spaces.
1973
1974 2004-10-05 Akim Demaille <akim@epita.fr>
1975
1976 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
1977 whether the reducion was empty or not. This leaves room to
1978 improve the use of YYLLOC_DEFAULT in such a case.
1979 lalr1.cc is still experimental, so changing this is acceptable.
1980 And finally, there are probably not many users who changed the
1981 handling of locations in GLR, so changing is admissible too.
1982
1983 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
1984 empty reduction, set @$ to an empty location ending the previously
1985 stacked symbol.
1986 Adjust uses to make sure the code is triggered on empty
1987 reductions.
1988 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
1989 expected output: empty reductions have empty locations.
1990
1991 2004-09-29 Akim Demaille <akim@epita.fr>
1992
1993 * data/lalr1.cc: Move towards a more standard C++ coding style
1994 for templates: Class < T > -> Class<T>.
1995
1996 2004-09-29 Akim Demaille <akim@epita.fr>
1997
1998 * data/lalr1.cc: Reinstall the former ctor, for sake of
1999 compatibility, but warn it will be removed.
2000 Move towards a more standard C++ coding style (i.e., type *var ->
2001 type* var).
2002
2003 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
2004
2005 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
2006 since it's less likely to work if NULs are involved in the future.
2007
2008 2004-09-27 Akim Demaille <akim@epita.fr>
2009
2010 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
2011
2012 2004-09-27 Akim Demaille <akim@epita.fr>
2013
2014 * data/lalr1.cc (b4_parse_param_decl_1): New.
2015 (b4_parse_param_decl): Use it to have different names between attribute
2016 and argument names.
2017 (b4_cc_constructor_call): Likewise.
2018
2019 2004-09-24 Akim Demaille <akim@epita.fr>
2020
2021 * src/parse-gram.y (add_param): Strip the leading and trailing
2022 blanks from a formal argument declaration.
2023 (YY_LOCATION_PRINT): New.
2024
2025 2004-09-24 Akim Demaille <akim@epita.fr>
2026
2027 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
2028 after the location.
2029
2030 2004-09-24 Akim Demaille <akim@epita.fr>
2031
2032 * doc/bison.texinfo (Table of Symbols): Sort.
2033
2034 2004-09-21 Akim Demaille <akim@epita.fr>
2035
2036 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
2037 the useless parentheses.
2038 Suggested by Paul Eggert.
2039
2040 2004-09-20 Akim Demaille <akim@epita.fr>
2041
2042 Let the initial-action act on the look-ahead, and use it for the
2043 "initial push" (corresponding to an hypothetical beginning-of-file).
2044 And let lalr1.cc honor %initial-action.
2045
2046 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
2047 example.
2048 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
2049 (Parser::Parser): Remove the ctor that used to initialize it.
2050 (Parser::parse): Like in the other skeletons, issue the "starting
2051 parse" message before any action.
2052 Honor %initial-action.
2053 Initialize the stacks with the lookahead.
2054 * data/yacc.c: Let $$ and @$ in %initial-action designate the
2055 look-ahead.
2056 Push them in the stacks.
2057 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
2058
2059 2004-09-20 Akim Demaille <akim@epita.fr>
2060
2061 * doc/bison.texinfo (Initial Action Decl): New.
2062
2063 2004-09-20 Akim Demaille <akim@epita.fr>
2064
2065 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
2066 clearer criterion to define it.
2067 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
2068 When reducing on an empty RHS, use the latest stacked location as
2069 location.
2070 yylloc is not always available.
2071 * data/glr.c: Likewise.
2072 Also, honor initial-actions.
2073
2074 2004-09-20 Akim Demaille <akim@epita.fr>
2075
2076 * data/yacc.c (YY_LOCATION_PRINT): New.
2077 Define when we know YYLTYPE's structure, i.e., when the default
2078 YYLLOC_DEFAULT is used.
2079 * data/c.m4 (b4_yysymprint_generate): Use it.
2080 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
2081 value of the result.
2082 (error_start_): Replace with...
2083 (error_range_): this location array.
2084 This allows to replace code relying on the implementation of
2085 locations by portable code.
2086 * data/yacc.c (yylerrsp): Replace with...
2087 (yyerror_range): this.
2088 Every time a token is popped, update yyerror_range[0], to have an
2089 accurate location for the error token.
2090 * data/glr.c (YY_LOCATION_PRINT): New.
2091 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
2092 deference a pointer.
2093 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
2094 report the location in %printers.
2095
2096 * src/scan-skel.l: Instead of abort, report error messages to ease
2097 understanding skeleton scanning failures.
2098
2099 2004-09-16 Akim Demaille <akim@epita.fr>
2100
2101 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
2102 (iterator, const_iterator): these, to be more in the C++ spirit.
2103 Also, return reverse iterators so that when displaying the stack
2104 we display its bottom first.
2105 (Parser::stack_print_, Parser::reduce_print_): Match the messages
2106 from yacc.c.
2107 We should probably use vector here though.
2108
2109 2004-09-16 Akim Demaille <akim@epita.fr>
2110
2111 Have more complete shift traces.
2112
2113 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
2114 to report Shifts instead of ad hoc YYDPRINTF invocations,
2115 including for the error token.
2116 * data/lalr1.cc (symprint_): Output the location.
2117 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
2118 output the location within the %printer.
2119 Activate GLR tests, at least to make sure they compile properly.
2120 They still don't pass though.
2121 * tests/calc.at: Adjust expect verbose output, since now "Entering
2122 state..." is on a different line than the "Shifting" message.
2123
2124 2004-09-08 Akim Demaille <akim@epita.fr>
2125
2126 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
2127 Bison directive from the Bison file to the invocation of this
2128 macro, so that these directives are passed to
2129 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
2130 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
2131 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
2132 the extra Bison directives instead of the whole series.
2133 Change the grammar so that there are recoverable errors, and
2134 unrecoverable errors. Now we can have the parser give up before
2135 consuming the whole input. As a result we now can observe that
2136 the lookahead is freed when needed.
2137 Change the parser source to parse argv[1] instead of a hard coded
2138 string.
2139 Simplify yylex, and give a value and location to EOF.
2140 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
2141 passed directives already coded in the file.
2142 Add some tests to check the location of "error".
2143 For some tests, the C++ parser is correct, and not yacc.c.
2144 For other tests, they provide different, but unsatisfying, values,
2145 so keep the C++ value so that at least one parser is "correct"
2146 according to the test suite.
2147 (Actions after errors): Remove, this is subsumed by the
2148 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
2149
2150 2004-09-06 Akim Demaille <akim@epita.fr>
2151
2152 * data/lalr1.cc: Adjust the indentation of the labels.
2153 (Parser::pop): New.
2154 Use it.
2155
2156 2004-09-06 Akim Demaille <akim@epita.fr>
2157
2158 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
2159 argument, an informative message.
2160 Call YY_SYMBOL_PRINT.
2161 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
2162 * data/lalr1.cc (destruct_): Likewise.
2163 In addition, no longer depend on b4_yysymprint_generate and
2164 b4_yydestruct_generate to generate these functions, do it "by
2165 hand".
2166
2167 2004-09-03 Akim Demaille <akim@epita.fr>
2168
2169 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
2170 invoked, yydestruct the lookahead.
2171 * tests/calc.at (Calculator $1): Update the expected lengths of
2172 traces: there is an added line for the discarded lookahead.
2173 * doc/bison.texinfo (Destructor Decl): Some rewording.
2174 Define "discarded" symbols.
2175
2176 2004-09-02 Akim Demaille <akim@epita.fr>
2177
2178 * data/lalr1.cc (translate_, destruct_): No reason to be static.
2179
2180 2004-09-02 Akim Demaille <akim@epita.fr>
2181
2182 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
2183 (YYDSYMPRINTF): Rename as...
2184 (YY_SYMBOL_PRINT): this.
2185 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
2186 two.
2187 Use it instead of direct symprint_ calls.
2188 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
2189 one.
2190
2191 2004-09-02 Akim Demaille <akim@epita.fr>
2192
2193 * data/lalr1.cc (b4_yysymprint_generate): New.
2194 (symprint_): New member function, defined when YYDEBUG.
2195 Use it consistently instead of token/nterm debugging output by
2196 hand.
2197 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
2198 %printer calls to use cdebug_ when using lalr1.cc.
2199
2200 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
2201
2202 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
2203 with #ifdef YYDEBUG.
2204
2205 2004-08-26 Akim Demaille <akim@epita.fr>
2206
2207 * doc/bison.texinfo (Implementing Loops): Rename as...
2208 (Implementing Gotos/Loops): this.
2209
2210 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
2211
2212 Adjust to latest gnulib.
2213 * bootstrap (gnulib_modules): Add xalloc-die.
2214 Set LC_ALL=C so that file names sort consistently.
2215 Prefer the gnulib copies of gettext.m4, glibc21.m4,
2216 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
2217 uintmax_t.m4, ulonglong.m4.
2218 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
2219 po.m4 since we are now using _gl.m4 instead.
2220
2221 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
2222
2223 * src/scan-action.l: Remove. Scanning of semantic actions is
2224 handled in scan-gram.l.
2225
2226 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
2227
2228 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
2229
2230 * src/location.h (struct): The file member is a uniqstr.
2231 (equal_boundaries): Use UNIQSTR_EQ for comparison.
2232
2233 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
2234
2235 Fix bug with non-%union parsers that have printers or destructors,
2236 which led to a Bison core dump. Reported by Peter Fales in
2237 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
2238
2239 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
2240 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
2241 not to our own type.
2242 * src/output.c (symbol_destructors_output, symbol_printers_output):
2243 Don't assume %union.
2244 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
2245 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
2246 UNION-FLAG. All callers changed.
2247 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
2248 Use type char, not unsigned int, when declaring an array of char;
2249 this lets us remove a cast.
2250 (Printers and Destructors): Add non-%union test cases.
2251
2252 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
2253
2254 * doc/bison.texinfo: Minor editorial changes, mostly to the new
2255 GLR writeups. E.g., avoid frenchspacing and the future tense,
2256 change "lookahead" to "look-ahead", and change "wrt" to "with
2257 respect to".
2258
2259 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
2260
2261 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
2262 New sections, split off from the GLR Parsers section. Put the new
2263 Simple GLR Parser near the start of the GLR section, for clarity.
2264 Rewrite connective text.
2265
2266 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
2267
2268 * doc/bison.texinfo (Simple GLR Parsers): New section.
2269
2270 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
2271
2272 * NEWS, TODO, doc/bison.texinfo:
2273 Use "look-ahead" instead of "lookahead", to be consistent.
2274 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
2275 while we're fixing "look-ahead".
2276 * src/conflicts.c (shift_set): Renamed from shiftset.
2277 (look_ahead_set): Renamed from lookaheadset.
2278 * src/print.c: Likewise.
2279 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
2280 name for "lookahead".
2281 (report_types, usage): Likewise.
2282 * src/getargs.h (report_look_ahead_tokens): Renamed from
2283 report_lookaheads.
2284 * src/lalr.c (compute_look_ahead_tokens): Renamed from
2285 compute_lookaheads.
2286 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
2287 (look_ahead_tokens_print): Renamed from lookaheads_print.
2288 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
2289 state_rule_lookaheads_print.
2290 * src/state.h: Likewise.
2291 (reductions.look_ahead_tokens): Renamed from lookaheads.
2292 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
2293 AT_DATA_LOOKAHEADS_GRAMMAR.
2294
2295 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
2296
2297 * README: Update location of patched M4 distribution.
2298
2299 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
2300
2301 Don't assume the C++ compiler takes the same arguments as the C compiler
2302 (trivial change).
2303 * configure.ac (O0CXXFLAGS): New var.
2304 * tests/atlocal.in (CXXFLAGS): Use it.
2305
2306 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
2307
2308 Fix some "make check" problems with C++ reported by
2309 Albert Chin-A-Young for Tru64 C++ in this thread:
2310 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
2311
2312 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
2313 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
2314 Output to a .cc file for C++, not to a .c file.
2315 * tests/calc.at (AT_CHECK_CALC): Likewise.
2316 * tests/regression.at (AT_CHECK_DANCER): Likewise.
2317 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
2318
2319 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
2320
2321 * tests/calc.at, tests/actions.at: Workaround for SGI
2322 C++ compiler. (trivial change)
2323
2324 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
2325
2326 Spent a few hours checking out which prerequisite versions the
2327 current sources actually require. I went all the way back to
2328 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
2329 a seemingly endless set of combinations of versions more recent
2330 than that. The bottom line is that the current sources require
2331 fairly recent versions of the build tools, and it'll be some work
2332 to change this.
2333 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
2334 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
2335 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
2336 Add comments explaining why those particular versions are
2337 currently needed.
2338
2339 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
2340 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
2341 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
2342
2343 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
2344 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
2345
2346 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
2347
2348 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
2349 0.11.5. Suggested by Bruno Haible.
2350 * bootstrap: Remove gettext version checking.
2351
2352 * doc/bison.texinfo (Decl Summary): Also mention that %union
2353 can depend on prerequisite types. Problem reported by Tim
2354 Van Holder.
2355
2356 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
2357
2358 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
2359 * README-alpha: Don't tell people not to package this.
2360
2361 * bootstrap: Don't assume $(...) works; use `...` instead.
2362 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
2363 gettext better.
2364
2365 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
2366 put into the -d output file, and mention what to do if YYSTYPE is
2367 defined as a macro.
2368
2369 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
2370
2371 Undo change made earlier today: it caused autopoint to not bring
2372 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
2373 autopoint's.
2374
2375 * bootstrap: Check that gettext version matches what's in
2376 configure.ac. Warn users to ignore robots.txt ERROR 404.
2377 * bootstrap: Undo today's earlier change (logged below).
2378 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
2379
2380 The gettext version checking is causing more trouble than it's
2381 curing; remove it. Problem reported by Paul Hilfinger.
2382
2383 * bootstrap: Issue a warning that one can expect a message
2384 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
2385 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
2386
2387 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
2388
2389 Ensure that the C++ compiler used for testing actually works on a
2390 simple test program; if not, skip the C++-related tests. Problem
2391 reported by Vin Shelton in:
2392 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
2393
2394 * m4/cxx.m4: New file.
2395 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
2396 * tests/atlocal.in (BISON_CXX_WORKS): Add.
2397 * tests/local.at (AT_COMPILE_CXX): Use it.
2398
2399 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
2400
2401 * data/glr.c (yylloc): Output this macro even if locations are not
2402 being generated, as the GLR parser needs it even in that case.
2403 Problem reported by Troy A. Johnson
2404 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
2405
2406 * configure.ac (AC_INIT): Update to 1.875e.
2407
2408 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
2409
2410 * NEWS: Version 1.875d.
2411 * configure.ac (AC_INIT): Likewise.
2412 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
2413
2414 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
2415 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
2416 lalr1.cc runs afoul of the first, and the last two are no longer
2417 supported by GCC 3.4.0.
2418 * README: Mention GNU m4 1.4 or later; mention m4 patches.
2419 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
2420
2421 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
2422
2423 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
2424 unsigned int, for compatibility with latest gnulib hash module.
2425 * src/state.c (state_hash, state_hasher): Likewise.
2426 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
2427 * src/uniqstr.c (hash_uniqstr): Likewise.
2428
2429 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
2430
2431 * NEWS: Unescaped newlines are no longer allowed in char & strings.
2432
2433 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
2434 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
2435 character and string literals.
2436 (unexpected_end): New function.
2437 (unexpected_eof): Use it.
2438 (unexpected_newline): New function.
2439 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
2440 actions.
2441
2442 * NEWS: Document %expect-rr.
2443
2444 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
2445 Fix typo by replacing $1 with $option.
2446 Remove more 'intl'-related files.
2447 Don't DEFUN AM_INTL_SUBDIR twice.
2448
2449 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
2450 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
2451 strtoul.c.
2452 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
2453 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
2454 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
2455 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
2456 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
2457 * src/.cvsignore: Add *.output.
2458
2459 * src/parse-gram.y: Put copyright notice inside %{ %} so it
2460 gets copied to the output file.
2461
2462 2004-04-28 Paul Eggert <eggert@twinsun.com>
2463
2464 Get files from the gnulib and po repositories, instead of relying
2465 on them being in our CVS. Upgrade to latest versions of gnulib
2466 and Automake.
2467
2468 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
2469 * bootstrap: Bootstrap from gnulib and po repositories.
2470 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
2471 * README-cvs: Document these changes. Remove version numbers from
2472 mentions of build tools, since they change so often. Mention Flex.
2473
2474 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
2475 (gl_USE_SYSTEM_EXTENSIONS): Add.
2476 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
2477 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
2478 does this for us.
2479 (AC_ISC_POSIX): Remove; we no longer support this
2480 ancient OS, as it gets in the way of latest Autoconf & gnulib.
2481 (AC_HEADER_STDC): Remove: we now assume C89 or better.
2482 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
2483 Do not check for C89 headers, except for locale.h which is used
2484 by the Yacc library and must port to K&R hosts.
2485 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
2486 Do not check for C89 functions, except for setlocale which is
2487 used by the Yacc library.
2488 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
2489 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
2490 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
2491 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
2492 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
2493 AM_GNU_GETTEXT): Remove; now done by:
2494 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
2495 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
2496 for us.
2497
2498 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
2499 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
2500 Define to empty, as gnulib.mk will do the rest for us.
2501 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
2502 for us.
2503 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
2504 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
2505
2506 * src/files.c: Include gnulib's xstrndup.h.
2507
2508 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
2509 (REALLOC): Use xnrealloc, for likewise.
2510 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
2511 (strnlen, memrchr): Remove decls; functions no longer used.
2512 Include <stpcpy.h>.
2513
2514 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
2515 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
2516 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
2517 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
2518 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
2519 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
2520 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
2521 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
2522 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
2523 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
2524 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
2525 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
2526 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
2527 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
2528 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
2529 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
2530 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
2531 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
2532 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
2533 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
2534 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
2535 Remove, as these files are now generated automatically
2536 by bootstrap or automake.
2537
2538 * po/ChangeLog: Remove: all but one entry was a duplicate
2539 of this file, and I moved that 2000-11-02 entry here.
2540
2541 * config/.cvsignore: Add Makefile, depcomp, install-sh.
2542 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
2543 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
2544 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
2545 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
2546 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
2547 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
2548 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
2549 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
2550 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
2551 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
2552 xstrndup.h.
2553 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
2554 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
2555 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
2556 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
2557 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
2558 * src/.cvsignore: Remove *_.c.
2559
2560
2561 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
2562 support it. (The latest stable gzip doesn't.)
2563
2564 2004-04-27 Paul Eggert <eggert@twinsun.com>
2565
2566 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
2567 case, as stos_ is now used by destructors due to the 2004-02-09
2568 change.
2569
2570 Remove more K&R C support.
2571 * lib/libiberty.y (PARAMS): Remove. All uses removed.
2572 * lib/subpipe.c (errno): Remove decl.
2573 Include <stdlib.h> unconditionally.
2574 (EXIT_FAILURE): Remove macro.
2575 * src/complain.c (vfprintf, strerror): Remove.
2576 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
2577 unconditionally.
2578 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
2579 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
2580 (strchr, strspn, memchr): Remove decls.
2581 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
2582 unconditionally. Do not declare perror.
2583 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
2584 unconditionally.
2585
2586 * src/complain.c (_): Remove useless defn, as system.h defines this.
2587
2588 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
2589 with latest obstack.h.
2590 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
2591 to procedure types, as obstack.h now does that for us.
2592 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
2593
2594 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
2595 so that this include file can stand alone.
2596 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
2597 does this now. Include subpipe.h first after config.h, to
2598 test whether it can stand alone.
2599
2600 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
2601 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
2602 unused declaration.
2603
2604 * tests/synclines.at (%union synch line): Put a dummy member in
2605 the union, because empty unions aren't allowed in C. Caught
2606 by GCC 3.4.0.
2607
2608 2004-04-13 Jim Meyering <jim@meyering.net>
2609
2610 * src/conflicts.c (conflicts_print): Correct format string typo:
2611 use `%%' to produce literal `%'. (trivial change)
2612
2613 2004-03-30 Paul Eggert <eggert@twinsun.com>
2614
2615 * src/getargs.c (version): Update copyright year to 2004.
2616
2617 * data/c.m4 (b4_int_type): Use 'short int' rather than
2618 'short', and similarly for 'long', 'unsigned', etc.
2619 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
2620 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
2621 yy_yypstack, yydumpstack): Likewise.
2622 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
2623 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
2624 Likewise.
2625 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
2626 yy_stack_print, yyparse): Likewise.
2627 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
2628 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
2629 * lib/bitset.c (bitset_print): Likewise.
2630 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
2631 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
2632 * lib/bitsetv.c (bitsetv_dump): Likewise.
2633 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
2634 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
2635 Likewise.
2636 * src/LR0.c (allocate_itemsets): Likewise.
2637 * src/gram.h (rule_number, rule): Likewise.
2638 * src/lalr.h (goto_number): Likewise.
2639 * src/nullable.c (nullable_compute): Likewise.
2640 * src/output.c (prepare_rules): Likewise.
2641 * src/relation.c (relation_print, relation_digraph): Likewise.
2642 * src/relation.h (relation_node): Likewise.
2643 * src/state.h (state_number, transitions, errs, reductions,
2644 struct state): Likewise.
2645 * src/symtab.h (symbol_number, struct symbol): Likewise.
2646 * src/tables.c (vector_number, tally, action_number,
2647 default_goto, goto_actions): Likewise.
2648 * tests/existing.at (GNU Cim Grammar): Likewise.
2649 * tests/regression.at (Web2c Actions): Likewise.
2650
2651 * src/output.c (muscle_insert_short_int_table): Renamed from
2652 muscle_insert_short_table. All uses changed.
2653
2654 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
2655
2656 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
2657 (declaration): Replace expected_conflicts with expected_sr_conflicts.
2658 Add %expect-rr rule.
2659
2660 * src/scan-gram.l: Recognize %expect-rr.
2661
2662 * src/conflicts.h (expected_sr_conflicts): Rename from
2663 expected_conflicts.
2664 (expected_rr_conflicts): Declare.
2665
2666 * src/conflicts.c (expected_sr_conflicts): Rename from
2667 expected_conflicts.
2668 (expected_rr_conflicts): Define.
2669 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
2670 for GLR parsers.
2671 Use expected_sr_conflicts in place of expected_conflicts.
2672 Warn if expected_rr_conflicts used in non-GLR parser.
2673
2674 * doc/bison.texinfo: Add documentation for %expect-rr.
2675
2676 2004-03-08 Paul Eggert <eggert@gnu.org>
2677
2678 Add support for hex token numbers. Suggested by Odd Arild Olsen in
2679 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
2680
2681 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
2682 in lalr1.cc.
2683 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
2684 * src/scan-gram.l (scan_integer): New function.
2685 ({int}): Use it.
2686 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
2687 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
2688 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
2689 Say "long int", not "long", for uniformity with GNU style.
2690
2691 2004-02-25 Paul Eggert <eggert@twinsun.com>
2692
2693 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
2694 compilers. This fixes a problem with Intel's C++ compiler being
2695 chatty, reported by Guido Trentalancia in
2696 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
2697
2698 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
2699
2700 Support %destructor and merge error locations in lalr1.cc.
2701
2702 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
2703 (Parser::stos_): Define unconditionally.
2704 (Parser::destruct_): New method. Generate its body with
2705 b4_yydestruct_generate.
2706 (Parser::error_start_): New attribute.
2707 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
2708 token which are discarded.
2709 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
2710 error_start_ when erroneous token are discarded.
2711 (Parser::parse) <yyerrlab1>: Compute the location of the error
2712 token so that it covers all the discarded tokens.
2713 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
2714 it can be called with `%skeleton "lalr1.cc"', and do that.
2715
2716 2004-02-02 Paul Eggert <eggert@twinsun.com>
2717
2718 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
2719 $(top_srcdir)/lib and ../lib. This fixes a bug reported
2720 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
2721 There's no need to mention top_builddir since Automake does that
2722 for us.
2723 (INCLUDES): Remove, as Automake says it's obsolescent.
2724 Contents migrated into AM_CPPFLAGS as described above.
2725 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
2726
2727 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
2728
2729 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
2730 (yyreportSyntaxError): Handle case where lookahead token is
2731 YYEMPTY.
2732
2733 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2734
2735 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
2736 resulting parsers are compilable with C++.
2737
2738 2003-12-23 Paul Eggert <eggert@twinsun.com>
2739
2740 * config/depcomp, config/install-sh: Sync with Automake 1.8.
2741 * src/output.c (output_skeleton): Rename local var.
2742 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
2743 Bison tokens, as this runs afoul of the 2003-10-07 change that
2744 disallowed NUL bytes in character constants or string literals.
2745
2746 * tests/local.at: Require Autoconf 2.59's Autotest.
2747 * tests/testsuite.at: Don't include local.at, since we now assume
2748 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
2749 including it.
2750 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
2751 multiple inclusion warnings.
2752
2753 2003-12-02 Akim Demaille <akim@epita.fr>
2754
2755 * doc/bison.texinfo (How Can I Reset the Parser): More about start
2756 conditions.
2757 From Bruno Haible.
2758
2759 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
2760
2761 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
2762
2763 2003-10-07 Paul Eggert <eggert@twinsun.com>
2764
2765 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
2766 if testsuite doesn't exist.
2767
2768 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
2769 literals, unfortunately.
2770 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
2771 Complain about NUL bytes in character constants or string literals.
2772
2773 2003-10-05 Paul Eggert <eggert@twinsun.com>
2774
2775 * NEWS: Don't document %no-default-prec, as it's still
2776 too experimental.
2777 * doc/bison.texinfo: Document %no-default-prec only if
2778 the defaultprec flag is set. Normally it's not.
2779
2780 2003-10-04 Paul Eggert <eggert@twinsun.com>
2781
2782 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
2783 non-modifiable lvalue, instead of a modifiable one.
2784 * doc/bison.texinfo (Actions): Document that $$ can
2785 be assigned to. Do not claim that $$ and $N are
2786 array element references: user code should not rely on this.
2787
2788 2003-10-01 Paul Eggert <eggert@twinsun.com>
2789
2790 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
2791 (grammar_declaration): Use it.
2792 * src/scan-gram.l: New token %no-default-prec.
2793 * tests/conflicts.at: Revamp tests to use %no-default-prec.
2794 * NEWS, doc/bison.texinfo: Document the above.
2795
2796 2003-10-01 Akim Demaille <akim@epita.fr>
2797
2798 VCG no longer supports long_straight_phase.
2799
2800 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
2801 * src/print_graph.c (print_graph): Adjust.
2802
2803 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
2804 and Paul Eggert <eggert@twinsun.com>
2805
2806 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
2807 Table of Symbols): Document %default-prec.
2808 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
2809 (grammar_declaration): Set default_prec on %default-prec.
2810 * src/scan-gram.l (%default-prec): New token.
2811 * src/reader.h (default_prec): New flag.
2812 * src/reader.c: Likewise.
2813 (packgram): Handle it.
2814 * tests/conflicts.at (%default-prec without %prec,
2815 %default-prec with %prec, %default-prec 1): New tests.
2816
2817 2003-09-30 Paul Eggert <eggert@twinsun.com>
2818
2819 * tests/testsuite.at: Include local.at, not input.at, fixing
2820 a typo in the 2003-08-25 patch.
2821
2822 2003-08-27 Akim Demaille <akim@epita.fr>
2823
2824 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
2825 GCC warnings.
2826
2827 2003-08-26 Akim Demaille <akim@epita.fr>
2828
2829 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
2830 "<\#" to avoid magic from Gnus when posting parts of this script.
2831
2832 2003-08-26 Akim Demaille <akim@epita.fr>
2833
2834 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
2835 (Parser::parse): here.
2836 Adjust: nerrs and errstatus is now replaced by...
2837 (Parser::nerrs_, Parser::errstatus_): New.
2838
2839 2003-08-25 Akim Demaille <akim@epita.fr>
2840
2841 * config/announce-gen, Makefile.cfg: New.
2842 * Makefile.am: Adjust.
2843 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
2844 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
2845
2846 2003-08-25 Akim Demaille <akim@epita.fr>
2847
2848 When reducing initial empty rules, Bison parser read an initial
2849 location that is not defined. This results in garbage, and that
2850 affects Bison's own parser. Therefore we need (i) to extend Bison
2851 to support a means to initialize this location, and (ii) to use
2852 this CVS Bison to fix CVS Bison's parser.
2853
2854 * src/reader.h, reader.c (epilogue_augment): Remove, replace
2855 with...
2856 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
2857 * src/parse-gram.y: Adjust.
2858 (%initial-action): New.
2859 (%error-verbose): Since we require CVS Bison, there is no reason
2860 not to use it.
2861 * src/scan-gram.l: Adjust.
2862 * src/Makefile.am (YACC): New, to make sure we use our own parser.
2863 * data/yacc.c (yyparse): Use b4_initial_action.
2864
2865 2003-08-25 Akim Demaille <akim@epita.fr>
2866
2867 * doc/bison.texinfo: Don't promote stdout for error messages.
2868
2869 2003-08-25 Akim Demaille <akim@epita.fr>
2870
2871 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
2872 From Alexandre Duret-Lutz.
2873
2874 2003-08-25 Akim Demaille <akim@epita.fr>
2875
2876 Version 1.875c.
2877
2878 2003-08-25 Akim Demaille <akim@epita.fr>
2879
2880 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
2881 Use them.
2882
2883 2003-08-25 Akim Demaille <akim@epita.fr>
2884
2885 * data/lalr1.cc (Parser::reduce_print_): New.
2886 Use it.
2887
2888 2003-08-25 Akim Demaille <akim@epita.fr>
2889
2890 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
2891 error recovery loops. This patch is based on
2892 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
2893 Also, augment the similarity between lalr1.cc and yacc.c.
2894 Note: the locations of error recovery rules are not correct yet.
2895
2896 * data/lalr1.cc: Comment changes to augment the similarity between
2897 lalr1.cc and yacc.c.
2898 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
2899 (yyerrlab1): Remove, but where it used to be (now the bottom part of
2900 yyerrlab), when hitting EOF, pop the whole stack here instead of
2901 merely falling thru the default error handling mechanism.
2902 (yyerrorlab): New label, with the old contents of YYERROR,
2903 plus the following change: pop the stack of rhs corresponding
2904 to the production that invoked YYERROR. That is how Yacc
2905 behaves (required by POSIX).
2906 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
2907 fail.
2908
2909 2003-08-25 Akim Demaille <akim@epita.fr>
2910
2911 Tune local.at so that people can "autom4te -l autotest calc.at -o
2912 calc" for instance, to extract a sub test suite.
2913
2914 * tests/testsuite.at: Move the initialization, Autotest version
2915 requirement, and AT_TESTED invocation into...
2916 * tests/local.at: here.
2917 * tests/testsuite.at: Include it for compatibility with Autoconf
2918 2.57.
2919 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
2920 be ignore.
2921
2922 2003-08-04 Paul Eggert <eggert@twinsun.com>
2923
2924 Rework code slightly to avoid gcc -Wtraditional warnings.
2925 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
2926 The returned value is now stored in *YY0. All callers changed.
2927 * src/output.c (merge_output): Adjust to the above change.
2928
2929 2003-07-26 Paul Eggert <eggert@twinsun.com>
2930
2931 * data/glr.c (YYASSERT): New macro.
2932 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
2933 yyresolveStates, yyprocessOneStack):
2934 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
2935 Derived from a suggestion by Frank Heckenbach.
2936
2937 2003-07-25 Paul Eggert <eggert@twinsun.com>
2938
2939 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
2940 for portability to K&R C (after ansi2knr, presumably). See
2941 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
2942 by Frank Heckenbach, though I have omitted the structure-initialization
2943 part of his glr-knr.diff patch since I recall that the Portable
2944 C Compiler didn't require that change.
2945
2946 Let the user specify how to allocate and free memory.
2947 Derived from a suggestion by Frank Heckenbach in
2948 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
2949 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
2950 All uses of free, malloc, realloc changed to use these macros,
2951 and unnecessary casts removed.
2952 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
2953
2954 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
2955
2956 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
2957 use s.empty() rather than s == "" to test for empty string; see
2958 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
2959 (trivial change)
2960
2961 2003-06-25 Akim Demaille <akim@epita.fr>
2962
2963 * config/depcomp, config/install-sh: Update from masters.
2964
2965 2003-06-20 Paul Eggert <eggert@twinsun.com>
2966
2967 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
2968 and return properly parenthesized result.
2969 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
2970 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
2971 Remove unnecessary parentheses from uses.
2972 * doc/bison.texinfo (Location Default Action): Describe the
2973 conventions for parentheses.
2974
2975 2003-06-19 Paul Eggert <eggert@twinsun.com>
2976
2977 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
2978 yyreportTree): Do not assume that size_t is the same width as int,
2979 when printing sizes. Print sizes using an unsigned format.
2980 Problem reported by Frank Heckenbach in
2981 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
2982
2983 Port to Forte Developer 7 C compiler.
2984 * data/glr.c (struct YYLTYPE): If locations are not being used,
2985 declare a single dummy member, as empty structs do not conform
2986 to the C standard.
2987 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
2988 the Forte Developer 7 C compiler complains that end-of-loop
2989 code is not reached.
2990
2991 2003-06-17 Paul Eggert <eggert@twinsun.com>
2992
2993 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
2994 avoid warnings from picky compilers about redefinition of PARAMS.
2995
2996 2003-06-17 Paul Eggert <eggert@twinsun.com>
2997
2998 Version 1.875b.
2999
3000 * NEWS: Document 1.875b.
3001
3002 * lib/bbitset.h: Do not include config.h; that's the includer's job.
3003 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
3004 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
3005 Don't use 'index' in comments, as it's a builtin fn on some hosts.
3006 * lib/bitset_stats.c: Include gettext.h unconditionally, as
3007 per recent gettext manual's suggestion.
3008 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
3009 Use prototypes, not old-style definitions.
3010 * lib/lbitset.c (lbitset_unused_clear): Likewise.
3011 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
3012 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
3013 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
3014 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
3015 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
3016 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
3017 vbitset_or_and_cmp, vbitset_copy): Likewise.
3018
3019 * lib/libiberty.h: Do not include config.h; that's the includer's job.
3020 Do not include <stdlib.h>.
3021 (PARAMS): Define unconditionally for C89.
3022 (ATTRIBUTE_NORETURN): Remove.
3023 (ATTRIBUTE_UNUSED): Define unconditionally.
3024
3025 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
3026 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
3027 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
3028 * lib/vbitset.c, lib/vbitset.h: New files.
3029 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
3030 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
3031 from libbitset.
3032
3033 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
3034 `How Can I Reset @code{yyparse}', since texinfo does not allow
3035 arbitrary @ in node names.
3036
3037 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
3038 shouldn't be needed according to the gettext 0.12.1 documentation
3039 but which seem to be needed anyway: codeset.m4 glibc21.m4
3040 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
3041 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
3042 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
3043
3044 * lib/.cvsignore: Add stdbool.h.
3045 * m4/.cvsignore: Add nls.m4, po.m4.
3046
3047 Upgrade to CVS gnulib.
3048 * stdbool_.h: File renamed from stdbool.h.in.
3049 * configure.ac (AM_STDBOOL_H): Invoke this instead of
3050 AC_HEADER_STDBOOL.
3051 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
3052 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
3053 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
3054 (MOSTLYCLEANFILES): New var.
3055 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
3056 (stdbool.h): New rule.
3057 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
3058 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
3059 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
3060 m4/quote.m4: Upgrade to today's gnulib.
3061
3062 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
3063 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
3064 the tests right now.
3065 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
3066 yyerror are declared before use; C99 requires this.
3067
3068 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3069
3070 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
3071 first.
3072 (yyrecoverSyntaxError): Correct the logic for setting and testing
3073 yyerrState.
3074 Correct comment on handling EOF.
3075 Allow states with only a default reduction, rather than failing
3076 (I can't quite reconstruct why these were not allowed before).
3077
3078 Fixes to avoid problem that $-N rules in GLR parsers can cause
3079 buffer overruns, corrupting state.
3080
3081 * src/output.c (prepare_rules): Output max_left_semantic_context
3082 definition.
3083 * src/reader.h (max_left_semantic_context): New variable declaration.
3084 * src/scan-gram.l (max_left_semantic_context): Define.
3085 (handle_action_dollar): Update max_left_semantic_context.
3086 * data/glr.c (YYMAXLEFT): New definition.
3087 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
3088 (yyresolveAction): Ditto.
3089
3090 Fixes to problems with location handling in GLR parsers reported by
3091 Frank Heckenbach (2003/06/05).
3092
3093 * data/glr.c (YYLTYPE): Make trivial if locations not used.
3094 (YYRHSLOC): Add parentheses, and define only if locations used.
3095 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
3096 locations not used.
3097 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
3098 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
3099
3100 * tests/cxx-type.at: Exercise location information; update tests
3101 to differentiate output with and without locations.
3102 Remove forward declarations of yylex and yyerror---caused errors
3103 because default YYLTYPE not yet defined.
3104 Change semantic actions to compute strings, rather than printing
3105 them directly (to test proper passing of semantics values). Change
3106 output to prefix notation and update test data and expected results.
3107 (yylex): Track locations.
3108 (stmtMerge): Return value rather than printing, and include arguments
3109 in value.
3110
3111 2003-06-03 Paul Eggert <eggert@twinsun.com>
3112
3113 Avoid warnings generated by GCC 2.95.4 when Bison is
3114 configured with --enable-gcc-warnings.
3115 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
3116 yy::]b4_parser_class_name[::translate_,
3117 yy::Stack::operator[] (unsigned),
3118 yy::Stack::operator[] (unsigned) const,
3119 yy::Slice::operator[] (unsigned),
3120 yy::Slice::operator[] (unsigned) const):
3121 Rename local vars to avoid warnings.
3122 * tests/glr-regression.at (Improper handling of embedded actions
3123 and $-N in GLR parsers): Remove unused local variable from yylex.
3124 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
3125 (void) as arg when not pure, since we now assume C89 when building
3126 Bison. Pacify GCC by using parameter.
3127
3128 2003-06-02 Paul Eggert <eggert@twinsun.com>
3129
3130 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
3131 yy::Location::lines, yy::Location::columns): Rename arguments
3132 to avoid shadowing; this removes a warning generated by GCC 3.3.
3133
3134 2003-06-01 Paul Eggert <eggert@twinsun.com>
3135
3136 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
3137 to g++, as GCC 3.3 complains if you do it.
3138 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
3139 everything that WARNING_CFLAGS has, except omit warnings
3140 not suitable for C++.
3141 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
3142 * tests/atlocal.in (CXXFLAGS): New var.
3143 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
3144
3145 Fix a GLR parser bug I reported in February; see
3146 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
3147 The problem was that GLR parsers did not conform to the C standard,
3148 because actions like { $1 = $2 + $3; } expanded to expressions
3149 that invoked YYFILL in separate subexpressions, and YYFILL assigned
3150 to a local variable. The C standard says that expressions
3151 like (var = f ()) + (var = f ()) have undefined behavior.
3152 Another problem was that GCC sometimes issues warnings that
3153 yyfill and its parameters are unused.
3154
3155 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
3156 as possibly unused.
3157 (yyfill): New function.
3158 (YYFILL): Use it.
3159 (yyuserAction): Change type of yynormal to bool, so that it matches
3160 the new yyfill signature. Mark it as possibly unused.
3161
3162
3163 Follow up on a bug I reported in February, where a Bison-generated
3164 parser can loop. Provide a test case and a fix for yacc.c. I
3165 don't have a fix for lalr1.cc or for glr.c, unfortunately.
3166 The original bug report is in:
3167 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
3168
3169 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
3170 macro's size was becoming unwieldy.
3171 (yyerrlab): Do not discard an empty lookahead symbol, as this
3172 might destroy garbage.
3173 (yyerrorlab): New label, with the old contents of YYERROR,
3174 plus the following change: pop the stack of rhs corresponding
3175 to the production that invoked YYERROR. That is how Yacc
3176 behaves, and POSIX requires this behavior.
3177 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
3178 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
3179 Define 'alarm' to do nothing if unistd.h is not available.
3180 Add a new rule "exp: '-' error;" to test the above change to
3181 data/yacc.c. Use 'alarm' to abort any test taking longer than
3182 10 seconds, as it's probably looping.
3183 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
3184 Also, the new yacc.c generates two fewer diagnostics for an
3185 existing test.
3186
3187 2003-05-24 Paul Eggert <eggert@twinsun.com>
3188
3189 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
3190 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
3191 This fixes a problem reported by John Bowman when the Compaq/HP
3192 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
3193 -ansi -Wall -gall).
3194 * data/yacc.c (union yyalloc): Likewise.
3195 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
3196
3197 Switch from 'int' to 'bool' where that makes sense.
3198
3199 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
3200 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
3201 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
3202 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
3203 Return or accept bool, not int. All callers changed.
3204 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
3205 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
3206 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
3207 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
3208 bitset_or_and_cmp_): Likewise.
3209 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
3210 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
3211 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
3212 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
3213 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
3214 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
3215 bitset_stats_or_and_cmp): Likewise.
3216 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
3217 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
3218 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
3219 ebitset_xor_cmp): Likewise.
3220 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
3221 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
3222 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
3223 lbitset_xor_cmp): Likewise.
3224 * lib/bbitset.h: Include <stdbool.h>.
3225 (struct bitset_vtable): The following members now return bool, not
3226 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
3227 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
3228 or_and_cmp).
3229 * src/conflicts.c (count_rr_conflicts): Likewise.
3230 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
3231 All uses changed.
3232 * lib/ebitset.c (ebitset_obstack_init): Likewise.
3233 * lib/lbitset.c (lbitset_obstack_init): Likewise.
3234 * src/getargs.c (debug_flag, defines_flag, locations_flag,
3235 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
3236 graph_flag): Likewise.
3237 * src/getargs.h (debug_flag, defines_flag, locations_flag,
3238 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
3239 graph_flag): Likewise.
3240 * src/output.c (error_verbose): Likewise.
3241 * src/output.h (error_verbose): Likewise.
3242 * src/reader.c (start_flag, typed): Likewise.
3243 * src/reader.h (typed): Likewise.
3244 * src/getargs.c (LOCATIONS_OPTION): New constant.
3245 (long_options, getargs): Use it.
3246 * src/lalr.c (build_relations): Use bool, not int.
3247 * src/nullable.c (nullable_compute): Likewise.
3248 * src/print.c (print_reductions): Likewise.
3249 * src/tables.c (action_row, pack_vector): Likewise.
3250 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
3251 * src/output.c (prepare): Use it.
3252 * src/output.c (token_definitions_output,
3253 symbol_destructors_output, symbol_destructors_output): Use string,
3254 not boolean integer, to keep track of whether to output separator.
3255 * src/print_graph.c (print_core): Likewise.
3256 * src/state.c (state_rule_lookaheads_print): Likewise.
3257
3258 * config/install-sh: Sync from automake 1.7.5.
3259
3260 2003-05-14 Paul Eggert <eggert@twinsun.com>
3261
3262 * src/parse-gram.y (rules_or_grammar_declaration): Require a
3263 semicolon after a grammar declaration, in the interest of possible
3264 future changes to the Bison input language.
3265 Do not allow a stray semicolon at the start of the grammar.
3266 (rhses.1): Allow one or more semicolons after any rule, including
3267 just before "|" as required by POSIX.
3268 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
3269 grammar.
3270
3271 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
3272
3273 %parse-param support for lalr1.cc.
3274
3275 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
3276 b4_cc_constructor_calls, b4_cc_constructor_call,
3277 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
3278 definitions.
3279 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
3280 parse-param arguments.
3281 (yy::b4_parser_class_name): Declare instance variables to
3282 hold parse-param arguments.
3283 * tests/calc.at: s/value/semantic_value/ because value clashes
3284 with a member of yy::b4_parser_class_name. Adjust C++ code
3285 to handle %parse-param. Enable %parse-param test in C++.
3286
3287 2003-05-12 Paul Eggert <eggert@twinsun.com>
3288
3289 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
3290 English a bit. Fix fclose typo. Change "const char" to "char
3291 const", and use ANSI C rather than K&R for "main". Suggest
3292 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
3293 and suggest yy_switch_to_buffer.
3294
3295 2003-05-05 Paul Eggert <eggert@twinsun.com>
3296
3297 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
3298 C89. This avoids a diagnostic on compilers that define __STDC__
3299 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
3300 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
3301
3302 2003-05-03 Paul Eggert <eggert@twinsun.com>
3303
3304 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
3305 Do not overrun array bounds.
3306 This should fix a bug reported today by Olatunji Oluwabukunmi in
3307 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
3308
3309 2003-04-29 Akim Demaille <akim@epita.fr>
3310
3311 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
3312 * src/getargs.c, src/getargs.h: here, as bool, not int.
3313 (nondeterministic_parser): New.
3314 * src/parse-gram.y, src/scan-gram.l: Support
3315 %nondeterministic-parser.
3316 * src/output.c (prepare): Use nondeterministic_parser instead
3317 of glr_parser where appropriate.
3318 * src/tables.c (conflict_row, action_row, save_row)
3319 (token_actions, token_actions, pack_vector): Ditto.
3320
3321 2003-04-29 Akim Demaille <akim@epita.fr>
3322
3323 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
3324
3325 2003-04-29 Akim Demaille <akim@epita.fr>
3326
3327 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
3328 with %pure-parser and %locations to exercise the patch from Yakov
3329 Markovitch below.
3330
3331 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
3332
3333 * data/yacc.c: (b4_lex_param): Corrected for the case where
3334 %lex-param is provided and %pure-parser isn't.
3335
3336 2003-04-27 Paul Eggert <eggert@twinsun.com>
3337
3338 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
3339 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
3340 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
3341 if it is not defined.
3342 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
3343
3344 2003-04-26 Paul Eggert <eggert@twinsun.com>
3345
3346 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
3347 Declare to be of type suitable for the ninf value itself, not of
3348 type suitable for the corresponding table, since the latter might
3349 be unsigned but the ninf value might be negative. This fixes a
3350 bug reported by Alexandre Duret-Lutz in
3351 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
3352
3353 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
3354 invokes it. We shouldn't invoke it twice because it will attempt
3355 to put error.o in the archive twice. This fixes a glitch reported
3356 by Martin Mokrejs in
3357 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
3358
3359 2003-04-21 Paul Eggert <eggert@twinsun.com>
3360
3361 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
3362 to gnulib.
3363
3364 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
3365
3366 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
3367 Fix obvious typo that results in uncompilable GLR parsers
3368 when both %pure-parser and %locations are used. (trivial change)
3369
3370 2003-04-17 Paul Eggert <eggert@twinsun.com>
3371
3372 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
3373 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
3374 Do not insert the expected token via unput, as this runs afoul
3375 of a POSIX-compatibility bug in flex 2.5.31.
3376 All uses changed to BEGIN the parent state,
3377 since we no longer insert the expected token via unput.
3378 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
3379 that is no longer emitted after the above change.
3380
3381 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
3382 the first one. This change is from Paul Hilfinger, and it fixes
3383 regression reported by Werner Lemberg in
3384 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
3385
3386 (resolve_sr_conflict): Don't invoke state_errs_set
3387 unless one or more tokens have been explicitly made errors.
3388 Otherwise, the above change causes Bison to abort.
3389
3390 * tests/existing.at (GNU pic Grammar): New test case, taken from
3391 Lemberg's email.
3392
3393 2003-03-31 Akim Demaille <akim@epita.fr>
3394
3395 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
3396
3397 2003-03-31 Akim Demaille <akim@epita.fr>
3398
3399 * src/output.c (prepare_symbols): Avoid trailing spaces in the
3400 output.
3401
3402 2003-03-31 Akim Demaille <akim@epita.fr>
3403
3404 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
3405 From Paul Hilfinger.
3406
3407 2003-03-29 Akim Demaille <akim@epita.fr>
3408
3409 * m4/error.m4: Do not put under dynamic conditions some code which
3410 expansion is under static control.
3411
3412 2003-03-29 Akim Demaille <akim@epita.fr>
3413
3414 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
3415
3416 2003-03-29 Akim Demaille <akim@epita.fr>
3417
3418 * doc/bison.texinfo (Strings are Destroyed): New.
3419
3420 2003-03-13 Paul Eggert <eggert@twinsun.com>
3421
3422 * .cvsignore: Add configure.lineno.
3423 * src/.cvsignore: Add yacc.
3424 * tests/.cvsignore: Add testsuite.log.
3425 * doc/fdl.texi: Sync with latest FSF version.
3426
3427 2003-03-12 Paul Eggert <eggert@twinsun.com>
3428
3429 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
3430 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
3431 cursor, instead of leaving it undefined. This fixes a bug
3432 reported by Tim Van Holder in
3433 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
3434 * tests/input.at (Torturing the Scanner): Test the scanner on
3435 an empty input file, which was Tim Van Holder's test case.
3436
3437 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
3438 <sys/resource.h> can be included, include sys/time.h and
3439 sys/times.h first, if available. This works around the SunOS
3440 4.1.4 porting bug reported by Bruce Becker in
3441 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
3442
3443 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
3444 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
3445 AC_HEADER_SYS_WAIT.
3446
3447 Merge changes from gnulib. This was prompted because the CVS
3448 snapshot didn't build on Solaris 7 due to strnlen problems.
3449
3450 These changes need to be merged back into gnulib:
3451 * lib/hash.c: Include <stdbool.h> unconditionally.
3452 * m4/onceonly.m4 (m4_quote): New macro.
3453 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
3454 Quote AC_FOREACH variable-expansions properly.
3455 The 2003-01-03 obstack.h change also needs merging.
3456 {end of changes requiring merging}
3457
3458 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
3459 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
3460 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
3461 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
3462 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
3463 New files, imported from gnulib.
3464 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
3465 above.
3466
3467 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
3468 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
3469 gnulib sources.
3470
3471 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
3472 Add.
3473 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
3474 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
3475 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
3476 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
3477 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
3478 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
3479 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
3480 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
3481 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
3482 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
3483 (jm_PREREQ_ARGMATCH): Remove.
3484 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
3485 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
3486
3487 * src/system.h: Include <stdbool.h> unconditionally.
3488
3489 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
3490 assuming at least C89 in the bitset code for some time now.
3491
3492 2003-03-03 Akim Demaille <akim@epita.fr>
3493
3494 * ro.po: New.
3495
3496 2003-03-02 Akim Demaille <akim@epita.fr>
3497
3498 * doc/bison.texinfo (Table of Symbols): Reactivate the
3499 documentation for %lex-param, and %parse-param.
3500
3501 2003-03-02 Akim Demaille <akim@epita.fr>
3502
3503 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
3504 generate verbose error messages.
3505 Use the number of tokens as an upper bound in yytname, as it
3506 cannot be a non terminal.
3507
3508 2003-03-02 Akim Demaille <akim@epita.fr>
3509
3510 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
3511 message.
3512
3513 2003-03-02 Akim Demaille <akim@epita.fr>
3514
3515 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
3516 Use them to exercise yycheck overrun.
3517 Based on Andrew Suffield's grammar.
3518
3519 2003-03-02 Akim Demaille <akim@epita.fr>
3520
3521 Create tests/local.at for Bison generic testing macros.
3522
3523 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
3524 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
3525 This new file.
3526 * tests/calc.at (AT_CHECK_CALC): Adjust.
3527 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
3528 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
3529 * tests/local.at: here.
3530 (AT_COMPILE_CXX): Tags the tests using it as c++.
3531 Ignore the test if CXX is not functional.
3532
3533 2003-03-01 Paul Eggert <eggert@twinsun.com>
3534
3535 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
3536 not loc->end, since loc->end might contain garbage and this leads
3537 to undefined behavior on some platforms.
3538 (id_loc, token_start): Use (IF_LINTed) initial values that do not
3539 depend on *loc, so that the reader doesn't give the the false
3540 impression that *loc is initialized.
3541 (<INITIAL>"%%"): Do not bother setting code_start, since its value
3542 does not survive the return.
3543
3544 2003-03-01 Akim Demaille <akim@epita.fr>
3545
3546 * src/scan-gram.l (code_start): Always initialize it when entering
3547 into yylex, as SC_EPILOGUE is activated *before* the corresponding
3548 yylex invocation. An alternative would be making it static, but
3549 then it starts with the second %%'s beginning, instead of its end.
3550
3551 2003-02-28 Paul Eggert <eggert@twinsun.com>
3552
3553 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
3554 around a UnixWare 7.1.1 porting bug reported by John Hughes in
3555 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
3556
3557 2003-02-26 Paul Eggert <eggert@twinsun.com>
3558
3559 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
3560 Remove Sequent/Pyramid discussion (nobody uses them any more).
3561 Merge VMS and MS-DOS discussion; these ports may well be dead
3562 but let's keep mentioning them for now. Put <> around email
3563 addresses. Add copyright notice.
3564
3565 2003-02-24 Paul Eggert <eggert@twinsun.com>
3566
3567 * data/glr.c (yy_reduce_print): yylineno -> yylno,
3568 to avoid collision with flex use of yylineno.
3569 Problem reported by Bruce Lilly in
3570 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
3571 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
3572 * data/yacc.c (yy_reduce_print): Likewise.
3573
3574 * config/depcomp: Sync with Automake 1.7.3.
3575
3576 2003-02-21 Akim Demaille <akim@epita.fr>
3577
3578 * data/lalr1.cc: Use temporary variables instead of casts to
3579 change integer types.
3580 Suggested by Paul Eggert.
3581
3582 2003-02-21 Akim Demaille <akim@epita.fr>
3583
3584 * doc/bison.texinfo: Use "location" consistently to refer to @n,
3585 to avoid confusions with lalr1.cc's notion of Position.
3586 Suggested by Paul Eggert.
3587
3588 2003-02-20 Akim Demaille <akim@epita.fr>
3589
3590 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
3591 before initial_columns.
3592 (location.hh): Use consistent variable names when defining the
3593 operator<<.
3594 Use "last" so that we subtract from Positions, not from unsigned.
3595
3596 2003-02-20 Akim Demaille <akim@epita.fr>
3597
3598 * data/lalr1.cc (position.hh): New subfile, including the extended
3599 and Doxygen'ed documentation of class Position.
3600 (location.hh): Use it.
3601 Document a` la Doxygen.
3602 With the help of Benoit Perrot.
3603
3604 2003-02-20 Akim Demaille <akim@epita.fr>
3605
3606 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
3607 AT_YACC_IF.
3608 Redefine AT_YYERROR_SEES_LOC_IF using it.
3609 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
3610 not defined.
3611 Don't use the location in yy::Parser::error_ and
3612 yy::Parser::print_ when not %locations.
3613 Activate more lalr1.cc tests.
3614
3615 2003-02-19 Akim Demaille <akim@epita.fr>
3616
3617 * data/lalr1.cc: When displaying a line number, be sure to make it
3618 an int.
3619
3620 2003-02-19 Akim Demaille <akim@epita.fr>
3621
3622 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
3623 Remove, useless.
3624 (YYABORT, YYACCEPT, YYERROR): New.
3625 * tests/calc.at: Renable the lalr1.cc test.
3626
3627 2003-02-19 Akim Demaille <akim@epita.fr>
3628
3629 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
3630 error recovery, mixing with/without pops and discarding of the
3631 lookahead.
3632 Exercise YYERROR.
3633 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
3634
3635 2003-02-17 Paul Eggert <eggert@twinsun.com>
3636
3637 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
3638 * tests/testsuite.at (AT_COMPILE): Use them.
3639 This fixes the testsuite problem reported by Robert Lentz in
3640 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
3641
3642 2003-02-12 Paul Eggert <eggert@twinsun.com>
3643
3644 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
3645 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
3646 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
3647 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
3648 Check for malloc failure, for consistency with yacc.c.
3649 (yytname_size): Remove, for consistency with yacc.c.
3650
3651 The bug still remains in data/lalr1.cc, as I didn't have time
3652 to fix it there.
3653
3654 2003-02-06 Akim Demaille <akim@epita.fr>
3655
3656 * configure.ac (GXX): Rename as...
3657 (CXX): this, to keep the original Autoconf semantics.
3658 Require 2.57.
3659 * data/lalr1.cc: Fix b4_copyright invocations.
3660 If YYDEBUG is not defined, don't depend upon name_ being defined.
3661 (location.hh): Include string and iostream.
3662 (Position::filename): New member.
3663 (Position::Position ()): New.
3664 (operator<< (Position)): New.
3665 (operator- (Position, int)): New.
3666 (Location::first, Location::last): Rename as...
3667 (Location::begin, Location::end): these, to mock the conventional
3668 iterator names.
3669 (operator<< (Location)): New.
3670 * tests/atlocal.in (CXX): New.
3671 * tests/testsuite.at (AT_COMPILE_CXX): New.
3672 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
3673 locations in a more synthetic way.
3674 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
3675 lalr1.cc is used.
3676 Adjust the C locations to match those from Emacs: first column is
3677 column 0.
3678 Change all the expected results.
3679 Conform to the GCS: simplify the locations when applicable.
3680 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
3681 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
3682 these CPP macros with the m4 macros new defined by...
3683 (AT_CHECK_PUSHDEFS): this, i.e.:
3684 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
3685 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
3686 New macros.
3687 (AT_CHECK_POPDEFS): Undefine them.
3688 (AT_CHECK_CALC_LALR1_CC): New.
3689 Use it for the first lalr1.cc test.
3690
3691 2003-02-04 Akim Demaille <akim@epita.fr>
3692
3693 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
3694 Location as is defined.
3695
3696 2003-02-04 Akim Demaille <akim@epita.fr>
3697
3698 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
3699 name_ being defined.
3700
3701 2003-02-03 Paul Eggert <eggert@twinsun.com>
3702
3703 * src/gram.h (start_symbol): Remove unused decl.
3704
3705 Use more-consistent naming conventions for local vars.
3706
3707 * src/derives.c (derives_compute): Change type of local var from
3708 int to rule_number.
3709 * src/gram.c (grammar_rules_partial_print): Likewise.
3710 * src/print.c (print_core): Likewise.
3711 * src/reduce.c (reduce_grammar_tables): Likewise.
3712
3713 * src/gram.c (grammar_dump): Change name of item_number *
3714 local var from r to rp.
3715 * src/nullable.c (nullable_compute): Likewise.
3716
3717 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
3718
3719 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
3720 for symbol or symbol_number var.
3721 * src/reader.c (grammar_start_symbol_set): Likewise.
3722 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
3723 Likewise.
3724 * src/state.c (transitions_to): Likewise.
3725 * src/state.h: Likewise.
3726 * src/tables.c (symbol_number_to_vector_number): Likewise.
3727
3728 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
3729 char * var.
3730
3731 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
3732 var.
3733
3734 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
3735 var.
3736
3737 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
3738 Use str, not s, for char * var. Use ch, not c, for character var.
3739 Use size for size var.
3740
3741 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
3742 char * var.
3743 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
3744 uniqstr var.
3745 * src/uniqstr.h: Likewise.
3746
3747 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
3748 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
3749 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
3750 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
3751 param to have same name as that of enum, so that we don't use
3752 "s" to stand for a non-state.
3753
3754 2003-02-02 Akim Demaille <akim@epita.fr>
3755
3756 * src/scan-skel.l: Scan more than one inert character per yylex
3757 invocation.
3758
3759 2003-02-01 Paul Eggert <eggert@twinsun.com>
3760
3761 Version 1.875a.
3762
3763 * po/LINGUAS: Add ms.
3764
3765 2003-01-30 Akim Demaille <akim@epita.fr>
3766
3767 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
3768
3769 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3770
3771 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
3772 of $1.
3773
3774 Changes in response to error report by S. Eken: GLR mode does not
3775 handle negative $ indices or $ indices in embedded rules correctly.
3776 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
3777
3778 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
3779 (b4_rhs_location): Ditto.
3780 (yyfill): New function to copy from stack tree into array
3781 incrementally.
3782 (yyuserAction): Modify to allow incremental move of semantic values
3783 to rhs array when in GLR mode.
3784 Define YYFILL to use in user-defined actions to fill semantic array
3785 as needed.
3786 Remove dummy use of yystack, as there is now a guaranteed use.
3787 (yydoAction): Modify to allow incremental move of semantic values
3788 to rhs array when in GLR mode.
3789 (yyresolveAction): Ditto.
3790 (yyglrShiftDefer): Update comment.
3791 (yyresolveStates): Use X == NULL for pointers, not !X.
3792 (yyglrReduce): Ditto.
3793 (yydoAction): Ditto
3794
3795 * tests/glr-regr1.at: Rename to ...
3796 * tests/glr-regression.at: Add new regression test for the problems
3797 described above (adapted from S. Eken).
3798 Update copyright notice.
3799 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
3800 * tests/Makefile.am: Ditto.
3801
3802 2003-01-28 Paul Eggert <eggert@twinsun.com>
3803
3804 * data/lalr1.cc: Do not use @output_header_name@ unless
3805 b4_defines_flag is set. This fixes two bugs reported by
3806 Tim Van Holder in
3807 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
3808 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
3809
3810 2003-01-21 Paul Eggert <eggert@twinsun.com>
3811
3812 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
3813 we don't need to worry about yyerrlab1 being reported as an
3814 "unused label" by non-GCC C compilers. The downside is that if
3815 locations are used then a couple of statements are duplicated each
3816 time YYERROR is invoked, but the upside is that the warnings
3817 should vanish.
3818 (yyerrlab1): Move code to YERROR.
3819 (yyerrlab2): Remove. Change uses back to yyerrlab1.
3820 This reverts some of the 2002-12-27 change.
3821
3822 2003-01-17 Paul Eggert <eggert@twinsun.com>
3823
3824 * src/output.c (symbol_printers_output): Fix typo that led
3825 to core dump. Problem reported by Antonio Rus in
3826 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
3827
3828 2003-01-13 Akim Demaille <akim@epita.fr>,
3829 Quoc Peyrot <chojin@lrde.epita.fr>,
3830 Robert Anisko <anisko_r@lrde.epita.fr>
3831
3832 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
3833 when the stacks contain one element, as the loop would otherwise
3834 free the last state, and then use the top state (the one we just
3835 popped). This means that the initial elements will not be freed
3836 explicitly, as is the case in yacc.c; it is not a problem, as
3837 these elements have fake values.
3838
3839 2003-01-11 Paul Eggert <eggert@twinsun.com>
3840
3841 * NEWS: %expect-violations are now just warnings, reverting
3842 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
3843 bootstrapping problem reported by Matthias Klose; see
3844 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
3845 * src/conflicts.c (conflicts_print): Likewise.
3846 * tests/conflicts.at (%expect not enough, %expect too much,
3847 %expect with reduce conflicts): Likewise.
3848 * doc/bison.texinfo (Expect Decl): Document this. Also mention
3849 that the warning is enabled if the number of conflicts changes
3850 (not necessarily increases).
3851
3852 * src/getargs.c (version): Update copyright year.
3853
3854 2003-01-09 Akim Demaille <akim@epita.fr>
3855
3856 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
3857
3858 2003-01-08 Paul Eggert <eggert@twinsun.com>
3859
3860 * Makefile.maint (WGETFLAGS):
3861 New macro, containing "-C off" to disable proxy caches.
3862 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
3863 (rel-check): Use $(WGET) instead of wget.
3864
3865 2003-01-06 Paul Eggert <eggert@twinsun.com>
3866
3867 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
3868 the GLR paper of Scott, Johnstone and Hussain.
3869
3870 2003-01-04 Paul Eggert <eggert@twinsun.com>
3871
3872 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
3873 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
3874 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
3875 (EXTRA_LIBRARIES): New var, for liby.a.
3876 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
3877 (EXTRA_SCRIPTS): New var, for yacc.
3878
3879 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
3880 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
3881 Problem reported by Nelson H. F. Beebe.
3882
3883 2003-01-03 Paul Eggert <eggert@twinsun.com>
3884
3885 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
3886 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
3887 when compiling Bison 1.875's `bitset bset = obstack_alloc
3888 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
3889
3890 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
3891 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
3892 grow to a huge size with typical invocation.
3893
3894 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
3895 Use the pattern recommended by Autoconf 2.57, except also protect
3896 against double-definition.
3897 * src/system.h: Likewise.
3898 Portability issues reported by Nelson H. F. Beebe.
3899
3900 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
3901 All uses changed. Provide a definition in both C and C++.
3902 (yytrue, yyfalse): Define even if defined (__cplusplus).
3903
3904 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
3905 Reported by Nelson H. F. Beebe.
3906
3907 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
3908
3909 2003-01-02 Paul Eggert <eggert@twinsun.com>
3910
3911 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
3912 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
3913 Bug reported by Nelson H. F. Beebe.
3914
3915 2003-01-01 Paul Eggert <eggert@twinsun.com>
3916
3917 * Version 1.875.
3918
3919 2002-12-30 Paul Eggert <eggert@twinsun.com>
3920
3921 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
3922 Moved here from...
3923 (<INITIAL>","): Here. This causes stray "," to be treated
3924 more uniformly.
3925
3926 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
3927 last brace in braced code when not in Yacc mode, for compatibility
3928 with Bison 1.35. This resurrects the 2001-12-15 patch to
3929 src/reader.c.
3930
3931 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
3932 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
3933
3934 2002-12-28 Paul Eggert <eggert@twinsun.com>
3935
3936 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
3937 that of SYM's type. This fixes Debian bug 168069, reported by
3938 Thomas Olsson.
3939
3940 2002-12-28 Paul Eggert <eggert@twinsun.com>
3941
3942 Version 1.75f.
3943
3944 Switch back to the Yacc style of conflict reports, undoing some
3945 of the 2002-07-30 change.
3946 * doc/bison.texinfo (Understanding): Use Yacc style for
3947 conflict reports. Also, use new way of locating rules.
3948 * src/conflicts.c (conflict_report):
3949 Renamed from conflict_report_yacc, removing the old
3950 'conflict_report'. Translate the entire conflict report at once,
3951 so that we don't assume that "," has the same interpretation in
3952 all languages.
3953 (conflicts_output): Use Yacc-style conflict report for each state,
3954 instead of our more-complicated style.
3955 (conflicts_print): Use Yacc-style conflict report, except print
3956 the input file name when not emulating Yacc.
3957 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
3958 Conflicted Reduction, %expect not enough, %expect too much,
3959 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
3960 * tests/existing.at (GNU Cim Grammar): Likewise.
3961 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
3962
3963 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
3964 fatal): Don't invoke fflush; it's not needed and it might even be
3965 harmful for stdout, as stdout might not be open.
3966 * src/reduce.c (reduce_print): Likewise.
3967
3968 2002-12-27 Paul Eggert <eggert@twinsun.com>
3969
3970 Fix a bug where error locations were not being recorded correctly.
3971 This problem was originally reported by Paul Hilfinger in
3972 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
3973
3974 * data/yacc.c (yyparse): New local var yylerrsp, to record the
3975 top of the location stack's error locations.
3976 (yyerrlab): Set it. When discarding a token, push its location
3977 onto yylerrsp so that we don't lose track of the error's end.
3978 (yyerrlab1): Now is only the target of YYERROR, so that we can
3979 properly record the location of the action that failed. For GCC
3980 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
3981 GCC warning about yyerrlab1 being unused if YYERROR is unused.
3982 (yyerrlab2): New label, which yyerrlab now falls through to.
3983 Compute the error's location by applying YYLLOC_DEFAULT to
3984 the locations of all the symbols that went into the error.
3985 * doc/bison.texinfo (Location Default Action): Mention that
3986 YYLLOC_DEFAULT is also invoked for syntax errors.
3987 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
3988 Error locations include the locations of all the tokens that were
3989 discarded, not just the last token.
3990
3991 2002-12-26 Paul Eggert <eggert@twinsun.com>
3992
3993 * src/files.c: Include quote.h.
3994 (compute_output_file_names): Warn if we detect conflicting
3995 outputs to the same file. This should catch the misunderstanding
3996 exemplified by Debian Bug 165349, reported by Bruce Stephens..
3997
3998 * src/conflicts.c (conflicts_print): If the user specifies
3999 "%expect N", report an error if there are any reduce/reduce
4000 conflicts. This is what the manual says should happen.
4001 This fixes Debian bug 130890, reported by Anthony DeRobertis.
4002 * tests/conflicts.at (%expect with reduce conflicts): New test.
4003
4004 Don't use m4_include on relative file names, as it doesn't work as
4005 desired if there happens to be a file with that name under ".".
4006
4007 * m4sugar/version.m4: Remove; it was included but it wasn't used.
4008 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
4009 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
4010 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
4011 * src/output.c (output_skeleton): Use full path names when
4012 specifying a file to include; don't rely on include path, as
4013 it's unreliable when the working file contains a file with
4014 that name.
4015
4016 2002-12-25 Paul Eggert <eggert@twinsun.com>
4017
4018 Remove obsolete references to bison.simple and bison.hairy.
4019 Problem mentioned by Aubin Mahe in
4020 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
4021 * data/glr.c: Comment fix.
4022 * doc/bison.1: Remove references. Also, mention "yacc".
4023
4024 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
4025 with -g option.
4026
4027 * src/parse-gram.y (declaration): Use enum "report_states" rather
4028 than its numeric value 1.
4029
4030 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
4031 opening a new one. This fixes Debian bug 165349, reported by
4032 Bruce Stephens.
4033
4034 2002-12-24 Paul Eggert <eggert@twinsun.com>
4035
4036 Version 1.75e.
4037
4038 * Makefile.maint (cvs-update): Don't assume that the shell
4039 supports $(...), as Solaris sh doesn't.
4040
4041 * src/parse-gram.y (lloc_default): Remove test for empty
4042 nonterminals at the end, since it didn't change the result.
4043
4044 2002-12-24 Paul Eggert <eggert@twinsun.com>
4045
4046 If the user does not define YYSTYPE as a macro, Bison now declares it
4047 using typedef instead of defining it as a macro. POSIX requires this.
4048 For consistency, YYLTYPE is also declared instead of defined.
4049
4050 %union directives can now have a tag before the `{', e.g., the
4051 directive `%union foo {...}' now generates the C code
4052 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
4053 The default union tag is `YYSTYPE', for compatibility with Solaris 9
4054 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
4055 instead of `yyltype'.
4056
4057 `yystype' and `yyltype' are now obsolescent macros instead of being
4058 typedefs or tags; they are no longer documented and will be
4059 withdrawn in a future release.
4060
4061 * data/glr.c (b4_location_type): Remove.
4062 (YYSTYPE): Renamed from yystype.
4063 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
4064 (struct YYLTYPE): Renamed from struct yyltype.
4065 (YYLTYPE): Renamed from yyltype.
4066 (yyltype, yystype): New (and obsolescent) macros,
4067 for backward compatibility.
4068 * data/yacc.c: Likewise.
4069
4070 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
4071 does not specify a union tag. This is for compatibility with
4072 Solaris 9 yacc.
4073
4074 * src/parse-gram.y (add_param): 2nd arg is now char * not char
4075 const *, since it is now modified by stripping surrounding { }.
4076 (current_braced_code): Remove.
4077 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
4078 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
4079 trailing " {...}". Now of type <chars>.
4080 (grammar_declaration): Adjust to bundled tokens.
4081 (code_content): Remove; stripping is now done by add_param.
4082 (print_token_value): Print contents of bundled tokens.
4083 (token_name): New function.
4084
4085 * src/reader.h (braced_code, current_braced_code): Remove.
4086 (token_name): New decl.
4087
4088 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
4089 token_type, not braced_code code_kind. All uses changed.
4090 (SC_PRE_CODE): New state, for scanning after a keyword that
4091 has (or usually has) an immediately-following braced code.
4092 (token_type): New local var, to keep track of which token type
4093 to return when scanning braced code.
4094 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
4095 <INITIAL>"%parse-param", <INITIAL>"%printer",
4096 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
4097 instead of returning a token type immediately.
4098 (<INITIAL>"{"): Set token type.
4099 (<SC_BRACED_CODE>"}"): Use it.
4100 (handle_action_dollar, handle_action_at): Now returns bool
4101 indicating success. Fail if ! current_rule; this prevents a core dump.
4102 (handle_symbol_code_dollar, handle_symbol_code_at):
4103 Remove; merge body into caller.
4104 (handle_dollar, handle_at): Complain in invalid contexts.
4105
4106 * NEWS, doc/bison.texinfo: Document the above.
4107 * NEWS: Fix years and program names in copyright notice.
4108
4109 2002-12-17 Paul Eggert <eggert@twinsun.com>
4110
4111 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
4112 Reporting, Table of Symbols): Omit mentions of %lex-param and
4113 %parse-param from the documentation for now.
4114
4115 2002-12-15 Paul Eggert <eggert@twinsun.com>
4116
4117 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
4118 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
4119 lookahead symbol, and which sets yychar in parser actions) and it
4120 disagreed with the Bison documentation. Bug
4121 reported by Andrew Walrond.
4122
4123 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
4124 as the caller now does that.
4125 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
4126 (YYEMPTY): Parenthesize right hand side, since others use it.
4127 (yyparse): Don't assume that our generated code is the only code
4128 that sets yychar.
4129
4130 2002-12-13 Paul Eggert <eggert@twinsun.com>
4131
4132 Version 1.75d.
4133
4134 POSIX requires a "yacc" command.
4135 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
4136 (MOSTLYCLEANFILES): Add yacc.
4137 (yacc): New rule.
4138 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
4139 as an alias for bison y.
4140
4141 * po/LINGUAS: Add da.
4142
4143 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
4144 problem with latest <getopt.h>.
4145 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
4146
4147 * doc/fdl.texi: Upgrade to 1.2.
4148 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
4149 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
4150 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
4151 gnulib.
4152 * config/install-sh: Sync with autotools.
4153
4154 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
4155 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
4156 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
4157 locations are requested.
4158 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
4159 locations are requested.
4160
4161 2002-12-12 Paul Eggert <eggert@twinsun.com>
4162
4163 Remove unportable casts and storage allocation tricks.
4164 While we're at it, remove almost all casts, since they
4165 usually aren't needed and are a sign of trouble.
4166
4167 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
4168
4169 * src/derives.c (derives_compute): Do not subtract NTOKENS from
4170 the pointer DSET returned by malloc; this isn't portable.
4171 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
4172 Similarly for DERIVES.
4173 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
4174 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
4175 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
4176
4177 * src/derives.c (derives_compute): Do not bother invoking
4178 int_of_rule_number, since rule numbers are integers.
4179
4180 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
4181 rather than XMALLOC (char, N).
4182
4183 * src/files.c (filename_split): Rewrite to avoid cast.
4184
4185 * src/gram.h (symbol_number_as_item_number,
4186 item_number_as_symbol_number, rule_number_as_item_number,
4187 item_number_as_rule_number):
4188 Now inline functions rather than macros, to avoid casts.
4189 * src/state.h (state_number_as_int): Likewise.
4190 * src/tables.c (state_number_to_vector_number,
4191 symbol_number_to_vector_number): Likewise.
4192
4193 * src/gram.h (int_of_rule_number): Remove; no longer used.
4194
4195 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
4196 since the resulting storage is always stored into.
4197
4198 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
4199 where it's needed.
4200
4201 * src/muscle_tab.c (muscle_m4_output):
4202 Now inline. Return bool, not int.
4203 * src/state.c (state_compare): Likewise.
4204 * src/symtab.c (symbol_check_defined,
4205 symbol_check_alias_consistency, symbol_pack, symbol_translation,
4206 hash_compare_symbol, hash_symbol):
4207 Likewise.
4208 * src/uniqstr.c (uniqstr_print): Likewise.
4209 * src/muscle_tab.c (muscle_m4_output_processor):
4210 New function, to avoid casts.
4211 * src/state.c (state_comparator, stage_hasher): Likewise.
4212 * src/symtab.c (symbol_check_defined_processor,
4213 symbol_check_alias_consistency_processor, symbol_pack_processor,
4214 symbol_translation_processor, hash_symbol_comparator,
4215 hash_symbol_hasher): Likewise.
4216 * src/uniqstr.c (uniqstr_print_processor): Likewise.
4217 * src/muscle_tab.c (muscles_m4_output):
4218 Use new functions instead of casting old functions unportably.
4219 * src/state.c (state_hash_new): Likewise.
4220 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
4221 symbols_token_translations_init):
4222 Likewise.
4223 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
4224
4225 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
4226 var instead of casting to long, to avoid casts.
4227 (prepare_states): Use MALLOC rather than alloca, so that we don't
4228 have to worry about alloca.
4229 * src/state.c (state_hash_lookup): Likewise.
4230
4231 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
4232 local var instead of casting to unsigned char, to avoid casts.
4233
4234 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
4235 STATE_ALLOC): Remove.
4236 (transitions_new, errs_new, reductions_new, state_new): Use malloc
4237 rather than calloc, and use offsetof to avoid allocating slightly
4238 too much storage.
4239 (state_new): Initialize all members.
4240
4241 * src/state.c (state_hash): Use unsigned accumulator, not signed.
4242
4243 * src/symtab.c (symbol_free): Remove; unused.
4244 (symbol_get): Remove cast in lhs of assignment.
4245 (symbols_do): Now static. Accept generic arguments, not
4246 hashing-related ones.
4247
4248 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
4249 (symbol_processor): Remove.
4250 (symbols_do): Remove decl; now static.
4251
4252 * src/system.h (alloca): Remove; decl no longer needed.
4253 (<stddef.h>): Include, for offsetof.
4254 (<inttypes.>, <stdint.h>): Include if available.
4255 (uintptr_t): New type, if system lacks it.
4256 (CALLOC, MALLOC, REALLOC): New macros.
4257 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
4258 new macros.
4259
4260 * src/tables.c (table_size): Now int, to pacify GCC.
4261 (table_grow, table_ninf_remap): Use signed table size.
4262 (save_row): Don't bother initializing locals when not needed.
4263 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
4264 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
4265
4266 * src/vcg.h: Correct misspellings.
4267
4268 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
4269
4270
4271 * src/getargs.c (getargs): Don't assume EOF == -1.
4272
4273 2002-12-09 Paul Eggert <eggert@twinsun.com>
4274
4275 Change identifier spellings to avoid collisions with names
4276 that are reserved by POSIX.
4277
4278 Don't use names ending in _t, since POSIX reserves them.
4279 For consistency, remove _e and _s endings -- they're weren't
4280 needed to remove ambiguity. All uses changed.
4281 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
4282 turn was just renamed from struniq_t.
4283 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
4284 which in turn was just renamed from struniq_processor_t.
4285 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
4286 in turn was renamed from hash_compare_struniq_t.
4287 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
4288 (state_list): Renamed from state_list_t.
4289 * src/assoc.h (assoc): Renamed from assoc_t.
4290 * src/conflicts.c (enum conflict_resolution): Renamed from
4291 enum conflict_resolution_e.
4292 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
4293 (rule_list): Renamed from rule_list_t.
4294 * src/getargs.h (enum trace): Renamed from enum trace_e.
4295 (enum report): Renamed from enum report_e.
4296 * src/gram.h (item_number): Renamed from item_number_t.
4297 (rule_number): Renamed from rule_number_t.
4298 (struct rule_s): Remove the "rule_s" part; not used.
4299 (rule): Renamed from rule_t.
4300 (rule_filter): Renamed from rule_filter_t.
4301 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
4302 (goto_list): Renamed from goto_list_t.
4303 * src/lalr.h (goto_number): Renamed from goto_number_t.
4304 * src/location.h (location): Renamed from location_t.
4305 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
4306 and moved here from:
4307 * src/muscle_tab.h (muscle_entry_t): here.
4308 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
4309 (rule_list): Renamed from rule_list_t.
4310 * src/print_graph.c (static_graph): Renamed from graph.
4311 * src/reader.h (braced_code): Renamed from braced_code_t.
4312 Remove brace_code_e tag.
4313 * src/relation.h (relation_node): Renamed from relation_node_t.
4314 (relation_nodes): Renamed from relation_nodes_t.
4315 (relation): Renamed from relation_t.
4316 * src/state.h (state_number): Renamed from state_number_t.
4317 (struct state): Renamed from struct state_s.
4318 (state): Renamed from state_t.
4319 (transitions): Renamed from transitions_t. Unused (and
4320 misspelled) transtion_s tag removed.
4321 (errs): Renamed from errs_t. Unused errs_s tag removed.
4322 (reductions): Renamed from reductions_t. Unused tag
4323 reductions_s removed.
4324 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
4325 (struct symbol_list): Renamed from struct symbol_list_s.
4326 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
4327 (struct symbol): Renamed from struct symbol_s.
4328 (symbol): Renamed from symbol_t.
4329 * src/tables.c (vector_number): Renamed from vector_number_t.
4330 (action_number): Renamed from action_t.
4331 * src/tables.h (base_number): Renamed from base_t.
4332 * src/vcg.h (enum color): Renamed from enum color_e.
4333 (enum textmode): Renamed from enum textmode_e.
4334 (enum shape): Renamed from enum shape_e.
4335 (struct colorentry): Renamed from struct colorentry_s.
4336 (struct classname): Renamed from struct classname_s.
4337 (struct infoname): Renamed from struct infoname_s.
4338 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
4339 (enum decision): Renamed from enum decision_e.
4340 (enum orientation): Renamed from enum orientation_e.
4341 (enum alignment): Renamed from enum alignment_e.
4342 (enum arrow_mode): Renamed from enum arrow_mode_e.
4343 (enum crossing_type): Renamed from enum crossing_type_e.
4344 (enum view): Renamed from enum view_e.
4345 (struct node): Renamed from struct node_s.
4346 (node): Renamed from node_t.
4347 (enum linestyle): Renamed from enum linestyle_e.
4348 (enum arrowstyle): Renamed from enum arrowstyle_e.
4349 (struct edge): Renamed from struct edge.
4350 (edge): Renamed from edge_t.
4351 (struct graph): Renamed from struct graph_s.
4352 (graph): Renamed from graph_t.
4353 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
4354 Rename value_t -> value.
4355 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
4356 value_t_as_yystype -> value_as_yystype.
4357
4358 Don't include <errno.h> in the mainstream code, since it
4359 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
4360 * lib/get-errno.c, lib/get-errno.h: New files.
4361 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
4362 get-errno.c.
4363 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
4364 * src/output.c (output_skeleton): Likewise.
4365 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
4366 instead of errno.
4367 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
4368 Likewise.
4369 (handle_action_dollar, handle_action_at): Likewise.
4370 * src/system.h: Do not include <errno.h>.
4371 (TAB_EXT): Renamed from EXT_TAB.
4372 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
4373
4374 Avoid str[a-z]*, since <string.h> reserves that name space.
4375 Change all instances of "struniq" in names to "uniqstr", and
4376 likewise for "STRUNIQ" and "UNIQSTR".
4377 * src/uniqstr.c: Renamed from src/struniq.c.
4378 * src/uniqstr.h: Renamed from src/struniq.h.
4379 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
4380 * src/files.c (strsuffix): Remove; unused.
4381 (concat2): Renamed from stringappend. Now static.
4382 * src/files.h (strsuffix, stringappend): Remove; unused.
4383 * src/parse-gram.y (<chars>): Renamed from <string>.
4384 (<uniqstr>): Renamed from <struniq>.
4385 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
4386 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
4387 (struct graph_s.expand): Renamed from struct graph_s.stretch.
4388 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
4389 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
4390 (N_EXPAND): Renamed from N_STRETCH.
4391
4392 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
4393 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
4394 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
4395 Remove; unused.
4396 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
4397 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
4398 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
4399 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
4400 (BASE_MAXIMUM): Renamed from BASE_MAX.
4401 (BASE_MINIMUM): Renamed from BASE_MIN.
4402 (ACTION_MAX): Remove; unused.
4403 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
4404 Unnecessary casts removed from above defines.
4405
4406
4407 Fix misspelling in names.
4408 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
4409 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
4410 G_NODE_ALIGNEMENT.
4411
4412
4413 * lib/timevar.c (timevar_report): Renamed from time_report,
4414 for consistency with other names.
4415 * lib/timevar.h (timevar_report): New decl.
4416 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
4417
4418
4419 Sort include-file uses.
4420
4421 Reorder all include files under src to be in the order "system.h".
4422 then the ../lib include files in angle brackets (alphabetized),
4423 then the . include files in double-quotes (alphabetized). Fix
4424 dependency breakages encountered in this process, as follows:
4425 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
4426 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
4427 * src/state.h: Include "symtab.h".
4428
4429 2002-12-08 Paul Eggert <eggert@twinsun.com>
4430
4431 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
4432 since this causes problems when __file__ contains character
4433 sequences like "@" that are treated specially by src/scan-skel.l.
4434 Instead, just use the file's basename. This fixes the bug
4435 reported by Martin Mokrejs in
4436 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
4437
4438 2002-12-06 Paul Eggert <eggert@twinsun.com>
4439
4440 Add support for rules that do not have trailing semicolons, as
4441 POSIX requires. Improve the quality of locations in Bison
4442 diagnostics.
4443
4444 * src/location.c: Include <quotearg.h>.
4445 (empty_location): Now const.
4446 (location_print): New function. Follow the recommendation of the
4447 GNU Coding Standards for locations that span file boundaries.
4448 * src/location.h: Do not include <quotearg.h>; no longer needed.
4449 (boundary): New type.
4450 (location_t): Use it. This allows locations to span file boundaries.
4451 All member uses changed: file -> start.file or end.file (as needed),
4452 first_line -> start.line, first_column -> start.column,
4453 last_line -> end.line, last_column -> end.column.
4454 (equal_boundaries): New function.
4455 (LOCATION_RESET, LOCATION_STEP): Remove.
4456 (LOCATION_PRINT): Remove. All callers changed to use location_print.
4457 (empty_location): Now const.
4458 (location_print): New decl.
4459 * src/parse-gram.y (lloc_default): New function, which handles
4460 empty locations more accurately.
4461 (YYLLOC_DEFAULT): Use it.
4462 (%token COLON): Remove.
4463 (%token ID_COLON): New token.
4464 (rules): Use it.
4465 (declarations, rules): Remove trailing semicolon.
4466 (declaration, rules_or_grammar_declaration):
4467 Allow empty (";") declaration.
4468 (symbol_def): Remove empty actions; no longer needed.
4469 (rules_or_grammar_declaration): Remove trailing semicolon.
4470 (semi_colon.opt): Remove.
4471 * src/reader.h: Include location.h.
4472 (scanner_cursor): New decl.
4473 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
4474 rolling our own.
4475 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
4476 of *loc.
4477 (STEP): Remove. No longer needed, now that adjust_location does
4478 the work. All uses removed.
4479 (scanner_cursor): New var.
4480 (adjust_location): Renamed from extend_location. It now sets
4481 *loc and adjusts the scanner cursor. All uses changed.
4482 Don't bother testing for CR.
4483 (handle_syncline): Remove location arg; now updates scanner cursor.
4484 All callers changed.
4485 (unexpected_end_of_file): Now accepts start boundary of token or
4486 comment, not location. All callers changed. Update scanner cursor,
4487 not the location.
4488 (SC_AFTER_IDENTIFIER): New state.
4489 (context_state): Renamed from c_context. All uses changed.
4490 (id_loc, code_start, token_start): New local vars.
4491 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
4492 processing of Yacc white space and equivalents here.
4493 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
4494 instead of returning ID immediately, since we need to search for
4495 a subsequent colon.
4496 (<INITIAL>"'", "\""): Save token_start.
4497 (<INITIAL>"%{", "{", "%%"): Save code_start.
4498 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
4499 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
4500 BEGIN context_state at end, not INITIAL.
4501 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
4502 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
4503 Return correct token start.
4504 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
4505 the start of a character, string or multiline comment is found.
4506 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
4507 Reduction): Adjust reported locations to match the more-precise
4508 results now expected.
4509 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
4510 * tests/reduce.at (Useless Rules, Reduced Automaton,
4511 Underivable Rules): Likewise.
4512 * tests/regression.at (Invalid inputs): No longer `expecting ";"
4513 or "|"' now that so many other tokens are allowed by the new grammar.
4514
4515 * src/complain.h (current_file): Remove duplicate decl;
4516 current_file is now owned by files.h.
4517 * src/complain.c, src/scan-gram.l: Include files.h.
4518
4519 2002-12-06 Paul Eggert <eggert@twinsun.com>
4520
4521 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
4522 promotes to int; it might be unsigned int.
4523 * data/yacc.c (yy_reduce_print): Likewise.
4524
4525 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
4526 be #defined in the prologue, not in the Bison declarations.
4527 This fixes Debian Bug 102878, reported by Shaul Karl.
4528
4529 2002-12-02 Paul Eggert <eggert@twinsun.com>
4530
4531 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
4532 * lib/strtoul.c: New file, from gnulib.
4533 This fixes a porting bug reported by Peter Klein in
4534 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
4535
4536 2002-11-30 Paul Eggert <eggert@twinsun.com>
4537
4538 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
4539 and put only a forward declaration in the prologue. This is for
4540 consistency with the other scanner helper functions.
4541
4542 Type clashes now generate warnings, not errors, since it
4543 appears that POSIX may allow some grammars with type clashes.
4544 * src/reader.c (grammar_current_rule_check): Warn about
4545 type clashes instead of complaining.
4546 * tests/input.at (Type Clashes): Expect warnings, not complaints.
4547
4548 Add Yacc library, since POSIX requires it.
4549 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
4550 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
4551 * lib/main.c, lib/yyerror.c: New files.
4552
4553 gram_error can be static; it need not be extern.
4554 * src/reader.h (gram_error): Remove decl.
4555 * src/parse-gram.y (gram_error): Now static. Add static decl.
4556 (print_token_value): Omit parameter names from forward decl,
4557 for consistency.
4558
4559 2002-11-29 Paul Eggert <eggert@twinsun.com>
4560
4561 * doc/bison.texinfo: Emphasize that yylex and yyerror must
4562 be declared before being used. E.g., one should typically
4563 declare them in the prologue. Use GNU coding style in examples.
4564 Put "const" consistently after the type it modifies. Mention
4565 that C99 supports "inline". Mention that yyerror traditionally
4566 returns "int".
4567
4568 %parse-param and %lex-param now take just one argument, the
4569 declaration; the argument name is deduced from the declaration.
4570
4571 * doc/bison.texinfo (Parser Function, Pure Calling, Error
4572 Reporting, Table of Symbols): Document this.
4573 * src/parse-gram.y (add_param): New function.
4574 (COMMA): Remove.
4575 (declaration): Implement new rule for %parse-param and %lex-param.
4576 * src/scan-gram.l: "," now elicits a warning, rather than being
4577 a token; this is more compatible with byacc.
4578 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
4579
4580 2002-11-27 Paul Eggert <eggert@twinsun.com>
4581
4582 Rename identifiers to avoid real and potential collisions.
4583
4584 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
4585 to avoid collision with lex macro described by Bruce Lilly in
4586 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
4587 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
4588 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
4589 * src/parse-gram.y (print_token_value): Renamed from yyprint.
4590 All uses changed.
4591 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
4592 The name "yycontrol" violates the name space rules, and this stuff
4593 wasn't being used anyway.
4594 (input): Remove action; this stuff wasn't being used.
4595 (gram_error): Rename local variable yylloc -> loc.
4596 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
4597 (YY_DECL): Don't use "yy" at start of local variables.
4598 All uses changed, e.g., yylloc -> loc.
4599 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
4600 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
4601 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
4602 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
4603
4604 * src/parse-gram.y (gram_error): loc is now const *.
4605 * src/reader.h (gram_error): Likewise.
4606
4607 2002-11-24 Paul Eggert <eggert@twinsun.com>
4608
4609 Version 1.75c.
4610
4611 * tests/actions.at (Actions after errors): Use an output format
4612 more similar to that of the Printers and Destructors test.
4613 Test the position of the ';' token too.
4614 (Printers and Destructors): Likewise.
4615 (Printers and Destructors: %glr-parser): Remove for now, to avoid
4616 unnecessarily alarming people when the test fails.
4617
4618 * data/yacc.c (yyerrlab1): Move this label down, so that the
4619 parser does not discard the lookahead token if the user code
4620 invokes YYERROR. This change is required for POSIX conformance.
4621
4622 * lib/error.c: Sync with gnulib.
4623
4624 2002-11-22 Paul Eggert <eggert@twinsun.com>
4625
4626 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
4627 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
4628 * lib/xmalloc.c: Likewise.
4629
4630 2002-11-20 Paul Eggert <eggert@twinsun.com>
4631
4632 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
4633
4634 2002-11-20 Paul Eggert <eggert@twinsun.com>
4635
4636 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
4637 should use `if (! x) abort ();' rather than `assert (x);', and
4638 anyway it's one less thing to worry about configuring.
4639
4640 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
4641 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
4642 and replace all instances of assert with abort.
4643 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
4644 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
4645
4646 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
4647 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
4648 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
4649 hash_find_entry, hash_rehash, hash_insert): Likewise.
4650 * src/conflicts.c (resolve_sr_conflict): Likewise.
4651 * src/lalr.c (set_goto_map, map_goto): Likewise.
4652 * src/nullable.c (nullable_compute): Likewise.
4653 * src/output.c (prepare_rules, token_definitions_output): Likewise.
4654 * src/reader.c (packgram, reader): Likewise.
4655 * src/state.c (state_new, state_free, state_transitions_set,
4656 state_reduction_find): Likewise.
4657 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
4658 symbol_pack): Likewise.
4659 * src/tables.c (conflict_row, pack_vector): Likewise.
4660 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
4661 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
4662 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
4663 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
4664
4665 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
4666 (ARGMATCH_CONSTRAINT): New macro.
4667 (ARGMATCH_ASSERT): Use it.
4668
4669 * src/system.h (verify): New macro.
4670 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
4671 rather than assert.
4672 * src/tables.c (tables_generate): Likewise.
4673
4674 * src/struniq.c (struniq_assert): Now returns void, and aborts
4675 if the assertion is false.
4676 (struniq_assert_p): Remove.
4677 * src/struniq.h: Likewise.
4678
4679 2002-11-18 Paul Eggert <eggert@twinsun.com>
4680
4681 * data/glr.c (yygetLRActions): Replace `yyindex' with
4682 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
4683 This fixes the regression with Sun ONE Studio 7 cc that I reported in
4684 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
4685
4686 2002-11-18 Akim Demaille <akim@epita.fr>
4687
4688 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
4689 space.
4690 From Tim Van Holder.
4691
4692 2002-11-17 Paul Eggert <eggert@twinsun.com>
4693
4694 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
4695 to "SyntaxError" for consistency with my 2002-11-15 change.
4696
4697 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
4698 not define to {}, since this breaks the common use of `YYDPRINTF
4699 ((...));' if a single statement is desired (e.g. before `else').
4700 Work around GCC warnings by surrounding corresponding calls with
4701 {} if needed.
4702 (yyhasResolvedValue): Remove unused function.
4703 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
4704 loop body.
4705 (yyreportSyntaxError): Renamed from yyreportParseError.
4706 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
4707 All uses changed.
4708 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
4709 extern when possible. Remove unused initializations.
4710
4711 2002-11-16 Akim Demaille <akim@epita.fr>
4712
4713 Augment the similarity between GLR and LALR traces.
4714
4715 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
4716 (YY_REDUCE_PRINT): New.
4717 (yyparse): Use them.
4718 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
4719 YYDPRINT here.
4720 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
4721 state reached after the reduction/recovery, since...
4722 (yyparse, yyprocessOneStack): Report the state we are entering in.
4723
4724 2002-11-16 Akim Demaille <akim@epita.fr>
4725
4726 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
4727 Add support for --trace=skeleton.
4728 * src/scan-skel.l: %option debug.
4729 Scan strings of non-@ or \n instead of character by character.
4730 (scan_skel): Handle trace_skeleton.
4731 (QPUTS): New.
4732 (@output_parser_name@, @output_header_name@): ``Restore'' their
4733 support (used to be M4 macros).
4734 * data/yacc.c: Quote larger chunks, a la glr.c.
4735 * data/lalr1.cc: Likewise.
4736 The header guards are no longer available, so use some other
4737 string than `YYLSP_NEEDED'.
4738
4739 2002-11-16 Akim Demaille <akim@epita.fr>
4740
4741 Make the ``Printers and Destructors'' test more verbose, taking
4742 `yacc.c''s behavior as (possibly wrong) reference.
4743
4744 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
4745 instead of fprint on stdout.
4746 Set and report the last_line of the symbols.
4747 Consistently display values and locations.
4748
4749 2002-11-16 Paul Eggert <eggert@twinsun.com>
4750
4751 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
4752
4753 2002-11-15 Paul Eggert <eggert@twinsun.com>
4754
4755 * tests/actions.at (Actions after errors): New test case.
4756
4757 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
4758 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
4759 tests/action.at, tests/calc.at, tests/conflicts.at,
4760 tests/cxx-type.at, tests/regression.at:
4761 "parse error" -> "syntax error" for POSIX compatibility.
4762 "parsing stack overflow..." -> "parser stack overflow" so
4763 that code matches Bison documentation.
4764
4765 2002-11-15 Akim Demaille <akim@epita.fr>
4766
4767 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
4768 take two BRACED_CODE, not two string_content.
4769 Free the scanner's obstack when we are done.
4770 (code_content): New.
4771 * tests/calc.at: Adjust.
4772 * doc/bison.texinfo: Adjust.
4773 Also, make sure to include the `,' for these declarations.
4774
4775 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
4776
4777 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
4778 definition; avoids potential autoreconf problems.
4779
4780 2002-11-15 Akim Demaille <akim@epita.fr>
4781
4782 Always check the value returned by yyparse.
4783
4784 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
4785 returned by yyparse.
4786 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
4787 Adjust calls.
4788 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
4789 returned by yyparse.
4790
4791 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4792
4793 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
4794 on input.at test.
4795
4796 2002-11-14 Paul Eggert <eggert@twinsun.com>
4797
4798 * src/output.c (output_skeleton): Call xfopen instead of
4799 duplicating xfopen's body.
4800
4801 Fix bugs reported by Nelson H. F. Beebe in
4802 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
4803
4804 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
4805 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
4806 Group compiler. Instead, use "$CC -E bar.c". Include the .h
4807 file twice in the grammar, as an extra check.
4808
4809 * tests/input.at (Torturing the Scanner): Surround the
4810 backslash-newline tests with "#if 0", to make it less likely that
4811 we'll run into compiler bugs. Bring back solitary \ inside
4812 comment, but add a closing comment to work around HP C bug. Don't
4813 test backslash-newline in C character constant.
4814
4815 2002-11-14 Akim Demaille <akim@epita.fr>
4816
4817 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
4818 status of the compiler.
4819 Calling `exit 1' is no longer needed.
4820 Reported by Nelson H. F. Beebe.
4821
4822 2002-11-14 Akim Demaille <akim@epita.fr>
4823
4824 * tests/atlocal.in (CPPFLAGS): We have config.h.
4825 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
4826 New.
4827 * tests/actions.at, tests/calc.at, tests/conflicts.at,
4828 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
4829 * tests/regression.at, tests/torture.at: Use them for all the
4830 grammars that are to be compiled.
4831 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
4832 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
4833 * doc/bison.texinfo (GLR Parsers): Document `inline'.
4834
4835 2002-11-14 Akim Demaille <akim@epita.fr>
4836
4837 * doc/bison.texinfo: Various formatting changes (alignments in
4838 samples, additional @group/@end group, GCS in samples.
4839 Use @deffn instead of simple @table to define the directives,
4840 macros, variables etc.
4841
4842 2002-11-13 Paul Eggert <eggert@twinsun.com>
4843
4844 Fix some bugs reported by Albert Chin-A-Young in
4845 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
4846
4847 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
4848 -o c"; the HP C compiler chatters during compilation.
4849 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
4850 * tests/headers.at (export YYLTYPE): Likewise.
4851
4852 * tests/input.at (Torturing the Scanner): Remove lines containing
4853 solitary backslashes, as they tickle a bug in the HP C compiler.
4854
4855 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
4856 comments, since they're not portable. Use GNU coding style.
4857
4858 2002-11-13 Akim Demaille <akim@epita.fr>
4859
4860 * data/yacc.c: Leave bigger chunks of quoted text.
4861 (YYDSYMPRINTF): New.
4862 Use it to report symbol activities.
4863 * data/glr.c (YYDSYMPRINTF): New.
4864 Use it.
4865
4866 2002-11-12 Paul Eggert <eggert@twinsun.com>
4867
4868 Version 1.75b.
4869
4870 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
4871 (yyglrReduce): Return yyok, not 0.
4872 This should avoid the enumerated-type warnings reported
4873 by Nelson H. F. Beebe in
4874 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
4875
4876 * lib/bbitset.h (BITSET_INLINE): Remove.
4877 * lib/bitset.h [! BITSET_INLINE]: Remove.
4878 (bitset_set, bitset_reset, bitset_test): Rename local vars
4879 to avoid shadowing warnings by GCC.
4880
4881 * data/glr.c (inline): Remove #define. It's the user's
4882 responsibility to #define it away, just like 'const'.
4883 This fixes one of the bugs reported by Nelson H. F. Beebe in
4884 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
4885
4886 * Makefile.maint (po-check): Scan .l and .y files instead of the
4887 .c and the .h files that they generate. This fixes the bug
4888 reported by Tim Van Holder in:
4889 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
4890 Look for N_ as well as for _. Try to avoid matching #define for
4891 N_ and _.
4892 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
4893 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
4894 * src/scan-gram.l: Revamp regular expressions so that " and '
4895 do not confuse xgettext.
4896
4897 * src/struniq.h (struniq_new): Do not declare the return type
4898 to be 'const'; this violates the C standard.
4899 * src/struniq.c (struniq_new): Likewise.
4900
4901 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
4902
4903 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
4904 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
4905 linker.
4906
4907 2002-11-12 Akim Demaille <akim@epita.fr>
4908
4909 * Makefile.maint: Sync with Autoconf:
4910 (local_updates): New.
4911
4912 2002-11-12 Akim Demaille <akim@epita.fr>
4913
4914 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
4915
4916 2002-11-12 Akim Demaille <akim@epita.fr>
4917
4918 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
4919 locations.
4920
4921 2002-11-12 Akim Demaille <akim@epita.fr>
4922
4923 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
4924 not yyvalue.
4925
4926 2002-11-12 Akim Demaille <akim@epita.fr>
4927
4928 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
4929 Use it to test the GLR parser.
4930
4931 2002-11-12 Akim Demaille <akim@epita.fr>
4932
4933 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
4934 defines it.
4935 * data/glr.c (yystos): New.
4936 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
4937 (YYDSYMPRINT): New.
4938 (yyval): Don't define it, it is handled via M4.
4939 (yyrecoverParseError): Free verbosely the discarded symbols.
4940 * data/yacc.c (yysymprint): Remove, rather...
4941 (b4_yysymprint_generate): invoke.
4942 * data/c.m4 (b4_yysymprint_generate): New.
4943 Accept pointers as arguments, as opposed to the version from
4944 yacc.c.
4945 (b4_yydestruct_generate): Likewise.
4946 * tests/cations.at (Printers and Destructors): Use Bison directives
4947 instead of CPP macros.
4948 Don't rely on internal details.
4949
4950 2002-11-12 Akim Demaille <akim@epita.fr>
4951
4952 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
4953 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
4954 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
4955 it against YYEMPTY and so forth), work on yytoken (i.e., set
4956 it to YYEMPTY etc.).
4957 (yydestruct): Replace with a b4_yydestruct_generate invocation.
4958 (b4_symbol_actions): Remove.
4959 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
4960 for 0, end-of-input.
4961
4962 2002-11-12 Akim Demaille <akim@epita.fr>
4963
4964 * doc/bison.texinfo (Destructor Decl): New.
4965
4966 2002-11-12 Akim Demaille <akim@epita.fr>
4967
4968 * src/tables.c (tables_generate): Use free for pointers that
4969 cannot be NULL, not XFREE.
4970 (pack_vector): Use assert, not fatal, for bound violations.
4971 * src/state.c (state_new): Likewise.
4972 * src/reader.c (reader): Likewise.
4973 * src/lalr.c (set_goto_map): Likewise.
4974 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
4975 the file name.
4976
4977 2002-11-12 Akim Demaille <akim@epita.fr>
4978
4979 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
4980 Restore.
4981 * src/scan-gram.l (last_string): Is global to the file, not to
4982 yylex.
4983 * src/parse-gram.y (input): Don't append the epilogue here,
4984 (epilogue.opt): do it here, and free the scanner's obstack.
4985 * src/reader.c (epilogue_set): Rename as...
4986 (epilogue_augment): this.
4987 * data/c.m4 (b4_epilogue): Defaults to empty.
4988
4989 2002-11-12 Akim Demaille <akim@epita.fr>
4990
4991 * src/getargs.c (long_options): Remove duplicates.
4992 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
4993 Remove.
4994 * doc/bison.rnh: Remove.
4995 * doc/bison.texinfo (VMS Invocation): Remove.
4996
4997 2002-11-12 Akim Demaille <akim@epita.fr>
4998
4999 * src/struniq.h, src/struniq.c (struniq_t): Is const.
5000 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
5001
5002 Use struniq for symbols.
5003
5004 * src/symtab.h (symbol_t): The tag member is a struniq.
5005 (symbol_type_set): Adjust.
5006 * src/symtab.c (symbol_new): Takes a struniq.
5007 (symbol_free): Don't free the tag member.
5008 (hash_compare_symbol_t, hash_symbol_t): Rename as...
5009 (hash_compare_symbol, hash_symbol): these.
5010 Use the fact that tags as struniqs.
5011 (symbol_get): Use struniq_new.
5012 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
5013 Returns a strniq.
5014 * src/reader.h (merger_list, grammar_currentmerge_set): The name
5015 and type members are struniqs.
5016 * src/reader.c (get_merge_function)
5017 (grammar_current_rule_merge_set): Adjust.
5018 (TYPE, current_type): Are struniq.
5019
5020 Use struniq for file names.
5021
5022 * src/files.h, src/files.c (infile): Split into...
5023 (grammar_file, current_file): these.
5024 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
5025 * src/reduce.c (reduce_print): Likewise.
5026 * src/getargs.c (getargs): Likewise.
5027 * src/complain.h, src/complain.c: Likewise.
5028 * src/main.c (main): Call struniqs_new early enough to use it for
5029 file names.
5030 Don't free the input file name.
5031
5032 2002-11-12 Akim Demaille <akim@epita.fr>
5033
5034 * src/symtab.c (symbol_free): Remove dead deactivated code:
5035 type_name are properly removed.
5036 Don't use XFREE to free items that cannot be NULL.
5037 * src/struniq.h, src/struniq.c: New.
5038 * src/main.c (main): Initialize/free struniqs.
5039 * src/parse-gram.y (%union): Add astruniq member.
5040 (yyprint): Adjust.
5041 * src/scan-gram.l (<{tag}>): Return a struniq.
5042 Free the obstack bit that used to store it.
5043 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
5044
5045 2002-11-11 Paul Eggert <eggert@twinsun.com>
5046
5047 Revamp to fix many (but not all) of the C- and M4-related quoting
5048 problems. Among other things, this fixes the Bison bug reported
5049 by Jan Hubicka when processing the Bash grammar; see:
5050 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
5051
5052 Use new @ escapes consistently. Represent brackets with @{ and @}
5053 rather than @<:@ and @:>@, since this works a bit better with dumb
5054 editors like vi. Represent @ with @@, since @ is now consistently
5055 an escape. Use @oline@ and @ofile@ rather than __oline__ and
5056 __ofile__, to avoid unexpected expansions. Similarly, use @output
5057 rather than #output.
5058
5059 * data/c.m4 (b4_copyright): Omit file name from comment, since
5060 the file name could contain "*/".
5061 (b4_synclines_flag): Don't quote the 2nd argument; it should already
5062 be quoted. All uses changed.
5063
5064 * data/glr.c: Use new @ escapes consistently.
5065 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
5066 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
5067 Remove, since they couldn't handle arbitrary characters in file
5068 names.
5069 * data/lalr1.cc: Likewise.
5070 * data/yacc.c: Likewise.
5071
5072 * src/files.c (output_infix): Remove; all uses removed.
5073 * src/files.h: Likewise.
5074
5075 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
5076 mishandled funny characters in file names, and anyway it isn't
5077 needed any more.
5078 * data/yacc.c: Likewise.
5079 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
5080
5081 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
5082 * data/yacc.c: Likewise.
5083
5084 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
5085 strings now.
5086 (muscle_init): Quote filename as a C string.
5087 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
5088 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
5089 * src/output.c (escaped_file_name_output): New function.
5090 (prepare_symbols): Quote tokens for M4.
5091 (prepare): Don't insert output_infix, output_prefix,
5092 output_parser_name, output_header_name; this is now down by scan-skel.
5093 Insert skeleton as a C string.
5094
5095 * src/output.c (user_actions_output, symbol_destructors_output,
5096 symbol_printers_output): Quote filenames for C and M4.
5097 * src/reader.c (prologue_augment, epilogue_set): Likewise.
5098
5099 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
5100 escapes other than \\ and \'; this simplifies the code.
5101 (<SC_STRING>): Likewise, for \\ and \".
5102 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
5103 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
5104 Use new escapes @{ and @} for [ and ].
5105
5106 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
5107 them with auto vars.
5108 Switch to new escape scheme, where @ is the escape character uniformly.
5109 Abort if a stray escape character is found. Avoid unbounded input
5110 buffer when parsing non-escaped text.
5111
5112 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
5113 __oline__, #output, $@, and @{ do not have unintended meanings.
5114
5115 2002-11-09 Paul Eggert <eggert@twinsun.com>
5116
5117 Fix the test failure due to GCC warnings described in
5118 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
5119 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
5120 evaluate to 0 if it's impossible for NINF to be in the respective
5121 table.
5122 (yygetLRActions, yyrecoverParseError): Use them.
5123
5124 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
5125 counted in the token inserted at end of file. Now takes
5126 location_t *, not location_t, so that the location can be
5127 adjusted. All uses changed.
5128
5129 * tests/regression.at (Invalid inputs): Adjust wording in
5130 diagnostic to match the new behavior.
5131
5132 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
5133 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
5134 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
5135 abort ();'. This reduces the runtime of the "Many lookaheads"
5136 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
5137 GCC 3.2.
5138
5139 2002-11-07 Paul Eggert <eggert@twinsun.com>
5140
5141 * src/parse-gram.y (CHARACTER): Remove unused token.
5142 All uses removed.
5143
5144 * src/scan-gram.l: Remove stack option. We no longer use the
5145 stack, since the stack was never deeper than 1; instead, use the
5146 new auto var c_context to record the stacked value.
5147
5148 Remove nounput option. At an unexpected end of file, we now unput
5149 the minimal input necessary to end cleanly; this simplifies the
5150 code.
5151
5152 Avoid unbounded token sizes where this is easy.
5153
5154 (unexpected_end_of_file): New function.
5155 Use it to systematize the error message on unexpected EOF.
5156 (last-string): Now auto, not static.
5157 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
5158 (scanner_last_string_free): Remove; not used.
5159 (percent_percent_count): Move decl to just before use.
5160 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
5161 not the (never otherwised-used) CHARACTER.
5162
5163 2002-11-07 Akim Demaille <akim@epita.fr>
5164
5165 Let yyerror always receive the msg as last argument, so that
5166 yyerror can be variadic.
5167
5168 * data/yacc.c (b4_yyerror_args): New.
5169 Use it when calling yyerror.
5170 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
5171 Use it when calling yyerror.
5172 * doc/bison.texinfo (Error Reporting): Adjust.
5173 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
5174 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
5175
5176 2002-11-06 Akim Demaille <akim@epita.fr>
5177
5178 #line should have quoted strings.
5179 Ideally, this should be done by m4_quotearg.
5180
5181 * src/scan-skel.l: Include quotearg.h.
5182 Quote __ofile__.
5183 * src/output.c (symbol_printers_output)
5184 (symbol_destructors_output): Quote the file name.
5185
5186 2002-11-06 Akim Demaille <akim@epita.fr>
5187
5188 * tests/regression.at (Invalid inputs): Adjust to the recent
5189 messages.
5190
5191 2002-11-06 Akim Demaille <akim@epita.fr>
5192
5193 Restore --no-lines.
5194 Reported by Jim Kent.
5195
5196 * data/c.m4 (b4_syncline): New.
5197 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
5198 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
5199 * src/output.c (user_actions_output): Likewise.
5200 (prepare): Define 'b4_synclines_flag'.
5201 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
5202
5203 2002-11-06 Akim Demaille <akim@epita.fr>
5204
5205 * src/main.c (main): Free `infile'.
5206 * src/scan-gram.l (handle_syncline): New.
5207 Recognize `#line'.
5208 * src/output.c (user_actions_output, symbol_destructors_output)
5209 (symbol_printers_output): Use the location's file name, not
5210 infile.
5211 * src/reader.c (prologue_augment, epilogue_set): Likewise.
5212
5213 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5214
5215 * src/tables.c (matching_state): Don't allow states to match if
5216 either has GLR conflict entries.
5217
5218 2002-11-05 Paul Eggert <eggert@twinsun.com>
5219
5220 * src/scan-gram.l: Use more accurate diagnostics, e.g.
5221 "integer out of range" rather than "invalid value".
5222 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
5223 accordingly.
5224
5225 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
5226 Also, remove one static variable in the scanner.
5227
5228 * src/scan-gram.l (braces_level): Now auto, not static.
5229 Initialize to zero if the compiler is being picky.
5230 (INITIAL): Clear braces_level instead of incrementing it.
5231 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
5232 as POSIX 1003.1-2001 requires.
5233 * src/system.h (IF_LINT): New macro, taken from coreutils.
5234 * configure.ac: Define "lint" if --enable-gcc-warnings.
5235
5236 2002-11-05 Akim Demaille <akim@epita.fr>
5237
5238 * src/scan-gram.l: When it starts with `%', complain about the
5239 whole directive, not just that `invalid character: %'.
5240
5241 2002-11-04 Akim Demaille <akim@epita.fr>
5242
5243 * Makefile.maint: Update from Autoconf.
5244 (update, cvs-update, po-update, do-po-update): New.
5245
5246 2002-11-04 Akim Demaille <akim@epita.fr>
5247
5248 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
5249 and yyerror.
5250 Have yyerror `use' its arguments.
5251 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
5252 returns true when location & yacc & pure & parse-param.
5253 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
5254
5255 2002-11-04 Akim Demaille <akim@epita.fr>
5256
5257 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
5258 clashes.
5259 * src/scan-gram.l: Use [\'] instead of ['] to pacify
5260 font-lock-mode.
5261 Use complain_at.
5262 Use quote, not quote_n since LOCATION_PRINT no longer uses the
5263 slot 0.
5264
5265 2002-11-03 Paul Eggert <eggert@twinsun.com>
5266
5267 * src/reader.c (get_merge_function, grammar_current_rule_check):
5268 Use consistent diagnostics for reporting type name clashes.
5269 Quote the types with <>, for consistency with Yacc.
5270 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
5271
5272 2002-11-03 Akim Demaille <akim@epita.fr>
5273
5274 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
5275 New.
5276 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
5277 (b4_parse_param): Remove.
5278 Use b4_identification.
5279 Propagate b4_pure_args where needed to pass them to yyerror.
5280 * data/glr.m4 (b4_parse_param): Remove.
5281 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
5282 (b4_lpure_formals): New.
5283 Use b4_identification.
5284 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
5285 b4_user_formals and b4_user_args.
5286 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
5287 (yyreportAmbiguity): When using a pure parser, also need
5288 the location, and the parse-params.
5289 Adjust callers.
5290 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
5291 When using a pure parser, also need the parse-params.
5292 Adjust callers.
5293 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
5294 (%pure-parser + %parse-param) LALR and GLR parsers.
5295 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
5296 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
5297 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
5298 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
5299 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
5300 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
5301 * doc/bison.texinfo: Untabify the whole file.
5302 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
5303 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
5304 (Error Reporting): Adjust to these new directives.
5305 Document %error-verbose, deprecate YYERROR_VERBOSE.
5306
5307 2002-11-03 Akim Demaille <akim@epita.fr>
5308
5309 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
5310 AT_CHECK_CALC_GLR invocations to use % directives, instead of
5311 command line options.
5312 * tests/cxx-type.at: Formatting changes.
5313
5314 2002-11-03 Paul Eggert <eggert@twinsun.com>
5315
5316 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
5317 to count columns correctly, and to check for invalid inputs.
5318
5319 Use mbsnwidth to count columns correctly. Account for tabs, too.
5320 Include mbswidth.h.
5321 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
5322 (extend_location): New function.
5323 (YY_LINES): Remove.
5324
5325 Handle CRLF in C code rather than in Lex code.
5326 (YY_INPUT): New macro.
5327 (no_cr_read): New function.
5328
5329 Scan UCNs, even though we don't fully handle them yet.
5330 (convert_ucn_to_byte): New function.
5331
5332 Handle backslash-newline correctly in C code.
5333 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
5334 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
5335 all uses changed.
5336 (tag, splice): New EREs. Do not allow NUL or newline in tags.
5337 Use {splice} wherever C allows backslash-newline.
5338 YY_STEP after space, newline, vertical-tab.
5339 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
5340
5341 (letter, id): Don't assume ASCII; e.g., spell out a-z.
5342
5343 ({int}, handle_action_dollar, handle_action_at): Check for integer
5344 overflow.
5345
5346 (YY_STEP): Omit trailing semicolon, so that it's more like C.
5347
5348 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
5349 as well as \000. Check for UCHAR_MAX, not 255.
5350 Allow \x with an arbitrary positive number of digits, as in C.
5351 Check for overflow here.
5352 Allow \? and UCNs, for compatibility with C.
5353
5354 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
5355 with quote slot used by complain_at.
5356
5357 * tests/input.at: Add tests for backslash-newline, m4 quotes
5358 in symbols, long literals, and funny escapes in strings.
5359
5360 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
5361 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
5362 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
5363 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
5364 * m4/mbswidth.m4: New file, from GNU coreutils.
5365
5366 * doc/bison.texinfo (Grammar Outline): Document // comments.
5367 (Symbols): Document that trigraphs have no special meaning in Bison,
5368 nor is backslash-newline allowed.
5369 (Actions): Document that trigraphs have no special meaning.
5370
5371 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
5372 no longer used.
5373
5374 2002-11-02 Paul Eggert <eggert@twinsun.com>
5375
5376 * src/reader.c: Don't include quote.h; not needed.
5377 (get_merge_function): Reword warning to be consistent with
5378 type clash diagnostic in grammar_current_rule_check.
5379
5380 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
5381 bug in trigraph handling.
5382
5383 * src/output.c (prepare_symbols): When printing token names,
5384 escape "[" as "@<:@" and likewise for "]".
5385
5386 * src/system.h (errno): Remove declaration, as we are now
5387 assuming C89 or better, and C89 guarantees errno.
5388
5389 2002-10-30 Paul Eggert <eggert@twinsun.com>
5390
5391 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
5392 Check for close failures.
5393 * src/files.h (xfclose): Return void, not int, since it always
5394 returned zero.
5395 * src/files.c (xfclose): Likewise. Report I/O error if ferror
5396 indicates one.
5397 * src/output.c (output_skeleton): Use xfclose rather than fclose
5398 and ferror. xfclose now checks ferror.
5399
5400 * data/glr.c (YYLEFTMOST_STATE): Remove.
5401 (yyreportTree): Use a stack-based leftmost state. This avoids
5402 our continuing battles with bogus warnings about initializers.
5403
5404 2002-10-30 Akim Demaille <akim@epita.fr>
5405
5406 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
5407 #if.
5408
5409 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5410
5411 * tests/glr-regr1.at: New test for reported regressions.
5412 * tests/testsuite.at: Add glr-regr1.at test.
5413 * tests/Makefile.am: Add glr-regr1.at test.
5414
5415 2002-10-24 Paul Eggert <eggert@twinsun.com>
5416
5417 Version 1.75a.
5418
5419 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
5420 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
5421 we use malloc. Don't assume 'A' through 'Z' are contiguous.
5422 Don't assume strdup exists; POSIX says its an XSI extension.
5423 Check for buffer overflow on input.
5424
5425 2002-10-24 Akim Demaille <akim@epita.fr>
5426
5427 * src/output.c (output_skeleton): Don't disable M4sugar comments
5428 too soon: it results in comments being expanded.
5429 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
5430 first output.
5431
5432 2002-10-24 Akim Demaille <akim@epita.fr>
5433
5434 * data/yacc.c (m4_int_type): New.
5435 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
5436 char' as only yacc.c wants K&R portability.
5437 * data/glr.c (yysigned_char): Remove.
5438 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
5439 Reported by Quoc Peyrot.
5440
5441 2002-10-23 Paul Eggert <eggert@twinsun.com>
5442
5443 * src/main.c (main): With --trace=time, report times even if a
5444 non-fatal error occurs. Formerly, the times were reported in some
5445 such cases but not in others.
5446 * src/reader.c (reader): Just return if a complaint has been issued,
5447 instead of exiting, so that 'main' can report times.
5448
5449 2002-10-22 Akim Demaille <akim@epita.fr>
5450
5451 * src/system.h: Include sys/types.
5452 Reported by Bert Deknuydt.
5453
5454 2002-10-23 Paul Eggert <eggert@twinsun.com>
5455
5456 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
5457 Suggested by Art Haas.
5458
5459 2002-10-22 Paul Eggert <eggert@twinsun.com>
5460
5461 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
5462 decl; not needed any more.
5463 * src/main.c (main): Use return to exit, undoing yesterday's change.
5464 The last OS that we could find where this wouldn't work is
5465 SunOS 3.5, and that's too old to worry about now.
5466
5467 * data/glr.c (struct yyltype): Define members even when not
5468 doing locations. This is more consistent with yacc.c, and it
5469 works around the following bug reports:
5470 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
5471 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
5472
5473 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
5474 @acronym consistently. Standardize on "Yacc" instead of "YACC",
5475 "Algol" instead of "ALGOL". Give a bit more history about BNF.
5476
5477 2002-10-22 Akim Demaille <akim@epita.fr>
5478
5479 * data/README: New.
5480
5481 2002-10-21 Paul Eggert <eggert@twinsun.com>
5482
5483 Be consistent about 'bool'; the old code used an enum in one
5484 module and an int in another, and this violates the C standard.
5485 * m4/stdbool.m4: New file, from coreutils 4.5.3.
5486 * configure.ac (AC_HEADER_STDBOOL): Add.
5487 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
5488 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
5489 * src/symtab.c (hash_compare_symbol_t): Likewise.
5490 * src/system.h (bool, false, true): Use a definition consistent
5491 with ../lib/hash.c. All uses changed.
5492
5493 * src/complain.c (warning_issued): Renamed from warn_message_count,
5494 so that we needn't worry about integer overflow (!).
5495 Now of type bool. All uses changed.
5496 (complaint_issued): Renamed from complain_message_count; likewise.
5497
5498 * src/main.c (main): Use exit to exit with failure.
5499
5500 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
5501 rather than 1 and 0.
5502 * src/main.c (main): Likewise.
5503 * src/getargs.c (getargs): Likewise.
5504 * src/reader.c (reader): Likewise.
5505
5506 * src/getarg.c (getargs): Remove duplicate code for
5507 "Try `bison --help'".
5508
5509 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
5510 What was that "2" for?
5511
5512 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
5513 * src/getargs.c (usage): Likewise.
5514
5515 * src/getargs.c (getargs): When there are too few operands, report
5516 the last one. When there are too many, report the first extra
5517 one. This is how diffutils does it.
5518
5519 2002-10-20 Paul Eggert <eggert@twinsun.com>
5520
5521 Remove K&R vestiges.
5522 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
5523 * src/complain.c (VA_START): Remove. Assume prototypes.
5524 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
5525 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
5526 fatal): Assume prototypes.
5527 * src/complain.h: Assume prototypes.
5528 * src/system.h (PARAMS): Remove.
5529 Include <limits.h> unconditionally, since it's guaranteeed even
5530 for a freestanding C89 compiler.
5531 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
5532 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
5533
5534 2002-10-20 Akim Demaille <akim@epita.fr>
5535
5536 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
5537 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
5538 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
5539 (yyresolveStates, yyresolveAction, yyresolveStack)
5540 (yyprocessOneStack): Use them.
5541 (yy_reduce_print): New.
5542 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
5543
5544 2002-10-20 Akim Demaille <akim@epita.fr>
5545
5546 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
5547 arguments and output `void'.
5548 (b4_c_function): Rename as...
5549 (b4_c_function_def): this.
5550 (b4_c_function_decl, b4_c_ansi_function_def)
5551 (b4_c_ansi_function_decl): New.
5552 Change the interpretation of the arguments: before `int, foo', now
5553 `int foo, foo'.
5554 * data/yacc.c (yyparse): Prototype and define thanks to these.
5555 Adjust b4_c_function_def uses.
5556 * data/glr.c (yyparse): Likewise, but ANSI only.
5557
5558 2002-10-20 Akim Demaille <akim@epita.fr>
5559
5560 * src/output.c (prepare): Move the definition of `tokens_number',
5561 `nterms_number', `undef_token_number', `user_token_number_max'
5562 to...
5563 (prepare_tokens): Here.
5564 (prepare_tokens): Rename as...
5565 (prepare_symbols): this.
5566 (prepare): Move the definition of `rules_number' to...
5567 (prepare_rules): here.
5568 (prepare): Move the definition of `last', `final_state_number',
5569 `states_number' to...
5570 (prepare_states): here.
5571 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
5572
5573 2002-10-20 Akim Demaille <akim@epita.fr>
5574
5575 * src/tables.h, src/tables.c, src/output.c: Comment changes.
5576
5577 2002-10-20 Akim Demaille <akim@epita.fr>
5578
5579 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
5580 * data/c.m4: here.
5581
5582 2002-10-20 Akim Demaille <akim@epita.fr>
5583
5584 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
5585 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
5586 `pair'.
5587 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
5588 `name' to...
5589 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
5590 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
5591 These.
5592
5593 2002-10-19 Paul Eggert <eggert@twinsun.com>
5594
5595 Do not create a temporary file, as that involves security and
5596 cleanup headaches. Instead, use a pair of pipes.
5597 Derived from a suggestion by Florian Krohm.
5598 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
5599 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
5600 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
5601 (BISON_PREREQ_SUBPIPE): Add.
5602 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
5603 Add subpipe.h, subpipe.c.
5604 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
5605 * po/POTFILES.in: Add lib/subpipe.c.
5606 * src/output.c: Include "subpipe.h".
5607 (m4_invoke): Remove decl.
5608 (scan_skel): New decl.
5609 (output_skeleton): Use pipe rather than temporary file for m4 input.
5610 Check that m4sugar.m4 is readable, to avoid deadlock.
5611 Check for pipe I/O error.
5612 * src/scan-skel.l (readpipe): Remove decl.
5613 (scan_skel): New function, to be used in place of m4_invoke.
5614 Read from stream rather than file.
5615
5616 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
5617 float, as this generates a warning on Solaris 8 + GCC 3.2 with
5618 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
5619 this generates a more-accurate value anyway.
5620
5621 * lib/timevar.c (timervar_accumulate): Rename locals to
5622 avoid confusion with similarly-named more-global.
5623 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
5624
5625 * src/output.c (prepare): Use xstrdup to convert char const *
5626 to char *, to avoid GCC warning.
5627
5628 2002-10-19 Akim Demaille <akim@epita.fr>
5629
5630 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
5631 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
5632 Use them to have `calc.y' ready for %pure-parser.
5633 * data/yacc.c (YYLEX): Pass a yylex return type to
5634 b4_c_function_call.
5635
5636 2002-10-19 Akim Demaille <akim@epita.fr>
5637
5638 Prototype support of %lex-param and %parse-param.
5639
5640 * src/parse-gram.y: Add the definition of the %lex-param and
5641 %parse-param tokens, plus their rules.
5642 Drop the `_' version of %glr-parser.
5643 Add the "," token.
5644 * src/scan-gram.l (INITIAL): Scan them.
5645 * src/muscle_tab.c: Comment changes.
5646 (muscle_insert, muscle_find): Rename `pair' as `probe'.
5647 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
5648 (muscle_entry_s): The `value' member is no longer const.
5649 Adjust all dependencies.
5650 * src/muscle_tab.c (muscle_init): Adjust: use
5651 MUSCLE_INSERT_STRING.
5652 Initialize the obstack earlier.
5653 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
5654 (muscle_pair_list_grow): New.
5655 * data/c.m4 (b4_c_function_call, b4_c_args): New.
5656 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
5657 * tests/calc.at: Use %locations, not --locations.
5658 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
5659
5660 2002-10-19 Akim Demaille <akim@epita.fr>
5661
5662 * src/getargs.c (usage): Take status as argument and exit
5663 accordingly.
5664 Report the traditional `Try ... --help' message when status != 0.
5665 (usage, version): Don't take a FILE * as arg, it is pointless.
5666 (getargs): When there is an incorrect number of arguments, make it
5667 an error, and report it GNUlically thanks to `usage ()'.
5668
5669 2002-10-18 Paul Eggert <eggert@twinsun.com>
5670
5671 * data/glr.c (yyreportParseError): Don't assume that sprintf
5672 yields the length of the printed string, as this is not true
5673 on SunOS 4.1.4. Reported by Peter Klein.
5674
5675 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
5676 * tests/conflicts.at (%nonassoc and eof): Likewise.
5677 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
5678
5679 2002-10-17 Akim Demaille <akim@epita.fr>
5680
5681 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
5682 * src/getargs.c (trace_types, trace_args): Adjust.
5683 * src/reader.c (grammar_current_rule_prec_set)
5684 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
5685 Standardize error messages.
5686 And s/@prec/%prec/!
5687 (reader): Use trace_flag to enable scanner/parser debugging,
5688 instead of an adhoc scheme.
5689 * src/scan-gram.l: Remove trailing debugging code.
5690
5691 2002-10-16 Paul Eggert <eggert@twinsun.com>
5692
5693 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
5694 MUSCLE_TAB_H.
5695
5696 * NEWS: Officially drop support for building Bison with K&R C,
5697 since it didn't work anyway and it's not worth worrying about.
5698 * Makefile.maint (wget_files): Remove ansi2knr.c.
5699 (ansi2knr.c-url_prefix): Remove.
5700 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
5701 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
5702 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
5703
5704 2002-10-15 Paul Eggert <eggert@twinsun.com>
5705
5706 Stop using the "enum_" trick for K&R-style function definitions;
5707 it confused me, and I was the author! Instead, assume that people
5708 who want to use K&R C compilers (when using these modules in GCC,
5709 perhaps?) will run ansi2knr.
5710
5711 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
5712 All uses of "enum_" changed to "enum ".
5713 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
5714 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
5715
5716 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
5717 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
5718 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
5719 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
5720 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
5721 abitset_not, abitset_ones, abitset_or, abitset_or_and,
5722 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
5723 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
5724 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
5725 Use function prototypes; this removes the need for declaring
5726 static functions simply to provide their prototypes.
5727 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
5728 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
5729 bitset_count_, bitset_create, bitset_dump, bitset_first,
5730 bitset_free, bitset_init, bitset_last, bitset_next,
5731 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
5732 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
5733 bitset_print, bitset_release_memory, bitset_toggle_,
5734 bitset_type_choose, bitset_type_get, bitset_type_name_get,
5735 debug_bitset): Likewise.
5736 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
5737 * lib/bitset_stats.c (bitset_log_histogram_print,
5738 bitset_percent_histogram_print, bitset_stats_and,
5739 bitset_stats_and_cmp, bitset_stats_and_or,
5740 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
5741 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
5742 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
5743 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
5744 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
5745 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
5746 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
5747 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
5748 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
5749 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
5750 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
5751 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
5752 bitset_stats_zero): Likewise.
5753 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
5754 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
5755 bitsetv_dump, debug_bitsetv): Likewise.
5756 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
5757 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
5758 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
5759 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
5760 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
5761 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
5762 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
5763 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
5764 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
5765 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
5766 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
5767 Likewise.
5768 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
5769 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
5770 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
5771 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
5772 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
5773 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
5774 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
5775 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
5776 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
5777 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
5778 lbitset_xor_cmp, lbitset_zero): Likewise.
5779
5780 2002-10-14 Akim Demaille <akim@epita.fr>
5781
5782 Version 1.75.
5783
5784 2002-10-14 Akim Demaille <akim@epita.fr>
5785
5786 * tests/Makefile.am (maintainer-check-posix): New.
5787
5788 2002-10-14 Akim Demaille <akim@epita.fr>
5789
5790 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
5791 member.
5792
5793 2002-10-14 Akim Demaille <akim@epita.fr>
5794
5795 * src/tables.c (table_ninf_remap): base -> tab.
5796 Reported by Matt Rosing.
5797
5798 2002-10-14 Paul Eggert <eggert@twinsun.com>
5799
5800 * tests/action.at, tests/calc.at, tests/conflicts.at,
5801 tests/cxx-type.at, tests/headers.at, tests/input.at,
5802 tests/regression.at, tests/synclines.at, tests/torture.at:
5803 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
5804 so that the tests still work even if POSIXLY_CORRECT is set.
5805 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
5806
5807 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
5808 for portability to K&R hosts. Fix typo: signed char is guaranteed
5809 only to 127, not to 128.
5810 * data/glr.c (yysigned_char): New type.
5811 * data/yacc.c (yysigned_char): Likewise.
5812 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
5813
5814 2002-10-13 Paul Eggert <eggert@twinsun.com>
5815
5816 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
5817 true due to limited range of data type" warning from GCC.
5818
5819 * data/c.m4 (b4_token_defines): Protect against double-inclusion
5820 by wrapping enum yytokentype's definition inside #ifndef
5821 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
5822
5823 2002-10-13 Akim Demaille <akim@epita.fr>
5824
5825 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
5826 Un yy- yyrhs to avoid the name clash with the global YYRHS.
5827
5828 2002-10-13 Akim Demaille <akim@epita.fr>
5829
5830 * Makefile.maint: Update from Autoconf 2.54.
5831 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
5832
5833 2002-10-13 Akim Demaille <akim@epita.fr>
5834
5835 * src/print.c (print_state): Separate the list of solved conflicts
5836 from the other items.
5837 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
5838
5839 2002-10-13 Akim Demaille <akim@epita.fr>
5840
5841 Let nondeterministic skeletons be usable with deterministic
5842 tables.
5843
5844 With the patch, GAWK compiled by GCC without -O2 passes its test
5845 suite using a GLR parser driven by LALR tables. It fails with -O2
5846 because `struct stat' gives two different answers on my machine:
5847 88 (definition of an auto var) and later 96 (memset on this var).
5848 Hence the stack is badly corrumpted. The headers inclusion is to
5849 blame: if I move the awk.h inclusion before GLR's system header
5850 inclusion, the two struct stat have the same size.
5851
5852 * src/tables.c (pack_table): Always create conflict_table.
5853 (token_actions): Always create conflict_list.
5854 * data/glr.c (YYFLAG): Remove, unused.
5855
5856 2002-10-13 Akim Demaille <akim@epita.fr>
5857
5858 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
5859 (O0FLAGS): New.
5860 (VALGRIND, GXX): New.
5861 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
5862 * tests/bison.in: Run $PREBISON a pre-command.
5863 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
5864 (maintainer-check-g++): New.
5865 * Makefile.am (maintainer-check): New.
5866
5867 2002-10-13 Akim Demaille <akim@epita.fr>
5868
5869 * data/glr.c: Formatting changes.
5870 Tweak some trace messages to match yacc.c's.
5871
5872 2002-10-13 Akim Demaille <akim@epita.fr>
5873
5874 GLR parsers sometimes raise parse errors instead of performing the
5875 default reduction.
5876 Reported by Charles-Henry de Boysson.
5877
5878 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
5879 check the length of the traces when %glr.
5880 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
5881 GLR's traces.
5882 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
5883 Test GLR parsers.
5884 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
5885 (yyltype): Remove the yy prefix from the member names.
5886 (yytable): Complete its comment.
5887 (yygetLRActions): Map error action number from YYTABLE from
5888 YYTABLE_NINF to 0.
5889 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
5890 (which was a bug: it should have been YYTABEL_NINF, and yet it was
5891 not satisfying as we could compare an YYACTION computed from
5892 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
5893 only value for error actions.
5894 (yyreportParseError): In verbose parse error messages, don't issue
5895 `error' in the list of expected tokens.
5896 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
5897 next action to perform to match glr.c's decoding.
5898 (yytable): Complete its comment.
5899
5900 2002-10-13 Paul Eggert <eggert@twinsun.com>
5901
5902 Fix problem reported by Henrik Grubbstroem in
5903 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
5904 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
5905 because the Bison parser reads the second action before reducing
5906 the first one.
5907 * src/scan-gram.l (rule_length): New static var.
5908 Use it to keep track of the rule length in the scanner, since
5909 we can't expect the parser to be in lock-step sync with the scanner.
5910 (handle_action_dollar, handle_action_at): Use this var.
5911 * tests/actions.at (Exotic Dollars): Test for the problem.
5912
5913 2002-10-12 Paul Eggert <eggert@twinsun.com>
5914
5915 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
5916 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
5917 Include <sys/time.h> when checking for clock_t and struct tms.
5918 Use same include order as source.
5919 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
5920 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
5921
5922 * lib/timevar.c: Update copyright date and clarify comments.
5923 (get_time) [IN_GCC]: Keep the GCC version for reference.
5924
5925 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
5926 GCC version as of today, then merge Bison's changes.
5927 Change "GCC" to "Bison" in copyright notice. timevar.def's
5928 author is Akim, so change that too.
5929
5930 * src/reader.c (grammar_current_rule_check):
5931 Don't worry about the default action if $$ is untyped.
5932 Prevents bogus warnings reported by Jim Gifford in
5933 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
5934
5935 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
5936 * data/glr.c, data/lalr1.cc, data/yacc.c:
5937 Output token definitions before the first part of user declarations.
5938 Fixes compatibility problem reported by Jim Gifford for kbd in
5939 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
5940
5941 2002-10-11 Paul Eggert <eggert@twinsun.com>
5942
5943 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
5944 (yyparse): here. This undoes some of the 2002-07-25 change.
5945 Compatibility problem reported by Ralf S. Engelschall with
5946 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
5947
5948 2002-10-11 Akim Demaille <akim@epita.fr>
5949
5950 * tests/regression.at Characters Escapes): New.
5951 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
5952 characters.
5953 Reported by Jan Nieuwenhuizen.
5954
5955 2002-10-11 Akim Demaille <akim@epita.fr>
5956
5957 * po/id.po: New.
5958
5959 2002-10-10 Paul Eggert <eggert@twinsun.com>
5960
5961 Portability fixes for bitsets; this also avoids several GCC
5962 warnings.
5963
5964 * lib/abitset.c: Include <stddef.h>, for offsetof.
5965 * lib/lbitset.c: Likewise.
5966
5967 * lib/abitset.c (abitset_bytes): Return a size that is aligned
5968 properly for vectors of objects. Do not assume that adding a
5969 header size to a multiple of a word size yields a value that is
5970 properly aligned for the whole union.
5971 * lib/bitsetv.c (bitsetv_alloc): Likewise.
5972
5973 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
5974 unique names for structures.
5975 * lib/ebitset.c (ebitset_bytes): Likewise.
5976 * lib/lbitset.c (lbitset_bytes): Likewise.
5977
5978 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
5979 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
5980 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
5981 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
5982 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
5983 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
5984 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
5985 to improve the type-checking that GCC can do.
5986 * lib/bitset.c (bitset_op4_cmp): Likewise.
5987 * lib/bitset_stats.c (bitset_stats_count,
5988 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
5989 bitset_stats_copy, bitset_stats_disjoint_p,
5990 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
5991 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
5992 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
5993 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
5994 bitset_stats_and_or_cmp, bitset_stats_andn_or,
5995 bitset_stats_andn_or_cmp, bitset_stats_or_and,
5996 bitset_stats_or_and_cmp): Likewise.
5997 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
5998 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
5999 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
6000 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
6001
6002 * lib/abitset.h: Include bitset.h, not bbitset.h.
6003 * lib/ebitset.h: Likewise.
6004 * lib/lbitset.h: Likewise.
6005
6006 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
6007 All instances of parameters of type enum bitset_opts are now of
6008 type enum_bitset_opts, to conform to the C Standard, and similarly
6009 for enum_bitset_type.
6010 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
6011 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
6012
6013 Do not use "struct bitset_struct" to mean different things in
6014 different modules. Not only is this confusing, it violates
6015 the C Standard, which requires that structure types in different
6016 modules must be compatible if one is to be passed to the other.
6017 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
6018 All instances of "struct bitset_struct *" replaced with "bitset".
6019 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
6020 (union bitset_union, struct abitset_struct, struct ebitset_struct,
6021 struct lbitset_struct, struct bitset_stats_struct): New types.
6022 All uses of struct bitset_struct changed to union bitset_union,
6023 etc.
6024 * lib/abitset.c (struct abitset_struct, abitset,
6025 struct bitset_struct): Remove.
6026 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
6027 struct bitset_struct): Remove.
6028 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
6029 bitset_struct): Remove.
6030 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
6031 Likewise.
6032
6033 Do not call a function of type T using a call that assumes the
6034 function is of a different type U. Standard C requires that a
6035 function must be called with a type that is compatible with its
6036 definition.
6037 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
6038 New decls.
6039 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
6040 New functions.
6041 * lib/ebitset.c (PFV): Remove.
6042 * lib/lbitset.c (PFV): Likewise.
6043 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
6044 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
6045 decls.
6046 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
6047 (ebitset_vtable): Use them.
6048 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
6049 lbitset_xor): New functions.
6050 (lbitset_vtable): Use them.
6051
6052 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
6053 Declare.
6054
6055 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
6056 GCC warning.
6057 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
6058 Use offsetof, for simplicity.
6059
6060 2002-10-06 Paul Eggert <eggert@twinsun.com>
6061
6062 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
6063 the same width as int. This reapplies a hunk of the 2002-08-12 patch
6064 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
6065 which was inadvertently undone by the 2002-09-30 patch.
6066 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
6067 the same width as int.
6068
6069 2002-10-04 Paul Eggert <eggert@twinsun.com>
6070
6071 Version 1.50.
6072
6073 * configure.ac (AC_INIT), NEWS: Increment version number.
6074
6075 * doc/bison.texinfo: Minor spelling, grammar, and white space
6076 fixes.
6077 (Symbols): Mention that any negative value returned from yylex
6078 signifies end-of-input. Warn about negative chars. Mention
6079 the portable Standard C character set.
6080
6081 The GNU coding standard says CFLAGS and YFLAGS are reserved
6082 for the installer to set.
6083 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
6084 * src/Makefile.am (AM_CFLAGS): Likewise.
6085 (AM_YFLAGS): Renamed from YFLAGS.
6086
6087 Fix some MAX and MIN problems.
6088 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
6089 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
6090 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
6091 * src/reader.c (reader): Use it.
6092
6093 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
6094 POSIX 1003.1-2001 has removed fgrep.
6095
6096 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
6097
6098 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
6099 interpreted as signed.
6100 * lib/ebitset.c (ebitset_list): Fix bug.
6101
6102 2002-10-01 Paul Eggert <eggert@twinsun.com>
6103
6104 More fixes for 64-bit hosts and large bitsets.
6105
6106 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
6107 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
6108 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
6109 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
6110 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
6111 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
6112 bitset_count_): Likewise.
6113 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
6114 bitset_first, bitset_last): Likewise.
6115 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
6116 bitset_stats_list_reverse, bitset_stats_size,
6117 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
6118 Likewise.
6119 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
6120 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
6121 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
6122 bitsetv_reflexive_transitive_closure): Likewise.
6123 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
6124 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
6125 Likewise.
6126 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
6127 Likewise.
6128
6129 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
6130 Use size_t, not unsigned int, to count bytes.
6131 * lib/abitset.h (abitset_bytes): Likewise.
6132 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
6133 Likewise.
6134 * lib/bitset.h (bitset_bytes): Likewise.
6135 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
6136 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
6137 * lib/bitsetv.c (bitsetv_alloc): Likewise.
6138 * lib/ebitset.c (ebitset_bytes): Likewise.
6139 * lib/ebitset.h (ebitset_bytes): Likewise.
6140 * lib/lbitset.c (lbitset_bytes): Likewise.
6141 * lib/lbitset.h (lbitset_bytes): Likewise.
6142
6143 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
6144 abitset_subset_p, abitset_disjoint_p, abitset_and,
6145 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
6146 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
6147 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
6148 abitset_or_and, abitset_or_and_cmp):
6149 Use bitset_windex instead of unsigned int.
6150 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
6151 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
6152 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
6153 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
6154 Likewise.
6155 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
6156
6157 * lib/bitset.c (bitset_print):
6158 Use proper printf formats for widths of integer types.
6159 * lib/bitset_stats.c (bitset_percent_histogram_print,
6160 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
6161 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
6162 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
6163 * lib/lbitset.c (lbitset_bytes): Likewise.
6164
6165 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
6166 BITSET_SIZE_MAX): New macros.
6167 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
6168 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
6169 to BITSET_WINDEX_MAX.
6170
6171 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
6172 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
6173 since we now return the bitset_bindex type (not int).
6174
6175 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
6176 when computing sizes.
6177 * lib/ebitset.c (ebitset_elts_grow): Likewise.
6178
6179 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
6180 and avoid cast to unsigned.
6181
6182 2002-09-30 Akim Demaille <akim@epita.fr>
6183
6184 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
6185 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
6186 Updates from Michael Hayes.
6187
6188 2002-09-30 Art Haas <ahaas@neosoft.com>
6189
6190 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
6191 invocations.
6192 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
6193 defined.
6194
6195 2002-09-27 Akim Demaille <akim@epita.fr>
6196
6197 Version 1.49c.
6198
6199 2002-09-27 Akim Demaille <akim@epita.fr>
6200
6201 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
6202 (Because of AC_LIBSOURCE).
6203
6204 2002-09-27 Akim Demaille <akim@epita.fr>
6205
6206 Playing with Autoscan.
6207
6208 * configure.ac: Remove the old LIBOBJ tweaks.
6209 (AC_REPLACE_FUNCS): Add strrchr and strtol.
6210 * lib/strrchr.c: New.
6211 * lib/strtol.c: New, from the Coreutils 4.5.1.
6212
6213 2002-09-27 Akim Demaille <akim@epita.fr>
6214
6215 Playing with Autoscan.
6216
6217 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
6218 * lib/Makefile.am (libbison_a_SOURCES): No longer include
6219 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
6220 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
6221 Coreutils 4.5.1.
6222
6223 2002-09-24 Akim Demaille <akim@epita.fr>
6224
6225 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
6226 (Frequently Asked Questions, Parser Stack Overflow): New.
6227
6228 2002-09-13 Akim Demaille <akim@epita.fr>
6229
6230 Playing with autoscan.
6231
6232 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
6233 * src/files.c (skeleton_find): Remove, unused.
6234 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
6235 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
6236
6237 2002-09-13 Akim Demaille <akim@epita.fr>
6238
6239 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
6240 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
6241
6242 2002-09-13 Akim Demaille <akim@epita.fr>
6243
6244 * configure.ac: Require 2.54.
6245 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
6246 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
6247 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
6248 Remove, provided by Autoconf macros.
6249
6250 2002-09-12 Akim Demaille <akim@epita.fr>
6251
6252 * m4/prereq.m4: Update, from Coreutils 4.5.1.
6253
6254 2002-09-12 Akim Demaille <akim@epita.fr>
6255
6256 * m4/prereq.m4: Update, from Fileutils 4.1.5.
6257 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
6258 Reported by Martin Mokrejs.
6259
6260 2002-09-10 Akim Demaille <akim@epita.fr>
6261
6262 * src/parse-gram.y: Associate a human readable string to each
6263 token type.
6264 * tests/regression.at (Invalid inputs): Adjust.
6265
6266 2002-09-10 Gary V. Vaughan <gary@gnu.org>
6267
6268 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
6269 with an Autoconf-2.5x style configure.ac.
6270
6271 2002-09-06 Paul Eggert <eggert@twinsun.com>
6272
6273 * doc/bison.texinfo (Conditions): Make explicit that the GPL
6274 exception applies only to yacc.c. This is a modification of a
6275 patch originally suggested by Akim Demaille.
6276
6277 2002-09-06 Akim Demaille <akim@epita.fr>
6278
6279 * data/c.m4 (b4_copyright): Move the GPL exception comment from
6280 here to...
6281 * data/yacc.c: here.
6282
6283 * data/lalr1.cc (struct yyltype): Don't define it, since we use
6284 LocationType.
6285 (b4_ltype): Default to yy::Location from location.hh.
6286
6287 2002-09-04 Jim Meyering <jim@meyering.net>
6288
6289 * data/yacc.c: Guard the declaration of yytoknum also with
6290 `#ifdef YYPRINT', so it is declared only when used.
6291
6292 2002-09-04 Akim Demaille <akim@epita.fr>
6293
6294 * configure.in: Rename as...
6295 * configure.ac: this.
6296 Bump to 1.49c.
6297
6298 2002-09-04 Akim Demaille <akim@epita.fr>
6299
6300 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
6301 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
6302 translate maintainer only messages.
6303
6304 2002-08-12 Paul Eggert <eggert@twinsun.com>
6305
6306 Version 1.49b.
6307
6308 * Makefile.am (SUBDIRS): Remove intl.
6309 (DISTCLEANFILES): Remove.
6310 * NEWS: Mention that GNU M4 is now required. Clarify what is
6311 meant by "larger grammars". Mention the pt_BR translation.
6312 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
6313 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
6314 Bump version from 0.11.2 to 0.11.5.
6315 (BISON_PREREQ_STAGE): Remove.
6316 (AM_GNU_GETTEXT): Use external gettext.
6317 (AC_OUTPUT): Remove intl/Makefile.
6318
6319 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
6320
6321 * data/glr.c: Include string.h, for strlen.
6322 (yyreportParseError): Use size_t for yysize.
6323 (yy_yypstack): No longer nested inside yypstates, as nested
6324 functions are not portable. Do not assume size_t is the
6325 same width as int.
6326 (yypstates): Do not assume that ptrdiff_t is the same width
6327 as int, and similarly for yyposn and YYINDEX.
6328
6329 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
6330
6331 * lib/Makefile.am (INCLUDES): Do not include from the intl
6332 directory, which has been removed.
6333 * src/Makefile.am (INCLUDES): Likewise.
6334
6335 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
6336 (bitsets_sources, additional_bitsets_sources, timevars_sources):
6337 New vars.
6338
6339 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
6340 * tests/Makefile.am (EXTRA_DIST): Likewise.
6341
6342 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
6343 Do not assume that bitset_windex is the same width as unsigned.
6344
6345 * lib/abitset.c (abitset_unused_clear): Do not assume that
6346 bitset_word is the same width as int.
6347 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
6348 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
6349 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
6350 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
6351 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
6352
6353 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
6354 portability to one's complement hosts!).
6355 * lib/ebitset.c (ebitset_op1): Likewise.
6356 * lib/lbitset.c (lbitset_op1): Likewise.
6357
6358 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
6359 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
6360 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
6361 Sync with fileutils.
6362 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
6363 lib/gettext.h: Sync with diffutils.
6364
6365 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
6366 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
6367
6368 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
6369 PROTOTYPES to check for prototypes, and "defined __STDC__" to
6370 check for void *.
6371
6372 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
6373 size_t; the old version tried to do this but casted improperly.
6374 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
6375 (bitset_test): Now returns int, not unsigned long.
6376
6377 * lib/bitset_stats.c: Include "gettext.h".
6378 (_): New macro.
6379 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
6380 name locals "index", as it generates unnecessary warnings on some
6381 hosts that have an "index" function.
6382
6383 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
6384 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
6385 they need translation.
6386 * src/LR0.c (state_list_append, new_itemsets, get_state,
6387 append_states, generate_states): Likewise.
6388 * src/assoc.c (assoc_to_string): Likewise.
6389 * src/closure.c (print_closure, set_firsts, closure): Likewise.
6390 * src/gram.c (grammar_dump): Likewise.
6391 * src/injections.c (injections_compute): Likewise.
6392 * src/lalr.c (lookaheads_print): Likewise.
6393 * src/relation.c (relation_transpose): Likewise.
6394 * src/scan-gram.l: Likewise.
6395 * src/tables.c (table_grow, pack_vector): Likewise.
6396
6397 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
6398 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
6399 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
6400 * m4/mbstate_t.m4: Sync with fileutils.
6401 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
6402
6403 * po/LINGUAS: Add pt_BR.
6404 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
6405 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
6406 lib/timevar.c.
6407 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
6408 manual recommends.
6409 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
6410
6411 * src/complain.c (strerror_r): Remove decl; not needed.
6412 (strerror): Use same pattern as ../lib/error.c.
6413
6414 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
6415
6416 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
6417
6418 * src/main.c (main): Cast result of bindtextdomain and textdomain
6419 to void, to avoid a GCC warning when --disable-nls is in effect.
6420
6421 * src/scan-gram.l: Use strings rather than escapes when possible,
6422 to minimize the number of warnings from xgettext.
6423 (handle_action_dollar, handle_action_at): Don't use isdigit,
6424 as it mishandles negative chars and it may not work as expected
6425 outside the C locale.
6426
6427 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
6428 this is a GCC extension and is not portable to other compilers.
6429
6430 * src/system.h (alloca): Use same pattern as ../lib/error.c.
6431 Do not include <ctype.h>; no longer needed.
6432 Do not include <malloc.h>; no longer needed (and generates
6433 warnings on OpenBSD 3.0).
6434
6435 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
6436 it's not portable.
6437
6438 * tests/regression.at: Do not use 'cc -c input.c -o input';
6439 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
6440
6441 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
6442 exit status as failure, not just exit status 1. Sun C exits
6443 with status 2 sometimes.
6444
6445 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
6446 Use it for the two large tests.
6447
6448 2002-08-02 Akim Demaille <akim@epita.fr>
6449
6450 * src/conflicts.c (conflicts_output): Don't output rules never
6451 reduced here, since anyway that computation doesn't work.
6452 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
6453 (rule_useless_p, rule_never_reduced_p): New.
6454 (grammar_rules_partial_print): Use a filter instead of a range.
6455 Display the title only if needed.
6456 (grammar_rules_print): Adjust.
6457 (grammar_rules_never_reduced_report): New.
6458 * src/tables.c (action_row): Move the computation of rules never
6459 reduced to...
6460 (token_actions): here.
6461 * src/main.c (main): Make the parser before making the report, so
6462 that rules never reduced are computed.
6463 Call grammar_rules_never_reduced_report.
6464 * src/print.c (print_results): Report rules never reduced.
6465 * tests/conflicts.at, tests/reduce.at: Adjust.
6466
6467 2002-08-01 Akim Demaille <akim@epita.fr>
6468
6469 Instead of attaching lookaheads and duplicating the rules being
6470 reduced by a state, attach the lookaheads to the reductions.
6471
6472 * src/state.h (state_t): Remove the `lookaheads',
6473 `lookaheads_rule' member.
6474 (reductions_t): Add a `lookaheads' member.
6475 Use a regular array for the `rules'.
6476 * src/state.c (reductions_new): Initialize the lookaheads member
6477 to 0.
6478 (state_rule_lookaheads_print): Adjust.
6479 * src/state.h, src/state.c (state_reductions_find): New.
6480 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
6481 (count_rr_conflicts): Adjust.
6482 * src/lalr.c (LArule): Remove.
6483 (add_lookback_edge): Adjust.
6484 (state_lookaheads_count): New.
6485 (states_lookaheads_initialize): Merge into...
6486 (initialize_LA): this.
6487 (lalr_free): Adjust.
6488 * src/main.c (main): Don't free nullable and derives too early: it
6489 is used by --verbose.
6490 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
6491
6492 2002-08-01 Akim Demaille <akim@epita.fr>
6493
6494 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
6495 `rule_number_t**'.
6496 (set_derives, free_derives): Rename as...
6497 (derives_compute, derives_free): this.
6498 Adjust all dependencies.
6499 * src/nullable.c (set_nullable, free_nullable): Rename as...
6500 (nullable_compute, nullable_free): these.
6501 (rule_list_t): Store rule_t *, not rule_number_t.
6502 * src/state.c (state_rule_lookaheads_print): Directly compare rule
6503 pointers, instead of their numbers.
6504 * src/main.c (main): Call nullable_free, and derives_free earlier,
6505 as they were lo longer used.
6506
6507 2002-08-01 Akim Demaille <akim@epita.fr>
6508
6509 * lib/timevar.c (get_time): Include children time.
6510 * src/lalr.h (LA, LArule): Don't export them: used with the
6511 state_t.
6512 * src/lalr.c (LA, LArule): Static.
6513 * src/lalr.h, src/lalr.c (lalr_free): New.
6514 * src/main.c (main): Call it.
6515 * src/tables.c (pack_vector): Check whether loc is >= to the
6516 table_size, not >.
6517 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
6518 (tables_generate): do it, since that's also it which allocates
6519 them.
6520 Don't free LA and LArule, main does.
6521
6522 2002-07-31 Akim Demaille <akim@epita.fr>
6523
6524 Separate parser tables computation and output.
6525
6526 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
6527 (conflict_list, conflict_list_cnt, table, check, table_ninf)
6528 (yydefgoto, yydefact, high): Move to...
6529 * src/tables.h, src/tables.c: here.
6530 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
6531 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
6532 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
6533 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
6534 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
6535 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
6536 (action_row, save_row, token_actions, save_column, default_goto)
6537 (goto_actions, sort_actions, matching_state, pack_vector)
6538 (table_ninf_remap, pack_table, prepare_actions): Move to...
6539 * src/tables.c: here.
6540 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
6541 * src/output.c (token_actions, output_base, output_conflicts)
6542 (output_check): Merge into...
6543 (prepare_actions): this.
6544 (actions_output): Rename as...
6545 (user_actions_output): this.
6546 * src/main.c (main): Call tables_generate and tables_free.
6547
6548 2002-07-31 Akim Demaille <akim@epita.fr>
6549
6550 Steal GCC's --time-report support.
6551
6552 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
6553 stolen/adjusted from GCC.
6554 * m4/stage.m4: Remove time related checks.
6555 * m4/timevar.m4: New.
6556 * configure.in: Adjust.
6557 * src/system.h: Adjust to using timevar.h.
6558 * src/getargs.h, src/getargs.c: Support trace_time for
6559 --trace=time.
6560 * src/main.c (stage): Remove.
6561 (main): Replace `stage' invocations with timevar calls.
6562 * src/output.c: Insert pertinent timevar calls.
6563
6564 2002-07-31 Akim Demaille <akim@epita.fr>
6565
6566 Let --trace have arguments.
6567
6568 * src/getargs.h (enum trace_e): New.
6569 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
6570 (long_options, short_options): --trace/-T takes an optional
6571 argument.
6572 Change all the uses of trace_flag to reflect the new flags.
6573 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
6574
6575 Strengthen `stage' portability.
6576
6577 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
6578 * configure.in: Use it.
6579 Don't check for malloc.h and sys/times.h.
6580 * src/system.h: Include them when appropriate.
6581 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
6582 times and struct tms are available.
6583
6584 2002-07-30 Akim Demaille <akim@epita.fr>
6585
6586 In verbose parse error message, don't report `error' as an
6587 expected token.
6588 * tests/actions.at (Printers and Destructors): Adjust.
6589 * tests/calc.at (Calculator $1): Adjust.
6590 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
6591 error message, do not report the parser accepts the error token in
6592 that state.
6593
6594 2002-07-30 Akim Demaille <akim@epita.fr>
6595
6596 Normalize conflict related messages.
6597
6598 * src/complain.h, src/complain.c (warn, complain): New.
6599 * src/conflicts.c (conflicts_print): Use them.
6600 (conflict_report_yacc): New, extracted from...
6601 (conflicts_print): here.
6602 * tests/conflicts.at, tests/existing.at: Adjust.
6603
6604 2002-07-30 Akim Demaille <akim@epita.fr>
6605
6606 Report rules which are never reduced by the parser: those hidden
6607 by conflicts.
6608
6609 * src/LR0.c (save_reductions): Don't make the final state too
6610 different: save its reduction (accept) instead of having a state
6611 without any action (no shift or goto, no reduce).
6612 Note: the final state is now a ``regular'' state, i.e., the
6613 parsers now contain `reduce 0' as default reduction.
6614 Nevertheless, since they decide to `accept' when yystate =
6615 final_state, they still will not reduce rule 0.
6616 * src/print.c (print_actions, print_reduction): Adjust.
6617 * src/output.c (action_row): Track reduced rules.
6618 (token_actions): Report rules never reduced.
6619 * tests/conflicts.at, tests/regression.at: Adjust.
6620
6621 2002-07-30 Akim Demaille <akim@epita.fr>
6622
6623 `stage' was accidently included in a previous patch.
6624 Initiate its autoconfiscation.
6625
6626 * configure.in: Look for malloc.h and sys/times.h.
6627 * src/main.c (stage): Adjust.
6628 Report only when trace_flag.
6629
6630 2002-07-29 Akim Demaille <akim@epita.fr>
6631
6632 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
6633 state_number_t.
6634 (errs_t): symbol_t*, not symbol_number_t.
6635 (reductions_t): rule_t*, not rule_number_t.
6636 (FOR_EACH_SHIFT): New.
6637 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
6638 * src/print.c, src/print_graph.c: Adjust.
6639
6640 2002-07-29 Akim Demaille <akim@epita.fr>
6641
6642 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
6643
6644 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
6645 (endtoken, accept): these.
6646 * src/reader.c (reader): Set endtoken's default tag to "$end".
6647 Set undeftoken's tag to "$undefined" instead of "$undefined.".
6648 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
6649 Adjust.
6650
6651 2002-07-29 Akim Demaille <akim@epita.fr>
6652
6653 * src/reduce.c (reduce_grammar): When the language is empty,
6654 complain about the start symbol, not the axiom.
6655 Use its location.
6656 * tests/reduce.at (Empty Language): New.
6657
6658 2002-07-26 Akim Demaille <akim@epita.fr>
6659
6660 * src/reader.h, src/reader.c (gram_error): ... can't get
6661 yycontrol without making too strong assumptions on the parser
6662 itself.
6663 * src/output.c (prepare_tokens): Use the real 0th value of
6664 token_translations instead of `0'.
6665 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
6666 visible here.
6667 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
6668 for the time being: %locations ought to provide it to yyerror.
6669
6670 2002-07-25 Akim Demaille <akim@epita.fr>
6671
6672 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
6673 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
6674 * tests/regression.at (Web2c Actions): Adjust.
6675
6676 2002-07-25 Akim Demaille <akim@epita.fr>
6677
6678 Stop storing rules from 1 to nrules + 1.
6679
6680 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
6681 * src/nullable.c, src/output.c, src/print.c, src/reader.c
6682 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
6683 Iterate from 0 to nrules.
6684 Use rule_number_as_item_number and item_number_as_rule_number.
6685 Adjust to `derive' now containing possibly 0.
6686 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
6687 Handle the `- 1' part in rule numbers from/to item numbers.
6688 * src/conflicts.c (log_resolution): Fix the message which reversed
6689 shift and reduce.
6690 * src/output.c (action_row): Initialize default_rule to -1.
6691 (token_actions): Adjust.
6692 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
6693 expected output.
6694 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
6695
6696 2002-07-25 Akim Demaille <akim@epita.fr>
6697
6698 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
6699 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
6700 (b4_c_knr_arg_decl): New.
6701 * data/yacc.c: Use it to define yysymprint, yydestruct, and
6702 yyreport_parse_error.
6703
6704 2002-07-25 Akim Demaille <akim@epita.fr>
6705
6706 * data/yacc.c (yyreport_parse_error): New, extracted from...
6707 (yyparse): here.
6708 (yydestruct, yysymprint): Move above yyparse.
6709 Be K&R compliant.
6710
6711 2002-07-25 Akim Demaille <akim@epita.fr>
6712
6713 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
6714 replace...
6715 (b4_sint_type, b4_uint_type): these.
6716 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
6717 * tests/regression.at (Web2c Actions): Adjust.
6718
6719 2002-07-25 Akim Demaille <akim@epita.fr>
6720
6721 * src/gram.h (TIEM_NUMBER_MAX): New.
6722 (item_number_of_rule_number, rule_number_of_item_number): Rename
6723 as...
6724 (rule_number_as_item_number, item_number_as_rule_number): these.
6725 Adjust dependencies.
6726 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
6727 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
6728 (symbol_number_to_vector_number): New.
6729 (order): Of vector_number_t* type.
6730 (base_t, BASE_MAX, BASE_MIN): New.
6731 (froms, tos, width, pos, check): Of base_t type.
6732 (action_number_t, ACTION_MIN, ACTION_MAX): New.
6733 (actrow): Of action_number_t type.
6734 (conflrow): Of unsigned int type.
6735 (table_ninf, base_ninf): New.
6736 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
6737 (muscle_insert_int_table, muscle_insert_base_table)
6738 (muscle_insert_rule_number_table): New.
6739 (prepare_tokens): Output `toknum' as int_table.
6740 (action_row): Returns a rule_number_t.
6741 Use ACTION_MIN, not SHRT_MIN.
6742 (token_actions): yydefact is rule_number_t*.
6743 (table_ninf_remap): New.
6744 (pack_table): Use it for `base' and `table'.
6745 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
6746 replaced with...
6747 (YYPACT_NINF, YYTABLE_NINF): these.
6748 (yypact, yytable): Compute their types instead of hard-coded
6749 `short'.
6750 * tests/regression.at (Web2c Actions): Adjust.
6751
6752 2002-07-19 Akim Demaille <akim@epita.fr>
6753
6754 * src/scan-gram.l (id): Can start with an underscore.
6755
6756 2002-07-16 Akim Demaille <akim@epita.fr>
6757
6758 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
6759 Adjust all former `associativity' dependencies.
6760 * src/symtab.c (symbol_new): Default associativity is `undef', not
6761 `right'.
6762 (symbol_check_alias_consistence): Adjust.
6763
6764 2002-07-09 Akim Demaille <akim@epita.fr>
6765
6766 * doc/bison.texinfo: Properly set the ``header'' part.
6767 Use @dircategory ``GNU programming tools'' as per Texinfo's
6768 documentation.
6769 Use @copying.
6770
6771 2002-07-09 Akim Demaille <akim@epita.fr>
6772
6773 * lib/quotearg.h: Protect against multiple inclusions.
6774 * src/location.h (location_t): Add a `file' member.
6775 (LOCATION_RESET, LOCATION_PRINT): Adjust.
6776 * src/complain.c (warn_at, complain_at, fatal_at): Drop
6777 `error_one_per_line' support.
6778
6779 2002-07-09 Akim Demaille <akim@epita.fr>
6780
6781 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
6782 * src/reader.c (lineno): Remove.
6783 Adjust all dependencies.
6784 (get_merge_function): Take a location and use complain_at.
6785 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
6786 * tests/regression.at (Invalid inputs, Mixing %token styles):
6787 Adjust.
6788
6789 2002-07-09 Akim Demaille <akim@epita.fr>
6790
6791 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
6792 recovery rule, and forbid extensions when --yacc.
6793 (gram_error): Use complain_at.
6794 * src/reader.c (reader): Exit if there were parse errors.
6795
6796 2002-07-09 Akim Demaille <akim@epita.fr>
6797
6798 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
6799 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
6800 Reported by R Blake <blakers@mac.com>.
6801
6802 2002-07-09 Akim Demaille <akim@epita.fr>
6803
6804 * data/yacc.c: Output the copyright notive in the header.
6805
6806 2002-07-03 Akim Demaille <akim@epita.fr>
6807
6808 * src/output.c (froms, tos): Are state_number_t.
6809 (save_column): sp, sp1, and sp2 are state_number_t.
6810 (prepare): Rename `final' as `final_state_number', `nnts' as
6811 `nterms_number', `nrules' as `rules_number', `nstates' as
6812 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
6813 unused.
6814 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
6815 * data/lalr1.cc (nsym_): Remove, unused.
6816
6817 2002-07-03 Akim Demaille <akim@epita.fr>
6818
6819 * src/lalr.h, src/lalr.c (goto_number_t): New.
6820 * src/lalr.c (goto_list_t): New.
6821 Propagate them.
6822 * src/nullable.c (rule_list_t): New.
6823 Propagate.
6824 * src/types.h: Remove.
6825
6826 2002-07-03 Akim Demaille <akim@epita.fr>
6827
6828 * src/closure.c (print_fderives): Use rule_rhs_print.
6829 * src/derives.c (print_derives): Use rule_rhs_print.
6830 (rule_list_t): New, replaces `shorts'.
6831 (set_derives): Add comments.
6832 * tests/sets.at (Nullable, Firsts): Adjust.
6833
6834 2002-07-03 Akim Demaille <akim@epita.fr>
6835
6836 * src/output.c (prepare_actions): Free `tally' and `width'.
6837 (prepare_actions): Allocate and free `order'.
6838 * src/symtab.c (symbols_free): Free `symbols'.
6839 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
6840 * src/output.c (m4_invoke): Move to...
6841 * src/scan-skel.l: here.
6842 (<<EOF>>): Close yyout, and free its name.
6843
6844 2002-07-03 Akim Demaille <akim@epita.fr>
6845
6846 Fix some memory leaks, and fix a bug: state 0 was examined twice.
6847
6848 * src/LR0.c (new_state): Merge into...
6849 (state_list_append): this.
6850 (new_states): Merge into...
6851 (generate_states): here.
6852 (set_states): Don't ensure a proper `errs' state member here, do it...
6853 * src/conflicts.c (conflicts_solve): here.
6854 * src/state.h, src/state.c: Comment changes.
6855 (state_t): Rename member `shifts' as `transitions'.
6856 Adjust all dependencies.
6857 (errs_new): For consistency, also take the values as argument.
6858 (errs_dup): Remove.
6859 (state_errs_set): New.
6860 (state_reductions_set, state_transitions_set): Assert that no
6861 previous value was assigned.
6862 (state_free): New.
6863 (states_free): Use it.
6864 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
6865 temporary storage: use `errs' and `nerrs' as elsewhere.
6866 (set_conflicts): Allocate and free this `errs'.
6867
6868 2002-07-02 Akim Demaille <akim@epita.fr>
6869
6870 * lib/libiberty.h: New.
6871 * lib: Update the bitset implementation from upstream.
6872 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
6873 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
6874 * src/main.c: Adjust bitset stats calls.
6875
6876 2002-07-01 Paul Eggert <eggert@twinsun.com>
6877
6878 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
6879 char, so that negative chars don't collide with $.
6880
6881 2002-06-30 Akim Demaille <akim@epita.fr>
6882
6883 Have the GLR tests be `warning' checked, and fix the warnings.
6884
6885 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
6886 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
6887 (yyremoveDeletes): `yyi' and `yyj' are size_t.
6888 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
6889 (yyaddDeferredAction): static.
6890 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
6891 (yyreportParseError): yyprefix is const.
6892 yytokenp is used only when verbose.
6893 (yy__GNUC__): Replace with __GNUC__.
6894 (yypdumpstack): yyi is size_t.
6895 (yypreference): Un-yy local variables and arguments, to avoid
6896 clashes with `yyr1'. Anyway, we are not in the user name space.
6897 (yytname_size): be an int, as is compared with ints.
6898 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
6899 Use them.
6900 * tests/cxx-gram.at: Use quotation to protect $1.
6901 Use AT_COMPILE to enable warnings hunts.
6902 Prototype yylex and yyerror.
6903 `Use' argc.
6904 Include `string.h', not `strings.h'.
6905 Produce and prototype stmtMerge only when used.
6906 yylex takes a location.
6907
6908 2002-06-30 Akim Demaille <akim@epita.fr>
6909
6910 We spend a lot of time in quotearg, in particular when --verbose.
6911
6912 * src/symtab.c (symbol_get): Store a quoted version of the key.
6913 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
6914 Adjust all callers.
6915
6916 2002-06-30 Akim Demaille <akim@epita.fr>
6917
6918 * src/state.h (reductions_t): Rename member `nreds' as num.
6919 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
6920 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
6921
6922 2002-06-30 Akim Demaille <akim@epita.fr>
6923
6924 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
6925 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
6926 (shifts_to): Rename as...
6927 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
6928 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
6929 (TRANSITION_IS_DISABLED, transitions_to): these.
6930
6931 2002-06-30 Akim Demaille <akim@epita.fr>
6932
6933 * src/print.c (print_shifts, print_gotos): Merge into...
6934 (print_transitions): this.
6935 (print_transitions, print_errs, print_reductions): Align the
6936 lookaheads columns.
6937 (print_core, print_transitions, print_errs, print_state,
6938 print_grammar): Output empty lines separator before, not after.
6939 (state_default_rule_compute): Rename as...
6940 (state_default_rule): this.
6941 * tests/conflicts.at (Defaulted Conflicted Reduction),
6942 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
6943 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
6944
6945 2002-06-30 Akim Demaille <akim@epita.fr>
6946
6947 Display items as we display rules.
6948
6949 * src/gram.h, src/gram.c (rule_lhs_print): New.
6950 * src/gram.c (grammar_rules_partial_print): Use it.
6951 * src/print.c (print_core): Likewise.
6952 * tests/conflicts.at (Defaulted Conflicted Reduction),
6953 (Unresolved SR Conflicts): Adjust.
6954 (Unresolved SR Conflicts): Adjust and rename as...
6955 (Resolved SR Conflicts): this, as was meant.
6956 * tests/regression.at (Web2c Report): Adjust.
6957
6958 2002-06-30 Akim Demaille <akim@epita.fr>
6959
6960 * src/print.c (state_default_rule_compute): New, extracted from...
6961 (print_reductions): here.
6962 Pessimize, but clarify the code.
6963 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
6964
6965 2002-06-30 Akim Demaille <akim@epita.fr>
6966
6967 * src/output.c (action_row): Let default_rule be always a rule
6968 number.
6969
6970 2002-06-30 Akim Demaille <akim@epita.fr>
6971
6972 * src/closure.c (print_firsts, print_fderives, closure):
6973 Use BITSET_EXECUTE.
6974 * src/lalr.c (lookaheads_print): Likewise.
6975 * src/state.c (state_rule_lookaheads_print): Likewise.
6976 * src/print_graph.c (print_core): Likewise.
6977 * src/print.c (print_reductions): Likewise.
6978 * src/output.c (action_row): Likewise.
6979 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
6980
6981 2002-06-30 Akim Demaille <akim@epita.fr>
6982
6983 * src/print_graph.c: Use report_flag.
6984
6985 2002-06-30 Akim Demaille <akim@epita.fr>
6986
6987 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
6988 to...
6989 * src/relation.h, src/relation.c (traverse, relation_digraph)
6990 (relation_print, relation_transpose): New.
6991
6992 2002-06-30 Akim Demaille <akim@epita.fr>
6993
6994 * src/state.h, src/state.c (shifts_to): New.
6995 * src/lalr.c (build_relations): Use it.
6996
6997 2002-06-30 Akim Demaille <akim@epita.fr>
6998
6999 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
7000 (item_number_of_rule_number, rule_number_of_item_number): New.
7001 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
7002 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
7003 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
7004 Propagate their use.
7005 Much remains to be done, in particular wrt `shorts' from types.h.
7006
7007 2002-06-30 Akim Demaille <akim@epita.fr>
7008
7009 * src/symtab.c (symbol_new): Initialize the `printer' member.
7010
7011 2002-06-30 Akim Demaille <akim@epita.fr>
7012
7013 * src/LR0.c (save_reductions): Remove, replaced by...
7014 * src/state.h, src/state.c (state_reductions_set): New.
7015 (reductions, errs): Rename as...
7016 (reductions_t, errs_t): these.
7017 Adjust all dependencies.
7018
7019 2002-06-30 Akim Demaille <akim@epita.fr>
7020
7021 * src/LR0.c (state_list_t, state_list_append): New.
7022 (first_state, last_state): Now symbol_list_t.
7023 (this_state): Remove.
7024 (new_itemsets, append_states, save_reductions): Take a state_t as
7025 argument.
7026 (set_states, generate_states): Adjust.
7027 (save_shifts): Remove, replaced by...
7028 * src/state.h, src/state.c (state_shifts_set): New.
7029 (shifts): Rename as...
7030 (shifts_t): this.
7031 Adjust all dependencies.
7032 * src/state.h (state_t): Remove the `next' member.
7033
7034 2002-06-30 Akim Demaille <akim@epita.fr>
7035
7036 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
7037 escaped in slot 0.
7038
7039 2002-06-30 Akim Demaille <akim@epita.fr>
7040
7041 Use hash.h for the state hash table.
7042
7043 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
7044 (allocate_storage): Use state_hash_new.
7045 (free_storage): Use state_hash_free.
7046 (new_state, get_state): Adjust.
7047 * src/lalr.h, src/lalr.c (states): Move to...
7048 * src/states.h (state_t): Remove the `link' member, no longer
7049 used.
7050 * src/states.h, src/states.c: here.
7051 (state_hash_new, state_hash_free, state_hash_lookup)
7052 (state_hash_insert, states_free): New.
7053 * src/states.c (state_table, state_compare, state_hash): New.
7054 * src/output.c (output_actions): Do not free states now, since we
7055 still need to know the final_state number in `prepare', called
7056 afterwards. Do it...
7057 * src/main.c (main): here: call states_free after `output'.
7058
7059 2002-06-30 Akim Demaille <akim@epita.fr>
7060
7061 * src/state.h, src/state.c (state_new): New, extracted from...
7062 * src/LR0.c (new_state): here.
7063 * src/state.h (STATE_ALLOC): Move to...
7064 * src/state.c: here.
7065 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
7066 * src/state.h, src/state.c: here.
7067
7068 2002-06-30 Akim Demaille <akim@epita.fr>
7069
7070 * src/reader.c (gensym): Rename as...
7071 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
7072 (getsym): Rename as...
7073 (symbol_get): this.
7074
7075 2002-06-30 Akim Demaille <akim@epita.fr>
7076
7077 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
7078 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
7079 * src/output.c, src/print.c, src/print_graph.c: Propagate.
7080 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
7081
7082 2002-06-30 Akim Demaille <akim@epita.fr>
7083
7084 Make the test suite pass with warnings checked.
7085
7086 * tests/actions.at (Printers and Destructors): Improve.
7087 Avoid unsigned vs. signed issues.
7088 * tests/calc.at: Don't exercise the scanner here, do it...
7089 * tests/input.at (Torturing the Scanner): here.
7090
7091 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7092
7093 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
7094 reorganize first lines parallel to yacc.c.
7095
7096 2002-06-28 Akim Demaille <akim@epita.fr>
7097
7098 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
7099 (b4_token_enum, b4_token_defines): New, factored from...
7100 * data/lalr1.cc, data/yacc.c, glr.c: here.
7101
7102 2002-06-28 Akim Demaille <akim@epita.fr>
7103
7104 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
7105 unused variables.
7106 * src/output.c (merger_output): static.
7107
7108 2002-06-28 Akim Demaille <akim@epita.fr>
7109
7110 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
7111 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
7112 pacify GCC.
7113 * src/output.c (save_row): Initialize all the variables to pacify GCC.
7114
7115 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7116
7117 Accumulated changelog for new GLR parsing features.
7118
7119 * src/conflicts.c (count_total_conflicts): Change name to
7120 conflicts_total_count.
7121 * src/conflicts.h: Ditto.
7122 * src/output.c (token_actions): Use the new name.
7123 (output_conflicts): Change conflp => conflict_list_heads, and
7124 confl => conflict_list for better readability.
7125 * data/glr.c: Use the new names.
7126 * NEWS: Add self to GLR announcement.
7127
7128 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
7129
7130 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
7131 Akim Demaille.
7132
7133 * data/bison.glr: Change name to glr.c
7134 * data/glr.c: Renamed from bison.glr.
7135 * data/Makefile.am: Add glr.c
7136
7137 * src/getargs.c:
7138
7139 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
7140 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
7141
7142 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7143
7144 * data/bison.glr: Be sure to restore the
7145 current #line when returning to the skeleton contents after having
7146 exposed the input file's #line.
7147
7148 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7149
7150 * data/bison.glr: Bring up to date with changes to bison.simple.
7151
7152 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7153
7154 * data/bison.glr: Correct definitions that use b4_prefix.
7155 Various reformatting.
7156 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
7157 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
7158 yytokenp argument; now part of stack.
7159 (yychar): Define to behave as documented.
7160 (yyclearin): Ditto.
7161
7162 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7163
7164 * src/reader.h: Add declaration for free_merger_functions.
7165
7166 * src/reader.c (merge_functions): New variable.
7167 (get_merge_function): New function.
7168 (free_merger_functions): New function.
7169 (readgram): Check for %prec that is not followed by a symbol.
7170 Handle %dprec and %merge declarations.
7171 (packgram): Initialize dprec and merger fields in rules array.
7172
7173 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
7174 conflict_list_cnt, conflict_list_free): New variables.
7175 (table_grow): Also grow conflict_table.
7176 (prepare_rules): Output dprec and merger tables.
7177 (conflict_row): New function.
7178 (action_row): Output conflict lists for GLR parser. Don't use
7179 default reduction in conflicted states for GLR parser so that there
7180 are spaces for the conflict lists.
7181 (save_row): Also save conflict information.
7182 (token_actions): Allocate conflict list.
7183 (merger_output): New function.
7184 (pack_vector): Pack conflict table, too.
7185 (output_conflicts): New function to output yyconflp and yyconfl.
7186 (output_check): Allocate conflict_tos.
7187 (output_actions): Output conflict tables, also.
7188 (output_skeleton): Output b4_mergers definition.
7189 (prepare): Output b4_max_rhs_length definition.
7190 Use 'bison.glr' as default skeleton for GLR parsers.
7191
7192 * src/gram.c (glr_parser): New flag.
7193 (grammar_free): Call free_merger_functions.
7194
7195 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
7196 all pairs of conflicting reductions, rather than just all tokens
7197 causing conflicts. Needed to size conflict tables.
7198 (conflicts_output): Modify call to count_rr_conflicts for new
7199 interface.
7200 (conflicts_print): Ditto.
7201 (count_total_conflicts): New function.
7202
7203 * src/reader.h (merger_list): New type.
7204 (merge_functions): New variable.
7205
7206 * src/lex.h (tok_dprec, tok_merge): New token types.
7207
7208 * src/gram.h (rule_s): Add dprec and merger fields.
7209 (glr_parser): New flag.
7210
7211 * src/conflicts.h (count_total_conflicts): New function.
7212
7213 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
7214
7215 * doc/bison.texinfo (Generalized LR Parsing): New section.
7216 (GLR Parsers): New section.
7217 (Language and Grammar): Mention GLR parsing.
7218 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
7219 Correct typo ("tge" -> "the").
7220
7221 * data/bison.glr: New skeleton for GLR parsing.
7222
7223 * tests/cxx-gram.at: New tests for GLR parsing.
7224
7225 * tests/testsuite.at: Include cxx-gram.at.
7226
7227 * tests/Makefile.am: Add cxx-gram.at.
7228
7229 * src/parse-gram.y:
7230
7231 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
7232
7233 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
7234
7235 2002-06-27 Akim Demaille <akim@epita.fr>
7236
7237 * src/options.h, src/options.c: Remove.
7238 * src/getargs.c (short_options, long_options): New.
7239
7240 2002-06-27 Akim Demaille <akim@epita.fr>
7241
7242 * data/bison.simple, data/bison.c++: Rename as...
7243 * data/yacc.c, data/lalr1.cc: these.
7244 * doc/bison.texinfo (Environment Variables): Remove.
7245
7246 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
7247
7248 * src/getargs.c (report_argmatch): Initialize strtok().
7249
7250 2002-06-20 Akim Demaille <akim@epita.fr>
7251
7252 * data/bison.simple (b4_symbol_actions): New, replaces...
7253 (b4_symbol_destructor, b4_symbol_printer): these.
7254 (yysymprint): Be sure to call YYPRINT only for tokens, and using
7255 user token numbers.
7256
7257 2002-06-20 Akim Demaille <akim@epita.fr>
7258
7259 * data/bison.simple (yydestructor): Rename as...
7260 (yydestruct): this.
7261
7262 2002-06-20 Akim Demaille <akim@epita.fr>
7263
7264 * src/symtab.h, src/symtab.c (symbol_type_set)
7265 (symbol_destructor_set, symbol_precedence_set): The location is
7266 the last argument.
7267 Adjust all callers.
7268
7269 2002-06-20 Akim Demaille <akim@epita.fr>
7270
7271 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
7272 internals.
7273 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
7274 Takes a location.
7275 * src/symtab.h, src/symtab.c (symbol_class_set)
7276 (symbol_user_token_number_set): Likewise.
7277 Adjust all callers.
7278 Promote complain_at.
7279 * tests/input.at (Type Clashes): Adjust.
7280
7281 2002-06-20 Akim Demaille <akim@epita.fr>
7282
7283 * data/bison.simple (YYLEX): Fix the declaration when
7284 %pure-parser.
7285
7286 2002-06-20 Akim Demaille <akim@epita.fr>
7287
7288 * data/bison.simple (yysymprint): Don't print the token number,
7289 just its name.
7290 * tests/actions.at (Destructors): Rename as...
7291 (Printers and Destructors): this.
7292 Also exercise %printer.
7293
7294 2002-06-20 Akim Demaille <akim@epita.fr>
7295
7296 * data/bison.simple (YYDSYMPRINT): New.
7297 Use it to remove many of the #if YYDEBUG/if (yydebug).
7298
7299 2002-06-20 Akim Demaille <akim@epita.fr>
7300
7301 * src/symtab.h, src/symtab.c (symbol_t): printer and
7302 printer_location are new members.
7303 (symbol_printer_set): New.
7304 * src/parse-gram.y (PERCENT_PRINTER): New token.
7305 Handle its associated rule.
7306 * src/scan-gram.l: Adjust.
7307 (handle_destructor_at, handle_destructor_dollar): Rename as...
7308 (handle_symbol_code_at, handle_symbol_code_dollar): these.
7309 * src/output.c (symbol_printers_output): New.
7310 (output_skeleton): Call it.
7311 * data/bison.simple (yysymprint): New. Cannot be named yyprint
7312 since there are already many grammar files with a user `yyprint'.
7313 Replace the calls to YYPRINT to calls to yysymprint.
7314 * tests/calc.at: Adjust.
7315 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
7316 taking advantage of parser very internal details (stack size!).
7317
7318 2002-06-20 Akim Demaille <akim@epita.fr>
7319
7320 * src/scan-gram.l: Complete the scanner with the missing patterns
7321 to pacify Flex.
7322 Use `quote' and `symbol_tag_get' where appropriate.
7323
7324 2002-06-19 Akim Demaille <akim@epita.fr>
7325
7326 * tests/actions.at (Destructors): Augment to test locations.
7327 * data/bison.simple (yydestructor): Pass it the current location
7328 if locations are enabled.
7329 Prototype only when __STDC__ or C++.
7330 Change the argument names to move into the yy name space: there is
7331 user code here.
7332
7333 2002-06-19 Akim Demaille <akim@epita.fr>
7334
7335 * data/bison.simple (b4_pure_if): New.
7336 Use it instead of #ifdef YYPURE.
7337
7338 2002-06-19 Akim Demaille <akim@epita.fr>
7339
7340 * data/bison.simple (b4_location_if): New.
7341 Use it instead of #ifdef YYLSP_NEEDED.
7342
7343 2002-06-19 Akim Demaille <akim@epita.fr>
7344
7345 Prepare @$ in %destructor, but currently don't bind it in the
7346 skeleton, as %location use is not cleaned up yet.
7347
7348 * src/scan-gram.l (handle_dollar, handle_destructor_at)
7349 (handle_action_at): New.
7350 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
7351 a braced_code_t and a location as additional arguments.
7352 (handle_destructor_dollar): Instead of requiring `b4_eval', just
7353 unquote one when outputting `b4_dollar_dollar'.
7354 Adjust callers.
7355 * data/bison.simple (b4_eval): Remove.
7356 (b4_symbol_destructor): Adjust.
7357 * tests/input.at (Invalid @n): Adjust.
7358
7359 2002-06-19 Zack Weinberg <zack@codesourcery.com>
7360
7361 * doc/bison.texinfo: Document ability to have multiple
7362 prologue sections.
7363
7364 2002-06-18 Akim Demaille <akim@epita.fr>
7365
7366 * src/files.c (compute_base_names): When computing the output file
7367 names from the input file name, strip the directory part.
7368
7369 2002-06-18 Akim Demaille <akim@epita.fr>
7370
7371 * data/bison.simple.new: Comment changes.
7372 Reported by Andreas Schwab.
7373
7374 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
7375
7376 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
7377 there are no `label `yyoverflowlab' defined but not used' warnings
7378 when yyoverflow is defined.
7379
7380 2002-06-18 Akim Demaille <akim@epita.fr>
7381
7382 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
7383 new member.
7384 (symbol_destructor_set): Adjust.
7385 * src/output.c (symbol_destructors_output): Output the destructor
7386 locations.
7387 Output the symbol name.
7388 * data/bison.simple (b4_symbol_destructor): Adjust.
7389
7390 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
7391 and Akim Demaille <akim@epita.fr>
7392
7393 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
7394 what's left on the stack when the error recovery hits EOF.
7395 * tests/actions.at (Destructors): Complete to exercise this case.
7396
7397 2002-06-17 Akim Demaille <akim@epita.fr>
7398
7399 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
7400 arguments is really empty, not only equal to `[]'.
7401 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
7402 member.
7403 (symbol_destructor_set): New.
7404 * src/output.c (symbol_destructors_output): New.
7405 * src/reader.h (brace_code_t, current_braced_code): New.
7406 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
7407 (handle_dollar): Rename as...
7408 (handle_action_dollar): this.
7409 (handle_destructor_dollar): New.
7410 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
7411 (grammar_declaration): Use it.
7412 * data/bison.simple (yystos): Is always defined.
7413 (yydestructor): New.
7414 * tests/actions.at (Destructors): New.
7415 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
7416
7417 2002-06-17 Akim Demaille <akim@epita.fr>
7418
7419 * src/symlist.h, src/symlist.c (symbol_list_length): New.
7420 * src/scan-gram.l (handle_dollar, handle_at): Compute the
7421 rule_length only when needed.
7422 * src/output.c (actions_output, token_definitions_output): Output
7423 the full M4 block.
7424 * src/symtab.c: Don't access directly to the symbol tag, use
7425 symbol_tag_get.
7426 * src/parse-gram.y: Use symbol_list_free.
7427
7428 2002-06-17 Akim Demaille <akim@epita.fr>
7429
7430 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
7431 (symbol_list_prepend, get_type_name): Move to...
7432 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
7433 (symbol_list_prepend, symbol_list_n_type_name_get): here.
7434 Adjust all callers.
7435 (symbol_list_free): New.
7436 * src/scan-gram.l (handle_dollar): Takes a location.
7437 * tests/input.at (Invalid $n): Adjust.
7438
7439 2002-06-17 Akim Demaille <akim@epita.fr>
7440
7441 * src/reader.h, src/reader.c (symbol_list_new): Export it.
7442 (symbol_list_prepend): New.
7443 * src/parse-gram.y (%union): `list' is a new member.
7444 (symbols.1): New, replaces...
7445 (terms_to_prec.1, nterms_to_type.1): these.
7446 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
7447 Take a location as additional argument.
7448 Adjust all callers.
7449
7450 2002-06-15 Akim Demaille <akim@epita.fr>
7451
7452 * src/parse-gram.y: Move %token in the declaration section so that
7453 we don't depend upon CVS Bison.
7454
7455 2002-06-15 Akim Demaille <akim@epita.fr>
7456
7457 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
7458 * src/print.c (print_core): Use it.
7459
7460 2002-06-15 Akim Demaille <akim@epita.fr>
7461
7462 * src/conflicts.c (log_resolution): Accept the rule involved in
7463 the sr conflicts instead of the lookahead number that points to
7464 that rule.
7465 (flush_reduce): Accept the current lookahead vector as argument,
7466 instead of the index in LA.
7467 (resolve_sr_conflict): Accept the current number of lookahead
7468 bitset to consider for the STATE, instead of the index in LA.
7469 (set_conflicts): Adjust.
7470 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
7471
7472 2002-06-15 Akim Demaille <akim@epita.fr>
7473
7474 * src/state.h (state_t): Replace the `lookaheadsp' member, a
7475 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
7476 Adjust all dependencies.
7477 * src/lalr.c (initialize_lookaheads): Split into...
7478 (states_lookaheads_count, states_lookaheads_initialize): these.
7479 (lalr): Adjust.
7480
7481 2002-06-15 Akim Demaille <akim@epita.fr>
7482
7483 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
7484 out of...
7485 (grammar_rules_print): here.
7486 * src/reduce.c (reduce_output): Use it.
7487 * tests/reduce.at (Useless Rules, Reduced Automaton)
7488 (Underivable Rules): Adjust.
7489
7490 2002-06-15 Akim Demaille <akim@epita.fr>
7491
7492 Copy BYacc's nice way to report the grammar.
7493
7494 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
7495 New.
7496 Don't print the rules' location, it is confusing and useless.
7497 (rule_print): Use grammar_rhs_print.
7498 * src/print.c (print_grammar): Use grammar_rules_print.
7499
7500 2002-06-15 Akim Demaille <akim@epita.fr>
7501
7502 Complete and rationalize `useless thing' warnings.
7503
7504 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
7505 (symbol_tag_print): New.
7506 Use them everywhere in place of accessing directly the tag member.
7507 * src/gram.h, src/gram.c (rule_print): New.
7508 Use it where a rule used to be printed `by hand'.
7509 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
7510 (reduce_grammar_tables): Report the useless rules.
7511 (reduce_print): Useless things are a warning, not an error.
7512 Report it as such.
7513 * tests/reduce.at (Useless Nonterminals, Useless Rules):
7514 (Reduced Automaton, Underivable Rules): Adjust.
7515 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
7516 * tests/conflicts.at (Unresolved SR Conflicts)
7517 (Solved SR Conflicts): Adjust.
7518
7519 2002-06-15 Akim Demaille <akim@epita.fr>
7520
7521 Let symbols have a location.
7522
7523 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
7524 (getsym): Adjust.
7525 Adjust all callers.
7526 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
7527 Use location_t, not int.
7528 * src/symtab.c (symbol_check_defined): Take advantage of the
7529 location.
7530 * tests/regression.at (Invalid inputs): Adjust.
7531
7532 2002-06-15 Akim Demaille <akim@epita.fr>
7533
7534 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
7535 (input): Don't try to initialize yylloc here, do it in the
7536 scanner.
7537 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
7538 * src/gram.h (rule_t): Change line and action_line into location
7539 and action_location, of location_t type.
7540 Adjust all dependencies.
7541 * src/location.h, src/location.c (empty_location): New.
7542 * src/reader.h, src/reader.c (grammar_start_symbol_set)
7543 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
7544 (grammar_current_rule_symbol_append)
7545 (grammar_current_rule_action_append): Expect a location as argument.
7546 * src/reader.c (grammar_midrule_action): Adjust to attach an
7547 action's location as dummy symbol location.
7548 * src/symtab.h, src/symtab.c (startsymbol_location): New.
7549 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
7550 the line numbers.
7551
7552 2002-06-14 Akim Demaille <akim@epita.fr>
7553
7554 Grammar declarations may be found in the grammar section.
7555
7556 * src/parse-gram.y (rules_or_grammar_declaration): New.
7557 (declarations): Each declaration may end with a semicolon, not
7558 just...
7559 (grammar_declaration): `"%union"'.
7560 (grammar): Branch to rules_or_grammar_declaration.
7561
7562 2002-06-14 Akim Demaille <akim@epita.fr>
7563
7564 * src/main.c (main): Invoke scanner_free.
7565
7566 2002-06-14 Akim Demaille <akim@epita.fr>
7567
7568 * src/output.c (m4_invoke): Extracted from...
7569 (output_skeleton): here.
7570 Free tempfile.
7571
7572 2002-06-14 Akim Demaille <akim@epita.fr>
7573
7574 * src/parse-gram.y (directives, directive, gram)
7575 (grammar_directives, precedence_directives, precedence_directive):
7576 Rename as...
7577 (declarations, declaration, grammar, grammar_declaration)
7578 (precedence_declaration, precedence_declarator): these.
7579 (symbol_declaration): New.
7580
7581 2002-06-14 Akim Demaille <akim@epita.fr>
7582
7583 * src/files.c (action_obstack): Remove, unused.
7584 (output_obstack): Remove it, and all its dependencies, as it is no
7585 longer needed.
7586 * src/reader.c (epilogue_set): Build the epilogue in the
7587 muscle_obstack.
7588 * src/output.h, src/output.c (muscle_obstack): Move to...
7589 * src/muscle_tab.h, src/muscle_tab.h: here.
7590 (muscle_init): Initialize muscle_obstack.
7591 (muscle_free): New.
7592 * src/main.c (main): Call it.
7593
7594 2002-06-14 Akim Demaille <akim@epita.fr>
7595
7596 * src/location.h: New, extracted from...
7597 * src/reader.h: here.
7598 * src/Makefile.am (noinst_HEADERS): Merge into
7599 (bison_SOURCES): this.
7600 Add location.h.
7601 * src/parse-gram.y: Use location_t instead of Bison's.
7602 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
7603 Use location_t instead of ints.
7604
7605 2002-06-14 Akim Demaille <akim@epita.fr>
7606
7607 * data/bison.simple, data/bison.c++: Be sure to restore the
7608 current #line when returning to the skeleton contents after having
7609 exposed the input file's #line.
7610
7611 2002-06-12 Akim Demaille <akim@epita.fr>
7612
7613 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
7614 eager.
7615 * tests/actions.at (Exotic Dollars): New.
7616
7617 2002-06-12 Akim Demaille <akim@epita.fr>
7618
7619 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
7620 ['"/] too eagerly.
7621 * tests/input.at (Torturing the Scanner): New.
7622
7623 2002-06-11 Akim Demaille <akim@epita.fr>
7624
7625 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
7626 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
7627 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
7628 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
7629 * src/reader.c (reader): Use it.
7630
7631 2002-06-11 Akim Demaille <akim@epita.fr>
7632
7633 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
7634 Adjust all callers.
7635 (scanner_last_string_free): New.
7636
7637 2002-06-11 Akim Demaille <akim@epita.fr>
7638
7639 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
7640 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
7641 (last_string, YY_OBS_FREE): New.
7642 Use them when returning an ID.
7643
7644 2002-06-11 Akim Demaille <akim@epita.fr>
7645
7646 Have Bison grammars parsed by a Bison grammar.
7647
7648 * src/reader.c, src/reader.h (prologue_augment): New.
7649 * src/reader.c (copy_definition): Remove.
7650
7651 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
7652 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
7653 (grammar_current_rule_prec_set, grammar_current_rule_check)
7654 (grammar_current_rule_symbol_append)
7655 (grammar_current_rule_action_append): Export.
7656 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
7657 (symbol_list_action_append): Remove.
7658 Hook the routines from reader.
7659 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
7660 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
7661
7662 * src/reader.c (read_declarations): Remove, unused.
7663
7664 * src/parse-gram.y: Handle the epilogue.
7665 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
7666 (grammar_start_symbol_set): this.
7667 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
7668 * src/reader.c (readgram): Remove, unused.
7669 (reader): Adjust to insert eoftoken and axiom where appropriate.
7670
7671 * src/reader.c (copy_dollar): Replace with...
7672 * src/scan-gram.h (handle_dollar): this.
7673 * src/parse-gram.y: Remove `%thong'.
7674
7675 * src/reader.c (copy_at): Replace with...
7676 * src/scan-gram.h (handle_at): this.
7677
7678 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
7679 New.
7680
7681 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
7682 time being.
7683
7684 * src/reader.h, src/reader.c (grammar_rule_end): New.
7685
7686 * src/parse.y (current_type, current_class): New.
7687 Implement `%nterm', `%token' support.
7688 Merge `%term' into `%token'.
7689 (string_as_id): New.
7690 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
7691 type name.
7692
7693 * src/parse-gram.y: Be sure to handle properly the beginning of
7694 rules.
7695
7696 * src/parse-gram.y: Handle %type.
7697 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
7698
7699 * src/parse-gram.y: More directives support.
7700 * src/options.c: No longer handle source directives.
7701
7702 * src/parse-gram.y: Fix %output.
7703
7704 * src/parse-gram.y: Handle %union.
7705 Use the prologue locations.
7706 * src/reader.c (parse_union_decl): Remove.
7707
7708 * src/reader.h, src/reader.c (epilogue_set): New.
7709 * src/parse-gram.y: Use it.
7710
7711 * data/bison.simple, data/bison.c++: b4_stype is now either not
7712 defined, then default to int, or to the contents of %union,
7713 without `union' itself.
7714 Adjust.
7715 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
7716
7717 * src/output.c (actions_output): Don't output braces, as they are
7718 already handled by the scanner.
7719
7720 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
7721 characters to themselves.
7722
7723 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
7724 that the epilogue has a proper #line.
7725
7726 * src/parse-gram.y: Handle precedence/associativity.
7727
7728 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
7729 a terminal.
7730 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
7731 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
7732 at all to define terminals that cannot be emitted.
7733
7734 * src/scan-gram.l: Escape M4 characters.
7735
7736 * src/scan-gram.l: Working properly with escapes in user
7737 strings/characters.
7738
7739 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
7740 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
7741 grammar.
7742 Use more modest sizes, as for the time being the parser does not
7743 release memory, and therefore the process swallows a huge amount
7744 of memory.
7745
7746 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
7747 stricter %token grammar.
7748
7749 * src/symtab.h (associativity): Add `undef_assoc'.
7750 (symbol_precedence_set): Do nothing when passed an undef_assoc.
7751 * src/symtab.c (symbol_check_alias_consistence): Adjust.
7752
7753 * tests/regression.at (Invalid %directive): Remove, as it is now
7754 meaningless.
7755 (Invalid inputs): Adjust to the new error messages.
7756 (Token definitions): The new grammar doesn't allow too many
7757 eccentricities.
7758
7759 * src/lex.h, src/lex.c: Remove.
7760 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
7761 (copy_character, copy_string2, copy_string, copy_identifier)
7762 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
7763 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
7764 (parse_action): Remove.
7765 * po/POTFILES.in: Adjust.
7766
7767 2002-06-11 Akim Demaille <akim@epita.fr>
7768
7769 * src/reader.c (parse_action): Don't store directly into the
7770 rule's action member: return the action as a string.
7771 Don't require `rule_length' as an argument: compute it.
7772 (grammar_current_rule_symbol_append)
7773 (grammar_current_rule_action_append): New, eved out from
7774 (readgram): here.
7775 Remove `action_flag', `rulelength', unused now.
7776
7777 2002-06-11 Akim Demaille <akim@epita.fr>
7778
7779 * src/reader.c (grammar_current_rule_prec_set).
7780 (grammar_current_rule_check): New, eved out from...
7781 (readgram): here.
7782 Remove `xaction', `first_rhs': useless.
7783 * tests/input.at (Type clashes): New.
7784 * tests/existing.at (GNU Cim Grammar): Adjust.
7785
7786 2002-06-11 Akim Demaille <akim@epita.fr>
7787
7788 * src/reader.c (grammar_midrule_action): New, Eved out from
7789 (readgram): here.
7790
7791 2002-06-11 Akim Demaille <akim@epita.fr>
7792
7793 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
7794 New.
7795 (readgram): Use them as replacement of inlined code, crule and
7796 crule1.
7797
7798 2002-06-11 Akim Demaille <akim@epita.fr>
7799
7800 * src/reader.c (grammar_end, grammar_symbol_append): New.
7801 (readgram): Use them.
7802 Make the use of `p' as local as possible.
7803
7804 2002-06-10 Akim Demaille <akim@epita.fr>
7805
7806 GCJ's parser requires the tokens to be defined before the prologue.
7807
7808 * data/bison.simple: Output the token definition before the user's
7809 prologue.
7810 * tests/regression.at (Braces parsing, Duplicate string)
7811 (Mixing %token styles): Check the output from bison.
7812 (Early token definitions): New.
7813
7814 2002-06-10 Akim Demaille <akim@epita.fr>
7815
7816 * src/symtab.c (symbol_user_token_number_set): Don't complain when
7817 assigning twice the same user number to a token, so that we can
7818 use it in...
7819 * src/lex.c (lex): here.
7820 Also use `symbol_class_set' instead of hand written code.
7821 * src/reader.c (parse_assoc_decl): Likewise.
7822
7823 2002-06-10 Akim Demaille <akim@epita.fr>
7824
7825 * src/symtab.c, src/symtab.c (symbol_class_set)
7826 (symbol_user_token_number_set): New.
7827 * src/reader.c (parse_token_decl): Use them.
7828 Use a switch instead of ifs.
7829 Use a single argument.
7830
7831 2002-06-10 Akim Demaille <akim@epita.fr>
7832
7833 Remove `%thong' support as it is undocumented, unused, duplicates
7834 `%token's job, and creates useless e-mail traffic with people who
7835 want to know what it is, why it is undocumented, unused, and
7836 duplicates `%token's job.
7837
7838 * src/reader.c (parse_thong_decl): Remove.
7839 * src/options.c (option_table): Remove "thong".
7840 * src/lex.h (tok_thong): Remove.
7841
7842 2002-06-10 Akim Demaille <akim@epita.fr>
7843
7844 * src/symtab.c, src/symtab.c (symbol_type_set)
7845 (symbol_precedence_set): New.
7846 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
7847 (value_components_used): Remove, unused.
7848
7849 2002-06-09 Akim Demaille <akim@epita.fr>
7850
7851 Move symbols handling code out of the reader.
7852
7853 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
7854 (axiom): Move to...
7855 * src/symtab.h, src/symtab.c: here.
7856
7857 * src/gram.c (start_symbol): Remove: use startsymbol->number.
7858 * src/reader.c (startval): Rename as...
7859 * src/symtab.h, src/symtab.c (startsymbol): this.
7860 * src/reader.c: Adjust.
7861
7862 * src/reader.c (symbol_check_defined, symbol_make_alias)
7863 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
7864 (token_translations_init)
7865 Move to...
7866 * src/symtab.c: here.
7867 * src/reader.c (packsymbols): Move to...
7868 * src/symtab.h, src/symtab.c (symbols_pack): here.
7869 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
7870 argument.
7871
7872 2002-06-03 Akim Demaille <akim@epita.fr>
7873
7874 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
7875 then statements.
7876
7877 2002-06-03 Akim Demaille <akim@epita.fr>
7878
7879 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
7880 structs with non literals.
7881 * src/scan-skel.l: never-interactive.
7882 * src/conflicts.c (enum conflict_resolution_e): No trailing
7883 comma.
7884 * src/getargs.c (usage): Split long literal strings.
7885 Reported by Hans Aberg.
7886
7887 2002-05-28 Akim Demaille <akim@epita.fr>
7888
7889 * data/bison.c++: Use C++ ostreams.
7890 (cdebug_): New member.
7891
7892 2002-05-28 Akim Demaille <akim@epita.fr>
7893
7894 * src/output.c (output_skeleton): Be sure to allocate enough room
7895 for `/' _and_ for `\0' in full_skeleton.
7896
7897 2002-05-28 Akim Demaille <akim@epita.fr>
7898
7899 * data/bison.c++: Catch up with bison.simple:
7900 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7901 and Paul Eggert <eggert@twinsun.com>: `error' handing.
7902 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
7903 and popping traces.
7904
7905 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7906
7907 * src/output.c (output_skeleton): Put an explicit path in front of
7908 the skeleton file name, rather than relying on the -I directory,
7909 to partially alleviate effects of having a skeleton file lying around
7910 in the current directory.
7911
7912 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7913
7914 * src/conflicts.c (log_resolution): Correct typo:
7915 obstack_printf should be obstack_fgrow1.
7916
7917 2002-05-26 Akim Demaille <akim@epita.fr>
7918
7919 * src/state.h (state_t): `solved_conflicts' is a new member.
7920 * src/LR0.c (new_state): Set it to 0.
7921 * src/conflicts.h, src/conflicts.c (print_conflicts)
7922 (free_conflicts, solve_conflicts): Rename as...
7923 (conflicts_print, conflicts_free, conflicts_solve): these.
7924 Adjust callers.
7925 * src/conflicts.c (enum conflict_resolution_e)
7926 (solved_conflicts_obstack): New, used by...
7927 (log_resolution): this.
7928 Adjust to attach the conflict resolution to each state.
7929 Complete the description with the precedence/associativity
7930 information.
7931 (resolve_sr_conflict): Adjust.
7932 * src/print.c (print_state): Output its solved_conflicts.
7933 * tests/conflicts.at (Unresolved SR Conflicts)
7934 (Solved SR Conflicts): Exercise --report=all.
7935
7936 2002-05-26 Akim Demaille <akim@epita.fr>
7937
7938 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
7939 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
7940 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
7941 (token_number_t, item_number_as_token_number)
7942 (token_number_as_item_number, muscle_insert_token_number_table):
7943 Rename as...
7944 (symbol_number_t, item_number_as_symbol_number)
7945 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
7946 these, since it is more appropriate.
7947
7948 2002-05-26 Akim Demaille <akim@epita.fr>
7949
7950 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
7951 `Error:' lines.
7952 * data/bison.simple (yystos) [YYDEBUG]: New.
7953 (yyparse) [YYDEBUG]: Display the symbols which are popped during
7954 error recovery.
7955 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
7956
7957 2002-05-25 Akim Demaille <akim@epita.fr>
7958
7959 * doc/bison.texinfo (Debugging): Split into...
7960 (Tracing): this new section, its former contents, and...
7961 (Understanding): this new section.
7962 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
7963 by...
7964 (report_flag): this.
7965 Adjust all dependencies.
7966 (report_args, report_types, report_argmatch): New.
7967 (usage, getargs): Report/support -r, --report.
7968 * src/options.h
7969 (struct option_table_struct): Rename as..,
7970 (struct option_table_s): this.
7971 Rename the `set_flag' member to `flag' to match with getopt_long's
7972 struct.
7973 * src/options.c (option_table): Split verbose into an entry for
7974 %verbose, and another for --verbose.
7975 Support --report/-r, so remove -r from the obsolete --raw.
7976 * src/print.c: Attach full item sets and lookaheads reports to
7977 report_flag instead of trace_flag.
7978 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
7979
7980 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7981 and Paul Eggert <eggert@twinsun.com>
7982
7983 * data/bison.simple (yyparse): Correct error handling to conform to
7984 POSIX and yacc. Specifically, after syntax error is discovered,
7985 do not reduce further before shifting the error token.
7986 Clean up the code a bit by removing the labels yyerrdefault,
7987 yyerrhandle, yyerrpop.
7988 * NEWS: Document the above.
7989
7990 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7991
7992 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
7993 type; it isn't always big enough, since it doesn't necessarily
7994 include non-terminals.
7995 (yytranslate): Expand definition of yy_token_number_type, so that
7996 the latter can be removed.
7997 (yy_token_number_type): Remove, only one use.
7998 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
7999 don't use TokenNumberType as element type.
8000
8001 * tests/regression.at: Modify expected output to agree with change
8002 to yyr1 and yytranslate.
8003
8004 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
8005
8006 * src/reader.c (parse_action): Use copy_character instead of
8007 obstack_1grow.
8008
8009 2002-05-13 Akim Demaille <akim@epita.fr>
8010
8011 * tests/regression.at (Token definitions): Prototype yylex and
8012 yyerror.
8013
8014 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8015
8016 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
8017 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
8018 32-bit arithmetic.
8019 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
8020
8021 2002-05-07 Akim Demaille <akim@epita.fr>
8022
8023 * tests/synclines.at: Be sure to prototype yylex and yyerror to
8024 avoid GCC warnings.
8025
8026 2002-05-07 Akim Demaille <akim@epita.fr>
8027
8028 Kill GCC warnings.
8029
8030 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
8031 over the RHS of each rule.
8032 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
8033 * src/state.h (state_t): Member `nitems' is unsigned short.
8034 * src/LR0.c (get_state): Adjust.
8035 * src/reader.c (packgram): Likewise.
8036 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
8037 `Type'.
8038 (muscle_insert_int_table): Remove, unused.
8039 (prepare_rules): Remove `max'.
8040
8041 2002-05-06 Akim Demaille <akim@epita.fr>
8042
8043 * src/closure.c (print_firsts): Display of the symbol tags.
8044 (bitmatrix_print): Move to...
8045 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
8046 here.
8047 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
8048
8049 2002-05-06 Akim Demaille <akim@epita.fr>
8050
8051 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
8052 hash_do_for_each.
8053
8054 2002-05-06 Akim Demaille <akim@epita.fr>
8055
8056 * src/LR0.c (new_state, get_state): Instead of using the global
8057 `kernel_size' and `kernel_base', have two new arguments:
8058 `core_size' and `core'.
8059 Adjust callers.
8060
8061 2002-05-06 Akim Demaille <akim@epita.fr>
8062
8063 * src/reader.c (packgram): No longer end `ritem' with a 0
8064 sentinel: it is not used.
8065
8066 2002-05-05 Akim Demaille <akim@epita.fr>
8067
8068 New experimental feature: display the lookaheads in the report and
8069 graph.
8070
8071 * src/print (print_core): When --trace-flag, display the rules
8072 lookaheads.
8073 * src/print_graph.c (print_core): Likewise.
8074 Swap the arguments.
8075 Adjust caller.
8076
8077 2002-05-05 Akim Demaille <akim@epita.fr>
8078
8079 * tests/torture.at (Many lookaheads): New test.
8080
8081 2002-05-05 Akim Demaille <akim@epita.fr>
8082
8083 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
8084 (GENERATE_MUSCLE_INSERT_TABLE): this.
8085 (output_int_table, output_unsigned_int_table, output_short_table)
8086 (output_token_number_table, output_item_number_table): Replace with...
8087 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
8088 (muscle_insert_short_table, muscle_insert_token_number_table)
8089 (muscle_insert_item_number_table): these.
8090 Adjust all callers.
8091 (prepare_tokens): Don't free `translations', since...
8092 * src/reader.h, src/reader.c (grammar_free): do it.
8093 Move to...
8094 * src/gram.h, src/gram.c (grammar_free): here.
8095 * data/bison.simple, data/bison.c++: b4_token_number_max is now
8096 b4_translate_max.
8097
8098 2002-05-05 Akim Demaille <akim@epita.fr>
8099
8100 * src/output.c (output_unsigned_int_table): New.
8101 (prepare_rules): `i' is unsigned.
8102 `prhs', `rline', `r2' are unsigned int.
8103 Rename muscle `rhs_number_max' as `rhs_max'.
8104 Output muscles `prhs_max', `rline_max', and `r2_max'.
8105 Free rline and r1.
8106 * data/bison.simple, data/bison.c++: Adjust to use these muscles
8107 to compute types instead of constant types.
8108 * tests/regression.at (Web2c Actions): Adjust.
8109
8110 2002-05-04 Akim Demaille <akim@epita.fr>
8111
8112 * src/symtab.h (SALIAS, SUNDEF): Rename as...
8113 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
8114 Adjust dependencies.
8115 * src/output.c (token_definitions_output): Be sure not to output a
8116 `#define 'a'' when fed with `%token 'a' "a"'.
8117 * tests/regression.at (Token definitions): New.
8118
8119 2002-05-03 Paul Eggert <eggert@twinsun.com>
8120
8121 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
8122 for K&R C.
8123
8124 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
8125
8126 * Makefile.am (SUBDIRS): Remove intl.
8127 (EXTRA_DIST): Add config/config.rpath.
8128
8129 2002-05-03 Akim Demaille <akim@epita.fr>
8130
8131 * data/bison.simple (m4_if): Don't output empty enums.
8132 And actually, output valid enum definitions :(.
8133
8134 2002-05-03 Akim Demaille <akim@epita.fr>
8135
8136 * configure.bat: Remove, completely obsolete.
8137 * Makefile.am (EXTRA_DIST): Adjust.
8138 Don't distribute config.rpath...
8139 * config/Makefile.am (EXTRA_DIST): Do it.
8140
8141 2002-05-03 Akim Demaille <akim@epita.fr>
8142
8143 * configure.in (GETTEXT_VERSION): New.
8144 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
8145
8146 2002-05-03 Akim Demaille <akim@epita.fr>
8147
8148 * data/bison.simple (b4_token_enum): New.
8149 (b4_token_defines): Use it to output tokens both as #define and
8150 enums.
8151 Suggested by Paul Eggert.
8152 * src/output.c (token_definitions_output): Don't output spurious
8153 white spaces.
8154
8155 2002-05-03 Akim Demaille <akim@epita.fr>
8156
8157 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
8158
8159 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
8160
8161 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
8162 Update the stack class, give a try to deque as the default container.
8163
8164 2002-05-02 Akim Demaille <akim@epita.fr>
8165
8166 * data/bison.simple (yyparse): Do not implement @$ = @1.
8167 (YYLLOC_DEFAULT): Adjust to do it.
8168 * doc/bison.texinfo (Location Default Action): Fix.
8169
8170 2002-05-02 Akim Demaille <akim@epita.fr>
8171
8172 * src/reader.c (parse_braces): Merge into...
8173 (parse_action): this.
8174
8175 2002-05-02 Akim Demaille <akim@epita.fr>
8176
8177 * configure.in (ALL_LINGUAS): Remove.
8178 * po/LINGUAS, hr.po: New.
8179
8180 2002-05-02 Akim Demaille <akim@epita.fr>
8181
8182 Remove the so called hairy (semantic) parsers.
8183
8184 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
8185 * src/gram.h, src/gram.c (semantic_parser): Remove.
8186 (rule_t): Remove the guard and guard_line members.
8187 * src/lex.h (token_t): remove tok_guard.
8188 * src/options.c (option_table): Remove %guard and %semantic_parser
8189 support.
8190 * src/output.c, src/output.h (guards_output): Remove.
8191 (prepare): Adjust.
8192 (token_definitions_output): Don't output the `T'
8193 tokens (???).
8194 (output_skeleton): Don't output the guards.
8195 * src/files.c, src/files.c (attrsfile): Remove.
8196 * src/reader.c (symbol_list): Remove the guard and guard_line
8197 members.
8198 Adjust dependencies.
8199 (parse_guard): Remove.
8200 * data/bison.hairy: Remove.
8201 * doc/bison.texinfo (Environment Variables): Remove occurrences of
8202 BISON_HAIRY.
8203
8204 2002-05-02 Akim Demaille <akim@epita.fr>
8205
8206 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
8207 (parse_guard): Rename the formal argument `stack_offset' as
8208 `rule_length', which is more readable.
8209 Adjust callers.
8210 (copy_at, copy_dollar): Instead of outputting the hard coded
8211 values of $$, $n and so forth, output invocation to b4_lhs_value,
8212 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
8213 Note: this patch partially drops `semantic-parser' support: it
8214 always does `rule_length - n', where semantic parsers ought to
8215 always use `-n'.
8216 * data/bison.simple, data/bison.c++ (b4_lhs_value)
8217 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
8218
8219 2002-05-02 Akim Demaille <akim@epita.fr>
8220
8221 * configure.in (AC_INIT): Bump to 1.49b.
8222 (AM_INIT_AUTOMAKE): Short invocation.
8223
8224 2002-05-02 Akim Demaille <akim@epita.fr>
8225
8226 Version 1.49a.
8227
8228 2002-05-01 Akim Demaille <akim@epita.fr>
8229
8230 * src/skeleton.h: Remove.
8231
8232 2002-05-01 Akim Demaille <akim@epita.fr>
8233
8234 * src/skeleton.h: Fix the #endif.
8235 Reported by Magnus Fromreide.
8236
8237 2002-04-26 Paul Eggert <eggert@twinsun.com>
8238
8239 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
8240 Define if we define YYSTYPE and YYLTYPE, respectively.
8241 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8242
8243 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
8244
8245 * src/scan-skel.l: Postprocess quadrigraphs.
8246
8247 * src/reader.c (copy_character): New function, used to output
8248 single characters while replacing `[' and `]' with quadrigraphs, to
8249 avoid troubles with M4 quotes.
8250 (copy_comment): Output characters with copy_character.
8251 (read_additionnal_code): Likewise.
8252 (copy_string2): Likewise.
8253 (copy_definition): Likewise.
8254
8255 * tests/calc.at: Exercise M4 quoting.
8256
8257 2002-04-25 Akim Demaille <akim@epita.fr>
8258
8259 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
8260 between `!' and the command.
8261 Reported by Paul Eggert.
8262
8263 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
8264
8265 * tests/calc.at: Exercise prologue splitting.
8266
8267 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
8268 `b4_post_prologue' instead of `b4_prologue'.
8269
8270 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
8271 muscles.
8272 (output): Free pre_prologue_obstack and post_prologue_obstack.
8273 * src/files.h, src/files.c (attrs_obstack): Remove.
8274 (pre_prologue_obstack, post_prologue_obstack): New.
8275 * src/reader.c (copy_definition): Add a parameter to specify the
8276 obstack to fill, instead of using attrs_obstack unconditionally.
8277 (read_declarations): Pass pre_prologue_obstack to copy_definition if
8278 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
8279
8280 2002-04-23 Paul Eggert <eggert@twinsun.com>
8281
8282 * data/bison.simple: Remove unnecessary commentary and white
8283 space differences from 1_29-branch.
8284 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
8285
8286 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
8287 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
8288 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
8289 constructors or destructors.
8290
8291 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
8292
8293 2002-04-23 Akim Demaille <akim@epita.fr>
8294
8295 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
8296 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
8297 location with columns.
8298 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
8299 All reported by Paul Eggert.
8300
8301 2002-04-22 Akim Demaille <akim@epita.fr>
8302
8303 * src/reduce.c (dump_grammar): Move to...
8304 * src/gram.h, src/gram.c (grammar_dump): here.
8305 Be sure to separate long item numbers.
8306 Don't read the members of a rule's prec if its nil.
8307
8308 2002-04-22 Akim Demaille <akim@epita.fr>
8309
8310 * src/output.c (table_size, table_grow): New.
8311 (MAXTABLE): Remove, replace uses with table_size.
8312 (pack_vector): Instead of dying when the table is too big, grow it.
8313
8314 2002-04-22 Akim Demaille <akim@epita.fr>
8315
8316 * data/bison.simple (yyr1): Its type is that of a token number.
8317 * data/bison.c++ (r1_): Likewise.
8318 * tests/regression.at (Web2c Actions): Adjust.
8319
8320 2002-04-22 Akim Demaille <akim@epita.fr>
8321
8322 * src/reader.c (token_translations_init): 256 is now the default
8323 value for the error token, i.e., it will be assigned another
8324 number if the user assigned 256 to one of her tokens.
8325 (reader): Don't force 256 to error.
8326 * doc/bison.texinfo (Symbols): Adjust.
8327 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
8328 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
8329 etc. instead of 10, 20, 30 (which was used to `jump' over error
8330 (256) and undefined (2)).
8331
8332 2002-04-22 Akim Demaille <akim@epita.fr>
8333
8334 Propagate more token_number_t.
8335
8336 * src/gram.h (token_number_as_item_number)
8337 (item_number_as_token_number): New.
8338 * src/output.c (GENERATE_OUTPUT_TABLE): New.
8339 Use it to create output_item_number_table and
8340 output_token_number_table.
8341 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
8342 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
8343 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
8344 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
8345
8346 2002-04-22 Akim Demaille <akim@epita.fr>
8347
8348 * src/output.h, src/output.c (get_lines_number): Remove.
8349
8350 2002-04-19 Akim Demaille <akim@epita.fr>
8351
8352 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
8353 as Lex/Flex'.
8354 (Debugging): More details about enabling the debugging features.
8355 (Table of Symbols): Describe $$, $n, @$, and @n.
8356 Suggested by Tim Josling.
8357
8358 2002-04-19 Akim Demaille <akim@epita.fr>
8359
8360 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
8361
8362 2002-04-10 Akim Demaille <akim@epita.fr>
8363
8364 * src/system.h: Rely on HAVE_LIMITS_H.
8365 Suggested by Paul Eggert.
8366
8367 2002-04-09 Akim Demaille <akim@epita.fr>
8368
8369 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
8370 full stderr, and strip it according to the bison options, instead
8371 of composing the error message from different bits.
8372 This makes it easier to check for several error messages.
8373 Adjust all the invocations.
8374 Add an invocation exercising the error token.
8375 Add an invocation demonstrating a stupid error message.
8376 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
8377 Adjust the tests.
8378 Error message are for stderr, not stdout.
8379
8380 2002-04-09 Akim Demaille <akim@epita.fr>
8381
8382 * src/gram.h, src/gram.c (error_token_number): Remove, use
8383 errtoken->number.
8384 * src/reader.c (reader): Don't specify the user token number (2)
8385 for $undefined, as it uselessly prevents using it.
8386 * src/gram.h (token_number_t): Move to...
8387 * src/symtab.h: here.
8388 (state_t.number): Is a token_number_t.
8389 * src/print.c, src/reader.c: Use undeftoken->number instead of
8390 hard coded 2.
8391 (Even though this 2 is not the same as above: the number of the
8392 undeftoken remains being 2, it is its user token number which
8393 might not be 2).
8394 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
8395 `user_token_number_max'.
8396 Output `undef_token_number'.
8397 * data/bison.simple, data/bison.c++: Use them.
8398 Be sure to map invalid yylex return values to
8399 `undef_token_number'. This saves us from gratuitous SEGV.
8400
8401 * tests/conflicts.at (Solved SR Conflicts)
8402 (Unresolved SR Conflicts): Adjust.
8403 * tests/regression.at (Web2c Actions): Adjust.
8404
8405 2002-04-08 Akim Demaille <akim@epita.fr>
8406
8407 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
8408 Adding #line.
8409 Remove the duplicate `typedefs'.
8410 (RhsNumberType): Fix the declaration and various other typos.
8411 Use __ofile__.
8412 * data/bison.simple: Use __ofile__.
8413 * src/scan-skel.l: Handle __ofile__.
8414
8415 2002-04-08 Akim Demaille <akim@epita.fr>
8416
8417 * src/gram.h (item_number_t): New, the type of item numbers in
8418 RITEM. Note that it must be able to code symbol numbers as
8419 positive number, and the negation of rule numbers as negative
8420 numbers.
8421 Adjust all dependencies (pretty many).
8422 * src/reduce.c (rule): Remove this `short *' pointer: use
8423 item_number_t.
8424 * src/system.h (MINSHORT, MAXSHORT): Remove.
8425 Include `limits.h'.
8426 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
8427 (shortcpy): Remove.
8428 (MAXTABLE): Move to...
8429 * src/output.c (MAXTABLE): here.
8430 (prepare_rules): Use output_int_table to output rhs.
8431 * data/bison.simple, data/bison.c++: Adjust.
8432 * tests/torture.at (Big triangle): Move the limit from 254 to
8433 500.
8434 * tests/regression.at (Web2c Actions): Ajust.
8435
8436 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
8437 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
8438 passes, but produces negative #line number, once fixed, GCC is
8439 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
8440 C), it passes.
8441 * src/state.h (state_h): Code input lines on ints, not shorts.
8442
8443 2002-04-08 Akim Demaille <akim@epita.fr>
8444
8445 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
8446 and then the grammar.
8447
8448 2002-04-08 Akim Demaille <akim@epita.fr>
8449
8450 * src/system.h: No longer using strndup.
8451
8452 2002-04-07 Akim Demaille <akim@epita.fr>
8453
8454 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
8455 * src/output.c (output_table_data): Return the longest number.
8456 (prepare_tokens): Output `token_number_max').
8457 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
8458 New.
8459 Use them to define yy_token_number_type/TokenNumberType.
8460 Use this type for yytranslate.
8461 * tests/torture.at (Big triangle): Push the limit from 124 to
8462 253.
8463 * tests/regression.at (Web2c Actions): Adjust.
8464
8465 2002-04-07 Akim Demaille <akim@epita.fr>
8466
8467 * tests/torture.at (Big triangle): New.
8468 (GNU AWK Grammar, GNU Cim Grammar): Move to...
8469 * tests/existing.at: here.
8470
8471 2002-04-07 Akim Demaille <akim@epita.fr>
8472
8473 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
8474 nritems.
8475 Adjust dependencies.
8476
8477 2002-04-07 Akim Demaille <akim@epita.fr>
8478
8479 * src/reader.c: Normalize increments to prefix form.
8480
8481 2002-04-07 Akim Demaille <akim@epita.fr>
8482
8483 * src/reader.c, symtab.c: Remove debugging code.
8484
8485 2002-04-07 Akim Demaille <akim@epita.fr>
8486
8487 Rename all the `bucket's as `symbol_t'.
8488
8489 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
8490 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
8491 * src/symtab.c, src/symtab.h (bucket): Rename as...
8492 (symbol_t): this.
8493 (symbol_list_new, bucket_check_defined, bucket_make_alias)
8494 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
8495 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
8496 (buckets_new, buckets_free, buckets_do): Rename as...
8497 (symbol_list_new, symbol_check_defined, symbol_make_alias)
8498 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
8499 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
8500 (symbols_new, symbols_free, symbols_do): these.
8501
8502 2002-04-07 Akim Demaille <akim@epita.fr>
8503
8504 Use lib/hash for the symbol table.
8505
8506 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
8507 EOF.
8508 * src/lex.c (lex): Set the `number' member of new terminals.
8509 * src/reader.c (bucket_check_defined, bucket_make_alias)
8510 (bucket_check_alias_consistence, bucket_translation): New.
8511 (reader, grammar_free, readgram, token_translations_init)
8512 (packsymbols): Adjust.
8513 (reader): Number the predefined tokens.
8514 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
8515 for predefined tokens.
8516 * src/symtab.h (bucket): Remove all the hash table related
8517 members.
8518 * src/symtab.c (symtab): Replace by...
8519 (bucket_table): this.
8520 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
8521 (buckets_new, buckets_do): New.
8522
8523 2002-04-07 Akim Demaille <akim@epita.fr>
8524
8525 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
8526 (start_symbol, max_user_token_number, semantic_parser)
8527 (error_token_number): Initialize.
8528 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
8529 Initialize.
8530 (reader): Don't.
8531 (errtoken, eoftoken, undeftoken, axiom): Extern.
8532
8533 2002-04-07 Akim Demaille <akim@epita.fr>
8534
8535 * src/gram.h (rule_s): prec and precsym are now pointers
8536 to the bucket giving the priority/associativity.
8537 Member `associativity' removed: useless.
8538 * src/reduce.c, src/conflicts.c: Adjust.
8539
8540 2002-04-07 Akim Demaille <akim@epita.fr>
8541
8542 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
8543 Properly escape the symbols' TAG when outputting them.
8544
8545 2002-04-07 Akim Demaille <akim@epita.fr>
8546
8547 * src/lalr.h (LA): Is a bitsetv, not bitset*.
8548
8549 2002-04-07 Akim Demaille <akim@epita.fr>
8550
8551 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
8552 (LArule): this, which is an array to rule_t*.
8553 * src/print.c, src/conflicts.c: Adjust.
8554
8555 2002-04-07 Akim Demaille <akim@epita.fr>
8556
8557 * src/gram.h (rule_t): Rename `number' as `user_number'.
8558 `number' is a new member.
8559 Adjust dependencies.
8560 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
8561
8562 2002-04-07 Akim Demaille <akim@epita.fr>
8563
8564 As a result of the previous patch, it is no longer needed
8565 to reorder ritem itself.
8566
8567 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
8568
8569 2002-04-07 Akim Demaille <akim@epita.fr>
8570
8571 Be sure never to walk through RITEMS, but use only data related to
8572 the rules themselves. RITEMS should be banished.
8573
8574 * src/output.c (output_token_translations): Rename as...
8575 (prepare_tokens): this.
8576 In addition to `translate', prepare the muscles `tname' and
8577 `toknum', which were handled by...
8578 (output_rule_data): this.
8579 Remove, and move the remainder of its outputs into...
8580 (prepare_rules): this new routines, which also merges content from
8581 (output_gram): this.
8582 (prepare_rules): Be sure never to walk through RITEMS.
8583 (output_stos): Rename as...
8584 (prepare_stos): this.
8585 (output): Always invoke prepare_states, after all, just don't use it
8586 in the output if you don't need it.
8587
8588 2002-04-07 Akim Demaille <akim@epita.fr>
8589
8590 * src/LR0.c (new_state): Display `nstates' as the name of the
8591 newly created state.
8592 Adjust to initialize first_state and last_state if needed.
8593 Be sure to distinguish the initial from the final state.
8594 (new_states): Create the itemset of the initial state, and use
8595 new_state.
8596 * src/closure.c (closure): Now that the initial state has its
8597 items properly set, there is no need for a special case when
8598 creating `ruleset'.
8599
8600 As a result, now the rule 0, reducing to $axiom, is visible in the
8601 outputs. Adjust the test suite.
8602
8603 * tests/conflicts.at (Solved SR Conflicts)
8604 (Unresolved SR Conflicts): Adjust.
8605 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
8606 * tests/conflicts.at (S/R in initial): New.
8607
8608 2002-04-07 Akim Demaille <akim@epita.fr>
8609
8610 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
8611 the RHS of the rules.
8612 * src/output.c (output_gram): Likewise.
8613
8614 2002-04-07 Akim Demaille <akim@epita.fr>
8615
8616 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
8617 bucket.
8618 Adjust all dependencies.
8619 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
8620 `number' of the buckets too.
8621 * src/gram.h: Include `symtab.h'.
8622 (associativity): Move to...
8623 * src/symtab.h: here.
8624 No longer include `gram.h'.
8625
8626 2002-04-07 Akim Demaille <akim@epita.fr>
8627
8628 * src/gram.h, src/gram.c (rules_rhs_length): New.
8629 (ritem_longest_rhs): Use it.
8630 * src/gram.h (rule_t): `number' is a new member.
8631 * src/reader.c (packgram): Set it.
8632 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
8633 the end of `rules', and count them out of `nrules'.
8634 (reduce_output, dump_grammar): Adjust.
8635 * src/print.c (print_grammar): It is no longer needed to check for
8636 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
8637 * tests/reduce.at (Reduced Automaton): New test.
8638
8639 2002-04-07 Akim Demaille <akim@epita.fr>
8640
8641 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
8642 lacking `+ 1' to nrules, Bison reported as useless a token if it
8643 was used solely to set the precedence of the last rule...
8644
8645 2002-04-07 Akim Demaille <akim@epita.fr>
8646
8647 * data/bison.c++, data/bison.simple: Don't output the current file
8648 name in #line, to avoid useless diffs between two identical
8649 outputs under different names.
8650
8651 2002-04-07 Akim Demaille <akim@epita.fr>
8652
8653 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
8654 Normalize loops to using `< nrules + 1', not `<= nrules'.
8655
8656 2002-04-07 Akim Demaille <akim@epita.fr>
8657
8658 * TODO: Update.
8659
8660 2002-04-07 Akim Demaille <akim@epita.fr>
8661
8662 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
8663 bucket.value as bucket.number.
8664
8665 2002-04-07 Akim Demaille <akim@epita.fr>
8666
8667 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
8668 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
8669 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
8670 RHS, instead of being an index in RITEMS.
8671
8672 2002-04-04 Paul Eggert <eggert@twinsun.com>
8673
8674 * doc/bison.texinfo: Update copyright date.
8675 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
8676 (Symbols): Warn about running Bison in one character set,
8677 but compiling and/or running in an incompatible one.
8678 Warn about character code 256, too.
8679
8680 2002-04-03 Paul Eggert <eggert@twinsun.com>
8681
8682 * src/bison.data (YYSTACK_ALLOC): Depend on whether
8683 YYERROR_VERBOSE is nonzero, not whether it is defined.
8684
8685 Merge changes from bison-1_29-branch.
8686
8687 2002-03-20 Paul Eggert <eggert@twinsun.com>
8688
8689 Merge fixes from Debian bison_1.34-1.diff.
8690
8691 * configure.in (AC_PREREQ): 2.53.
8692
8693 2002-03-20 Akim Demaille <akim@epita.fr>
8694
8695 * src/conflicts.c (log_resolution): Argument `resolution' is const.
8696
8697 2002-03-19 Paul Eggert <eggert@twinsun.com>
8698
8699 * src/bison.simple (YYCOPY): New macro.
8700 (YYSTACK_RELOCATE): Use it.
8701 Remove Type arg; no longer needed. All callers changed.
8702 (yymemcpy): Remove; no longer needed.
8703
8704 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
8705 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
8706
8707 2002-03-19 Akim Demaille <akim@epita.fr>
8708
8709 Test and fix the #line outputs.
8710
8711 * tests/atlocal.at (GCC): New.
8712 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
8713 (Prologue synch line, %union synch line, Postprologue synch line)
8714 (Action synch line, Epilogue synch line): New tests.
8715 * src/reader.c (parse_union_decl): Define the muscle stype_line.
8716 * data/bison.simple, data/bison.c++: Use it.
8717
8718 2002-03-19 Akim Demaille <akim@epita.fr>
8719
8720 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
8721 (Solved SR Conflicts, %expect not enough, %expect right)
8722 (%expect too much): Move to...
8723 * tests/conflicts.at: this new file.
8724
8725 2002-03-19 Akim Demaille <akim@epita.fr>
8726
8727 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
8728 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
8729 that we can move to enums for instance.
8730 * src/output.c (token_definitions_output): Output a list of
8731 `token-name, token-number' instead of the #define.
8732 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
8733
8734 2002-03-14 Akim Demaille <akim@epita.fr>
8735
8736 Use Gettext 0.11.1.
8737
8738 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
8739
8740 * data/bison.c++: Make the user able to add members to the generated
8741 parser by subclassing.
8742
8743 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
8744
8745 * src/reader.c (read_additionnal_code): `c' should be an integer, not
8746 a character.
8747 Reported by Nicolas Tisserand and Nicolas Burrus.
8748
8749 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
8750
8751 * src/reader.c: Warn about lacking semi-colons, do not complain.
8752
8753 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
8754
8755 * data/bison.c++: Remove a debug line.
8756
8757 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
8758
8759 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
8760 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
8761 provide a default implementation.
8762
8763 2002-03-04 Akim Demaille <akim@epita.fr>
8764
8765 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
8766 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
8767 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
8768 * tests/semantic.at (Parsing Guards): Similarly.
8769 * src/reader.at (readgram): Complain if the last rule is not ended
8770 with a semi-colon.
8771
8772 2002-03-04 Akim Demaille <akim@epita.fr>
8773
8774 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
8775 * src/closure.c: here.
8776 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
8777 RTC.
8778 * src/warshall.h, src/warshall.c: Remove.
8779 * tests/sets.at (Broken Closure): Adjust.
8780
8781 2002-03-04 Akim Demaille <akim@epita.fr>
8782
8783 * src/output.c (output_skeleton): tempdir is const.
8784 bytes_read is unused.
8785
8786 2002-03-04 Akim Demaille <akim@epita.fr>
8787
8788 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
8789 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
8790 Update.
8791 From Michael Hayes.
8792
8793 2002-03-04 Akim Demaille <akim@epita.fr>
8794
8795 * src/closure.c (closure): `r' is unused.
8796
8797 2002-03-04 Akim Demaille <akim@epita.fr>
8798
8799 * tests/sets.at (Broken Closure): Add the ending `;'.
8800 * src/reader.at (readgram): Complain if a rule is not ended with a
8801 semi-colon.
8802
8803 2002-03-04 Akim Demaille <akim@epita.fr>
8804
8805 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
8806 (count_sr_conflicts): Use bitset_count.
8807 * src/reduce.c (inaccessable_symbols): Ditto.
8808 (bits_size): Remove.
8809 * src/warshall.h, src/warshall.c: Convert to bitsetv.
8810
8811 2002-03-04 Akim Demaille <akim@epita.fr>
8812
8813 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
8814 * src/reduce.c: Remove the `bitset_zero's following the
8815 `bitset_create's, as now it is performed by the latter.
8816
8817 2002-03-04 Akim Demaille <akim@epita.fr>
8818
8819 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
8820 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
8821 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
8822 latest sources from Michael.
8823
8824 2002-03-04 Akim Demaille <akim@epita.fr>
8825
8826 * src/output.c (output): Don't free the grammar.
8827 * src/reader.c (grammar_free): New.
8828 * src/main.c (main): Call it and don't free symtab here.
8829
8830 2002-03-04 Akim Demaille <akim@epita.fr>
8831
8832 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
8833 before returning.
8834 Reported by Benoit Perrot.
8835
8836 2002-03-04 Akim Demaille <akim@epita.fr>
8837
8838 Use bitset operations when possible, not loops over bits.
8839
8840 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
8841 bitset_or.
8842 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
8843 * src/reduce.c (useless_nonterminals): Formatting changes.
8844 * src/warshall.c (TC): Use bitset_or.
8845
8846 2002-03-04 Akim Demaille <akim@epita.fr>
8847
8848 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
8849 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
8850 Ditto.
8851
8852 2002-03-04 Akim Demaille <akim@epita.fr>
8853
8854 * src/lalr.c (F): Now a bitset*.
8855 Adjust all dependencies.
8856
8857 2002-03-04 Akim Demaille <akim@epita.fr>
8858
8859 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
8860 Adjust all dependencies.
8861
8862 2002-03-04 Akim Demaille <akim@epita.fr>
8863
8864 * src/L0.c, src/LR0.h (nstates): Be size_t.
8865 Adjust comparisons (signed vs unsigned).
8866 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
8867 bitset*.
8868 Adjust all dependencies.
8869
8870 2002-03-04 Akim Demaille <akim@epita.fr>
8871
8872 * src/closure.c (firsts): Now, also a bitset.
8873 Adjust all dependencies.
8874 (varsetsize): Remove, now unused.
8875 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
8876
8877 2002-03-04 Akim Demaille <akim@epita.fr>
8878
8879 * src/print.c: Convert to use bitset.h, not hand coded iterations
8880 over ints.
8881
8882 2002-03-04 Akim Demaille <akim@epita.fr>
8883
8884 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
8885
8886 2002-03-04 Akim Demaille <akim@epita.fr>
8887
8888 * src/closure.c (ruleset): Be a bitset.
8889 (rulesetsize): Remove.
8890
8891 2002-03-04 Akim Demaille <akim@epita.fr>
8892
8893 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
8894 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
8895 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
8896 * src/closure.c (fderives): Be an array of bitsets.
8897
8898 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
8899
8900 * data/bison.c++: Merge the two generated headers. Insert a copyright
8901 notice in each output file.
8902
8903 2002-02-28 Akim Demaille <akim@epita.fr>
8904
8905 * data/bison.c++: Copy the prologue of bison.simple to fetch
8906 useful M4 definitions, such as b4_header_guard.
8907
8908 2002-02-25 Akim Demaille <akim@epita.fr>
8909
8910 * src/getargs.c (version): Give the name of the authors, and use a
8911 translator friendly scheme for the bgr
8912 copyright notice.
8913
8914 2002-02-25 Akim Demaille <akim@epita.fr>
8915
8916 * src/output.c (header_output): Remove, now handled completely via
8917 M4.
8918
8919 2002-02-25 Akim Demaille <akim@epita.fr>
8920
8921 * m4/m4.m4: New, from CVS Autoconf.
8922 * configure.in: Invoke it.
8923 * src/output.c (output_skeleton): Use its result instead of the
8924 hard coded name.
8925
8926 2002-02-25 Akim Demaille <akim@epita.fr>
8927
8928 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
8929 Fileutils 4.1.5.
8930 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
8931 * src/output.c (output_skeleton): Use mkstemp to create a real
8932 temporary file.
8933 Move the filling of `skeleton' and its muscle to...
8934 (prepare): here.
8935 (output): Move the definition of the prologue muscle to...
8936 (prepare): here.
8937 * src/system.h (DEFAULT_TMPDIR): New.
8938
8939 2002-02-14 Paul Eggert <eggert@twinsun.com>
8940
8941 Remove the support for C++ namespace cleanliness; it was
8942 causing more problems than it was curing, since it didn't work
8943 properly on some nonstandard C++ compilers. This can wait
8944 for a proper C++ parser.
8945
8946 * NEWS: Document this.
8947 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
8948 of C++, as it's treated like C now.
8949 * src/bison.simple (YYSTD): Remove.
8950 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
8951 Treat C++ just like Standard C instead of trying to support
8952 namespace cleanliness.
8953
8954 2002-02-14 Akim Demaille <akim@epita.fr>
8955
8956 * tests/regression.at (else): Adjust to Andreas' change.
8957
8958 2002-02-14 Akim Demaille <akim@epita.fr>
8959
8960 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
8961
8962 2002-02-13 Andreas Schwab <schwab@suse.de>
8963
8964 * src/output.c (output_rule_data): Don't output NULL, it might
8965 not be defined yet.
8966
8967 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
8968
8969 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
8970 (Copyright notice): Update.
8971
8972 2002-02-11 Akim Demaille <akim@epita.fr>
8973
8974 * tests/regression.at (%nonassoc and eof): Don't include
8975 nonportable headers.
8976
8977 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
8978
8979 * data/bison.c++: Correct error recovery. Make the user able to
8980 initialize the starting location.
8981
8982 2002-02-07 Akim Demaille <akim@epita.fr>
8983
8984 * tests/input.at: New.
8985
8986 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
8987
8988 * data/bison.c++: Replace some direct m4 expansions by constants. Be
8989 more consistent when naming methods and variables. Put preprocessor
8990 directives around tables only needed for debugging.
8991
8992 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
8993
8994 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
8995 C++ parsers.
8996 (yy::b4_name::parse): Use print_.
8997
8998 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
8999
9000 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
9001
9002 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
9003
9004 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
9005 C++ parsers.
9006 (yy::b4_name::parse): Build verbose error messages, and use error_.
9007
9008 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
9009
9010 * data/bison.c++: Fix m4 quoting in comments.
9011
9012 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
9013
9014 * data/bison.c++: Adjust the parser code. Fix some muscles that were
9015 not expanded by m4.
9016
9017 2002-02-05 Akim Demaille <akim@epita.fr>
9018
9019 * data/bison.c++: Adjust to the M4 back end.
9020 More is certainly needed.
9021
9022 2002-02-05 Akim Demaille <akim@epita.fr>
9023
9024 Give a try to M4 as a back end.
9025
9026 * lib/readpipe.c: New, from wdiff.
9027 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
9028 BISON_HAIRY.
9029 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
9030 specific values. Now it is m4 that performs the lookup.
9031 * src/parse-skel.y: Remove.
9032 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
9033 * src/output.c (actions_output, guards_output)
9034 (token_definitions_output): No longer keeps track of the output
9035 line number, hence remove the second argument.
9036 (guards_output): Check against the guard member of a rule, not the
9037 action member.
9038 Adjust callers.
9039 (output_skeleton): Don't look for the skeleton location, let m4 do
9040 that.
9041 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
9042 file will be used.
9043 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
9044 (prepare): Given that for the time being changesyntax is not
9045 usable in M4, rename the muscles using `-' to `_'.
9046 Define `defines_flag', `output_parser_name' and `output_header_name'.
9047 * src/output.h (actions_output, guards_output)
9048 (token_definitions_output): Adjust prototypes.
9049 * src/scan-skel.l: Instead of scanning the skeletons, it now
9050 processes the output of m4: `__oline__' and `#output'.
9051 * data/bison.simple: Adjust to be used by M4(sugar).
9052 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
9053 to date.
9054 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
9055 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
9056 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
9057 shamelessly stolen from CVS Autoconf.
9058
9059 2002-02-05 Akim Demaille <akim@epita.fr>
9060
9061 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
9062 * configure.in: Check for the declarations of free and malloc.
9063 * src/muscle_tab.c: Adjust.
9064
9065 2002-02-05 Akim Demaille <akim@epita.fr>
9066
9067 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
9068 which have no values.
9069
9070 2002-02-05 Akim Demaille <akim@epita.fr>
9071
9072 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
9073 * data/: here.
9074
9075 2002-01-29 Paul Eggert <eggert@twinsun.com>
9076
9077 * src/bison.simple (YYSIZE_T): Do not define merely because
9078 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
9079 On some platforms, <alloca.h> does not declare YYSTD (size_t).
9080
9081 2002-01-27 Akim Demaille <akim@epita.fr>
9082
9083 Fix `%nonassoc and eof'.
9084
9085 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
9086 which were not properly copied! Replace
9087 memcpy (res->errs, src->errs, src->nerrs);
9088 with
9089 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
9090 !!!
9091 * tests/regression.at (%nonassoc and eof): Adjust to newest
9092 Autotest: `.' is not in the PATH.
9093
9094 2002-01-27 Akim Demaille <akim@epita.fr>
9095
9096 * tests/sets.at (AT_EXTRACT_SETS): New.
9097 (Nullable): Use it.
9098 (Firsts): New.
9099
9100 2002-01-26 Akim Demaille <akim@epita.fr>
9101
9102 * tests/actions.at, tests/calc.at, tests/headers.at,
9103 * tests/torture.at: Adjust to the newest Autotest which no longer
9104 forces `.' in the PATH.
9105
9106 2002-01-25 Akim Demaille <akim@epita.fr>
9107
9108 * tests/regression.at (%nonassoc and eof): New.
9109 Suggested by Robert Anisko.
9110
9111 2002-01-24 Akim Demaille <akim@epita.fr>
9112
9113 Bison dumps core when trying to complain about broken input files.
9114 Reported by Cris van Pelt.
9115
9116 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
9117 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
9118 into...
9119 (Invalid inputs): Strengthen: exercise parse_percent_token.
9120
9121 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
9122
9123 * src/Makefile.am: Add bison.c++.
9124 * src/bison.c++: New skeleton.
9125
9126 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
9127
9128 * po/it.po: New.
9129
9130 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
9131
9132 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
9133
9134 2002-01-20 Marc Autret <marc@gnu.org>
9135
9136 * src/files.c (compute_output_file_names): Fix
9137
9138 2002-01-20 Marc Autret <marc@gnu.org>
9139
9140 * tests/output.at: New test.
9141 * src/files.c (compute_base_names): Don't map extensions when
9142 the YACC flag is set, use defaults.
9143 Reported by Evgeny Stambulchik.
9144
9145 2002-01-20 Marc Autret <marc@gnu.org>
9146
9147 * src/system.h: Need to define __attribute__ away for non-GCC
9148 compilers as well (i.e. the vendor C compiler).
9149 Suggested by Albert Chin-A-Young.
9150
9151 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
9152
9153 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
9154 canonical definition.
9155 * src/system.h: Use the canonical definition for PARAMS (avoids
9156 a conflict with the macro from lib/hash.h).
9157
9158 2002-01-11 Akim Demaille <akim@epita.fr>
9159
9160 * configure.in: Use AC_FUNC_STRNLEN.
9161 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
9162
9163 2002-01-09 Akim Demaille <akim@epita.fr>
9164
9165 * src/files.c, src/files.h (output_infix): New.
9166 (tab_extension): Remove.
9167 (compute_base_names): Compute the former, drop the latter.
9168 * src/output.c (prepare): Insert the muscles `output-infix', and
9169 `output-suffix'.
9170 * src/parse-skel.y (string, string.1): New.
9171 (section.header): Use it.
9172 (section.yacc): Remove.
9173 (prefix): Remove too.
9174 * src/scan-skel.l: Adjust.
9175 * src/bison.simple, src/bison.hairy: Adjust.
9176
9177 2002-01-09 Akim Demaille <akim@epita.fr>
9178
9179 * configure.in (WERROR_CFLAGS): Compute it.
9180 * src/Makefile.am (CFLAGS): Pass it.
9181 * tests/atlocal.in (CFLAGS): Idem.
9182 * src/files.c: Fix a few warnings.
9183 (get_extension_index): Remove, unused.
9184
9185 2002-01-08 Akim Demaille <akim@epita.fr>
9186
9187 * src/getargs.c (AS_FILE_NAME): New.
9188 (getargs): Use it to convert DOSish file names.
9189 * src/files.c (base_name): Rename as full_base_name to avoid
9190 clashes with `base_name ()'.
9191 (filename_split): New.
9192 (compute_base_names): N-th rewrite, using filename_split.
9193
9194 2002-01-08 Akim Demaille <akim@epita.fr>
9195
9196 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
9197 New, stolen from the Fileutils 4.1.
9198 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
9199 * configure.in: Check for the presence of memrchr, and of its
9200 prototype.
9201
9202 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
9203
9204 * lib/hash.h (__P): Added definition for this macro.
9205 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
9206 BUILT_SOURCES, to ensure they are generated first.
9207 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
9208 %error-verbose to allow bootstrapping with bison 1.30x.
9209
9210 2002-01-06 Akim Demaille <akim@epita.fr>
9211
9212 * src/reader.c (parse_braces): Don't fetch the next char, the
9213 convention is to fetch on entry.
9214 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
9215 'switch' without a following semicolon.
9216 * tests/regression.at (braces parsing): New.
9217
9218 2002-01-06 Akim Demaille <akim@epita.fr>
9219
9220 Bison is dead wrong in its RR conflict reports.
9221
9222 * tests/torture.at (GNU Cim Grammar): New.
9223 * src/conflicts.c (count_rr_conflicts): Fix.
9224
9225 2002-01-06 Akim Demaille <akim@epita.fr>
9226
9227 Creating package.m4 from configure.ac causes too many problems.
9228
9229 * tests/Makefile.am (package.m4): Create it by hand,
9230 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
9231
9232 2002-01-06 Akim Demaille <akim@epita.fr>
9233
9234 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
9235 skeleton.h.
9236
9237 2002-01-04 Paul Eggert <eggert@twinsun.com>
9238
9239 * doc/bison.texinfo (Debugging):
9240 Remove YYSTDERR; it's no longer defined or used.
9241 Also, s/cstdio.h/cstdio/.
9242
9243 2002-01-03 Akim Demaille <akim@epita.fr>
9244
9245 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
9246
9247 2002-01-03 Akim Demaille <akim@epita.fr>
9248
9249 * src/parse-skel.y (process_skeleton): Don't bind the parser's
9250 tracing code to --trace, wait for a better --trace option, with
9251 args.
9252
9253 2002-01-03 Akim Demaille <akim@epita.fr>
9254
9255 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
9256 The ISO C++ standard is extremely clear about it: stderr is
9257 considered a macro, not a regular symbol (see table 94 `Header
9258 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
9259 Therefore std:: does not apply to it. It still does with fprintf.
9260 Also, s/cstdio.h/cstdio/.
9261
9262 2002-01-03 Akim Demaille <akim@epita.fr>
9263
9264 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
9265 for non system headers.
9266
9267 2002-01-02 Akim Demaille <akim@epita.fr>
9268
9269 Equip the skeleton chain with location tracking, runtime trace,
9270 pure parser and scanner.
9271
9272 * src/parse-skel.y: Request a pure parser, locations, and prefix
9273 renaming.
9274 (%union): Having several members with the same type does not help
9275 type mismatches, simplify.
9276 (YYPRINT, yyprint): New.
9277 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
9278 (skel_error): this.
9279 Handle locations.
9280 * src/scan-skel.l: Adjust to these changes.
9281 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
9282 (LOCATION_PRINT, skel_control_t): New.
9283
9284 2001-12-30 Akim Demaille <akim@epita.fr>
9285
9286 * src/parse-skel.y: Get rid of the shift/reduce conflict:
9287 replace `gb' with BLANKS.
9288 * src/scan-skel.l: Adjust.
9289
9290 2001-12-30 Akim Demaille <akim@epita.fr>
9291
9292 * src/system.h: We don't need nor want bcopy.
9293 Throw away MS-DOS crap: we don't need getpid.
9294 * configure.in: We don't need strndup. It was even causing
9295 problems: because Flex includes the headers *before* us,
9296 _GNU_SOURCE is not defined by config.h, and therefore strndup was
9297 not visible.
9298 * lib/xstrndup.c: New.
9299 * src/scan-skel.l: Use it.
9300 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
9301 * src/parse-skel.y: Use %directives instead of #defines.
9302
9303 2001-12-30 Akim Demaille <akim@epita.fr>
9304
9305 * src/skeleton.h: New.
9306 * src/output.c (output_parser, output_master_parser): Remove, dead
9307 code.
9308 * src/output.h (get_lines_number, actions_output, guards_output)
9309 (token_definitions_output): Prototype them.
9310 * src/parse-skel.y: Add the license notice.
9311 Include output.h and skeleton.h.
9312 (process_skeleton): Returns void, and takes a single parameter.
9313 * src/scan-skel.l: Add the license notice.
9314 Include skeleton.h.
9315 Don't use %option yylineno: it seems that then Flex imagines
9316 REJECT has been used, and therefore it won't reallocate its
9317 buffers (which makes no other sense to me than a bug). It results
9318 in warnings for `unused: yy_flex_realloc'.
9319
9320 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
9321
9322 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
9323 (MUSCLE_INSERT_PREFIX): ...to there.
9324 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
9325 (MUSCLE_INSERT_PREFIX): Move from here...
9326
9327 * src/bison.hairy: Add a section directive. Put braces around muscle
9328 names. This parser skeleton is still broken, but Bison should not
9329 choke on a bad muscle 'syntax'.
9330 * src/bison.simple: Add a section directive. Put braces around muscle
9331 names.
9332
9333 * src/files.h (strsuffix, stringappend): Add declarations.
9334 (tab_extension): Add declaration.
9335 (short_base_name): Add declaration.
9336
9337 * src/files.c (strsuffix, stringappend): No longer static. These
9338 functions are used in the skeleton parser.
9339 (tab_extension): New.
9340 (compute_base_names): Use the computations done in this function
9341 to guess if the generated parsers should have '.tab' in their
9342 names.
9343 (short_base_name): No longer static.
9344
9345 * src/output.c (output_skeleton): New.
9346 (output): Disable call to output_master_parser, and give a try to
9347 a new skeleton handling system.
9348 (guards_output, actions_output): No longer static.
9349 (token_definitions_output, get_lines_number): No longer static.
9350
9351 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
9352
9353 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9354 parse-skel.y.
9355
9356 * src/parse-skel.y: New file.
9357 * src/scan-skel.l: New file.
9358
9359 2001-12-29 Akim Demaille <akim@epita.fr>
9360
9361 %name-prefix is broken.
9362
9363 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
9364 Adjust all dependencies.
9365 * tests/headers.at (export YYLTYPE): Strengthen this test: use
9366 %name-prefix.
9367
9368 Renaming yylval but not yylloc is not consistent. Now we do.
9369
9370 * src/bison.simple: Prefix yylloc if used.
9371 * doc/bison.texinfo (Decl Summary): Document that.
9372
9373 2001-12-29 Akim Demaille <akim@epita.fr>
9374
9375 * doc/bison.texinfo: Promote `%long-directive' over
9376 `%long_directive'.
9377 Remove all references to fixed-output-files, yacc is enough.
9378
9379 2001-12-29 Akim Demaille <akim@epita.fr>
9380
9381 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
9382 user prologue. These are defaults.
9383 * tests/actions.at (Mid-rule actions): Make sure the user can
9384 define YYDEBUG and YYERROR_VERBOSE.
9385
9386 2001-12-29 Akim Demaille <akim@epita.fr>
9387
9388 * src/output.c (header_output): Don't forget to export YYLTYPE and
9389 yylloc.
9390 * tests/headers.at (export YYLTYPE): New, make sure it does.
9391 * tests/regression.at (%union and --defines, Invalid CPP headers):
9392 Move to...
9393 * tests/headers.at: here.
9394
9395 2001-12-29 Akim Demaille <akim@epita.fr>
9396
9397 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
9398
9399 2001-12-29 Akim Demaille <akim@epita.fr>
9400
9401 * tests/actions.at (Mid-rule actions): Output on a single line
9402 instead of several.
9403
9404 2001-12-29 Akim Demaille <akim@epita.fr>
9405
9406 * doc/bison.texinfo: Formatting changes.
9407
9408 2001-12-29 Akim Demaille <akim@epita.fr>
9409
9410 Don't store the token defs in a muscle, just be ready to output it
9411 on command. Now possible via `symbols'. Fixes a memory leak.
9412
9413 * src/output.c (token_definitions_output): New.
9414 (output_parser, header_output): Use it.
9415 * src/reader.c (symbols_save): Remove.
9416
9417 2001-12-29 Akim Demaille <akim@epita.fr>
9418
9419 * src/bison.simple: Do not provide a default for YYSTYPE and
9420 YYLTYPE before the user's prologue. Otherwise it's hardly... a
9421 default.
9422
9423 2001-12-29 Akim Demaille <akim@epita.fr>
9424
9425 Mid-rule actions are simply... ignored!
9426
9427 * src/reader.c (readgram): Be sure to attach mid-rule actions to
9428 the empty-rule associated to the dummy symbol, not to the host
9429 rule.
9430 * tests/actions.at (Mid-rule actions): New.
9431
9432 2001-12-29 Akim Demaille <akim@epita.fr>
9433
9434 Memory leak.
9435
9436 * src/reader.c (reader): Free grammar.
9437
9438 2001-12-29 Akim Demaille <akim@epita.fr>
9439
9440 Memory leak.
9441
9442 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
9443 since it allocates it for each state, although only one is needed.
9444 (allocate_storage): Do it here.
9445
9446 2001-12-29 Akim Demaille <akim@epita.fr>
9447
9448 * src/options.h, src/options.c (create_long_option_table): Rename
9449 as...
9450 (long_option_table_new): this, with a clearer prototype.
9451 (percent_table): Remove, unused,
9452 * src/getargs.c (getargs): Adjust.
9453
9454 2001-12-29 Akim Demaille <akim@epita.fr>
9455
9456 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
9457 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
9458 as states.
9459
9460 2001-12-29 Akim Demaille <akim@epita.fr>
9461
9462 * src/lalr.c (build_relations): Rename `states' as `states1'.
9463 Sorry, I don't understand exactly what it is, no better name...
9464
9465 2001-12-29 Akim Demaille <akim@epita.fr>
9466
9467 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
9468 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
9469 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
9470 as rules.
9471
9472 2001-12-29 Akim Demaille <akim@epita.fr>
9473
9474 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
9475 ago.
9476
9477 2001-12-29 Akim Demaille <akim@epita.fr>
9478
9479 * src/reader.c, src/reader.h (user_toknums): Remove.
9480 Adjust all users to use symbols[i]->user_token_number.
9481
9482 2001-12-29 Akim Demaille <akim@epita.fr>
9483
9484 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
9485 Adjust all users to use symbols[i]->prec or ->assoc.
9486
9487 2001-12-29 Akim Demaille <akim@epita.fr>
9488
9489 * src/reader.c, src/reader.h (tags): Remove.
9490 Adjust all users to use symbols[i]->tag.
9491
9492 2001-12-29 Akim Demaille <akim@epita.fr>
9493
9494 * src/gram.h, src/gram.c (symbols): New, similar to state_table
9495 and rule_table.
9496 * src/reader.c (packsymbols): Fill this table.
9497 Drop sprec.
9498 * src/conflicts.c (resolve_sr_conflict): Adjust.
9499 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
9500 single table.
9501 Use symbols[i]->tag instead of tags[i].
9502
9503 2001-12-29 Akim Demaille <akim@epita.fr>
9504
9505 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
9506 In addition, put a comment in there, to replace...
9507 * tests/regression.at (%union and C comments): Remove.
9508
9509 2001-12-29 Akim Demaille <akim@epita.fr>
9510
9511 * tests/regression.at (Web2c Actions): Blindly move the actual
9512 output as expected output. The contents *seem* right to me, but I
9513 can't pretend reading perfectly parser tables... Nonetheless, all
9514 the other tests pass correctly, the table look OK, even though the
9515 presence of `$axiom' is to be noted: AFAICS it is useless (but
9516 harmless).
9517
9518 2001-12-29 Akim Demaille <akim@epita.fr>
9519
9520 * src/reader.c (readgram): Don't add the rule 0 if there were no
9521 rules read. In other words, add it _after_ having performed
9522 grammar sanity checks.
9523 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
9524
9525 2001-12-29 Akim Demaille <akim@epita.fr>
9526
9527 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
9528 visible, and some states have now a different number.
9529
9530 2001-12-29 Akim Demaille <akim@epita.fr>
9531
9532 * src/reader.c (readgram): Bind the initial rule's lineno to that
9533 of the first rule.
9534 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
9535 (Solved SR Conflicts): Adjust rule 0's line number.
9536
9537 2001-12-29 Akim Demaille <akim@epita.fr>
9538
9539 Fix the `GAWK Grammar' failure.
9540
9541 * src/LR0.c (final_state): Initialize to -1 so that we do compute
9542 the reductions of the first state which was mistakenly confused
9543 with the final state because precisely final_state was initialized
9544 to 0.
9545 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
9546 now noticed by Bison.
9547 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
9548 have a reduction on $default.
9549
9550 2001-12-29 Akim Demaille <akim@epita.fr>
9551
9552 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
9553 rule line numbers.
9554 * src/closure.c (print_closure): Likewise.
9555 * src/derives.c (print_derives): Likewise.
9556 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
9557 now.
9558
9559 2001-12-29 Akim Demaille <akim@epita.fr>
9560
9561 * src/lalr.c (lookaheads_print): New.
9562 (lalr): Call it when --trace-flag.
9563 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
9564 are dumped.
9565
9566 2001-12-29 Akim Demaille <akim@epita.fr>
9567
9568 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
9569 when walking through ritem, even via rule->rhs.
9570 * src/reduce.c (dump_grammar, useful_production, reduce_output)
9571 (useful_production, useless_nonterminals): Likewise.
9572 (reduce_grammar_tables): Likewise, plus update nritems.
9573 * src/nullable.c (set_nullable): Likewise.
9574 * src/lalr.c (build_relations): Likewise.
9575 * tests/sets.at (Nullable): Adjust.
9576 Fortunately, now, the $axiom is no longer nullable.
9577
9578 2001-12-29 Akim Demaille <akim@epita.fr>
9579
9580 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
9581 the 0-sentinel.
9582 * src/gram.c (ritem_longest_rhs): Likewise.
9583 * src/reduce.c (nonterminals_reduce): Likewise.
9584 * src/print_graph.c (print_graph): Likewise.
9585 * src/output.c (output_rule_data): Likewise.
9586 * src/nullable.c (set_nullable): Likewise.
9587
9588 2001-12-29 Akim Demaille <akim@epita.fr>
9589
9590 * src/output.c: Comment changes.
9591
9592 2001-12-27 Paul Eggert <eggert@twinsun.com>
9593
9594 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
9595 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
9596 Sparc, as they were causing more porting problems than the
9597 (minor) performance improvement was worth.
9598
9599 Also, catch up with 1.31's YYSTD.
9600
9601 2001-12-27 Akim Demaille <akim@epita.fr>
9602
9603 * src/output.c (output_gram): Rely on nritems, not the
9604 0-sentinel. See below.
9605 Use -1 as separator, not 0.
9606 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
9607 Rely on -1 as separator in yyrhs, instead of 0.
9608 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
9609 twice `Now at end of input', therefore there are two lines less to
9610 expect.
9611
9612 2001-12-27 Akim Demaille <akim@epita.fr>
9613
9614 * tests/regression.at (Unresolved SR Conflicts):
9615 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
9616 below.
9617
9618 2001-12-27 Akim Demaille <akim@epita.fr>
9619
9620 * src/LR0.c (new_state): Recognize the final state by the fact it
9621 is reached by eoftoken.
9622 (insert_start_shifting_state, insert_eof_shifting_state)
9623 (insert_accepting_state, augment_automaton): Remove, since now
9624 these states are automatically computed from the initial state.
9625 (generate_states): Adjust.
9626 * src/print.c: When reporting a rule number to the user, substract
9627 1, so that the axiom rule is rule 0, and the first user rule is 1.
9628 * src/reduce.c: Likewise.
9629 * src/print_graph.c (print_core): For the time being, just as for
9630 the report, depend upon --trace-flags to dump the full set of
9631 items.
9632 * src/reader.c (readgram): Once the grammar read, insert the rule
9633 0: `$axiom: START-SYMBOL $'.
9634 * tests/set.at: Adjust: rule 0 is now displayed, and since the
9635 number of the states has changed (the final state is no longer
9636 necessarily the last), catch up.
9637
9638 2001-12-27 Akim Demaille <akim@epita.fr>
9639
9640 Try to make the use of the eoftoken valid. Given that its value
9641 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
9642 is used instead of > 0 where appropriate, (ii), depend upon nritems
9643 instead of the 0-sentinel.
9644
9645 * src/gram.h, src/gram.c (nritems): New.
9646 Expected to be duplication of nitems, but for the time being...
9647 * src/reader.c (packgram): Assert nritems and nitems are equal.
9648 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
9649 * src/closure.c (print_closure, print_fderives): Likewise.
9650 * src/gram.c (ritem_print): Likewise.
9651 * src/print.c (print_core, print_grammar): Likewise.
9652 * src/print_graph.c: Likewise.
9653
9654 2001-12-27 Akim Demaille <akim@epita.fr>
9655
9656 * src/main.c (main): If there are complains after grammar
9657 reductions, then output the report anyway if requested, then die.
9658 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
9659 * src/reader.c (eoftoken): New.
9660 (parse_token_decl): If the token being defined has value `0', it
9661 is the eoftoken.
9662 (packsymbols): No longer hack `tags' to insert `$' by hand.
9663 Be sure to preserve the value of the eoftoken.
9664 (reader): Make sure eoftoken is defined.
9665 Initialize nsyms to 0: now eoftoken is created just like the others.
9666 * src/print.c (print_grammar): Don't special case the eof token.
9667 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
9668 lie anyway, albeit pleasant.
9669 * tests/calc.at: Exercise error messages with eoftoken.
9670 Change the grammar so that empty input is invalid.
9671 Adjust expectations.
9672 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
9673
9674 2001-12-27 Akim Demaille <akim@epita.fr>
9675
9676 * configure.in: Check the protos of strchr ans strspn.
9677 Replace strchr if needed.
9678 * src/system.h: Provide the protos of strchr, strspn and memchr if
9679 missing.
9680 * lib/strchr.c: New.
9681 * src/reader.c (symbols_save): Use strchr.
9682
9683 2001-12-27 Akim Demaille <akim@epita.fr>
9684
9685 * src/print.c, src/print_graph.c (escape): New.
9686 Use it to quote the TAGS outputs.
9687 * src/print_graph.c (print_state): Now errors are in red, and
9688 reductions in green.
9689 Prefer high to wide: output the state number on a line of its own.
9690
9691 2001-12-27 Akim Demaille <akim@epita.fr>
9692
9693 * src/state.h, src/state.c (reductions_new): New.
9694 * src/LR0.c (set_state_table): Let all the states have a
9695 `reductions', even if reduced to 0.
9696 (save_reductions): Adjust.
9697 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
9698 * src/print.c (print_reductions, print_actions): Adjust.
9699 * src/output.c (action_row): Adjust.
9700
9701 2001-12-27 Akim Demaille <akim@epita.fr>
9702
9703 * src/state.h, src/state.c (errs_new, errs_dup): New.
9704 * src/LR0.c (set_state_table): Let all the states have an errs,
9705 even if reduced to 0.
9706 * src/print.c (print_errs, print_reductions): Adjust.
9707 * src/output.c (output_actions, action_row): Adjust.
9708 * src/conflicts.c (resolve_sr_conflict): Adjust.
9709
9710 2001-12-27 Akim Demaille <akim@epita.fr>
9711
9712 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
9713
9714 2001-12-27 Akim Demaille <akim@epita.fr>
9715
9716 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
9717 * src/print.c: here.
9718 (lookaheadset, shiftset): New, used as additional storage by
9719 print_reductions.
9720 (print_results): Adjust.
9721 (print_shifts, print_gotos, print_errs): New, extracted from...
9722 (print_actions): here.
9723 * src/print_graph.c (print_actions): Remove dead code.
9724
9725 2001-12-27 Akim Demaille <akim@epita.fr>
9726
9727 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
9728 `$n' and `@n'.
9729
9730 2001-12-27 Akim Demaille <akim@epita.fr>
9731
9732 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
9733 (build_relations): Adjust.
9734
9735 2001-12-27 Akim Demaille <akim@epita.fr>
9736
9737 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
9738 duplication.
9739
9740 2001-12-27 Akim Demaille <akim@epita.fr>
9741
9742 * src/reader.c (packgram): Catch nitems overflows.
9743
9744 2001-12-27 Akim Demaille <akim@epita.fr>
9745
9746 * src/files.c, src/files.h (guard_obstack): Remove.
9747 * src/output.c (output): Adjust.
9748 * src/reader.c (parse_braces): New, factoring...
9749 (copy_action, copy_guard): these two which are renamed as...
9750 (parse_action, parse_guard): these.
9751 As a voluntary consequence, using braces around guards is now
9752 mandatory.
9753
9754 2001-12-27 Akim Demaille <akim@epita.fr>
9755
9756 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
9757 * src/reader.c (symbol_list): `guard' and `guard_line' are new
9758 members.
9759 (symbol_list_new): Adjust.
9760 (copy_action): action_line is the first line, not the last.
9761 (copy_guard): Just as for actions, store the `action' only, not
9762 the switch/case/break flesh.
9763 Don't parse the user action that might follow the guard, let...
9764 (readgram): do it, i.e., now, there can be an action after a
9765 guard.
9766 In other words the guard is just explicitly optional.
9767 (packgram): Adjust.
9768 * src/output.c (guards_output): New.
9769 (output_parser): Call it when needed.
9770 (output): Also free the guard and attrs obstacks.
9771 * src/files.c, src/files.h (obstack_save): Remove.
9772 (output_files): Remove.
9773 As a result, if one needs the former `.act' file, using an
9774 appropriate skeleton which requires actions and guards is now
9775 required.
9776 * src/main.c (main): Adjust.
9777 * tests/semantic.at: New.
9778 * tests/regression.at: Use `input.y' as input file name.
9779 Avoid 8+3 problems by requiring input.c when the test needs the
9780 parser.
9781
9782 2001-12-27 Akim Demaille <akim@epita.fr>
9783
9784 * src/reader.c (symbol_list_new): Be sure to initialize all the
9785 fields.
9786
9787 2001-12-27 Akim Demaille <akim@epita.fr>
9788
9789 All the hacks using a final pseudo state are now useless.
9790
9791 * src/LR0.c (set_state_table): state_table holds exactly nstates.
9792 * src/lalr.c (nLA): New.
9793 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
9794 instead of lookaheadsp from the pseudo state (nstate + 1).
9795
9796 2001-12-27 Akim Demaille <akim@epita.fr>
9797
9798 * src/output.c (action_row, token_actions): Use a state_t instead
9799 of a integer, and nlookaheads instead of the following state's
9800 lookaheadsp.
9801
9802 2001-12-27 Akim Demaille <akim@epita.fr>
9803
9804 * src/conflicts.c (log_resolution, flush_shift)
9805 (resolve_sr_conflict, set_conflicts, solve_conflicts)
9806 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
9807 (conflicts_print, print_reductions): Use a state_t instead of an
9808 integer when referring to a state.
9809 As much as possible, depend upon nlookaheads, instead of the
9810 `lookaheadsp' member of the following state (since lookaheads of
9811 successive states are successive, the difference between state n + 1
9812 and n served as the number of lookaheads for state n).
9813 * src/lalr.c (add_lookback_edge): Likewise.
9814 * src/print.c (print_core, print_actions, print_state)
9815 (print_results): Likewise.
9816 * src/print_graph.c (print_core, print_actions, print_state)
9817 (print_graph): Likewise.
9818 * src/conflicts.h: Adjust.
9819
9820 2001-12-27 Akim Demaille <akim@epita.fr>
9821
9822 * src/bison.hairy: Formatting/comment changes.
9823 ANSIfy.
9824 Remove `register' indications.
9825 Add plenty of `static'.
9826
9827 2001-12-27 Akim Demaille <akim@epita.fr>
9828
9829 * src/output.c (prepare): Drop the muscle `ntbase' which
9830 duplicates ntokens.
9831 * src/bison.simple: Formatting/comment changes.
9832 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
9833 is an undocumented synonym.
9834
9835 2001-12-22 Akim Demaille <akim@epita.fr>
9836
9837 * src/output.c (output_table_data): Change the prototype to use
9838 `int' for array ranges: some invocations do pass an int, not a
9839 short.
9840 Reported by Wayne Green.
9841
9842 2001-12-22 Akim Demaille <akim@epita.fr>
9843
9844 Some actions of web2c.y are improperly triggered.
9845 Reported by Mike Castle.
9846
9847 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
9848 * tests/regression.at (Web2c): Rename as...
9849 (Web2c Report): this.
9850 (Web2c Actions): New.
9851
9852 2001-12-22 Akim Demaille <akim@epita.fr>
9853
9854 Reductions in web2c.y are improperly reported.
9855 Reported by Mike Castle.
9856
9857 * src/conflicts.c (print_reductions): Fix.
9858 * tests/regression.at (Web2c): New.
9859
9860 2001-12-18 Akim Demaille <akim@epita.fr>
9861
9862 Some host fail on `assert (!"foo")', which expands to
9863 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
9864 Reported by Nelson Beebee.
9865
9866 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
9867 `#define it_succeeded 0' and `assert (it_succeeded)'.
9868
9869 2001-12-17 Marc Autret <autret_m@epita.fr>
9870
9871 * src/bison.simple: Don't hard code the skeleton line and filename.
9872 * src/output.c (output_parser): Rename 'line' as 'output_line'.
9873 New line counter 'skeleton_line' (skeleton-line muscle).
9874
9875 2001-12-17 Paul Eggert <eggert@twinsun.com>
9876
9877 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
9878 YYDEBUG must be defined to a nonzero value.
9879
9880 * src/bison.simple (yytname): Do not assume that the user defines
9881 YYDEBUG to a properly parenthesized expression.
9882
9883 2001-12-17 Akim Demaille <akim@epita.fr>
9884
9885 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
9886 nlookaheads is a new member.
9887 Adjust all users.
9888 * src/lalr.h (nlookaheads): Remove this orphan declaration.
9889 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
9890 state.
9891
9892 2001-12-17 Akim Demaille <akim@epita.fr>
9893
9894 * src/files.h, src/files.c (open_files, close_files): Remove.
9895 * src/main.c (main): Don't open/close files, nor invoke lex_free,
9896 let...
9897 * src/reader.c (reader): Do it.
9898
9899 2001-12-17 Akim Demaille <akim@epita.fr>
9900
9901 * src/conflicts.c (print_reductions): Formatting changes.
9902
9903 2001-12-17 Akim Demaille <akim@epita.fr>
9904
9905 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
9906 (flush_reduce): New.
9907 (resolve_sr_conflict): Adjust.
9908
9909 2001-12-17 Akim Demaille <akim@epita.fr>
9910
9911 * src/output.c (output_obstack): Be static and rename as...
9912 (format_obstack): this, to avoid any confusion with files.c's
9913 output_obstack.
9914 * src/reader.h (muscle_obstack): Move to...
9915 * src/output.h: here, since it's defined in output.c.
9916
9917 2001-12-17 Akim Demaille <akim@epita.fr>
9918
9919 * src/output.c (action_row, save_column, default_goto)
9920 (sort_actions, matching_state, pack_vector): Better variable
9921 locality.
9922
9923 2001-12-17 Akim Demaille <akim@epita.fr>
9924
9925 * src/output.c: Various formatting changes.
9926
9927 2001-12-17 Akim Demaille <akim@epita.fr>
9928
9929 * src/files.c (output_files): Free the output_obstack.
9930 * src/main.c (main): Call print and print_graph conditionally.
9931 * src/print.c (print): Work unconditionally.
9932 * src/print_graph.c (print_graph): Work unconditionally.
9933 * src/conflicts.c (log_resolution): Output only if verbose_flag.
9934
9935 2001-12-16 Marc Autret <autret_m@epita.fr>
9936
9937 * src/output.c (actions_output): Fix. When we use %no-lines,
9938 there is one less line per action.
9939
9940 2001-12-16 Marc Autret <autret_m@epita.fr>
9941
9942 * src/bison.simple: Remove a useless #line directive.
9943 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
9944 * src/output.c (get_lines_number): New.
9945 (output_parser): Adjust, now takes care about the lines of a
9946 output muscles.
9947 Fix line numbering.
9948 (actions_output): Computes the number of lines taken by actions.
9949 (output_master_parser): Insert new skeleton which is the name of
9950 the output parser file name.
9951
9952 2001-12-15 Marc Autret <autret_m@epita.fr>
9953
9954 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
9955
9956 2001-12-15 Marc Autret <autret_m@epita.fr>
9957
9958 * src/output.c (output_gram): Keep track of the hairy one.
9959
9960 2001-12-15 Akim Demaille <akim@epita.fr>
9961
9962 Make `make distcheck' work.
9963
9964 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
9965 system.h which uses libgettext.h.
9966
9967 2001-12-15 Akim Demaille <akim@epita.fr>
9968
9969 * src/nullable.c (set_nullable): Useless rules must be skipped,
9970 otherwise, since we range over their symbols, we might look at a
9971 nonterminal which no longer ``exists'', i.e., it is not counted in
9972 `nvars', hence we overflow our arrays.
9973
9974 2001-12-15 Akim Demaille <akim@epita.fr>
9975
9976 The header can also be produced directly, without any obstack!
9977 Yahoo!
9978
9979 * src/files.c, src/files.h (defines_obstack): Remove.
9980 (compute_header_macro): Global.
9981 (defines_obstack_save): Remove.
9982 * src/reader.c (parse_union_decl): No longer output to
9983 defines_obstack: its content can be found in the `stype' muscle
9984 anyway.
9985 (output_token_translations): Merge into...
9986 (symbols_output): this.
9987 Rename as...
9988 (symbols_save): this.
9989 (reader): Adjust.
9990 * src/output.c (header_output): New.
9991 (output): Call it.
9992
9993 2001-12-15 Akim Demaille <akim@epita.fr>
9994
9995 * src/reader.c (parse_union_decl): Instead of handling two obstack
9996 simultaneously, use one to define the `stype' muscle, and use the
9997 value of the latter to fill defines_obstack.
9998 (copy_comment): Remove.
9999 (copy_comment2): Work for a single obstack.
10000 Rename as...
10001 (copy_comment): this.
10002
10003 2001-12-15 Akim Demaille <akim@epita.fr>
10004
10005 * src/lex.c, src/lex.h (xgetc): No longer static.
10006 * src/reader.c (parse_union_decl): Revamp.
10007
10008 2001-12-15 Akim Demaille <akim@epita.fr>
10009
10010 Still making progress in separating Bison into (i) input, (ii)
10011 process, (iii) output: now we can directly output the parser file
10012 without using table_obstack at all.
10013
10014 * src/files.c, src/files.h (table_obstack): Bye bye.
10015 (parser_file_name): New.
10016 * src/files.c (compute_output_file_names): Compute it.
10017 * src/output.c (actions_output, output_parser)
10018 (output_master_parser): To a file instead of an obstack.
10019
10020 2001-12-15 Akim Demaille <akim@epita.fr>
10021
10022 Attach actions to rules, instead of pre-outputting them to
10023 actions_obstack.
10024
10025 * src/gram.h (rule_t): action and action_line are new members.
10026 * src/reader.c (symbol_list): Likewise.
10027 (copy_action): Save the actions within the rule.
10028 (packgram): Save them in rule_table.
10029 * src/output.c (actions_output): New.
10030 (output_parser): Use it on `%%actions'.
10031 (output_rule_data): Don't free rule_table.
10032 (output): Do it.
10033 (prepare): Don't save the `action' muscle.
10034 * src/bison.simple: s/%%action/%%actions/.
10035
10036 2001-12-15 Akim Demaille <akim@epita.fr>
10037
10038 * src/reader.c (copy_action): When --yacc, don't append a `;'
10039 to the user action: let it fail if lacking.
10040 Suggested by Arnold Robbins and Tom Tromey.
10041
10042 2001-12-14 Akim Demaille <akim@epita.fr>
10043
10044 * src/lex.c (literalchar): Simply return the char you decoded, non
10045 longer mess around with obstacks and int pointers.
10046 Adjust all callers.
10047
10048 2001-12-14 Akim Demaille <akim@epita.fr>
10049
10050 * src/lex.c (literalchar): Don't escape the special characters,
10051 just decode them, and keep them as char (before, eol was output as
10052 the 2 char string `\n' etc.).
10053 * src/output.c (output_rule_data): Use quotearg to output the
10054 token strings.
10055
10056 2001-12-13 Paul Eggert <eggert@twinsun.com>
10057
10058 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
10059 Do not infringe on the global user namespace when using C++.
10060 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
10061 All uses of `fprintf' and `stderr' changed.
10062
10063 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
10064
10065 2001-12-13 Akim Demaille <akim@epita.fr>
10066
10067 The computation of nullable is broken: it doesn't handle empty
10068 RHS's properly.
10069
10070 * tests/torture.at (GNU AWK Grammar): New.
10071 * tests/sets.at (Nullable): New.
10072 * src/nullable.c (set_nullable): Instead of blindly looping over
10073 `ritems', loop over the rules, and then over their rhs's.
10074
10075 Work around Autotest bugs.
10076
10077 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
10078 frame, because Autotest understand lines starting with a `+' as
10079 traces from the shell. Then, they are not processed properly.
10080 Admittedly an Autotest bug, but we don't have time to wait for
10081 Autotest to catch up.
10082 * tests/regression.at (Broken Closure): Adjust to the new table
10083 frames.
10084 Move to...
10085 * tests/sets.at: here.
10086
10087 2001-12-13 Akim Demaille <akim@epita.fr>
10088
10089 * src/closure.c (closure): Use nrules instead of playing tricks
10090 with BITS_PER_WORD.
10091
10092 2001-12-13 Akim Demaille <akim@epita.fr>
10093
10094 * src/print.c (print_actions): Output the handling of `$' as the
10095 traces do: shifting the token EOF. Before EOF was treated as a
10096 nonterminal.
10097 * tests/regression.at: Adjust some tests.
10098 * src/print_graph.c (print_core): Complete the set of items via
10099 closure. The next-to-final and final states are still unsatisfying,
10100 but that's to be addressed elsewhere.
10101 No longer output the rule numbers, but do output the state number.
10102 A single loop for the shifts + gotos is enough, but picked a
10103 distinct color for each.
10104 (print_graph): Initialize and finalize closure.
10105
10106 2001-12-13 Akim Demaille <akim@epita.fr>
10107
10108 * src/reader.c (readgram): Remove dead code, an strip useless
10109 braces.
10110 (get_type): Remove, unused.
10111
10112 2001-12-12 Akim Demaille <akim@epita.fr>
10113
10114 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
10115 on that of lib/error.c.
10116
10117 2001-12-12 Akim Demaille <akim@epita.fr>
10118
10119 Some hosts don't like `/' in includes.
10120
10121 * src/system.h: Include libgettext.h without qualifying the path.
10122 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
10123 $(top_srcdir).
10124
10125 2001-12-11 Marc Autret <autret_m@epita.fr>
10126
10127 * src/output.c (output_parser): Remove useless muscle.
10128
10129 2001-12-11 Marc Autret <autret_m@epita.fr>
10130
10131 * src/bison.simple: Remove #line just before %%epilogue. It
10132 is now handled in ...
10133 * src/reader.c (read_additionnal_code): Add the output of a
10134 #line for the epilogue.
10135
10136 2001-12-10 Marc Autret <autret_m@epita.fr>
10137
10138 * src/reader.c (copy_definition): Re-use CPP-outed code which
10139 replace precedent remove.
10140 * src/bison.simple: Remove #line before %%prologue because
10141 %%input-line is wrong at this time.
10142
10143 2001-12-10 Marc Autret <autret_m@epita.fr>
10144
10145 * src/reader.c (symbols_output): Clean up.
10146 * src/output.c (output_gram, output): Clean up.
10147
10148 2001-12-10 Akim Demaille <akim@epita.fr>
10149
10150 * src/lalr.c (initialize_lookaheads): New. Extracted from...
10151 * src/LR0.c (set_state_table): here.
10152 * src/lalr.c (lalr): Call it.
10153
10154 2001-12-10 Akim Demaille <akim@epita.fr>
10155
10156 * src/state.h (shifts): Remove the `number' member: shifts are
10157 attached to state, hence no longer need to be labelled with a
10158 state number.
10159
10160 2001-12-10 Akim Demaille <akim@epita.fr>
10161
10162 Now that states have a complete set of members, the linked list of
10163 shifts is useless: just fill directly the state's shifts member.
10164
10165 * src/state.h (shifts): Remove the `next' member.
10166 * src/LR0.c (first_state, last_state): Remove.
10167 Adjust the callers.
10168 (augment_automaton): Don't look for the shifts that must be added
10169 a shift on EOF: it is those of the state we looked for! But now,
10170 since shifts are attached, it is no longer needed to looking
10171 merely by its id: its number.
10172
10173 2001-12-10 Akim Demaille <akim@epita.fr>
10174
10175 * src/LR0.c (augment_automaton): Better variable locality.
10176 Remove an impossible branch: if there is a state corresponding to
10177 the start symbol being shifted, then there is shift for the start
10178 symbol from the initial state.
10179
10180 2001-12-10 Akim Demaille <akim@epita.fr>
10181
10182 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
10183 only when appropriate: when insert_start_shifting_state' is not
10184 invoked.
10185 * tests/regression.at (Rule Line Numbers): Adjust.
10186
10187 2001-12-10 Akim Demaille <akim@epita.fr>
10188
10189 * src/LR0.c (augment_automaton): Now that all states have shifts,
10190 merge the two cases addition shifts to the initial state.
10191
10192 2001-12-10 Akim Demaille <akim@epita.fr>
10193
10194 * src/lalr.c (set_state_table): Move to...
10195 * src/LR0.c: here.
10196 * src/lalr.c (lalr): Don't call it...
10197 * src/LR0.c (generate_states): do it.
10198 * src/LR0.h (first_state): Remove, only the table is used.
10199
10200 2001-12-10 Akim Demaille <akim@epita.fr>
10201
10202 * src/LR0.h (first_shift, first_reduction): Remove.
10203 * src/lalr.c: Don't use first_shift: find shifts through the
10204 states.
10205
10206 2001-12-10 Akim Demaille <akim@epita.fr>
10207
10208 * src/LR0.c: Attach shifts to states as soon as they are
10209 computed.
10210 * src/lalr.c (set_state_table): Instead of assigning shifts to
10211 state, just assert that the mapping was properly done.
10212
10213 2001-12-10 Akim Demaille <akim@epita.fr>
10214
10215 * src/LR0.c (insert_start_shift): Rename as...
10216 (insert_start_shifting_state): this.
10217 (insert_eof_shifting_state, insert_accepting_state): New.
10218 (augment_automaton): Adjust.
10219 Better locality of the variables.
10220 When looking if the start_symbol is shifted from the initial
10221 state, using `while (... symbol != start_symbol ...)' sounds
10222 better than `while (... symbol < start_symbol ...)': If fail
10223 to see how the order between symbols could be relevant!
10224
10225 2001-12-10 Akim Demaille <akim@epita.fr>
10226
10227 * src/getargs.h: Don't declare `spec_name_prefix' and
10228 `spec_file_prefix', declared by src/files.h.
10229 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
10230 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
10231 * src/output.c (prepare): Adjust.
10232 * src/reader.c (symbols_output): Likewise.
10233 * src/vmsgetargs.c: Vaguely adjust, but who cares?
10234
10235 2001-12-10 Akim Demaille <akim@epita.fr>
10236
10237 * src/muscle_tab.c (muscle_init): NULL is a better default than
10238 `"0"'.
10239
10240 2001-12-10 Akim Demaille <akim@epita.fr>
10241
10242 * src/reader.c (reader): Calling symbols_output once is enough.
10243
10244 2001-12-10 Akim Demaille <akim@epita.fr>
10245
10246 Now that states have a complete set of members, the linked list of
10247 reductions is useless: just fill directly the state's reductions
10248 member.
10249
10250 * src/state.h (struct reductions): Remove member `number' and
10251 `next'.
10252 * src/LR0.c (first_reduction, last_reduction): Remove.
10253 (save_reductions): Don't link the new reductions, store them in
10254 this_state.
10255 * src/lalr.c (set_state_table): No need to attach reductions to
10256 states, it's already done.
10257 * src/output.c (output_actions): No longer free the shifts, then
10258 the reductions, then the states: free all the states and their
10259 members.
10260
10261 2001-12-10 Akim Demaille <akim@epita.fr>
10262
10263 * src/options.c (OPTN, DRTV, BOTH): New.
10264 (option_table): Use them.
10265
10266 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
10267 the job of system.h.
10268 * src/options.c: Don't include stdio.h and xalloc.h for the same
10269 reasons.
10270
10271 2001-12-10 Akim Demaille <akim@epita.fr>
10272
10273 * src/output.c (output, prepare): Make sure the values of the
10274 muscles `action' and `prologue' are 0-terminated.
10275
10276 2001-12-10 Akim Demaille <akim@epita.fr>
10277
10278 Clean up GCC warnings.
10279
10280 * src/reader.c (copy_action): `buf' is not used.
10281 (parse_skel_decl): Be static.
10282 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
10283 * src/options.h (create_long_option_table): Have a real prototype.
10284 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
10285 (hash_delete_at): Return const void *.
10286 Adjust casts to preserve the const.
10287
10288 2001-12-10 Akim Demaille <akim@epita.fr>
10289
10290 * configure.in: Require 2.52g.
10291 M4 is not needed, but AUTOM4TE is.
10292 * m4/m4.m4: Remove.
10293 * tests/Makefile.am: Adjust.
10294
10295 2001-12-10 Akim Demaille <akim@epita.fr>
10296
10297 One structure for states is enough, even though theoretically
10298 there are LR(0) states and LALR(1) states.
10299
10300 * src/lalr.h (state_t): Remove.
10301 (state_table): Be state_t **, not state_t *.
10302 * src/state.h (core, CORE_ALLOC): Rename as...
10303 (state_t, STATE_ALLOC): this.
10304 Add the LALR(1) members: shifts, reductions, errs.
10305 * src/LR0.c (state_table): Rename as...
10306 (state_hash): this, to avoid name clashes with the global
10307 `state_table'.
10308 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
10309 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
10310
10311 2001-12-10 Akim Demaille <akim@epita.fr>
10312
10313 Bison dumps core on bash.y.
10314 Reported by Pascal Bart.
10315
10316 * src/warshall.c (bitmatrix_print): New.
10317 (TC): Use it.
10318 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
10319 j must be the outer loop.
10320 * tests/regression.at (Broken Closure): New.
10321
10322 2001-12-05 Akim Demaille <akim@epita.fr>
10323
10324 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
10325 its argument.
10326 Reported by Peter Hamorsky.
10327
10328 2001-12-05 Akim Demaille <akim@epita.fr>
10329
10330 * src/conflicts.c (err_table): Remove.
10331 (resolve_sr_conflict): Adjust.
10332 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
10333 Rename as...
10334 (state_t.reductions, state_t.shifts): this.
10335
10336 2001-12-05 Akim Demaille <akim@epita.fr>
10337
10338 * src/reduce.c (reduce_grammar_tables): No longer disable the
10339 removal of useless rules via CPP but via `if (0)', so that the
10340 compiler still check the code is valid.
10341 For instance, it should have noticed `rline' no longer exists: use
10342 the `line' member of rule_t.
10343 * src/gram.c (dummy, rline): Remove, unused.
10344
10345 2001-12-05 Akim Demaille <akim@epita.fr>
10346
10347 * src/output.c (pack_vector): Use assert, not berror.
10348 * src/main.c (berror): Remove, unused.
10349
10350 2001-12-05 Akim Demaille <akim@epita.fr>
10351
10352 New experimental feature: if --verbose --trace output all the
10353 items of a state, not only its kernel.
10354
10355 * src/print.c (print_core): If `trace_flag', then invoke closure
10356 before outputting the items of the state (print_core is no longer
10357 a correct name them).
10358 (print_results): Invoke new_closure/free_closure if needed.
10359
10360 2001-12-05 Akim Demaille <akim@epita.fr>
10361
10362 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
10363 * src/closure.c, src/closure.h (itemsetsize): Rename as...
10364 (nitemset): for consistency with the rest of the project.
10365
10366 2001-12-05 Akim Demaille <akim@epita.fr>
10367
10368 * src/closure.c (print_closure): Improve.
10369 (closure): Use it for printing input and output.
10370
10371 2001-12-05 Akim Demaille <akim@epita.fr>
10372
10373 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
10374 indexed by nonterminals.
10375
10376 2001-12-05 Akim Demaille <akim@epita.fr>
10377
10378 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
10379 what it was!).
10380 * src/warshall.h: Remove accidental duplication of the content.
10381
10382 2001-12-05 Akim Demaille <akim@epita.fr>
10383
10384 * src/closure.c (set_fderives): De-obfuscate.
10385
10386 2001-12-05 Akim Demaille <akim@epita.fr>
10387
10388 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
10389
10390 2001-12-05 Akim Demaille <akim@epita.fr>
10391
10392 * src/closure.c (set_firsts): De-obfuscate.
10393
10394 2001-12-05 Akim Demaille <akim@epita.fr>
10395
10396 * src/output.c (action_row): De-obfuscate
10397 using the good o' techniques: arrays not pointers, variable
10398 locality, BITISSET, RESETBIT etc.
10399
10400 2001-12-05 Akim Demaille <akim@epita.fr>
10401
10402 Pessimize the code to simplify it: from now on, all the states
10403 have a valid SHIFTS, which NSHIFTS is possibly 0.
10404
10405 * src/LR0.c (shifts_new): Be global and move to..
10406 * src/state.c, src/state.h: here.
10407 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
10408 * src/print_graph: Adjust.
10409
10410 2001-12-05 Akim Demaille <akim@epita.fr>
10411
10412 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
10413 * src/conflicts.c: Use it.
10414 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
10415 incorrectly ``simplified''.
10416
10417 2001-12-05 Akim Demaille <akim@epita.fr>
10418
10419 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
10420 using the good o' techniques: arrays not pointers, variable
10421 locality, BITISSET, RESETBIT etc.
10422
10423 2001-12-05 Akim Demaille <akim@epita.fr>
10424
10425 * src/state.h (SHIFT_SYMBOL): New.
10426 * src/conflicts.c: Use it to deobfuscate.
10427
10428 2001-12-05 Akim Demaille <akim@epita.fr>
10429
10430 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
10431 (print_reductions): De-obfuscate using the good o' techniques:
10432 arrays not pointers, variable locality, BITISSET.
10433
10434 2001-12-05 Akim Demaille <akim@epita.fr>
10435
10436 * src/conflicts.c (print_reductions): Arrays, not pointers.
10437 Use BITISSET.
10438
10439 2001-12-05 Akim Demaille <akim@epita.fr>
10440
10441 * src/conflicts.c (print_reductions): Pessimize, but clarify.
10442
10443 2001-12-05 Akim Demaille <akim@epita.fr>
10444
10445 * src/conflicts.c (print_reductions): Improve variable locality.
10446
10447 2001-12-05 Akim Demaille <akim@epita.fr>
10448
10449 * src/conflicts.c (print_reductions): Pessimize, but clarify.
10450
10451 2001-12-05 Akim Demaille <akim@epita.fr>
10452
10453 * src/conflicts.c (print_reductions): Improve variable locality.
10454
10455 2001-12-05 Akim Demaille <akim@epita.fr>
10456
10457 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
10458 * src/lalr.c: Use them.
10459
10460 2001-12-05 Akim Demaille <akim@epita.fr>
10461
10462 * src/LR0.c (augment_automaton): Formatting changes.
10463 Better variable locality.
10464
10465 2001-12-05 Akim Demaille <akim@epita.fr>
10466
10467 * src/lalr.c (matrix_print): New.
10468 (transpose): Use it.
10469 Use arrays instead of pointers.
10470
10471 2001-12-05 Akim Demaille <akim@epita.fr>
10472
10473 * src/lalr.c (maxrhs): Move to...
10474 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
10475 * src/lalr.c (build_relations): Adjust.
10476
10477 2001-12-05 Akim Demaille <akim@epita.fr>
10478
10479 * src/lalr.c (transpose): Free the memory allocated to the
10480 argument, as it is replaced by the results by the unique caller.
10481 (build_relations): Merely invoke transpose: it handles the memory
10482 deallocation.
10483 Improve variable locality.
10484 Avoid variables used as mere abbreviations.
10485 (compute_lookaheads): Use arrays instead of pointers.
10486
10487 2001-12-05 Akim Demaille <akim@epita.fr>
10488
10489 * src/lalr.c (initialize_F): Improve variable locality.
10490 Avoid variables used as mere abbreviations.
10491
10492 2001-12-05 Akim Demaille <akim@epita.fr>
10493
10494 * src/derives.c (print_derives): Display the ruleno.
10495 * src/lalr.c (initialize_F, transpose): Better variable locality
10496 to improve readability.
10497 Avoid variables used as mere abbreviations.
10498
10499 2001-12-05 Akim Demaille <akim@epita.fr>
10500
10501 * src/lalr.c (traverse): Use arrays instead of pointers.
10502
10503 2001-12-05 Akim Demaille <akim@epita.fr>
10504
10505 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
10506 the handling of squeue.
10507 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
10508
10509 2001-12-05 Akim Demaille <akim@epita.fr>
10510
10511 Because useless nonterminals are now kept alive (instead of being
10512 `destroyed'), we now sometimes examine them, and store information
10513 related to them. Hence we need to know their number, and adjust
10514 memory allocations.
10515
10516 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
10517 static.
10518 * src/LR0.c (allocate_itemsets): The memory allocated to
10519 `symbol_count' was used for two different purpose: once to count
10520 the number of occurrences of each symbol, and later reassigned to
10521 `shift_symbol', containing the symbol that can be shifted from a
10522 given state.
10523 Deobfuscate, i.e., allocate, use and free `symbol_count' here
10524 only, and...
10525 (new_itemsets): Allocate `shift_symbol' here.
10526 (allocate_itemsets): symbol_count includes useless nonterminals.
10527 Make room for them.
10528 (free_storage): Use `free', not `XFREE', for pointers that cannot
10529 be null.
10530
10531 2001-12-05 Akim Demaille <akim@epita.fr>
10532
10533 * src/nullable.c (set_nullable): Deobfuscate the handling of
10534 ritem.
10535 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
10536
10537 2001-12-05 Akim Demaille <akim@epita.fr>
10538
10539 * src/gram.c, src/gram.h (ritem_print): New.
10540 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
10541 (This useless function was defined only to work around VMS linkers
10542 that can't handle compilation units with variables only).
10543 * src/reduce.c (dump_grammar): Use it to trace the construction of
10544 ritem.
10545
10546 2001-12-04 Paul Eggert <eggert@twinsun.com>
10547
10548 * src/bison.simple (union yyalloc): Change member names
10549 to be the same as the stack names.
10550 (yyparse): yyptr is now union yyalloc *, not char *.
10551 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
10552 and may generate better code on some machines.
10553 (yystpcpy): Use prototype if __STDC__ is defined, not just
10554 if __cplusplus is defined.
10555
10556 2001-11-30 Akim Demaille <akim@epita.fr>
10557
10558 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
10559 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
10560 Gettext doesn't compile cleanly, and dies with -Werror.
10561 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
10562 Include WARNING_CFLAGS here.
10563 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
10564 before being defined.
10565
10566 2001-11-27 Paul Eggert <eggert@twinsun.com>
10567
10568 * lib/quotearg.h (quotearg_n, quotearg_n_style):
10569 First arg is int, not unsigned.
10570 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
10571 (SIZE_MAX, UINT_MAX): New macros.
10572 (quotearg_n_options): Abort if N is negative.
10573 Avoid overflow check on hosts where size_t is 64 bits and int
10574 is 32 bits, as overflow is impossible there.
10575 Fix off-by-one typo that caused unnecessary reallocation.
10576
10577 2001-11-29 Paul Eggert <eggert@twinsun.com>
10578
10579 Name space cleanup in generated parser.
10580
10581 * doc/bison.texinfo (Bison Parser): Discuss system headers
10582 and their effect on the user name space.
10583
10584 * src/bison.simple:
10585 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
10586 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
10587 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
10588
10589 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
10590 on user names when possible.
10591
10592 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
10593 Simplify test for whather <alloca.h> exists.
10594
10595 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
10596
10597 (<stdio.h>): Include if YYDEBUG.
10598
10599 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
10600 ! defined (yyoverflow) && ! defined (yymemcpy).
10601
10602 (yymemcpy, yyparse): Rename local variables as needed so that
10603 they all begin with 'yy'.
10604
10605 (yystrlen, yystpcpy): New functions.
10606
10607 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
10608 All uses changed.
10609
10610 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
10611 instead of relying on string.h functions. Use YYSTACK_ALLOC
10612 and YYSTACK_FREE instead of malloc and free.
10613
10614 2001-11-30 Akim Demaille <akim@epita.fr>
10615
10616 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
10617 before their first uses.
10618 (YYBISON, YYPURE): Move to the top of the output.
10619
10620 2001-11-30 Akim Demaille <akim@epita.fr>
10621
10622 * tests/reduce.at (Useless Nonterminals): Fix.
10623
10624 2001-11-30 Akim Demaille <akim@epita.fr>
10625
10626 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
10627 if body instead of `;' to pacify GCC's warnings.
10628
10629 2001-11-30 Akim Demaille <akim@epita.fr>
10630
10631 Instead of mapping the LHS of unused rules to -1, keep the LHS
10632 valid, but flag the rules as invalid.
10633
10634 * src/gram.h (rule_t): `useful' is a new member.
10635 * src/print.c (print_grammar): Adjust.
10636 * src/derives.c (set_derives): Likewise.
10637 * src/reader.c (packgram, reduce_output): Likewise.
10638 * src/reduce.c (reduce_grammar_tables): Likewise.
10639 * tests/reduce.at (Underivable Rules, Useless Rules): New.
10640
10641 2001-11-30 Akim Demaille <akim@epita.fr>
10642
10643 * src/reduce.c (reduce_output): Formatting changes.
10644 * src/print.c (print_results, print_grammar): Likewise.
10645 * tests/regression.at (Rule Line Numbers)
10646 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
10647
10648 2001-11-30 Akim Demaille <akim@epita.fr>
10649
10650 * src/reduce.c (nonterminals_reduce): Instead of throwing away
10651 useless nonterminals, move them at the end of the symbol arrays.
10652 (reduce_output): Adjust.
10653 * tests/reduce.at (Useless Nonterminals): Adjust.
10654
10655 2001-11-30 Akim Demaille <akim@epita.fr>
10656
10657 * src/reduce.c: Various comment/formatting changes.
10658 (nonterminals_reduce): New, extracted from...
10659 (reduce_grammar_tables): here.
10660 (reduce_grammar): Call nonterminals_reduce.
10661
10662 2001-11-29 Paul Eggert <eggert@twinsun.com>
10663
10664 * src/bison.simple (YYSTACK_REALLOC): Remove.
10665 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
10666 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
10667 New macros.
10668 (union yyalloc): New type.
10669 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
10670 an arbitrary restriction on hosts where size_t is wider than int.
10671
10672 (yyparse): Don't dump core if alloca or malloc fails; instead, report
10673 a parser stack overflow. Allocate just one block of memory for all
10674 three stacks, instead of allocating three blocks; this typically is
10675 faster and reduces fragmentation.
10676
10677 Do not limit the number of items in the stack to a value that fits
10678 in 'int', as this is an arbitrary limit on hosts with 64-bit
10679 size_t and 32-bit int.
10680
10681 2001-11-29 Marc Autret <autret_m@epita.fr>
10682
10683 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
10684 of defining YYERROR_VERBOSE.
10685 [AT_DATA]: $4 is now out of C declarations in the prologue.
10686
10687 2001-11-28 Marc Autret <autret_m@epita.fr>
10688
10689 * src/reader.c (parse_dquoted_param): New.
10690 (parse_skel_decl): Use it.
10691 * src/lex.h: Add its prototype.
10692 * src/lex.c (literalchar): Become not static.
10693
10694 2001-11-28 Marc Autret <autret_m@epita.fr>
10695
10696 * src/output.h: And put its extern declaration here.
10697 * src/output.c (error_verbose): Define here.
10698 (prepare): Echo name modification.
10699 * src/getargs.h: Clean its extern declaration.
10700 * src/getargs.c (error_verbose_flag): Remove.
10701 (getargs): Remove case 'e'.
10702 * src/options.c (option_table): 'error-verbose' is now seen as simple
10703 percent option.
10704 Include output.h.
10705
10706 * src/reader.c (read_declarations): Remove case tok_include.
10707 (parse_include_decl): Remove.
10708 * src/lex.h (token_t): Remove tok_include.
10709 * src/options.c (option_table): 'include' is now a simple command line
10710 option.
10711
10712 2001-11-28 Marc Autret <autret_m@epita.fr>
10713
10714 * src/bison.simple: Adjust muscle names.
10715 * src/muscle_tab.c (muscle_init): Also rename the muscles.
10716 * src/output.c (prepare): s/_/-/ for the muscles names.
10717 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
10718
10719 2001-11-28 Marc Autret <autret_m@epita.fr>
10720
10721 * src/bison.simple: Fix debug.
10722 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
10723
10724 2001-11-28 Akim Demaille <akim@epita.fr>
10725
10726 * src/LR0.c (shifts_new): New.
10727 (save_shifts, insert_start_shift, augment_automaton): Use it.
10728
10729 2001-11-28 Akim Demaille <akim@epita.fr>
10730
10731 * src/closure.c (closure): `b' and `ruleno' denote the same value:
10732 keep ruleno only.
10733
10734 2001-11-28 Akim Demaille <akim@epita.fr>
10735
10736 * src/closure.c (closure): Instead of looping over word in array
10737 then bits in words, loop over bits in array.
10738
10739 2001-11-28 Akim Demaille <akim@epita.fr>
10740
10741 * src/closure.c (closure): No longer optimize the special case
10742 where all the bits of `ruleset[r]' are set to 0, to make the code
10743 clearer.
10744
10745 2001-11-28 Akim Demaille <akim@epita.fr>
10746
10747 * src/closure.c (closure): `r' and `c' are new variables, used to
10748 de-obfuscate accesses to RULESET and CORE.
10749
10750 2001-11-28 Akim Demaille <akim@epita.fr>
10751
10752 * src/reduce.c (reduce_print): Use ngettext.
10753 (dump_grammar): Improve the trace accuracy.
10754
10755 2001-11-28 Akim Demaille <akim@epita.fr>
10756
10757 * src/reduce.c (dump_grammar): Don't translate trace messages.
10758
10759 2001-11-28 Akim Demaille <akim@epita.fr>
10760
10761 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
10762 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
10763 as all tags are free'ed afterwards.
10764 From Enrico Scholz.
10765
10766 2001-11-27 Paul Eggert <eggert@twinsun.com>
10767
10768 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
10769 use alloca when we didn't want to, and vice versa.
10770
10771 2001-11-27 Marc Autret <autret_m@epita.fr>
10772
10773 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
10774 initialization.
10775 * src/output.c (prepare): Remove its update.
10776
10777 2001-11-27 Marc Autret <autret_m@epita.fr>
10778
10779 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
10780 Use %error-verbose.
10781
10782 2001-11-27 Marc Autret <autret_m@epita.fr>
10783
10784 * src/bison.simple: Remove YYERROR_VERBOSE using.
10785 Use %%error_verbose.
10786 (yyparse): Likewise.
10787 * src/output.c (prepare): Give its final value.
10788 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
10789 * src/getargs.h: Add its extern declaration.
10790 * src/getargs.c (error_verbose_flag): New int.
10791 (getargs): Update to catch new case.
10792 * src/options.c (option_table): 'error-verbose' is a new option.
10793 (shortopts): Update.
10794
10795 2001-11-27 Akim Demaille <akim@epita.fr>
10796
10797 * src/system.h: Use intl/libgettext.h.
10798 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
10799
10800 2001-11-27 Akim Demaille <akim@epita.fr>
10801
10802 * tests/torture.at (Exploding the Stack Size with Malloc):
10803 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
10804
10805 2001-11-27 Akim Demaille <akim@epita.fr>
10806
10807 * src/files.c: Include error.h.
10808 Reported by Hans Aberg.
10809
10810 2001-11-26 Marc Autret <autret_m@epita.fr>
10811
10812 * src/reader.c (parse_include_decl): New, not yet implemented.
10813 (read_declarations): Add case tok_include.
10814 * src/getargs.h (include): Add its extern definition.
10815 * src/getargs.c (include): New const char *.
10816 (getargs): Add case '-I'.
10817 * src/options.c (option_table): Add include as command line and
10818 percent option.
10819 * src/lex.h (token_t): Add tok_include.
10820
10821 2001-11-26 Akim Demaille <akim@epita.fr>
10822
10823 * src/reader.c (readgram): Make sure rules for mid-rule actions
10824 have a lineno equal to that of their host rule.
10825 Reported by Hans Aberg.
10826 * tests/regression.at (Rule Line Numbers): New.
10827
10828 2001-11-26 Akim Demaille <akim@epita.fr>
10829
10830 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
10831 size_ts.
10832
10833 2001-11-26 Akim Demaille <akim@epita.fr>
10834
10835 * src/complain.c, src/complain.h (error): Remove, provided by
10836 lib/error.[ch].
10837
10838 2001-11-26 Akim Demaille <akim@epita.fr>
10839
10840 * src/reader.c (read_declarations): Don't abort on tok_illegal,
10841 issue an error message.
10842 * tests/regression.at (Invalid %directive): New.
10843 Reported by Hans Aberg.
10844
10845 2001-11-26 Akim Demaille <akim@epita.fr>
10846
10847 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
10848 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
10849
10850 2001-11-26 Akim Demaille <akim@epita.fr>
10851
10852 * src/conflicts.c (conflicts_print): Don't complain at all when
10853 there are no reduce/reduce conflicts, and as many shift/reduce
10854 conflicts as expected.
10855 * tests/regression.at (%expect right): Adjust.
10856
10857 2001-11-23 Akim Demaille <akim@epita.fr>
10858
10859 * lib/alloca.c: Update, from fileutils.
10860
10861 2001-11-23 Akim Demaille <akim@epita.fr>
10862
10863 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
10864
10865 2001-11-23 Akim Demaille <akim@epita.fr>
10866
10867 * src/system.h: Include alloca.h.
10868 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
10869
10870 2001-11-23 Akim Demaille <akim@epita.fr>
10871
10872 * src/print_graph.c (print_actions): Remove `rule', unused.
10873 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
10874 pacify GCC's signed < unsigned warnings.
10875 * src/closure.c (itemsetsize): Likewise.
10876 * src/reader.c (symbol_list_new): Static.
10877
10878 2001-11-23 Akim Demaille <akim@epita.fr>
10879
10880 Attaching lineno to buckets is stupid, since only one copy of each
10881 symbol is kept, only the line of the first occurrence is kept too.
10882
10883 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
10884 * src/reader.c (rline_allocated): Remove, unused.
10885 (symbol_list): Have a `line' member.
10886 (symbol_list_new): New.
10887 (readgram): Use it.
10888 * src/print.c (print_grammar): Output the rule line numbers.
10889 * tests/regression.at (Solved SR Conflicts)
10890 (Unresolved SR Conflicts): Adjust.
10891 Reported by Hans Aberg.
10892
10893 2001-11-22 Marc Autret <autret_m@epita.fr>
10894
10895 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
10896
10897 2001-11-22 Marc Autret <autret_m@epita.fr>
10898
10899 * src/muscle_tab.c (muscle_init): Remove initialization of
10900 skeleton muscle.
10901 * src/output.c (output_master_parser): Do it here.
10902
10903 2001-11-20 Akim Demaille <akim@epita.fr>
10904
10905 * po/sv.po: New.
10906 * configure.in (ALL_LINGUAS): Adjust.
10907 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
10908 longer contains strings to translate.
10909
10910 2001-11-19 Akim Demaille <akim@epita.fr>
10911
10912 * src/conflicts.c (conflicts_print): Add a missing \n.
10913
10914 2001-11-19 Akim Demaille <akim@epita.fr>
10915
10916 * src/nullable.c (nullable_print): New.
10917 (set_nullable): Call it when tracing.
10918 Better locality of variables.
10919
10920 2001-11-19 Akim Demaille <akim@epita.fr>
10921
10922 * src/print.c (print_actions): Better locality of variables.
10923
10924 2001-11-19 Akim Demaille <akim@epita.fr>
10925
10926 * src/derives.c (print_derives): Fix and enrich.
10927 * src/closure.c (print_fderives): Likewise.
10928
10929 2001-11-19 Akim Demaille <akim@epita.fr>
10930
10931 * src/closure.c (itemsetend): Remove, replaced with...
10932 (itemsetsize): new.
10933
10934 2001-11-19 Akim Demaille <akim@epita.fr>
10935
10936 * src/LR0.c (kernel_end): Remove, replaced with...
10937 (kernel_size): new.
10938
10939 2001-11-19 Akim Demaille <akim@epita.fr>
10940
10941 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
10942 to clarify.
10943
10944 2001-11-19 Akim Demaille <akim@epita.fr>
10945
10946 * src/closure.c (closure): Use arrays instead of pointers to clarify.
10947
10948 2001-11-19 Akim Demaille <akim@epita.fr>
10949
10950 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
10951 trace messages.
10952 * src/LR0.c: Likewise.
10953 (allocate_itemsets): Use arrays instead of pointers to clarify.
10954
10955 2001-11-19 Akim Demaille <akim@epita.fr>
10956
10957 * src/getargs.c (statistics_flag): Replace with...
10958 (trace_flag): New.
10959 (longopts): Accept --trace instead of --statistics.
10960 * src/getargs.h, src/options.c: Adjust.
10961 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
10962 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
10963
10964 2001-11-19 Akim Demaille <akim@epita.fr>
10965
10966 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
10967 pointers to clarify the code.
10968 (save_reductions, save_shifts): Factor common parts of alternatives.
10969
10970 2001-11-19 Akim Demaille <akim@epita.fr>
10971
10972 * src/LR0.c (new_state, get_state): Complete TRACE code.
10973 * src/closure.c: Include `reader.h' to get `tags', needed by the
10974 trace code.
10975 Rename the conditional DEBUG as TRACE.
10976 Output consistently TRACEs to stderr, not stdout.
10977 * src/derives.c: Likewise.
10978 * src/reduce.c: (inaccessable_symbols): Using if is better style
10979 than goto.
10980 Use `#if TRACE' instead of `#if 0' for tracing code.
10981
10982 2001-11-19 Akim Demaille <akim@epita.fr>
10983
10984 * src/system.h (LIST_FREE, shortcpy): New.
10985 * src/LR0.c: Use them.
10986 * src/output.c (free_itemsets, free_reductions, free_shifts):
10987 Remove, replaced by LIST_FREE.
10988
10989 2001-11-19 Akim Demaille <akim@epita.fr>
10990
10991 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
10992 (REDUCTIONS_ALLOC): New.
10993 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
10994 allocation.
10995
10996 2001-11-19 Akim Demaille <akim@epita.fr>
10997
10998 * src/LR0.c (new_state): Complete trace code.
10999 * src/nullable.c (set_nullable): Don't translate traces.
11000
11001 2001-11-19 Akim Demaille <akim@epita.fr>
11002
11003 * src/print_graph.c (print_core): Better locality of variables.
11004 * src/print.c (print_core): Likewise.
11005
11006 2001-11-19 Akim Demaille <akim@epita.fr>
11007
11008 * src/vcg.c: You do the output, so you are responsible of the
11009 handling of VCG syntax, in particular: use quotearg.
11010 * src/print_graph.c: Don't.
11011 (print_actions): Don't output the actions as part of the nodes,
11012 since that's the job of the edges.
11013 (print_state): Don't output by hand: fill the node description,
11014 and ask for its output.
11015
11016 2001-11-19 Akim Demaille <akim@epita.fr>
11017
11018 * src/bison.simple (yyparse): When verbosely reporting an error,
11019 no longer put additional quotes around token names.
11020 * tests/calc.at: Adjust.
11021
11022 2001-11-19 Akim Demaille <akim@epita.fr>
11023
11024 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
11025 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
11026 * src/output.c: Adjust.
11027
11028 2001-11-19 Akim Demaille <akim@epita.fr>
11029
11030 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
11031 (rule_t): this.
11032 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
11033
11034 2001-11-19 Akim Demaille <akim@epita.fr>
11035
11036 * src/gram.h (rule_t): New.
11037 (rule_table): New.
11038 (rrhs, rlhs): Remove, part of state_t.
11039 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
11040 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
11041 * src/reader.c, src/reduce.c: Adjust.
11042
11043 2001-11-19 Akim Demaille <akim@epita.fr>
11044
11045 * src/reader.c (symbols_output): New, extracted from...
11046 (packsymbols): Here.
11047 (reader): Call it.
11048
11049 2001-11-19 Akim Demaille <akim@epita.fr>
11050
11051 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
11052 (maxrhs): this new function.
11053
11054 2001-11-19 Akim Demaille <akim@epita.fr>
11055
11056 * src/lalr.c (F): New macro to access the variable F.
11057 Adjust.
11058
11059 2001-11-19 Akim Demaille <akim@epita.fr>
11060
11061 * src/lalr.h (LA): New macro to access the variable LA.
11062 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
11063 * src/lalr.c: Adjust.
11064
11065 2001-11-19 Akim Demaille <akim@epita.fr>
11066
11067 * src/lalr.c (initialize_LA): Only initialize LA. Let...
11068 (set_state_table): handle the `lookaheads' members.
11069
11070 2001-11-19 Akim Demaille <akim@epita.fr>
11071
11072 * src/lalr.h (lookaheads): Removed array, whose contents is now
11073 a member of...
11074 (state_t): this structure.
11075 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
11076 Adjust.
11077
11078 2001-11-19 Akim Demaille <akim@epita.fr>
11079
11080 * src/lalr.h (consistent): Removed array, whose contents is now
11081 a member of...
11082 (state_t): this structure.
11083 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
11084 Adjust.
11085
11086 2001-11-19 Akim Demaille <akim@epita.fr>
11087
11088 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
11089 contents are now members of...
11090 (state_t): this structure.
11091 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
11092 Adjust.
11093
11094 2001-11-19 Akim Demaille <akim@epita.fr>
11095
11096 * src/lalr.h (state_t): New.
11097 (state_table): Be a state_t * instead of a core **.
11098 (accessing_symbol): Remove, part of state_t.
11099 * src/lalr.c: Adjust.
11100 (set_accessing_symbol): Merge into...
11101 (set_state_table): this.
11102 * src/print_graph.c, src/conflicts.c: Adjust.
11103
11104 2001-11-14 Akim Demaille <akim@epita.fr>
11105
11106 * tests/calc.at, tests/output.at, tests/regression.at,
11107 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
11108 now the tests are run in private dirs, therefore AC_CLEANUP and
11109 family can be simplified to 0-ary.
11110 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
11111 use abs. path to find config.h.
11112 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
11113 stderr, there can be way too much random noise.
11114 Instead pass -Werror to GCC and rely on the exit status.
11115 Reported by Wolfram Wagner.
11116
11117 2001-11-14 Akim Demaille <akim@epita.fr>
11118
11119 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
11120 defined only if yyoverflow is defined, to avoid `warning: unused
11121 variable `yyvs1''.
11122 Reported by The Test Suite.
11123
11124 2001-11-14 Akim Demaille <akim@epita.fr>
11125
11126 * src/print.c: Include reduce.h.
11127 Reported by Hans Aberg.
11128
11129 2001-11-14 Akim Demaille <akim@epita.fr>
11130
11131 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
11132 Revert a previous patch: these are really const.
11133 * src/conflicts.c (conflict_report): Additional useless pair of
11134 braces to pacify GCC's warnings for `if () if () {} else {}'.
11135 * src/lex.c (parse_percent_token): Replace equal_offset with
11136 arg_offset.
11137 arg is const.
11138 Be sure to strdup `arg' when used, since there is no reason for
11139 token_buffer not to change.
11140
11141 2001-11-14 Akim Demaille <akim@epita.fr>
11142
11143 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
11144 definition.
11145 * src/main.c (main): Use them.
11146 Suggested by Hans Aberg.
11147
11148 2001-11-12 Akim Demaille <akim@epita.fr>
11149
11150 * src/system.h (ngettext): Now that we use ngettext, be sure to
11151 provide a default definition when NLS are not used.
11152
11153 2001-11-12 Akim Demaille <akim@epita.fr>
11154
11155 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
11156 Use @kbd to denote user input.
11157 (Language and Grammar): ANSIfy the example.
11158 Adjust its layout for info/notinfo.
11159 (Location Tracking Calc): Output error messages to stderr.
11160 Output locations in a more GNUtically correct way.
11161 Fix a couple of Englishos.
11162 Adjust @group/@end group pairs.
11163
11164 2001-11-12 Akim Demaille <akim@epita.fr>
11165
11166 %expect was not functioning at all.
11167
11168 * src/conflicts.c (expected_conflicts): Set to -1.
11169 (conflict_report): Use ngettext.
11170 (conflicts_print): Check %expect and make its violation an error.
11171 * doc/bison.texinfo (Expect Decl): Adjust.
11172 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
11173 * tests/regression.at (%expect not enough, %expect right)
11174 (%expect too much): New.
11175
11176 2001-11-12 Akim Demaille <akim@epita.fr>
11177
11178 * tests/regression.at (Conflicts): Rename as...
11179 (Unresolved SR Conflicts): this.
11180 (Solved SR Conflicts): New.
11181
11182 2001-11-12 Akim Demaille <akim@epita.fr>
11183
11184 * src/reduce.c (print_results): Rename as...
11185 (reduce_output): This.
11186 Output to OUT, passed as argument, instead of output_obstack.
11187 (dump_grammar): Likewise.
11188 (reduce_free): New.
11189 Also free V1.
11190 (reduce_grammar): No longer call reduce_output, since...
11191 * src/print.c (print_results): do it.
11192 * src/main.c (main): Call reduce_free;
11193
11194 2001-11-12 Akim Demaille <akim@epita.fr>
11195
11196 * src/conflicts.c (print_reductions): Accept OUT as argument.
11197 Output to it, not to output_obstack.
11198 * src/print.c (print_actions): Adjust.
11199
11200 2001-11-12 Akim Demaille <akim@epita.fr>
11201
11202 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
11203 the result instead of using...
11204 (src_total, rrc_total, src_count, rrc_count): Remove.
11205 (any_conflicts): Remove.
11206 (print_conflicts): Split into...
11207 (conflicts_print, conflicts_output): New.
11208 * src/conflicts.h: Adjust.
11209 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
11210 * src/print.c (print_grammar): Issue `\n' between two rules.
11211 * tests/regression.at (Conflicts): New.
11212 Reported by Tom Lane.
11213
11214 2001-11-12 Akim Demaille <akim@epita.fr>
11215
11216 * tests/regression.at (Invalid input): Remove, duplicate with
11217 ``Invalid input: 1''.
11218
11219 2001-11-12 Akim Demaille <akim@epita.fr>
11220
11221 * tests/torture.at (AT_DATA_STACK_TORTURE)
11222 (Exploding the Stack Size with Alloca)
11223 (Exploding the Stack Size with Malloc): New.
11224
11225 2001-11-12 Akim Demaille <akim@epita.fr>
11226
11227 * src/bison.simple (YYSTACK_REALLOC): New.
11228 (yyparse) [!yyoverflow]: Use it and free the old stack.
11229 Reported by Per Allansson.
11230
11231 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
11232
11233 * src/bison.simple: Define type yystype instead of YYSTYPE, and
11234 define CPP macro, which substitute YYSTYPE by yystype.
11235 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
11236 with yyltype/YYLTYPE. This allows inclusion of the generated
11237 header within the parser if the compiler, such as GGC, accepts
11238 multiple equivalent #defines.
11239 From Akim.
11240
11241 2001-11-05 Akim Demaille <akim@epita.fr>
11242
11243 * src/reader.c (symbols_output): New, extracted from...
11244 (packsymbols): here.
11245 (reader): Adjust.
11246
11247 2001-11-05 Akim Demaille <akim@epita.fr>
11248
11249 * src/lex.c (parse_percent_token): s/quotearg/quote/.
11250
11251 2001-11-05 Akim Demaille <akim@epita.fr>
11252
11253 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
11254 pattern.
11255
11256 2001-11-05 Akim Demaille <akim@epita.fr>
11257
11258 * src/options.h (struct option_table_struct): set_flags is void*.
11259 * src/options.c (longopts): Support `--output' and `%output'.
11260 (usage): Adjust.
11261 * src/lex.h (tok_setopt): Remove, replaced with...
11262 (tok_intopt, tok_stropt): these new guys.
11263 * src/lex.c (getopt.h): Not needed.
11264 (token_buffer, unlexed_token_buffer): Not const.
11265 (percent_table): Promote `-' over `_' in directive names.
11266 Active `%name-prefix', `file-prefix', and `output'.
11267 (parse_percent_token): Accept possible arguments to directives.
11268 Promote `-' over `_' in directive names.
11269
11270 2001-11-04 Akim Demaille <akim@epita.fr>
11271
11272 * doc/bison.texinfo (Decl Summary): Split the list into
11273 `directives for grammars' and `directives for bison'.
11274 Sort'em.
11275 Add description of `%name-prefix', `file-prefix', and `output'.
11276 Promote `-' over `_' in directive names.
11277 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
11278 Simplify the description of `--name-prefix'.
11279 Promote `-' over `_' in directive names.
11280 Promote `--output' over `--output-file'.
11281 Fix the description of `--defines'.
11282 * tests/output.at: Exercise %file-prefix and %output.
11283
11284 2001-11-02 Akim Demaille <akim@epita.fr>
11285
11286 * doc/refcard.tex: Update.
11287
11288 2001-11-02 Akim Demaille <akim@epita.fr>
11289
11290 * src/symtab.h (SUNDEF): New.
11291 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
11292 stand for `uninitialized', instead of 0.
11293 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
11294 * src/lex.c (lex): Adjust.
11295
11296 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
11297 Number it 0.
11298 Let yylex return it instead of a plain 0.
11299 Reported by Dick Streefland.
11300
11301 2001-11-02 Akim Demaille <akim@epita.fr>
11302
11303 * tests/regression.at (Mixing %token styles): New test.
11304
11305 2001-11-02 Akim Demaille <akim@epita.fr>
11306
11307 * src/reader.c (parse_thong_decl): Formatting changes.
11308 (token_translations_init): New, extracted from...
11309 (packsymbols): Here.
11310 Adjust.
11311
11312 2001-11-01 Akim Demaille <akim@epita.fr>
11313
11314 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
11315 Check that `9foo.y' produces correct cpp guards.
11316 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
11317 guards.
11318 Reported by Wwp.
11319
11320 2001-11-01 Akim Demaille <akim@epita.fr>
11321
11322 * tests/regression.at (Invalid input: 2): New.
11323 * src/lex.c (unlexed_token_buffer): New.
11324 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
11325 too.
11326 Reported by Wwp.
11327
11328 2001-11-01 Akim Demaille <akim@epita.fr>
11329
11330 * tests/calc.at: Catch up with 1.30.
11331 * configure.in: Bump to 1.49a.
11332 Adjust to newer Autotest.
11333
11334 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
11335
11336 * src/conflicts.c: Move global variables rrc_total and src_total ...
11337 (print_conflicts): here.
11338 * src/output.c (output): Free global variable user_toknums.
11339 * src/lex.c (token_obstack): Become static.
11340
11341 2001-10-18 Akim Demaille <akim@epita.fr>
11342
11343 * tests/atlocal.in (GCC): Add.
11344 * tests/calc.at: s/m4_match/m4_bmatch/.
11345 s/m4_patsubst/m4_bpatsubst/.
11346 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
11347 * configure.in: AC_SUBST(GCC).
11348
11349 2001-10-14 Marc Autret <autret_m@epita.fr>
11350
11351 * src/options.c (create_long_option_table): Fix.
11352
11353 2001-10-10 Akim Demaille <akim@epita.fr>
11354
11355 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
11356
11357 2001-10-04 Akim Demaille <akim@epita.fr>
11358
11359 * src/reader.c (parse_union_decl): Push the caracters in
11360 union_obstack, not attrs_obstack.
11361
11362 2001-10-04 Akim Demaille <akim@epita.fr>
11363
11364 Merge in the branch 1.29.
11365
11366 * src/reader.c (packsymbols): Use a temporary obstack for
11367 `%%tokendef', since output_stack is already used elsewhere.
11368
11369 2001-10-02 Akim Demaille <akim@epita.fr>
11370
11371 Bump 1.29d.
11372
11373 2001-10-02 Akim Demaille <akim@epita.fr>
11374
11375 Version 1.29c.
11376
11377 2001-10-02 Akim Demaille <akim@epita.fr>
11378
11379 * tests/regression.at (Invalid CPP headers): New.
11380 From Alexander Belopolsky.
11381 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
11382
11383 2001-10-02 Akim Demaille <akim@epita.fr>
11384
11385 * tests/regression.at (Invalid input): New.
11386 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
11387 Reported by Shura.
11388
11389 2001-10-02 Akim Demaille <akim@epita.fr>
11390
11391 * tests/calc.at: Now that --debug works, the tests must be adjusted.
11392
11393 2001-10-02 Akim Demaille <akim@epita.fr>
11394
11395 * src/output.c (output_parser): Assert `skeleton'.
11396 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
11397 systems.
11398 From Shura.
11399
11400 2001-10-01 Marc Autret <autret_m@epita.fr>
11401
11402 * src/lex.h: Echo modifications.
11403 * src/lex.c (unlex): Parameter is now token_t.
11404 From Hans Aberg.
11405
11406 2001-10-01 Marc Autret <autret_m@epita.fr>
11407
11408 * src/main.c: Include lex.h.
11409 From Hans Aberg.
11410
11411 2001-09-29 Akim Demaille <akim@epita.fr>
11412
11413 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
11414
11415 2001-09-28 Akim Demaille <akim@epita.fr>
11416
11417 * tests/testsuite.at: Update to newer Autotest.
11418 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
11419
11420 2001-09-27 Akim Demaille <akim@epita.fr>
11421
11422 Position independent wrapper.
11423
11424 * tests/bison: Remove.
11425 * tests/bison.in: New.
11426 * configure.in: Adjust.
11427
11428 2001-09-27 Paul Eggert <eggert@twinsun.com>
11429
11430 Port quotearg fixes from tar 1.13.24.
11431
11432 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
11433 tm to be declared.
11434 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
11435 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
11436
11437 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
11438 * m4/mbrtowc.m4: New file.
11439 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
11440 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
11441
11442 2001-09-27 Akim Demaille <akim@epita.fr>
11443
11444 Bump to 1.29c.
11445
11446 2001-09-27 Akim Demaille <akim@epita.fr>
11447
11448 Version 1.29b.
11449
11450 2001-09-25 Akim Demaille <akim@epita.fr>
11451
11452 * src/system.h: Include `xalloc.h'.
11453 Remove it from the C files.
11454 * src/files.c (output_files): Free the obstacks.
11455 * src/lex.c (init_lex): Rename as...
11456 (lex_init): this.
11457 (lex_free): New.
11458 * src/main.c (main): Use it.
11459
11460 2001-09-24 Marc Autret <autret_m@epita.fr>
11461
11462 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
11463 to output informations in fout (FILE*).
11464 (open_graph, close_graph): Likewise.
11465 (output_graph, output_edge, output_node): Likewise.
11466 * src/vcg.h: Update function prototypes.
11467 * src/print_graph.c (print_graph): Open output graph file.
11468 (print_actions): Adjust.
11469 * src/files.h: Remove extern declaration.
11470 * src/files.c: Remove graph_obstack declaration.
11471 (open_files): Remove graph_obstack initialization.
11472 (output_files): Remove graph_obstack saving.
11473
11474 2001-09-24 Marc Autret <autret_m@epita.fr>
11475
11476 * src/files.c (compute_output_file_names): Fix.
11477
11478 2001-09-24 Marc Autret <autret_m@epita.fr>,
11479 Akim Demaille <akim@epita.fr>
11480
11481 * src/reader.c (reader): Remove call to free_symtab ().
11482 * src/main.c (main): Call it here.
11483 Include symtab.h.
11484 * src/conflicts.c (initialize_conflicts): Rename as...
11485 (solve_conflicts): this.
11486 * src/print.c (print_core, print_actions, print_state)
11487 (print_grammar): Dump to a file instead a `output_obstack'.
11488 (print_results): Dump `output_obstack', and then proceed with the
11489 FILE *.
11490 * src/files.c (compute_output_file_names, close_files): New.
11491 (output_files): Adjust.
11492 * src/main.c (main): Adjust.
11493
11494 2001-09-23 Marc Autret <autret_m@epita.fr>
11495
11496 * src/files.c (compute_header_macro): Computes header macro name
11497 from spec_defines_file when given.
11498
11499 2001-09-23 Marc Autret <autret_m@epita.fr>
11500
11501 * src/files.c (output_files): Add default extensions.
11502
11503 2001-09-22 Akim Demaille <akim@epita.fr>
11504
11505 * src/conflicts.c (finalize_conflicts): Rename as...
11506 (free_conflicts): this.
11507
11508 2001-09-22 Akim Demaille <akim@epita.fr>
11509
11510 * src/gram.c (gram_free): Rename back as...
11511 (dummy): this.
11512 (output_token_translations): Free `token_translations'.
11513 * src/symtab.c (free_symtab): Free the tag field.
11514
11515 2001-09-22 Akim Demaille <akim@epita.fr>
11516
11517 Remove `translations' as it is always set to true.
11518
11519 * src/gram.h: Adjust.
11520 * src/reader.c (packsymbols, parse_token_decl): Adjust
11521 * src/print.c (print_grammar): Adjust.
11522 * src/output.c (output_token_translations): Adjust.
11523 * src/lex.c (lex): Adjust.
11524 * src/gram.c: Be sure the set pointers to NULL.
11525 (dummy): Rename as...
11526 (gram_free): this.
11527
11528 2001-09-22 Akim Demaille <akim@epita.fr>
11529
11530 * configure.in: Invoke AM_LIB_DMALLOC.
11531 * src/system.h: Use dmalloc.
11532 * src/LR0.c: Be sure to have pointers initialized to NULL.
11533 (allocate_itemsets): Allocate kernel_items only if needed.
11534
11535 2001-09-22 Akim Demaille <akim@epita.fr>
11536
11537 * configure.in: Bump to 1.29b.
11538 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
11539 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
11540 need xmalloc.c in calc.y.
11541 From Pascal Bart.
11542
11543 2001-09-21 Akim Demaille <akim@epita.fr>
11544
11545 Version 1.29a.
11546 * Makefile.maint, config/config.guess, config/config.sub,
11547 * config/missing: Update from masters.
11548 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
11549 upon package.m4.
11550 * configure.in (ALL_LINGUAS): Add `tr'.
11551
11552 2001-09-21 Akim Demaille <akim@epita.fr>
11553
11554 * tests/Makefile.am (package.m4): Move to...
11555 ($(srcdir)/$(TESTSUITE)): here.
11556
11557 2001-09-20 Akim Demaille <akim@epita.fr>
11558
11559 * src/complain.c: No longer try to be standalone: use system.h.
11560 Don't assume __STDC__ is defined to 1. Just test if it is defined.
11561 * src/complain.h: Likewise.
11562 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
11563 Remove the unused variable `n'.
11564 From Albert Chin-A-Young.
11565
11566 2001-09-18 Marc Autret <autret_m@epita.fr>
11567
11568 * doc/bison.1: Update.
11569 * doc/bison.texinfo (Bison Options): Update --defines and --graph
11570 descriptions.
11571 (Option Cross Key): Update.
11572 Add --graph.
11573
11574 2001-09-18 Marc Autret <autret_m@epita.fr>
11575
11576 * tests/regression.at: New test (comment in %union).
11577
11578 2001-09-18 Marc Autret <autret_m@epita.fr>
11579
11580 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
11581 do that.
11582 Reported by Keith Browne.
11583
11584 2001-09-18 Marc Autret <autret_m@epita.fr>
11585
11586 * tests/output.at: Add tests for --defines and --graph.
11587
11588 2001-09-18 Marc Autret <autret_m@epita.fr>
11589
11590 * tests/output.at: Removes tests of %{header,src}_extension features.
11591
11592 2001-09-18 Akim Demaille <akim@epita.fr>
11593
11594 * tests/Makefile.am (package.m4): New.
11595 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
11596 (_AT_CHECK_CALC_ERROR): Likewise.
11597 Factor the `, ' part of verbose error messages.
11598
11599 2001-09-18 Marc Autret <autret_m@epita.fr>
11600
11601 * src/getargs.c (longopts): Declare --defines and --graph as options
11602 with optional arguments.
11603 * src/files.h: Add extern declarations.
11604 * src/files.c (spec_graph_file, spec_defines_file): New.
11605 (output_files): Update.
11606 Remove CPP-outed code.
11607
11608 2001-09-18 Marc Autret <autret_m@epita.fr>
11609
11610 Turn off %{source,header}_extension feature.
11611
11612 * src/files.c (compute_exts_from_gf): Update.
11613 (compute_exts_from_src): Update.
11614 (output_files): CPP-out useless code.
11615 * src/files.h: Remove {header,source}_extension extern declarations.
11616 * src/reader.c (parse_dquoted_param): CPP-out.
11617 (parse_header_extension_decl): Remove.
11618 (parse_source_extension_decl): Remove.
11619 (read_declarations): Remove cases tok_{hdrext,srcext}.
11620 * src/lex.c (percent_table): Remove {header,source}_extension entries.
11621 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
11622
11623 2001-09-10 Akim Demaille <akim@epita.fr>
11624
11625 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
11626 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
11627 (AT_CHECK_OUTPUT): this.
11628 Merely check ls' exit status, its output is useless.
11629
11630 2001-09-10 Akim Demaille <akim@epita.fr>
11631
11632 * tests/calc.at: Use m4_match.
11633 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
11634
11635 2001-09-10 Marc Autret <autret_m@epita.fr>,
11636 Akim Demaille <akim@epita.fr>
11637
11638 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
11639 enum color_e.
11640 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
11641 to `normal'.
11642 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
11643 * src/lex.h: Adjust prototype.
11644 (token_t): Add `tok_undef'.
11645 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
11646 (parse_percent_token): Now returns token_t.
11647 Add default statement in switch.
11648 (lex): Separate `c' as an input variable, from the token_t result
11649 part.
11650 (unlexed): Is a token_t.
11651
11652 2001-09-10 Akim Demaille <akim@epita.fr>
11653
11654 * configure.in: Bump to 1.29a.
11655
11656 2001-09-07 Akim Demaille <akim@epita.fr>
11657
11658 Version 1.29.
11659
11660 2001-08-30 Akim Demaille <akim@epita.fr>
11661
11662 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
11663 * m4/atconfig.m4: Remove.
11664 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
11665 * tests/bison: New.
11666 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
11667 m4_if, m4_patsubst, and m4_regexp.
11668 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
11669 `input' file instead of echo.
11670
11671 2001-08-29 Akim Demaille <akim@epita.fr>
11672
11673 Bump to 1.28e.
11674
11675 2001-08-29 Akim Demaille <akim@epita.fr>
11676
11677 Version 1.28d.
11678
11679 2001-08-29 Paul Eggert <eggert@twinsun.com>
11680
11681 * src/bison.simple (yyparse): Don't take the address of an
11682 item before the start of an array, as that doesn't conform to
11683 the C Standard.
11684
11685 2001-08-29 Robert Anisko <anisko_r@epita.fr>
11686
11687 * doc/bison.texinfo (Location Tracking Calc): New node.
11688
11689 2001-08-29 Paul Eggert <eggert@twinsun.com>
11690
11691 * src/output.c (output): Do not define const, as this now
11692 causes more problems than it cures.
11693
11694 2001-08-29 Akim Demaille <akim@epita.fr>
11695
11696 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
11697 the nodes.
11698 Be sure to tag the `detailmenu'.
11699
11700 2001-08-29 Akim Demaille <akim@epita.fr>
11701
11702 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
11703 download in a tmp dir.
11704
11705 2001-08-28 Marc Autret <autret_m@epita.fr>
11706
11707 * config/depcomp: New file.
11708
11709 2001-08-28 Marc Autret <autret_m@epita.fr>
11710
11711 * doc/bison.1 (mandoc): Adjust.
11712 From Juan Manuel Guerrero.
11713
11714 2001-08-28 Marc Autret <autret_m@epita.fr>
11715
11716 * src/print_graph.c (print_state): Fix.
11717
11718 2001-08-27 Marc Autret <autret_m@epita.fr>
11719
11720 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
11721 char * members.
11722 Echo modifications to the functions prototypes.
11723 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
11724
11725 2001-08-27 Marc Autret <autret_m@epita.fr>
11726
11727 * src/vcg.c: Include `xalloc.h'.
11728 (add_colorentry): New.
11729 (add_classname): New.
11730 (add_infoname): New.
11731 * src/vcg.h: Add new prototypes.
11732
11733 2001-08-27 Akim Demaille <akim@epita.fr>
11734
11735 * Makefile.maint: Sync. again with CVS Autoconf.
11736
11737 2001-08-27 Akim Demaille <akim@epita.fr>
11738
11739 * Makefile.maint: Formatting changes.
11740 (po-update, cvs-update, update): New targets.
11741 (AMTAR): Remove.
11742
11743 2001-08-27 Akim Demaille <akim@epita.fr>
11744
11745 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
11746 * Makefile.maint: Sync. with CVS Autoconf.
11747
11748 2001-08-27 Marc Autret <autret_m@epita.fr>
11749
11750 * src/vcg.h (struct infoname_s): New.
11751 (struct colorentry_s): New.
11752 (graph_s): New fields {vertical,horizontal}_order in structure.
11753 Add `infoname' field.
11754 Add `colorentry' field;
11755 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
11756 (G_HORIZONTAL_ORDER): New.
11757 (G_INFONAME): New.
11758 (G_COLORENTRY): New.
11759 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
11760 Add output of `infoname'.
11761 Add output of `colorentry'.
11762
11763 2001-08-27 Marc Autret <autret_m@epita.fr>
11764
11765 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
11766 This one shadowed a global parameter.
11767
11768 2001-08-24 Marc Autret <autret_m@epita.fr>
11769
11770 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
11771 instead of `unsigned'.
11772 (print_state): Do not call obstack_object_size () in obstack_grow ()
11773 to avoid macro variables shadowing.
11774
11775 2001-08-23 Marc Autret <autret_m@epita.fr>
11776
11777 * src/lex.c (percent_table): Typo: s/naem/name/.
11778 Add graph option.
11779 Normalize new options declarations.
11780
11781 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
11782
11783 * tests/suite.at: Exercise %header_extension and %source_extension.
11784
11785 2001-08-16 Marc Autret <autret_m@epita.fr>
11786
11787 * src/reader.c (parse_dquoted_param): New.
11788 (parse_header_extension_decl): Use it.
11789 (parse_source_extension_decl): Likewise.
11790
11791 2001-08-16 Marc Autret <autret_m@epita.fr>
11792
11793 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
11794 (get_xxxx_str): Use assert () instead of complain ().
11795 Remove return invokations in default cases.
11796 (get_decision_str): Modify default behaviour. Remove second argument.
11797 Echo modifications on calls.
11798 (output_graph): Fix.
11799
11800 2001-08-16 Marc Autret <autret_m@epita.fr>
11801
11802 * src/getargs.c (usage): Update with ``-g, --graph''.
11803
11804 2001-08-16 Marc Autret <autret_m@epita.fr>
11805
11806 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
11807 (Option Cross Key): Likewise.
11808 * doc/bison.1: Update.
11809
11810 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
11811
11812 * src/output.c (output_master_parser): Don't finish action_obstack.
11813 (output_parser): Don't care about the muscle action, here.
11814 (prepare): Copy the action_obstack in the action muscle.
11815 (output): Free action_obstack.
11816
11817 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
11818
11819 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
11820 will contain `%union' declaration.
11821 (parse_union_decl): Delete #line directive output.
11822 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
11823 informations about %union.
11824 (parse_union_decl): Copy the union_obstack in the muscle stype.
11825 * src/bison.simple: Add new #line directive.
11826 Add typdef %%stype YYSTYPE.
11827
11828 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
11829
11830 * src/bison.simple: Add new `#line' directive.
11831
11832 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
11833
11834 * src/bison.simple: New `#line' directive.
11835 * src/output.c (output_parser): Support new dynamic muscle input_line.
11836
11837 2001-09-22 Marc Autret <autret_m@epita.fr>
11838
11839 * src/output.c (output_master_parser): New.
11840 (output_parser): Be more re-entrant.
11841
11842 2001-09-21 Marc Autret <autret_m@epita.fr>
11843
11844 * src/reader.c (copy_definition, parse_union_decl): Update and use
11845 `linef' muscle.
11846 (copy_action): Likewise.
11847 Use obstack_1grow ().
11848 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
11849
11850 2001-09-21 Marc Autret <autret_m@epita.fr>
11851
11852 * src/options.c (option_table): Adjust.
11853 * src/lex.c (parse_percent_token): Fix.
11854
11855 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
11856
11857 * src/options.c (symtab.h): Include it, need by lex.h.
11858
11859 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
11860
11861 * src/lex.c (parse_percent_token): Change type of variable `tx', which
11862 is now an option_table_struct*.
11863 (option_strcmp): New function option_strcmp.
11864 (parse_percent_token): Call option_strcmp.
11865 * src/getargs.c (xalloc.h, options.h): Include it.
11866 (getargs): Call create_long_option_table.
11867 (getargs): Free longopts at the end of the function.
11868 (shortopts): Move in options.c.
11869 * src/options.c (create_long_option_table): New function. Convert
11870 information from option_table to option structure.
11871 * src/reader.c (options.h): Include it.
11872
11873 * src/Makefile.am: Adjust.
11874 * src/options.c (option_table): Create from longopts and percent_table.
11875 * src/getargs.c (longopts): Delete.
11876 * src/lex.c (struct percent_table_struct): Delete.
11877 (percent_table): Delete.
11878 (options.h): Include it.
11879 * src/options.c: Create.
11880 * src/options.h: Create.
11881 Declare enum opt_access_e.
11882 Define struct option_table_struct.
11883
11884 2001-09-20 Marc Autret <autret_m@epita.fr>
11885
11886 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
11887 sections of Bison.
11888
11889 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
11890
11891 * src/bison.simple: s/%%filename/%%skeleton.
11892 * src/muscle_tab.c (getargs.h): Include it.
11893 (muscle_init): Insert new muscle skeleton.
11894
11895 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
11896
11897 * src/output.c (output_parser): Delete unused variable actions_dumped.
11898
11899 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
11900
11901 * src/output.c (output): Delete call to reader_output_yylsp.
11902 * src/reader.c (reader): Likewise.
11903 * src/reader.h: Delete declaration of reader_output_yylsp.
11904
11905 2001-09-02 Marc Autret <autret_m@epita.fr>
11906
11907 * src/reader.c: Include muscle_tab.h.
11908 (parse_union_decl): Update.
11909 (parse_macro_decl): Rename parse_muscle_decl.
11910 Update to use renamed functions and variable.
11911 (read_declarations, copy_action, read_additionnal_code, : Updated
11912 with correct variables and functions names.
11913 (packsymbols, reader): Likewise.
11914
11915 * src/reader.h (muscle_obstack): Extern declaration update.
11916
11917 * src/output.c: Include muscle_tab.h
11918 In all functions using macro_insert, change by using muscle_insert ().
11919 (macro_obstack): Rename muscle_obstack.
11920 Echo modifications in the whole file.
11921 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
11922 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
11923 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
11924
11925 * src/muscle_tab.h: Update double inclusion macros.
11926 (macro_entry_s): Rename muscle_entry_s.
11927 Update prototypes.
11928
11929 * src/muscle_tab.c: Include muscle_tab.h.
11930 Rename macro_tabble to muscle_table.
11931 (mhash1, mhash2, mcmp): Use muscle_entry.
11932 (macro_init): Rename muscle_init. Update.
11933 (macro_insert): Rename muscle_insert. Update.
11934 (macro_find): Rename muscle_find. Update.
11935
11936 * src/main.c: Include muscle_tab.h.
11937 (main): Call muscle_init ().
11938 * src/Makefile.am (bison_SOURCES): Echo modifications.
11939
11940 2001-09-02 Marc Autret <autret_m@epita.fr>
11941
11942 Now the files macro_tab.[ch] are named muscle_tab.[ch].
11943
11944 * src/muscle_tab.c, src/muscle_tab.h: Add files.
11945
11946 2001-09-02 Marc Autret <autret_m@epita.fr>
11947
11948 * src/macrotab.c, src/macrotab.h: Remove.
11949
11950 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
11951
11952 * src/reader.c (copy_guard): Use muscle to specify the `#line'
11953 filename.
11954
11955 2001-09-01 Marc Autret <autret_m@epita.fr>
11956
11957 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
11958 to an explicit value to activate the feature. We do it here.
11959
11960 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
11961
11962 * src/output.c (prepare): Delete the `filename' muscule insertion.
11963 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
11964 (parse_union_decl): Likewise.
11965 * src/macrotab.c (macro_init): Initialize filename by infile.
11966
11967 2001-08-31 Marc Autret <autret_m@epita.fr>
11968
11969 * src/bison.simple (YYLSP_NEEDED): New definition.
11970 * src/output.c (prepare): Add macro insertion of `locations_flag'
11971
11972 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
11973
11974 * src/output.c (prepare): Delete insertion of previous muscles,
11975 and insert the `prefix' muscles.
11976 * src/macrotab.c (macro_init): Likewise.
11977 (macro_init): Initialization prefix directive by `yy'.
11978 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
11979 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
11980 yylval, yydebug, yyerror, yynerrs and yyparse.
11981 New directive `#define' to substitute yydebug, ... with option
11982 name_prefix.
11983
11984 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
11985
11986 * src/main.c (main): Standardize.
11987 * src/output.c (output_table_data, output_parser): Likewise.
11988 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
11989
11990 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
11991
11992 * src/reader.c (read_additionnal_code): Rename %%user_code to
11993 %%epilogue.
11994 * src/output.c (output): Rename %%declarations to %%prologue.
11995 * src/bison.simple: Echo modifications.
11996
11997 2001-08-31 Marc Autret <autret_m@epita.fr>
11998
11999 * src/reader.c (readgram): CleanUp.
12000 (output_token_defines): Likewise.
12001 (packsymbols): Likewise.
12002 (reader): Likewise.
12003 * src/output.c (output): CPP-out useless code.
12004
12005 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
12006
12007 * src/reader.c (reader): Delete obsolete call to function
12008 output_trailers and output_headers.
12009 * src/output.h: Remove obsolete functions prototypes of output_headers
12010 and output_trailers.
12011
12012 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
12013
12014 * src/main.c: Include macrotab.h.
12015 * src/macrotab.h (macro_entry_s): Constify fields.
12016 Adjust functions prototypes.
12017 * src/macrotab.c (macro_insert): Constify key and value.
12018 (macro_find): Constify key.
12019 (macro_insert): Include 'xalloc.h'
12020 (macro_insert): Use XMALLOC.
12021 (macro_find): Constify return value.
12022 * src/output.c (output_table_data): Rename table to table_data.
12023 (output_parser): Constify macro_key, macro_value.
12024
12025 2001-08-30 Marc Autret <autret_m@epita.fr>
12026
12027 * src/reader.c (parse_skel_decl): New.
12028 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
12029 * src/lex.h (token_t): New token `tok_skel'.
12030 * src/lex.c (percent_table): Add skeleton option entry.
12031 Standardize.
12032
12033 2001-08-29 Marc Autret <autret_m@epita.fr>
12034
12035 * src/bison.simple: Add %%user_code directive at the end.
12036 * src/reader.c (read_additionnal_code): New.
12037 (reader): Use it.
12038 * src/output.c (output_program): Remove.
12039 (output): Update.
12040
12041 2001-08-28 Marc Autret <autret_m@epita.fr>
12042
12043 * src/output.c (output_actions): Clean up.
12044 (output_gram): CPP-out useless code.
12045 * src/reader.c (reader): Clean up, CPP-out useless code.
12046
12047 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
12048
12049 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
12050 directive.
12051 * src/bison.simple: Add `%%definitions'.
12052
12053 2001-08-28 Marc Autret <autret_m@epita.fr>
12054
12055 * config/depcomp: New file.
12056
12057 2001-08-27 Paul Eggert <eggert@twinsun.com>
12058
12059 * src/bison.simple (yyparse): Don't take the address of an
12060 item before the start of an array, as that doesn't conform to
12061 the C Standard.
12062
12063 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
12064
12065 * src/output.c (output): Remove the initialization of the macro
12066 obstack. It was done too late here.
12067
12068 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
12069 completely wrong.
12070 (reader): Initialize the macro obstack here, since we need it to grow
12071 '%define' directives.
12072
12073 * src/reader.h: Declare the macro obstack as extern.
12074
12075 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
12076
12077 * src/output.c (output_parser): Fix. Store single '%' characters in
12078 the output obstack instead of throwing them away.
12079
12080 2001-08-27 Akim Demaille <akim@epita.fr>
12081
12082 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
12083
12084 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
12085
12086 * lib/Makefile.am: Adjust.
12087
12088 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
12089
12090 * src/bison.simple: Update and add '%%' directives.
12091
12092 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
12093
12094 * src/reader.c (reader): Remove calls to 'output_headers' and
12095 'output_trailers'. Remove some C output.
12096 (readgram): Disable a piece of code that was writing a default
12097 definition for 'YYSTYPE'.
12098 (reader_output_yylsp): Remove.
12099 (packsymbols): Output token defintions to a macro.
12100 (copy_definition): Disable C output.
12101
12102 * src/reader.c (parse_macro_decl): New function used to parse macro
12103 declarations.
12104 (copy_string2): Put the body of copy_string into this new function.
12105 Add a parameter to let the caller choose whether he wants to copy the
12106 string delimiters or not.
12107 (copy_string): Be a simple call to copy_string2 with the last argument
12108 bound to true.
12109 (read_declarations): Add case for macro definition.
12110 (copy_identifier): New.
12111 (parse_macro_decl): Read macro identifiers using copy_identifier
12112 rather than lex.
12113
12114 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
12115
12116 * src/output.c (prepare): Add prefixed names.
12117 (output_parser): Output semantic actions.
12118 (output_parser): Fix bug on '%%line' directives.
12119
12120 * src/output.c (output_headers): Remove. The C code printed by this
12121 function should now be in the skeletons.
12122 (output_trailers): Remove.
12123 (output): Disable call to 'reader_output_yylsp'.
12124 (output_rule_data): Do not output tables to the table obstack.
12125
12126 * src/output.c: Remove some C dedicated output.
12127 Improve the use of macro and output obstacks.
12128 (output_defines): Remove.
12129
12130 * src/output.c (output_token_translations): Associate 'translate'
12131 table with a macro. No output to the table obstack.
12132 (output_gram): Same for 'rhs' and 'prhs'.
12133 (output_stos): Same for 'stos'.
12134 (output_rule_data): Same for 'r1' and 'r2'.
12135 (token_actions): Same for 'defact'.
12136 (goto_actions): Same for 'defgoto'.
12137 (output_base): Same for 'pact' and 'pgoto'.
12138 (output_table): Same for 'table'.
12139 (output_check): Same for 'check'.
12140
12141 * src/output.c (output_table_data): New function.
12142 (output_short_table): Remove.
12143 (output_short_or_char_table): Remove.
12144
12145 * src/output.c (output_parser): Replace most of the skeleton copy code
12146 with something new. Skeletons are now processed character by character
12147 rather than line by line, and Bison looks for '%%' macros. This is the
12148 first step in making Bison's output process (a lot) more flexible.
12149 (output_parser): Use the macro table.
12150
12151 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
12152
12153 * src/main.c (main): Initialize the macro table.
12154
12155 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
12156
12157 * src/lex.c (percent_table): Add tok_define.
12158 * src/lex.h: Add tok_define.
12159
12160 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
12161
12162 * src/macrotab.c: New file.
12163 * src/macrotab.h: New file.
12164 * src/Makefile.am: Update.
12165
12166 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
12167
12168 * lib/hash.c: New file.
12169 * lib/hash.h: New file.
12170 * lib/Makefile.am: Update.
12171
12172 2001-08-15 Akim Demaille <akim@epita.fr>
12173
12174 Version 1.28c.
12175
12176 2001-08-15 Marc Autret <autret_m@epita.fr>
12177
12178 * src/reader.c (readgram): Indent output macro YYSTYPE.
12179 (packsymbols): Likewise.
12180 (output_token_defines): Likewise.
12181 * src/files.c: Standardize.
12182 (compute_header_macro): New.
12183 (defines_obstack_save): New. Use compute_header_macro.
12184 (output_files): Update. Use defines_obstack_save.
12185
12186 2001-08-15 Akim Demaille <akim@epita.fr>
12187
12188 * doc/bison.texinfo (Table of Symbols): Document
12189 YYSTACK_USE_ALLOCA.
12190
12191 2001-08-15 Akim Demaille <akim@epita.fr>
12192
12193 * missing: Update from CVS Automake.
12194 * config/config.guess, config/config.sub, config/texinfo.tex:
12195 Update from gnu.org.
12196
12197 2001-08-15 Akim Demaille <akim@epita.fr>
12198
12199 * Makefile.maint: Sync with CVS Autoconf.
12200
12201 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
12202
12203 * doc/bison.texinfo: Include GNU Free Documentation License from
12204 `fdl.texi'.
12205 * doc/fdl.texi: Add to package.
12206
12207 2001-08-14 Marc Autret <autret_m@epita.fr>
12208
12209 Turn on %{source,header}_extension features.
12210
12211 * src/lex.c (percent_table): Un-CPP out header_extension and
12212 source_extension.
12213 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
12214 (compute_exts_from_src): Remove conditions. It restores priorities
12215 between options.
12216
12217 2001-08-14 Marc Autret <autret_m@epita.fr>
12218
12219 * src/files.c (compute_base_names): Add extensions computing when
12220 `--file-prefix' used.
12221 Standardize function calls.
12222
12223 2001-08-13 Marc Autret <autret_m@epita.fr>
12224
12225 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
12226 defining it (defined but null disables alloca).
12227
12228 2001-08-13 Marc Autret <autret_m@epita.fr>
12229
12230 * src/bison.simple (_yy_memcpy): CPP reformat.
12231
12232 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
12233
12234 * tests/atconfig.in (CPPFLAGS): Fix.
12235
12236 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
12237
12238 * doc/bison.texinfo: Include GNU General Public License from
12239 `gpl.texi'.
12240 * doc/gpl.texi: Add to package.
12241
12242 2001-08-10 Marc Autret <autret_m@epita.fr>
12243
12244 * src/print_graph.h: Fix.
12245 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
12246
12247 2001-08-10 Akim Demaille <akim@epita.fr>
12248
12249 * src/system.h: Provide default declarations for stpcpy, strndup,
12250 and strnlen.
12251
12252 2001-08-10 Robert Anisko <anisko_r@epita.fr>
12253
12254 * doc/bison.texinfo (Locations): Update @$ stuff.
12255
12256 2001-08-09 Robert Anisko <anisko_r@epita.fr>
12257
12258 * src/bison.simple (YYLLOC_DEFAULT): Update.
12259 (yyparse): Adjust.
12260
12261 2001-08-08 Marc Autret <autret_m@epita.fr>
12262
12263 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
12264 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
12265 Reported by Fabrice Bauzac.
12266
12267 2001-08-08 Marc Autret <autret_m@epita.fr>
12268
12269 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
12270 * src/vcg.c (output_node): Fix.
12271 * src/vcg.h: Cleanup.
12272 * src/print_graph.c: Add comments.
12273 (node_output_size): New global variable. Simplify the formatting of
12274 the VCG graph output.
12275 (print_actions): Unused code is now used. It notifies the final state
12276 and no action states in the VCG graph. It also give the reduce actions.
12277 The `shift and goto' edges are red and the `go to state' edges are
12278 blue.
12279 Get the current node name and node_obstack by argument.
12280 (node_obstack): New variable.
12281 (print_state): Manage node_obstack.
12282 (print_core): Use node_obstack given by argument.
12283 A node is not only computed here but in print_actions also.
12284 (print_graph): CPP out useless code instead of commenting it.
12285
12286 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
12287
12288 * tests/atconfig.in (CPPFLAGS): Fix.
12289
12290 2001-08-07 Akim Demaille <akim@epita.fr>
12291
12292 * src/print_graph.c (quote): New.
12293 (print_core): Use it.
12294
12295 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
12296
12297 * src/vcg.c (complain.h): Include it.
12298 Unepitaize `return' invocations.
12299 [NDEBUG] (main): Remove.
12300 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
12301 * src/files.c (open_files): Initialize graph_obstack.
12302 * src/print_graph.c (print_actions): CPP out useless code.
12303 (print_core): Don't output the last `\n' in labels.
12304 Use `quote'.
12305 * src/files.c (output_files): Output the VCG file.
12306 * src/main.c (main): Invoke print_graph ();
12307
12308 2001-08-06 Marc Autret <autret_m@epita.fr>
12309
12310 Automaton VCG graph output.
12311 Using option ``-g'' or long option ``--graph'', you can generate
12312 a gram_filename.vcg file containing a VCG description of the LALR (1)
12313 automaton of your grammar.
12314
12315 * src/main.c: Call to print_graph() function.
12316 * src/getargs.h: Update.
12317 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
12318 (graph_flag): New flag.
12319 (longopts): Update.
12320 (getargs): Add case `g'.
12321 * src/files.c (graph_obstack): New obstack struct.
12322 (open_files): Initialize new obstack.
12323 (output_files): Saves graph_obstack if required.
12324 * src/files.h (graph_obstack): New extern declaration.
12325 * src/Makefile.am: Add new source files.
12326
12327 2001-08-06 Marc Autret <autret_m@epita.fr>
12328
12329 * src/print_graph.c, src/print_graph.h (graph): New.
12330 * src/vcg.h: New file.
12331 * src/vcg.c: New file, VCG graph handling.
12332
12333 2001-08-06 Marc Autret <autret_m@epita.fr>
12334
12335 Add of %source_extension and %header_extension which specify
12336 the source or/and the header output file extension.
12337
12338 * src/files.c (compute_base_names): Remove initialisation of
12339 src_extension and header_extension.
12340 (compute_exts_from_gf): Update.
12341 (compute_exts_from_src): Update.
12342 (output_files): Update.
12343 * src/reader.c (parse_header_extension_decl): New.
12344 (parse_source_extension_decl): New.
12345 (read_declarations): New case statements for the new tokens.
12346 * src/lex.c (percent_table): Add entries for %source_extension
12347 and %header_extension.
12348 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
12349
12350 2001-08-06 Marc Autret <autret_m@epita.fr>
12351
12352 * configure.in: Bump to 1.28c.
12353 * doc/bison.texinfo: Texinfo thingies.
12354
12355 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
12356
12357 * tests/atconfig.in (CPPFLAGS): Add.
12358 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
12359
12360 2001-08-03 Akim Demaille <akim@epita.fr>
12361
12362 Version 1.28b.
12363
12364 2001-08-03 Akim Demaille <akim@epita.fr>
12365
12366 * tests/Makefile.am (check-local): Ship testsuite.
12367 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
12368 Include `string.h'.
12369
12370 2001-08-03 Akim Demaille <akim@epita.fr>
12371
12372 * configure.in: Try using -Wformat when compiling.
12373
12374 2001-08-03 Akim Demaille <akim@epita.fr>
12375
12376 * configure.in: Bump to 1.28b.
12377
12378 2001-08-03 Akim Demaille <akim@epita.fr>
12379
12380 * src/complain.c: Adjust strerror_r portability issues.
12381
12382 2001-08-03 Akim Demaille <akim@epita.fr>
12383
12384 Version 1.28a.
12385
12386 2001-08-03 Akim Demaille <akim@epita.fr>
12387
12388 * src/getargs.c, src/getarg.h (skeleton)): Constify.
12389 * src/lex.c (literalchar): Avoid name clashes on `buf'.
12390 * src/getargs.c: Include complain.h.
12391 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
12392 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
12393
12394 2001-08-03 Akim Demaille <akim@epita.fr>
12395
12396 * src/reader.c (readgram): Display hidden chars in error messages.
12397
12398 2001-08-03 Akim Demaille <akim@epita.fr>
12399
12400 Update to gettext 0.10.39.
12401
12402 2001-08-03 Akim Demaille <akim@epita.fr>
12403
12404 * lib/strspn.c: New.
12405
12406 2001-08-01 Marc Autret <autret_m@epita.fr>
12407
12408 * doc/bison.texinfo: Update.
12409 * doc/bison.1 (mandoc): Update.
12410 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
12411 * src/files.c: Support output files extensions computing.
12412 (src_extension): New static variable.
12413 (header_extension): New static variable.
12414 (tr): New function.
12415 (get_extension_index): New function, gets the index of an extension
12416 filename in a string.
12417 (compute_exts_from_gf): New function, computes extensions from the
12418 grammar file extension.
12419 (compute_exts_from_src): New functions, computes extensions from the
12420 C source file extension, file given by ``-o'' option.
12421 (compute_base_names): Update.
12422 (output_files): Update.
12423
12424 2001-08-01 Robert Anisko <anisko_r@epita.fr>
12425
12426 * doc/bison.texi: Document @$.
12427 (Locations): New section.
12428
12429 2001-07-18 Akim Demaille <akim@epita.fr>
12430
12431 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
12432 * config/prev-version.txt, config/move-if-change: New.
12433 * Makefile.am: Adjust.
12434
12435 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
12436
12437 * src/bison.simple (yyparse): Suppress warning `comparaison
12438 between signed and unsigned'.
12439
12440 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
12441
12442 * src/getargs.h (raw_flag): Remove.
12443 * src/getargs.c: Die on `-r'/`--raw'.
12444 * src/lex.c (parse_percent_token): Die on `%raw'.
12445 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
12446 * tests/calc.at: Suppress test with option `--raw'.
12447
12448 2001-07-14 Akim Demaille <akim@epita.fr>
12449
12450 * config/: New.
12451 * configure.in: Require Autoconf 2.50.
12452 Update to gettext 0.10.38.
12453
12454 2001-03-16 Akim Demaille <akim@epita.fr>
12455
12456 * doc/bison.texinfo: ANSIfy the examples.
12457
12458 2001-03-16 Akim Demaille <akim@epita.fr>
12459
12460 * getargs.c (skeleton): New variable.
12461 (longopts): --skeleton is a new option.
12462 (shortopts, getargs): -S is a new option.
12463 * getargs.h: Declare skeleton.
12464 * output.c (output_parser): Use it.
12465
12466 2001-03-16 Akim Demaille <akim@epita.fr>
12467
12468 * m4/strerror_r.m4: New.
12469 * m4/error.m4: Run AC_FUNC_STRERROR_R.
12470 * lib/error.h, lib/error.c: Update.
12471
12472 2001-03-16 Akim Demaille <akim@epita.fr>
12473
12474 * src/getargs.c (longopts): Clean up.
12475
12476 2001-02-21 Akim Demaille <akim@epita.fr>
12477
12478 * src/reader.c (gensym): `gensym_count' is your own.
12479 Use a static buf to create the symbol name, as token_buffer is no
12480 longer a buffer.
12481
12482 2001-02-08 Akim Demaille <akim@epita.fr>
12483
12484 * src/conflicts.c (conflict_report): Be sure not to append to res
12485 between two calls, which could happen if both first sprintf were
12486 skipped, but not the first cp += strlen.
12487
12488 2001-02-08 Akim Demaille <akim@epita.fr>
12489
12490 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
12491 New, from fileutils 4.0.37.
12492 * configure.in: Require Autoconf 2.49c. I took some time before
12493 making this decision. This is the only way out for portability
12494 issues in Bison, it would mean way too much duplicate effort to
12495 import in Bison features implemented in 2.49c since 2.13.
12496 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
12497
12498 2001-02-02 Akim Demaille <akim@epita.fr>
12499
12500 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
12501 * lib/xalloc.h, lib/xmalloc.c: Update.
12502
12503 2001-01-19 Akim Demaille <akim@epita.fr>
12504
12505 Get rid of the ad hoc handling of token_buffer in the scanner: use
12506 the obstacks.
12507
12508 * src/lex.c (token_obstack): New.
12509 (init_lex): Initialize it. No longer call...
12510 (grow_token_buffer): this. Remove it.
12511 Adjust all the places which used it to use the obstack.
12512
12513 2001-01-19 Akim Demaille <akim@epita.fr>
12514
12515 * src/lex.h: Rename all the tokens:
12516 s/\bENDFILE\b/tok_eof/g;
12517 s/\bIDENTIFIER\b/tok_identifier/g;
12518 etc.
12519 Let them be enums, not #define, to ease debugging.
12520 Adjust all the code.
12521
12522 2001-01-18 Akim Demaille <akim@epita.fr>
12523
12524 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
12525 * src/lex.c (maxtoken, grow_token_buffer): Static.
12526
12527 2001-01-18 Akim Demaille <akim@epita.fr>
12528
12529 Since we now use obstacks, more % directives can be enabled.
12530
12531 * src/lex.c (percent_table): Also accept `%yacc',
12532 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
12533 `%debug'.
12534 Handle the actions for `%semantic_parser' and `%pure_parser' here,
12535 instead of returning a token.
12536 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
12537 * src/reader.c (read_declarations): Adjust.
12538 * src/files.c (open_files): Don't call `compute_base_names', don't
12539 compute `attrsfile' since they depend upon data which might be
12540 *in* the input file now.
12541 (output_files): Do it here.
12542 * src/output.c (output_headers): Document the fact that this patch
12543 introduces a guaranteed SEGV for semantic parsers.
12544 * doc/bison.texinfo: Document them.
12545 * tests/suite.at: Exercise these %options.
12546
12547 2000-12-20 Akim Demaille <akim@epita.fr>
12548
12549 Also handle the output file (--verbose) with obstacks.
12550
12551 * files.c (foutput): Remove.
12552 (output_obstack): New.
12553 Adjust all dependencies.
12554 * src/conflicts.c: Return a string.
12555 * src/system.h (obstack_grow_string): Rename as...
12556 (obstack_sgrow): this. Be ready to work with non literals.
12557 (obstack_fgrow4): New.
12558
12559 2000-12-20 Akim Demaille <akim@epita.fr>
12560
12561 * src/files.c (open_files): Fix the computation of short_base_name
12562 in the case of `-o foo.tab.c'.
12563
12564 2000-12-20 Akim Demaille <akim@epita.fr>
12565
12566 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
12567 (copy_dollar): Now that everything uses obstacks, get rid of the
12568 FILE * parameters.
12569
12570 2000-12-20 Akim Demaille <akim@epita.fr>
12571
12572 * src/files.c (open_files): Actually the `.output' file is based
12573 on the short_base_name, not base_name.
12574 * tests/suite.at (Checking output file names): Adjust.
12575
12576 2000-12-20 Akim Demaille <akim@epita.fr>
12577
12578 * src/bison.s1: Remove, we now use directly...
12579 * src/bison.simple: this.
12580 * src/Makefile.am: Use pkgdata instead of data.
12581
12582 2000-12-20 Akim Demaille <akim@epita.fr>
12583
12584 * src/files.c (guard_obstack): New.
12585 (open_files): Initialize it.
12586 (output_files): Dump it...
12587 * src/files.h: Export it.
12588 * src/reader.c (copy_guard): Use it.
12589
12590 2000-12-19 Akim Demaille <akim@epita.fr>
12591
12592 * src/files.c (outfile, defsfile, actfile): Removed as global
12593 vars.
12594 (open_files): Don't compute them.
12595 (output_files): Adjust.
12596 (base_name, short_base_name): Be global.
12597 Adjust dependencies.
12598
12599 2000-12-19 Akim Demaille <akim@epita.fr>
12600
12601 * src/files.c (strsuffix): New.
12602 (stringappend): Be just like strcat but allocate.
12603 (base_names): Eve out from open_files.
12604 Try to simplify the rather hairy computation of base_name and
12605 short_base_name.
12606 (open_files): Use it.
12607 * tests/suite.at (Checking output file names): New test.
12608
12609 2000-12-19 Akim Demaille <akim@epita.fr>
12610
12611 * src/system.h (obstack_grow_literal_string): Rename as...
12612 (obstack_grow_string): this.
12613 * src/output.c (output_parser): Recognize `%% actions' instead of
12614 `$'.
12615 * src/bison.s1: s/$/%% actions/.
12616 * src/bison.hairy: Likewise.
12617
12618 2000-12-19 Akim Demaille <akim@epita.fr>
12619
12620 * src/output.c (output_parser): Compute the `#line' lines when
12621 there are.
12622 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
12623 Suggested by Hans Aberg.
12624
12625 2000-12-19 Akim Demaille <akim@epita.fr>
12626
12627 Let the handling of the skeleton files be local to the procedures
12628 that use it.
12629
12630 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
12631 longer static.
12632 (fparser, open_extra_files): Remove.
12633 (open_files, output_files): Don't take care of fparser.
12634 * src/files.h: Adjust.
12635 * src/output.c (output_parser): Open and close the file to the
12636 skeleton.
12637 * src/reader.c (read_declarations): When %semantic_parser, open
12638 fguard.
12639
12640 2000-12-19 Akim Demaille <akim@epita.fr>
12641
12642 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
12643 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
12644
12645 2000-12-19 Akim Demaille <akim@epita.fr>
12646
12647 * src/files.c (open_files): Yipee! We no longer need all the code
12648 looking for `/tmp' since we have no tmp file.
12649
12650 2000-12-19 Akim Demaille <akim@epita.fr>
12651
12652 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
12653 New macros.
12654 * src/files.c (open_files): Less dependency on MSDOS etc.
12655
12656 2000-12-14 Akim Demaille <akim@epita.fr>
12657
12658 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
12659 Provide a default definition.
12660 Use it when executing the default @ action.
12661 * src/reader.c (reader_output_yylsp): No longer include
12662 `timestamp' and `text' in the default YYLTYPE.
12663
12664 2000-12-12 Akim Demaille <akim@epita.fr>
12665
12666 * src/reader.c (copy_definition, parse_union_decl, copy_action)
12667 (copy_guard): Quote the file names.
12668 Reported by Laurent Mascherpa.
12669
12670 2000-12-12 Akim Demaille <akim@epita.fr>
12671
12672 * src/output.c (output_headers, output_program, output): Be sure
12673 to escape special characters when outputting filenames.
12674 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
12675 (output_headers): Don't depend on them, Use ACTSTR.
12676
12677 2000-11-17 Akim Demaille <akim@epita.fr>
12678
12679 * lib/obstack.h: Formatting changes.
12680 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
12681 prevents type checking.
12682 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
12683 cast the value to (void *): assigning a `foo *' to a `void *'
12684 variable is valid.
12685 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
12686 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
12687 append characters.
12688
12689 2000-11-17 Akim Demaille <akim@epita.fr>
12690
12691 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
12692 as...
12693 (suite.m4, regression.m4, calc.m4): these.
12694 * tests/atgeneral.m4: Update from CVS Autoconf.
12695
12696 2000-11-17 Akim Demaille <akim@epita.fr>
12697
12698 * tests/regression.m4 (%union and --defines): New test,
12699 demonstrating a current bug in the obstack implementation.
12700
12701 2000-11-17 Akim Demaille <akim@epita.fr>
12702
12703 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
12704 macros.
12705 Use them to declare the variables which are global or local to
12706 `yyparse'.
12707
12708 2000-11-17 Akim Demaille <akim@epita.fr>
12709
12710 * acconfig.h: Remove, no longer used.
12711
12712 2000-11-07 Akim Demaille <akim@epita.fr>
12713
12714 * src: s/Copyright (C)/Copyright/g.
12715
12716 2000-11-07 Akim Demaille <akim@epita.fr>
12717
12718 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
12719 defining.
12720 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
12721
12722 2000-11-07 Akim Demaille <akim@epita.fr>
12723
12724 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
12725 Merge in a single CPP if/else.
12726
12727 2000-11-07 Akim Demaille <akim@epita.fr>
12728
12729 * src/output.c (output): Remove useless variables.
12730 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
12731 argument `data' for consistency with the prototypes.
12732 Qualify it `const'.
12733 (obstack_copy, obstack_copy0): Rename the second argument as
12734 `address' for consistency. Qualify it `const'.
12735 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
12736 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
12737 `const' their input argument (`data' or `address').
12738 Adjust the corresponding macros to include `const' in casts.
12739
12740 2000-11-03 Akim Demaille <akim@epita.fr>
12741
12742 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
12743 s/PFILE1/BISON_HAIRY/.
12744 Adjust dependencies.
12745
12746 2000-11-03 Akim Demaille <akim@epita.fr>
12747
12748 For some reason, this was not applied.
12749
12750 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
12751 `unlink': it's no longer used.
12752
12753 2000-11-03 Akim Demaille <akim@epita.fr>
12754
12755 * src/files.c (skeleton_find): New function, eved out of...
12756 (open_files, open_extra_files): here.
12757
12758 2000-11-03 Akim Demaille <akim@epita.fr>
12759
12760 Don't use `atexit'.
12761
12762 * src/files.c (obstack_save): New function.
12763 (done): Rename as...
12764 (output_files): this.
12765 Use `obstack_save'.
12766 * src/main.c (main): Don't use `atexit' to register `done', since
12767 it no longer has to remove tmp files, just call `output_files'
12768 when there are no errors.
12769
12770 2000-11-02 Akim Demaille <akim@epita.fr>
12771
12772 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
12773 `unlink': it's no longer used.
12774 * src/files.h: Formatting changes.
12775
12776 2000-11-02 Akim Demaille <akim@epita.fr>
12777
12778 Remove the last uses of mktemp and unlink/delete.
12779
12780 * src/files.c (fdefines, ftable): Removed.
12781 (defines_ostack, table_obstack): New.
12782 Adjust dependencies of the former into uses of the latter.
12783 * src/output.c (output_short_or_char_table, output_short_table):
12784 Convert to using obstacks.
12785 * src/reader.c (copy_comment2): Accept one FILE * and two
12786 obstacks.
12787 (output_token_defines, reader_output_yylsp): Use obstacks.
12788 * src/system.h (obstack_fgrow3): New.
12789 * po/POTFILES.in: Adjust.
12790
12791 2000-11-01 Akim Demaille <akim@epita.fr>
12792
12793 Change each use of `fattrs' into a use of `attrs_obstack'.
12794
12795 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
12796 * src/files.c (fattrs): Remove.
12797 (attrs_obstack): New.
12798 Adjust all dependencies.
12799 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
12800
12801 2000-11-01 Akim Demaille <akim@epita.fr>
12802
12803 Introduce obstacks.
12804 Change each use of `faction' into a use of `action_obstack'.
12805
12806 * lib/obstack.h, lib/obstack.c: New files.
12807 * src/files.c (faction): Remove.
12808 (action_obstack): New.
12809 Adjust all dependencies.
12810
12811 2000-10-20 Akim Demaille <akim@epita.fr>
12812
12813 * lib/quote.h (PARAMS): New macro. Use it.
12814
12815 2000-10-16 Akim Demaille <akim@epita.fr>
12816
12817 * src/output.c (output_short_or_char_table): New function.
12818 (output_short_table, output_token_translations): Use it.
12819 (goto_actions): Use output_short_table.
12820
12821 2000-10-16 Akim Demaille <akim@epita.fr>
12822
12823 * src/symtab.c (bucket_new): New function.
12824 (getsym): Use it.
12825
12826 * src/output.c (output_short_table): New argument to display the
12827 comment associated with the table.
12828 Adjust dependencies.
12829 (output_gram): Use it.
12830 (output_rule_data): Nicer output layout for YYTNAME.
12831
12832 2000-10-16 Akim Demaille <akim@epita.fr>
12833
12834 * src/lex.c (read_typename): New function.
12835 (lex): Use it.
12836 * src/reader.c (copy_dollar): Likewise.
12837
12838 2000-10-16 Akim Demaille <akim@epita.fr>
12839
12840 * src/reader.c (copy_comment2): Expect the input stream to be on
12841 the `/' which is suspected to open a comment, instead of being
12842 called after `//' or `/*' was read.
12843 (copy_comment, copy_definition, parse_union_decl, copy_action)
12844 (copy_guard): Adjust.
12845
12846 2000-10-16 Akim Demaille <akim@epita.fr>
12847
12848 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
12849 `read_signed_integer'.
12850
12851 2000-10-16 Akim Demaille <akim@epita.fr>
12852
12853 * src/reader.c (copy_dollar): New function.
12854 (copy_guard, copy_action): Use it.
12855
12856 2000-10-16 Akim Demaille <akim@epita.fr>
12857
12858 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
12859 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
12860 New files, from Fileutils 4.0.27.
12861 * src/main.c (printable_version): Remove.
12862 * src/lex.c, src/reader.c: Use `quote'.
12863
12864 2000-10-04 Akim Demaille <akim@epita.fr>
12865
12866 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
12867
12868 2000-10-04 Akim Demaille <akim@epita.fr>
12869
12870 * doc/bison.texinfo: Various typos spotted by Neil Booth.
12871
12872 2000-10-04 Akim Demaille <akim@epita.fr>
12873
12874 When a literal string is used to define two different tokens,
12875 `bison -v' segfaults.
12876 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
12877
12878 * tests/regression.m4: New file.
12879 Include the core of the sample provided by Piotr Gackiewicz.
12880 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
12881 properly.
12882
12883 2000-10-04 Akim Demaille <akim@epita.fr>
12884
12885 * src/reader.c (parse_expect_decl): Keep `count' within the size
12886 of `buffer'.
12887 From Neil Booth.
12888
12889 2000-10-02 Paul Eggert <eggert@twinsun.com>
12890
12891 * bison.s1 (yyparse): Assign the default value
12892 unconditionally, to avoid a GCC warning and make the parser a
12893 tad smaller.
12894
12895 2000-10-02 Akim Demaille <akim@epita.fr>
12896
12897 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
12898 options.
12899
12900 2000-10-02 Akim Demaille <akim@epita.fr>
12901
12902 * src/derives.c, src/print.c, src/reduce.c: To ease the
12903 translation, move some `\n' out of the translated strings.
12904
12905 2000-10-02 Akim Demaille <akim@epita.fr>
12906
12907 The location tracking mechanism is precious for parse error
12908 messages. Nevertheless, it is enabled only when `@n' is used in
12909 the grammar, which is a different issue (you can use it in error
12910 message, but not in the grammar per se). Therefore, there should
12911 be another means to enable it.
12912
12913 * src/getargs.c (getargs): Support `--locations'.
12914 (usage): Report it.
12915 * src/getargs.h (locationsflag): Export it.
12916 * src/lex.c (percent_table): Support `%locations'.
12917 * src/reader.c (yylsp_needed): Remove this variable, now replaced
12918 with `locationsflag'.
12919 * doc/bison.texinfo: Document `--locations' and `%locations'.
12920 Sort the options.
12921 * tests/calc.m4: Test it.
12922
12923 For regularity of the names, replace each
12924 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
12925 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
12926 In addition replace each `flag' with `_flag'.
12927
12928 2000-10-02 Akim Demaille <akim@epita.fr>
12929
12930 Also test parse error messages, including with YYERROR_VERBOSE.
12931
12932 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
12933 associative).
12934 Use it to check the computations.
12935 Use it to check `nonassoc' is honored.
12936 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
12937 `--yyerror-verbose'.
12938 (_AT_CHECK_CALC): Adjust to this option.
12939 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
12940
12941 2000-10-02 Akim Demaille <akim@epita.fr>
12942
12943 Test also `--verbose', `--defines' and `--name-prefix'. Testing
12944 the latter demonstrates a flaw in the handling of non debugging
12945 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
12946 was used in order to simplify:
12947
12948 #if YYDEBUG
12949 if (yydebug)
12950 {
12951 ...
12952 }
12953 #endif
12954
12955 into
12956
12957 if (yydebug)
12958 {
12959 ...
12960 }
12961
12962 unfortunately this leads to a CPP conflict when
12963 `--name-prefix=foo' is used since it produces `#define yydebug
12964 foodebug'.
12965
12966 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
12967 (YYDPRINTF): New macro.
12968 Spread its use.
12969 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
12970 the bison options.
12971 Also test `--verbose', `--defines' and `--name-prefix'.
12972
12973 2000-10-02 Akim Demaille <akim@epita.fr>
12974
12975 Improve the readability of the produced parsers.
12976
12977 * src/bison.s1: Formatting changes.
12978 Improve the comment related to the `$' mark.
12979 (yydefault): Don't fall through to `yyresume': `goto' there.
12980 * src/output.c (output_parser): When the `$' is met, skip the end
12981 of its line.
12982 New variable, `number_of_dollar_signs', to check there's exactly
12983 one `$' in the parser skeleton.
12984
12985 2000-10-02 Akim Demaille <akim@epita.fr>
12986
12987 * lib/xstrdup.c: New file, from the fileutils.
12988 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
12989 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
12990 instead of strlen + xmalloc + strcpy.
12991 * src/symtab.c (copys): Remove, use xstrdup instead.
12992
12993 2000-10-02 Akim Demaille <akim@epita.fr>
12994
12995 * src/gram.h (associativity): New enum type which replaces the
12996 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
12997 `right_assoc', `left_assoc' and `non_assoc'.
12998 Adjust all dependencies.
12999 * src/reader.c: Formatting changes.
13000 (LTYPESTR): Don't define it, use it as a literal in
13001 `reader_output_yylsp'.
13002 * src/symtab.h (symbol_class): New enum type which replaces the
13003 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
13004 `sunknown', `stoken and `snterm'.
13005
13006 2000-10-02 Akim Demaille <akim@epita.fr>
13007
13008 * src/getargs.c (fixed_outfiles): Rename as...
13009 (yaccflag): for consistency and accuracy.
13010 Adjust dependencies.
13011
13012 2000-10-02 Akim Demaille <akim@epita.fr>
13013
13014 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
13015 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
13016 difficult and introduced a lot of core dump. It turns out that
13017 Bison used an implementation of `xmalloc' based on `calloc', and
13018 at various places it does depend upon the initialization to 0. I
13019 have not tried to isolate the pertinent places, and all the former
13020 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
13021 someone should address this issue.
13022
13023 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
13024 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
13025 files.
13026 Adjust dependencies.
13027 * src/warshall.h: New file.
13028 Propagate.
13029
13030 2000-10-02 Akim Demaille <akim@epita.fr>
13031
13032 Various anti-`extern in *.c' changes.
13033
13034 * src/system.h: Include `assert.h'.
13035
13036 2000-10-02 Akim Demaille <akim@epita.fr>
13037
13038 * src/state.h (nstates, final_state, first_state, first_shift)
13039 (first_reduction): Move their exportation from here...
13040 * src/LR0.h: to here.
13041 Adjust dependencies.
13042 * src/getargs.c (statisticsflag): New variable.
13043 Add support for `--statistics'.
13044 Adjust dependencies.
13045
13046 Remove a lot of now useless `extern' statements in most files.
13047
13048 2000-10-02 Akim Demaille <akim@epita.fr>
13049
13050 * src/LR0.h: New file.
13051 Propagate its use.
13052
13053 2000-10-02 Akim Demaille <akim@epita.fr>
13054
13055 * src/print.h: New file.
13056 Propagate its use.
13057 * src/print.c: Formatting and ordering changes.
13058 (verbose, terse): Replace with...
13059 (print_results): this new function.
13060 Adjust dependencies.
13061
13062 2000-10-02 Akim Demaille <akim@epita.fr>
13063
13064 * src/conflicts.c (conflict_report): New function.
13065 (conflict_log, verbose_conflict_log): Replace with...
13066 (print_conflicts): this function.
13067 Adjust dependencies.
13068 * src/conflicts.h: New file.
13069 Propagate its inclusion.
13070
13071 2000-10-02 Akim Demaille <akim@epita.fr>
13072
13073 * src/nullable.h: New file.
13074 Propagate its inclusion.
13075 * src/nullable.c: Formatting changes.
13076
13077 2000-10-02 Akim Demaille <akim@epita.fr>
13078
13079 * src/reduce.h: New file.
13080 Propagate its inclusion.
13081 * src/reduce.c: Topological sort and other formatting changes.
13082 (bool, TRUE, FALSE): Move their definition to...
13083 * src/system.h: here.
13084
13085 2000-10-02 Akim Demaille <akim@epita.fr>
13086
13087 * src/files.c: Formatting changes.
13088 (tryopen, tryclose, openfiles): Rename as...
13089 (xfopen, xfclose, open_files): this.
13090 (stringappend): static.
13091 * src/files.h: Complete the list of exported symbols.
13092 Propagate its use.
13093
13094 2000-10-02 Akim Demaille <akim@epita.fr>
13095
13096 * src/reader.h: New file.
13097 Propagate its use instead of tedious list of `extern' and
13098 prototypes.
13099 * src/reader.c: Formatting changes, topological sort,
13100 s/register//.
13101
13102 2000-10-02 Akim Demaille <akim@epita.fr>
13103
13104 * src/lex.h: Prototype `lex.c' exported functions.
13105 * src/reader.c: Adjust.
13106 * src/lex.c: Formatting changes.
13107 (safegetc): Rename as...
13108 (xgetc): this.
13109
13110 2000-10-02 Akim Demaille <akim@epita.fr>
13111
13112 * src/lalr.h: New file.
13113 Propagate its inclusion instead of prototypes and `extern'.
13114 * src/lalr.c: Formatting changes, topological sorting etc.
13115
13116 2000-10-02 Akim Demaille <akim@epita.fr>
13117
13118 * src/output.c (token_actions): Introduce a temporary array,
13119 YYDEFACT, that makes it possible for this function to use
13120 output_short_table.
13121
13122 2000-10-02 Akim Demaille <akim@epita.fr>
13123
13124 `user_toknums' is output as a `short[]' in `output.c', while it is
13125 defined as a `int[]' in `reader.c'. For consistency with the
13126 other output tables, `user_toknums' is now defined as a table of
13127 shorts.
13128
13129 * src/reader.c (user_toknums): Be a short table instead of an int
13130 table.
13131 Adjust dependencies.
13132
13133 Factor the short table outputs.
13134
13135 * src/output.c (output_short_table): New function.
13136 * src/output.c (output_gram, output_stos, output_rule_data)
13137 (output_base, output_table, output_check): Use it.
13138
13139 2000-10-02 Akim Demaille <akim@epita.fr>
13140
13141 * src/output.c (output): Topological sort of the functions, in
13142 order to get rid of the `static' prototypes.
13143 No longer use `register'.
13144 * src/output.h: New file.
13145 Propagate its inclusion in files explicitly prototyping functions
13146 from output.c.
13147
13148 2000-09-21 Akim Demaille <akim@epita.fr>
13149
13150 * src/atgeneral.m4: Update from Autoconf.
13151
13152 2000-09-21 Akim Demaille <akim@epita.fr>
13153
13154 * src/closure.h: New file.
13155 * src/closure.c: Formatting changes, topological sort over the
13156 functions, use of closure.h.
13157 (initialize_closure, finalize_closure): Rename as...
13158 (new_closure, free_closure): these. Adjust dependencies.
13159 * src/LR0.c: Formatting changes, topological sort, use of
13160 cloture.h.
13161 (initialize_states): Rename as...
13162 (new_states): this.
13163 * src/Makefile.am (noinst_HEADERS): Adjust.
13164
13165 2000-09-20 Akim Demaille <akim@epita.fr>
13166
13167 * src/acconfig.h: Don't protect config.h against multiple
13168 inclusion.
13169 Don't define PARAMS.
13170 * src/system.h: Define PARAMS.
13171 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
13172 purpose of config.h. system.h must not try to fix wrong
13173 definitions in config.h.
13174
13175 2000-09-20 Akim Demaille <akim@epita.fr>
13176
13177 * src/derives.h: New file.
13178 * src/main.c, src/derives.h: Use it.
13179 Formatting changes.
13180 * src/Makefile.am (noinst_HEADERS): Adjust.
13181
13182 2000-09-20 Akim Demaille <akim@epita.fr>
13183
13184 * tests/atgeneral.m4: Update from Autoconf.
13185 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
13186 (AT_CHECK_CALC): New macros.
13187 Use these macros to test bison with options `', `--raw',
13188 `--debug', `--yacc', `--yacc --debug'.
13189
13190 2000-09-19 Akim Demaille <akim@epita.fr>
13191
13192 * src/output.c: Formatting changes.
13193 * src/machine.h: Remove, leaving its contents in...
13194 * src/system.h: here.
13195 Include stdio.h.
13196 Adjust all dependencies on stdio.h and machine.h.
13197 * src/getargs.h: New file.
13198 Let all `extern' declarations about getargs.c be replaced with
13199 inclusion of `getargs.h'.
13200 * src/Makefile.am (noinst_HEADERS): Adjust.
13201
13202 * tests/calc.m4 (yyin): Be initialized in main, not on the global
13203 scope.
13204 (yyerror): Returns void, not int.
13205 * doc/bison.texinfo: Formatting changes.
13206
13207 2000-09-19 Akim Demaille <akim@epita.fr>
13208
13209 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
13210 portable.
13211
13212 2000-09-18 Akim Demaille <akim@epita.fr>
13213
13214 * configure.in: Append WARNING_CFLAGS to CFLAGS.
13215 * src/Makefile.am (INCLUDES): Don't.
13216 Be ready to fetch headers in lib/.
13217
13218 2000-09-18 Akim Demaille <akim@epita.fr>
13219
13220 * doc/bison.texinfo: Update the copyright.
13221 ANSIfy and GNUify the examples.
13222 Remove the old menu.
13223
13224 2000-09-18 Akim Demaille <akim@epita.fr>
13225
13226 First set of tests: use the `calc' example from the documentation.
13227
13228 * src/bison.s1 (yyparse): Condition the code using `yytname' which
13229 is defined only when YYDEBUG is.
13230 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
13231 * src/files.c (tryopen, tryclose): Formatting changes.
13232 Move to the top and be static.
13233 * src/reader.c (read_signed_integer): Likewise.
13234 * tests/calc.m4: New file.
13235 * Makefile.am, suite.m4: Adjust.
13236 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
13237
13238 2000-09-18 Akim Demaille <akim@epita.fr>
13239
13240 Add support for an Autotest test suite for Bison.
13241
13242 * m4/m4.m4, m4/atconfig.m4: New files.
13243 * m4/Makefile.am (EXTRA_DIST): Adjust.
13244 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
13245 files.
13246 * src/getargs.c: Display a more standard --version message.
13247 * src/reader.c (reader): Formatting changes.
13248 No longer depend upon VERSION_STRING.
13249 * configure.in: No longer use `dnl'.
13250 Set up the test suite and the new directory `tests/.
13251 (VERSION_STRING): Remove.
13252
13253 2000-04-14 Akim Demaille <akim@epita.fr>
13254
13255 * src/reader.c (copy_comment2): New function, same as former
13256 `copy_comment', but outputs into two FILE *.
13257 (copy_comment): Use it.
13258 (parse_union_decl): Use it.
13259 (get_type, parse_start_decl): Use the same `invalid' message.
13260 (parse_start_decl, parse_union_decl): Use the same `multiple'
13261 message.
13262 (parse_union_decl, copy_guard, copy_action): Use the same
13263 `unmatched' message.
13264 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
13265
13266 2000-03-31 Akim Demaille <akim@epita.fr>
13267
13268 * src/files.c (tryopen, tryclose): Move to the top.
13269 Be static.
13270
13271 2000-03-31 Akim Demaille <akim@epita.fr>
13272
13273 * src/main.c (main): Don't call `done', exit does it.
13274
13275 2000-03-31 Akim Demaille <akim@epita.fr>
13276
13277 * allocate.c: s/return (foo)/return foo/.
13278 * lalr.c: Likewise.
13279 * LR0.c: Likewise.
13280 * output.c: Likewise.
13281 * reader.c: Likewise.
13282 * symtab.c: Likewise.
13283 * vmsgetargs.c: Likewise.
13284
13285 2000-03-31 Akim Demaille <akim@epita.fr>
13286
13287 Clean up the error reporting functions.
13288
13289 * src/report.c: New file.
13290 * src/report.h: Likewise.
13291 * src/Makefile.am: Adjust.
13292 * m4/error.m4: New file.
13293 * m4/Makefile.am: Adjust.
13294 * configure.in (jm_PREREQ_ERROR): Call it.
13295 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
13296 Remove.
13297 (fatal, fatals): Remove. All callers use complain.c::fatal.
13298 (warn, warni, warns, warnss, warnss): Remove. All callers use
13299 complain.c::complain.
13300 (toomany): Remove, use fatal instead.
13301 * src/files.c (done): No argument, use complain_message_count.
13302 * src/main.c (main): Register `done' to `atexit'.
13303
13304 * src/getargs.c (usage): More `fputs', less `fprintf'.
13305
13306 2000-03-28 Akim Demaille <akim@epita.fr>
13307
13308 * lib/: New directory.
13309 * Makefile.am (SUBDIRS): Adjust.
13310 * configure.in: Adjust.
13311 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
13312 useless.
13313 * src/alloca.c: Moved to lib/.
13314 * src/getopt.c: Likewise.
13315 * src/getopt1.c: Likewise.
13316 * src/getopt.h: Likewise.
13317 * src/ansi2knr.c: Likewise.
13318 * src/ansi2knr.1: Likewise.
13319 * src/Makefile.am: Adjust.
13320 * lib/Makefile.am: New file.
13321
13322 2000-03-28 Akim Demaille <akim@epita.fr>
13323
13324 * src/getargs.c (usage): Refresh the help message.
13325
13326 2000-03-17 Akim Demaille <akim@epita.fr>
13327
13328 * src/getopt1.c: Updated from textutils 2.0e
13329 * src/getopt.c: Likewise.
13330 * src/getopt.h: Likewise.
13331
13332 2000-03-17 Akim Demaille <akim@epita.fr>
13333
13334 * src/Makefile.am (bison.simple): Fix the awk program: quote only
13335 the file name, not the whole `#line LINE FILE'.
13336
13337 2000-03-17 Akim Demaille <akim@epita.fr>
13338
13339 On syntax errors, report the token on which we choked.
13340
13341 * src/bison.s1 (yyparse): In the label yyerrlab, when
13342 YYERROR_VERBOSE, add yychar in msg.
13343
13344 2000-03-17 Akim Demaille <akim@epita.fr>
13345
13346 * src/reader.c (copy_at): New function.
13347 (copy_guard): Use it.
13348 (copy_action): Use it.
13349
13350 2000-03-17 Akim Demaille <akim@epita.fr>
13351
13352 Be kind to translators, save some useless translations.
13353
13354 * src/main.c (banner): New function.
13355 (fatal_banner): Use it.
13356 (warn_banner): Use it.
13357
13358 2000-03-17 Akim Demaille <akim@epita.fr>
13359
13360 * src/reader.c (copy_definition): Use copy_string and
13361 copy_comment. Removed now unused `match', `ended',
13362 `cplus_comment'.
13363 (copy_comment, copy_string): Moved, to be visible from
13364 copy_definition.
13365
13366 2000-03-17 Akim Demaille <akim@epita.fr>
13367
13368 * src/reader.c (copy_string): Declare `static inline'. No
13369 problems with inline, since it is checked by configure.
13370 (copy_comment): Likewise.
13371
13372 2000-03-17 Akim Demaille <akim@epita.fr>
13373
13374 * src/reader.c (packsymbols): Formatting changes.
13375
13376 2000-03-17 Akim Demaille <akim@epita.fr>
13377
13378 * src/reader.c (copy_comment): New function, factored out from:
13379 (copy_action): Use it. Removed now unused `match', `ended',
13380 `cplus_comment'.
13381 (copy_guard): Likewise.
13382
13383 2000-03-17 Akim Demaille <akim@epita.fr>
13384
13385 * src/reader.c (copy_string): New function, factored out from:
13386 (copy_action): Use it.
13387 (copy_guard): Likewise.
13388
13389 2000-03-17 Akim Demaille <akim@epita.fr>
13390
13391 Change the handling of @s so that they behave exactly like $s.
13392 There is now a pseudo variable @$ (readble and writable), location
13393 of the lhs of the rule (by default ranging from the location of
13394 the first symbol of the rhs, to the location of the last symbol,
13395 or, if the rhs is empty, YYLLOC).
13396
13397 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
13398 yyval.
13399 (yyparse): When providing a default semantic action, provide a
13400 default location action.
13401 (after the $): No longer change `*YYLSP', just stack YYLOC the
13402 same way you stack YYVAL.
13403 * src/reader.c (read_declarations): Use warns.
13404 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
13405 (copy_action, case '@'): Likewise.
13406 Use a standard error message, to save useless work from
13407 translators.
13408
13409 2000-03-17 Akim Demaille <akim@epita.fr>
13410
13411 * src/bison.s1: Formatting and cosmetics changes.
13412 * src/reader.c: Likewise.
13413 Update the Copyright notice.
13414
13415 2000-03-17 Akim Demaille <akim@epita.fr>
13416
13417 * src/bison.s1 (#line): All set to `#line' only, since the
13418 Makefile now handles them.
13419
13420 2000-03-16 Akim Demaille <akim@epita.fr>
13421
13422 * src/output.c (output_rule_data): Output the documentation of
13423 some of the tables.
13424 (Copyright notice): Update.
13425 Formatting changes.
13426
13427 2000-03-16 Akim Demaille <akim@epita.fr>
13428
13429 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
13430 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
13431 One `#if YYDEBUG' remains, since it uses variables which are
13432 defined only if `YYDEBUG != 0'.
13433
13434 2000-03-16 Akim Demaille <akim@epita.fr>
13435
13436 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
13437 and related variables so that the similarities are highlighted.
13438
13439 2000-03-16 Akim Demaille <akim@epita.fr>
13440
13441 * src/bison.s1: Properly indent CPP directives.
13442
13443 2000-03-16 Akim Demaille <akim@epita.fr>
13444
13445 * src/bison.s1: Properly indent the `alloca' CPP section.
13446
13447 2000-03-16 Akim Demaille <akim@epita.fr>
13448
13449 Do not hard code values of directories in `configure.in'.
13450 Update the `configure' tool chain.
13451
13452 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
13453 src/makefile.am.
13454 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
13455 (AC_OUTPUT): Add m4/Makefile.
13456 Bump to bison 1.28a, 1.29 has never been released.
13457 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
13458 handled via src/Makefile.am.
13459 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
13460 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
13461 autoheader.
13462 * Makefile.am (SUBDIRS): Add m4.
13463 (ACLOCAL_AM_FLAGS): New variable.
13464 (AUTOMAKE_OPTIONS): Add check-news.
13465 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
13466 the proper line number and file name.
13467 (DEFS): Propagate the location of bison library files and of the
13468 locale files.
13469 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
13470 builddir.
13471 * acinclude.m4: Remove, replaced by the directory m4.
13472 * m4/Makefile.am (EXTRA_DIST): New variable.
13473 * m4/gettext.m4: New file, from the fileutils.
13474 * m4/lcmessage.m4: Likewise
13475 * m4/progtest.m4: Likewise.
13476 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
13477
13478 2000-03-10 Akim Demaille <akim@epita.fr>
13479
13480 * src/closure.c:
13481 Formatting changes of various comments.
13482 Respect the GNU coding standards at various places.
13483 Don't use `_()' when no translation is needed.
13484
13485 1999-12-13 Jesse Thilo <jthilo@gnu.org>
13486
13487 * src/files.c:
13488 OS/2 honors TMPDIR environment variable.
13489
13490 1999-12-13 Jesse Thilo <jthilo@gnu.org>
13491
13492 * doc/bison.texinfo: Tweaked spelling and grammar.
13493 Updated ISBN.
13494 Removed reference to price of printed copy.
13495 Mention BISON_SIMPLE and BISON_HAIRY.
13496
13497 1999-12-13 Jesse Thilo <jthilo@gnu.org>
13498
13499 * configure.in, NEWS:
13500 Bison 1.29 released.
13501
13502 1999-10-27 Jesse Thilo <jthilo@gnu.org>
13503
13504 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
13505 Added reference card.
13506
13507 1999-07-26 Jesse Thilo <jthilo@gnu.org>
13508
13509 * po/ru.po: Added Russian translation.
13510
13511 1999-07-26 Jesse Thilo <jthilo@gnu.org>
13512
13513 * configure.in: Added Russian translation.
13514
13515 1999-07-06 Jesse Thilo <jthilo@gnu.org>
13516
13517 * configure.in, NEWS, README:
13518 Released version 1.28.
13519
13520 1999-06-14 Jesse Thilo <jthilo@gnu.org>
13521
13522 * src/system.h:
13523 Squashed redefinition warning on some systems.
13524
13525 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
13526 Have configure build version string instead of relying on ANSI string
13527 concatentation.
13528
13529 1999-06-14 Jesse Thilo <jthilo@gnu.org>
13530
13531 * po/POTFILES.in: Got rid of version.c.
13532
13533 1999-06-14 Jesse Thilo <jthilo@gnu.org>
13534
13535 * acconfig.h, configure.in:
13536 Have configure build version string instead of relying on ANSI string
13537 concatentation.
13538
13539 1999-06-08 Jesse Thilo <jthilo@gnu.org>
13540
13541 * doc/bison.1:
13542 Dropped mention of `+' for long-named options.
13543
13544 1999-05-30 Jesse Thilo <jthilo@gnu.org>
13545
13546 * src/files.c: Added <unistd.h> for unlink().
13547
13548 * src/Makefile.am, src/system.h:
13549 I18n fixes.
13550
13551 1999-05-30 Jesse Thilo <jthilo@gnu.org>
13552
13553 * README: Added a FAQ list.
13554
13555 * configure.in, acconfig.h:
13556 I18n fixes.
13557
13558 1999-05-30 Jesse Thilo <jthilo@gnu.org>
13559
13560 * doc/FAQ, doc/Makefile.am:
13561 Added a FAQ list.
13562
13563 1999-05-19 Jesse Thilo <jthilo@gnu.org>
13564
13565 * src/alloc.h, src/symtab.h, src/version.c:
13566 Protected inclusion of "config.h" with HAVE_CONFIG_H.
13567
13568 1999-04-18 Jesse Thilo <jthilo@gnu.org>
13569
13570 * src/.cvsignore, src/Makefile.am:
13571 Reorganized: sources in `src', documentation in `doc'.
13572
13573 * src/lex.c (literalchar):
13574 fixed the code for escaping double quotes (thanks
13575 Jonathan Czisny.)
13576
13577 1999-04-18 Jesse Thilo <jthilo@gnu.org>
13578
13579 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
13580 Adjusted paths to reflect directory reorganization.
13581
13582 1999-04-18 Jesse Thilo <jthilo@gnu.org>
13583
13584 * doc/.cvsignore, doc/Makefile.am:
13585 Reorganized: sources in `src', documentation in `doc'.
13586
13587 1999-04-18 Jesse Thilo <jthilo@gnu.org>
13588
13589 * configure.in:
13590 Updated AC_INIT file to reflect directory reorganization.
13591
13592 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
13593 Reorganized: sources in `src', documentation in `doc'.
13594
13595 1999-04-13 Jesse Thilo <jthilo@gnu.org>
13596
13597 * src/allocate.c:
13598 Don't declare calloc() and realloc() if not necessary.
13599
13600 1999-04-13 Jesse Thilo <jthilo@gnu.org>
13601
13602 * configure.in, acconfig.h, acinclude.m4:
13603 Don't declare calloc() and realloc() if not necessary.
13604
13605 1999-03-23 Jesse Thilo <jthilo@gnu.org>
13606
13607 * po/.cvsignore: Added i18n support.
13608
13609 1999-03-23 Jesse Thilo <jthilo@gnu.org>
13610
13611 * acconfig.h, configure.in, Makefile.am:
13612 Added i18n support.
13613
13614 1999-03-22 Jesse Thilo <jthilo@gnu.org>
13615
13616 * src/bison.s1: Fixed #line numbers.
13617
13618 1999-03-15 Jesse Thilo <jthilo@gnu.org>
13619
13620 * po/es.po, po/fr.po, po/nl.po, po/de.po:
13621 Added PO files from Translation Project.
13622
13623 1999-03-03 Jesse Thilo <jthilo@gnu.org>
13624
13625 * Makefile.am:
13626 Added support for non-ANSI compilers (ansi2knr).
13627
13628 1999-02-16 Jesse Thilo <jthilo@gnu.org>
13629
13630 * configure.in: Bumped version number to 1.27.
13631
13632 * Makefile.am:
13633 Added `bison.simple' to list of files removed by `make distclean'.
13634
13635 1999-02-12 Jesse Thilo <jthilo@gnu.org>
13636
13637 * src/files.c, src/files.h:
13638 Defined locations of parser files in config.h instead of Makefile.
13639
13640 1999-02-12 Jesse Thilo <jthilo@gnu.org>
13641
13642 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
13643 Defined locations of parser files in config.h instead of Makefile.
13644
13645 1999-02-09 Jesse Thilo <jthilo@gnu.org>
13646
13647 * Makefile.am:
13648 Removed inappropriate use of $< macro.
13649
13650 1999-02-05 Jesse Thilo <jthilo@gnu.org>
13651
13652 * po/Makefile.in.in, po/POTFILES.in:
13653 Add `po' directory skeleton.
13654
13655 1999-01-27 Jesse Thilo <jthilo@gnu.org>
13656
13657 * README: Document help-bison list.
13658
13659 * configure.in: Add check for mkstemp().
13660
13661 1999-01-20 Jesse Thilo <jthilo@gnu.org>
13662
13663 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
13664 Hush a few compiler warnings.
13665
13666 * src/files.c:
13667 Add tryclose(), which verifies that fclose was successful.
13668 Hush a couple of compiler warnings.
13669
13670 1999-01-20 Jesse Thilo <jthilo@gnu.org>
13671
13672 * Makefile.am, OChangeLog:
13673 ChangeLog is now automatically generated. Include the old version as
13674 OChangeLog.
13675
13676 1999-01-14 Jesse Thilo <jthilo@gnu.org>
13677
13678 * 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:
13679 Update FSF address.
13680
13681 1999-01-14 Jesse Thilo <jthilo@gnu.org>
13682
13683 * doc/bison.texinfo: Fix formatting glitch.
13684
13685 * doc/bison.texinfo: Update FSF address.
13686
13687 1999-01-14 Jesse Thilo <jthilo@gnu.org>
13688
13689 * acconfig.h: Update FSF address.
13690
13691 1999-01-08 Jesse Thilo <jthilo@gnu.org>
13692
13693 * src/system.h:
13694 Don't define PACKAGE here, since config.h defines it.
13695
13696 1998-12-30 Jesse Thilo <jthilo@gnu.org>
13697
13698 * src/reader.c: Update copyright date.
13699
13700 * src/main.c:
13701 Ditch sprintf to statically-sized buffers in fatal/warn functions in
13702 favor of output directly to stderr (avoids buffer overruns).
13703
13704 * src/reader.c: Some checks for premature EOF.
13705
13706 * 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:
13707 Use prototypes if the compiler understands them.
13708
13709 * src/files.c: Honor TMPDIR on Unix hosts.
13710 Use prototypes if the compiler understands them.
13711
13712 * src/reader.c:
13713 Fix a couple of buffer overrun bugs.
13714 Use prototypes if the compiler understands them.
13715
13716 * src/system.h: Include unistd.h and ctype.h.
13717 Use #ifdef instead of #if for NLS symbols.
13718
13719 1998-12-30 Jesse Thilo <jthilo@gnu.org>
13720
13721 * doc/bison.texinfo:
13722 Delete comment "consider using @set for edition number, etc..." since
13723 we now are doing so.
13724
13725 1998-12-30 Jesse Thilo <jthilo@gnu.org>
13726
13727 * configure.in:
13728 Use prototypes if the compiler understands them.
13729
13730 * NEWS: Document 1.26 highlights.
13731
13732 * Makefile.am: Require Automake 1.3 or later.
13733
13734 * acconfig.h:
13735 Use prototypes if the compiler understands them.
13736
13737 1998-12-29 Jesse Thilo <jthilo@gnu.org>
13738
13739 * src/version.c:
13740 Use VERSION symbol from automake for version number.
13741
13742 1998-12-29 Jesse Thilo <jthilo@gnu.org>
13743
13744 * acconfig.h, configure.in, version.cin:
13745 Use VERSION symbol from automake for version number.
13746
13747 1998-11-28 Jesse Thilo <jthilo@gnu.org>
13748
13749 * Makefile.am:
13750 Distribute original version of simple parser (bison.s1), not built
13751 version (bison.simple).
13752
13753 1998-11-28 Jesse Thilo <jthilo@gnu.org>
13754
13755 * doc/bison.texinfo: Add info dir entry.
13756
13757 * doc/bison.texinfo:
13758 Let automake put version number into documentation.
13759
13760 1998-11-26 Jesse Thilo <jthilo@gnu.org>
13761
13762 * src/bison.cld, src/build.com, src/vmshlp.mar:
13763 Add non-RCS files from /gd/gnu/bison.
13764
13765 1998-11-26 Jesse Thilo <jthilo@gnu.org>
13766
13767 * doc/bison.1:
13768 Document the BISON_HAIRY and BISON_SIMPLE variables.
13769
13770 1998-11-25 Jesse Thilo <jthilo@gnu.org>
13771
13772 * src/version.c: Build version.c automatically.
13773
13774 * src/reader.c:
13775 Fix token numbering (used to start at 258, not 257).
13776
13777 * src/system.h: Include config.h.
13778
13779 * src/getargs.c: Update bug report address.
13780
13781 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
13782 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
13783
13784 1998-11-25 Jesse Thilo <jthilo@gnu.org>
13785
13786 * Makefile.am:
13787 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
13788
13789 * configure.in, version.cin:
13790 Build version.c automatically.
13791
13792 * AUTHORS: Add AUTHORS file.
13793
13794 * README: Update bug report address.
13795
13796 * bison.simple:
13797 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
13798
13799 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
13800 Add automake stuff.
13801
13802 1998-11-25 Jesse Thilo <jthilo@gnu.org>
13803
13804 * doc/bison.texinfo: Clean up some formatting.
13805
13806 1998-05-05 Richard Stallman <rms@gnu.org>
13807
13808 * doc/bison.texinfo:
13809 Explain better why to make a pure parser.
13810
13811 1998-01-05 Richard Stallman <rms@gnu.org>
13812
13813 * src/files.c (openfiles):
13814 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
13815 find a temporary directory, if possible. Do not unlink files while
13816 they are open.
13817
13818 1997-08-25 Richard Stallman <rms@gnu.org>
13819
13820 * src/reader.c (stack_offset;):
13821 Change some warni to warns.
13822
13823 * src/lex.c (literalchar): Use warns, not warni.
13824
13825 1997-06-28 Richard Stallman <rms@gnu.org>
13826
13827 * src/bison.s1: Add a Bison version comment.
13828
13829 * src/main.c (fatal, warn, berror):
13830 Use program_name.
13831
13832 1997-06-28 Richard Stallman <rms@gnu.org>
13833
13834 * Makefile.in (bison_version): New variable.
13835 (dist): Use that variable.
13836 (bison.s1): Substitute the Bison version into bison.simple.
13837
13838 * bison.simple: Add a Bison version comment.
13839
13840 1997-06-18 Richard Stallman <rms@gnu.org>
13841
13842 * src/main.c (fatal, warn, berror):
13843 Make error messages standard.
13844 (toomany): Improve error message text.
13845
13846 * 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:
13847 new.h renamed to alloc.h.
13848
13849 1997-06-18 Richard Stallman <rms@gnu.org>
13850
13851 * Makefile.in: new.h renamed to alloc.h.
13852
13853 1997-05-24 Richard Stallman <rms@gnu.org>
13854
13855 * src/lex.c (literalchar):
13856 Fix the code for escaping \, " and '.
13857
13858 (lex): Avoid trouble when there are many chars
13859 to discard in a char literal with just several chars in it.
13860
13861 1997-05-17 Richard Stallman <rms@gnu.org>
13862
13863 * src/bison.s1:
13864 Use malloc, if using alloca is troublesome.
13865 (YYSTACK_USE_ALLOCA): New flag macro.
13866 Define it for some systems and compilers.
13867 (YYSTACK_ALLOC): New macro.
13868 (yyparse): Use YYSTACK_ALLOC to allocate stack.
13869 If it was malloc'd, free it.
13870
13871 1997-05-17 Richard Stallman <rms@gnu.org>
13872
13873 * bison.simple:
13874 Use malloc, if using alloca is troublesome.
13875 (YYSTACK_USE_ALLOCA): New flag macro.
13876 Define it for some systems and compilers.
13877 (YYSTACK_ALLOC): New macro.
13878 (yyparse): Use YYSTACK_ALLOC to allocate stack.
13879 If it was malloc'd, free it.
13880
13881 1997-04-23 Richard Stallman <rms@gnu.org>
13882
13883 * src/bison.s1:
13884 (alloca) [__hpux]: Always define as __builtin_alloca.
13885
13886 1997-04-23 Richard Stallman <rms@gnu.org>
13887
13888 * bison.simple:
13889 (alloca) [__hpux]: Always define as __builtin_alloca.
13890
13891 1997-04-22 Richard Stallman <rms@gnu.org>
13892
13893 * src/bison.s1:
13894 [__hpux]: Include alloca.h (right for HPUX 10)
13895 instead of declaring alloca (right for HPUX 9).
13896
13897 * src/bison.s1 (__yy_memcpy):
13898 Declare arg `count' as unsigned int.
13899 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
13900
13901 1997-04-22 Richard Stallman <rms@gnu.org>
13902
13903 * bison.simple:
13904 [__hpux]: Include alloca.h (right for HPUX 10)
13905 instead of declaring alloca (right for HPUX 9).
13906
13907 * bison.simple (__yy_memcpy):
13908 Declare arg `count' as unsigned int.
13909 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
13910
13911 1997-01-03 Richard Stallman <rms@gnu.org>
13912
13913 * src/allocate.c: [__STDC__ or _MSC_VER]:
13914 Declare calloc and realloc to return void *.
13915
13916 1997-01-02 Richard Stallman <rms@gnu.org>
13917
13918 * src/system.h:
13919 [_MSC_VER]: Include stdlib.h and process.h.
13920 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
13921
13922 * src/main.c (main): Return FAILURE as a value.
13923 (printable_version): Declare arg as int, not char.
13924
13925 1997-01-02 Richard Stallman <rms@gnu.org>
13926
13927 * Makefile.in (dist):
13928 Explicitly check for symlinks, and copy them.
13929
13930 1996-12-19 Richard Stallman <rms@gnu.org>
13931
13932 * src/files.c:
13933 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
13934
13935 1996-12-18 Paul Eggert <eggert@gnu.org>
13936
13937 * src/bison.s1 (yyparse):
13938 If __GNUC__ and YYPARSE_PARAM are both defined,
13939 declare yyparse to have a void * argument.
13940
13941 1996-12-18 Paul Eggert <eggert@gnu.org>
13942
13943 * bison.simple (yyparse):
13944 If __GNUC__ and YYPARSE_PARAM are both defined,
13945 declare yyparse to have a void * argument.
13946
13947 1996-12-17 Richard Stallman <rms@gnu.org>
13948
13949 * src/reduce.c (nbits): Add some casts.
13950
13951 1996-08-12 Richard Stallman <rms@gnu.org>
13952
13953 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
13954
13955 1996-08-12 Richard Stallman <rms@gnu.org>
13956
13957 * bison.simple: Test _MSDOS as well as _MSDOS_.
13958
13959 1996-07-31 Richard Stallman <rms@gnu.org>
13960
13961 * src/bison.s1:
13962 [__sun && __i386]: Include alloca.h.
13963
13964 1996-07-31 Richard Stallman <rms@gnu.org>
13965
13966 * bison.simple:
13967 [__sun && __i386]: Include alloca.h.
13968
13969 1996-07-30 Richard Stallman <rms@gnu.org>
13970
13971 * src/bison.s1: Comment change.
13972
13973 * src/bison.s1: Test _MSDOS_, not MSDOS.
13974
13975 1996-07-30 Richard Stallman <rms@gnu.org>
13976
13977 * bison.simple: Comment change.
13978
13979 * bison.simple: Test _MSDOS_, not MSDOS.
13980
13981 1996-06-01 Richard Stallman <rms@gnu.org>
13982
13983 * 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:
13984 Insert `_' macro around many string constants.
13985
13986 * src/main.c:
13987 Insert `_' macro around many string constants.
13988
13989 (main): Call setlocale, bindtextdomain and textdomain.
13990
13991 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
13992 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
13993 [ENABLE_NLS]: Include libintl.h.
13994 [ENABLE_NLS] (gettext): Define.
13995 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
13996 (N_, PACKAGE, LOCALEDIR): New macros.
13997
13998 1996-06-01 Richard Stallman <rms@gnu.org>
13999
14000 * POTFILES.in: New file.
14001
14002 * Makefile.in (allocate.o):
14003 Define target explicitly.
14004
14005 * Makefile.in (CFLAGS): Set to @CFLAGS@.
14006 (LDFLAGS): Set to @LDFLAGS@.
14007 (configure): Run autoconf only if preceding `cd' succeeds.
14008 (bison.s1): Redirect output to temporary file then move the
14009 temporary to the target, rather than redirecting directly to bison.s1.
14010 (clean): Remove config.status and config.log.
14011 (distclean): Don't remove config.status here.
14012
14013 1996-05-12 Richard Stallman <rms@gnu.org>
14014
14015 * src/bison.s1:
14016 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
14017
14018 1996-05-12 Richard Stallman <rms@gnu.org>
14019
14020 * bison.simple:
14021 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
14022
14023 1996-05-11 Richard Stallman <rms@gnu.org>
14024
14025 * src/bison.s1 (__yy_memcpy):
14026 Really reorder the args, as was supposedly done on Feb 14 1995.
14027 (yyparse): Calls changed accordingly.
14028
14029 1996-05-11 Richard Stallman <rms@gnu.org>
14030
14031 * Makefile.in (dist): Don't use $(srcdir).
14032
14033 * bison.simple (__yy_memcpy):
14034 Really reorder the args, as was supposedly done on Feb 14 1995.
14035 (yyparse): Calls changed accordingly.
14036
14037 1996-01-27 Richard Stallman <rms@gnu.org>
14038
14039 * src/output.c (output_rule_data):
14040 Test YYERROR_VERBOSE in the conditional
14041 around the definition of ttyname.
14042
14043 1995-12-29 Richard Stallman <rms@gnu.org>
14044
14045 * src/bison.s1:
14046 Fix line numbers in #line commands.
14047
14048 1995-12-29 Richard Stallman <rms@gnu.org>
14049
14050 * bison.simple:
14051 Fix line numbers in #line commands.
14052
14053 1995-12-27 Richard Stallman <rms@gnu.org>
14054
14055 * src/bison.s1 (YYPARSE_PARAM_DECL):
14056 In C++, make it always null.
14057 (YYPARSE_PARAM_ARG): New macro.
14058 (yyparse): Use YYPARSE_PARAM_ARG.
14059
14060 1995-12-27 Richard Stallman <rms@gnu.org>
14061
14062 * bison.simple (YYPARSE_PARAM_DECL):
14063 In C++, make it always null.
14064 (YYPARSE_PARAM_ARG): New macro.
14065 (yyparse): Use YYPARSE_PARAM_ARG.
14066
14067 1995-11-29 Richard Stallman <rms@gnu.org>
14068
14069 * doc/bison.texinfo:
14070 Describe literal string tokens, %raw, %no_lines, %token_table.
14071
14072 1995-11-29 Daniel Hagerty <hag@gnu.org>
14073
14074 * doc/bison.texinfo: Fixed update date
14075
14076 1995-10-16 Richard Stallman <rms@gnu.org>
14077
14078 * src/version.c: Version 1.25.
14079
14080 1995-10-16 Richard Stallman <rms@gnu.org>
14081
14082 * NEWS: *** empty log message ***
14083
14084 1995-10-16 Richard Stallman <rms@gnu.org>
14085
14086 * doc/bison.1, doc/bison.rnh:
14087 Add new options.
14088
14089 1995-10-15 Richard Stallman <rms@gnu.org>
14090
14091 * src/vmsgetargs.c, src/getargs.c:
14092 Added -n, -k, and -raw switches.
14093 (noparserflag, toknumflag, rawtoknumflag): New variables.
14094
14095 * src/symtab.h (SALIAS):
14096 New #define for adding aliases to %token.
14097 (struct bucket): Added `alias' field.
14098
14099 * src/reduce.c (reduce_grammar):
14100 Revise error message.
14101 (print_notices): Remove final `.' from error message.
14102
14103 * src/reader.c (reader_output_yylsp):
14104 New function.
14105 (readgram): Use `#if 0' around code that accepted %command
14106 inside grammar rules: The documentation doesn't allow it,
14107 and it will fail since the %command processors scan for the next %.
14108 (parse_token_decl): Extended the %token
14109 declaration to allow a multi-character symbol as an alias.
14110 (parse_thong_decl): New function.
14111 (read_declarations): Added %thong declarations.
14112 (read_declarations): Handle NOOP to deal with allowing
14113 % declarations as another means to specify the flags.
14114 (readgram): Allow %prec prior to semantics embedded in a rule.
14115 (skip_to_char, read_declarations, copy_definition)
14116 (parse_token_decl, parse_start_decl, parse_type_decl)
14117 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
14118 (get_type_name, copy_guard, copy_action, readgram)
14119 (get_type, packsymbols): Revised most error messages.
14120 Changed `fatal' to `warnxxx' to avoid aborting for error.
14121 Revised and use multiple warnxxx functions to avoid using VARARGS1.
14122 (read_declarations): Improve the error message for
14123 an invalid character. Do not abort.
14124 (read_declarations, copy_guard, copy_action): Use
14125 printable_version to avoid unprintable characters in printed output.
14126 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
14127 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
14128 Allow the type of a non-terminal can be given
14129 more than once, as long as all specifications give the same type.
14130
14131 * src/output.c:
14132 (output_headers, output_trailers, output, output_gram)
14133 (output_rule_data): Implement noparserflag variable.
14134 Implement toknumflag variable.
14135 (output): Call reader_output_yylsp to output LTYPESTR.
14136
14137 * src/main.c (main):
14138 If reader sees an error, don't process the grammar.
14139 (fatals): Updated to not use VARARGS1.
14140 (printable_version, int_to_string, warn, warni, warns, warnss)
14141 (warnsss): New error reporting functions. Avoid abort for error.
14142
14143 * src/lex.h:
14144 Added THONG and NOOP for alias processing.
14145 Added SETOPT for the new code that allows setting options with %flags.
14146
14147 * src/lex.c:
14148 Include getopt.h. Add some extern decls.
14149 (safegetc): New function to deal with EOF gracefully.
14150 (literalchar); new function to deal with reading \ escapes.
14151 (lex): Use literalchar.
14152 (lex): Implemented "..." tokens.
14153 (literalchar, lex, parse_percent_token): Made tokenbuffer
14154 always contain the token. This includes growing the token
14155 buffer while reading an integer.
14156 (parse_percent_token): Replaced if-else statement with percent_table.
14157 (parse_percent_token): Added % declarations as another
14158 way to specify the flags -n, -l, and -r. Also added hooks for
14159 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
14160 major changes to files.c.
14161 (lex) Retain in the incoming stream a character following
14162 an incorrect '/'.
14163 (skip_white_space, lex): Revised most error messages
14164 and changed fatal to warn to avoid aborting.
14165 (percent_table): Added %thong declarations.
14166
14167 * src/gram.h: Comment changes.
14168
14169 * src/files.c (openfiles, open_extra_files, done):
14170 Add faction flag
14171 and actfile file. Handle noparserflag. Both for -n switch.
14172
14173 * src/conflicts.c (resolve_sr_conflict):
14174 Remove use of alloca.
14175
14176 1995-06-01 Jim Meyering <meyering@gnu.org>
14177
14178 * doc/bison.texinfo: *** empty log message ***
14179
14180 1995-05-06 Richard Stallman <rms@gnu.org>
14181
14182 * src/bison.s1: Comment change.
14183
14184 1995-05-06 Richard Stallman <rms@gnu.org>
14185
14186 * bison.simple: Comment change.
14187
14188 1995-05-03 Richard Stallman <rms@gnu.org>
14189
14190 * src/version.c: Version now 1.24.
14191
14192 * src/bison.s1: Change distribution terms.
14193
14194 * src/version.c: Version now 1.23.
14195
14196 1995-05-03 Richard Stallman <rms@gnu.org>
14197
14198 * doc/bison.texinfo:
14199 Rewrite "Conditions for Using Bison".
14200 Update version to 1.24.
14201
14202 1995-05-03 Richard Stallman <rms@gnu.org>
14203
14204 * bison.simple: Change distribution terms.
14205
14206 1995-02-23 Richard Stallman <rms@gnu.org>
14207
14208 * src/files.c: Test __VMS_POSIX as well as VMS.
14209
14210 1995-02-14 Jim Meyering <meyering@gnu.org>
14211
14212 * src/bison.s1 (__yy_memcpy):
14213 Renamed from __yy_bcopy to avoid
14214 confusion. Reverse FROM and TO arguments to be consistent with
14215 those of memcpy.
14216
14217 1995-02-14 Jim Meyering <meyering@gnu.org>
14218
14219 * bison.simple (__yy_memcpy):
14220 Renamed from __yy_bcopy to avoid
14221 confusion. Reverse FROM and TO arguments to be consistent with
14222 those of memcpy.
14223
14224 1994-11-10 David J. MacKenzie <djm@gnu.org>
14225
14226 * NEWS: reformat
14227
14228 * NEWS: New file.
14229
14230 * Makefile.in (DISTFILES): Include NEWS.
14231
14232 * Makefile.in (DISTFILES):
14233 Include install-sh, not install.sh.
14234
14235 * configure.in: Update to Autoconf v2 macro names.
14236
14237 1994-10-05 David J. MacKenzie <djm@gnu.org>
14238
14239 * Makefile.in: fix typo
14240
14241 * Makefile.in (prefix, exec_prefix):
14242 Let configure set them.
14243
14244 1994-09-28 David J. MacKenzie <djm@gnu.org>
14245
14246 * Makefile.in: Set datadir to $(prefix)/share.
14247
14248 1994-09-15 Richard Stallman <rms@gnu.org>
14249
14250 * src/bison.s1:
14251 Update copyright notice and GPL version.
14252
14253 1994-09-15 Richard Stallman <rms@gnu.org>
14254
14255 * bison.simple:
14256 Update copyright notice and GPL version.
14257
14258 1994-07-12 Richard Stallman <rms@gnu.org>
14259
14260 * src/reduce.c, src/reader.c:
14261 entered into RCS
14262
14263 1994-05-05 David J. MacKenzie <djm@gnu.org>
14264
14265 * Makefile.in: entered into RCS
14266
14267 1994-03-26 Richard Stallman <rms@gnu.org>
14268
14269 * src/bison.s1: entered into RCS
14270
14271 1994-03-26 Richard Stallman <rms@gnu.org>
14272
14273 * bison.simple: entered into RCS
14274
14275 1994-03-25 Richard Stallman <rms@gnu.org>
14276
14277 * src/main.c: entered into RCS
14278
14279 1994-03-24 Richard Stallman <rms@gnu.org>
14280
14281 * src/conflicts.c: entered into RCS
14282
14283 1994-01-02 Richard Stallman <rms@gnu.org>
14284
14285 * Makefile.in: *** empty log message ***
14286
14287 1993-11-21 Richard Stallman <rms@gnu.org>
14288
14289 * src/bison.s1: *** empty log message ***
14290
14291 1993-11-21 Richard Stallman <rms@gnu.org>
14292
14293 * doc/bison.texinfo: entered into RCS
14294
14295 * doc/bison.texinfo: *** empty log message ***
14296
14297 1993-11-21 Richard Stallman <rms@gnu.org>
14298
14299 * bison.simple: *** empty log message ***
14300
14301 1993-10-25 David J. MacKenzie <djm@gnu.org>
14302
14303 * doc/bison.texinfo: *** empty log message ***
14304
14305 1993-10-19 Richard Stallman <rms@gnu.org>
14306
14307 * src/bison.s1: *** empty log message ***
14308
14309 1993-10-19 Richard Stallman <rms@gnu.org>
14310
14311 * bison.simple: *** empty log message ***
14312
14313 1993-10-14 Richard Stallman <rms@gnu.org>
14314
14315 * src/bison.s1: *** empty log message ***
14316
14317 1993-10-14 Richard Stallman <rms@gnu.org>
14318
14319 * bison.simple: *** empty log message ***
14320
14321 1993-09-14 David J. MacKenzie <djm@gnu.org>
14322
14323 * doc/bison.texinfo: *** empty log message ***
14324
14325 1993-09-13 Noah Friedman <friedman@gnu.org>
14326
14327 * Makefile.in: *** empty log message ***
14328
14329 1993-09-10 Richard Stallman <rms@gnu.org>
14330
14331 * src/conflicts.c: *** empty log message ***
14332
14333 * src/system.h: entered into RCS
14334
14335 1993-09-10 Richard Stallman <rms@gnu.org>
14336
14337 * doc/bison.1: entered into RCS
14338
14339 1993-09-06 Noah Friedman <friedman@gnu.org>
14340
14341 * src/version.c: entered into RCS
14342
14343 1993-09-06 Noah Friedman <friedman@gnu.org>
14344
14345 * Makefile.in: *** empty log message ***
14346
14347 1993-07-30 David J. MacKenzie <djm@gnu.org>
14348
14349 * Makefile.in: *** empty log message ***
14350
14351 1993-07-24 Richard Stallman <rms@gnu.org>
14352
14353 * src/bison.s1: *** empty log message ***
14354
14355 1993-07-24 Richard Stallman <rms@gnu.org>
14356
14357 * bison.simple: *** empty log message ***
14358
14359 1993-07-08 David J. MacKenzie <djm@gnu.org>
14360
14361 * Makefile.in: *** empty log message ***
14362
14363 1993-07-04 Richard Stallman <rms@gnu.org>
14364
14365 * src/bison.s1: *** empty log message ***
14366
14367 1993-07-04 Richard Stallman <rms@gnu.org>
14368
14369 * bison.simple: *** empty log message ***
14370
14371 1993-06-26 David J. MacKenzie <djm@gnu.org>
14372
14373 * src/getargs.c: entered into RCS
14374
14375 1993-06-26 David J. MacKenzie <djm@gnu.org>
14376
14377 * doc/bison.texinfo: *** empty log message ***
14378
14379 * doc/bison.1: New file.
14380
14381 1993-06-25 Richard Stallman <rms@gnu.org>
14382
14383 * src/getargs.c: New file.
14384
14385 1993-06-16 Richard Stallman <rms@gnu.org>
14386
14387 * src/bison.s1: *** empty log message ***
14388
14389 1993-06-16 Richard Stallman <rms@gnu.org>
14390
14391 * bison.simple: *** empty log message ***
14392
14393 1993-06-03 Richard Stallman <rms@gnu.org>
14394
14395 * src/bison.s1: New file.
14396
14397 1993-06-03 Richard Stallman <rms@gnu.org>
14398
14399 * doc/bison.texinfo: *** empty log message ***
14400
14401 1993-06-03 Richard Stallman <rms@gnu.org>
14402
14403 * bison.simple: New file.
14404
14405 1993-05-19 Richard Stallman <rms@gnu.org>
14406
14407 * doc/bison.texinfo: New file.
14408
14409 1993-05-07 Noah Friedman <friedman@gnu.org>
14410
14411 * Makefile.in: *** empty log message ***
14412
14413 1993-04-28 Noah Friedman <friedman@gnu.org>
14414
14415 * src/reader.c: *** empty log message ***
14416
14417 1993-04-23 Noah Friedman <friedman@gnu.org>
14418
14419 * src/alloc.h: entered into RCS
14420
14421 1993-04-20 David J. MacKenzie <djm@gnu.org>
14422
14423 * src/version.c: *** empty log message ***
14424
14425 * src/files.c, src/allocate.c:
14426 entered into RCS
14427
14428 * src/reader.c: *** empty log message ***
14429
14430 * src/lex.c: entered into RCS
14431
14432 * src/conflicts.c: New file.
14433
14434 * src/symtab.c: entered into RCS
14435
14436 * src/alloc.h: New file.
14437
14438 * src/LR0.c: entered into RCS
14439
14440 1993-04-18 Noah Friedman <friedman@gnu.org>
14441
14442 * src/reader.c: New file.
14443
14444 * src/version.c: *** empty log message ***
14445
14446 1993-04-18 Noah Friedman <friedman@gnu.org>
14447
14448 * Makefile.in: *** empty log message ***
14449
14450 1993-04-17 Noah Friedman <friedman@gnu.org>
14451
14452 * Makefile.in: *** empty log message ***
14453
14454 1993-04-15 Richard Stallman <rms@gnu.org>
14455
14456 * src/main.c, src/files.c:
14457 New file.
14458
14459 1993-04-15 Noah Friedman <friedman@gnu.org>
14460
14461 * configure.in: entered into RCS
14462
14463 * configure.in: *** empty log message ***
14464
14465 * configure.in: New file.
14466
14467 1993-04-14 Richard Stallman <rms@gnu.org>
14468
14469 * Makefile.in: New file.
14470
14471 1993-04-13 Richard Stallman <rms@gnu.org>
14472
14473 * src/version.c: New file.
14474
14475 1993-03-25 Richard Stallman <rms@gnu.org>
14476
14477 * src/output.c: entered into RCS
14478
14479 1992-09-25 Richard Stallman <rms@gnu.org>
14480
14481 * configure.bat: entered into RCS
14482
14483 1992-06-22 Richard Stallman <rms@gnu.org>
14484
14485 * src/vmsgetargs.c: entered into RCS
14486
14487 1992-06-22 Richard Stallman <rms@gnu.org>
14488
14489 * doc/bison.rnh: entered into RCS
14490
14491 1992-04-20 David J. MacKenzie <djm@gnu.org>
14492
14493 * README: entered into RCS
14494
14495 1992-01-22 Richard Stallman <rms@gnu.org>
14496
14497 * src/machine.h: entered into RCS
14498
14499 1991-12-21 Richard Stallman <rms@gnu.org>
14500
14501 * src/lalr.c, src/closure.c:
14502 entered into RCS
14503
14504 1991-12-20 Richard Stallman <rms@gnu.org>
14505
14506 * src/state.h: entered into RCS
14507
14508 1991-12-18 Richard Stallman <rms@gnu.org>
14509
14510 * src/print.c, src/nullable.c, src/derives.c:
14511 entered into RCS
14512
14513 1991-11-03 David J. MacKenzie <djm@gnu.org>
14514
14515 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
14516 entered into RCS
14517
14518 1988-09-09 Richard Stallman <rms@gnu.org>
14519
14520 * src/bison.hairy: entered into RCS
14521
14522 1987-12-16 Richard Stallman <rms@gnu.org>
14523
14524 * REFERENCES: entered into RCS
14525
14526
14527 -----
14528
14529 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
14530 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software
14531 Foundation, Inc.
14532
14533 Copying and distribution of this file, with or without
14534 modification, are permitted provided the copyright notice and this
14535 notice are preserved.