]> git.saurik.com Git - bison.git/blob - ChangeLog
2b829bacdebe25a1f6057575d9a8127f9cf855db
[bison.git] / ChangeLog
1 2005-11-03 Akim Demaille <akim@epita.fr>
2
3 In some (weird) cases, the final state number is incorrect.
4 Reported by Alexandre Duret-Lutz.
5 * src/LR0.c (state_list_append): Remove the computation of
6 final_state.
7 (save_reductions): Do it here.
8 (get_state): Alpha conversion.
9 (generate_states): Use a for loop.
10 * src/gram.h (item_number_is_rule_number)
11 (item_number_is_symbol_number): New.
12 * src/state.c: Use assert.
13 * src/system.h: Include assert.h.
14 * tests/sets.at (Accept): New.
15
16 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
17
18 * data/glr.c (yyfill): Adjust comment.
19 (yyresolveAction): Initialize default location properly
20 for empty right-hand sides.
21 (yydoAction): Ditto.
22 Add comment explaining apparently dead code.
23 * tests/glr-regression.at
24 (Incorrectly initialized location for empty right-hand side in GLR):
25 New test.
26
27 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
28
29 * bootstrap (cleanup_gnulib): New function. Use it to clean up
30 gnulib when interrupted. This fixes some race conditions and
31 works around some portability problems (one noted by Paul
32 Hilfinger).
33
34 2005-10-22 Akim <akim@epita.fr>
35
36 * Makefile.cfg: Adjust to config -> build-aux.
37 Reported by twledo.
38
39 2005-10-21 Akim Demaille <akim@epita.fr>
40
41 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
42 the %parse-params.
43 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
44 * data/yacc.c (b4_Pure_if): Rename as...
45 (b4_yacc_pure_if): this.
46 (YY_SYMBOL_PRINT, yyparse): Adjust.
47 * doc/bison.texinfo: Formatting changes.
48
49 2005-10-21 Akim Demaille <akim@epita.fr>
50
51 Finish the transition config -> build-aux.
52 * configure.ac, Makefile.am: Use build-aux.
53 * config/prev-version, config/announce-gen, config/Makefile.am:
54 Move to...
55 * build-aux/prev-version, build-aux/announce-gen,
56 * build-aux/Makefile.am: here.
57
58 2005-10-14 Akim Demaille <akim@epita.fr>
59
60 * examples/calc++/test: Use set -x only when VERBOSE.
61
62 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
63
64 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
65 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
66
67 2005-10-13 Akim Demaille <akim@epita.fr>
68
69 * src/scan-skel.l: Output the base name parts of the parser and
70 header file names.
71 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
72 additional checks.
73 Use this to exercise C++ outputs in subdirs.
74 Reported by Oleg Smolsky.
75
76 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
77
78 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
79 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
80 Problem reported by John P. Hartmann.
81 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
82 already defined it.
83
84 2005-10-12 Akim Demaille <akim@epita.fr>
85
86 * src/parse-gram.y (version_check): Exit 63 to please missing
87 (stands for "version mismatch).
88 * tests/input.at, doc/bison.texinfo: Adjust.
89
90 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
91
92 Work around portability problems with Visual Age C compiler
93 (xlc and xlC_r) reported by John P. Hartmann.
94 * data/location.cc (initial_column, initial_line): Remove.
95 All uses replaced by 0 and 1.
96 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
97 that xlc complains about.
98 * src/scan-skel.l (skel_wrap): Likewise.
99 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
100 as __STDC__.
101 * data/yacc.c (YYMODERN_C): New macro, which also looks at
102 __STDC_VERSION__. Use it everywhere instead of looking at
103 __STDC__ and __cplusplus.
104
105 2005-10-10 Akim Demaille <akim@epita.fr>
106
107 * examples/calc++/test: Be quiet unless VERBOSE.
108
109 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
110
111 * data/c.m4 (yydestruct, yysymprint):
112 Use YYUSE instead of casting to void.
113 * data/glr.c (YYUSE): New macro.
114 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
115 Use it instead of rolling our own.
116 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
117 (YYCHK1):
118 Use /*CONSTCOND*/ to suppress lint warnings.
119 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
120 (YY_STACK_PRINT): Use 'false' not '0'.
121 (YYUSE): New macro.
122 (yysymprint_, yydestruct_): Use it instead of rolling our own.
123 * data/yacc.c (YYUSE): New macro.
124 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
125 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
126 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
127
128
129 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
130 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
131
132 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
133
134 Undo the parts of the unlocked-I/O change that substituted
135 putc or puts for printf. This might hurt performance a bit,
136 but some people prefer the printf style.
137 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
138 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
139 All uses replaced by YYFPRINTF and YYDPRINTF.
140 * data/yacc.c: Likewise.
141 * lib/bitset.c (bitset_print): Likewise.
142 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
143 putc and puts.
144 * lib/lbitset.c (debug_lbitset): Likewise.
145 * src/closure.c (print_firsts, print_fderives): Likewise.
146 * src/gram.c (grammar_dump): Likewise.
147 * src/lalr.c (look_ahead_tokens_print): Likewise.
148 * src/output.c (escaped_output): Likewise.
149 (user_actions_output): Break apart two printfs.
150 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
151 * src/reduce.c (reduce_print): Likewise.
152 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
153 * src/system.h: Include unlocked-io.h rathe than stdio.h.
154
155 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
156 Use assignments rather than casts-to-void to suppress
157 unused-variable warnings. This pacifies 'lint'.
158 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
159 unused-variable warnings.
160
161 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
162
163 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
164
165 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
166
167 Use unlocked I/O for a minor performance improvement on hosts like
168 GNU/Linux and Solaris that support unlocked I/O. The basic idea
169 is to use the gnlib unlocked-io module, and to prefer putc and
170 puts to printf when either will work (since the latter doesn't
171 come in an unlocked flavor).
172 * bootstrap (gnulib_modules): Add unlocked-io.
173 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
174 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
175 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
176 and similarly for puts and putc and printf.
177 * data/yacc.c: Likewise.
178 * lib/bitset.c (bitset_print): Likewise.
179 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
180 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
181 to printf.
182 * lib/lbitset.c (debug_lbitset): Likewise.
183 * src/closure.c (print_firsts, print_fderives): Likewise.
184 * src/gram.c (grammar_dump): Likewise.
185 * src/lalr.c (look_ahead_tokens_print): Likewise.
186 * src/output.c (escaped_output): Likewise.
187 (user_actions_output): Coalesce two printfs.
188 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
189 * src/reduce.c (reduce_print): Likewise.
190 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
191 * src/system.h: Include unlocked-io.h rather than stdio.h.
192
193 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
194 this confuses xgettext.
195
196 2005-10-02 Akim Demaille <akim@epita.fr>
197
198 * bootstrap (gnulib_modules): Add strverscmp.
199 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
200 * m4/.cvsignore: Add strverscmp.m4.
201 * src/parse-gram.y (%require): New token, new rule.
202 (version_check): New.
203 * src/scan-gram.l (%require): Adjust.
204 * tests/input.at (AT_REQUIRE): New.
205 Use it.
206 * doc/bison.texinfo (Require Decl): New.
207 (Calc++ Parser): Use %require.
208
209 2005-10-02 Akim Demaille <akim@epita.fr>
210
211 * data/location.cc: New.
212
213 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
214 Akim Demaille <akim@epita.fr>
215
216 Make sure -odir/foo.cc creates dir/location.hh etc.
217 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
218 (spec_file_prefix, spec_verbose_file, spec_graph_file)
219 (spec_defines_file): Now const.
220 (dir_prefix): New.
221 (short_base_name): Remove.
222 * src/files.c: Adjust.
223 (dirname.h): Include.
224 (base_name): Don't prototype it.
225 (finput): Remove, duplicates gram_in.
226 (full_base_name, short_base_name): Replace by...
227 (all_but_ext, all_but_tab_ext): these.
228 (compute_base_names): Rename as...
229 (compute_file_name_parts): this.
230 Update to compute the new variables, including dir_prefix.
231 Adjust dependencies.
232 * src/output.c (prepare): Output them.
233 * src/reader.c: Adjust to use gram_in, not finput.
234 * src/scan-skel.l (@dir_prefix@): New.
235
236 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
237
238 * lib/subpipe.c: New function end_of_output_subpipe() added
239 to allow support for non-posix systems. This is a no-op function
240 for posix systems.
241
242 * lib/subpipe.h: New function end_of_output_subpipe() added
243 to allow support for non-posix systems. This is a no-op function
244 for posix systems.
245
246 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
247 handle the lack of pipe/fork functionality on non-posix systems.
248
249 * djgpp/Makefile.maint: DJGPP specific file.
250
251 * djgpp/README.in: DJGPP specific file.
252
253 * djgpp/config.bat: DJGPP specific configuration file.
254
255 * djgpp/config.sed: DJGPP specific configuration file.
256
257 * djgpp/config.site: DJGPP specific configuration file.
258
259 * djgpp/config_h.sed: DJGPP specific configuration file.
260
261 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
262
263 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
264
265 2005-10-02 Akim Demaille <akim@epita.fr>
266
267 * data/location.cc: New, extract from...
268 * data/lalr1.cc: here.
269 (location.hh): Include it after the user prologue, in case the
270 filename type is defined by the user.
271 Forward declation location and position before the pre-prologue.
272 (yyresult_): Rename as...
273 (yyresult): this, it's a local variable, not an attribute.
274 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
275
276 2005-10-01 Akim Demaille <akim@epita.fr>
277
278 * examples/extexi: Restore the #line generation.
279
280 2005-09-30 Akim Demaille <akim@epita.fr>,
281 Alexandre Duret-Lutz <adl@gnu.org>
282
283 Move the token type and YYSTYPE in the parser class.
284 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
285 (parser::token): New, from the moved free definition of tokens.
286 (parser::semantic_value): Now a full definition instead of an
287 indirection to YYSTYPE.
288 (b4_post_prologue): No longer included in the header file, but
289 in the implementation file.
290 * doc/bison.texi (C+ Language Interface): Update.
291 * src/parse-gram.y: Support unary %define.
292 * tests/actions.at: Define global_tokens_and_yystype for backward
293 compatibility until we update the tests.
294 * tests/calc.at: Idem.
295 (first_line, first_column, last_line, last_column): Define for lalr1.cc
296 to simplify the code.
297
298 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
299
300 Port to SunOS 4.1.4, which lacks strtoul and strerror.
301 Ah, the good old days! Problem reported by Peter Klein.
302 * bootstrap (gnulib_modules): Add strerror, strtoul.
303 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
304 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
305
306 2005-09-29 Akim Demaille <akim@epita.fr>
307
308 * data/c.m4 (b4_error_verbose_if): New.
309 * data/lalr1.cc: Use it.
310 (YYERROR_VERBOSE_IF): Remove.
311 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
312 parser members, replaced by...
313 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
314 local variables.
315 (yysyntax_error_): Takes the state number as argument.
316 (yyreduce_print_): Use the argument yyrule, not the former
317 attribute yyn_.
318
319 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
320
321 * bootstrap (gnulib_modules): Add verify.
322 * lib/.cvsignore: Add verify.h.
323 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
324 * src/system.h (verify): Remove.
325 Include verify.h instead.
326 * src/tables.c (tables_generate): Use new API for 'verify'.
327
328 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
329
330 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
331 local variables whose names begin with 'yy'.
332 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
333 Trivial changes from Joel E. Denny.
334
335 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
336 it itself.
337 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
338 don't use alloca any more.
339
340 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
341 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
342 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
343 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
344 to match yacc.c, to test more hosts.
345
346 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
347
348 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
349 doesn't affect behavior.
350 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
351 Solaris, AIX, MSC.
352 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
353 This works a bit better with glibc, if user code has already included
354 stdlib.h.
355 * doc/bison.texinfo (Bison Parser): Document that users can't
356 arbitrarily use malloc and free for other purposes. Document
357 that <alloca.h> and <malloc.h> might be included.
358 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
359 user must declare alloca.
360
361 * HACKING (release): Forwarn the Translation Project about
362 stable releses.
363
364 2005-09-20 Akim Demaille <akim@epita.fr>
365
366 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
367
368 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
369
370 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
371 (YYSTACK_ALLOC_MAXIMUM): Use it.
372 (yysyntax_error): New function.
373 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
374 multiple syntax errors are reported, and alloca is being used.
375 Instead, reallocate buffers twice as big each time, so that
376 we waste at most half the allocated memory. Start with a small
377 (128-byte) buffer that will suffice in most cases anyway.
378 Use yysyntax_error to do most of the work.
379
380 * doc/bison.texinfo (Error Reporting, Table of Symbols):
381 yynerrs is the number of errors reported, not the number of
382 errors encountered.
383
384 * tests/glr-regression.at (Duplicated user destructor for lookahead):
385 Mark it as expected to fail.
386 Cast result of malloc; problem reported by twlevo@xs4all.nl.
387 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
388 Don't start user-code symbols with "yy", to avoid name space problems.
389
390 2005-09-19 Akim Demaille <akim@epita.fr>
391
392 Remove the traits, failed experiment.
393 It never proved useful, and anyway because of the current
394 definition, it was not possible to have several specialization of
395 this traits, making it useless.
396 * data/lalr1.cc (yy:traits): Remove.
397 Inline its definitions in the parser class.
398
399 2005-09-19 Akim Demaille <akim@epita.fr>
400
401 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
402 least Mac OSX with a /usr/local install of gettext.
403
404 2005-09-19 Akim Demaille <akim@epita.fr>
405
406 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
407 and yytoken for similarity with the other skeletons.
408
409 2005-09-19 Akim Demaille <akim@epita.fr>
410
411 * NEWS, configure.ac: Bump to 2.1a.
412
413 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
414
415 * NEWS: Version 2.1.
416
417 * NEWS: Remove notice of yytname change, since it was never in an
418 official release.
419 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
420 diagnostic.
421 * src/output.c (prepare): Likewise.
422 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
423 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
424 is not defined. This is an awful hack, but it's enough for now.
425 All callers changed.
426 * tests/glr-regression-at (make_value): Args are const pointers now,
427 to avoid GCC warning.
428 (Duplicated user destructor for lookahead): New test. Currently
429 skipped. It fails on my host but I'm not sure it'll always fail.
430
431 2005-09-16 Akim Demaille <akim@epita.fr>
432
433 * src/symtab.h (struct symbol): Declare the printer and destructor
434 as const, to avoid accidental calls to free.
435 (symbol_destructor_set, symbol_printer_set): Adjust.
436 * src/symtab.c: Adjust.
437
438 2005-09-16 Akim Demaille <akim@epita.fr>
439
440 * data/c.m4 (b4_token_enums): New.
441 (b4_token_defines): Rename as...
442 (b4_token_enums_defines): this.
443 (b4_token_defines): New, output only the #defines.
444 * data/yacc.c, data/glr.c: Adjust.
445 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
446 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
447 as default values.
448
449 2005-09-16 Akim Demaille <akim@epita.fr>
450
451 * data/lalr1.cc (yylex_): Remove, inline its code.
452 (yyreport_syntax_error_): Remove, replaced by...
453 (yysyntax_error_): this which returns a string and leaves to the
454 caller the call to the users' error function.
455 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
456 Move from members of the parser object...
457 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
458 to local variables of the parse function.
459
460 2005-09-16 Akim Demaille <akim@epita.fr>
461
462 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
463 since it's in Bison's name space.
464
465 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
466
467 * data/glr.c (yyresolveValue): Add default case to pacify
468 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
469
470 * NEWS: Document when yyparse started to return 2.
471 * doc/bison.texinfo (Parser Function): Document when yyparse
472 returns 2.
473
474 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
475 (b4_filename_type): Renamed back from b4_file_name_type. All uses
476 changed.
477 (class position): file_name -> filename (reverting). All uses changed.
478
479 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
480
481 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
482 do anything if $@ exists. This reverts part of the 2005-07-07
483 patch.
484
485 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
486
487 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
488 contains obsolete information and isn't worth distributing as a
489 separate file anyway.
490 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
491 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
492 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
493 (yyparse): Abort if user code uses longjmp to throw an unexpected
494 value.
495
496 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
497
498 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
499 Suggested by twlevo@xs4all.nl.
500
501 * data/glr.c (YYCHK1): Do not assume YYE is in range.
502 This avoids a diagnostic from gcc -Wswitch-enum.
503 Problem reported by twlevo@xs4all.nl.
504
505 * doc/bison.texinfo: Don't use "filename", as per GNU coding
506 standards. Use "file name" or "file" or "name", depending on
507 the context.
508 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
509 not to hack/foo.tab.c.
510 (Calc++ Top Level): 2nd arg of main is not const.
511 * data/glr.c: b4_filename -> b4_file_name.
512 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
513 All uses changed.
514 (class position): filename -> file_name. All uses changed.
515 * data/yacc.c: b4_filename -> b4_file_name.
516 * lib/bitset.h: filename -> file_name in local vars.
517 * lib/bitset_stats.c: Likewise.
518 * src/files.c: Likewise.
519 * src/scan-skel.l ("@output ".*\n): Likewise.
520 * src/files.c (file_name_split): Renamed from filename_split.
521 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
522
523 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
524
525 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
526 to accommodate latest gnulib.
527
528 * tests/glr-regression.at (Duplicate representation of merged trees):
529 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
530
531 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
532 needed.
533
534 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
535
536 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
537 All uses changed. Invoke user destructor after an error during a
538 split parse (trivial change from Joel E. Denny).
539
540 * tests/glr-regression.at
541 (User destructor after an error during a split parse): New test case.
542 Problem reported by Joel E. Denny in:
543 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
544
545 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
546
547 * README-cvs: Give URLs for recommended tools.
548 Mention Gzip version problem, and bootstrapping issues.
549 Remove troubleshooting section, as it's somewhat obsolete.
550
551 * bootstrap (no_cache): New var, to accommodate different wget
552 variants. Use it instead of '-C off'. Problem reported by
553 twlevo@xs4all.nl.
554
555 * data/glr.c (yydestroyStackItem): New function.
556 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
557 debugging information. Problem reported by Joel E. Denny.
558
559 2005-08-25 Akim Demaille <akim@epita.fr>
560
561 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
562
563 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
564
565 * data/glr.c (yyrecoverSyntaxError, yyreturn):
566 Don't invoke destructor on unresolved entries.
567 * tests/glr-regression.at
568 (User destructor for unresolved GLR semantic value): New test case.
569 Problem reported by Joel E. Denny in:
570 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
571
572 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
573
574 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
575 Add strnlen.c.
576 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
577 lib-prefix.m4, po.m4.
578
579 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
580 in yydestruct diagnostic, since it might not be an error.
581 Problem reported by Joel Denny near end of
582 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
583 * data/lalr1.cc (yyerturn): Likewise.
584 * data/yacc.c (yyreturn): Likewise.
585 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
586
587 * src/files.c: Remove obsolete FIXME comment.
588
589 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
590 with the other templates, and to fix bogus run-on messages such
591 as the one reported at the end of
592 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
593 All callers changed to avoid the newline.
594 (yyprocessOneStack): Output two lines rather than one, to accommodate
595 the above change. This changes the debug output format slightly.
596
597 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
598 reported by Joel E. Denny in
599 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
600 (trivial change).
601 * tests/glr-regression.at (Duplicate representation of merged trees):
602 New test, from Joel E. Denny in:
603 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
604 * THANKS: Add Joel E. Denny.
605
606 * configure.ac (AC_INIT): Bump to 2.0c.
607
608 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
609
610 * NEWS: Version 2.0b.
611
612 * Makefile.am (SUBDIRS): Put examples before tests, so that
613 "make check" doesn't finish with "All 1 tests passed".
614
615 * tests/regression.at (Token definitions): Don't rely on
616 AT_PARSER_CHECK for data that contains backslashes. It currently
617 uses 'echo', and 'echo' isn't portable if its argument contains
618 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
619 that the byte '\0xff' is not printable in the C locale; it is,
620 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
621 not printable, so use '\0x81' to test.
622
623 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
624 version of GCC, since the macro is used with non-GCC compilers.
625
626 Fix core dump reported by Pablo De Napoli in
627 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
628 * tests/regression.at (Invalid inputs with {}): New test.
629 * src/parse-gram.y (token_name): Translate type before using
630 it as an index.
631
632 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
633 the user's name space. All uses changed to __attribute__
634 ((__unused__)).
635 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
636 Add __attribute__ ((__noreturn__)).
637
638 * etc/clcommit: Remove. We weren't using it, and it failed
639 "make maintainer-distcheck".
640 * Makefile.maint: Merge from coreutils.
641 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
642 (syntax-check-rules): Change list of rules as described below.
643 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
644 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
645 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
646 (sc_trailing_space): New rules.
647 (sc_xalloc_h_in_src): Remove.
648 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
649 (sc_space_tab, sc_error_exit_success, sc_changelog):
650 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
651 (makefile-check, po-check, author_mark_check):
652 (makefile_path_separator_check, copyright-check):
653 Use grep -n, to make it easier to find violations.
654 Use CVS_LIST and CVS_LIST_EXCEPT.
655 (header_regexp, h_re): Remove.
656 (dd_c): New macro.
657 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
658 (my-distcheck): Use more-modern GCC flags.
659 (signatures, %.asc): Remove.
660 (rel-files, announcement): Remove signatures.
661 Restore old updating code, even though we don't use it, so
662 that we're the same as coreutils.
663 (alpha, beta, major): Depend on news-date-check.
664 Make the upload commands.
665
666 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
667 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
668 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
669 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
670 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
671 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
672 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
673 * tests/sets.at: Likewise.
674
675 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
676 we comment out the Autoconf version number.
677 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
678 it's error-prone and "make maintainer-distcheck" rejects it.
679
680 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
681 Indent calls to "error" to pacify "make maintainer-distcheck",
682 when the calls are not intended to be translated.
683 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
684
685 * src/Makefile.am (DEFS): Use +=, to pacify
686 "make maintainer-distcheck".
687 (bison_SOURCES): Add scan-skel.h.
688 (sc_tight_scope): New rule, from coreutils.
689
690 * src/files.c (src_extension, header_extension):
691 Now static, not extern.
692 * src/getargs.c (short_options): Likewise.
693 * src/muscle_tab.c (muscle_table): Likewise.
694 * src/parse-gram.y (current_class, current_type, current_prec):
695 Likewise.
696 * src/reader.c (grammar_end, previous_rule_end): Likewise.
697 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
698 * src/main.c (main): Cast bindtextdomain and textdomain calls to
699 void, to avoid warning when NLS is disabled.
700 * src/output.c: Include scan-skel.h.
701 (scan_skel): Remove decl, since scan-skel.h does this.
702 (output_skeleton):
703 Indent calls to "error" to pacify "make maintainer-distcheck".
704 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
705 * src/reader.h (gram_end, gram_lineno): New decls to pacify
706 "make maintainer-distcheck".
707 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
708 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
709 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
710 (skel_lex_destroy, scan_skel): Move these decls to...
711 * src/scan-skel.h: New file.
712 * src/uniqstr.c (uniqstr_assert):
713 Indent calls to "error" to pacify "make maintainer-distcheck".
714
715 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
716 not @VAR@.
717
718 * tests/torture.at: Revamp to avoid misuse of atoi that
719 "make maintainer-distcheck" complained about.
720
721 * examples/extexi (message): Don't print a message more than once,
722 and omit line-number decoration that makes Emacs compile think
723 that informative messages are worth worrying about.
724
725 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
726
727 * configure.ac: Update version number.
728
729 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
730 accidentally.
731 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
732 autogenerated by the maintainer.
733 * examples/calc++/.cvsignore: Add *.yy.
734
735 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
736 * lib/bitset_stats.c (bitset_stats_init): Likewise.
737 * lib/bitsetv.c (bitsetv_alloc): Likewise.
738
739 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
740
741 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
742 from maintainer-distcheck about casting the argument of 'free'.
743
744 * NEWS: Mention recent yytname changes.
745 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
746
747 * bootstrap: For translations that have not yet been upgraded to
748 the new runtime-po domain, prime the pump by extracting the
749 relevant strings from the obsolete translations. This code can be
750 removed once the bison-runtime domain has been translated by each
751 team.
752
753 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
754 now that token names are already quoted.
755
756 Fix problem reported by Anthony Heading.
757 * data/glr.c (YYTOKEN_TABLE): New macro.
758 (yytname): Define if YYTOKEN_TABLE.
759 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
760 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
761 (YYERROR_VERBOSE): Define the same way the other skeletons do.
762 * src/output.c (prepare_symbols): Output token_table_flag.
763
764 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
765
766 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
767 again if the first call fails.
768
769 * data/glr.c (yytnamerr): New function.
770 (yyreportSyntaxError): Use it to dequote most string literals.
771 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
772 with other skeletons. All uses changed.
773 (yytnameerr_): New function.
774 (yyreport_syntax_error): Use it to dequote most string literals.
775 * data/yacc.c (yytnamerr): New function.
776 (yyerrlab): Use it to decode most string literals.
777 * doc/bison.texinfo (Decl Summary, Calling Convention):
778 Clarify quoting convention of yytname.
779 * src/output.c (prepare_symbols): Quote all names. This undoes
780 the 2005-04-17 change, which is now accomplished (mostly) via
781 changes in the parsers as described above.
782 * tests/regression.at (Token definitions, Web2c Actions):
783 Undo most 2005-04-17 change here, too.
784
785 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
786
787 Fix more problems reported by twlevo@xs4all.nl.
788 * tests/cxx-type.at: Don't pipe output of ./types through sed to
789 remove trailing spaces. This loses the exit status of ./types,
790 and isn't needed since ./types shouldn't be emitting trailing
791 spaces.
792 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
793 as the stack isn't valid in that case.
794
795 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
796 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
797 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
798 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
799 is used.
800 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
801 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
802 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
803 Likewise.
804
805 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
806 overly-picky compilers that reject 'char *foo = "bar";'.
807
808 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
809 to FILE * parameter, not to stderr. This fixes a typo introduced
810 in the 2005-07-12 change.
811
812 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
813 warnings from GCC 4.
814
815 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
816 (yyglrShiftDefer, yysplitStack):
817 Remove unused parameters b4_pure_formals. All uses changed.
818 (yyglrShift): Remove unused parameters b4_user_formals.
819 All uses changed.
820 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
821
822 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
823
824 Destructor cleanups and regularization among the three skeletons.
825 * NEWS: Document the behavior changes.
826 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
827 stack before failing, as the cleanup code will do it for us now.
828 * data/lalr1.cc (yyerrlab): Likewise.
829 * data/glr.c (yyparse): Pop everything off the stack before
830 freeing it, so that destructors get called properly.
831 * data/lalr1.cc (yyreturn): Likewise.
832 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
833 This is more consistent.
834 * doc/bison.texinfo (Destructor Decl): Mention more reasons
835 why destructors might be called. 1.875 -> 2.1.
836 (Destructor Decl, Decl Summary, Table of Symbols):
837 Some English-language cleanups for %destructor.
838 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
839 Add output line for destructor of start symbol.
840 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
841 because of that same extra output line.
842
843 * NEWS: Document minor wording changes in diagnostics of
844 Bison-generated parsers.
845 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
846 Remove unused formals. All uses changed.
847 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
848 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
849 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
850 Rename yyoverflowab to yyexhaustedlab.
851 When memory exhaustion occurs during syntax-error reporting,
852 report it separately rather than in a single diagnostic; this
853 eases translation.
854 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
855 (Memory Exhausted): Renamed from Parser Stack Overflow.
856 Revamp wording slightly to prefer "memory exhaustion".
857 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
858
859 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
860
861 Add i18n support to the GLR skeleton. Partially fix the C++
862 skeleton; a C++ expert needs to finish this. Remove debugging
863 msgids; there's little point to having them translated, since they
864 can be understood only by someone who can read the
865 (English-language) source code.
866
867 Generate runtime-po/bison-runtime.pot automatically, so that we
868 don't have to worry about garbage getting in that file. We'll
869 make sure after the next official release that old msgids don't
870 get lost. See
871 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
872
873 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
874 Now auto-generated.
875 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
876 Fix typos in explanations of the runtime file.
877 * bootstrap: Change gettext keyword from YYI18N to YY_.
878 Use standard Makefile.in.in in runtime-po, since we'll arrange
879 for backward-compatible bison-runtime.po files in a different way.
880 * data/glr.c (YY_): New macro, from yacc.c.
881 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
882 Translate messages intended for users.
883 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
884 the wording in the other skeletons. We don't know that the memory
885 is virtual.
886 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
887 Use same method that yacc.c uses.
888 Don't translate debugging messages.
889 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
890 it doesn't work (yet), and requires C++ expertise to fix.
891 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
892 Move defn to a more logical place, to be consistent with other
893 skeletons.
894 Don't translate debugging messages.
895 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
896 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
897 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
898 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
899
900 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
901 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
902 void, not int.
903 * tests/glr-regression.at (Badly Collapsed GLR States):
904 Likewise.
905 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
906 yylex should return 0 at EOF rather than aborting.
907
908 Improve tests for stack overflow in GLR parser.
909 Problem reported by twlevo@xs4all.nl.
910 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
911 All uses removed.
912 (yyStackOverflow): Just longjmp, but with value 2 so that caller
913 can handle the problem.
914 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
915 (yyparse): New local variable yyresult to record the result.
916 Use result of setjmp to set it, rather than storing itinto
917 struct.
918 (yyDone): Remove label.
919 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
920 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
921 if YYABORT is used).
922 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
923 yyparse status; put status > 1 into diagnostic.
924 Check that status==2 works.
925 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
926 Use exit status 3 for failure to open (which shouldn't happen).
927
928 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
929
930 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
931 1 on syntax error; just let yyparse do its thing.
932 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
933 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
934 (Exploding the Stack Size with Alloca):
935 (Exploding the Stack Size with Malloc):
936 Expect exit status 2, not 1, since the parser is supposed to blow
937 its stack. Problem reported by twlevo@xs4all.nl.
938
939 * data/glr.c (yyparse): Don't assume that the initial calls
940 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
941 Print a stack-overflow message and fail instead.
942 Initialize the line-number information before creating the stack,
943 so that the stack-overflow message can report line zero safely.
944
945 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
946
947 Fix problems reported by twlevo@xs4all.nl.
948 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
949 (yyuserMerge): Provide a default case if b4_mergers is empty.
950 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
951 * tests/glr-regression.at
952 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
953 Add casts to pacify C++ compilers.
954 * tests/glr-regression.at (Improper merging of GLR delayed action
955 sets): Declare yylex before using it.
956 * tests/Makefile.am (maintainer-check-g++): Fix a stray
957 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
958 test for valgrind; valgrind is independent of g++.
959 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
960 for compatibility with POSIX 1003.1-2001 (if running coreutils).
961 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
962 Use a destructor, so that we can expand the stack. Change
963 YYSTYPE to char * so that we can free it. Cast result of malloc.
964
965 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
966
967 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
968 a valgrind failure. Problem reported by twlevo@xs4all.nl.
969
970 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
971
972 * PACKAGING: New file, suggested by Bruno Haible and taken from
973 similar wording in gettext's PACKAGING file.
974 * NEWS: Mention PACKAGING.
975 * Makefile.am (EXTRA_DIST): Add PACKAGING.
976
977 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
978
979 * NEWS: Document recent i18n improvements.
980 * bootstrap: Get runtime translations into runtime-po.
981 Create runtime-po files automatically, if possible.
982 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
983 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
984 does not infringe on the user's name space.
985 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
986 * doc/bison.texinfo (Internationalization): Revamp the English
987 and Texinfo syntax a bit, to try to make it clearer.
988 (Bison Options, Option Cross Key): Mention --print-localedir.
989 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
990 YYENABLE_NLS. Quote a bit more.
991 * runtime-po/.cvsignore: New file.
992 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
993 * runtime-po/Rules-quot: Remove; now created by bootstrap.
994 * runtime-po/quot.sed: Likewise.
995 * runtime-po/boldquot.sed: Likewise.
996 * runtime-po/en@quot.header: Likewise.
997 * runtime-po/en@boldquot.header: Likewise.
998 * runtime-po/insert-header.sin: Likewise.
999 * runtime-po/remove-potcdate.sin: Likewise.
1000 * runtime-po/Makevars: Likewise.
1001 * runtime-po/LINGUAS: Likewise.
1002 * runtime-po/de.po: Likewise; we will rely on the translation project
1003 to maintain this, so "bootstrap" should get it.
1004 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
1005 its value.
1006 * src/main.c (main): Bind the bison-runtime domain, too.
1007
1008 2005-07-12 Bruno Haible <bruno@clisp.org>
1009
1010 * data/yacc.c: Include <libintl.h> when NLS is enabled.
1011 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
1012 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
1013 * runtime-po: New directory.
1014 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
1015 $(DOMAIN).pot-update rule, so that old messages are never dropped.
1016 * runtime-po/Rules-quot: New file, copied from po/.
1017 * runtime-po/quot.sed: Likewise.
1018 * runtime-po/boldquot.sed: Likewise.
1019 * runtime-po/en@quot.header: Likewise.
1020 * runtime-po/en@boldquot.header: Likewise.
1021 * runtime-po/insert-header.sin: Likewise.
1022 * runtime-po/remove-potcdate.sin: Likewise.
1023 * runtime-po/Makevars: New file.
1024 * runtime-po/POTFILES.in: New file.
1025 * runtime-po/LINGUAS: New file.
1026 * runtime-po/bison-runtime.pot: New file.
1027 * runtime-po/de.po: New file.
1028 * m4/bison.m4: New file.
1029 * Makefile.am (SUBDIRS): Add runtime-po.
1030 (aclocaldir, aclocal_DATA): New variables.
1031 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
1032 Define aclocaldir.
1033 * src/getargs.c (usage): Document --print-localedir option.
1034 (PRINT_LOCALEDIR_OPTION): New enum item.
1035 (long_options): Add --print-localedir option.
1036 (getargs): Handle --print-localedir option.
1037 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
1038 (Internationalization): New section.
1039
1040 2005-07-12 Akim Demaille <akim@epita.fr>
1041
1042 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
1043 for consistency with the rest of the code.
1044 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
1045 Add separators.
1046
1047 2005-07-12 Akim Demaille <akim@epita.fr>
1048
1049 * src/parse-gram.y: Use %printer instead of YYPRINT.
1050
1051 2005-07-12 Akim Demaille <akim@epita.fr>
1052
1053 * src/symtab.h, src/symtab.c (symbol_print): New.
1054 * src/symlist.h, src/symlist.c (symbol_list_print): New.
1055 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
1056
1057 2005-07-12 Akim Demaille <akim@epita.fr>
1058
1059 * data/glr.c (b4_syncline): Fix (swap) the definitions of
1060 b4_at_dollar and b4_dollar_dollar.
1061
1062 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
1063
1064 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
1065 and Pennello's paper.
1066
1067 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
1068
1069 * data/yacc.c (yyparse): Undo previous patch. Instead,
1070 set yylsp[0] and yyvsp[0] only if the initial action
1071 sets yylloc and yylval, respectively.
1072
1073 * data/yacc.c (yyparse): In the initial action, set
1074 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
1075 This avoids the use of undefined variables if the initial
1076 action does not set yylloc and/or yylval.
1077
1078 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
1079
1080 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
1081 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
1082 Remove from CVS. These files are automatically generated.
1083 * examples/extexi: Clarify that this file is now part of Bison,
1084 not GNU M4, and that it works with any POSIX-compatible Awk.
1085 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
1086 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
1087 so that we also get calc++-parser.yy. Geneate it.
1088 Use $(AWK), not gawk, since any conforming Awk will do.
1089 Put comment before action, since older 'make' can't handle comment
1090 in action.
1091 $(BUILT_SOURCES): List all built sources, not just some of them.
1092 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
1093 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
1094 $($(calc_sources_generated)): Remove unnecessary test for existence
1095 of target. (This had a shell syntax error anyway; a stray "x".)
1096 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
1097 calc++-parser.yy.
1098 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
1099
1100 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
1101 implied by the other modules.
1102
1103 2005-07-06 Akim Demaille <akim@epita.fr>
1104
1105 Bind examples/calc++ to the package.
1106 * examples/calc++/Makefile: Remove, replaced by...
1107 * examples/calc++/Makefile.am: ... this new file.
1108 * examples/calc++/test: Remove input.
1109 * examples/calc++/compile: Remove.
1110 * examples/Makefile.am: New.
1111 * configure.ac, Makefile.am: Adjust.
1112 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
1113
1114 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
1115
1116 * data/glr.c (yyFail): Drastically simplify; since the format argument
1117 never had any % directives, we can simply pass it to yyerror.
1118 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
1119 be modified later, as that is the usual style in glr.c.
1120 Problems reported by Paul Hilfinger.
1121
1122 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
1123 and size overflow errors.
1124 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
1125 in case the user prolog sets feature-test macros like _GNU_SOURCE.
1126 (YYSIZEMAX): New macro.
1127 (yystpcpy): New function, taken from yacc.c.
1128 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
1129 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
1130 so that we don't have to maintain their signatures.
1131 (yyFail): Check for buffer overflow, by using vsnprintf rather
1132 than vsprintf. Allocate a bigger buffer if possible.
1133 Report an error if buffer allocation fails.
1134 (yyStackOverflow): New function.
1135 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
1136 the initialization was successful. It might fail if storage was
1137 exhausted.
1138 (yyexpandGLRStack): Add more checks for storage allocation failure.
1139 Use yyStackOverflow to report failures.
1140 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
1141 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
1142 Don't assume stack number fits in int.
1143 (yysplitStack): Check for storage allocation failure.
1144 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
1145 can print diagnostics on storage allocation failure. All callers
1146 changed.
1147 (yyresolveValue): Use yybool for boolean.
1148 (yyreportSyntaxError): Check for size-calculation overflow.
1149 This code is taken from yacc.c.
1150 (yyparse): Check for storage allocation errors when allocating
1151 the initial stack.
1152
1153 2005-07-05 Akim Demaille <akim@epita.fr>
1154
1155 Extract calc++ from the documentation.
1156 * doc/bison.texinfo (Calc++): Add the extraction marks.
1157 * examples/extexi: New, from the aborted GNU Programming 2E.
1158 Separate the different paragraph of a file with empty lines.
1159 * examples/Makefile: Use it to extract the whole calc++ example.
1160
1161 2005-06-24 Akim Demaille <akim@epita.fr>
1162
1163 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
1164 class typedefs.
1165
1166 2005-06-22 Akim Demaille <akim@epita.fr>
1167
1168 * doc/bison.texinfo (C++ Language Interface): First stab.
1169 (C++ Parsers): Remove.
1170
1171 2005-06-22 Akim Demaille <akim@epita.fr>
1172
1173 * data/lalr1.cc (yylex_): Honor %lex-param.
1174
1175 2005-06-22 Akim Demaille <akim@epita.fr>
1176
1177 Start a set of simple examples.
1178 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
1179 * examples/calc++/calc++-driver.hh,
1180 * examples/calc++/calc++-parser.yy,
1181 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
1182 * examples/calc++/compile, examples/calc++/test: New.
1183
1184 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
1185
1186 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
1187 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
1188 which stems from the 2005-05-27 patch.
1189
1190 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
1191
1192 * data/glr.c: Modify treatment of unused parameters to permit use
1193 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
1194
1195 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
1196
1197 Fix infringement on user name space reported by Janos Zoltan Szabo.
1198 * data/yacc.c (yyparse): strlen -> yystrlen.
1199
1200 2005-05-30 Akim Demaille <akim@epita.fr>
1201
1202 * data/lalr1.cc (_): New.
1203 Translate the various messages.
1204
1205 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
1206
1207 Fix infringement on user name space reported by Bruno Haible.
1208 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
1209 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
1210 the user's name space.
1211 (alloca): Include <stdlib.h> to get it, if it's not built in.
1212 (YYMALLOC, YYFREE): Define only if needed.
1213 (malloc, free): Declare, but only if needed, as this infringes on
1214 the user name space.
1215
1216 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
1217
1218 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
1219 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
1220 with %d format.
1221 * lib/ebitset.c (min, max): Undef before defining.
1222 * lib/vbitset.c (min, max): Likewise.
1223 * lib/subpipe.c (create_subpipe): Save local variables in case
1224 vfork clobbers them.
1225
1226 2005-05-24 Bruno Haible <bruno@clisp.org>
1227
1228 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
1229 error message syntax used by gcc-4.0.
1230
1231 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
1232
1233 * README: Mention m4 1.4.3. Remove obsolete advice about
1234 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
1235
1236 * bootstrap: Remove workaround for problem I encountered with
1237 gettext 0.14.1; it seems to be fixed now.
1238
1239 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
1240
1241 * NEWS: Version 2.0a.
1242
1243 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
1244 the previous change.
1245
1246 Various maintainer cleanups.
1247 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
1248 conftest*, for benefit of CVS commands run at the same time as
1249 "configure". Add build-aux, since "bootstrap" now creates it and
1250 its subfiles.
1251 * Makefile.cfg (move_if_change): Remove.
1252 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
1253 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
1254 (po_repo, do-po-update, po-update, wget_files, get-targets):
1255 (config.guess-url_prefix, config.sub-url_prefix):
1256 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
1257 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
1258 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
1259 Remove.
1260 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
1261 this is now the recommended name.
1262 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
1263 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
1264 ylwrap. These files now go into build-aux.
1265 * config/move-if-change: Remove.
1266 * config/prev-version.txt: Bump from 1.75 to 2.0.
1267
1268 * bootstrap: Add stdio-safer, unistd-safer modules.
1269 Remove m4/glibc2.m4 (introduced by latest gnulib, but
1270 we don't need it).
1271 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
1272 fopen-safer.c, stdio-safer.h, unistd-safer.h.
1273 * lib/subpipe.c: Include "unistd-safer.h".
1274 (create_subpipe): Make sure all the newly-created
1275 file descriptors are > 2, so that diagnostics don't
1276 get sent down them (which might cause Bison to hang, in theory).
1277 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
1278 * src/files.c (xfopen): Use fopen_safer, not fopen.
1279
1280 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
1281 yesterday's yacc.c fix.
1282
1283 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
1284
1285 * data/glr.c, data/lalr1.cc: Update copyright date.
1286
1287 Fix a destructor bug reported by Wolfgang Spraul in
1288 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
1289 * data/yacc.c (yyabortlab): Don't call destructor, and
1290 don't set yychar to EMPTY.
1291 (yyoverflowlab): Don't call destructor.
1292 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
1293 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
1294 since we no longer output the message "discarding lookahead token
1295 end of input ()".
1296
1297 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
1298
1299 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
1300 fix a small glitch in debugging output.
1301 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
1302 after YY_SYMBOL_PRINT where needed.
1303
1304 (struct yyGLRState): Add some comments.
1305 (struct yySemanticOption): Add some comments.
1306 (union yyGLRStackItem): Add comment.
1307
1308 (yymergeOptionSets): Correct this to properly perform the union,
1309 avoiding infinite reported by Michael Rosien.
1310 Update comment.
1311
1312 * tests/glr-regression.at: Add test for GLR merging error reported
1313 by M. Rosien.
1314
1315 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
1316
1317 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
1318 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
1319 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
1320 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
1321 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
1322 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
1323 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
1324 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
1325 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
1326 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
1327 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
1328 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
1329 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
1330 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
1331 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
1332 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
1333 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
1334 src/derives.h, src/files.c, src/files.h, src/getargs.c,
1335 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
1336 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
1337 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
1338 src/output.h, src/parse-gram.c, src/parse-gram.h,
1339 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
1340 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
1341 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
1342 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
1343 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
1344 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
1345 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
1346 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
1347 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
1348 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
1349 tests/reduce.at, tests/regression.at, tests/sets.at,
1350 tests/synclines.at, tests/testsuite.at, tests/torture.at:
1351 Update FSF postal mail address.
1352
1353 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
1354
1355 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
1356 Problem reported by Ralf Menzel.
1357
1358 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
1359
1360 * tests/actions.at: Test that stack overflow invokes destructors.
1361 From Marcus Holland-Moritz.
1362 * data/yacc.c (yyerrlab): Move the code that destroys the stack
1363 from here....
1364 (yyreturn): to here. That way, destructors are called properly
1365 even if the stack overflows, or the user calls YYACCEPT or
1366 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
1367 (yyoverflowlab): Destroy the lookahead.
1368
1369 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
1370
1371 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
1372
1373 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
1374
1375 * NEWS: Bison-generated C parsers no longer quote literal strings
1376 associated with tokens.
1377 * src/output.c (prepare_symbols): Don't escape strings,
1378 since users don't want to see C escapes.
1379 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
1380 in diagnostics.
1381 * tests/input.at (Torturing the Scanner): Likewise.
1382 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
1383
1384 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
1385
1386 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
1387 the data size is known to be too small and we can't increase it.
1388 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
1389
1390 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
1391
1392 * src/parse-gram.y: Include quotearg.h.
1393 (string_as_id): Quote $1 before using it as a key, since the
1394 lexer no longer quotes it for us.
1395 (string_content): Don't strip quotes, since lexer no longer
1396 quotes it for us.
1397 * src/scan-gram.l: Include quotearg.h.
1398 ("\""): Omit quote.
1399 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
1400 a key, since the rest of the lexer doesn't quote it.
1401 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
1402 * tests/regression.at (Token definitions): Check for backslashes
1403 in token strings.
1404
1405 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
1406 (YYSIZE_T): Define to unsigned long int when using an older compiler.
1407 (yyparse): Revamp code to generate long syntax error message, to
1408 make it easier to translate, and to avoid problems with arithmetic
1409 overflow. Change "virtual memory" to "memory" in diagnostic, since
1410 we don't know whether the memory is virtual.
1411
1412 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
1413
1414 * NEWS: Bison-generated C parsers now use the _ macro to
1415 translate strings.
1416 * data/yacc.c (_) [!defined _]: New macro.
1417 All English strings wrapped inside this macro.
1418 * doc/bison.texinfo (Bison Parser): Document _.
1419 * po/POTFILES.in: Include src/parse-gram.c, since it now
1420 includes translateable strings that parse-gram.y doesn't.
1421
1422 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
1423
1424 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
1425 reverting the 2004-10-11 change to this function.
1426 (symbol_check_alias_consistency): Don't call symbol_type_set
1427 if the type name is already correct.
1428 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
1429
1430 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
1431
1432 * tests/regression.at (Token definitions): Don't use a token named
1433 c, as that generates a "#define c ..." that runs afoul of buggy
1434 stdlib.h that uses the identifier c as a member of struct
1435 drand48_data. Problem reported by Horst Wente.
1436
1437 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
1438
1439 * bootstrap: Change translation URL from
1440 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
1441 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
1442 redirection glitches. Problem reported by twlevo@xs4all.nl.
1443
1444 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
1445
1446 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
1447 after operands; POSIX says this isn't portable for the c99 command.
1448
1449 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
1450
1451 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
1452 immediately if a data overrun has occurred; this may help us track
1453 down what may be a spurious failure on MacOS.
1454
1455 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
1456
1457 Respond to problems reported by twlevo@xs4all.nl.
1458
1459 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
1460
1461 * src/vcg.h: Comment fix.
1462 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
1463 (G_CMAX): Change to -1 instead of INT_MAX.
1464
1465 * data/yacc.c (yyparse): Omit spaces before #line.
1466
1467 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
1468
1469 * src/tables.c (state_number_to_vector_number): Put it inside an
1470 "#if 0", since it's not currently used. Problem reported by
1471 Roland McGrath.
1472
1473 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
1474
1475 * src/output.c (escaped_output): Renamed from
1476 escaped_file_name_output, since we now use it for symbol tags as
1477 well. All uses changed.
1478 (symbol_destructors_output, symbol_printers_output):
1479 Escape symbol tags too.
1480 Problem reported by Matyas Forstner in
1481 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
1482
1483 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
1484 not needed.
1485 * src/output.c (user_actions_output, token_definitions_output,
1486 symbol_destructors_output, symbol_printers_output): Likewise.
1487 * src/reader.c (prologue_augment): Likewise.
1488 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
1489
1490 * src/vcg.c (output_edge): Don't quote linestyle arg.
1491 Problem reported by twlevo@xs4all.nl.
1492
1493 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
1494
1495 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
1496 example, reported by Derek M Jones. Also, make the example even
1497 more outrageous, to better illustrate how bad the problem is.
1498
1499 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
1500
1501 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
1502 putsym. Typo reported by Sebastian Piping.
1503
1504 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
1505
1506 * doc/bison.texinfo (Language and Grammar): some -> same
1507 (Epilogue): int he -> in the
1508 Typos reported by Sebastian Piping via Justin Pence.
1509
1510 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
1511
1512 * tests/glr-regression.at (Improper handling of embedded actions
1513 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
1514 embedded actions and $-N in GLR parsers", work around an Autoconf bug
1515 with dollar signs in test names.
1516 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
1517 for a similar reason.
1518
1519 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
1520
1521 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
1522 wants to redefine G_VIEW.
1523
1524 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
1525
1526 * src/vcg.c (get_view_str): Remove case for normal_view.
1527 Problem reported by twlevo@xs4all.nl.
1528
1529 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
1530
1531 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
1532 Problem reported by twlevo@xs4all.nl.
1533
1534 * doc/bison.texinfo: Change @dircategory from "GNU programming
1535 tools" to "Software development". Requested by Richard Stallman
1536 via Karl Berry.
1537
1538 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
1539
1540 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
1541 Problem reported by twlevo@xs4all.nl.
1542
1543 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
1544
1545 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
1546 keyword; it's not needed with modern compilers, and it doesn't
1547 affect correctness with older compilers. Suggested by
1548 twlevo@xs4all.nl.
1549
1550 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
1551
1552 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
1553 gcc -Wswitch-default.
1554 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
1555 * data/yacc.c (yyparse): Likewise.
1556
1557 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
1558
1559 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
1560 already. Let config.h define any nonstandard values.
1561
1562 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
1563
1564 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
1565 for the benefit of slower hosts. Problem reported by
1566 Nelson H. F. Beebe.
1567
1568 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
1569
1570 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
1571 being defined and not used.
1572 * data/lalr1.cc (yyparse): Likewise.
1573 Use "if (false)" rather than "if (0)".
1574
1575 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
1576
1577 * TODO: Mention that we should allow NUL bytes in tokens.
1578
1579 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
1580
1581 * src/scan-skel.l (<<EOF>>): Don't close standard output.
1582 Problem reported by Hans Aberg.
1583
1584 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
1585
1586 * src/getargs.c (version): Happy new year; update overall
1587 program copyright date from 2004 to 2005.
1588
1589 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
1590 Problem reported by Hans Aberg.
1591 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
1592 (Output file names.): Add a test for the case when standard output
1593 is closed.
1594
1595 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
1596
1597 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
1598 to fix an oversight in the Bison 2.0 manual.
1599
1600 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
1601
1602 * NEWS: Version 2.0. Reformat the existing news items since
1603 1.875, so that related items are grouped together.
1604 * configure.ac (AC_INIT): Bump version to 2.0.
1605 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
1606
1607 * tests/torture.at (Exploding the Stack Size with Alloca): Set
1608 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
1609 otherwise, we're not testing alloca. Unfortunately there's no
1610 simple way to consult HAVE_ALLOCA here.
1611
1612 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
1613 for yymsg, too.
1614
1615 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
1616 hand. This avoids a warning about comparing int to size_t when
1617 GCC warnings are enabled.
1618
1619 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
1620
1621 * NEWS: Bison-generated parsers no longer default to using the
1622 alloca function (when available) to extend the parser stack, due
1623 to widespread problems in unchecked stack-overflow detection.
1624 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
1625 responsibility to set it to a positive value. This lets the user
1626 specify a value that is not a preprocessor constant.
1627 * data/yacc.c (YYMAXDEPTH): Likewise.
1628 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
1629 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
1630 to be a compile-time constant. However, explain the constraints on it.
1631 Also, explain the constraints on YYINITDEPTH.
1632 (Table of Symbols): Explain that alloca is no longer the default.
1633 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
1634 to 1.
1635
1636 * doc/bison.texinfo (Location Default Action): Mention that n must
1637 be zero when k is zero. Suggested by Frank Heckenbach.
1638
1639 2004-12-22 Akim Demaille <akim@epita.fr>
1640
1641 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
1642 (parser::state_type, parser::semantic_type, parser::location_type):
1643 Private, not public.
1644 (parser::parse): Return ints, not bool.
1645 Returning a bool introduces a problem: 0 corresponds to false, and
1646 it seems weird to return false on success. Returning true changes
1647 the conventions for yyparse.
1648 Alternatively we could return void and send an exception.
1649 There is no clear consensus (yet?).
1650 (state_stack, semantic_stack, location_stack): Rename as...
1651 (state_stack_type, semantic_stack_type, location_stack_type): these.
1652 Private, not public.
1653 * tests/c++.at: New.
1654 * tests/testsuite.at, tests/Makefile.am: Adjust.
1655
1656 2004-12-21 Akim Demaille <akim@epita.fr>
1657
1658 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
1659
1660 2004-12-21 Akim Demaille <akim@epita.fr>
1661
1662 Don't impose std::string for filenames.
1663
1664 * data/lalr1.cc (b4_filename_type): New.
1665 (position::filename): Use it.
1666 (parser.hh): Move the inclusion of stack.hh and location.hh below
1667 the user code, so that needed headers for the filename type can be
1668 included first.
1669 Forward declare them before the user code.
1670 * tests/Makefile.am (check-local, installcheck-local): Pass
1671 TESTSUITEFLAGS to the TESTSUITE.
1672
1673 2004-12-20 Akim Demaille <akim@epita.fr>
1674
1675 Use more STL like names: my_class instead of MyClass.
1676
1677 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
1678 (SemanticStack, SemanticType, StateStack, StateType)
1679 (TokenNumberType, Stack, Slice, Traits, Parser::location)
1680 (Parser::value): Rename as...
1681 (location_stack, location_type, rhs_number_type, semantic_stack)
1682 (semantic_type, state_stack, state_type, token_number_type, stack)
1683 (slice, traits, parser::yylloc, parser::yylval): these.
1684
1685 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
1686
1687 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
1688
1689 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
1690 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
1691
1692 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
1693
1694 Remove uses of 'short int' and 'unsigned short int'. This raises
1695 some arbitrary limits. It uses more memory but nowadays that's
1696 not much of an issue.
1697
1698 This change does not affect the generated parsers; that's a different
1699 task, as some users will want to conserve memory there.
1700
1701 Ideally we should use size_t to represent all object counts, and
1702 something like ptrdiff_t to represent signed differences of object
1703 counts; but that will require more code-cleanup than I have the
1704 time to do right now.
1705
1706 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
1707 Use size_t, not int or short int, to count objects.
1708 * src/closure.c (nritemset, closure): Likewise.
1709 * src/closure.h (nritemset, closure): Likewise.
1710 * src/nullable.c (nullable_compute): Likewise.
1711 * src/print.c (print_core): Likewise.
1712 * src/print_graph.c (print_core): Likewise.
1713 * src/state.c (state_compare, state_hash): Likewise.
1714 * src/state.h (struct state): Likewise.
1715 * src/tables.c (default_goto, goto_actions): Likewise.
1716
1717 * src/gram.h (rule_number, rule): Use int, not short int.
1718 * src/output.c (prepare_rules): Likewise.
1719 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
1720 errs, reductions): Likewise.
1721 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
1722 Likewise.
1723 * src/tables.c (vector_number, tally, action_number,
1724 ACTION_NUMBER_MINIMUM): Likewise.
1725 * src/output.c (muscle_insert_short_int_table): Remove.
1726
1727 2004-12-17 Akim Demaille <akim@epita.fr>
1728
1729 * data/lalr1.cc: Extensive Doxygenation.
1730 (error_): Rename as...
1731 (error): this, since it is visible to the user.
1732 Adjust callers.
1733 (Parser::message): Now an automatic variable from...
1734 (Parser::yyreport_syntax_error_): here.
1735 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
1736 Parser::error.
1737 * tests/input.at: Escape $.
1738
1739 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
1740
1741 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
1742 Parenthesize rhs to avoid obscure problems with mistakes like
1743 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
1744 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
1745 b4_rhs_location): Likewise.
1746 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
1747 b4_rhs_location): Likewise.
1748
1749 2004-12-16 Akim Demaille <akim@epita.fr>
1750
1751 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
1752 yacc.c: be sure to stay within yycheck_.
1753 * tests/actions.at: Re-enable C++ tests.
1754
1755 2004-12-16 Akim Demaille <akim@epita.fr>
1756
1757 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
1758 real.
1759
1760 2004-12-16 Akim Demaille <akim@epita.fr>
1761
1762 Use #define to handle the %name-prefix.
1763
1764 * data/glr.c, data/yacc.c: Comment changes.
1765 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
1766 so that one can refer to yylex in the parser file, and have it
1767 renamed, as is the case with other skeletons.
1768
1769 2004-12-16 Akim Demaille <akim@epita.fr>
1770
1771 Move lalr1.cc internals into yy*.
1772
1773 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
1774 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
1775 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
1776 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
1777 (empty_, final_, terror_, errcode_, ntokens_)
1778 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
1779 (looka_, ilooka_, error_range_, nerrs_):
1780 Rename as...
1781 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
1782 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
1783 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
1784 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
1785 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
1786 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
1787 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
1788 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
1789 these.
1790
1791 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
1792
1793 Fix some problems reported by twlevo at xs4all.
1794 * src/symtab.c (symbol_new): Report an error if the input grammar
1795 contains too many symbols. This is better than calling abort() later.
1796 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
1797 (struct node, struct graph):
1798 Rename member expand to stretch. All uses changed.
1799 (struct graph): Remove member layoutalgorithm. All uses removed.
1800 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
1801 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
1802 All uses changed.
1803 (N_STRETCH): Rename from N_EXPAND. All uses changed.
1804
1805 2004-12-15 Akim Demaille <akim@epita.fr>
1806
1807 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
1808 Add more Doxygen comments.
1809 (symprint_, stack_print_, reduce_print_, destruct_, pop)
1810 (report_syntax_error_, translate_): Rename as...
1811 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
1812 (yypop_, yyreport_syntax_error_, yytranslate_): this.
1813
1814 2004-12-15 Akim Demaille <akim@epita.fr>
1815
1816 * data/lalr1.cc (lex_): Rename as...
1817 (yylex_): this.
1818 Move the trace here.
1819 Take the %name-prefix into account.
1820 Reported by Alexandre Duret-Lutz.
1821
1822 2004-12-15 Akim Demaille <akim@epita.fr>
1823
1824 Simplify the C++ parser constructor.
1825
1826 * data/lalr1.cc (debug_): Rename as...
1827 (yydebug_): so that the parser's internals are always in the yy*
1828 pseudo namespace.
1829 Adjust uses.
1830 (b4_parse_param_decl): Remove the leading comma as it is now only
1831 called as unique argument list.
1832 (Parser::Parser): Remove the constructor accepting a location and
1833 an initial debugging level.
1834 Remove from the other ctor the argument for the debugging level.
1835 (debug_level_type, debug_level, set_debug_level): New.
1836
1837 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
1838 constructor calls.
1839
1840 2004-12-15 Akim Demaille <akim@epita.fr>
1841
1842 Remove b4_root related material: failure experiment
1843 (which goal was to allow to derive from a class).
1844
1845 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
1846 definitions and uses.
1847
1848 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
1849
1850 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
1851 not 2, since it's not portable to subtract 1 from the start of an
1852 array. The new item 0 is never set or used. All uses changed.
1853
1854 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
1855 the default definition of YYLLOC_DEFAULT. Problem reported
1856 by Frank Heckenbach.
1857
1858 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
1859
1860 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
1861 the normal case and one for the error case. Just use the
1862 first one uniformly. Problem reported by Frank Heckenbach.
1863 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
1864 use exactly the same macro in both places.
1865 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
1866 so that the normal-case YYRHSLOC works for the error case too.
1867 All uses changed.
1868 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
1869 (YYLLOC_DEFAULT): Use the same macro as glr.c.
1870 * doc/bison.texinfo (Location Default Action): Don't claim that
1871 we have an array of locations. Use the same macro for both glr
1872 and lalr parsers. Mention YYRHSLOC. Mention what happens when
1873 the index is 0.
1874
1875 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
1876
1877 * HACKING: Update email addresses to send announcements to.
1878
1879 * configure.ac (AC_INIT): Bump version to 1.875f.
1880
1881 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
1882
1883 * NEWS: Version 1.875e.
1884 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
1885
1886 * src/scan-skel.l: Include "complain.h", for "fatal".
1887
1888 * src/relation.h (relation_print, relation_digraph):
1889 Relation sizes are of type relation_node, not size_t (this is
1890 merely a doc fix, since the two types are equivalent).
1891 (relation_transpose): Relation sizes are of type relation_node,
1892 not int.
1893 * src/relation.c: Likewise.
1894 (top, infinity): Now of type relation_node, not int.
1895 (traverse, relation_transpose): Use relation_node, not int.
1896
1897 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
1898 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
1899 (yyparse): Remove unused local introduced in 2004-10-25 patch.
1900
1901 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
1902 specifying whether the test should be skipped. Use it tp
1903 specify that the [%defines %skeleton "lalr1.cc"] tests currently
1904 fail on some hosts, and should be skipped.
1905
1906 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
1907
1908 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
1909 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
1910 unless otherwise specified below.
1911
1912 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
1913 to allocate kernel_base, kernel_items, kernel_size, since
1914 they needn't be initialized to 0.
1915 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
1916 * src/closure.c (new_closure): Likewise, for itemset.
1917 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
1918 * src/lalr.c (set_goto_map): Likewise, for temp_map.
1919 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
1920 (build_relations): Likewise for edge, states1, includes.
1921 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
1922 * src/reader.c (packgram): Likewise, for ritem, rules.
1923 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
1924 * src/relation.c (relation_digraph): Likewise for VERTICES.
1925 (relation_transpose): Likewise for new_R, end_R.
1926 * src/symtab.c (symbols_token_translations_init): Likewise for
1927 token_translations.
1928 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
1929 (token_actions): Likewise for yydefact, actrow, conflrow,
1930 conflict_list.
1931 (save_column): Likewise for froms[symno], tos[symno].
1932 (goto_actions): Likewise for state_count.
1933 (pack_table): Likewise for base, pos, check.
1934 (tables_generate): Likewise for width.
1935
1936 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
1937 for initial core. Just have a separate core, so we needn't worry
1938 about whether kernel_size and kernel_base are initialized.
1939
1940 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
1941 kernel_size, kernel_items): Remove unnecessary initialization.
1942 * src/conflicts.c (conflicts): Likewise.
1943 * src/derives.c (derives): Likewise.
1944 * src/muscle_tablc (muscle_insert): Likewise.
1945 * src/relation.c (relation_digraph): Likewise.
1946 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
1947 conflrow, conflict_table, conflict_list, table, check):
1948 Likewise.
1949
1950 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
1951 This is because all callers pass unsigned int.
1952 * src/closure.h (new_closure): Likewise.
1953
1954 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
1955 (build_relations): Initialize includes[i] in all cases.
1956 * src/reader.c (packgram): Always initialize rules[ruleno].prec
1957 and rules[ruleno].precsym. Initialize members in order.
1958 * src/relation.c (relation_transpose): Always initialize new_R[i]
1959 and end_R[i].
1960 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
1961
1962 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
1963 conflict_list[0] was always 0, but now it isn't initialized.
1964
1965 * src/table.c (table_grow): When conflict_table grew, the grown
1966 area wasn't cleared. Fix this.
1967
1968 * lib/.cvsignore: Add strdup.c, strdup.h.
1969 * m4/.cvsignore: Add strdup.m4.
1970
1971 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
1972
1973 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
1974 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
1975 GOTO_NUMBER_MAXIMUM, since we occasionally compute
1976 ngotos + 1 without checking for overflow.
1977 (build_relations): Use END_NODE, not -1, to denote end of edges.
1978 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
1979 build_relations): Use goto_number, not int, for goto numbers.
1980 * src/tables.c (save_column, default_goto): Likewise.
1981
1982 2004-11-23 Akim Demaille <akim@epita.fr>
1983
1984 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
1985 of #defining from yystype.
1986 Don't typedef yystype, C++ does not need it.
1987 This lets it possible to forward declare it as union.
1988
1989 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
1990
1991 * bootstrap (gnulib_modules): Add extensions.
1992 Problem reported by Jim Meyering.
1993
1994 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
1995
1996 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
1997 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
1998 src/system.h, src/tables.c: XFREE -> free, to accommodate
1999 recent change to gnulib xalloc.h.
2000 Problem reported by Jim Meyering.
2001
2002 2004-11-17 Akim Demaille <akim@epita.fr>
2003
2004 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
2005
2006 2004-10-28 Akim Demaille <akim@epita.fr>,
2007 Alexandre Duret-Lutz <adl@gnu.org>
2008
2009 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
2010 changes.
2011 (YYCDEBUG): Adjust.
2012 Use it instead of cdebug_.
2013 (Parser::debug_stream, Parser::set_debug_stream): New.
2014 (Parser::symprint_): Define cdebug_ for temporary backward
2015 compatibility.
2016 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
2017 debug_stream ().
2018
2019 2004-11-17 Akim Demaille <akim@epita.fr>
2020
2021 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
2022 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
2023 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
2024 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
2025
2026 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
2027
2028 * data/glr.c (yyloc_default): Remove; not used.
2029 Problem reported by Frank Heckenbach.
2030
2031 2004-10-25 Akim Demaille <akim@epita.fr>
2032
2033 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
2034 Introduce another definition to address simple location arrays.
2035 (yyGLRStack): New member: yyerror_range.
2036 (yyrecoverSyntaxError, yyparse): Update it.
2037 (yyrecoverSyntaxError): Use it when shifting the error token to
2038 have an accurate range, equivalent to the one computed by both
2039 yacc.c and lalr1.cc.
2040 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
2041 that column numbers start at column 0, as per GNU Coding
2042 Standards, the others tests, and the doc.
2043 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
2044 Adjust to the above change (first column is 0).
2045 And adjust the location of the "<error>", now covering the whole
2046 line.
2047
2048 2004-10-22 Akim Demaille <akim@epita.fr>
2049 and Paul Eggert <eggert@cs.ucla.edu>
2050
2051 Remove some arbitrary limits on goto numbers and relations.
2052 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
2053 initial values, since they're never used.
2054 (set_goto_map): ngotos is now unsigned, so test for overflow
2055 by seeing whether it wraps around to zero.
2056 * src/lalr.h (goto_number): Now size_t, not short int.
2057 (GOTO_NUMBER_MAXIMUM): Remove.
2058 * src/relation.c (relation_print, traverse, relation_transpose):
2059 Check for END_NODE rather than looking at sign.
2060 * src/relation.h (END_NODE): New macro.
2061 (relation_node): Now size_t, not short int.
2062
2063 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
2064
2065 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
2066 keyword, not an identifier. Problem reported by Baron Schwartz in
2067 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
2068
2069 2004-10-11 Akim Demaille <akim@epita.fr>
2070
2071 * src/symtab.c (symbol_check_alias_consistency): Also check
2072 type names, destructors, and printers.
2073 Reported by Alexandre Duret-Lutz.
2074 Recode the handling of associativity and precedence in terms
2075 of symbol_precedence_set.
2076 Accept no redeclaration at all, not even equal to the previous
2077 value.
2078 (redeclaration): New.
2079 Use it to factor redeclaration complaints.
2080 (symbol_make_alias): Don't set the type of the alias, let
2081 symbol_check_alias_consistency do it as for other features.
2082 * src/symtab.h (symbol): Add new member prec_location, and
2083 type_location.
2084 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
2085 * tests/input.at (Incompatible Aliases): New.
2086
2087 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
2088
2089 .cvsignore fixes to accommodate gnulib changes,
2090 and the practice of naming build directories "_build".
2091 * .cvsignore: Add "_*". Sort.
2092 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
2093 * m4/.cvsignore: Add "*_gl.m4".
2094
2095 2004-10-06 Akim Demaille <akim@epita.fr>
2096
2097 * src/parse-gram.y (add_param): Fix the truncation of trailing
2098 spaces.
2099
2100 2004-10-05 Akim Demaille <akim@epita.fr>
2101
2102 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
2103 whether the reducion was empty or not. This leaves room to
2104 improve the use of YYLLOC_DEFAULT in such a case.
2105 lalr1.cc is still experimental, so changing this is acceptable.
2106 And finally, there are probably not many users who changed the
2107 handling of locations in GLR, so changing is admissible too.
2108
2109 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
2110 empty reduction, set @$ to an empty location ending the previously
2111 stacked symbol.
2112 Adjust uses to make sure the code is triggered on empty
2113 reductions.
2114 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
2115 expected output: empty reductions have empty locations.
2116
2117 2004-09-29 Akim Demaille <akim@epita.fr>
2118
2119 * data/lalr1.cc: Move towards a more standard C++ coding style
2120 for templates: Class < T > -> Class<T>.
2121
2122 2004-09-29 Akim Demaille <akim@epita.fr>
2123
2124 * data/lalr1.cc: Reinstall the former ctor, for sake of
2125 compatibility, but warn it will be removed.
2126 Move towards a more standard C++ coding style (i.e., type *var ->
2127 type* var).
2128
2129 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
2130
2131 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
2132 since it's less likely to work if NULs are involved in the future.
2133
2134 2004-09-27 Akim Demaille <akim@epita.fr>
2135
2136 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
2137
2138 2004-09-27 Akim Demaille <akim@epita.fr>
2139
2140 * data/lalr1.cc (b4_parse_param_decl_1): New.
2141 (b4_parse_param_decl): Use it to have different names between attribute
2142 and argument names.
2143 (b4_cc_constructor_call): Likewise.
2144
2145 2004-09-24 Akim Demaille <akim@epita.fr>
2146
2147 * src/parse-gram.y (add_param): Strip the leading and trailing
2148 blanks from a formal argument declaration.
2149 (YY_LOCATION_PRINT): New.
2150
2151 2004-09-24 Akim Demaille <akim@epita.fr>
2152
2153 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
2154 after the location.
2155
2156 2004-09-24 Akim Demaille <akim@epita.fr>
2157
2158 * doc/bison.texinfo (Table of Symbols): Sort.
2159
2160 2004-09-21 Akim Demaille <akim@epita.fr>
2161
2162 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
2163 the useless parentheses.
2164 Suggested by Paul Eggert.
2165
2166 2004-09-20 Akim Demaille <akim@epita.fr>
2167
2168 Let the initial-action act on the look-ahead, and use it for the
2169 "initial push" (corresponding to an hypothetical beginning-of-file).
2170 And let lalr1.cc honor %initial-action.
2171
2172 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
2173 example.
2174 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
2175 (Parser::Parser): Remove the ctor that used to initialize it.
2176 (Parser::parse): Like in the other skeletons, issue the "starting
2177 parse" message before any action.
2178 Honor %initial-action.
2179 Initialize the stacks with the lookahead.
2180 * data/yacc.c: Let $$ and @$ in %initial-action designate the
2181 look-ahead.
2182 Push them in the stacks.
2183 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
2184
2185 2004-09-20 Akim Demaille <akim@epita.fr>
2186
2187 * doc/bison.texinfo (Initial Action Decl): New.
2188
2189 2004-09-20 Akim Demaille <akim@epita.fr>
2190
2191 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
2192 clearer criterion to define it.
2193 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
2194 When reducing on an empty RHS, use the latest stacked location as
2195 location.
2196 yylloc is not always available.
2197 * data/glr.c: Likewise.
2198 Also, honor initial-actions.
2199
2200 2004-09-20 Akim Demaille <akim@epita.fr>
2201
2202 * data/yacc.c (YY_LOCATION_PRINT): New.
2203 Define when we know YYLTYPE's structure, i.e., when the default
2204 YYLLOC_DEFAULT is used.
2205 * data/c.m4 (b4_yysymprint_generate): Use it.
2206 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
2207 value of the result.
2208 (error_start_): Replace with...
2209 (error_range_): this location array.
2210 This allows to replace code relying on the implementation of
2211 locations by portable code.
2212 * data/yacc.c (yylerrsp): Replace with...
2213 (yyerror_range): this.
2214 Every time a token is popped, update yyerror_range[0], to have an
2215 accurate location for the error token.
2216 * data/glr.c (YY_LOCATION_PRINT): New.
2217 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
2218 deference a pointer.
2219 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
2220 report the location in %printers.
2221
2222 * src/scan-skel.l: Instead of abort, report error messages to ease
2223 understanding skeleton scanning failures.
2224
2225 2004-09-16 Akim Demaille <akim@epita.fr>
2226
2227 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
2228 (iterator, const_iterator): these, to be more in the C++ spirit.
2229 Also, return reverse iterators so that when displaying the stack
2230 we display its bottom first.
2231 (Parser::stack_print_, Parser::reduce_print_): Match the messages
2232 from yacc.c.
2233 We should probably use vector here though.
2234
2235 2004-09-16 Akim Demaille <akim@epita.fr>
2236
2237 Have more complete shift traces.
2238
2239 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
2240 to report Shifts instead of ad hoc YYDPRINTF invocations,
2241 including for the error token.
2242 * data/lalr1.cc (symprint_): Output the location.
2243 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
2244 output the location within the %printer.
2245 Activate GLR tests, at least to make sure they compile properly.
2246 They still don't pass though.
2247 * tests/calc.at: Adjust expect verbose output, since now "Entering
2248 state..." is on a different line than the "Shifting" message.
2249
2250 2004-09-08 Akim Demaille <akim@epita.fr>
2251
2252 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
2253 Bison directive from the Bison file to the invocation of this
2254 macro, so that these directives are passed to
2255 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
2256 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
2257 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
2258 the extra Bison directives instead of the whole series.
2259 Change the grammar so that there are recoverable errors, and
2260 unrecoverable errors. Now we can have the parser give up before
2261 consuming the whole input. As a result we now can observe that
2262 the lookahead is freed when needed.
2263 Change the parser source to parse argv[1] instead of a hard coded
2264 string.
2265 Simplify yylex, and give a value and location to EOF.
2266 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
2267 passed directives already coded in the file.
2268 Add some tests to check the location of "error".
2269 For some tests, the C++ parser is correct, and not yacc.c.
2270 For other tests, they provide different, but unsatisfying, values,
2271 so keep the C++ value so that at least one parser is "correct"
2272 according to the test suite.
2273 (Actions after errors): Remove, this is subsumed by the
2274 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
2275
2276 2004-09-06 Akim Demaille <akim@epita.fr>
2277
2278 * data/lalr1.cc: Adjust the indentation of the labels.
2279 (Parser::pop): New.
2280 Use it.
2281
2282 2004-09-06 Akim Demaille <akim@epita.fr>
2283
2284 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
2285 argument, an informative message.
2286 Call YY_SYMBOL_PRINT.
2287 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
2288 * data/lalr1.cc (destruct_): Likewise.
2289 In addition, no longer depend on b4_yysymprint_generate and
2290 b4_yydestruct_generate to generate these functions, do it "by
2291 hand".
2292
2293 2004-09-03 Akim Demaille <akim@epita.fr>
2294
2295 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
2296 invoked, yydestruct the lookahead.
2297 * tests/calc.at (Calculator $1): Update the expected lengths of
2298 traces: there is an added line for the discarded lookahead.
2299 * doc/bison.texinfo (Destructor Decl): Some rewording.
2300 Define "discarded" symbols.
2301
2302 2004-09-02 Akim Demaille <akim@epita.fr>
2303
2304 * data/lalr1.cc (translate_, destruct_): No reason to be static.
2305
2306 2004-09-02 Akim Demaille <akim@epita.fr>
2307
2308 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
2309 (YYDSYMPRINTF): Rename as...
2310 (YY_SYMBOL_PRINT): this.
2311 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
2312 two.
2313 Use it instead of direct symprint_ calls.
2314 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
2315 one.
2316
2317 2004-09-02 Akim Demaille <akim@epita.fr>
2318
2319 * data/lalr1.cc (b4_yysymprint_generate): New.
2320 (symprint_): New member function, defined when YYDEBUG.
2321 Use it consistently instead of token/nterm debugging output by
2322 hand.
2323 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
2324 %printer calls to use cdebug_ when using lalr1.cc.
2325
2326 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
2327
2328 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
2329 with #ifdef YYDEBUG.
2330
2331 2004-08-26 Akim Demaille <akim@epita.fr>
2332
2333 * doc/bison.texinfo (Implementing Loops): Rename as...
2334 (Implementing Gotos/Loops): this.
2335
2336 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
2337
2338 Adjust to latest gnulib.
2339 * bootstrap (gnulib_modules): Add xalloc-die.
2340 Set LC_ALL=C so that file names sort consistently.
2341 Prefer the gnulib copies of gettext.m4, glibc21.m4,
2342 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
2343 uintmax_t.m4, ulonglong.m4.
2344 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
2345 po.m4 since we are now using _gl.m4 instead.
2346
2347 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
2348
2349 * src/scan-action.l: Remove. Scanning of semantic actions is
2350 handled in scan-gram.l.
2351
2352 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
2353
2354 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
2355
2356 * src/location.h (struct): The file member is a uniqstr.
2357 (equal_boundaries): Use UNIQSTR_EQ for comparison.
2358
2359 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
2360
2361 Fix bug with non-%union parsers that have printers or destructors,
2362 which led to a Bison core dump. Reported by Peter Fales in
2363 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
2364
2365 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
2366 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
2367 not to our own type.
2368 * src/output.c (symbol_destructors_output, symbol_printers_output):
2369 Don't assume %union.
2370 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
2371 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
2372 UNION-FLAG. All callers changed.
2373 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
2374 Use type char, not unsigned int, when declaring an array of char;
2375 this lets us remove a cast.
2376 (Printers and Destructors): Add non-%union test cases.
2377
2378 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
2379
2380 * doc/bison.texinfo: Minor editorial changes, mostly to the new
2381 GLR writeups. E.g., avoid frenchspacing and the future tense,
2382 change "lookahead" to "look-ahead", and change "wrt" to "with
2383 respect to".
2384
2385 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
2386
2387 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
2388 New sections, split off from the GLR Parsers section. Put the new
2389 Simple GLR Parser near the start of the GLR section, for clarity.
2390 Rewrite connective text.
2391
2392 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
2393
2394 * doc/bison.texinfo (Simple GLR Parsers): New section.
2395
2396 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
2397
2398 * NEWS, TODO, doc/bison.texinfo:
2399 Use "look-ahead" instead of "lookahead", to be consistent.
2400 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
2401 while we're fixing "look-ahead".
2402 * src/conflicts.c (shift_set): Renamed from shiftset.
2403 (look_ahead_set): Renamed from lookaheadset.
2404 * src/print.c: Likewise.
2405 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
2406 name for "lookahead".
2407 (report_types, usage): Likewise.
2408 * src/getargs.h (report_look_ahead_tokens): Renamed from
2409 report_lookaheads.
2410 * src/lalr.c (compute_look_ahead_tokens): Renamed from
2411 compute_lookaheads.
2412 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
2413 (look_ahead_tokens_print): Renamed from lookaheads_print.
2414 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
2415 state_rule_lookaheads_print.
2416 * src/state.h: Likewise.
2417 (reductions.look_ahead_tokens): Renamed from lookaheads.
2418 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
2419 AT_DATA_LOOKAHEADS_GRAMMAR.
2420
2421 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
2422
2423 * README: Update location of patched M4 distribution.
2424
2425 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
2426
2427 Don't assume the C++ compiler takes the same arguments as the C compiler
2428 (trivial change).
2429 * configure.ac (O0CXXFLAGS): New var.
2430 * tests/atlocal.in (CXXFLAGS): Use it.
2431
2432 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
2433
2434 Fix some "make check" problems with C++ reported by
2435 Albert Chin-A-Young for Tru64 C++ in this thread:
2436 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
2437
2438 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
2439 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
2440 Output to a .cc file for C++, not to a .c file.
2441 * tests/calc.at (AT_CHECK_CALC): Likewise.
2442 * tests/regression.at (AT_CHECK_DANCER): Likewise.
2443 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
2444
2445 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
2446
2447 * tests/calc.at, tests/actions.at: Workaround for SGI
2448 C++ compiler. (trivial change)
2449
2450 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
2451
2452 Spent a few hours checking out which prerequisite versions the
2453 current sources actually require. I went all the way back to
2454 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
2455 a seemingly endless set of combinations of versions more recent
2456 than that. The bottom line is that the current sources require
2457 fairly recent versions of the build tools, and it'll be some work
2458 to change this.
2459 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
2460 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
2461 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
2462 Add comments explaining why those particular versions are
2463 currently needed.
2464
2465 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
2466 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
2467 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
2468
2469 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
2470 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
2471
2472 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
2473
2474 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
2475 0.11.5. Suggested by Bruno Haible.
2476 * bootstrap: Remove gettext version checking.
2477
2478 * doc/bison.texinfo (Decl Summary): Also mention that %union
2479 can depend on prerequisite types. Problem reported by Tim
2480 Van Holder.
2481
2482 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
2483
2484 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
2485 * README-alpha: Don't tell people not to package this.
2486
2487 * bootstrap: Don't assume $(...) works; use `...` instead.
2488 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
2489 gettext better.
2490
2491 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
2492 put into the -d output file, and mention what to do if YYSTYPE is
2493 defined as a macro.
2494
2495 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
2496
2497 Undo change made earlier today: it caused autopoint to not bring
2498 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
2499 autopoint's.
2500
2501 * bootstrap: Check that gettext version matches what's in
2502 configure.ac. Warn users to ignore robots.txt ERROR 404.
2503 * bootstrap: Undo today's earlier change (logged below).
2504 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
2505
2506 The gettext version checking is causing more trouble than it's
2507 curing; remove it. Problem reported by Paul Hilfinger.
2508
2509 * bootstrap: Issue a warning that one can expect a message
2510 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
2511 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
2512
2513 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
2514
2515 Ensure that the C++ compiler used for testing actually works on a
2516 simple test program; if not, skip the C++-related tests. Problem
2517 reported by Vin Shelton in:
2518 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
2519
2520 * m4/cxx.m4: New file.
2521 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
2522 * tests/atlocal.in (BISON_CXX_WORKS): Add.
2523 * tests/local.at (AT_COMPILE_CXX): Use it.
2524
2525 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
2526
2527 * data/glr.c (yylloc): Output this macro even if locations are not
2528 being generated, as the GLR parser needs it even in that case.
2529 Problem reported by Troy A. Johnson
2530 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
2531
2532 * configure.ac (AC_INIT): Update to 1.875e.
2533
2534 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
2535
2536 * NEWS: Version 1.875d.
2537 * configure.ac (AC_INIT): Likewise.
2538 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
2539
2540 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
2541 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
2542 lalr1.cc runs afoul of the first, and the last two are no longer
2543 supported by GCC 3.4.0.
2544 * README: Mention GNU m4 1.4 or later; mention m4 patches.
2545 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
2546
2547 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
2548
2549 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
2550 unsigned int, for compatibility with latest gnulib hash module.
2551 * src/state.c (state_hash, state_hasher): Likewise.
2552 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
2553 * src/uniqstr.c (hash_uniqstr): Likewise.
2554
2555 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
2556
2557 * NEWS: Unescaped newlines are no longer allowed in char & strings.
2558
2559 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
2560 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
2561 character and string literals.
2562 (unexpected_end): New function.
2563 (unexpected_eof): Use it.
2564 (unexpected_newline): New function.
2565 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
2566 actions.
2567
2568 * NEWS: Document %expect-rr.
2569
2570 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
2571 Fix typo by replacing $1 with $option.
2572 Remove more 'intl'-related files.
2573 Don't DEFUN AM_INTL_SUBDIR twice.
2574
2575 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
2576 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
2577 strtoul.c.
2578 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
2579 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
2580 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
2581 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
2582 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
2583 * src/.cvsignore: Add *.output.
2584
2585 * src/parse-gram.y: Put copyright notice inside %{ %} so it
2586 gets copied to the output file.
2587
2588 2004-04-28 Paul Eggert <eggert@twinsun.com>
2589
2590 Get files from the gnulib and po repositories, instead of relying
2591 on them being in our CVS. Upgrade to latest versions of gnulib
2592 and Automake.
2593
2594 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
2595 * bootstrap: Bootstrap from gnulib and po repositories.
2596 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
2597 * README-cvs: Document these changes. Remove version numbers from
2598 mentions of build tools, since they change so often. Mention Flex.
2599
2600 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
2601 (gl_USE_SYSTEM_EXTENSIONS): Add.
2602 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
2603 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
2604 does this for us.
2605 (AC_ISC_POSIX): Remove; we no longer support this
2606 ancient OS, as it gets in the way of latest Autoconf & gnulib.
2607 (AC_HEADER_STDC): Remove: we now assume C89 or better.
2608 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
2609 Do not check for C89 headers, except for locale.h which is used
2610 by the Yacc library and must port to K&R hosts.
2611 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
2612 Do not check for C89 functions, except for setlocale which is
2613 used by the Yacc library.
2614 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
2615 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
2616 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
2617 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
2618 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
2619 AM_GNU_GETTEXT): Remove; now done by:
2620 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
2621 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
2622 for us.
2623
2624 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
2625 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
2626 Define to empty, as gnulib.mk will do the rest for us.
2627 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
2628 for us.
2629 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
2630 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
2631
2632 * src/files.c: Include gnulib's xstrndup.h.
2633
2634 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
2635 (REALLOC): Use xnrealloc, for likewise.
2636 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
2637 (strnlen, memrchr): Remove decls; functions no longer used.
2638 Include <stpcpy.h>.
2639
2640 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
2641 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
2642 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
2643 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
2644 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
2645 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
2646 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
2647 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
2648 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
2649 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
2650 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
2651 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
2652 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
2653 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
2654 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
2655 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
2656 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
2657 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
2658 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
2659 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
2660 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
2661 Remove, as these files are now generated automatically
2662 by bootstrap or automake.
2663
2664 * po/ChangeLog: Remove: all but one entry was a duplicate
2665 of this file, and I moved that 2000-11-02 entry here.
2666
2667 * config/.cvsignore: Add Makefile, depcomp, install-sh.
2668 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
2669 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
2670 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
2671 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
2672 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
2673 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
2674 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
2675 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
2676 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
2677 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
2678 xstrndup.h.
2679 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
2680 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
2681 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
2682 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
2683 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
2684 * src/.cvsignore: Remove *_.c.
2685
2686
2687 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
2688 support it. (The latest stable gzip doesn't.)
2689
2690 2004-04-27 Paul Eggert <eggert@twinsun.com>
2691
2692 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
2693 case, as stos_ is now used by destructors due to the 2004-02-09
2694 change.
2695
2696 Remove more K&R C support.
2697 * lib/libiberty.y (PARAMS): Remove. All uses removed.
2698 * lib/subpipe.c (errno): Remove decl.
2699 Include <stdlib.h> unconditionally.
2700 (EXIT_FAILURE): Remove macro.
2701 * src/complain.c (vfprintf, strerror): Remove.
2702 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
2703 unconditionally.
2704 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
2705 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
2706 (strchr, strspn, memchr): Remove decls.
2707 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
2708 unconditionally. Do not declare perror.
2709 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
2710 unconditionally.
2711
2712 * src/complain.c (_): Remove useless defn, as system.h defines this.
2713
2714 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
2715 with latest obstack.h.
2716 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
2717 to procedure types, as obstack.h now does that for us.
2718 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
2719
2720 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
2721 so that this include file can stand alone.
2722 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
2723 does this now. Include subpipe.h first after config.h, to
2724 test whether it can stand alone.
2725
2726 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
2727 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
2728 unused declaration.
2729
2730 * tests/synclines.at (%union synch line): Put a dummy member in
2731 the union, because empty unions aren't allowed in C. Caught
2732 by GCC 3.4.0.
2733
2734 2004-04-13 Jim Meyering <jim@meyering.net>
2735
2736 * src/conflicts.c (conflicts_print): Correct format string typo:
2737 use `%%' to produce literal `%'. (trivial change)
2738
2739 2004-03-30 Paul Eggert <eggert@twinsun.com>
2740
2741 * src/getargs.c (version): Update copyright year to 2004.
2742
2743 * data/c.m4 (b4_int_type): Use 'short int' rather than
2744 'short', and similarly for 'long', 'unsigned', etc.
2745 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
2746 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
2747 yy_yypstack, yydumpstack): Likewise.
2748 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
2749 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
2750 Likewise.
2751 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
2752 yy_stack_print, yyparse): Likewise.
2753 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
2754 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
2755 * lib/bitset.c (bitset_print): Likewise.
2756 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
2757 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
2758 * lib/bitsetv.c (bitsetv_dump): Likewise.
2759 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
2760 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
2761 Likewise.
2762 * src/LR0.c (allocate_itemsets): Likewise.
2763 * src/gram.h (rule_number, rule): Likewise.
2764 * src/lalr.h (goto_number): Likewise.
2765 * src/nullable.c (nullable_compute): Likewise.
2766 * src/output.c (prepare_rules): Likewise.
2767 * src/relation.c (relation_print, relation_digraph): Likewise.
2768 * src/relation.h (relation_node): Likewise.
2769 * src/state.h (state_number, transitions, errs, reductions,
2770 struct state): Likewise.
2771 * src/symtab.h (symbol_number, struct symbol): Likewise.
2772 * src/tables.c (vector_number, tally, action_number,
2773 default_goto, goto_actions): Likewise.
2774 * tests/existing.at (GNU Cim Grammar): Likewise.
2775 * tests/regression.at (Web2c Actions): Likewise.
2776
2777 * src/output.c (muscle_insert_short_int_table): Renamed from
2778 muscle_insert_short_table. All uses changed.
2779
2780 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
2781
2782 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
2783 (declaration): Replace expected_conflicts with expected_sr_conflicts.
2784 Add %expect-rr rule.
2785
2786 * src/scan-gram.l: Recognize %expect-rr.
2787
2788 * src/conflicts.h (expected_sr_conflicts): Rename from
2789 expected_conflicts.
2790 (expected_rr_conflicts): Declare.
2791
2792 * src/conflicts.c (expected_sr_conflicts): Rename from
2793 expected_conflicts.
2794 (expected_rr_conflicts): Define.
2795 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
2796 for GLR parsers.
2797 Use expected_sr_conflicts in place of expected_conflicts.
2798 Warn if expected_rr_conflicts used in non-GLR parser.
2799
2800 * doc/bison.texinfo: Add documentation for %expect-rr.
2801
2802 2004-03-08 Paul Eggert <eggert@gnu.org>
2803
2804 Add support for hex token numbers. Suggested by Odd Arild Olsen in
2805 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
2806
2807 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
2808 in lalr1.cc.
2809 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
2810 * src/scan-gram.l (scan_integer): New function.
2811 ({int}): Use it.
2812 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
2813 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
2814 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
2815 Say "long int", not "long", for uniformity with GNU style.
2816
2817 2004-02-25 Paul Eggert <eggert@twinsun.com>
2818
2819 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
2820 compilers. This fixes a problem with Intel's C++ compiler being
2821 chatty, reported by Guido Trentalancia in
2822 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
2823
2824 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
2825
2826 Support %destructor and merge error locations in lalr1.cc.
2827
2828 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
2829 (Parser::stos_): Define unconditionally.
2830 (Parser::destruct_): New method. Generate its body with
2831 b4_yydestruct_generate.
2832 (Parser::error_start_): New attribute.
2833 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
2834 token which are discarded.
2835 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
2836 error_start_ when erroneous token are discarded.
2837 (Parser::parse) <yyerrlab1>: Compute the location of the error
2838 token so that it covers all the discarded tokens.
2839 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
2840 it can be called with `%skeleton "lalr1.cc"', and do that.
2841
2842 2004-02-02 Paul Eggert <eggert@twinsun.com>
2843
2844 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
2845 $(top_srcdir)/lib and ../lib. This fixes a bug reported
2846 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
2847 There's no need to mention top_builddir since Automake does that
2848 for us.
2849 (INCLUDES): Remove, as Automake says it's obsolescent.
2850 Contents migrated into AM_CPPFLAGS as described above.
2851 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
2852
2853 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
2854
2855 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
2856 (yyreportSyntaxError): Handle case where lookahead token is
2857 YYEMPTY.
2858
2859 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2860
2861 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
2862 resulting parsers are compilable with C++.
2863
2864 2003-12-23 Paul Eggert <eggert@twinsun.com>
2865
2866 * config/depcomp, config/install-sh: Sync with Automake 1.8.
2867 * src/output.c (output_skeleton): Rename local var.
2868 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
2869 Bison tokens, as this runs afoul of the 2003-10-07 change that
2870 disallowed NUL bytes in character constants or string literals.
2871
2872 * tests/local.at: Require Autoconf 2.59's Autotest.
2873 * tests/testsuite.at: Don't include local.at, since we now assume
2874 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
2875 including it.
2876 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
2877 multiple inclusion warnings.
2878
2879 2003-12-02 Akim Demaille <akim@epita.fr>
2880
2881 * doc/bison.texinfo (How Can I Reset the Parser): More about start
2882 conditions.
2883 From Bruno Haible.
2884
2885 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
2886
2887 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
2888
2889 2003-10-07 Paul Eggert <eggert@twinsun.com>
2890
2891 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
2892 if testsuite doesn't exist.
2893
2894 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
2895 literals, unfortunately.
2896 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
2897 Complain about NUL bytes in character constants or string literals.
2898
2899 2003-10-05 Paul Eggert <eggert@twinsun.com>
2900
2901 * NEWS: Don't document %no-default-prec, as it's still
2902 too experimental.
2903 * doc/bison.texinfo: Document %no-default-prec only if
2904 the defaultprec flag is set. Normally it's not.
2905
2906 2003-10-04 Paul Eggert <eggert@twinsun.com>
2907
2908 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
2909 non-modifiable lvalue, instead of a modifiable one.
2910 * doc/bison.texinfo (Actions): Document that $$ can
2911 be assigned to. Do not claim that $$ and $N are
2912 array element references: user code should not rely on this.
2913
2914 2003-10-01 Paul Eggert <eggert@twinsun.com>
2915
2916 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
2917 (grammar_declaration): Use it.
2918 * src/scan-gram.l: New token %no-default-prec.
2919 * tests/conflicts.at: Revamp tests to use %no-default-prec.
2920 * NEWS, doc/bison.texinfo: Document the above.
2921
2922 2003-10-01 Akim Demaille <akim@epita.fr>
2923
2924 VCG no longer supports long_straight_phase.
2925
2926 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
2927 * src/print_graph.c (print_graph): Adjust.
2928
2929 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
2930 and Paul Eggert <eggert@twinsun.com>
2931
2932 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
2933 Table of Symbols): Document %default-prec.
2934 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
2935 (grammar_declaration): Set default_prec on %default-prec.
2936 * src/scan-gram.l (%default-prec): New token.
2937 * src/reader.h (default_prec): New flag.
2938 * src/reader.c: Likewise.
2939 (packgram): Handle it.
2940 * tests/conflicts.at (%default-prec without %prec,
2941 %default-prec with %prec, %default-prec 1): New tests.
2942
2943 2003-09-30 Paul Eggert <eggert@twinsun.com>
2944
2945 * tests/testsuite.at: Include local.at, not input.at, fixing
2946 a typo in the 2003-08-25 patch.
2947
2948 2003-08-27 Akim Demaille <akim@epita.fr>
2949
2950 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
2951 GCC warnings.
2952
2953 2003-08-26 Akim Demaille <akim@epita.fr>
2954
2955 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
2956 "<\#" to avoid magic from Gnus when posting parts of this script.
2957
2958 2003-08-26 Akim Demaille <akim@epita.fr>
2959
2960 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
2961 (Parser::parse): here.
2962 Adjust: nerrs and errstatus is now replaced by...
2963 (Parser::nerrs_, Parser::errstatus_): New.
2964
2965 2003-08-25 Akim Demaille <akim@epita.fr>
2966
2967 * config/announce-gen, Makefile.cfg: New.
2968 * Makefile.am: Adjust.
2969 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
2970 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
2971
2972 2003-08-25 Akim Demaille <akim@epita.fr>
2973
2974 When reducing initial empty rules, Bison parser read an initial
2975 location that is not defined. This results in garbage, and that
2976 affects Bison's own parser. Therefore we need (i) to extend Bison
2977 to support a means to initialize this location, and (ii) to use
2978 this CVS Bison to fix CVS Bison's parser.
2979
2980 * src/reader.h, reader.c (epilogue_augment): Remove, replace
2981 with...
2982 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
2983 * src/parse-gram.y: Adjust.
2984 (%initial-action): New.
2985 (%error-verbose): Since we require CVS Bison, there is no reason
2986 not to use it.
2987 * src/scan-gram.l: Adjust.
2988 * src/Makefile.am (YACC): New, to make sure we use our own parser.
2989 * data/yacc.c (yyparse): Use b4_initial_action.
2990
2991 2003-08-25 Akim Demaille <akim@epita.fr>
2992
2993 * doc/bison.texinfo: Don't promote stdout for error messages.
2994
2995 2003-08-25 Akim Demaille <akim@epita.fr>
2996
2997 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
2998 From Alexandre Duret-Lutz.
2999
3000 2003-08-25 Akim Demaille <akim@epita.fr>
3001
3002 Version 1.875c.
3003
3004 2003-08-25 Akim Demaille <akim@epita.fr>
3005
3006 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
3007 Use them.
3008
3009 2003-08-25 Akim Demaille <akim@epita.fr>
3010
3011 * data/lalr1.cc (Parser::reduce_print_): New.
3012 Use it.
3013
3014 2003-08-25 Akim Demaille <akim@epita.fr>
3015
3016 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
3017 error recovery loops. This patch is based on
3018 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
3019 Also, augment the similarity between lalr1.cc and yacc.c.
3020 Note: the locations of error recovery rules are not correct yet.
3021
3022 * data/lalr1.cc: Comment changes to augment the similarity between
3023 lalr1.cc and yacc.c.
3024 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
3025 (yyerrlab1): Remove, but where it used to be (now the bottom part of
3026 yyerrlab), when hitting EOF, pop the whole stack here instead of
3027 merely falling thru the default error handling mechanism.
3028 (yyerrorlab): New label, with the old contents of YYERROR,
3029 plus the following change: pop the stack of rhs corresponding
3030 to the production that invoked YYERROR. That is how Yacc
3031 behaves (required by POSIX).
3032 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
3033 fail.
3034
3035 2003-08-25 Akim Demaille <akim@epita.fr>
3036
3037 Tune local.at so that people can "autom4te -l autotest calc.at -o
3038 calc" for instance, to extract a sub test suite.
3039
3040 * tests/testsuite.at: Move the initialization, Autotest version
3041 requirement, and AT_TESTED invocation into...
3042 * tests/local.at: here.
3043 * tests/testsuite.at: Include it for compatibility with Autoconf
3044 2.57.
3045 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
3046 be ignore.
3047
3048 2003-08-04 Paul Eggert <eggert@twinsun.com>
3049
3050 Rework code slightly to avoid gcc -Wtraditional warnings.
3051 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
3052 The returned value is now stored in *YY0. All callers changed.
3053 * src/output.c (merge_output): Adjust to the above change.
3054
3055 2003-07-26 Paul Eggert <eggert@twinsun.com>
3056
3057 * data/glr.c (YYASSERT): New macro.
3058 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
3059 yyresolveStates, yyprocessOneStack):
3060 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
3061 Derived from a suggestion by Frank Heckenbach.
3062
3063 2003-07-25 Paul Eggert <eggert@twinsun.com>
3064
3065 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
3066 for portability to K&R C (after ansi2knr, presumably). See
3067 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
3068 by Frank Heckenbach, though I have omitted the structure-initialization
3069 part of his glr-knr.diff patch since I recall that the Portable
3070 C Compiler didn't require that change.
3071
3072 Let the user specify how to allocate and free memory.
3073 Derived from a suggestion by Frank Heckenbach in
3074 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
3075 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
3076 All uses of free, malloc, realloc changed to use these macros,
3077 and unnecessary casts removed.
3078 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
3079
3080 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
3081
3082 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
3083 use s.empty() rather than s == "" to test for empty string; see
3084 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
3085 (trivial change)
3086
3087 2003-06-25 Akim Demaille <akim@epita.fr>
3088
3089 * config/depcomp, config/install-sh: Update from masters.
3090
3091 2003-06-20 Paul Eggert <eggert@twinsun.com>
3092
3093 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
3094 and return properly parenthesized result.
3095 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
3096 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
3097 Remove unnecessary parentheses from uses.
3098 * doc/bison.texinfo (Location Default Action): Describe the
3099 conventions for parentheses.
3100
3101 2003-06-19 Paul Eggert <eggert@twinsun.com>
3102
3103 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
3104 yyreportTree): Do not assume that size_t is the same width as int,
3105 when printing sizes. Print sizes using an unsigned format.
3106 Problem reported by Frank Heckenbach in
3107 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
3108
3109 Port to Forte Developer 7 C compiler.
3110 * data/glr.c (struct YYLTYPE): If locations are not being used,
3111 declare a single dummy member, as empty structs do not conform
3112 to the C standard.
3113 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
3114 the Forte Developer 7 C compiler complains that end-of-loop
3115 code is not reached.
3116
3117 2003-06-17 Paul Eggert <eggert@twinsun.com>
3118
3119 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
3120 avoid warnings from picky compilers about redefinition of PARAMS.
3121
3122 2003-06-17 Paul Eggert <eggert@twinsun.com>
3123
3124 Version 1.875b.
3125
3126 * NEWS: Document 1.875b.
3127
3128 * lib/bbitset.h: Do not include config.h; that's the includer's job.
3129 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
3130 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
3131 Don't use 'index' in comments, as it's a builtin fn on some hosts.
3132 * lib/bitset_stats.c: Include gettext.h unconditionally, as
3133 per recent gettext manual's suggestion.
3134 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
3135 Use prototypes, not old-style definitions.
3136 * lib/lbitset.c (lbitset_unused_clear): Likewise.
3137 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
3138 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
3139 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
3140 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
3141 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
3142 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
3143 vbitset_or_and_cmp, vbitset_copy): Likewise.
3144
3145 * lib/libiberty.h: Do not include config.h; that's the includer's job.
3146 Do not include <stdlib.h>.
3147 (PARAMS): Define unconditionally for C89.
3148 (ATTRIBUTE_NORETURN): Remove.
3149 (ATTRIBUTE_UNUSED): Define unconditionally.
3150
3151 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
3152 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
3153 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
3154 * lib/vbitset.c, lib/vbitset.h: New files.
3155 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
3156 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
3157 from libbitset.
3158
3159 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
3160 `How Can I Reset @code{yyparse}', since texinfo does not allow
3161 arbitrary @ in node names.
3162
3163 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
3164 shouldn't be needed according to the gettext 0.12.1 documentation
3165 but which seem to be needed anyway: codeset.m4 glibc21.m4
3166 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
3167 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
3168 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
3169
3170 * lib/.cvsignore: Add stdbool.h.
3171 * m4/.cvsignore: Add nls.m4, po.m4.
3172
3173 Upgrade to CVS gnulib.
3174 * stdbool_.h: File renamed from stdbool.h.in.
3175 * configure.ac (AM_STDBOOL_H): Invoke this instead of
3176 AC_HEADER_STDBOOL.
3177 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
3178 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
3179 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
3180 (MOSTLYCLEANFILES): New var.
3181 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
3182 (stdbool.h): New rule.
3183 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
3184 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
3185 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
3186 m4/quote.m4: Upgrade to today's gnulib.
3187
3188 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
3189 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
3190 the tests right now.
3191 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
3192 yyerror are declared before use; C99 requires this.
3193
3194 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3195
3196 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
3197 first.
3198 (yyrecoverSyntaxError): Correct the logic for setting and testing
3199 yyerrState.
3200 Correct comment on handling EOF.
3201 Allow states with only a default reduction, rather than failing
3202 (I can't quite reconstruct why these were not allowed before).
3203
3204 Fixes to avoid problem that $-N rules in GLR parsers can cause
3205 buffer overruns, corrupting state.
3206
3207 * src/output.c (prepare_rules): Output max_left_semantic_context
3208 definition.
3209 * src/reader.h (max_left_semantic_context): New variable declaration.
3210 * src/scan-gram.l (max_left_semantic_context): Define.
3211 (handle_action_dollar): Update max_left_semantic_context.
3212 * data/glr.c (YYMAXLEFT): New definition.
3213 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
3214 (yyresolveAction): Ditto.
3215
3216 Fixes to problems with location handling in GLR parsers reported by
3217 Frank Heckenbach (2003/06/05).
3218
3219 * data/glr.c (YYLTYPE): Make trivial if locations not used.
3220 (YYRHSLOC): Add parentheses, and define only if locations used.
3221 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
3222 locations not used.
3223 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
3224 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
3225
3226 * tests/cxx-type.at: Exercise location information; update tests
3227 to differentiate output with and without locations.
3228 Remove forward declarations of yylex and yyerror---caused errors
3229 because default YYLTYPE not yet defined.
3230 Change semantic actions to compute strings, rather than printing
3231 them directly (to test proper passing of semantics values). Change
3232 output to prefix notation and update test data and expected results.
3233 (yylex): Track locations.
3234 (stmtMerge): Return value rather than printing, and include arguments
3235 in value.
3236
3237 2003-06-03 Paul Eggert <eggert@twinsun.com>
3238
3239 Avoid warnings generated by GCC 2.95.4 when Bison is
3240 configured with --enable-gcc-warnings.
3241 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
3242 yy::]b4_parser_class_name[::translate_,
3243 yy::Stack::operator[] (unsigned),
3244 yy::Stack::operator[] (unsigned) const,
3245 yy::Slice::operator[] (unsigned),
3246 yy::Slice::operator[] (unsigned) const):
3247 Rename local vars to avoid warnings.
3248 * tests/glr-regression.at (Improper handling of embedded actions
3249 and $-N in GLR parsers): Remove unused local variable from yylex.
3250 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
3251 (void) as arg when not pure, since we now assume C89 when building
3252 Bison. Pacify GCC by using parameter.
3253
3254 2003-06-02 Paul Eggert <eggert@twinsun.com>
3255
3256 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
3257 yy::Location::lines, yy::Location::columns): Rename arguments
3258 to avoid shadowing; this removes a warning generated by GCC 3.3.
3259
3260 2003-06-01 Paul Eggert <eggert@twinsun.com>
3261
3262 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
3263 to g++, as GCC 3.3 complains if you do it.
3264 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
3265 everything that WARNING_CFLAGS has, except omit warnings
3266 not suitable for C++.
3267 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
3268 * tests/atlocal.in (CXXFLAGS): New var.
3269 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
3270
3271 Fix a GLR parser bug I reported in February; see
3272 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
3273 The problem was that GLR parsers did not conform to the C standard,
3274 because actions like { $1 = $2 + $3; } expanded to expressions
3275 that invoked YYFILL in separate subexpressions, and YYFILL assigned
3276 to a local variable. The C standard says that expressions
3277 like (var = f ()) + (var = f ()) have undefined behavior.
3278 Another problem was that GCC sometimes issues warnings that
3279 yyfill and its parameters are unused.
3280
3281 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
3282 as possibly unused.
3283 (yyfill): New function.
3284 (YYFILL): Use it.
3285 (yyuserAction): Change type of yynormal to bool, so that it matches
3286 the new yyfill signature. Mark it as possibly unused.
3287
3288
3289 Follow up on a bug I reported in February, where a Bison-generated
3290 parser can loop. Provide a test case and a fix for yacc.c. I
3291 don't have a fix for lalr1.cc or for glr.c, unfortunately.
3292 The original bug report is in:
3293 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
3294
3295 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
3296 macro's size was becoming unwieldy.
3297 (yyerrlab): Do not discard an empty lookahead symbol, as this
3298 might destroy garbage.
3299 (yyerrorlab): New label, with the old contents of YYERROR,
3300 plus the following change: pop the stack of rhs corresponding
3301 to the production that invoked YYERROR. That is how Yacc
3302 behaves, and POSIX requires this behavior.
3303 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
3304 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
3305 Define 'alarm' to do nothing if unistd.h is not available.
3306 Add a new rule "exp: '-' error;" to test the above change to
3307 data/yacc.c. Use 'alarm' to abort any test taking longer than
3308 10 seconds, as it's probably looping.
3309 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
3310 Also, the new yacc.c generates two fewer diagnostics for an
3311 existing test.
3312
3313 2003-05-24 Paul Eggert <eggert@twinsun.com>
3314
3315 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
3316 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
3317 This fixes a problem reported by John Bowman when the Compaq/HP
3318 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
3319 -ansi -Wall -gall).
3320 * data/yacc.c (union yyalloc): Likewise.
3321 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
3322
3323 Switch from 'int' to 'bool' where that makes sense.
3324
3325 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
3326 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
3327 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
3328 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
3329 Return or accept bool, not int. All callers changed.
3330 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
3331 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
3332 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
3333 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
3334 bitset_or_and_cmp_): Likewise.
3335 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
3336 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
3337 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
3338 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
3339 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
3340 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
3341 bitset_stats_or_and_cmp): Likewise.
3342 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
3343 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
3344 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
3345 ebitset_xor_cmp): Likewise.
3346 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
3347 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
3348 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
3349 lbitset_xor_cmp): Likewise.
3350 * lib/bbitset.h: Include <stdbool.h>.
3351 (struct bitset_vtable): The following members now return bool, not
3352 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
3353 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
3354 or_and_cmp).
3355 * src/conflicts.c (count_rr_conflicts): Likewise.
3356 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
3357 All uses changed.
3358 * lib/ebitset.c (ebitset_obstack_init): Likewise.
3359 * lib/lbitset.c (lbitset_obstack_init): Likewise.
3360 * src/getargs.c (debug_flag, defines_flag, locations_flag,
3361 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
3362 graph_flag): Likewise.
3363 * src/getargs.h (debug_flag, defines_flag, locations_flag,
3364 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
3365 graph_flag): Likewise.
3366 * src/output.c (error_verbose): Likewise.
3367 * src/output.h (error_verbose): Likewise.
3368 * src/reader.c (start_flag, typed): Likewise.
3369 * src/reader.h (typed): Likewise.
3370 * src/getargs.c (LOCATIONS_OPTION): New constant.
3371 (long_options, getargs): Use it.
3372 * src/lalr.c (build_relations): Use bool, not int.
3373 * src/nullable.c (nullable_compute): Likewise.
3374 * src/print.c (print_reductions): Likewise.
3375 * src/tables.c (action_row, pack_vector): Likewise.
3376 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
3377 * src/output.c (prepare): Use it.
3378 * src/output.c (token_definitions_output,
3379 symbol_destructors_output, symbol_destructors_output): Use string,
3380 not boolean integer, to keep track of whether to output separator.
3381 * src/print_graph.c (print_core): Likewise.
3382 * src/state.c (state_rule_lookaheads_print): Likewise.
3383
3384 * config/install-sh: Sync from automake 1.7.5.
3385
3386 2003-05-14 Paul Eggert <eggert@twinsun.com>
3387
3388 * src/parse-gram.y (rules_or_grammar_declaration): Require a
3389 semicolon after a grammar declaration, in the interest of possible
3390 future changes to the Bison input language.
3391 Do not allow a stray semicolon at the start of the grammar.
3392 (rhses.1): Allow one or more semicolons after any rule, including
3393 just before "|" as required by POSIX.
3394 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
3395 grammar.
3396
3397 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
3398
3399 %parse-param support for lalr1.cc.
3400
3401 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
3402 b4_cc_constructor_calls, b4_cc_constructor_call,
3403 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
3404 definitions.
3405 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
3406 parse-param arguments.
3407 (yy::b4_parser_class_name): Declare instance variables to
3408 hold parse-param arguments.
3409 * tests/calc.at: s/value/semantic_value/ because value clashes
3410 with a member of yy::b4_parser_class_name. Adjust C++ code
3411 to handle %parse-param. Enable %parse-param test in C++.
3412
3413 2003-05-12 Paul Eggert <eggert@twinsun.com>
3414
3415 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
3416 English a bit. Fix fclose typo. Change "const char" to "char
3417 const", and use ANSI C rather than K&R for "main". Suggest
3418 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
3419 and suggest yy_switch_to_buffer.
3420
3421 2003-05-05 Paul Eggert <eggert@twinsun.com>
3422
3423 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
3424 C89. This avoids a diagnostic on compilers that define __STDC__
3425 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
3426 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
3427
3428 2003-05-03 Paul Eggert <eggert@twinsun.com>
3429
3430 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
3431 Do not overrun array bounds.
3432 This should fix a bug reported today by Olatunji Oluwabukunmi in
3433 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
3434
3435 2003-04-29 Akim Demaille <akim@epita.fr>
3436
3437 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
3438 * src/getargs.c, src/getargs.h: here, as bool, not int.
3439 (nondeterministic_parser): New.
3440 * src/parse-gram.y, src/scan-gram.l: Support
3441 %nondeterministic-parser.
3442 * src/output.c (prepare): Use nondeterministic_parser instead
3443 of glr_parser where appropriate.
3444 * src/tables.c (conflict_row, action_row, save_row)
3445 (token_actions, token_actions, pack_vector): Ditto.
3446
3447 2003-04-29 Akim Demaille <akim@epita.fr>
3448
3449 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
3450
3451 2003-04-29 Akim Demaille <akim@epita.fr>
3452
3453 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
3454 with %pure-parser and %locations to exercise the patch from Yakov
3455 Markovitch below.
3456
3457 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
3458
3459 * data/yacc.c: (b4_lex_param): Corrected for the case where
3460 %lex-param is provided and %pure-parser isn't.
3461
3462 2003-04-27 Paul Eggert <eggert@twinsun.com>
3463
3464 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
3465 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
3466 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
3467 if it is not defined.
3468 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
3469
3470 2003-04-26 Paul Eggert <eggert@twinsun.com>
3471
3472 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
3473 Declare to be of type suitable for the ninf value itself, not of
3474 type suitable for the corresponding table, since the latter might
3475 be unsigned but the ninf value might be negative. This fixes a
3476 bug reported by Alexandre Duret-Lutz in
3477 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
3478
3479 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
3480 invokes it. We shouldn't invoke it twice because it will attempt
3481 to put error.o in the archive twice. This fixes a glitch reported
3482 by Martin Mokrejs in
3483 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
3484
3485 2003-04-21 Paul Eggert <eggert@twinsun.com>
3486
3487 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
3488 to gnulib.
3489
3490 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
3491
3492 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
3493 Fix obvious typo that results in uncompilable GLR parsers
3494 when both %pure-parser and %locations are used. (trivial change)
3495
3496 2003-04-17 Paul Eggert <eggert@twinsun.com>
3497
3498 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
3499 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
3500 Do not insert the expected token via unput, as this runs afoul
3501 of a POSIX-compatibility bug in flex 2.5.31.
3502 All uses changed to BEGIN the parent state,
3503 since we no longer insert the expected token via unput.
3504 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
3505 that is no longer emitted after the above change.
3506
3507 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
3508 the first one. This change is from Paul Hilfinger, and it fixes
3509 regression reported by Werner Lemberg in
3510 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
3511
3512 (resolve_sr_conflict): Don't invoke state_errs_set
3513 unless one or more tokens have been explicitly made errors.
3514 Otherwise, the above change causes Bison to abort.
3515
3516 * tests/existing.at (GNU pic Grammar): New test case, taken from
3517 Lemberg's email.
3518
3519 2003-03-31 Akim Demaille <akim@epita.fr>
3520
3521 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
3522
3523 2003-03-31 Akim Demaille <akim@epita.fr>
3524
3525 * src/output.c (prepare_symbols): Avoid trailing spaces in the
3526 output.
3527
3528 2003-03-31 Akim Demaille <akim@epita.fr>
3529
3530 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
3531 From Paul Hilfinger.
3532
3533 2003-03-29 Akim Demaille <akim@epita.fr>
3534
3535 * m4/error.m4: Do not put under dynamic conditions some code which
3536 expansion is under static control.
3537
3538 2003-03-29 Akim Demaille <akim@epita.fr>
3539
3540 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
3541
3542 2003-03-29 Akim Demaille <akim@epita.fr>
3543
3544 * doc/bison.texinfo (Strings are Destroyed): New.
3545
3546 2003-03-13 Paul Eggert <eggert@twinsun.com>
3547
3548 * .cvsignore: Add configure.lineno.
3549 * src/.cvsignore: Add yacc.
3550 * tests/.cvsignore: Add testsuite.log.
3551 * doc/fdl.texi: Sync with latest FSF version.
3552
3553 2003-03-12 Paul Eggert <eggert@twinsun.com>
3554
3555 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
3556 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
3557 cursor, instead of leaving it undefined. This fixes a bug
3558 reported by Tim Van Holder in
3559 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
3560 * tests/input.at (Torturing the Scanner): Test the scanner on
3561 an empty input file, which was Tim Van Holder's test case.
3562
3563 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
3564 <sys/resource.h> can be included, include sys/time.h and
3565 sys/times.h first, if available. This works around the SunOS
3566 4.1.4 porting bug reported by Bruce Becker in
3567 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
3568
3569 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
3570 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
3571 AC_HEADER_SYS_WAIT.
3572
3573 Merge changes from gnulib. This was prompted because the CVS
3574 snapshot didn't build on Solaris 7 due to strnlen problems.
3575
3576 These changes need to be merged back into gnulib:
3577 * lib/hash.c: Include <stdbool.h> unconditionally.
3578 * m4/onceonly.m4 (m4_quote): New macro.
3579 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
3580 Quote AC_FOREACH variable-expansions properly.
3581 The 2003-01-03 obstack.h change also needs merging.
3582 {end of changes requiring merging}
3583
3584 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
3585 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
3586 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
3587 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
3588 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
3589 New files, imported from gnulib.
3590 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
3591 above.
3592
3593 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
3594 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
3595 gnulib sources.
3596
3597 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
3598 Add.
3599 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
3600 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
3601 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
3602 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
3603 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
3604 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
3605 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
3606 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
3607 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
3608 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
3609 (jm_PREREQ_ARGMATCH): Remove.
3610 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
3611 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
3612
3613 * src/system.h: Include <stdbool.h> unconditionally.
3614
3615 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
3616 assuming at least C89 in the bitset code for some time now.
3617
3618 2003-03-03 Akim Demaille <akim@epita.fr>
3619
3620 * ro.po: New.
3621
3622 2003-03-02 Akim Demaille <akim@epita.fr>
3623
3624 * doc/bison.texinfo (Table of Symbols): Reactivate the
3625 documentation for %lex-param, and %parse-param.
3626
3627 2003-03-02 Akim Demaille <akim@epita.fr>
3628
3629 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
3630 generate verbose error messages.
3631 Use the number of tokens as an upper bound in yytname, as it
3632 cannot be a non terminal.
3633
3634 2003-03-02 Akim Demaille <akim@epita.fr>
3635
3636 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
3637 message.
3638
3639 2003-03-02 Akim Demaille <akim@epita.fr>
3640
3641 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
3642 Use them to exercise yycheck overrun.
3643 Based on Andrew Suffield's grammar.
3644
3645 2003-03-02 Akim Demaille <akim@epita.fr>
3646
3647 Create tests/local.at for Bison generic testing macros.
3648
3649 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
3650 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
3651 This new file.
3652 * tests/calc.at (AT_CHECK_CALC): Adjust.
3653 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
3654 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
3655 * tests/local.at: here.
3656 (AT_COMPILE_CXX): Tags the tests using it as c++.
3657 Ignore the test if CXX is not functional.
3658
3659 2003-03-01 Paul Eggert <eggert@twinsun.com>
3660
3661 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
3662 not loc->end, since loc->end might contain garbage and this leads
3663 to undefined behavior on some platforms.
3664 (id_loc, token_start): Use (IF_LINTed) initial values that do not
3665 depend on *loc, so that the reader doesn't give the the false
3666 impression that *loc is initialized.
3667 (<INITIAL>"%%"): Do not bother setting code_start, since its value
3668 does not survive the return.
3669
3670 2003-03-01 Akim Demaille <akim@epita.fr>
3671
3672 * src/scan-gram.l (code_start): Always initialize it when entering
3673 into yylex, as SC_EPILOGUE is activated *before* the corresponding
3674 yylex invocation. An alternative would be making it static, but
3675 then it starts with the second %%'s beginning, instead of its end.
3676
3677 2003-02-28 Paul Eggert <eggert@twinsun.com>
3678
3679 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
3680 around a UnixWare 7.1.1 porting bug reported by John Hughes in
3681 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
3682
3683 2003-02-26 Paul Eggert <eggert@twinsun.com>
3684
3685 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
3686 Remove Sequent/Pyramid discussion (nobody uses them any more).
3687 Merge VMS and MS-DOS discussion; these ports may well be dead
3688 but let's keep mentioning them for now. Put <> around email
3689 addresses. Add copyright notice.
3690
3691 2003-02-24 Paul Eggert <eggert@twinsun.com>
3692
3693 * data/glr.c (yy_reduce_print): yylineno -> yylno,
3694 to avoid collision with flex use of yylineno.
3695 Problem reported by Bruce Lilly in
3696 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
3697 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
3698 * data/yacc.c (yy_reduce_print): Likewise.
3699
3700 * config/depcomp: Sync with Automake 1.7.3.
3701
3702 2003-02-21 Akim Demaille <akim@epita.fr>
3703
3704 * data/lalr1.cc: Use temporary variables instead of casts to
3705 change integer types.
3706 Suggested by Paul Eggert.
3707
3708 2003-02-21 Akim Demaille <akim@epita.fr>
3709
3710 * doc/bison.texinfo: Use "location" consistently to refer to @n,
3711 to avoid confusions with lalr1.cc's notion of Position.
3712 Suggested by Paul Eggert.
3713
3714 2003-02-20 Akim Demaille <akim@epita.fr>
3715
3716 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
3717 before initial_columns.
3718 (location.hh): Use consistent variable names when defining the
3719 operator<<.
3720 Use "last" so that we subtract from Positions, not from unsigned.
3721
3722 2003-02-20 Akim Demaille <akim@epita.fr>
3723
3724 * data/lalr1.cc (position.hh): New subfile, including the extended
3725 and Doxygen'ed documentation of class Position.
3726 (location.hh): Use it.
3727 Document a` la Doxygen.
3728 With the help of Benoit Perrot.
3729
3730 2003-02-20 Akim Demaille <akim@epita.fr>
3731
3732 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
3733 AT_YACC_IF.
3734 Redefine AT_YYERROR_SEES_LOC_IF using it.
3735 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
3736 not defined.
3737 Don't use the location in yy::Parser::error_ and
3738 yy::Parser::print_ when not %locations.
3739 Activate more lalr1.cc tests.
3740
3741 2003-02-19 Akim Demaille <akim@epita.fr>
3742
3743 * data/lalr1.cc: When displaying a line number, be sure to make it
3744 an int.
3745
3746 2003-02-19 Akim Demaille <akim@epita.fr>
3747
3748 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
3749 Remove, useless.
3750 (YYABORT, YYACCEPT, YYERROR): New.
3751 * tests/calc.at: Renable the lalr1.cc test.
3752
3753 2003-02-19 Akim Demaille <akim@epita.fr>
3754
3755 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
3756 error recovery, mixing with/without pops and discarding of the
3757 lookahead.
3758 Exercise YYERROR.
3759 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
3760
3761 2003-02-17 Paul Eggert <eggert@twinsun.com>
3762
3763 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
3764 * tests/testsuite.at (AT_COMPILE): Use them.
3765 This fixes the testsuite problem reported by Robert Lentz in
3766 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
3767
3768 2003-02-12 Paul Eggert <eggert@twinsun.com>
3769
3770 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
3771 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
3772 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
3773 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
3774 Check for malloc failure, for consistency with yacc.c.
3775 (yytname_size): Remove, for consistency with yacc.c.
3776
3777 The bug still remains in data/lalr1.cc, as I didn't have time
3778 to fix it there.
3779
3780 2003-02-06 Akim Demaille <akim@epita.fr>
3781
3782 * configure.ac (GXX): Rename as...
3783 (CXX): this, to keep the original Autoconf semantics.
3784 Require 2.57.
3785 * data/lalr1.cc: Fix b4_copyright invocations.
3786 If YYDEBUG is not defined, don't depend upon name_ being defined.
3787 (location.hh): Include string and iostream.
3788 (Position::filename): New member.
3789 (Position::Position ()): New.
3790 (operator<< (Position)): New.
3791 (operator- (Position, int)): New.
3792 (Location::first, Location::last): Rename as...
3793 (Location::begin, Location::end): these, to mock the conventional
3794 iterator names.
3795 (operator<< (Location)): New.
3796 * tests/atlocal.in (CXX): New.
3797 * tests/testsuite.at (AT_COMPILE_CXX): New.
3798 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
3799 locations in a more synthetic way.
3800 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
3801 lalr1.cc is used.
3802 Adjust the C locations to match those from Emacs: first column is
3803 column 0.
3804 Change all the expected results.
3805 Conform to the GCS: simplify the locations when applicable.
3806 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
3807 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
3808 these CPP macros with the m4 macros new defined by...
3809 (AT_CHECK_PUSHDEFS): this, i.e.:
3810 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
3811 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
3812 New macros.
3813 (AT_CHECK_POPDEFS): Undefine them.
3814 (AT_CHECK_CALC_LALR1_CC): New.
3815 Use it for the first lalr1.cc test.
3816
3817 2003-02-04 Akim Demaille <akim@epita.fr>
3818
3819 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
3820 Location as is defined.
3821
3822 2003-02-04 Akim Demaille <akim@epita.fr>
3823
3824 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
3825 name_ being defined.
3826
3827 2003-02-03 Paul Eggert <eggert@twinsun.com>
3828
3829 * src/gram.h (start_symbol): Remove unused decl.
3830
3831 Use more-consistent naming conventions for local vars.
3832
3833 * src/derives.c (derives_compute): Change type of local var from
3834 int to rule_number.
3835 * src/gram.c (grammar_rules_partial_print): Likewise.
3836 * src/print.c (print_core): Likewise.
3837 * src/reduce.c (reduce_grammar_tables): Likewise.
3838
3839 * src/gram.c (grammar_dump): Change name of item_number *
3840 local var from r to rp.
3841 * src/nullable.c (nullable_compute): Likewise.
3842
3843 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
3844
3845 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
3846 for symbol or symbol_number var.
3847 * src/reader.c (grammar_start_symbol_set): Likewise.
3848 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
3849 Likewise.
3850 * src/state.c (transitions_to): Likewise.
3851 * src/state.h: Likewise.
3852 * src/tables.c (symbol_number_to_vector_number): Likewise.
3853
3854 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
3855 char * var.
3856
3857 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
3858 var.
3859
3860 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
3861 var.
3862
3863 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
3864 Use str, not s, for char * var. Use ch, not c, for character var.
3865 Use size for size var.
3866
3867 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
3868 char * var.
3869 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
3870 uniqstr var.
3871 * src/uniqstr.h: Likewise.
3872
3873 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
3874 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
3875 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
3876 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
3877 param to have same name as that of enum, so that we don't use
3878 "s" to stand for a non-state.
3879
3880 2003-02-02 Akim Demaille <akim@epita.fr>
3881
3882 * src/scan-skel.l: Scan more than one inert character per yylex
3883 invocation.
3884
3885 2003-02-01 Paul Eggert <eggert@twinsun.com>
3886
3887 Version 1.875a.
3888
3889 * po/LINGUAS: Add ms.
3890
3891 2003-01-30 Akim Demaille <akim@epita.fr>
3892
3893 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
3894
3895 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3896
3897 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
3898 of $1.
3899
3900 Changes in response to error report by S. Eken: GLR mode does not
3901 handle negative $ indices or $ indices in embedded rules correctly.
3902 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
3903
3904 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
3905 (b4_rhs_location): Ditto.
3906 (yyfill): New function to copy from stack tree into array
3907 incrementally.
3908 (yyuserAction): Modify to allow incremental move of semantic values
3909 to rhs array when in GLR mode.
3910 Define YYFILL to use in user-defined actions to fill semantic array
3911 as needed.
3912 Remove dummy use of yystack, as there is now a guaranteed use.
3913 (yydoAction): Modify to allow incremental move of semantic values
3914 to rhs array when in GLR mode.
3915 (yyresolveAction): Ditto.
3916 (yyglrShiftDefer): Update comment.
3917 (yyresolveStates): Use X == NULL for pointers, not !X.
3918 (yyglrReduce): Ditto.
3919 (yydoAction): Ditto
3920
3921 * tests/glr-regr1.at: Rename to ...
3922 * tests/glr-regression.at: Add new regression test for the problems
3923 described above (adapted from S. Eken).
3924 Update copyright notice.
3925 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
3926 * tests/Makefile.am: Ditto.
3927
3928 2003-01-28 Paul Eggert <eggert@twinsun.com>
3929
3930 * data/lalr1.cc: Do not use @output_header_name@ unless
3931 b4_defines_flag is set. This fixes two bugs reported by
3932 Tim Van Holder in
3933 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
3934 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
3935
3936 2003-01-21 Paul Eggert <eggert@twinsun.com>
3937
3938 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
3939 we don't need to worry about yyerrlab1 being reported as an
3940 "unused label" by non-GCC C compilers. The downside is that if
3941 locations are used then a couple of statements are duplicated each
3942 time YYERROR is invoked, but the upside is that the warnings
3943 should vanish.
3944 (yyerrlab1): Move code to YERROR.
3945 (yyerrlab2): Remove. Change uses back to yyerrlab1.
3946 This reverts some of the 2002-12-27 change.
3947
3948 2003-01-17 Paul Eggert <eggert@twinsun.com>
3949
3950 * src/output.c (symbol_printers_output): Fix typo that led
3951 to core dump. Problem reported by Antonio Rus in
3952 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
3953
3954 2003-01-13 Akim Demaille <akim@epita.fr>,
3955 Quoc Peyrot <chojin@lrde.epita.fr>,
3956 Robert Anisko <anisko_r@lrde.epita.fr>
3957
3958 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
3959 when the stacks contain one element, as the loop would otherwise
3960 free the last state, and then use the top state (the one we just
3961 popped). This means that the initial elements will not be freed
3962 explicitly, as is the case in yacc.c; it is not a problem, as
3963 these elements have fake values.
3964
3965 2003-01-11 Paul Eggert <eggert@twinsun.com>
3966
3967 * NEWS: %expect-violations are now just warnings, reverting
3968 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
3969 bootstrapping problem reported by Matthias Klose; see
3970 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
3971 * src/conflicts.c (conflicts_print): Likewise.
3972 * tests/conflicts.at (%expect not enough, %expect too much,
3973 %expect with reduce conflicts): Likewise.
3974 * doc/bison.texinfo (Expect Decl): Document this. Also mention
3975 that the warning is enabled if the number of conflicts changes
3976 (not necessarily increases).
3977
3978 * src/getargs.c (version): Update copyright year.
3979
3980 2003-01-09 Akim Demaille <akim@epita.fr>
3981
3982 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
3983
3984 2003-01-08 Paul Eggert <eggert@twinsun.com>
3985
3986 * Makefile.maint (WGETFLAGS):
3987 New macro, containing "-C off" to disable proxy caches.
3988 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
3989 (rel-check): Use $(WGET) instead of wget.
3990
3991 2003-01-06 Paul Eggert <eggert@twinsun.com>
3992
3993 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
3994 the GLR paper of Scott, Johnstone and Hussain.
3995
3996 2003-01-04 Paul Eggert <eggert@twinsun.com>
3997
3998 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
3999 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
4000 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
4001 (EXTRA_LIBRARIES): New var, for liby.a.
4002 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
4003 (EXTRA_SCRIPTS): New var, for yacc.
4004
4005 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
4006 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
4007 Problem reported by Nelson H. F. Beebe.
4008
4009 2003-01-03 Paul Eggert <eggert@twinsun.com>
4010
4011 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
4012 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
4013 when compiling Bison 1.875's `bitset bset = obstack_alloc
4014 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
4015
4016 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
4017 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
4018 grow to a huge size with typical invocation.
4019
4020 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
4021 Use the pattern recommended by Autoconf 2.57, except also protect
4022 against double-definition.
4023 * src/system.h: Likewise.
4024 Portability issues reported by Nelson H. F. Beebe.
4025
4026 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
4027 All uses changed. Provide a definition in both C and C++.
4028 (yytrue, yyfalse): Define even if defined (__cplusplus).
4029
4030 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
4031 Reported by Nelson H. F. Beebe.
4032
4033 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
4034
4035 2003-01-02 Paul Eggert <eggert@twinsun.com>
4036
4037 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
4038 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
4039 Bug reported by Nelson H. F. Beebe.
4040
4041 2003-01-01 Paul Eggert <eggert@twinsun.com>
4042
4043 * Version 1.875.
4044
4045 2002-12-30 Paul Eggert <eggert@twinsun.com>
4046
4047 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
4048 Moved here from...
4049 (<INITIAL>","): Here. This causes stray "," to be treated
4050 more uniformly.
4051
4052 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
4053 last brace in braced code when not in Yacc mode, for compatibility
4054 with Bison 1.35. This resurrects the 2001-12-15 patch to
4055 src/reader.c.
4056
4057 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
4058 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
4059
4060 2002-12-28 Paul Eggert <eggert@twinsun.com>
4061
4062 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
4063 that of SYM's type. This fixes Debian bug 168069, reported by
4064 Thomas Olsson.
4065
4066 2002-12-28 Paul Eggert <eggert@twinsun.com>
4067
4068 Version 1.75f.
4069
4070 Switch back to the Yacc style of conflict reports, undoing some
4071 of the 2002-07-30 change.
4072 * doc/bison.texinfo (Understanding): Use Yacc style for
4073 conflict reports. Also, use new way of locating rules.
4074 * src/conflicts.c (conflict_report):
4075 Renamed from conflict_report_yacc, removing the old
4076 'conflict_report'. Translate the entire conflict report at once,
4077 so that we don't assume that "," has the same interpretation in
4078 all languages.
4079 (conflicts_output): Use Yacc-style conflict report for each state,
4080 instead of our more-complicated style.
4081 (conflicts_print): Use Yacc-style conflict report, except print
4082 the input file name when not emulating Yacc.
4083 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
4084 Conflicted Reduction, %expect not enough, %expect too much,
4085 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
4086 * tests/existing.at (GNU Cim Grammar): Likewise.
4087 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
4088
4089 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
4090 fatal): Don't invoke fflush; it's not needed and it might even be
4091 harmful for stdout, as stdout might not be open.
4092 * src/reduce.c (reduce_print): Likewise.
4093
4094 2002-12-27 Paul Eggert <eggert@twinsun.com>
4095
4096 Fix a bug where error locations were not being recorded correctly.
4097 This problem was originally reported by Paul Hilfinger in
4098 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
4099
4100 * data/yacc.c (yyparse): New local var yylerrsp, to record the
4101 top of the location stack's error locations.
4102 (yyerrlab): Set it. When discarding a token, push its location
4103 onto yylerrsp so that we don't lose track of the error's end.
4104 (yyerrlab1): Now is only the target of YYERROR, so that we can
4105 properly record the location of the action that failed. For GCC
4106 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
4107 GCC warning about yyerrlab1 being unused if YYERROR is unused.
4108 (yyerrlab2): New label, which yyerrlab now falls through to.
4109 Compute the error's location by applying YYLLOC_DEFAULT to
4110 the locations of all the symbols that went into the error.
4111 * doc/bison.texinfo (Location Default Action): Mention that
4112 YYLLOC_DEFAULT is also invoked for syntax errors.
4113 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
4114 Error locations include the locations of all the tokens that were
4115 discarded, not just the last token.
4116
4117 2002-12-26 Paul Eggert <eggert@twinsun.com>
4118
4119 * src/files.c: Include quote.h.
4120 (compute_output_file_names): Warn if we detect conflicting
4121 outputs to the same file. This should catch the misunderstanding
4122 exemplified by Debian Bug 165349, reported by Bruce Stephens..
4123
4124 * src/conflicts.c (conflicts_print): If the user specifies
4125 "%expect N", report an error if there are any reduce/reduce
4126 conflicts. This is what the manual says should happen.
4127 This fixes Debian bug 130890, reported by Anthony DeRobertis.
4128 * tests/conflicts.at (%expect with reduce conflicts): New test.
4129
4130 Don't use m4_include on relative file names, as it doesn't work as
4131 desired if there happens to be a file with that name under ".".
4132
4133 * m4sugar/version.m4: Remove; it was included but it wasn't used.
4134 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
4135 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
4136 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
4137 * src/output.c (output_skeleton): Use full path names when
4138 specifying a file to include; don't rely on include path, as
4139 it's unreliable when the working file contains a file with
4140 that name.
4141
4142 2002-12-25 Paul Eggert <eggert@twinsun.com>
4143
4144 Remove obsolete references to bison.simple and bison.hairy.
4145 Problem mentioned by Aubin Mahe in
4146 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
4147 * data/glr.c: Comment fix.
4148 * doc/bison.1: Remove references. Also, mention "yacc".
4149
4150 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
4151 with -g option.
4152
4153 * src/parse-gram.y (declaration): Use enum "report_states" rather
4154 than its numeric value 1.
4155
4156 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
4157 opening a new one. This fixes Debian bug 165349, reported by
4158 Bruce Stephens.
4159
4160 2002-12-24 Paul Eggert <eggert@twinsun.com>
4161
4162 Version 1.75e.
4163
4164 * Makefile.maint (cvs-update): Don't assume that the shell
4165 supports $(...), as Solaris sh doesn't.
4166
4167 * src/parse-gram.y (lloc_default): Remove test for empty
4168 nonterminals at the end, since it didn't change the result.
4169
4170 2002-12-24 Paul Eggert <eggert@twinsun.com>
4171
4172 If the user does not define YYSTYPE as a macro, Bison now declares it
4173 using typedef instead of defining it as a macro. POSIX requires this.
4174 For consistency, YYLTYPE is also declared instead of defined.
4175
4176 %union directives can now have a tag before the `{', e.g., the
4177 directive `%union foo {...}' now generates the C code
4178 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
4179 The default union tag is `YYSTYPE', for compatibility with Solaris 9
4180 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
4181 instead of `yyltype'.
4182
4183 `yystype' and `yyltype' are now obsolescent macros instead of being
4184 typedefs or tags; they are no longer documented and will be
4185 withdrawn in a future release.
4186
4187 * data/glr.c (b4_location_type): Remove.
4188 (YYSTYPE): Renamed from yystype.
4189 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
4190 (struct YYLTYPE): Renamed from struct yyltype.
4191 (YYLTYPE): Renamed from yyltype.
4192 (yyltype, yystype): New (and obsolescent) macros,
4193 for backward compatibility.
4194 * data/yacc.c: Likewise.
4195
4196 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
4197 does not specify a union tag. This is for compatibility with
4198 Solaris 9 yacc.
4199
4200 * src/parse-gram.y (add_param): 2nd arg is now char * not char
4201 const *, since it is now modified by stripping surrounding { }.
4202 (current_braced_code): Remove.
4203 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
4204 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
4205 trailing " {...}". Now of type <chars>.
4206 (grammar_declaration): Adjust to bundled tokens.
4207 (code_content): Remove; stripping is now done by add_param.
4208 (print_token_value): Print contents of bundled tokens.
4209 (token_name): New function.
4210
4211 * src/reader.h (braced_code, current_braced_code): Remove.
4212 (token_name): New decl.
4213
4214 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
4215 token_type, not braced_code code_kind. All uses changed.
4216 (SC_PRE_CODE): New state, for scanning after a keyword that
4217 has (or usually has) an immediately-following braced code.
4218 (token_type): New local var, to keep track of which token type
4219 to return when scanning braced code.
4220 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
4221 <INITIAL>"%parse-param", <INITIAL>"%printer",
4222 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
4223 instead of returning a token type immediately.
4224 (<INITIAL>"{"): Set token type.
4225 (<SC_BRACED_CODE>"}"): Use it.
4226 (handle_action_dollar, handle_action_at): Now returns bool
4227 indicating success. Fail if ! current_rule; this prevents a core dump.
4228 (handle_symbol_code_dollar, handle_symbol_code_at):
4229 Remove; merge body into caller.
4230 (handle_dollar, handle_at): Complain in invalid contexts.
4231
4232 * NEWS, doc/bison.texinfo: Document the above.
4233 * NEWS: Fix years and program names in copyright notice.
4234
4235 2002-12-17 Paul Eggert <eggert@twinsun.com>
4236
4237 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
4238 Reporting, Table of Symbols): Omit mentions of %lex-param and
4239 %parse-param from the documentation for now.
4240
4241 2002-12-15 Paul Eggert <eggert@twinsun.com>
4242
4243 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
4244 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
4245 lookahead symbol, and which sets yychar in parser actions) and it
4246 disagreed with the Bison documentation. Bug
4247 reported by Andrew Walrond.
4248
4249 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
4250 as the caller now does that.
4251 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
4252 (YYEMPTY): Parenthesize right hand side, since others use it.
4253 (yyparse): Don't assume that our generated code is the only code
4254 that sets yychar.
4255
4256 2002-12-13 Paul Eggert <eggert@twinsun.com>
4257
4258 Version 1.75d.
4259
4260 POSIX requires a "yacc" command.
4261 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
4262 (MOSTLYCLEANFILES): Add yacc.
4263 (yacc): New rule.
4264 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
4265 as an alias for bison y.
4266
4267 * po/LINGUAS: Add da.
4268
4269 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
4270 problem with latest <getopt.h>.
4271 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
4272
4273 * doc/fdl.texi: Upgrade to 1.2.
4274 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
4275 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
4276 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
4277 gnulib.
4278 * config/install-sh: Sync with autotools.
4279
4280 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
4281 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
4282 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
4283 locations are requested.
4284 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
4285 locations are requested.
4286
4287 2002-12-12 Paul Eggert <eggert@twinsun.com>
4288
4289 Remove unportable casts and storage allocation tricks.
4290 While we're at it, remove almost all casts, since they
4291 usually aren't needed and are a sign of trouble.
4292
4293 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
4294
4295 * src/derives.c (derives_compute): Do not subtract NTOKENS from
4296 the pointer DSET returned by malloc; this isn't portable.
4297 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
4298 Similarly for DERIVES.
4299 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
4300 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
4301 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
4302
4303 * src/derives.c (derives_compute): Do not bother invoking
4304 int_of_rule_number, since rule numbers are integers.
4305
4306 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
4307 rather than XMALLOC (char, N).
4308
4309 * src/files.c (filename_split): Rewrite to avoid cast.
4310
4311 * src/gram.h (symbol_number_as_item_number,
4312 item_number_as_symbol_number, rule_number_as_item_number,
4313 item_number_as_rule_number):
4314 Now inline functions rather than macros, to avoid casts.
4315 * src/state.h (state_number_as_int): Likewise.
4316 * src/tables.c (state_number_to_vector_number,
4317 symbol_number_to_vector_number): Likewise.
4318
4319 * src/gram.h (int_of_rule_number): Remove; no longer used.
4320
4321 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
4322 since the resulting storage is always stored into.
4323
4324 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
4325 where it's needed.
4326
4327 * src/muscle_tab.c (muscle_m4_output):
4328 Now inline. Return bool, not int.
4329 * src/state.c (state_compare): Likewise.
4330 * src/symtab.c (symbol_check_defined,
4331 symbol_check_alias_consistency, symbol_pack, symbol_translation,
4332 hash_compare_symbol, hash_symbol):
4333 Likewise.
4334 * src/uniqstr.c (uniqstr_print): Likewise.
4335 * src/muscle_tab.c (muscle_m4_output_processor):
4336 New function, to avoid casts.
4337 * src/state.c (state_comparator, stage_hasher): Likewise.
4338 * src/symtab.c (symbol_check_defined_processor,
4339 symbol_check_alias_consistency_processor, symbol_pack_processor,
4340 symbol_translation_processor, hash_symbol_comparator,
4341 hash_symbol_hasher): Likewise.
4342 * src/uniqstr.c (uniqstr_print_processor): Likewise.
4343 * src/muscle_tab.c (muscles_m4_output):
4344 Use new functions instead of casting old functions unportably.
4345 * src/state.c (state_hash_new): Likewise.
4346 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
4347 symbols_token_translations_init):
4348 Likewise.
4349 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
4350
4351 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
4352 var instead of casting to long, to avoid casts.
4353 (prepare_states): Use MALLOC rather than alloca, so that we don't
4354 have to worry about alloca.
4355 * src/state.c (state_hash_lookup): Likewise.
4356
4357 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
4358 local var instead of casting to unsigned char, to avoid casts.
4359
4360 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
4361 STATE_ALLOC): Remove.
4362 (transitions_new, errs_new, reductions_new, state_new): Use malloc
4363 rather than calloc, and use offsetof to avoid allocating slightly
4364 too much storage.
4365 (state_new): Initialize all members.
4366
4367 * src/state.c (state_hash): Use unsigned accumulator, not signed.
4368
4369 * src/symtab.c (symbol_free): Remove; unused.
4370 (symbol_get): Remove cast in lhs of assignment.
4371 (symbols_do): Now static. Accept generic arguments, not
4372 hashing-related ones.
4373
4374 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
4375 (symbol_processor): Remove.
4376 (symbols_do): Remove decl; now static.
4377
4378 * src/system.h (alloca): Remove; decl no longer needed.
4379 (<stddef.h>): Include, for offsetof.
4380 (<inttypes.>, <stdint.h>): Include if available.
4381 (uintptr_t): New type, if system lacks it.
4382 (CALLOC, MALLOC, REALLOC): New macros.
4383 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
4384 new macros.
4385
4386 * src/tables.c (table_size): Now int, to pacify GCC.
4387 (table_grow, table_ninf_remap): Use signed table size.
4388 (save_row): Don't bother initializing locals when not needed.
4389 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
4390 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
4391
4392 * src/vcg.h: Correct misspellings.
4393
4394 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
4395
4396
4397 * src/getargs.c (getargs): Don't assume EOF == -1.
4398
4399 2002-12-09 Paul Eggert <eggert@twinsun.com>
4400
4401 Change identifier spellings to avoid collisions with names
4402 that are reserved by POSIX.
4403
4404 Don't use names ending in _t, since POSIX reserves them.
4405 For consistency, remove _e and _s endings -- they're weren't
4406 needed to remove ambiguity. All uses changed.
4407 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
4408 turn was just renamed from struniq_t.
4409 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
4410 which in turn was just renamed from struniq_processor_t.
4411 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
4412 in turn was renamed from hash_compare_struniq_t.
4413 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
4414 (state_list): Renamed from state_list_t.
4415 * src/assoc.h (assoc): Renamed from assoc_t.
4416 * src/conflicts.c (enum conflict_resolution): Renamed from
4417 enum conflict_resolution_e.
4418 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
4419 (rule_list): Renamed from rule_list_t.
4420 * src/getargs.h (enum trace): Renamed from enum trace_e.
4421 (enum report): Renamed from enum report_e.
4422 * src/gram.h (item_number): Renamed from item_number_t.
4423 (rule_number): Renamed from rule_number_t.
4424 (struct rule_s): Remove the "rule_s" part; not used.
4425 (rule): Renamed from rule_t.
4426 (rule_filter): Renamed from rule_filter_t.
4427 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
4428 (goto_list): Renamed from goto_list_t.
4429 * src/lalr.h (goto_number): Renamed from goto_number_t.
4430 * src/location.h (location): Renamed from location_t.
4431 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
4432 and moved here from:
4433 * src/muscle_tab.h (muscle_entry_t): here.
4434 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
4435 (rule_list): Renamed from rule_list_t.
4436 * src/print_graph.c (static_graph): Renamed from graph.
4437 * src/reader.h (braced_code): Renamed from braced_code_t.
4438 Remove brace_code_e tag.
4439 * src/relation.h (relation_node): Renamed from relation_node_t.
4440 (relation_nodes): Renamed from relation_nodes_t.
4441 (relation): Renamed from relation_t.
4442 * src/state.h (state_number): Renamed from state_number_t.
4443 (struct state): Renamed from struct state_s.
4444 (state): Renamed from state_t.
4445 (transitions): Renamed from transitions_t. Unused (and
4446 misspelled) transtion_s tag removed.
4447 (errs): Renamed from errs_t. Unused errs_s tag removed.
4448 (reductions): Renamed from reductions_t. Unused tag
4449 reductions_s removed.
4450 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
4451 (struct symbol_list): Renamed from struct symbol_list_s.
4452 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
4453 (struct symbol): Renamed from struct symbol_s.
4454 (symbol): Renamed from symbol_t.
4455 * src/tables.c (vector_number): Renamed from vector_number_t.
4456 (action_number): Renamed from action_t.
4457 * src/tables.h (base_number): Renamed from base_t.
4458 * src/vcg.h (enum color): Renamed from enum color_e.
4459 (enum textmode): Renamed from enum textmode_e.
4460 (enum shape): Renamed from enum shape_e.
4461 (struct colorentry): Renamed from struct colorentry_s.
4462 (struct classname): Renamed from struct classname_s.
4463 (struct infoname): Renamed from struct infoname_s.
4464 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
4465 (enum decision): Renamed from enum decision_e.
4466 (enum orientation): Renamed from enum orientation_e.
4467 (enum alignment): Renamed from enum alignment_e.
4468 (enum arrow_mode): Renamed from enum arrow_mode_e.
4469 (enum crossing_type): Renamed from enum crossing_type_e.
4470 (enum view): Renamed from enum view_e.
4471 (struct node): Renamed from struct node_s.
4472 (node): Renamed from node_t.
4473 (enum linestyle): Renamed from enum linestyle_e.
4474 (enum arrowstyle): Renamed from enum arrowstyle_e.
4475 (struct edge): Renamed from struct edge.
4476 (edge): Renamed from edge_t.
4477 (struct graph): Renamed from struct graph_s.
4478 (graph): Renamed from graph_t.
4479 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
4480 Rename value_t -> value.
4481 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
4482 value_t_as_yystype -> value_as_yystype.
4483
4484 Don't include <errno.h> in the mainstream code, since it
4485 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
4486 * lib/get-errno.c, lib/get-errno.h: New files.
4487 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
4488 get-errno.c.
4489 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
4490 * src/output.c (output_skeleton): Likewise.
4491 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
4492 instead of errno.
4493 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
4494 Likewise.
4495 (handle_action_dollar, handle_action_at): Likewise.
4496 * src/system.h: Do not include <errno.h>.
4497 (TAB_EXT): Renamed from EXT_TAB.
4498 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
4499
4500 Avoid str[a-z]*, since <string.h> reserves that name space.
4501 Change all instances of "struniq" in names to "uniqstr", and
4502 likewise for "STRUNIQ" and "UNIQSTR".
4503 * src/uniqstr.c: Renamed from src/struniq.c.
4504 * src/uniqstr.h: Renamed from src/struniq.h.
4505 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
4506 * src/files.c (strsuffix): Remove; unused.
4507 (concat2): Renamed from stringappend. Now static.
4508 * src/files.h (strsuffix, stringappend): Remove; unused.
4509 * src/parse-gram.y (<chars>): Renamed from <string>.
4510 (<uniqstr>): Renamed from <struniq>.
4511 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
4512 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
4513 (struct graph_s.expand): Renamed from struct graph_s.stretch.
4514 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
4515 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
4516 (N_EXPAND): Renamed from N_STRETCH.
4517
4518 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
4519 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
4520 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
4521 Remove; unused.
4522 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
4523 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
4524 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
4525 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
4526 (BASE_MAXIMUM): Renamed from BASE_MAX.
4527 (BASE_MINIMUM): Renamed from BASE_MIN.
4528 (ACTION_MAX): Remove; unused.
4529 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
4530 Unnecessary casts removed from above defines.
4531
4532
4533 Fix misspelling in names.
4534 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
4535 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
4536 G_NODE_ALIGNEMENT.
4537
4538
4539 * lib/timevar.c (timevar_report): Renamed from time_report,
4540 for consistency with other names.
4541 * lib/timevar.h (timevar_report): New decl.
4542 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
4543
4544
4545 Sort include-file uses.
4546
4547 Reorder all include files under src to be in the order "system.h".
4548 then the ../lib include files in angle brackets (alphabetized),
4549 then the . include files in double-quotes (alphabetized). Fix
4550 dependency breakages encountered in this process, as follows:
4551 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
4552 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
4553 * src/state.h: Include "symtab.h".
4554
4555 2002-12-08 Paul Eggert <eggert@twinsun.com>
4556
4557 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
4558 since this causes problems when __file__ contains character
4559 sequences like "@" that are treated specially by src/scan-skel.l.
4560 Instead, just use the file's basename. This fixes the bug
4561 reported by Martin Mokrejs in
4562 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
4563
4564 2002-12-06 Paul Eggert <eggert@twinsun.com>
4565
4566 Add support for rules that do not have trailing semicolons, as
4567 POSIX requires. Improve the quality of locations in Bison
4568 diagnostics.
4569
4570 * src/location.c: Include <quotearg.h>.
4571 (empty_location): Now const.
4572 (location_print): New function. Follow the recommendation of the
4573 GNU Coding Standards for locations that span file boundaries.
4574 * src/location.h: Do not include <quotearg.h>; no longer needed.
4575 (boundary): New type.
4576 (location_t): Use it. This allows locations to span file boundaries.
4577 All member uses changed: file -> start.file or end.file (as needed),
4578 first_line -> start.line, first_column -> start.column,
4579 last_line -> end.line, last_column -> end.column.
4580 (equal_boundaries): New function.
4581 (LOCATION_RESET, LOCATION_STEP): Remove.
4582 (LOCATION_PRINT): Remove. All callers changed to use location_print.
4583 (empty_location): Now const.
4584 (location_print): New decl.
4585 * src/parse-gram.y (lloc_default): New function, which handles
4586 empty locations more accurately.
4587 (YYLLOC_DEFAULT): Use it.
4588 (%token COLON): Remove.
4589 (%token ID_COLON): New token.
4590 (rules): Use it.
4591 (declarations, rules): Remove trailing semicolon.
4592 (declaration, rules_or_grammar_declaration):
4593 Allow empty (";") declaration.
4594 (symbol_def): Remove empty actions; no longer needed.
4595 (rules_or_grammar_declaration): Remove trailing semicolon.
4596 (semi_colon.opt): Remove.
4597 * src/reader.h: Include location.h.
4598 (scanner_cursor): New decl.
4599 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
4600 rolling our own.
4601 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
4602 of *loc.
4603 (STEP): Remove. No longer needed, now that adjust_location does
4604 the work. All uses removed.
4605 (scanner_cursor): New var.
4606 (adjust_location): Renamed from extend_location. It now sets
4607 *loc and adjusts the scanner cursor. All uses changed.
4608 Don't bother testing for CR.
4609 (handle_syncline): Remove location arg; now updates scanner cursor.
4610 All callers changed.
4611 (unexpected_end_of_file): Now accepts start boundary of token or
4612 comment, not location. All callers changed. Update scanner cursor,
4613 not the location.
4614 (SC_AFTER_IDENTIFIER): New state.
4615 (context_state): Renamed from c_context. All uses changed.
4616 (id_loc, code_start, token_start): New local vars.
4617 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
4618 processing of Yacc white space and equivalents here.
4619 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
4620 instead of returning ID immediately, since we need to search for
4621 a subsequent colon.
4622 (<INITIAL>"'", "\""): Save token_start.
4623 (<INITIAL>"%{", "{", "%%"): Save code_start.
4624 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
4625 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
4626 BEGIN context_state at end, not INITIAL.
4627 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
4628 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
4629 Return correct token start.
4630 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
4631 the start of a character, string or multiline comment is found.
4632 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
4633 Reduction): Adjust reported locations to match the more-precise
4634 results now expected.
4635 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
4636 * tests/reduce.at (Useless Rules, Reduced Automaton,
4637 Underivable Rules): Likewise.
4638 * tests/regression.at (Invalid inputs): No longer `expecting ";"
4639 or "|"' now that so many other tokens are allowed by the new grammar.
4640
4641 * src/complain.h (current_file): Remove duplicate decl;
4642 current_file is now owned by files.h.
4643 * src/complain.c, src/scan-gram.l: Include files.h.
4644
4645 2002-12-06 Paul Eggert <eggert@twinsun.com>
4646
4647 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
4648 promotes to int; it might be unsigned int.
4649 * data/yacc.c (yy_reduce_print): Likewise.
4650
4651 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
4652 be #defined in the prologue, not in the Bison declarations.
4653 This fixes Debian Bug 102878, reported by Shaul Karl.
4654
4655 2002-12-02 Paul Eggert <eggert@twinsun.com>
4656
4657 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
4658 * lib/strtoul.c: New file, from gnulib.
4659 This fixes a porting bug reported by Peter Klein in
4660 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
4661
4662 2002-11-30 Paul Eggert <eggert@twinsun.com>
4663
4664 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
4665 and put only a forward declaration in the prologue. This is for
4666 consistency with the other scanner helper functions.
4667
4668 Type clashes now generate warnings, not errors, since it
4669 appears that POSIX may allow some grammars with type clashes.
4670 * src/reader.c (grammar_current_rule_check): Warn about
4671 type clashes instead of complaining.
4672 * tests/input.at (Type Clashes): Expect warnings, not complaints.
4673
4674 Add Yacc library, since POSIX requires it.
4675 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
4676 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
4677 * lib/main.c, lib/yyerror.c: New files.
4678
4679 gram_error can be static; it need not be extern.
4680 * src/reader.h (gram_error): Remove decl.
4681 * src/parse-gram.y (gram_error): Now static. Add static decl.
4682 (print_token_value): Omit parameter names from forward decl,
4683 for consistency.
4684
4685 2002-11-29 Paul Eggert <eggert@twinsun.com>
4686
4687 * doc/bison.texinfo: Emphasize that yylex and yyerror must
4688 be declared before being used. E.g., one should typically
4689 declare them in the prologue. Use GNU coding style in examples.
4690 Put "const" consistently after the type it modifies. Mention
4691 that C99 supports "inline". Mention that yyerror traditionally
4692 returns "int".
4693
4694 %parse-param and %lex-param now take just one argument, the
4695 declaration; the argument name is deduced from the declaration.
4696
4697 * doc/bison.texinfo (Parser Function, Pure Calling, Error
4698 Reporting, Table of Symbols): Document this.
4699 * src/parse-gram.y (add_param): New function.
4700 (COMMA): Remove.
4701 (declaration): Implement new rule for %parse-param and %lex-param.
4702 * src/scan-gram.l: "," now elicits a warning, rather than being
4703 a token; this is more compatible with byacc.
4704 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
4705
4706 2002-11-27 Paul Eggert <eggert@twinsun.com>
4707
4708 Rename identifiers to avoid real and potential collisions.
4709
4710 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
4711 to avoid collision with lex macro described by Bruce Lilly in
4712 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
4713 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
4714 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
4715 * src/parse-gram.y (print_token_value): Renamed from yyprint.
4716 All uses changed.
4717 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
4718 The name "yycontrol" violates the name space rules, and this stuff
4719 wasn't being used anyway.
4720 (input): Remove action; this stuff wasn't being used.
4721 (gram_error): Rename local variable yylloc -> loc.
4722 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
4723 (YY_DECL): Don't use "yy" at start of local variables.
4724 All uses changed, e.g., yylloc -> loc.
4725 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
4726 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
4727 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
4728 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
4729
4730 * src/parse-gram.y (gram_error): loc is now const *.
4731 * src/reader.h (gram_error): Likewise.
4732
4733 2002-11-24 Paul Eggert <eggert@twinsun.com>
4734
4735 Version 1.75c.
4736
4737 * tests/actions.at (Actions after errors): Use an output format
4738 more similar to that of the Printers and Destructors test.
4739 Test the position of the ';' token too.
4740 (Printers and Destructors): Likewise.
4741 (Printers and Destructors: %glr-parser): Remove for now, to avoid
4742 unnecessarily alarming people when the test fails.
4743
4744 * data/yacc.c (yyerrlab1): Move this label down, so that the
4745 parser does not discard the lookahead token if the user code
4746 invokes YYERROR. This change is required for POSIX conformance.
4747
4748 * lib/error.c: Sync with gnulib.
4749
4750 2002-11-22 Paul Eggert <eggert@twinsun.com>
4751
4752 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
4753 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
4754 * lib/xmalloc.c: Likewise.
4755
4756 2002-11-20 Paul Eggert <eggert@twinsun.com>
4757
4758 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
4759
4760 2002-11-20 Paul Eggert <eggert@twinsun.com>
4761
4762 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
4763 should use `if (! x) abort ();' rather than `assert (x);', and
4764 anyway it's one less thing to worry about configuring.
4765
4766 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
4767 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
4768 and replace all instances of assert with abort.
4769 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
4770 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
4771
4772 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
4773 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
4774 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
4775 hash_find_entry, hash_rehash, hash_insert): Likewise.
4776 * src/conflicts.c (resolve_sr_conflict): Likewise.
4777 * src/lalr.c (set_goto_map, map_goto): Likewise.
4778 * src/nullable.c (nullable_compute): Likewise.
4779 * src/output.c (prepare_rules, token_definitions_output): Likewise.
4780 * src/reader.c (packgram, reader): Likewise.
4781 * src/state.c (state_new, state_free, state_transitions_set,
4782 state_reduction_find): Likewise.
4783 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
4784 symbol_pack): Likewise.
4785 * src/tables.c (conflict_row, pack_vector): Likewise.
4786 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
4787 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
4788 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
4789 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
4790
4791 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
4792 (ARGMATCH_CONSTRAINT): New macro.
4793 (ARGMATCH_ASSERT): Use it.
4794
4795 * src/system.h (verify): New macro.
4796 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
4797 rather than assert.
4798 * src/tables.c (tables_generate): Likewise.
4799
4800 * src/struniq.c (struniq_assert): Now returns void, and aborts
4801 if the assertion is false.
4802 (struniq_assert_p): Remove.
4803 * src/struniq.h: Likewise.
4804
4805 2002-11-18 Paul Eggert <eggert@twinsun.com>
4806
4807 * data/glr.c (yygetLRActions): Replace `yyindex' with
4808 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
4809 This fixes the regression with Sun ONE Studio 7 cc that I reported in
4810 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
4811
4812 2002-11-18 Akim Demaille <akim@epita.fr>
4813
4814 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
4815 space.
4816 From Tim Van Holder.
4817
4818 2002-11-17 Paul Eggert <eggert@twinsun.com>
4819
4820 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
4821 to "SyntaxError" for consistency with my 2002-11-15 change.
4822
4823 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
4824 not define to {}, since this breaks the common use of `YYDPRINTF
4825 ((...));' if a single statement is desired (e.g. before `else').
4826 Work around GCC warnings by surrounding corresponding calls with
4827 {} if needed.
4828 (yyhasResolvedValue): Remove unused function.
4829 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
4830 loop body.
4831 (yyreportSyntaxError): Renamed from yyreportParseError.
4832 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
4833 All uses changed.
4834 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
4835 extern when possible. Remove unused initializations.
4836
4837 2002-11-16 Akim Demaille <akim@epita.fr>
4838
4839 Augment the similarity between GLR and LALR traces.
4840
4841 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
4842 (YY_REDUCE_PRINT): New.
4843 (yyparse): Use them.
4844 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
4845 YYDPRINT here.
4846 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
4847 state reached after the reduction/recovery, since...
4848 (yyparse, yyprocessOneStack): Report the state we are entering in.
4849
4850 2002-11-16 Akim Demaille <akim@epita.fr>
4851
4852 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
4853 Add support for --trace=skeleton.
4854 * src/scan-skel.l: %option debug.
4855 Scan strings of non-@ or \n instead of character by character.
4856 (scan_skel): Handle trace_skeleton.
4857 (QPUTS): New.
4858 (@output_parser_name@, @output_header_name@): ``Restore'' their
4859 support (used to be M4 macros).
4860 * data/yacc.c: Quote larger chunks, a la glr.c.
4861 * data/lalr1.cc: Likewise.
4862 The header guards are no longer available, so use some other
4863 string than `YYLSP_NEEDED'.
4864
4865 2002-11-16 Akim Demaille <akim@epita.fr>
4866
4867 Make the ``Printers and Destructors'' test more verbose, taking
4868 `yacc.c''s behavior as (possibly wrong) reference.
4869
4870 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
4871 instead of fprint on stdout.
4872 Set and report the last_line of the symbols.
4873 Consistently display values and locations.
4874
4875 2002-11-16 Paul Eggert <eggert@twinsun.com>
4876
4877 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
4878
4879 2002-11-15 Paul Eggert <eggert@twinsun.com>
4880
4881 * tests/actions.at (Actions after errors): New test case.
4882
4883 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
4884 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
4885 tests/action.at, tests/calc.at, tests/conflicts.at,
4886 tests/cxx-type.at, tests/regression.at:
4887 "parse error" -> "syntax error" for POSIX compatibility.
4888 "parsing stack overflow..." -> "parser stack overflow" so
4889 that code matches Bison documentation.
4890
4891 2002-11-15 Akim Demaille <akim@epita.fr>
4892
4893 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
4894 take two BRACED_CODE, not two string_content.
4895 Free the scanner's obstack when we are done.
4896 (code_content): New.
4897 * tests/calc.at: Adjust.
4898 * doc/bison.texinfo: Adjust.
4899 Also, make sure to include the `,' for these declarations.
4900
4901 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
4902
4903 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
4904 definition; avoids potential autoreconf problems.
4905
4906 2002-11-15 Akim Demaille <akim@epita.fr>
4907
4908 Always check the value returned by yyparse.
4909
4910 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
4911 returned by yyparse.
4912 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
4913 Adjust calls.
4914 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
4915 returned by yyparse.
4916
4917 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4918
4919 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
4920 on input.at test.
4921
4922 2002-11-14 Paul Eggert <eggert@twinsun.com>
4923
4924 * src/output.c (output_skeleton): Call xfopen instead of
4925 duplicating xfopen's body.
4926
4927 Fix bugs reported by Nelson H. F. Beebe in
4928 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
4929
4930 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
4931 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
4932 Group compiler. Instead, use "$CC -E bar.c". Include the .h
4933 file twice in the grammar, as an extra check.
4934
4935 * tests/input.at (Torturing the Scanner): Surround the
4936 backslash-newline tests with "#if 0", to make it less likely that
4937 we'll run into compiler bugs. Bring back solitary \ inside
4938 comment, but add a closing comment to work around HP C bug. Don't
4939 test backslash-newline in C character constant.
4940
4941 2002-11-14 Akim Demaille <akim@epita.fr>
4942
4943 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
4944 status of the compiler.
4945 Calling `exit 1' is no longer needed.
4946 Reported by Nelson H. F. Beebe.
4947
4948 2002-11-14 Akim Demaille <akim@epita.fr>
4949
4950 * tests/atlocal.in (CPPFLAGS): We have config.h.
4951 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
4952 New.
4953 * tests/actions.at, tests/calc.at, tests/conflicts.at,
4954 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
4955 * tests/regression.at, tests/torture.at: Use them for all the
4956 grammars that are to be compiled.
4957 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
4958 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
4959 * doc/bison.texinfo (GLR Parsers): Document `inline'.
4960
4961 2002-11-14 Akim Demaille <akim@epita.fr>
4962
4963 * doc/bison.texinfo: Various formatting changes (alignments in
4964 samples, additional @group/@end group, GCS in samples.
4965 Use @deffn instead of simple @table to define the directives,
4966 macros, variables etc.
4967
4968 2002-11-13 Paul Eggert <eggert@twinsun.com>
4969
4970 Fix some bugs reported by Albert Chin-A-Young in
4971 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
4972
4973 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
4974 -o c"; the HP C compiler chatters during compilation.
4975 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
4976 * tests/headers.at (export YYLTYPE): Likewise.
4977
4978 * tests/input.at (Torturing the Scanner): Remove lines containing
4979 solitary backslashes, as they tickle a bug in the HP C compiler.
4980
4981 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
4982 comments, since they're not portable. Use GNU coding style.
4983
4984 2002-11-13 Akim Demaille <akim@epita.fr>
4985
4986 * data/yacc.c: Leave bigger chunks of quoted text.
4987 (YYDSYMPRINTF): New.
4988 Use it to report symbol activities.
4989 * data/glr.c (YYDSYMPRINTF): New.
4990 Use it.
4991
4992 2002-11-12 Paul Eggert <eggert@twinsun.com>
4993
4994 Version 1.75b.
4995
4996 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
4997 (yyglrReduce): Return yyok, not 0.
4998 This should avoid the enumerated-type warnings reported
4999 by Nelson H. F. Beebe in
5000 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
5001
5002 * lib/bbitset.h (BITSET_INLINE): Remove.
5003 * lib/bitset.h [! BITSET_INLINE]: Remove.
5004 (bitset_set, bitset_reset, bitset_test): Rename local vars
5005 to avoid shadowing warnings by GCC.
5006
5007 * data/glr.c (inline): Remove #define. It's the user's
5008 responsibility to #define it away, just like 'const'.
5009 This fixes one of the bugs reported by Nelson H. F. Beebe in
5010 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
5011
5012 * Makefile.maint (po-check): Scan .l and .y files instead of the
5013 .c and the .h files that they generate. This fixes the bug
5014 reported by Tim Van Holder in:
5015 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
5016 Look for N_ as well as for _. Try to avoid matching #define for
5017 N_ and _.
5018 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
5019 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
5020 * src/scan-gram.l: Revamp regular expressions so that " and '
5021 do not confuse xgettext.
5022
5023 * src/struniq.h (struniq_new): Do not declare the return type
5024 to be 'const'; this violates the C standard.
5025 * src/struniq.c (struniq_new): Likewise.
5026
5027 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
5028
5029 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
5030 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
5031 linker.
5032
5033 2002-11-12 Akim Demaille <akim@epita.fr>
5034
5035 * Makefile.maint: Sync with Autoconf:
5036 (local_updates): New.
5037
5038 2002-11-12 Akim Demaille <akim@epita.fr>
5039
5040 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
5041
5042 2002-11-12 Akim Demaille <akim@epita.fr>
5043
5044 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
5045 locations.
5046
5047 2002-11-12 Akim Demaille <akim@epita.fr>
5048
5049 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
5050 not yyvalue.
5051
5052 2002-11-12 Akim Demaille <akim@epita.fr>
5053
5054 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
5055 Use it to test the GLR parser.
5056
5057 2002-11-12 Akim Demaille <akim@epita.fr>
5058
5059 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
5060 defines it.
5061 * data/glr.c (yystos): New.
5062 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
5063 (YYDSYMPRINT): New.
5064 (yyval): Don't define it, it is handled via M4.
5065 (yyrecoverParseError): Free verbosely the discarded symbols.
5066 * data/yacc.c (yysymprint): Remove, rather...
5067 (b4_yysymprint_generate): invoke.
5068 * data/c.m4 (b4_yysymprint_generate): New.
5069 Accept pointers as arguments, as opposed to the version from
5070 yacc.c.
5071 (b4_yydestruct_generate): Likewise.
5072 * tests/cations.at (Printers and Destructors): Use Bison directives
5073 instead of CPP macros.
5074 Don't rely on internal details.
5075
5076 2002-11-12 Akim Demaille <akim@epita.fr>
5077
5078 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
5079 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
5080 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
5081 it against YYEMPTY and so forth), work on yytoken (i.e., set
5082 it to YYEMPTY etc.).
5083 (yydestruct): Replace with a b4_yydestruct_generate invocation.
5084 (b4_symbol_actions): Remove.
5085 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
5086 for 0, end-of-input.
5087
5088 2002-11-12 Akim Demaille <akim@epita.fr>
5089
5090 * doc/bison.texinfo (Destructor Decl): New.
5091
5092 2002-11-12 Akim Demaille <akim@epita.fr>
5093
5094 * src/tables.c (tables_generate): Use free for pointers that
5095 cannot be NULL, not XFREE.
5096 (pack_vector): Use assert, not fatal, for bound violations.
5097 * src/state.c (state_new): Likewise.
5098 * src/reader.c (reader): Likewise.
5099 * src/lalr.c (set_goto_map): Likewise.
5100 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
5101 the file name.
5102
5103 2002-11-12 Akim Demaille <akim@epita.fr>
5104
5105 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
5106 Restore.
5107 * src/scan-gram.l (last_string): Is global to the file, not to
5108 yylex.
5109 * src/parse-gram.y (input): Don't append the epilogue here,
5110 (epilogue.opt): do it here, and free the scanner's obstack.
5111 * src/reader.c (epilogue_set): Rename as...
5112 (epilogue_augment): this.
5113 * data/c.m4 (b4_epilogue): Defaults to empty.
5114
5115 2002-11-12 Akim Demaille <akim@epita.fr>
5116
5117 * src/getargs.c (long_options): Remove duplicates.
5118 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
5119 Remove.
5120 * doc/bison.rnh: Remove.
5121 * doc/bison.texinfo (VMS Invocation): Remove.
5122
5123 2002-11-12 Akim Demaille <akim@epita.fr>
5124
5125 * src/struniq.h, src/struniq.c (struniq_t): Is const.
5126 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
5127
5128 Use struniq for symbols.
5129
5130 * src/symtab.h (symbol_t): The tag member is a struniq.
5131 (symbol_type_set): Adjust.
5132 * src/symtab.c (symbol_new): Takes a struniq.
5133 (symbol_free): Don't free the tag member.
5134 (hash_compare_symbol_t, hash_symbol_t): Rename as...
5135 (hash_compare_symbol, hash_symbol): these.
5136 Use the fact that tags as struniqs.
5137 (symbol_get): Use struniq_new.
5138 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
5139 Returns a strniq.
5140 * src/reader.h (merger_list, grammar_currentmerge_set): The name
5141 and type members are struniqs.
5142 * src/reader.c (get_merge_function)
5143 (grammar_current_rule_merge_set): Adjust.
5144 (TYPE, current_type): Are struniq.
5145
5146 Use struniq for file names.
5147
5148 * src/files.h, src/files.c (infile): Split into...
5149 (grammar_file, current_file): these.
5150 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
5151 * src/reduce.c (reduce_print): Likewise.
5152 * src/getargs.c (getargs): Likewise.
5153 * src/complain.h, src/complain.c: Likewise.
5154 * src/main.c (main): Call struniqs_new early enough to use it for
5155 file names.
5156 Don't free the input file name.
5157
5158 2002-11-12 Akim Demaille <akim@epita.fr>
5159
5160 * src/symtab.c (symbol_free): Remove dead deactivated code:
5161 type_name are properly removed.
5162 Don't use XFREE to free items that cannot be NULL.
5163 * src/struniq.h, src/struniq.c: New.
5164 * src/main.c (main): Initialize/free struniqs.
5165 * src/parse-gram.y (%union): Add astruniq member.
5166 (yyprint): Adjust.
5167 * src/scan-gram.l (<{tag}>): Return a struniq.
5168 Free the obstack bit that used to store it.
5169 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
5170
5171 2002-11-11 Paul Eggert <eggert@twinsun.com>
5172
5173 Revamp to fix many (but not all) of the C- and M4-related quoting
5174 problems. Among other things, this fixes the Bison bug reported
5175 by Jan Hubicka when processing the Bash grammar; see:
5176 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
5177
5178 Use new @ escapes consistently. Represent brackets with @{ and @}
5179 rather than @<:@ and @:>@, since this works a bit better with dumb
5180 editors like vi. Represent @ with @@, since @ is now consistently
5181 an escape. Use @oline@ and @ofile@ rather than __oline__ and
5182 __ofile__, to avoid unexpected expansions. Similarly, use @output
5183 rather than #output.
5184
5185 * data/c.m4 (b4_copyright): Omit file name from comment, since
5186 the file name could contain "*/".
5187 (b4_synclines_flag): Don't quote the 2nd argument; it should already
5188 be quoted. All uses changed.
5189
5190 * data/glr.c: Use new @ escapes consistently.
5191 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
5192 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
5193 Remove, since they couldn't handle arbitrary characters in file
5194 names.
5195 * data/lalr1.cc: Likewise.
5196 * data/yacc.c: Likewise.
5197
5198 * src/files.c (output_infix): Remove; all uses removed.
5199 * src/files.h: Likewise.
5200
5201 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
5202 mishandled funny characters in file names, and anyway it isn't
5203 needed any more.
5204 * data/yacc.c: Likewise.
5205 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
5206
5207 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
5208 * data/yacc.c: Likewise.
5209
5210 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
5211 strings now.
5212 (muscle_init): Quote filename as a C string.
5213 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
5214 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
5215 * src/output.c (escaped_file_name_output): New function.
5216 (prepare_symbols): Quote tokens for M4.
5217 (prepare): Don't insert output_infix, output_prefix,
5218 output_parser_name, output_header_name; this is now down by scan-skel.
5219 Insert skeleton as a C string.
5220
5221 * src/output.c (user_actions_output, symbol_destructors_output,
5222 symbol_printers_output): Quote filenames for C and M4.
5223 * src/reader.c (prologue_augment, epilogue_set): Likewise.
5224
5225 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
5226 escapes other than \\ and \'; this simplifies the code.
5227 (<SC_STRING>): Likewise, for \\ and \".
5228 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
5229 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
5230 Use new escapes @{ and @} for [ and ].
5231
5232 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
5233 them with auto vars.
5234 Switch to new escape scheme, where @ is the escape character uniformly.
5235 Abort if a stray escape character is found. Avoid unbounded input
5236 buffer when parsing non-escaped text.
5237
5238 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
5239 __oline__, #output, $@, and @{ do not have unintended meanings.
5240
5241 2002-11-09 Paul Eggert <eggert@twinsun.com>
5242
5243 Fix the test failure due to GCC warnings described in
5244 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
5245 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
5246 evaluate to 0 if it's impossible for NINF to be in the respective
5247 table.
5248 (yygetLRActions, yyrecoverParseError): Use them.
5249
5250 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
5251 counted in the token inserted at end of file. Now takes
5252 location_t *, not location_t, so that the location can be
5253 adjusted. All uses changed.
5254
5255 * tests/regression.at (Invalid inputs): Adjust wording in
5256 diagnostic to match the new behavior.
5257
5258 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
5259 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
5260 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
5261 abort ();'. This reduces the runtime of the "Many lookaheads"
5262 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
5263 GCC 3.2.
5264
5265 2002-11-07 Paul Eggert <eggert@twinsun.com>
5266
5267 * src/parse-gram.y (CHARACTER): Remove unused token.
5268 All uses removed.
5269
5270 * src/scan-gram.l: Remove stack option. We no longer use the
5271 stack, since the stack was never deeper than 1; instead, use the
5272 new auto var c_context to record the stacked value.
5273
5274 Remove nounput option. At an unexpected end of file, we now unput
5275 the minimal input necessary to end cleanly; this simplifies the
5276 code.
5277
5278 Avoid unbounded token sizes where this is easy.
5279
5280 (unexpected_end_of_file): New function.
5281 Use it to systematize the error message on unexpected EOF.
5282 (last-string): Now auto, not static.
5283 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
5284 (scanner_last_string_free): Remove; not used.
5285 (percent_percent_count): Move decl to just before use.
5286 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
5287 not the (never otherwised-used) CHARACTER.
5288
5289 2002-11-07 Akim Demaille <akim@epita.fr>
5290
5291 Let yyerror always receive the msg as last argument, so that
5292 yyerror can be variadic.
5293
5294 * data/yacc.c (b4_yyerror_args): New.
5295 Use it when calling yyerror.
5296 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
5297 Use it when calling yyerror.
5298 * doc/bison.texinfo (Error Reporting): Adjust.
5299 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
5300 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
5301
5302 2002-11-06 Akim Demaille <akim@epita.fr>
5303
5304 #line should have quoted strings.
5305 Ideally, this should be done by m4_quotearg.
5306
5307 * src/scan-skel.l: Include quotearg.h.
5308 Quote __ofile__.
5309 * src/output.c (symbol_printers_output)
5310 (symbol_destructors_output): Quote the file name.
5311
5312 2002-11-06 Akim Demaille <akim@epita.fr>
5313
5314 * tests/regression.at (Invalid inputs): Adjust to the recent
5315 messages.
5316
5317 2002-11-06 Akim Demaille <akim@epita.fr>
5318
5319 Restore --no-lines.
5320 Reported by Jim Kent.
5321
5322 * data/c.m4 (b4_syncline): New.
5323 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
5324 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
5325 * src/output.c (user_actions_output): Likewise.
5326 (prepare): Define 'b4_synclines_flag'.
5327 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
5328
5329 2002-11-06 Akim Demaille <akim@epita.fr>
5330
5331 * src/main.c (main): Free `infile'.
5332 * src/scan-gram.l (handle_syncline): New.
5333 Recognize `#line'.
5334 * src/output.c (user_actions_output, symbol_destructors_output)
5335 (symbol_printers_output): Use the location's file name, not
5336 infile.
5337 * src/reader.c (prologue_augment, epilogue_set): Likewise.
5338
5339 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5340
5341 * src/tables.c (matching_state): Don't allow states to match if
5342 either has GLR conflict entries.
5343
5344 2002-11-05 Paul Eggert <eggert@twinsun.com>
5345
5346 * src/scan-gram.l: Use more accurate diagnostics, e.g.
5347 "integer out of range" rather than "invalid value".
5348 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
5349 accordingly.
5350
5351 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
5352 Also, remove one static variable in the scanner.
5353
5354 * src/scan-gram.l (braces_level): Now auto, not static.
5355 Initialize to zero if the compiler is being picky.
5356 (INITIAL): Clear braces_level instead of incrementing it.
5357 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
5358 as POSIX 1003.1-2001 requires.
5359 * src/system.h (IF_LINT): New macro, taken from coreutils.
5360 * configure.ac: Define "lint" if --enable-gcc-warnings.
5361
5362 2002-11-05 Akim Demaille <akim@epita.fr>
5363
5364 * src/scan-gram.l: When it starts with `%', complain about the
5365 whole directive, not just that `invalid character: %'.
5366
5367 2002-11-04 Akim Demaille <akim@epita.fr>
5368
5369 * Makefile.maint: Update from Autoconf.
5370 (update, cvs-update, po-update, do-po-update): New.
5371
5372 2002-11-04 Akim Demaille <akim@epita.fr>
5373
5374 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
5375 and yyerror.
5376 Have yyerror `use' its arguments.
5377 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
5378 returns true when location & yacc & pure & parse-param.
5379 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
5380
5381 2002-11-04 Akim Demaille <akim@epita.fr>
5382
5383 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
5384 clashes.
5385 * src/scan-gram.l: Use [\'] instead of ['] to pacify
5386 font-lock-mode.
5387 Use complain_at.
5388 Use quote, not quote_n since LOCATION_PRINT no longer uses the
5389 slot 0.
5390
5391 2002-11-03 Paul Eggert <eggert@twinsun.com>
5392
5393 * src/reader.c (get_merge_function, grammar_current_rule_check):
5394 Use consistent diagnostics for reporting type name clashes.
5395 Quote the types with <>, for consistency with Yacc.
5396 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
5397
5398 2002-11-03 Akim Demaille <akim@epita.fr>
5399
5400 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
5401 New.
5402 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
5403 (b4_parse_param): Remove.
5404 Use b4_identification.
5405 Propagate b4_pure_args where needed to pass them to yyerror.
5406 * data/glr.m4 (b4_parse_param): Remove.
5407 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
5408 (b4_lpure_formals): New.
5409 Use b4_identification.
5410 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
5411 b4_user_formals and b4_user_args.
5412 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
5413 (yyreportAmbiguity): When using a pure parser, also need
5414 the location, and the parse-params.
5415 Adjust callers.
5416 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
5417 When using a pure parser, also need the parse-params.
5418 Adjust callers.
5419 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
5420 (%pure-parser + %parse-param) LALR and GLR parsers.
5421 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
5422 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
5423 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
5424 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
5425 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
5426 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
5427 * doc/bison.texinfo: Untabify the whole file.
5428 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
5429 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
5430 (Error Reporting): Adjust to these new directives.
5431 Document %error-verbose, deprecate YYERROR_VERBOSE.
5432
5433 2002-11-03 Akim Demaille <akim@epita.fr>
5434
5435 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
5436 AT_CHECK_CALC_GLR invocations to use % directives, instead of
5437 command line options.
5438 * tests/cxx-type.at: Formatting changes.
5439
5440 2002-11-03 Paul Eggert <eggert@twinsun.com>
5441
5442 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
5443 to count columns correctly, and to check for invalid inputs.
5444
5445 Use mbsnwidth to count columns correctly. Account for tabs, too.
5446 Include mbswidth.h.
5447 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
5448 (extend_location): New function.
5449 (YY_LINES): Remove.
5450
5451 Handle CRLF in C code rather than in Lex code.
5452 (YY_INPUT): New macro.
5453 (no_cr_read): New function.
5454
5455 Scan UCNs, even though we don't fully handle them yet.
5456 (convert_ucn_to_byte): New function.
5457
5458 Handle backslash-newline correctly in C code.
5459 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
5460 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
5461 all uses changed.
5462 (tag, splice): New EREs. Do not allow NUL or newline in tags.
5463 Use {splice} wherever C allows backslash-newline.
5464 YY_STEP after space, newline, vertical-tab.
5465 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
5466
5467 (letter, id): Don't assume ASCII; e.g., spell out a-z.
5468
5469 ({int}, handle_action_dollar, handle_action_at): Check for integer
5470 overflow.
5471
5472 (YY_STEP): Omit trailing semicolon, so that it's more like C.
5473
5474 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
5475 as well as \000. Check for UCHAR_MAX, not 255.
5476 Allow \x with an arbitrary positive number of digits, as in C.
5477 Check for overflow here.
5478 Allow \? and UCNs, for compatibility with C.
5479
5480 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
5481 with quote slot used by complain_at.
5482
5483 * tests/input.at: Add tests for backslash-newline, m4 quotes
5484 in symbols, long literals, and funny escapes in strings.
5485
5486 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
5487 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
5488 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
5489 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
5490 * m4/mbswidth.m4: New file, from GNU coreutils.
5491
5492 * doc/bison.texinfo (Grammar Outline): Document // comments.
5493 (Symbols): Document that trigraphs have no special meaning in Bison,
5494 nor is backslash-newline allowed.
5495 (Actions): Document that trigraphs have no special meaning.
5496
5497 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
5498 no longer used.
5499
5500 2002-11-02 Paul Eggert <eggert@twinsun.com>
5501
5502 * src/reader.c: Don't include quote.h; not needed.
5503 (get_merge_function): Reword warning to be consistent with
5504 type clash diagnostic in grammar_current_rule_check.
5505
5506 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
5507 bug in trigraph handling.
5508
5509 * src/output.c (prepare_symbols): When printing token names,
5510 escape "[" as "@<:@" and likewise for "]".
5511
5512 * src/system.h (errno): Remove declaration, as we are now
5513 assuming C89 or better, and C89 guarantees errno.
5514
5515 2002-10-30 Paul Eggert <eggert@twinsun.com>
5516
5517 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
5518 Check for close failures.
5519 * src/files.h (xfclose): Return void, not int, since it always
5520 returned zero.
5521 * src/files.c (xfclose): Likewise. Report I/O error if ferror
5522 indicates one.
5523 * src/output.c (output_skeleton): Use xfclose rather than fclose
5524 and ferror. xfclose now checks ferror.
5525
5526 * data/glr.c (YYLEFTMOST_STATE): Remove.
5527 (yyreportTree): Use a stack-based leftmost state. This avoids
5528 our continuing battles with bogus warnings about initializers.
5529
5530 2002-10-30 Akim Demaille <akim@epita.fr>
5531
5532 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
5533 #if.
5534
5535 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5536
5537 * tests/glr-regr1.at: New test for reported regressions.
5538 * tests/testsuite.at: Add glr-regr1.at test.
5539 * tests/Makefile.am: Add glr-regr1.at test.
5540
5541 2002-10-24 Paul Eggert <eggert@twinsun.com>
5542
5543 Version 1.75a.
5544
5545 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
5546 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
5547 we use malloc. Don't assume 'A' through 'Z' are contiguous.
5548 Don't assume strdup exists; POSIX says its an XSI extension.
5549 Check for buffer overflow on input.
5550
5551 2002-10-24 Akim Demaille <akim@epita.fr>
5552
5553 * src/output.c (output_skeleton): Don't disable M4sugar comments
5554 too soon: it results in comments being expanded.
5555 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
5556 first output.
5557
5558 2002-10-24 Akim Demaille <akim@epita.fr>
5559
5560 * data/yacc.c (m4_int_type): New.
5561 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
5562 char' as only yacc.c wants K&R portability.
5563 * data/glr.c (yysigned_char): Remove.
5564 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
5565 Reported by Quoc Peyrot.
5566
5567 2002-10-23 Paul Eggert <eggert@twinsun.com>
5568
5569 * src/main.c (main): With --trace=time, report times even if a
5570 non-fatal error occurs. Formerly, the times were reported in some
5571 such cases but not in others.
5572 * src/reader.c (reader): Just return if a complaint has been issued,
5573 instead of exiting, so that 'main' can report times.
5574
5575 2002-10-22 Akim Demaille <akim@epita.fr>
5576
5577 * src/system.h: Include sys/types.
5578 Reported by Bert Deknuydt.
5579
5580 2002-10-23 Paul Eggert <eggert@twinsun.com>
5581
5582 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
5583 Suggested by Art Haas.
5584
5585 2002-10-22 Paul Eggert <eggert@twinsun.com>
5586
5587 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
5588 decl; not needed any more.
5589 * src/main.c (main): Use return to exit, undoing yesterday's change.
5590 The last OS that we could find where this wouldn't work is
5591 SunOS 3.5, and that's too old to worry about now.
5592
5593 * data/glr.c (struct yyltype): Define members even when not
5594 doing locations. This is more consistent with yacc.c, and it
5595 works around the following bug reports:
5596 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
5597 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
5598
5599 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
5600 @acronym consistently. Standardize on "Yacc" instead of "YACC",
5601 "Algol" instead of "ALGOL". Give a bit more history about BNF.
5602
5603 2002-10-22 Akim Demaille <akim@epita.fr>
5604
5605 * data/README: New.
5606
5607 2002-10-21 Paul Eggert <eggert@twinsun.com>
5608
5609 Be consistent about 'bool'; the old code used an enum in one
5610 module and an int in another, and this violates the C standard.
5611 * m4/stdbool.m4: New file, from coreutils 4.5.3.
5612 * configure.ac (AC_HEADER_STDBOOL): Add.
5613 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
5614 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
5615 * src/symtab.c (hash_compare_symbol_t): Likewise.
5616 * src/system.h (bool, false, true): Use a definition consistent
5617 with ../lib/hash.c. All uses changed.
5618
5619 * src/complain.c (warning_issued): Renamed from warn_message_count,
5620 so that we needn't worry about integer overflow (!).
5621 Now of type bool. All uses changed.
5622 (complaint_issued): Renamed from complain_message_count; likewise.
5623
5624 * src/main.c (main): Use exit to exit with failure.
5625
5626 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
5627 rather than 1 and 0.
5628 * src/main.c (main): Likewise.
5629 * src/getargs.c (getargs): Likewise.
5630 * src/reader.c (reader): Likewise.
5631
5632 * src/getarg.c (getargs): Remove duplicate code for
5633 "Try `bison --help'".
5634
5635 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
5636 What was that "2" for?
5637
5638 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
5639 * src/getargs.c (usage): Likewise.
5640
5641 * src/getargs.c (getargs): When there are too few operands, report
5642 the last one. When there are too many, report the first extra
5643 one. This is how diffutils does it.
5644
5645 2002-10-20 Paul Eggert <eggert@twinsun.com>
5646
5647 Remove K&R vestiges.
5648 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
5649 * src/complain.c (VA_START): Remove. Assume prototypes.
5650 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
5651 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
5652 fatal): Assume prototypes.
5653 * src/complain.h: Assume prototypes.
5654 * src/system.h (PARAMS): Remove.
5655 Include <limits.h> unconditionally, since it's guaranteeed even
5656 for a freestanding C89 compiler.
5657 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
5658 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
5659
5660 2002-10-20 Akim Demaille <akim@epita.fr>
5661
5662 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
5663 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
5664 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
5665 (yyresolveStates, yyresolveAction, yyresolveStack)
5666 (yyprocessOneStack): Use them.
5667 (yy_reduce_print): New.
5668 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
5669
5670 2002-10-20 Akim Demaille <akim@epita.fr>
5671
5672 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
5673 arguments and output `void'.
5674 (b4_c_function): Rename as...
5675 (b4_c_function_def): this.
5676 (b4_c_function_decl, b4_c_ansi_function_def)
5677 (b4_c_ansi_function_decl): New.
5678 Change the interpretation of the arguments: before `int, foo', now
5679 `int foo, foo'.
5680 * data/yacc.c (yyparse): Prototype and define thanks to these.
5681 Adjust b4_c_function_def uses.
5682 * data/glr.c (yyparse): Likewise, but ANSI only.
5683
5684 2002-10-20 Akim Demaille <akim@epita.fr>
5685
5686 * src/output.c (prepare): Move the definition of `tokens_number',
5687 `nterms_number', `undef_token_number', `user_token_number_max'
5688 to...
5689 (prepare_tokens): Here.
5690 (prepare_tokens): Rename as...
5691 (prepare_symbols): this.
5692 (prepare): Move the definition of `rules_number' to...
5693 (prepare_rules): here.
5694 (prepare): Move the definition of `last', `final_state_number',
5695 `states_number' to...
5696 (prepare_states): here.
5697 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
5698
5699 2002-10-20 Akim Demaille <akim@epita.fr>
5700
5701 * src/tables.h, src/tables.c, src/output.c: Comment changes.
5702
5703 2002-10-20 Akim Demaille <akim@epita.fr>
5704
5705 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
5706 * data/c.m4: here.
5707
5708 2002-10-20 Akim Demaille <akim@epita.fr>
5709
5710 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
5711 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
5712 `pair'.
5713 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
5714 `name' to...
5715 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
5716 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
5717 These.
5718
5719 2002-10-19 Paul Eggert <eggert@twinsun.com>
5720
5721 Do not create a temporary file, as that involves security and
5722 cleanup headaches. Instead, use a pair of pipes.
5723 Derived from a suggestion by Florian Krohm.
5724 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
5725 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
5726 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
5727 (BISON_PREREQ_SUBPIPE): Add.
5728 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
5729 Add subpipe.h, subpipe.c.
5730 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
5731 * po/POTFILES.in: Add lib/subpipe.c.
5732 * src/output.c: Include "subpipe.h".
5733 (m4_invoke): Remove decl.
5734 (scan_skel): New decl.
5735 (output_skeleton): Use pipe rather than temporary file for m4 input.
5736 Check that m4sugar.m4 is readable, to avoid deadlock.
5737 Check for pipe I/O error.
5738 * src/scan-skel.l (readpipe): Remove decl.
5739 (scan_skel): New function, to be used in place of m4_invoke.
5740 Read from stream rather than file.
5741
5742 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
5743 float, as this generates a warning on Solaris 8 + GCC 3.2 with
5744 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
5745 this generates a more-accurate value anyway.
5746
5747 * lib/timevar.c (timervar_accumulate): Rename locals to
5748 avoid confusion with similarly-named more-global.
5749 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
5750
5751 * src/output.c (prepare): Use xstrdup to convert char const *
5752 to char *, to avoid GCC warning.
5753
5754 2002-10-19 Akim Demaille <akim@epita.fr>
5755
5756 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
5757 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
5758 Use them to have `calc.y' ready for %pure-parser.
5759 * data/yacc.c (YYLEX): Pass a yylex return type to
5760 b4_c_function_call.
5761
5762 2002-10-19 Akim Demaille <akim@epita.fr>
5763
5764 Prototype support of %lex-param and %parse-param.
5765
5766 * src/parse-gram.y: Add the definition of the %lex-param and
5767 %parse-param tokens, plus their rules.
5768 Drop the `_' version of %glr-parser.
5769 Add the "," token.
5770 * src/scan-gram.l (INITIAL): Scan them.
5771 * src/muscle_tab.c: Comment changes.
5772 (muscle_insert, muscle_find): Rename `pair' as `probe'.
5773 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
5774 (muscle_entry_s): The `value' member is no longer const.
5775 Adjust all dependencies.
5776 * src/muscle_tab.c (muscle_init): Adjust: use
5777 MUSCLE_INSERT_STRING.
5778 Initialize the obstack earlier.
5779 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
5780 (muscle_pair_list_grow): New.
5781 * data/c.m4 (b4_c_function_call, b4_c_args): New.
5782 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
5783 * tests/calc.at: Use %locations, not --locations.
5784 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
5785
5786 2002-10-19 Akim Demaille <akim@epita.fr>
5787
5788 * src/getargs.c (usage): Take status as argument and exit
5789 accordingly.
5790 Report the traditional `Try ... --help' message when status != 0.
5791 (usage, version): Don't take a FILE * as arg, it is pointless.
5792 (getargs): When there is an incorrect number of arguments, make it
5793 an error, and report it GNUlically thanks to `usage ()'.
5794
5795 2002-10-18 Paul Eggert <eggert@twinsun.com>
5796
5797 * data/glr.c (yyreportParseError): Don't assume that sprintf
5798 yields the length of the printed string, as this is not true
5799 on SunOS 4.1.4. Reported by Peter Klein.
5800
5801 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
5802 * tests/conflicts.at (%nonassoc and eof): Likewise.
5803 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
5804
5805 2002-10-17 Akim Demaille <akim@epita.fr>
5806
5807 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
5808 * src/getargs.c (trace_types, trace_args): Adjust.
5809 * src/reader.c (grammar_current_rule_prec_set)
5810 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
5811 Standardize error messages.
5812 And s/@prec/%prec/!
5813 (reader): Use trace_flag to enable scanner/parser debugging,
5814 instead of an adhoc scheme.
5815 * src/scan-gram.l: Remove trailing debugging code.
5816
5817 2002-10-16 Paul Eggert <eggert@twinsun.com>
5818
5819 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
5820 MUSCLE_TAB_H.
5821
5822 * NEWS: Officially drop support for building Bison with K&R C,
5823 since it didn't work anyway and it's not worth worrying about.
5824 * Makefile.maint (wget_files): Remove ansi2knr.c.
5825 (ansi2knr.c-url_prefix): Remove.
5826 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
5827 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
5828 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
5829
5830 2002-10-15 Paul Eggert <eggert@twinsun.com>
5831
5832 Stop using the "enum_" trick for K&R-style function definitions;
5833 it confused me, and I was the author! Instead, assume that people
5834 who want to use K&R C compilers (when using these modules in GCC,
5835 perhaps?) will run ansi2knr.
5836
5837 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
5838 All uses of "enum_" changed to "enum ".
5839 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
5840 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
5841
5842 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
5843 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
5844 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
5845 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
5846 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
5847 abitset_not, abitset_ones, abitset_or, abitset_or_and,
5848 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
5849 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
5850 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
5851 Use function prototypes; this removes the need for declaring
5852 static functions simply to provide their prototypes.
5853 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
5854 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
5855 bitset_count_, bitset_create, bitset_dump, bitset_first,
5856 bitset_free, bitset_init, bitset_last, bitset_next,
5857 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
5858 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
5859 bitset_print, bitset_release_memory, bitset_toggle_,
5860 bitset_type_choose, bitset_type_get, bitset_type_name_get,
5861 debug_bitset): Likewise.
5862 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
5863 * lib/bitset_stats.c (bitset_log_histogram_print,
5864 bitset_percent_histogram_print, bitset_stats_and,
5865 bitset_stats_and_cmp, bitset_stats_and_or,
5866 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
5867 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
5868 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
5869 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
5870 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
5871 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
5872 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
5873 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
5874 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
5875 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
5876 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
5877 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
5878 bitset_stats_zero): Likewise.
5879 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
5880 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
5881 bitsetv_dump, debug_bitsetv): Likewise.
5882 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
5883 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
5884 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
5885 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
5886 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
5887 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
5888 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
5889 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
5890 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
5891 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
5892 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
5893 Likewise.
5894 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
5895 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
5896 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
5897 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
5898 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
5899 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
5900 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
5901 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
5902 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
5903 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
5904 lbitset_xor_cmp, lbitset_zero): Likewise.
5905
5906 2002-10-14 Akim Demaille <akim@epita.fr>
5907
5908 Version 1.75.
5909
5910 2002-10-14 Akim Demaille <akim@epita.fr>
5911
5912 * tests/Makefile.am (maintainer-check-posix): New.
5913
5914 2002-10-14 Akim Demaille <akim@epita.fr>
5915
5916 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
5917 member.
5918
5919 2002-10-14 Akim Demaille <akim@epita.fr>
5920
5921 * src/tables.c (table_ninf_remap): base -> tab.
5922 Reported by Matt Rosing.
5923
5924 2002-10-14 Paul Eggert <eggert@twinsun.com>
5925
5926 * tests/action.at, tests/calc.at, tests/conflicts.at,
5927 tests/cxx-type.at, tests/headers.at, tests/input.at,
5928 tests/regression.at, tests/synclines.at, tests/torture.at:
5929 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
5930 so that the tests still work even if POSIXLY_CORRECT is set.
5931 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
5932
5933 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
5934 for portability to K&R hosts. Fix typo: signed char is guaranteed
5935 only to 127, not to 128.
5936 * data/glr.c (yysigned_char): New type.
5937 * data/yacc.c (yysigned_char): Likewise.
5938 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
5939
5940 2002-10-13 Paul Eggert <eggert@twinsun.com>
5941
5942 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
5943 true due to limited range of data type" warning from GCC.
5944
5945 * data/c.m4 (b4_token_defines): Protect against double-inclusion
5946 by wrapping enum yytokentype's definition inside #ifndef
5947 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
5948
5949 2002-10-13 Akim Demaille <akim@epita.fr>
5950
5951 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
5952 Un yy- yyrhs to avoid the name clash with the global YYRHS.
5953
5954 2002-10-13 Akim Demaille <akim@epita.fr>
5955
5956 * Makefile.maint: Update from Autoconf 2.54.
5957 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
5958
5959 2002-10-13 Akim Demaille <akim@epita.fr>
5960
5961 * src/print.c (print_state): Separate the list of solved conflicts
5962 from the other items.
5963 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
5964
5965 2002-10-13 Akim Demaille <akim@epita.fr>
5966
5967 Let nondeterministic skeletons be usable with deterministic
5968 tables.
5969
5970 With the patch, GAWK compiled by GCC without -O2 passes its test
5971 suite using a GLR parser driven by LALR tables. It fails with -O2
5972 because `struct stat' gives two different answers on my machine:
5973 88 (definition of an auto var) and later 96 (memset on this var).
5974 Hence the stack is badly corrumpted. The headers inclusion is to
5975 blame: if I move the awk.h inclusion before GLR's system header
5976 inclusion, the two struct stat have the same size.
5977
5978 * src/tables.c (pack_table): Always create conflict_table.
5979 (token_actions): Always create conflict_list.
5980 * data/glr.c (YYFLAG): Remove, unused.
5981
5982 2002-10-13 Akim Demaille <akim@epita.fr>
5983
5984 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
5985 (O0FLAGS): New.
5986 (VALGRIND, GXX): New.
5987 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
5988 * tests/bison.in: Run $PREBISON a pre-command.
5989 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
5990 (maintainer-check-g++): New.
5991 * Makefile.am (maintainer-check): New.
5992
5993 2002-10-13 Akim Demaille <akim@epita.fr>
5994
5995 * data/glr.c: Formatting changes.
5996 Tweak some trace messages to match yacc.c's.
5997
5998 2002-10-13 Akim Demaille <akim@epita.fr>
5999
6000 GLR parsers sometimes raise parse errors instead of performing the
6001 default reduction.
6002 Reported by Charles-Henry de Boysson.
6003
6004 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
6005 check the length of the traces when %glr.
6006 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
6007 GLR's traces.
6008 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
6009 Test GLR parsers.
6010 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
6011 (yyltype): Remove the yy prefix from the member names.
6012 (yytable): Complete its comment.
6013 (yygetLRActions): Map error action number from YYTABLE from
6014 YYTABLE_NINF to 0.
6015 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
6016 (which was a bug: it should have been YYTABEL_NINF, and yet it was
6017 not satisfying as we could compare an YYACTION computed from
6018 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
6019 only value for error actions.
6020 (yyreportParseError): In verbose parse error messages, don't issue
6021 `error' in the list of expected tokens.
6022 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
6023 next action to perform to match glr.c's decoding.
6024 (yytable): Complete its comment.
6025
6026 2002-10-13 Paul Eggert <eggert@twinsun.com>
6027
6028 Fix problem reported by Henrik Grubbstroem in
6029 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
6030 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
6031 because the Bison parser reads the second action before reducing
6032 the first one.
6033 * src/scan-gram.l (rule_length): New static var.
6034 Use it to keep track of the rule length in the scanner, since
6035 we can't expect the parser to be in lock-step sync with the scanner.
6036 (handle_action_dollar, handle_action_at): Use this var.
6037 * tests/actions.at (Exotic Dollars): Test for the problem.
6038
6039 2002-10-12 Paul Eggert <eggert@twinsun.com>
6040
6041 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
6042 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
6043 Include <sys/time.h> when checking for clock_t and struct tms.
6044 Use same include order as source.
6045 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
6046 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
6047
6048 * lib/timevar.c: Update copyright date and clarify comments.
6049 (get_time) [IN_GCC]: Keep the GCC version for reference.
6050
6051 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
6052 GCC version as of today, then merge Bison's changes.
6053 Change "GCC" to "Bison" in copyright notice. timevar.def's
6054 author is Akim, so change that too.
6055
6056 * src/reader.c (grammar_current_rule_check):
6057 Don't worry about the default action if $$ is untyped.
6058 Prevents bogus warnings reported by Jim Gifford in
6059 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
6060
6061 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
6062 * data/glr.c, data/lalr1.cc, data/yacc.c:
6063 Output token definitions before the first part of user declarations.
6064 Fixes compatibility problem reported by Jim Gifford for kbd in
6065 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
6066
6067 2002-10-11 Paul Eggert <eggert@twinsun.com>
6068
6069 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
6070 (yyparse): here. This undoes some of the 2002-07-25 change.
6071 Compatibility problem reported by Ralf S. Engelschall with
6072 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
6073
6074 2002-10-11 Akim Demaille <akim@epita.fr>
6075
6076 * tests/regression.at Characters Escapes): New.
6077 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
6078 characters.
6079 Reported by Jan Nieuwenhuizen.
6080
6081 2002-10-11 Akim Demaille <akim@epita.fr>
6082
6083 * po/id.po: New.
6084
6085 2002-10-10 Paul Eggert <eggert@twinsun.com>
6086
6087 Portability fixes for bitsets; this also avoids several GCC
6088 warnings.
6089
6090 * lib/abitset.c: Include <stddef.h>, for offsetof.
6091 * lib/lbitset.c: Likewise.
6092
6093 * lib/abitset.c (abitset_bytes): Return a size that is aligned
6094 properly for vectors of objects. Do not assume that adding a
6095 header size to a multiple of a word size yields a value that is
6096 properly aligned for the whole union.
6097 * lib/bitsetv.c (bitsetv_alloc): Likewise.
6098
6099 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
6100 unique names for structures.
6101 * lib/ebitset.c (ebitset_bytes): Likewise.
6102 * lib/lbitset.c (lbitset_bytes): Likewise.
6103
6104 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
6105 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
6106 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
6107 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
6108 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
6109 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
6110 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
6111 to improve the type-checking that GCC can do.
6112 * lib/bitset.c (bitset_op4_cmp): Likewise.
6113 * lib/bitset_stats.c (bitset_stats_count,
6114 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
6115 bitset_stats_copy, bitset_stats_disjoint_p,
6116 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
6117 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
6118 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
6119 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
6120 bitset_stats_and_or_cmp, bitset_stats_andn_or,
6121 bitset_stats_andn_or_cmp, bitset_stats_or_and,
6122 bitset_stats_or_and_cmp): Likewise.
6123 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
6124 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
6125 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
6126 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
6127
6128 * lib/abitset.h: Include bitset.h, not bbitset.h.
6129 * lib/ebitset.h: Likewise.
6130 * lib/lbitset.h: Likewise.
6131
6132 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
6133 All instances of parameters of type enum bitset_opts are now of
6134 type enum_bitset_opts, to conform to the C Standard, and similarly
6135 for enum_bitset_type.
6136 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
6137 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
6138
6139 Do not use "struct bitset_struct" to mean different things in
6140 different modules. Not only is this confusing, it violates
6141 the C Standard, which requires that structure types in different
6142 modules must be compatible if one is to be passed to the other.
6143 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
6144 All instances of "struct bitset_struct *" replaced with "bitset".
6145 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
6146 (union bitset_union, struct abitset_struct, struct ebitset_struct,
6147 struct lbitset_struct, struct bitset_stats_struct): New types.
6148 All uses of struct bitset_struct changed to union bitset_union,
6149 etc.
6150 * lib/abitset.c (struct abitset_struct, abitset,
6151 struct bitset_struct): Remove.
6152 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
6153 struct bitset_struct): Remove.
6154 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
6155 bitset_struct): Remove.
6156 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
6157 Likewise.
6158
6159 Do not call a function of type T using a call that assumes the
6160 function is of a different type U. Standard C requires that a
6161 function must be called with a type that is compatible with its
6162 definition.
6163 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
6164 New decls.
6165 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
6166 New functions.
6167 * lib/ebitset.c (PFV): Remove.
6168 * lib/lbitset.c (PFV): Likewise.
6169 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
6170 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
6171 decls.
6172 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
6173 (ebitset_vtable): Use them.
6174 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
6175 lbitset_xor): New functions.
6176 (lbitset_vtable): Use them.
6177
6178 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
6179 Declare.
6180
6181 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
6182 GCC warning.
6183 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
6184 Use offsetof, for simplicity.
6185
6186 2002-10-06 Paul Eggert <eggert@twinsun.com>
6187
6188 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
6189 the same width as int. This reapplies a hunk of the 2002-08-12 patch
6190 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
6191 which was inadvertently undone by the 2002-09-30 patch.
6192 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
6193 the same width as int.
6194
6195 2002-10-04 Paul Eggert <eggert@twinsun.com>
6196
6197 Version 1.50.
6198
6199 * configure.ac (AC_INIT), NEWS: Increment version number.
6200
6201 * doc/bison.texinfo: Minor spelling, grammar, and white space
6202 fixes.
6203 (Symbols): Mention that any negative value returned from yylex
6204 signifies end-of-input. Warn about negative chars. Mention
6205 the portable Standard C character set.
6206
6207 The GNU coding standard says CFLAGS and YFLAGS are reserved
6208 for the installer to set.
6209 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
6210 * src/Makefile.am (AM_CFLAGS): Likewise.
6211 (AM_YFLAGS): Renamed from YFLAGS.
6212
6213 Fix some MAX and MIN problems.
6214 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
6215 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
6216 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
6217 * src/reader.c (reader): Use it.
6218
6219 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
6220 POSIX 1003.1-2001 has removed fgrep.
6221
6222 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
6223
6224 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
6225 interpreted as signed.
6226 * lib/ebitset.c (ebitset_list): Fix bug.
6227
6228 2002-10-01 Paul Eggert <eggert@twinsun.com>
6229
6230 More fixes for 64-bit hosts and large bitsets.
6231
6232 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
6233 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
6234 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
6235 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
6236 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
6237 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
6238 bitset_count_): Likewise.
6239 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
6240 bitset_first, bitset_last): Likewise.
6241 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
6242 bitset_stats_list_reverse, bitset_stats_size,
6243 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
6244 Likewise.
6245 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
6246 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
6247 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
6248 bitsetv_reflexive_transitive_closure): Likewise.
6249 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
6250 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
6251 Likewise.
6252 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
6253 Likewise.
6254
6255 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
6256 Use size_t, not unsigned int, to count bytes.
6257 * lib/abitset.h (abitset_bytes): Likewise.
6258 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
6259 Likewise.
6260 * lib/bitset.h (bitset_bytes): Likewise.
6261 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
6262 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
6263 * lib/bitsetv.c (bitsetv_alloc): Likewise.
6264 * lib/ebitset.c (ebitset_bytes): Likewise.
6265 * lib/ebitset.h (ebitset_bytes): Likewise.
6266 * lib/lbitset.c (lbitset_bytes): Likewise.
6267 * lib/lbitset.h (lbitset_bytes): Likewise.
6268
6269 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
6270 abitset_subset_p, abitset_disjoint_p, abitset_and,
6271 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
6272 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
6273 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
6274 abitset_or_and, abitset_or_and_cmp):
6275 Use bitset_windex instead of unsigned int.
6276 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
6277 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
6278 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
6279 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
6280 Likewise.
6281 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
6282
6283 * lib/bitset.c (bitset_print):
6284 Use proper printf formats for widths of integer types.
6285 * lib/bitset_stats.c (bitset_percent_histogram_print,
6286 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
6287 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
6288 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
6289 * lib/lbitset.c (lbitset_bytes): Likewise.
6290
6291 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
6292 BITSET_SIZE_MAX): New macros.
6293 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
6294 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
6295 to BITSET_WINDEX_MAX.
6296
6297 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
6298 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
6299 since we now return the bitset_bindex type (not int).
6300
6301 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
6302 when computing sizes.
6303 * lib/ebitset.c (ebitset_elts_grow): Likewise.
6304
6305 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
6306 and avoid cast to unsigned.
6307
6308 2002-09-30 Akim Demaille <akim@epita.fr>
6309
6310 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
6311 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
6312 Updates from Michael Hayes.
6313
6314 2002-09-30 Art Haas <ahaas@neosoft.com>
6315
6316 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
6317 invocations.
6318 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
6319 defined.
6320
6321 2002-09-27 Akim Demaille <akim@epita.fr>
6322
6323 Version 1.49c.
6324
6325 2002-09-27 Akim Demaille <akim@epita.fr>
6326
6327 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
6328 (Because of AC_LIBSOURCE).
6329
6330 2002-09-27 Akim Demaille <akim@epita.fr>
6331
6332 Playing with Autoscan.
6333
6334 * configure.ac: Remove the old LIBOBJ tweaks.
6335 (AC_REPLACE_FUNCS): Add strrchr and strtol.
6336 * lib/strrchr.c: New.
6337 * lib/strtol.c: New, from the Coreutils 4.5.1.
6338
6339 2002-09-27 Akim Demaille <akim@epita.fr>
6340
6341 Playing with Autoscan.
6342
6343 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
6344 * lib/Makefile.am (libbison_a_SOURCES): No longer include
6345 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
6346 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
6347 Coreutils 4.5.1.
6348
6349 2002-09-24 Akim Demaille <akim@epita.fr>
6350
6351 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
6352 (Frequently Asked Questions, Parser Stack Overflow): New.
6353
6354 2002-09-13 Akim Demaille <akim@epita.fr>
6355
6356 Playing with autoscan.
6357
6358 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
6359 * src/files.c (skeleton_find): Remove, unused.
6360 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
6361 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
6362
6363 2002-09-13 Akim Demaille <akim@epita.fr>
6364
6365 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
6366 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
6367
6368 2002-09-13 Akim Demaille <akim@epita.fr>
6369
6370 * configure.ac: Require 2.54.
6371 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
6372 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
6373 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
6374 Remove, provided by Autoconf macros.
6375
6376 2002-09-12 Akim Demaille <akim@epita.fr>
6377
6378 * m4/prereq.m4: Update, from Coreutils 4.5.1.
6379
6380 2002-09-12 Akim Demaille <akim@epita.fr>
6381
6382 * m4/prereq.m4: Update, from Fileutils 4.1.5.
6383 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
6384 Reported by Martin Mokrejs.
6385
6386 2002-09-10 Akim Demaille <akim@epita.fr>
6387
6388 * src/parse-gram.y: Associate a human readable string to each
6389 token type.
6390 * tests/regression.at (Invalid inputs): Adjust.
6391
6392 2002-09-10 Gary V. Vaughan <gary@gnu.org>
6393
6394 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
6395 with an Autoconf-2.5x style configure.ac.
6396
6397 2002-09-06 Paul Eggert <eggert@twinsun.com>
6398
6399 * doc/bison.texinfo (Conditions): Make explicit that the GPL
6400 exception applies only to yacc.c. This is a modification of a
6401 patch originally suggested by Akim Demaille.
6402
6403 2002-09-06 Akim Demaille <akim@epita.fr>
6404
6405 * data/c.m4 (b4_copyright): Move the GPL exception comment from
6406 here to...
6407 * data/yacc.c: here.
6408
6409 * data/lalr1.cc (struct yyltype): Don't define it, since we use
6410 LocationType.
6411 (b4_ltype): Default to yy::Location from location.hh.
6412
6413 2002-09-04 Jim Meyering <jim@meyering.net>
6414
6415 * data/yacc.c: Guard the declaration of yytoknum also with
6416 `#ifdef YYPRINT', so it is declared only when used.
6417
6418 2002-09-04 Akim Demaille <akim@epita.fr>
6419
6420 * configure.in: Rename as...
6421 * configure.ac: this.
6422 Bump to 1.49c.
6423
6424 2002-09-04 Akim Demaille <akim@epita.fr>
6425
6426 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
6427 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
6428 translate maintainer only messages.
6429
6430 2002-08-12 Paul Eggert <eggert@twinsun.com>
6431
6432 Version 1.49b.
6433
6434 * Makefile.am (SUBDIRS): Remove intl.
6435 (DISTCLEANFILES): Remove.
6436 * NEWS: Mention that GNU M4 is now required. Clarify what is
6437 meant by "larger grammars". Mention the pt_BR translation.
6438 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
6439 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
6440 Bump version from 0.11.2 to 0.11.5.
6441 (BISON_PREREQ_STAGE): Remove.
6442 (AM_GNU_GETTEXT): Use external gettext.
6443 (AC_OUTPUT): Remove intl/Makefile.
6444
6445 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
6446
6447 * data/glr.c: Include string.h, for strlen.
6448 (yyreportParseError): Use size_t for yysize.
6449 (yy_yypstack): No longer nested inside yypstates, as nested
6450 functions are not portable. Do not assume size_t is the
6451 same width as int.
6452 (yypstates): Do not assume that ptrdiff_t is the same width
6453 as int, and similarly for yyposn and YYINDEX.
6454
6455 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
6456
6457 * lib/Makefile.am (INCLUDES): Do not include from the intl
6458 directory, which has been removed.
6459 * src/Makefile.am (INCLUDES): Likewise.
6460
6461 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
6462 (bitsets_sources, additional_bitsets_sources, timevars_sources):
6463 New vars.
6464
6465 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
6466 * tests/Makefile.am (EXTRA_DIST): Likewise.
6467
6468 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
6469 Do not assume that bitset_windex is the same width as unsigned.
6470
6471 * lib/abitset.c (abitset_unused_clear): Do not assume that
6472 bitset_word is the same width as int.
6473 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
6474 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
6475 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
6476 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
6477 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
6478
6479 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
6480 portability to one's complement hosts!).
6481 * lib/ebitset.c (ebitset_op1): Likewise.
6482 * lib/lbitset.c (lbitset_op1): Likewise.
6483
6484 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
6485 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
6486 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
6487 Sync with fileutils.
6488 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
6489 lib/gettext.h: Sync with diffutils.
6490
6491 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
6492 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
6493
6494 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
6495 PROTOTYPES to check for prototypes, and "defined __STDC__" to
6496 check for void *.
6497
6498 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
6499 size_t; the old version tried to do this but casted improperly.
6500 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
6501 (bitset_test): Now returns int, not unsigned long.
6502
6503 * lib/bitset_stats.c: Include "gettext.h".
6504 (_): New macro.
6505 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
6506 name locals "index", as it generates unnecessary warnings on some
6507 hosts that have an "index" function.
6508
6509 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
6510 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
6511 they need translation.
6512 * src/LR0.c (state_list_append, new_itemsets, get_state,
6513 append_states, generate_states): Likewise.
6514 * src/assoc.c (assoc_to_string): Likewise.
6515 * src/closure.c (print_closure, set_firsts, closure): Likewise.
6516 * src/gram.c (grammar_dump): Likewise.
6517 * src/injections.c (injections_compute): Likewise.
6518 * src/lalr.c (lookaheads_print): Likewise.
6519 * src/relation.c (relation_transpose): Likewise.
6520 * src/scan-gram.l: Likewise.
6521 * src/tables.c (table_grow, pack_vector): Likewise.
6522
6523 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
6524 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
6525 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
6526 * m4/mbstate_t.m4: Sync with fileutils.
6527 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
6528
6529 * po/LINGUAS: Add pt_BR.
6530 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
6531 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
6532 lib/timevar.c.
6533 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
6534 manual recommends.
6535 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
6536
6537 * src/complain.c (strerror_r): Remove decl; not needed.
6538 (strerror): Use same pattern as ../lib/error.c.
6539
6540 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
6541
6542 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
6543
6544 * src/main.c (main): Cast result of bindtextdomain and textdomain
6545 to void, to avoid a GCC warning when --disable-nls is in effect.
6546
6547 * src/scan-gram.l: Use strings rather than escapes when possible,
6548 to minimize the number of warnings from xgettext.
6549 (handle_action_dollar, handle_action_at): Don't use isdigit,
6550 as it mishandles negative chars and it may not work as expected
6551 outside the C locale.
6552
6553 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
6554 this is a GCC extension and is not portable to other compilers.
6555
6556 * src/system.h (alloca): Use same pattern as ../lib/error.c.
6557 Do not include <ctype.h>; no longer needed.
6558 Do not include <malloc.h>; no longer needed (and generates
6559 warnings on OpenBSD 3.0).
6560
6561 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
6562 it's not portable.
6563
6564 * tests/regression.at: Do not use 'cc -c input.c -o input';
6565 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
6566
6567 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
6568 exit status as failure, not just exit status 1. Sun C exits
6569 with status 2 sometimes.
6570
6571 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
6572 Use it for the two large tests.
6573
6574 2002-08-02 Akim Demaille <akim@epita.fr>
6575
6576 * src/conflicts.c (conflicts_output): Don't output rules never
6577 reduced here, since anyway that computation doesn't work.
6578 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
6579 (rule_useless_p, rule_never_reduced_p): New.
6580 (grammar_rules_partial_print): Use a filter instead of a range.
6581 Display the title only if needed.
6582 (grammar_rules_print): Adjust.
6583 (grammar_rules_never_reduced_report): New.
6584 * src/tables.c (action_row): Move the computation of rules never
6585 reduced to...
6586 (token_actions): here.
6587 * src/main.c (main): Make the parser before making the report, so
6588 that rules never reduced are computed.
6589 Call grammar_rules_never_reduced_report.
6590 * src/print.c (print_results): Report rules never reduced.
6591 * tests/conflicts.at, tests/reduce.at: Adjust.
6592
6593 2002-08-01 Akim Demaille <akim@epita.fr>
6594
6595 Instead of attaching lookaheads and duplicating the rules being
6596 reduced by a state, attach the lookaheads to the reductions.
6597
6598 * src/state.h (state_t): Remove the `lookaheads',
6599 `lookaheads_rule' member.
6600 (reductions_t): Add a `lookaheads' member.
6601 Use a regular array for the `rules'.
6602 * src/state.c (reductions_new): Initialize the lookaheads member
6603 to 0.
6604 (state_rule_lookaheads_print): Adjust.
6605 * src/state.h, src/state.c (state_reductions_find): New.
6606 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
6607 (count_rr_conflicts): Adjust.
6608 * src/lalr.c (LArule): Remove.
6609 (add_lookback_edge): Adjust.
6610 (state_lookaheads_count): New.
6611 (states_lookaheads_initialize): Merge into...
6612 (initialize_LA): this.
6613 (lalr_free): Adjust.
6614 * src/main.c (main): Don't free nullable and derives too early: it
6615 is used by --verbose.
6616 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
6617
6618 2002-08-01 Akim Demaille <akim@epita.fr>
6619
6620 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
6621 `rule_number_t**'.
6622 (set_derives, free_derives): Rename as...
6623 (derives_compute, derives_free): this.
6624 Adjust all dependencies.
6625 * src/nullable.c (set_nullable, free_nullable): Rename as...
6626 (nullable_compute, nullable_free): these.
6627 (rule_list_t): Store rule_t *, not rule_number_t.
6628 * src/state.c (state_rule_lookaheads_print): Directly compare rule
6629 pointers, instead of their numbers.
6630 * src/main.c (main): Call nullable_free, and derives_free earlier,
6631 as they were lo longer used.
6632
6633 2002-08-01 Akim Demaille <akim@epita.fr>
6634
6635 * lib/timevar.c (get_time): Include children time.
6636 * src/lalr.h (LA, LArule): Don't export them: used with the
6637 state_t.
6638 * src/lalr.c (LA, LArule): Static.
6639 * src/lalr.h, src/lalr.c (lalr_free): New.
6640 * src/main.c (main): Call it.
6641 * src/tables.c (pack_vector): Check whether loc is >= to the
6642 table_size, not >.
6643 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
6644 (tables_generate): do it, since that's also it which allocates
6645 them.
6646 Don't free LA and LArule, main does.
6647
6648 2002-07-31 Akim Demaille <akim@epita.fr>
6649
6650 Separate parser tables computation and output.
6651
6652 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
6653 (conflict_list, conflict_list_cnt, table, check, table_ninf)
6654 (yydefgoto, yydefact, high): Move to...
6655 * src/tables.h, src/tables.c: here.
6656 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
6657 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
6658 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
6659 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
6660 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
6661 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
6662 (action_row, save_row, token_actions, save_column, default_goto)
6663 (goto_actions, sort_actions, matching_state, pack_vector)
6664 (table_ninf_remap, pack_table, prepare_actions): Move to...
6665 * src/tables.c: here.
6666 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
6667 * src/output.c (token_actions, output_base, output_conflicts)
6668 (output_check): Merge into...
6669 (prepare_actions): this.
6670 (actions_output): Rename as...
6671 (user_actions_output): this.
6672 * src/main.c (main): Call tables_generate and tables_free.
6673
6674 2002-07-31 Akim Demaille <akim@epita.fr>
6675
6676 Steal GCC's --time-report support.
6677
6678 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
6679 stolen/adjusted from GCC.
6680 * m4/stage.m4: Remove time related checks.
6681 * m4/timevar.m4: New.
6682 * configure.in: Adjust.
6683 * src/system.h: Adjust to using timevar.h.
6684 * src/getargs.h, src/getargs.c: Support trace_time for
6685 --trace=time.
6686 * src/main.c (stage): Remove.
6687 (main): Replace `stage' invocations with timevar calls.
6688 * src/output.c: Insert pertinent timevar calls.
6689
6690 2002-07-31 Akim Demaille <akim@epita.fr>
6691
6692 Let --trace have arguments.
6693
6694 * src/getargs.h (enum trace_e): New.
6695 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
6696 (long_options, short_options): --trace/-T takes an optional
6697 argument.
6698 Change all the uses of trace_flag to reflect the new flags.
6699 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
6700
6701 Strengthen `stage' portability.
6702
6703 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
6704 * configure.in: Use it.
6705 Don't check for malloc.h and sys/times.h.
6706 * src/system.h: Include them when appropriate.
6707 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
6708 times and struct tms are available.
6709
6710 2002-07-30 Akim Demaille <akim@epita.fr>
6711
6712 In verbose parse error message, don't report `error' as an
6713 expected token.
6714 * tests/actions.at (Printers and Destructors): Adjust.
6715 * tests/calc.at (Calculator $1): Adjust.
6716 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
6717 error message, do not report the parser accepts the error token in
6718 that state.
6719
6720 2002-07-30 Akim Demaille <akim@epita.fr>
6721
6722 Normalize conflict related messages.
6723
6724 * src/complain.h, src/complain.c (warn, complain): New.
6725 * src/conflicts.c (conflicts_print): Use them.
6726 (conflict_report_yacc): New, extracted from...
6727 (conflicts_print): here.
6728 * tests/conflicts.at, tests/existing.at: Adjust.
6729
6730 2002-07-30 Akim Demaille <akim@epita.fr>
6731
6732 Report rules which are never reduced by the parser: those hidden
6733 by conflicts.
6734
6735 * src/LR0.c (save_reductions): Don't make the final state too
6736 different: save its reduction (accept) instead of having a state
6737 without any action (no shift or goto, no reduce).
6738 Note: the final state is now a ``regular'' state, i.e., the
6739 parsers now contain `reduce 0' as default reduction.
6740 Nevertheless, since they decide to `accept' when yystate =
6741 final_state, they still will not reduce rule 0.
6742 * src/print.c (print_actions, print_reduction): Adjust.
6743 * src/output.c (action_row): Track reduced rules.
6744 (token_actions): Report rules never reduced.
6745 * tests/conflicts.at, tests/regression.at: Adjust.
6746
6747 2002-07-30 Akim Demaille <akim@epita.fr>
6748
6749 `stage' was accidently included in a previous patch.
6750 Initiate its autoconfiscation.
6751
6752 * configure.in: Look for malloc.h and sys/times.h.
6753 * src/main.c (stage): Adjust.
6754 Report only when trace_flag.
6755
6756 2002-07-29 Akim Demaille <akim@epita.fr>
6757
6758 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
6759 state_number_t.
6760 (errs_t): symbol_t*, not symbol_number_t.
6761 (reductions_t): rule_t*, not rule_number_t.
6762 (FOR_EACH_SHIFT): New.
6763 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
6764 * src/print.c, src/print_graph.c: Adjust.
6765
6766 2002-07-29 Akim Demaille <akim@epita.fr>
6767
6768 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
6769
6770 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
6771 (endtoken, accept): these.
6772 * src/reader.c (reader): Set endtoken's default tag to "$end".
6773 Set undeftoken's tag to "$undefined" instead of "$undefined.".
6774 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
6775 Adjust.
6776
6777 2002-07-29 Akim Demaille <akim@epita.fr>
6778
6779 * src/reduce.c (reduce_grammar): When the language is empty,
6780 complain about the start symbol, not the axiom.
6781 Use its location.
6782 * tests/reduce.at (Empty Language): New.
6783
6784 2002-07-26 Akim Demaille <akim@epita.fr>
6785
6786 * src/reader.h, src/reader.c (gram_error): ... can't get
6787 yycontrol without making too strong assumptions on the parser
6788 itself.
6789 * src/output.c (prepare_tokens): Use the real 0th value of
6790 token_translations instead of `0'.
6791 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
6792 visible here.
6793 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
6794 for the time being: %locations ought to provide it to yyerror.
6795
6796 2002-07-25 Akim Demaille <akim@epita.fr>
6797
6798 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
6799 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
6800 * tests/regression.at (Web2c Actions): Adjust.
6801
6802 2002-07-25 Akim Demaille <akim@epita.fr>
6803
6804 Stop storing rules from 1 to nrules + 1.
6805
6806 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
6807 * src/nullable.c, src/output.c, src/print.c, src/reader.c
6808 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
6809 Iterate from 0 to nrules.
6810 Use rule_number_as_item_number and item_number_as_rule_number.
6811 Adjust to `derive' now containing possibly 0.
6812 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
6813 Handle the `- 1' part in rule numbers from/to item numbers.
6814 * src/conflicts.c (log_resolution): Fix the message which reversed
6815 shift and reduce.
6816 * src/output.c (action_row): Initialize default_rule to -1.
6817 (token_actions): Adjust.
6818 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
6819 expected output.
6820 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
6821
6822 2002-07-25 Akim Demaille <akim@epita.fr>
6823
6824 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
6825 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
6826 (b4_c_knr_arg_decl): New.
6827 * data/yacc.c: Use it to define yysymprint, yydestruct, and
6828 yyreport_parse_error.
6829
6830 2002-07-25 Akim Demaille <akim@epita.fr>
6831
6832 * data/yacc.c (yyreport_parse_error): New, extracted from...
6833 (yyparse): here.
6834 (yydestruct, yysymprint): Move above yyparse.
6835 Be K&R compliant.
6836
6837 2002-07-25 Akim Demaille <akim@epita.fr>
6838
6839 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
6840 replace...
6841 (b4_sint_type, b4_uint_type): these.
6842 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
6843 * tests/regression.at (Web2c Actions): Adjust.
6844
6845 2002-07-25 Akim Demaille <akim@epita.fr>
6846
6847 * src/gram.h (TIEM_NUMBER_MAX): New.
6848 (item_number_of_rule_number, rule_number_of_item_number): Rename
6849 as...
6850 (rule_number_as_item_number, item_number_as_rule_number): these.
6851 Adjust dependencies.
6852 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
6853 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
6854 (symbol_number_to_vector_number): New.
6855 (order): Of vector_number_t* type.
6856 (base_t, BASE_MAX, BASE_MIN): New.
6857 (froms, tos, width, pos, check): Of base_t type.
6858 (action_number_t, ACTION_MIN, ACTION_MAX): New.
6859 (actrow): Of action_number_t type.
6860 (conflrow): Of unsigned int type.
6861 (table_ninf, base_ninf): New.
6862 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
6863 (muscle_insert_int_table, muscle_insert_base_table)
6864 (muscle_insert_rule_number_table): New.
6865 (prepare_tokens): Output `toknum' as int_table.
6866 (action_row): Returns a rule_number_t.
6867 Use ACTION_MIN, not SHRT_MIN.
6868 (token_actions): yydefact is rule_number_t*.
6869 (table_ninf_remap): New.
6870 (pack_table): Use it for `base' and `table'.
6871 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
6872 replaced with...
6873 (YYPACT_NINF, YYTABLE_NINF): these.
6874 (yypact, yytable): Compute their types instead of hard-coded
6875 `short'.
6876 * tests/regression.at (Web2c Actions): Adjust.
6877
6878 2002-07-19 Akim Demaille <akim@epita.fr>
6879
6880 * src/scan-gram.l (id): Can start with an underscore.
6881
6882 2002-07-16 Akim Demaille <akim@epita.fr>
6883
6884 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
6885 Adjust all former `associativity' dependencies.
6886 * src/symtab.c (symbol_new): Default associativity is `undef', not
6887 `right'.
6888 (symbol_check_alias_consistence): Adjust.
6889
6890 2002-07-09 Akim Demaille <akim@epita.fr>
6891
6892 * doc/bison.texinfo: Properly set the ``header'' part.
6893 Use @dircategory ``GNU programming tools'' as per Texinfo's
6894 documentation.
6895 Use @copying.
6896
6897 2002-07-09 Akim Demaille <akim@epita.fr>
6898
6899 * lib/quotearg.h: Protect against multiple inclusions.
6900 * src/location.h (location_t): Add a `file' member.
6901 (LOCATION_RESET, LOCATION_PRINT): Adjust.
6902 * src/complain.c (warn_at, complain_at, fatal_at): Drop
6903 `error_one_per_line' support.
6904
6905 2002-07-09 Akim Demaille <akim@epita.fr>
6906
6907 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
6908 * src/reader.c (lineno): Remove.
6909 Adjust all dependencies.
6910 (get_merge_function): Take a location and use complain_at.
6911 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
6912 * tests/regression.at (Invalid inputs, Mixing %token styles):
6913 Adjust.
6914
6915 2002-07-09 Akim Demaille <akim@epita.fr>
6916
6917 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
6918 recovery rule, and forbid extensions when --yacc.
6919 (gram_error): Use complain_at.
6920 * src/reader.c (reader): Exit if there were parse errors.
6921
6922 2002-07-09 Akim Demaille <akim@epita.fr>
6923
6924 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
6925 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
6926 Reported by R Blake <blakers@mac.com>.
6927
6928 2002-07-09 Akim Demaille <akim@epita.fr>
6929
6930 * data/yacc.c: Output the copyright notive in the header.
6931
6932 2002-07-03 Akim Demaille <akim@epita.fr>
6933
6934 * src/output.c (froms, tos): Are state_number_t.
6935 (save_column): sp, sp1, and sp2 are state_number_t.
6936 (prepare): Rename `final' as `final_state_number', `nnts' as
6937 `nterms_number', `nrules' as `rules_number', `nstates' as
6938 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
6939 unused.
6940 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
6941 * data/lalr1.cc (nsym_): Remove, unused.
6942
6943 2002-07-03 Akim Demaille <akim@epita.fr>
6944
6945 * src/lalr.h, src/lalr.c (goto_number_t): New.
6946 * src/lalr.c (goto_list_t): New.
6947 Propagate them.
6948 * src/nullable.c (rule_list_t): New.
6949 Propagate.
6950 * src/types.h: Remove.
6951
6952 2002-07-03 Akim Demaille <akim@epita.fr>
6953
6954 * src/closure.c (print_fderives): Use rule_rhs_print.
6955 * src/derives.c (print_derives): Use rule_rhs_print.
6956 (rule_list_t): New, replaces `shorts'.
6957 (set_derives): Add comments.
6958 * tests/sets.at (Nullable, Firsts): Adjust.
6959
6960 2002-07-03 Akim Demaille <akim@epita.fr>
6961
6962 * src/output.c (prepare_actions): Free `tally' and `width'.
6963 (prepare_actions): Allocate and free `order'.
6964 * src/symtab.c (symbols_free): Free `symbols'.
6965 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
6966 * src/output.c (m4_invoke): Move to...
6967 * src/scan-skel.l: here.
6968 (<<EOF>>): Close yyout, and free its name.
6969
6970 2002-07-03 Akim Demaille <akim@epita.fr>
6971
6972 Fix some memory leaks, and fix a bug: state 0 was examined twice.
6973
6974 * src/LR0.c (new_state): Merge into...
6975 (state_list_append): this.
6976 (new_states): Merge into...
6977 (generate_states): here.
6978 (set_states): Don't ensure a proper `errs' state member here, do it...
6979 * src/conflicts.c (conflicts_solve): here.
6980 * src/state.h, src/state.c: Comment changes.
6981 (state_t): Rename member `shifts' as `transitions'.
6982 Adjust all dependencies.
6983 (errs_new): For consistency, also take the values as argument.
6984 (errs_dup): Remove.
6985 (state_errs_set): New.
6986 (state_reductions_set, state_transitions_set): Assert that no
6987 previous value was assigned.
6988 (state_free): New.
6989 (states_free): Use it.
6990 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
6991 temporary storage: use `errs' and `nerrs' as elsewhere.
6992 (set_conflicts): Allocate and free this `errs'.
6993
6994 2002-07-02 Akim Demaille <akim@epita.fr>
6995
6996 * lib/libiberty.h: New.
6997 * lib: Update the bitset implementation from upstream.
6998 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
6999 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
7000 * src/main.c: Adjust bitset stats calls.
7001
7002 2002-07-01 Paul Eggert <eggert@twinsun.com>
7003
7004 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
7005 char, so that negative chars don't collide with $.
7006
7007 2002-06-30 Akim Demaille <akim@epita.fr>
7008
7009 Have the GLR tests be `warning' checked, and fix the warnings.
7010
7011 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
7012 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
7013 (yyremoveDeletes): `yyi' and `yyj' are size_t.
7014 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
7015 (yyaddDeferredAction): static.
7016 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
7017 (yyreportParseError): yyprefix is const.
7018 yytokenp is used only when verbose.
7019 (yy__GNUC__): Replace with __GNUC__.
7020 (yypdumpstack): yyi is size_t.
7021 (yypreference): Un-yy local variables and arguments, to avoid
7022 clashes with `yyr1'. Anyway, we are not in the user name space.
7023 (yytname_size): be an int, as is compared with ints.
7024 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
7025 Use them.
7026 * tests/cxx-gram.at: Use quotation to protect $1.
7027 Use AT_COMPILE to enable warnings hunts.
7028 Prototype yylex and yyerror.
7029 `Use' argc.
7030 Include `string.h', not `strings.h'.
7031 Produce and prototype stmtMerge only when used.
7032 yylex takes a location.
7033
7034 2002-06-30 Akim Demaille <akim@epita.fr>
7035
7036 We spend a lot of time in quotearg, in particular when --verbose.
7037
7038 * src/symtab.c (symbol_get): Store a quoted version of the key.
7039 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
7040 Adjust all callers.
7041
7042 2002-06-30 Akim Demaille <akim@epita.fr>
7043
7044 * src/state.h (reductions_t): Rename member `nreds' as num.
7045 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
7046 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
7047
7048 2002-06-30 Akim Demaille <akim@epita.fr>
7049
7050 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
7051 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
7052 (shifts_to): Rename as...
7053 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
7054 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
7055 (TRANSITION_IS_DISABLED, transitions_to): these.
7056
7057 2002-06-30 Akim Demaille <akim@epita.fr>
7058
7059 * src/print.c (print_shifts, print_gotos): Merge into...
7060 (print_transitions): this.
7061 (print_transitions, print_errs, print_reductions): Align the
7062 lookaheads columns.
7063 (print_core, print_transitions, print_errs, print_state,
7064 print_grammar): Output empty lines separator before, not after.
7065 (state_default_rule_compute): Rename as...
7066 (state_default_rule): this.
7067 * tests/conflicts.at (Defaulted Conflicted Reduction),
7068 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
7069 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
7070
7071 2002-06-30 Akim Demaille <akim@epita.fr>
7072
7073 Display items as we display rules.
7074
7075 * src/gram.h, src/gram.c (rule_lhs_print): New.
7076 * src/gram.c (grammar_rules_partial_print): Use it.
7077 * src/print.c (print_core): Likewise.
7078 * tests/conflicts.at (Defaulted Conflicted Reduction),
7079 (Unresolved SR Conflicts): Adjust.
7080 (Unresolved SR Conflicts): Adjust and rename as...
7081 (Resolved SR Conflicts): this, as was meant.
7082 * tests/regression.at (Web2c Report): Adjust.
7083
7084 2002-06-30 Akim Demaille <akim@epita.fr>
7085
7086 * src/print.c (state_default_rule_compute): New, extracted from...
7087 (print_reductions): here.
7088 Pessimize, but clarify the code.
7089 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
7090
7091 2002-06-30 Akim Demaille <akim@epita.fr>
7092
7093 * src/output.c (action_row): Let default_rule be always a rule
7094 number.
7095
7096 2002-06-30 Akim Demaille <akim@epita.fr>
7097
7098 * src/closure.c (print_firsts, print_fderives, closure):
7099 Use BITSET_EXECUTE.
7100 * src/lalr.c (lookaheads_print): Likewise.
7101 * src/state.c (state_rule_lookaheads_print): Likewise.
7102 * src/print_graph.c (print_core): Likewise.
7103 * src/print.c (print_reductions): Likewise.
7104 * src/output.c (action_row): Likewise.
7105 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
7106
7107 2002-06-30 Akim Demaille <akim@epita.fr>
7108
7109 * src/print_graph.c: Use report_flag.
7110
7111 2002-06-30 Akim Demaille <akim@epita.fr>
7112
7113 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
7114 to...
7115 * src/relation.h, src/relation.c (traverse, relation_digraph)
7116 (relation_print, relation_transpose): New.
7117
7118 2002-06-30 Akim Demaille <akim@epita.fr>
7119
7120 * src/state.h, src/state.c (shifts_to): New.
7121 * src/lalr.c (build_relations): Use it.
7122
7123 2002-06-30 Akim Demaille <akim@epita.fr>
7124
7125 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
7126 (item_number_of_rule_number, rule_number_of_item_number): New.
7127 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
7128 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
7129 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
7130 Propagate their use.
7131 Much remains to be done, in particular wrt `shorts' from types.h.
7132
7133 2002-06-30 Akim Demaille <akim@epita.fr>
7134
7135 * src/symtab.c (symbol_new): Initialize the `printer' member.
7136
7137 2002-06-30 Akim Demaille <akim@epita.fr>
7138
7139 * src/LR0.c (save_reductions): Remove, replaced by...
7140 * src/state.h, src/state.c (state_reductions_set): New.
7141 (reductions, errs): Rename as...
7142 (reductions_t, errs_t): these.
7143 Adjust all dependencies.
7144
7145 2002-06-30 Akim Demaille <akim@epita.fr>
7146
7147 * src/LR0.c (state_list_t, state_list_append): New.
7148 (first_state, last_state): Now symbol_list_t.
7149 (this_state): Remove.
7150 (new_itemsets, append_states, save_reductions): Take a state_t as
7151 argument.
7152 (set_states, generate_states): Adjust.
7153 (save_shifts): Remove, replaced by...
7154 * src/state.h, src/state.c (state_shifts_set): New.
7155 (shifts): Rename as...
7156 (shifts_t): this.
7157 Adjust all dependencies.
7158 * src/state.h (state_t): Remove the `next' member.
7159
7160 2002-06-30 Akim Demaille <akim@epita.fr>
7161
7162 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
7163 escaped in slot 0.
7164
7165 2002-06-30 Akim Demaille <akim@epita.fr>
7166
7167 Use hash.h for the state hash table.
7168
7169 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
7170 (allocate_storage): Use state_hash_new.
7171 (free_storage): Use state_hash_free.
7172 (new_state, get_state): Adjust.
7173 * src/lalr.h, src/lalr.c (states): Move to...
7174 * src/states.h (state_t): Remove the `link' member, no longer
7175 used.
7176 * src/states.h, src/states.c: here.
7177 (state_hash_new, state_hash_free, state_hash_lookup)
7178 (state_hash_insert, states_free): New.
7179 * src/states.c (state_table, state_compare, state_hash): New.
7180 * src/output.c (output_actions): Do not free states now, since we
7181 still need to know the final_state number in `prepare', called
7182 afterwards. Do it...
7183 * src/main.c (main): here: call states_free after `output'.
7184
7185 2002-06-30 Akim Demaille <akim@epita.fr>
7186
7187 * src/state.h, src/state.c (state_new): New, extracted from...
7188 * src/LR0.c (new_state): here.
7189 * src/state.h (STATE_ALLOC): Move to...
7190 * src/state.c: here.
7191 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
7192 * src/state.h, src/state.c: here.
7193
7194 2002-06-30 Akim Demaille <akim@epita.fr>
7195
7196 * src/reader.c (gensym): Rename as...
7197 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
7198 (getsym): Rename as...
7199 (symbol_get): this.
7200
7201 2002-06-30 Akim Demaille <akim@epita.fr>
7202
7203 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
7204 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
7205 * src/output.c, src/print.c, src/print_graph.c: Propagate.
7206 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
7207
7208 2002-06-30 Akim Demaille <akim@epita.fr>
7209
7210 Make the test suite pass with warnings checked.
7211
7212 * tests/actions.at (Printers and Destructors): Improve.
7213 Avoid unsigned vs. signed issues.
7214 * tests/calc.at: Don't exercise the scanner here, do it...
7215 * tests/input.at (Torturing the Scanner): here.
7216
7217 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7218
7219 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
7220 reorganize first lines parallel to yacc.c.
7221
7222 2002-06-28 Akim Demaille <akim@epita.fr>
7223
7224 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
7225 (b4_token_enum, b4_token_defines): New, factored from...
7226 * data/lalr1.cc, data/yacc.c, glr.c: here.
7227
7228 2002-06-28 Akim Demaille <akim@epita.fr>
7229
7230 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
7231 unused variables.
7232 * src/output.c (merger_output): static.
7233
7234 2002-06-28 Akim Demaille <akim@epita.fr>
7235
7236 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
7237 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
7238 pacify GCC.
7239 * src/output.c (save_row): Initialize all the variables to pacify GCC.
7240
7241 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7242
7243 Accumulated changelog for new GLR parsing features.
7244
7245 * src/conflicts.c (count_total_conflicts): Change name to
7246 conflicts_total_count.
7247 * src/conflicts.h: Ditto.
7248 * src/output.c (token_actions): Use the new name.
7249 (output_conflicts): Change conflp => conflict_list_heads, and
7250 confl => conflict_list for better readability.
7251 * data/glr.c: Use the new names.
7252 * NEWS: Add self to GLR announcement.
7253
7254 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
7255
7256 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
7257 Akim Demaille.
7258
7259 * data/bison.glr: Change name to glr.c
7260 * data/glr.c: Renamed from bison.glr.
7261 * data/Makefile.am: Add glr.c
7262
7263 * src/getargs.c:
7264
7265 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
7266 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
7267
7268 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7269
7270 * data/bison.glr: Be sure to restore the
7271 current #line when returning to the skeleton contents after having
7272 exposed the input file's #line.
7273
7274 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7275
7276 * data/bison.glr: Bring up to date with changes to bison.simple.
7277
7278 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7279
7280 * data/bison.glr: Correct definitions that use b4_prefix.
7281 Various reformatting.
7282 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
7283 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
7284 yytokenp argument; now part of stack.
7285 (yychar): Define to behave as documented.
7286 (yyclearin): Ditto.
7287
7288 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7289
7290 * src/reader.h: Add declaration for free_merger_functions.
7291
7292 * src/reader.c (merge_functions): New variable.
7293 (get_merge_function): New function.
7294 (free_merger_functions): New function.
7295 (readgram): Check for %prec that is not followed by a symbol.
7296 Handle %dprec and %merge declarations.
7297 (packgram): Initialize dprec and merger fields in rules array.
7298
7299 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
7300 conflict_list_cnt, conflict_list_free): New variables.
7301 (table_grow): Also grow conflict_table.
7302 (prepare_rules): Output dprec and merger tables.
7303 (conflict_row): New function.
7304 (action_row): Output conflict lists for GLR parser. Don't use
7305 default reduction in conflicted states for GLR parser so that there
7306 are spaces for the conflict lists.
7307 (save_row): Also save conflict information.
7308 (token_actions): Allocate conflict list.
7309 (merger_output): New function.
7310 (pack_vector): Pack conflict table, too.
7311 (output_conflicts): New function to output yyconflp and yyconfl.
7312 (output_check): Allocate conflict_tos.
7313 (output_actions): Output conflict tables, also.
7314 (output_skeleton): Output b4_mergers definition.
7315 (prepare): Output b4_max_rhs_length definition.
7316 Use 'bison.glr' as default skeleton for GLR parsers.
7317
7318 * src/gram.c (glr_parser): New flag.
7319 (grammar_free): Call free_merger_functions.
7320
7321 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
7322 all pairs of conflicting reductions, rather than just all tokens
7323 causing conflicts. Needed to size conflict tables.
7324 (conflicts_output): Modify call to count_rr_conflicts for new
7325 interface.
7326 (conflicts_print): Ditto.
7327 (count_total_conflicts): New function.
7328
7329 * src/reader.h (merger_list): New type.
7330 (merge_functions): New variable.
7331
7332 * src/lex.h (tok_dprec, tok_merge): New token types.
7333
7334 * src/gram.h (rule_s): Add dprec and merger fields.
7335 (glr_parser): New flag.
7336
7337 * src/conflicts.h (count_total_conflicts): New function.
7338
7339 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
7340
7341 * doc/bison.texinfo (Generalized LR Parsing): New section.
7342 (GLR Parsers): New section.
7343 (Language and Grammar): Mention GLR parsing.
7344 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
7345 Correct typo ("tge" -> "the").
7346
7347 * data/bison.glr: New skeleton for GLR parsing.
7348
7349 * tests/cxx-gram.at: New tests for GLR parsing.
7350
7351 * tests/testsuite.at: Include cxx-gram.at.
7352
7353 * tests/Makefile.am: Add cxx-gram.at.
7354
7355 * src/parse-gram.y:
7356
7357 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
7358
7359 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
7360
7361 2002-06-27 Akim Demaille <akim@epita.fr>
7362
7363 * src/options.h, src/options.c: Remove.
7364 * src/getargs.c (short_options, long_options): New.
7365
7366 2002-06-27 Akim Demaille <akim@epita.fr>
7367
7368 * data/bison.simple, data/bison.c++: Rename as...
7369 * data/yacc.c, data/lalr1.cc: these.
7370 * doc/bison.texinfo (Environment Variables): Remove.
7371
7372 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
7373
7374 * src/getargs.c (report_argmatch): Initialize strtok().
7375
7376 2002-06-20 Akim Demaille <akim@epita.fr>
7377
7378 * data/bison.simple (b4_symbol_actions): New, replaces...
7379 (b4_symbol_destructor, b4_symbol_printer): these.
7380 (yysymprint): Be sure to call YYPRINT only for tokens, and using
7381 user token numbers.
7382
7383 2002-06-20 Akim Demaille <akim@epita.fr>
7384
7385 * data/bison.simple (yydestructor): Rename as...
7386 (yydestruct): this.
7387
7388 2002-06-20 Akim Demaille <akim@epita.fr>
7389
7390 * src/symtab.h, src/symtab.c (symbol_type_set)
7391 (symbol_destructor_set, symbol_precedence_set): The location is
7392 the last argument.
7393 Adjust all callers.
7394
7395 2002-06-20 Akim Demaille <akim@epita.fr>
7396
7397 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
7398 internals.
7399 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
7400 Takes a location.
7401 * src/symtab.h, src/symtab.c (symbol_class_set)
7402 (symbol_user_token_number_set): Likewise.
7403 Adjust all callers.
7404 Promote complain_at.
7405 * tests/input.at (Type Clashes): Adjust.
7406
7407 2002-06-20 Akim Demaille <akim@epita.fr>
7408
7409 * data/bison.simple (YYLEX): Fix the declaration when
7410 %pure-parser.
7411
7412 2002-06-20 Akim Demaille <akim@epita.fr>
7413
7414 * data/bison.simple (yysymprint): Don't print the token number,
7415 just its name.
7416 * tests/actions.at (Destructors): Rename as...
7417 (Printers and Destructors): this.
7418 Also exercise %printer.
7419
7420 2002-06-20 Akim Demaille <akim@epita.fr>
7421
7422 * data/bison.simple (YYDSYMPRINT): New.
7423 Use it to remove many of the #if YYDEBUG/if (yydebug).
7424
7425 2002-06-20 Akim Demaille <akim@epita.fr>
7426
7427 * src/symtab.h, src/symtab.c (symbol_t): printer and
7428 printer_location are new members.
7429 (symbol_printer_set): New.
7430 * src/parse-gram.y (PERCENT_PRINTER): New token.
7431 Handle its associated rule.
7432 * src/scan-gram.l: Adjust.
7433 (handle_destructor_at, handle_destructor_dollar): Rename as...
7434 (handle_symbol_code_at, handle_symbol_code_dollar): these.
7435 * src/output.c (symbol_printers_output): New.
7436 (output_skeleton): Call it.
7437 * data/bison.simple (yysymprint): New. Cannot be named yyprint
7438 since there are already many grammar files with a user `yyprint'.
7439 Replace the calls to YYPRINT to calls to yysymprint.
7440 * tests/calc.at: Adjust.
7441 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
7442 taking advantage of parser very internal details (stack size!).
7443
7444 2002-06-20 Akim Demaille <akim@epita.fr>
7445
7446 * src/scan-gram.l: Complete the scanner with the missing patterns
7447 to pacify Flex.
7448 Use `quote' and `symbol_tag_get' where appropriate.
7449
7450 2002-06-19 Akim Demaille <akim@epita.fr>
7451
7452 * tests/actions.at (Destructors): Augment to test locations.
7453 * data/bison.simple (yydestructor): Pass it the current location
7454 if locations are enabled.
7455 Prototype only when __STDC__ or C++.
7456 Change the argument names to move into the yy name space: there is
7457 user code here.
7458
7459 2002-06-19 Akim Demaille <akim@epita.fr>
7460
7461 * data/bison.simple (b4_pure_if): New.
7462 Use it instead of #ifdef YYPURE.
7463
7464 2002-06-19 Akim Demaille <akim@epita.fr>
7465
7466 * data/bison.simple (b4_location_if): New.
7467 Use it instead of #ifdef YYLSP_NEEDED.
7468
7469 2002-06-19 Akim Demaille <akim@epita.fr>
7470
7471 Prepare @$ in %destructor, but currently don't bind it in the
7472 skeleton, as %location use is not cleaned up yet.
7473
7474 * src/scan-gram.l (handle_dollar, handle_destructor_at)
7475 (handle_action_at): New.
7476 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
7477 a braced_code_t and a location as additional arguments.
7478 (handle_destructor_dollar): Instead of requiring `b4_eval', just
7479 unquote one when outputting `b4_dollar_dollar'.
7480 Adjust callers.
7481 * data/bison.simple (b4_eval): Remove.
7482 (b4_symbol_destructor): Adjust.
7483 * tests/input.at (Invalid @n): Adjust.
7484
7485 2002-06-19 Zack Weinberg <zack@codesourcery.com>
7486
7487 * doc/bison.texinfo: Document ability to have multiple
7488 prologue sections.
7489
7490 2002-06-18 Akim Demaille <akim@epita.fr>
7491
7492 * src/files.c (compute_base_names): When computing the output file
7493 names from the input file name, strip the directory part.
7494
7495 2002-06-18 Akim Demaille <akim@epita.fr>
7496
7497 * data/bison.simple.new: Comment changes.
7498 Reported by Andreas Schwab.
7499
7500 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
7501
7502 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
7503 there are no `label `yyoverflowlab' defined but not used' warnings
7504 when yyoverflow is defined.
7505
7506 2002-06-18 Akim Demaille <akim@epita.fr>
7507
7508 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
7509 new member.
7510 (symbol_destructor_set): Adjust.
7511 * src/output.c (symbol_destructors_output): Output the destructor
7512 locations.
7513 Output the symbol name.
7514 * data/bison.simple (b4_symbol_destructor): Adjust.
7515
7516 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
7517 and Akim Demaille <akim@epita.fr>
7518
7519 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
7520 what's left on the stack when the error recovery hits EOF.
7521 * tests/actions.at (Destructors): Complete to exercise this case.
7522
7523 2002-06-17 Akim Demaille <akim@epita.fr>
7524
7525 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
7526 arguments is really empty, not only equal to `[]'.
7527 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
7528 member.
7529 (symbol_destructor_set): New.
7530 * src/output.c (symbol_destructors_output): New.
7531 * src/reader.h (brace_code_t, current_braced_code): New.
7532 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
7533 (handle_dollar): Rename as...
7534 (handle_action_dollar): this.
7535 (handle_destructor_dollar): New.
7536 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
7537 (grammar_declaration): Use it.
7538 * data/bison.simple (yystos): Is always defined.
7539 (yydestructor): New.
7540 * tests/actions.at (Destructors): New.
7541 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
7542
7543 2002-06-17 Akim Demaille <akim@epita.fr>
7544
7545 * src/symlist.h, src/symlist.c (symbol_list_length): New.
7546 * src/scan-gram.l (handle_dollar, handle_at): Compute the
7547 rule_length only when needed.
7548 * src/output.c (actions_output, token_definitions_output): Output
7549 the full M4 block.
7550 * src/symtab.c: Don't access directly to the symbol tag, use
7551 symbol_tag_get.
7552 * src/parse-gram.y: Use symbol_list_free.
7553
7554 2002-06-17 Akim Demaille <akim@epita.fr>
7555
7556 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
7557 (symbol_list_prepend, get_type_name): Move to...
7558 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
7559 (symbol_list_prepend, symbol_list_n_type_name_get): here.
7560 Adjust all callers.
7561 (symbol_list_free): New.
7562 * src/scan-gram.l (handle_dollar): Takes a location.
7563 * tests/input.at (Invalid $n): Adjust.
7564
7565 2002-06-17 Akim Demaille <akim@epita.fr>
7566
7567 * src/reader.h, src/reader.c (symbol_list_new): Export it.
7568 (symbol_list_prepend): New.
7569 * src/parse-gram.y (%union): `list' is a new member.
7570 (symbols.1): New, replaces...
7571 (terms_to_prec.1, nterms_to_type.1): these.
7572 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
7573 Take a location as additional argument.
7574 Adjust all callers.
7575
7576 2002-06-15 Akim Demaille <akim@epita.fr>
7577
7578 * src/parse-gram.y: Move %token in the declaration section so that
7579 we don't depend upon CVS Bison.
7580
7581 2002-06-15 Akim Demaille <akim@epita.fr>
7582
7583 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
7584 * src/print.c (print_core): Use it.
7585
7586 2002-06-15 Akim Demaille <akim@epita.fr>
7587
7588 * src/conflicts.c (log_resolution): Accept the rule involved in
7589 the sr conflicts instead of the lookahead number that points to
7590 that rule.
7591 (flush_reduce): Accept the current lookahead vector as argument,
7592 instead of the index in LA.
7593 (resolve_sr_conflict): Accept the current number of lookahead
7594 bitset to consider for the STATE, instead of the index in LA.
7595 (set_conflicts): Adjust.
7596 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
7597
7598 2002-06-15 Akim Demaille <akim@epita.fr>
7599
7600 * src/state.h (state_t): Replace the `lookaheadsp' member, a
7601 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
7602 Adjust all dependencies.
7603 * src/lalr.c (initialize_lookaheads): Split into...
7604 (states_lookaheads_count, states_lookaheads_initialize): these.
7605 (lalr): Adjust.
7606
7607 2002-06-15 Akim Demaille <akim@epita.fr>
7608
7609 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
7610 out of...
7611 (grammar_rules_print): here.
7612 * src/reduce.c (reduce_output): Use it.
7613 * tests/reduce.at (Useless Rules, Reduced Automaton)
7614 (Underivable Rules): Adjust.
7615
7616 2002-06-15 Akim Demaille <akim@epita.fr>
7617
7618 Copy BYacc's nice way to report the grammar.
7619
7620 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
7621 New.
7622 Don't print the rules' location, it is confusing and useless.
7623 (rule_print): Use grammar_rhs_print.
7624 * src/print.c (print_grammar): Use grammar_rules_print.
7625
7626 2002-06-15 Akim Demaille <akim@epita.fr>
7627
7628 Complete and rationalize `useless thing' warnings.
7629
7630 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
7631 (symbol_tag_print): New.
7632 Use them everywhere in place of accessing directly the tag member.
7633 * src/gram.h, src/gram.c (rule_print): New.
7634 Use it where a rule used to be printed `by hand'.
7635 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
7636 (reduce_grammar_tables): Report the useless rules.
7637 (reduce_print): Useless things are a warning, not an error.
7638 Report it as such.
7639 * tests/reduce.at (Useless Nonterminals, Useless Rules):
7640 (Reduced Automaton, Underivable Rules): Adjust.
7641 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
7642 * tests/conflicts.at (Unresolved SR Conflicts)
7643 (Solved SR Conflicts): Adjust.
7644
7645 2002-06-15 Akim Demaille <akim@epita.fr>
7646
7647 Let symbols have a location.
7648
7649 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
7650 (getsym): Adjust.
7651 Adjust all callers.
7652 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
7653 Use location_t, not int.
7654 * src/symtab.c (symbol_check_defined): Take advantage of the
7655 location.
7656 * tests/regression.at (Invalid inputs): Adjust.
7657
7658 2002-06-15 Akim Demaille <akim@epita.fr>
7659
7660 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
7661 (input): Don't try to initialize yylloc here, do it in the
7662 scanner.
7663 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
7664 * src/gram.h (rule_t): Change line and action_line into location
7665 and action_location, of location_t type.
7666 Adjust all dependencies.
7667 * src/location.h, src/location.c (empty_location): New.
7668 * src/reader.h, src/reader.c (grammar_start_symbol_set)
7669 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
7670 (grammar_current_rule_symbol_append)
7671 (grammar_current_rule_action_append): Expect a location as argument.
7672 * src/reader.c (grammar_midrule_action): Adjust to attach an
7673 action's location as dummy symbol location.
7674 * src/symtab.h, src/symtab.c (startsymbol_location): New.
7675 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
7676 the line numbers.
7677
7678 2002-06-14 Akim Demaille <akim@epita.fr>
7679
7680 Grammar declarations may be found in the grammar section.
7681
7682 * src/parse-gram.y (rules_or_grammar_declaration): New.
7683 (declarations): Each declaration may end with a semicolon, not
7684 just...
7685 (grammar_declaration): `"%union"'.
7686 (grammar): Branch to rules_or_grammar_declaration.
7687
7688 2002-06-14 Akim Demaille <akim@epita.fr>
7689
7690 * src/main.c (main): Invoke scanner_free.
7691
7692 2002-06-14 Akim Demaille <akim@epita.fr>
7693
7694 * src/output.c (m4_invoke): Extracted from...
7695 (output_skeleton): here.
7696 Free tempfile.
7697
7698 2002-06-14 Akim Demaille <akim@epita.fr>
7699
7700 * src/parse-gram.y (directives, directive, gram)
7701 (grammar_directives, precedence_directives, precedence_directive):
7702 Rename as...
7703 (declarations, declaration, grammar, grammar_declaration)
7704 (precedence_declaration, precedence_declarator): these.
7705 (symbol_declaration): New.
7706
7707 2002-06-14 Akim Demaille <akim@epita.fr>
7708
7709 * src/files.c (action_obstack): Remove, unused.
7710 (output_obstack): Remove it, and all its dependencies, as it is no
7711 longer needed.
7712 * src/reader.c (epilogue_set): Build the epilogue in the
7713 muscle_obstack.
7714 * src/output.h, src/output.c (muscle_obstack): Move to...
7715 * src/muscle_tab.h, src/muscle_tab.h: here.
7716 (muscle_init): Initialize muscle_obstack.
7717 (muscle_free): New.
7718 * src/main.c (main): Call it.
7719
7720 2002-06-14 Akim Demaille <akim@epita.fr>
7721
7722 * src/location.h: New, extracted from...
7723 * src/reader.h: here.
7724 * src/Makefile.am (noinst_HEADERS): Merge into
7725 (bison_SOURCES): this.
7726 Add location.h.
7727 * src/parse-gram.y: Use location_t instead of Bison's.
7728 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
7729 Use location_t instead of ints.
7730
7731 2002-06-14 Akim Demaille <akim@epita.fr>
7732
7733 * data/bison.simple, data/bison.c++: Be sure to restore the
7734 current #line when returning to the skeleton contents after having
7735 exposed the input file's #line.
7736
7737 2002-06-12 Akim Demaille <akim@epita.fr>
7738
7739 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
7740 eager.
7741 * tests/actions.at (Exotic Dollars): New.
7742
7743 2002-06-12 Akim Demaille <akim@epita.fr>
7744
7745 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
7746 ['"/] too eagerly.
7747 * tests/input.at (Torturing the Scanner): New.
7748
7749 2002-06-11 Akim Demaille <akim@epita.fr>
7750
7751 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
7752 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
7753 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
7754 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
7755 * src/reader.c (reader): Use it.
7756
7757 2002-06-11 Akim Demaille <akim@epita.fr>
7758
7759 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
7760 Adjust all callers.
7761 (scanner_last_string_free): New.
7762
7763 2002-06-11 Akim Demaille <akim@epita.fr>
7764
7765 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
7766 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
7767 (last_string, YY_OBS_FREE): New.
7768 Use them when returning an ID.
7769
7770 2002-06-11 Akim Demaille <akim@epita.fr>
7771
7772 Have Bison grammars parsed by a Bison grammar.
7773
7774 * src/reader.c, src/reader.h (prologue_augment): New.
7775 * src/reader.c (copy_definition): Remove.
7776
7777 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
7778 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
7779 (grammar_current_rule_prec_set, grammar_current_rule_check)
7780 (grammar_current_rule_symbol_append)
7781 (grammar_current_rule_action_append): Export.
7782 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
7783 (symbol_list_action_append): Remove.
7784 Hook the routines from reader.
7785 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
7786 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
7787
7788 * src/reader.c (read_declarations): Remove, unused.
7789
7790 * src/parse-gram.y: Handle the epilogue.
7791 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
7792 (grammar_start_symbol_set): this.
7793 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
7794 * src/reader.c (readgram): Remove, unused.
7795 (reader): Adjust to insert eoftoken and axiom where appropriate.
7796
7797 * src/reader.c (copy_dollar): Replace with...
7798 * src/scan-gram.h (handle_dollar): this.
7799 * src/parse-gram.y: Remove `%thong'.
7800
7801 * src/reader.c (copy_at): Replace with...
7802 * src/scan-gram.h (handle_at): this.
7803
7804 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
7805 New.
7806
7807 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
7808 time being.
7809
7810 * src/reader.h, src/reader.c (grammar_rule_end): New.
7811
7812 * src/parse.y (current_type, current_class): New.
7813 Implement `%nterm', `%token' support.
7814 Merge `%term' into `%token'.
7815 (string_as_id): New.
7816 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
7817 type name.
7818
7819 * src/parse-gram.y: Be sure to handle properly the beginning of
7820 rules.
7821
7822 * src/parse-gram.y: Handle %type.
7823 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
7824
7825 * src/parse-gram.y: More directives support.
7826 * src/options.c: No longer handle source directives.
7827
7828 * src/parse-gram.y: Fix %output.
7829
7830 * src/parse-gram.y: Handle %union.
7831 Use the prologue locations.
7832 * src/reader.c (parse_union_decl): Remove.
7833
7834 * src/reader.h, src/reader.c (epilogue_set): New.
7835 * src/parse-gram.y: Use it.
7836
7837 * data/bison.simple, data/bison.c++: b4_stype is now either not
7838 defined, then default to int, or to the contents of %union,
7839 without `union' itself.
7840 Adjust.
7841 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
7842
7843 * src/output.c (actions_output): Don't output braces, as they are
7844 already handled by the scanner.
7845
7846 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
7847 characters to themselves.
7848
7849 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
7850 that the epilogue has a proper #line.
7851
7852 * src/parse-gram.y: Handle precedence/associativity.
7853
7854 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
7855 a terminal.
7856 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
7857 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
7858 at all to define terminals that cannot be emitted.
7859
7860 * src/scan-gram.l: Escape M4 characters.
7861
7862 * src/scan-gram.l: Working properly with escapes in user
7863 strings/characters.
7864
7865 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
7866 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
7867 grammar.
7868 Use more modest sizes, as for the time being the parser does not
7869 release memory, and therefore the process swallows a huge amount
7870 of memory.
7871
7872 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
7873 stricter %token grammar.
7874
7875 * src/symtab.h (associativity): Add `undef_assoc'.
7876 (symbol_precedence_set): Do nothing when passed an undef_assoc.
7877 * src/symtab.c (symbol_check_alias_consistence): Adjust.
7878
7879 * tests/regression.at (Invalid %directive): Remove, as it is now
7880 meaningless.
7881 (Invalid inputs): Adjust to the new error messages.
7882 (Token definitions): The new grammar doesn't allow too many
7883 eccentricities.
7884
7885 * src/lex.h, src/lex.c: Remove.
7886 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
7887 (copy_character, copy_string2, copy_string, copy_identifier)
7888 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
7889 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
7890 (parse_action): Remove.
7891 * po/POTFILES.in: Adjust.
7892
7893 2002-06-11 Akim Demaille <akim@epita.fr>
7894
7895 * src/reader.c (parse_action): Don't store directly into the
7896 rule's action member: return the action as a string.
7897 Don't require `rule_length' as an argument: compute it.
7898 (grammar_current_rule_symbol_append)
7899 (grammar_current_rule_action_append): New, eved out from
7900 (readgram): here.
7901 Remove `action_flag', `rulelength', unused now.
7902
7903 2002-06-11 Akim Demaille <akim@epita.fr>
7904
7905 * src/reader.c (grammar_current_rule_prec_set).
7906 (grammar_current_rule_check): New, eved out from...
7907 (readgram): here.
7908 Remove `xaction', `first_rhs': useless.
7909 * tests/input.at (Type clashes): New.
7910 * tests/existing.at (GNU Cim Grammar): Adjust.
7911
7912 2002-06-11 Akim Demaille <akim@epita.fr>
7913
7914 * src/reader.c (grammar_midrule_action): New, Eved out from
7915 (readgram): here.
7916
7917 2002-06-11 Akim Demaille <akim@epita.fr>
7918
7919 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
7920 New.
7921 (readgram): Use them as replacement of inlined code, crule and
7922 crule1.
7923
7924 2002-06-11 Akim Demaille <akim@epita.fr>
7925
7926 * src/reader.c (grammar_end, grammar_symbol_append): New.
7927 (readgram): Use them.
7928 Make the use of `p' as local as possible.
7929
7930 2002-06-10 Akim Demaille <akim@epita.fr>
7931
7932 GCJ's parser requires the tokens to be defined before the prologue.
7933
7934 * data/bison.simple: Output the token definition before the user's
7935 prologue.
7936 * tests/regression.at (Braces parsing, Duplicate string)
7937 (Mixing %token styles): Check the output from bison.
7938 (Early token definitions): New.
7939
7940 2002-06-10 Akim Demaille <akim@epita.fr>
7941
7942 * src/symtab.c (symbol_user_token_number_set): Don't complain when
7943 assigning twice the same user number to a token, so that we can
7944 use it in...
7945 * src/lex.c (lex): here.
7946 Also use `symbol_class_set' instead of hand written code.
7947 * src/reader.c (parse_assoc_decl): Likewise.
7948
7949 2002-06-10 Akim Demaille <akim@epita.fr>
7950
7951 * src/symtab.c, src/symtab.c (symbol_class_set)
7952 (symbol_user_token_number_set): New.
7953 * src/reader.c (parse_token_decl): Use them.
7954 Use a switch instead of ifs.
7955 Use a single argument.
7956
7957 2002-06-10 Akim Demaille <akim@epita.fr>
7958
7959 Remove `%thong' support as it is undocumented, unused, duplicates
7960 `%token's job, and creates useless e-mail traffic with people who
7961 want to know what it is, why it is undocumented, unused, and
7962 duplicates `%token's job.
7963
7964 * src/reader.c (parse_thong_decl): Remove.
7965 * src/options.c (option_table): Remove "thong".
7966 * src/lex.h (tok_thong): Remove.
7967
7968 2002-06-10 Akim Demaille <akim@epita.fr>
7969
7970 * src/symtab.c, src/symtab.c (symbol_type_set)
7971 (symbol_precedence_set): New.
7972 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
7973 (value_components_used): Remove, unused.
7974
7975 2002-06-09 Akim Demaille <akim@epita.fr>
7976
7977 Move symbols handling code out of the reader.
7978
7979 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
7980 (axiom): Move to...
7981 * src/symtab.h, src/symtab.c: here.
7982
7983 * src/gram.c (start_symbol): Remove: use startsymbol->number.
7984 * src/reader.c (startval): Rename as...
7985 * src/symtab.h, src/symtab.c (startsymbol): this.
7986 * src/reader.c: Adjust.
7987
7988 * src/reader.c (symbol_check_defined, symbol_make_alias)
7989 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
7990 (token_translations_init)
7991 Move to...
7992 * src/symtab.c: here.
7993 * src/reader.c (packsymbols): Move to...
7994 * src/symtab.h, src/symtab.c (symbols_pack): here.
7995 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
7996 argument.
7997
7998 2002-06-03 Akim Demaille <akim@epita.fr>
7999
8000 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
8001 then statements.
8002
8003 2002-06-03 Akim Demaille <akim@epita.fr>
8004
8005 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
8006 structs with non literals.
8007 * src/scan-skel.l: never-interactive.
8008 * src/conflicts.c (enum conflict_resolution_e): No trailing
8009 comma.
8010 * src/getargs.c (usage): Split long literal strings.
8011 Reported by Hans Aberg.
8012
8013 2002-05-28 Akim Demaille <akim@epita.fr>
8014
8015 * data/bison.c++: Use C++ ostreams.
8016 (cdebug_): New member.
8017
8018 2002-05-28 Akim Demaille <akim@epita.fr>
8019
8020 * src/output.c (output_skeleton): Be sure to allocate enough room
8021 for `/' _and_ for `\0' in full_skeleton.
8022
8023 2002-05-28 Akim Demaille <akim@epita.fr>
8024
8025 * data/bison.c++: Catch up with bison.simple:
8026 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8027 and Paul Eggert <eggert@twinsun.com>: `error' handing.
8028 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
8029 and popping traces.
8030
8031 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8032
8033 * src/output.c (output_skeleton): Put an explicit path in front of
8034 the skeleton file name, rather than relying on the -I directory,
8035 to partially alleviate effects of having a skeleton file lying around
8036 in the current directory.
8037
8038 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8039
8040 * src/conflicts.c (log_resolution): Correct typo:
8041 obstack_printf should be obstack_fgrow1.
8042
8043 2002-05-26 Akim Demaille <akim@epita.fr>
8044
8045 * src/state.h (state_t): `solved_conflicts' is a new member.
8046 * src/LR0.c (new_state): Set it to 0.
8047 * src/conflicts.h, src/conflicts.c (print_conflicts)
8048 (free_conflicts, solve_conflicts): Rename as...
8049 (conflicts_print, conflicts_free, conflicts_solve): these.
8050 Adjust callers.
8051 * src/conflicts.c (enum conflict_resolution_e)
8052 (solved_conflicts_obstack): New, used by...
8053 (log_resolution): this.
8054 Adjust to attach the conflict resolution to each state.
8055 Complete the description with the precedence/associativity
8056 information.
8057 (resolve_sr_conflict): Adjust.
8058 * src/print.c (print_state): Output its solved_conflicts.
8059 * tests/conflicts.at (Unresolved SR Conflicts)
8060 (Solved SR Conflicts): Exercise --report=all.
8061
8062 2002-05-26 Akim Demaille <akim@epita.fr>
8063
8064 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
8065 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
8066 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
8067 (token_number_t, item_number_as_token_number)
8068 (token_number_as_item_number, muscle_insert_token_number_table):
8069 Rename as...
8070 (symbol_number_t, item_number_as_symbol_number)
8071 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
8072 these, since it is more appropriate.
8073
8074 2002-05-26 Akim Demaille <akim@epita.fr>
8075
8076 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
8077 `Error:' lines.
8078 * data/bison.simple (yystos) [YYDEBUG]: New.
8079 (yyparse) [YYDEBUG]: Display the symbols which are popped during
8080 error recovery.
8081 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
8082
8083 2002-05-25 Akim Demaille <akim@epita.fr>
8084
8085 * doc/bison.texinfo (Debugging): Split into...
8086 (Tracing): this new section, its former contents, and...
8087 (Understanding): this new section.
8088 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
8089 by...
8090 (report_flag): this.
8091 Adjust all dependencies.
8092 (report_args, report_types, report_argmatch): New.
8093 (usage, getargs): Report/support -r, --report.
8094 * src/options.h
8095 (struct option_table_struct): Rename as..,
8096 (struct option_table_s): this.
8097 Rename the `set_flag' member to `flag' to match with getopt_long's
8098 struct.
8099 * src/options.c (option_table): Split verbose into an entry for
8100 %verbose, and another for --verbose.
8101 Support --report/-r, so remove -r from the obsolete --raw.
8102 * src/print.c: Attach full item sets and lookaheads reports to
8103 report_flag instead of trace_flag.
8104 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
8105
8106 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8107 and Paul Eggert <eggert@twinsun.com>
8108
8109 * data/bison.simple (yyparse): Correct error handling to conform to
8110 POSIX and yacc. Specifically, after syntax error is discovered,
8111 do not reduce further before shifting the error token.
8112 Clean up the code a bit by removing the labels yyerrdefault,
8113 yyerrhandle, yyerrpop.
8114 * NEWS: Document the above.
8115
8116 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8117
8118 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
8119 type; it isn't always big enough, since it doesn't necessarily
8120 include non-terminals.
8121 (yytranslate): Expand definition of yy_token_number_type, so that
8122 the latter can be removed.
8123 (yy_token_number_type): Remove, only one use.
8124 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
8125 don't use TokenNumberType as element type.
8126
8127 * tests/regression.at: Modify expected output to agree with change
8128 to yyr1 and yytranslate.
8129
8130 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
8131
8132 * src/reader.c (parse_action): Use copy_character instead of
8133 obstack_1grow.
8134
8135 2002-05-13 Akim Demaille <akim@epita.fr>
8136
8137 * tests/regression.at (Token definitions): Prototype yylex and
8138 yyerror.
8139
8140 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8141
8142 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
8143 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
8144 32-bit arithmetic.
8145 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
8146
8147 2002-05-07 Akim Demaille <akim@epita.fr>
8148
8149 * tests/synclines.at: Be sure to prototype yylex and yyerror to
8150 avoid GCC warnings.
8151
8152 2002-05-07 Akim Demaille <akim@epita.fr>
8153
8154 Kill GCC warnings.
8155
8156 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
8157 over the RHS of each rule.
8158 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
8159 * src/state.h (state_t): Member `nitems' is unsigned short.
8160 * src/LR0.c (get_state): Adjust.
8161 * src/reader.c (packgram): Likewise.
8162 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
8163 `Type'.
8164 (muscle_insert_int_table): Remove, unused.
8165 (prepare_rules): Remove `max'.
8166
8167 2002-05-06 Akim Demaille <akim@epita.fr>
8168
8169 * src/closure.c (print_firsts): Display of the symbol tags.
8170 (bitmatrix_print): Move to...
8171 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
8172 here.
8173 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
8174
8175 2002-05-06 Akim Demaille <akim@epita.fr>
8176
8177 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
8178 hash_do_for_each.
8179
8180 2002-05-06 Akim Demaille <akim@epita.fr>
8181
8182 * src/LR0.c (new_state, get_state): Instead of using the global
8183 `kernel_size' and `kernel_base', have two new arguments:
8184 `core_size' and `core'.
8185 Adjust callers.
8186
8187 2002-05-06 Akim Demaille <akim@epita.fr>
8188
8189 * src/reader.c (packgram): No longer end `ritem' with a 0
8190 sentinel: it is not used.
8191
8192 2002-05-05 Akim Demaille <akim@epita.fr>
8193
8194 New experimental feature: display the lookaheads in the report and
8195 graph.
8196
8197 * src/print (print_core): When --trace-flag, display the rules
8198 lookaheads.
8199 * src/print_graph.c (print_core): Likewise.
8200 Swap the arguments.
8201 Adjust caller.
8202
8203 2002-05-05 Akim Demaille <akim@epita.fr>
8204
8205 * tests/torture.at (Many lookaheads): New test.
8206
8207 2002-05-05 Akim Demaille <akim@epita.fr>
8208
8209 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
8210 (GENERATE_MUSCLE_INSERT_TABLE): this.
8211 (output_int_table, output_unsigned_int_table, output_short_table)
8212 (output_token_number_table, output_item_number_table): Replace with...
8213 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
8214 (muscle_insert_short_table, muscle_insert_token_number_table)
8215 (muscle_insert_item_number_table): these.
8216 Adjust all callers.
8217 (prepare_tokens): Don't free `translations', since...
8218 * src/reader.h, src/reader.c (grammar_free): do it.
8219 Move to...
8220 * src/gram.h, src/gram.c (grammar_free): here.
8221 * data/bison.simple, data/bison.c++: b4_token_number_max is now
8222 b4_translate_max.
8223
8224 2002-05-05 Akim Demaille <akim@epita.fr>
8225
8226 * src/output.c (output_unsigned_int_table): New.
8227 (prepare_rules): `i' is unsigned.
8228 `prhs', `rline', `r2' are unsigned int.
8229 Rename muscle `rhs_number_max' as `rhs_max'.
8230 Output muscles `prhs_max', `rline_max', and `r2_max'.
8231 Free rline and r1.
8232 * data/bison.simple, data/bison.c++: Adjust to use these muscles
8233 to compute types instead of constant types.
8234 * tests/regression.at (Web2c Actions): Adjust.
8235
8236 2002-05-04 Akim Demaille <akim@epita.fr>
8237
8238 * src/symtab.h (SALIAS, SUNDEF): Rename as...
8239 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
8240 Adjust dependencies.
8241 * src/output.c (token_definitions_output): Be sure not to output a
8242 `#define 'a'' when fed with `%token 'a' "a"'.
8243 * tests/regression.at (Token definitions): New.
8244
8245 2002-05-03 Paul Eggert <eggert@twinsun.com>
8246
8247 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
8248 for K&R C.
8249
8250 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
8251
8252 * Makefile.am (SUBDIRS): Remove intl.
8253 (EXTRA_DIST): Add config/config.rpath.
8254
8255 2002-05-03 Akim Demaille <akim@epita.fr>
8256
8257 * data/bison.simple (m4_if): Don't output empty enums.
8258 And actually, output valid enum definitions :(.
8259
8260 2002-05-03 Akim Demaille <akim@epita.fr>
8261
8262 * configure.bat: Remove, completely obsolete.
8263 * Makefile.am (EXTRA_DIST): Adjust.
8264 Don't distribute config.rpath...
8265 * config/Makefile.am (EXTRA_DIST): Do it.
8266
8267 2002-05-03 Akim Demaille <akim@epita.fr>
8268
8269 * configure.in (GETTEXT_VERSION): New.
8270 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
8271
8272 2002-05-03 Akim Demaille <akim@epita.fr>
8273
8274 * data/bison.simple (b4_token_enum): New.
8275 (b4_token_defines): Use it to output tokens both as #define and
8276 enums.
8277 Suggested by Paul Eggert.
8278 * src/output.c (token_definitions_output): Don't output spurious
8279 white spaces.
8280
8281 2002-05-03 Akim Demaille <akim@epita.fr>
8282
8283 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
8284
8285 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
8286
8287 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
8288 Update the stack class, give a try to deque as the default container.
8289
8290 2002-05-02 Akim Demaille <akim@epita.fr>
8291
8292 * data/bison.simple (yyparse): Do not implement @$ = @1.
8293 (YYLLOC_DEFAULT): Adjust to do it.
8294 * doc/bison.texinfo (Location Default Action): Fix.
8295
8296 2002-05-02 Akim Demaille <akim@epita.fr>
8297
8298 * src/reader.c (parse_braces): Merge into...
8299 (parse_action): this.
8300
8301 2002-05-02 Akim Demaille <akim@epita.fr>
8302
8303 * configure.in (ALL_LINGUAS): Remove.
8304 * po/LINGUAS, hr.po: New.
8305
8306 2002-05-02 Akim Demaille <akim@epita.fr>
8307
8308 Remove the so called hairy (semantic) parsers.
8309
8310 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
8311 * src/gram.h, src/gram.c (semantic_parser): Remove.
8312 (rule_t): Remove the guard and guard_line members.
8313 * src/lex.h (token_t): remove tok_guard.
8314 * src/options.c (option_table): Remove %guard and %semantic_parser
8315 support.
8316 * src/output.c, src/output.h (guards_output): Remove.
8317 (prepare): Adjust.
8318 (token_definitions_output): Don't output the `T'
8319 tokens (???).
8320 (output_skeleton): Don't output the guards.
8321 * src/files.c, src/files.c (attrsfile): Remove.
8322 * src/reader.c (symbol_list): Remove the guard and guard_line
8323 members.
8324 Adjust dependencies.
8325 (parse_guard): Remove.
8326 * data/bison.hairy: Remove.
8327 * doc/bison.texinfo (Environment Variables): Remove occurrences of
8328 BISON_HAIRY.
8329
8330 2002-05-02 Akim Demaille <akim@epita.fr>
8331
8332 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
8333 (parse_guard): Rename the formal argument `stack_offset' as
8334 `rule_length', which is more readable.
8335 Adjust callers.
8336 (copy_at, copy_dollar): Instead of outputting the hard coded
8337 values of $$, $n and so forth, output invocation to b4_lhs_value,
8338 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
8339 Note: this patch partially drops `semantic-parser' support: it
8340 always does `rule_length - n', where semantic parsers ought to
8341 always use `-n'.
8342 * data/bison.simple, data/bison.c++ (b4_lhs_value)
8343 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
8344
8345 2002-05-02 Akim Demaille <akim@epita.fr>
8346
8347 * configure.in (AC_INIT): Bump to 1.49b.
8348 (AM_INIT_AUTOMAKE): Short invocation.
8349
8350 2002-05-02 Akim Demaille <akim@epita.fr>
8351
8352 Version 1.49a.
8353
8354 2002-05-01 Akim Demaille <akim@epita.fr>
8355
8356 * src/skeleton.h: Remove.
8357
8358 2002-05-01 Akim Demaille <akim@epita.fr>
8359
8360 * src/skeleton.h: Fix the #endif.
8361 Reported by Magnus Fromreide.
8362
8363 2002-04-26 Paul Eggert <eggert@twinsun.com>
8364
8365 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
8366 Define if we define YYSTYPE and YYLTYPE, respectively.
8367 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8368
8369 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
8370
8371 * src/scan-skel.l: Postprocess quadrigraphs.
8372
8373 * src/reader.c (copy_character): New function, used to output
8374 single characters while replacing `[' and `]' with quadrigraphs, to
8375 avoid troubles with M4 quotes.
8376 (copy_comment): Output characters with copy_character.
8377 (read_additionnal_code): Likewise.
8378 (copy_string2): Likewise.
8379 (copy_definition): Likewise.
8380
8381 * tests/calc.at: Exercise M4 quoting.
8382
8383 2002-04-25 Akim Demaille <akim@epita.fr>
8384
8385 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
8386 between `!' and the command.
8387 Reported by Paul Eggert.
8388
8389 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
8390
8391 * tests/calc.at: Exercise prologue splitting.
8392
8393 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
8394 `b4_post_prologue' instead of `b4_prologue'.
8395
8396 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
8397 muscles.
8398 (output): Free pre_prologue_obstack and post_prologue_obstack.
8399 * src/files.h, src/files.c (attrs_obstack): Remove.
8400 (pre_prologue_obstack, post_prologue_obstack): New.
8401 * src/reader.c (copy_definition): Add a parameter to specify the
8402 obstack to fill, instead of using attrs_obstack unconditionally.
8403 (read_declarations): Pass pre_prologue_obstack to copy_definition if
8404 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
8405
8406 2002-04-23 Paul Eggert <eggert@twinsun.com>
8407
8408 * data/bison.simple: Remove unnecessary commentary and white
8409 space differences from 1_29-branch.
8410 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
8411
8412 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
8413 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
8414 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
8415 constructors or destructors.
8416
8417 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
8418
8419 2002-04-23 Akim Demaille <akim@epita.fr>
8420
8421 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
8422 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
8423 location with columns.
8424 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
8425 All reported by Paul Eggert.
8426
8427 2002-04-22 Akim Demaille <akim@epita.fr>
8428
8429 * src/reduce.c (dump_grammar): Move to...
8430 * src/gram.h, src/gram.c (grammar_dump): here.
8431 Be sure to separate long item numbers.
8432 Don't read the members of a rule's prec if its nil.
8433
8434 2002-04-22 Akim Demaille <akim@epita.fr>
8435
8436 * src/output.c (table_size, table_grow): New.
8437 (MAXTABLE): Remove, replace uses with table_size.
8438 (pack_vector): Instead of dying when the table is too big, grow it.
8439
8440 2002-04-22 Akim Demaille <akim@epita.fr>
8441
8442 * data/bison.simple (yyr1): Its type is that of a token number.
8443 * data/bison.c++ (r1_): Likewise.
8444 * tests/regression.at (Web2c Actions): Adjust.
8445
8446 2002-04-22 Akim Demaille <akim@epita.fr>
8447
8448 * src/reader.c (token_translations_init): 256 is now the default
8449 value for the error token, i.e., it will be assigned another
8450 number if the user assigned 256 to one of her tokens.
8451 (reader): Don't force 256 to error.
8452 * doc/bison.texinfo (Symbols): Adjust.
8453 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
8454 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
8455 etc. instead of 10, 20, 30 (which was used to `jump' over error
8456 (256) and undefined (2)).
8457
8458 2002-04-22 Akim Demaille <akim@epita.fr>
8459
8460 Propagate more token_number_t.
8461
8462 * src/gram.h (token_number_as_item_number)
8463 (item_number_as_token_number): New.
8464 * src/output.c (GENERATE_OUTPUT_TABLE): New.
8465 Use it to create output_item_number_table and
8466 output_token_number_table.
8467 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
8468 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
8469 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
8470 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
8471
8472 2002-04-22 Akim Demaille <akim@epita.fr>
8473
8474 * src/output.h, src/output.c (get_lines_number): Remove.
8475
8476 2002-04-19 Akim Demaille <akim@epita.fr>
8477
8478 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
8479 as Lex/Flex'.
8480 (Debugging): More details about enabling the debugging features.
8481 (Table of Symbols): Describe $$, $n, @$, and @n.
8482 Suggested by Tim Josling.
8483
8484 2002-04-19 Akim Demaille <akim@epita.fr>
8485
8486 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
8487
8488 2002-04-10 Akim Demaille <akim@epita.fr>
8489
8490 * src/system.h: Rely on HAVE_LIMITS_H.
8491 Suggested by Paul Eggert.
8492
8493 2002-04-09 Akim Demaille <akim@epita.fr>
8494
8495 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
8496 full stderr, and strip it according to the bison options, instead
8497 of composing the error message from different bits.
8498 This makes it easier to check for several error messages.
8499 Adjust all the invocations.
8500 Add an invocation exercising the error token.
8501 Add an invocation demonstrating a stupid error message.
8502 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
8503 Adjust the tests.
8504 Error message are for stderr, not stdout.
8505
8506 2002-04-09 Akim Demaille <akim@epita.fr>
8507
8508 * src/gram.h, src/gram.c (error_token_number): Remove, use
8509 errtoken->number.
8510 * src/reader.c (reader): Don't specify the user token number (2)
8511 for $undefined, as it uselessly prevents using it.
8512 * src/gram.h (token_number_t): Move to...
8513 * src/symtab.h: here.
8514 (state_t.number): Is a token_number_t.
8515 * src/print.c, src/reader.c: Use undeftoken->number instead of
8516 hard coded 2.
8517 (Even though this 2 is not the same as above: the number of the
8518 undeftoken remains being 2, it is its user token number which
8519 might not be 2).
8520 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
8521 `user_token_number_max'.
8522 Output `undef_token_number'.
8523 * data/bison.simple, data/bison.c++: Use them.
8524 Be sure to map invalid yylex return values to
8525 `undef_token_number'. This saves us from gratuitous SEGV.
8526
8527 * tests/conflicts.at (Solved SR Conflicts)
8528 (Unresolved SR Conflicts): Adjust.
8529 * tests/regression.at (Web2c Actions): Adjust.
8530
8531 2002-04-08 Akim Demaille <akim@epita.fr>
8532
8533 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
8534 Adding #line.
8535 Remove the duplicate `typedefs'.
8536 (RhsNumberType): Fix the declaration and various other typos.
8537 Use __ofile__.
8538 * data/bison.simple: Use __ofile__.
8539 * src/scan-skel.l: Handle __ofile__.
8540
8541 2002-04-08 Akim Demaille <akim@epita.fr>
8542
8543 * src/gram.h (item_number_t): New, the type of item numbers in
8544 RITEM. Note that it must be able to code symbol numbers as
8545 positive number, and the negation of rule numbers as negative
8546 numbers.
8547 Adjust all dependencies (pretty many).
8548 * src/reduce.c (rule): Remove this `short *' pointer: use
8549 item_number_t.
8550 * src/system.h (MINSHORT, MAXSHORT): Remove.
8551 Include `limits.h'.
8552 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
8553 (shortcpy): Remove.
8554 (MAXTABLE): Move to...
8555 * src/output.c (MAXTABLE): here.
8556 (prepare_rules): Use output_int_table to output rhs.
8557 * data/bison.simple, data/bison.c++: Adjust.
8558 * tests/torture.at (Big triangle): Move the limit from 254 to
8559 500.
8560 * tests/regression.at (Web2c Actions): Ajust.
8561
8562 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
8563 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
8564 passes, but produces negative #line number, once fixed, GCC is
8565 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
8566 C), it passes.
8567 * src/state.h (state_h): Code input lines on ints, not shorts.
8568
8569 2002-04-08 Akim Demaille <akim@epita.fr>
8570
8571 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
8572 and then the grammar.
8573
8574 2002-04-08 Akim Demaille <akim@epita.fr>
8575
8576 * src/system.h: No longer using strndup.
8577
8578 2002-04-07 Akim Demaille <akim@epita.fr>
8579
8580 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
8581 * src/output.c (output_table_data): Return the longest number.
8582 (prepare_tokens): Output `token_number_max').
8583 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
8584 New.
8585 Use them to define yy_token_number_type/TokenNumberType.
8586 Use this type for yytranslate.
8587 * tests/torture.at (Big triangle): Push the limit from 124 to
8588 253.
8589 * tests/regression.at (Web2c Actions): Adjust.
8590
8591 2002-04-07 Akim Demaille <akim@epita.fr>
8592
8593 * tests/torture.at (Big triangle): New.
8594 (GNU AWK Grammar, GNU Cim Grammar): Move to...
8595 * tests/existing.at: here.
8596
8597 2002-04-07 Akim Demaille <akim@epita.fr>
8598
8599 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
8600 nritems.
8601 Adjust dependencies.
8602
8603 2002-04-07 Akim Demaille <akim@epita.fr>
8604
8605 * src/reader.c: Normalize increments to prefix form.
8606
8607 2002-04-07 Akim Demaille <akim@epita.fr>
8608
8609 * src/reader.c, symtab.c: Remove debugging code.
8610
8611 2002-04-07 Akim Demaille <akim@epita.fr>
8612
8613 Rename all the `bucket's as `symbol_t'.
8614
8615 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
8616 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
8617 * src/symtab.c, src/symtab.h (bucket): Rename as...
8618 (symbol_t): this.
8619 (symbol_list_new, bucket_check_defined, bucket_make_alias)
8620 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
8621 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
8622 (buckets_new, buckets_free, buckets_do): Rename as...
8623 (symbol_list_new, symbol_check_defined, symbol_make_alias)
8624 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
8625 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
8626 (symbols_new, symbols_free, symbols_do): these.
8627
8628 2002-04-07 Akim Demaille <akim@epita.fr>
8629
8630 Use lib/hash for the symbol table.
8631
8632 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
8633 EOF.
8634 * src/lex.c (lex): Set the `number' member of new terminals.
8635 * src/reader.c (bucket_check_defined, bucket_make_alias)
8636 (bucket_check_alias_consistence, bucket_translation): New.
8637 (reader, grammar_free, readgram, token_translations_init)
8638 (packsymbols): Adjust.
8639 (reader): Number the predefined tokens.
8640 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
8641 for predefined tokens.
8642 * src/symtab.h (bucket): Remove all the hash table related
8643 members.
8644 * src/symtab.c (symtab): Replace by...
8645 (bucket_table): this.
8646 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
8647 (buckets_new, buckets_do): New.
8648
8649 2002-04-07 Akim Demaille <akim@epita.fr>
8650
8651 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
8652 (start_symbol, max_user_token_number, semantic_parser)
8653 (error_token_number): Initialize.
8654 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
8655 Initialize.
8656 (reader): Don't.
8657 (errtoken, eoftoken, undeftoken, axiom): Extern.
8658
8659 2002-04-07 Akim Demaille <akim@epita.fr>
8660
8661 * src/gram.h (rule_s): prec and precsym are now pointers
8662 to the bucket giving the priority/associativity.
8663 Member `associativity' removed: useless.
8664 * src/reduce.c, src/conflicts.c: Adjust.
8665
8666 2002-04-07 Akim Demaille <akim@epita.fr>
8667
8668 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
8669 Properly escape the symbols' TAG when outputting them.
8670
8671 2002-04-07 Akim Demaille <akim@epita.fr>
8672
8673 * src/lalr.h (LA): Is a bitsetv, not bitset*.
8674
8675 2002-04-07 Akim Demaille <akim@epita.fr>
8676
8677 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
8678 (LArule): this, which is an array to rule_t*.
8679 * src/print.c, src/conflicts.c: Adjust.
8680
8681 2002-04-07 Akim Demaille <akim@epita.fr>
8682
8683 * src/gram.h (rule_t): Rename `number' as `user_number'.
8684 `number' is a new member.
8685 Adjust dependencies.
8686 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
8687
8688 2002-04-07 Akim Demaille <akim@epita.fr>
8689
8690 As a result of the previous patch, it is no longer needed
8691 to reorder ritem itself.
8692
8693 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
8694
8695 2002-04-07 Akim Demaille <akim@epita.fr>
8696
8697 Be sure never to walk through RITEMS, but use only data related to
8698 the rules themselves. RITEMS should be banished.
8699
8700 * src/output.c (output_token_translations): Rename as...
8701 (prepare_tokens): this.
8702 In addition to `translate', prepare the muscles `tname' and
8703 `toknum', which were handled by...
8704 (output_rule_data): this.
8705 Remove, and move the remainder of its outputs into...
8706 (prepare_rules): this new routines, which also merges content from
8707 (output_gram): this.
8708 (prepare_rules): Be sure never to walk through RITEMS.
8709 (output_stos): Rename as...
8710 (prepare_stos): this.
8711 (output): Always invoke prepare_states, after all, just don't use it
8712 in the output if you don't need it.
8713
8714 2002-04-07 Akim Demaille <akim@epita.fr>
8715
8716 * src/LR0.c (new_state): Display `nstates' as the name of the
8717 newly created state.
8718 Adjust to initialize first_state and last_state if needed.
8719 Be sure to distinguish the initial from the final state.
8720 (new_states): Create the itemset of the initial state, and use
8721 new_state.
8722 * src/closure.c (closure): Now that the initial state has its
8723 items properly set, there is no need for a special case when
8724 creating `ruleset'.
8725
8726 As a result, now the rule 0, reducing to $axiom, is visible in the
8727 outputs. Adjust the test suite.
8728
8729 * tests/conflicts.at (Solved SR Conflicts)
8730 (Unresolved SR Conflicts): Adjust.
8731 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
8732 * tests/conflicts.at (S/R in initial): New.
8733
8734 2002-04-07 Akim Demaille <akim@epita.fr>
8735
8736 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
8737 the RHS of the rules.
8738 * src/output.c (output_gram): Likewise.
8739
8740 2002-04-07 Akim Demaille <akim@epita.fr>
8741
8742 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
8743 bucket.
8744 Adjust all dependencies.
8745 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
8746 `number' of the buckets too.
8747 * src/gram.h: Include `symtab.h'.
8748 (associativity): Move to...
8749 * src/symtab.h: here.
8750 No longer include `gram.h'.
8751
8752 2002-04-07 Akim Demaille <akim@epita.fr>
8753
8754 * src/gram.h, src/gram.c (rules_rhs_length): New.
8755 (ritem_longest_rhs): Use it.
8756 * src/gram.h (rule_t): `number' is a new member.
8757 * src/reader.c (packgram): Set it.
8758 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
8759 the end of `rules', and count them out of `nrules'.
8760 (reduce_output, dump_grammar): Adjust.
8761 * src/print.c (print_grammar): It is no longer needed to check for
8762 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
8763 * tests/reduce.at (Reduced Automaton): New test.
8764
8765 2002-04-07 Akim Demaille <akim@epita.fr>
8766
8767 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
8768 lacking `+ 1' to nrules, Bison reported as useless a token if it
8769 was used solely to set the precedence of the last rule...
8770
8771 2002-04-07 Akim Demaille <akim@epita.fr>
8772
8773 * data/bison.c++, data/bison.simple: Don't output the current file
8774 name in #line, to avoid useless diffs between two identical
8775 outputs under different names.
8776
8777 2002-04-07 Akim Demaille <akim@epita.fr>
8778
8779 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
8780 Normalize loops to using `< nrules + 1', not `<= nrules'.
8781
8782 2002-04-07 Akim Demaille <akim@epita.fr>
8783
8784 * TODO: Update.
8785
8786 2002-04-07 Akim Demaille <akim@epita.fr>
8787
8788 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
8789 bucket.value as bucket.number.
8790
8791 2002-04-07 Akim Demaille <akim@epita.fr>
8792
8793 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
8794 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
8795 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
8796 RHS, instead of being an index in RITEMS.
8797
8798 2002-04-04 Paul Eggert <eggert@twinsun.com>
8799
8800 * doc/bison.texinfo: Update copyright date.
8801 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
8802 (Symbols): Warn about running Bison in one character set,
8803 but compiling and/or running in an incompatible one.
8804 Warn about character code 256, too.
8805
8806 2002-04-03 Paul Eggert <eggert@twinsun.com>
8807
8808 * src/bison.data (YYSTACK_ALLOC): Depend on whether
8809 YYERROR_VERBOSE is nonzero, not whether it is defined.
8810
8811 Merge changes from bison-1_29-branch.
8812
8813 2002-03-20 Paul Eggert <eggert@twinsun.com>
8814
8815 Merge fixes from Debian bison_1.34-1.diff.
8816
8817 * configure.in (AC_PREREQ): 2.53.
8818
8819 2002-03-20 Akim Demaille <akim@epita.fr>
8820
8821 * src/conflicts.c (log_resolution): Argument `resolution' is const.
8822
8823 2002-03-19 Paul Eggert <eggert@twinsun.com>
8824
8825 * src/bison.simple (YYCOPY): New macro.
8826 (YYSTACK_RELOCATE): Use it.
8827 Remove Type arg; no longer needed. All callers changed.
8828 (yymemcpy): Remove; no longer needed.
8829
8830 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
8831 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
8832
8833 2002-03-19 Akim Demaille <akim@epita.fr>
8834
8835 Test and fix the #line outputs.
8836
8837 * tests/atlocal.at (GCC): New.
8838 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
8839 (Prologue synch line, %union synch line, Postprologue synch line)
8840 (Action synch line, Epilogue synch line): New tests.
8841 * src/reader.c (parse_union_decl): Define the muscle stype_line.
8842 * data/bison.simple, data/bison.c++: Use it.
8843
8844 2002-03-19 Akim Demaille <akim@epita.fr>
8845
8846 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
8847 (Solved SR Conflicts, %expect not enough, %expect right)
8848 (%expect too much): Move to...
8849 * tests/conflicts.at: this new file.
8850
8851 2002-03-19 Akim Demaille <akim@epita.fr>
8852
8853 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
8854 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
8855 that we can move to enums for instance.
8856 * src/output.c (token_definitions_output): Output a list of
8857 `token-name, token-number' instead of the #define.
8858 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
8859
8860 2002-03-14 Akim Demaille <akim@epita.fr>
8861
8862 Use Gettext 0.11.1.
8863
8864 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
8865
8866 * data/bison.c++: Make the user able to add members to the generated
8867 parser by subclassing.
8868
8869 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
8870
8871 * src/reader.c (read_additionnal_code): `c' should be an integer, not
8872 a character.
8873 Reported by Nicolas Tisserand and Nicolas Burrus.
8874
8875 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
8876
8877 * src/reader.c: Warn about lacking semi-colons, do not complain.
8878
8879 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
8880
8881 * data/bison.c++: Remove a debug line.
8882
8883 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
8884
8885 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
8886 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
8887 provide a default implementation.
8888
8889 2002-03-04 Akim Demaille <akim@epita.fr>
8890
8891 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
8892 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
8893 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
8894 * tests/semantic.at (Parsing Guards): Similarly.
8895 * src/reader.at (readgram): Complain if the last rule is not ended
8896 with a semi-colon.
8897
8898 2002-03-04 Akim Demaille <akim@epita.fr>
8899
8900 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
8901 * src/closure.c: here.
8902 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
8903 RTC.
8904 * src/warshall.h, src/warshall.c: Remove.
8905 * tests/sets.at (Broken Closure): Adjust.
8906
8907 2002-03-04 Akim Demaille <akim@epita.fr>
8908
8909 * src/output.c (output_skeleton): tempdir is const.
8910 bytes_read is unused.
8911
8912 2002-03-04 Akim Demaille <akim@epita.fr>
8913
8914 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
8915 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
8916 Update.
8917 From Michael Hayes.
8918
8919 2002-03-04 Akim Demaille <akim@epita.fr>
8920
8921 * src/closure.c (closure): `r' is unused.
8922
8923 2002-03-04 Akim Demaille <akim@epita.fr>
8924
8925 * tests/sets.at (Broken Closure): Add the ending `;'.
8926 * src/reader.at (readgram): Complain if a rule is not ended with a
8927 semi-colon.
8928
8929 2002-03-04 Akim Demaille <akim@epita.fr>
8930
8931 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
8932 (count_sr_conflicts): Use bitset_count.
8933 * src/reduce.c (inaccessable_symbols): Ditto.
8934 (bits_size): Remove.
8935 * src/warshall.h, src/warshall.c: Convert to bitsetv.
8936
8937 2002-03-04 Akim Demaille <akim@epita.fr>
8938
8939 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
8940 * src/reduce.c: Remove the `bitset_zero's following the
8941 `bitset_create's, as now it is performed by the latter.
8942
8943 2002-03-04 Akim Demaille <akim@epita.fr>
8944
8945 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
8946 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
8947 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
8948 latest sources from Michael.
8949
8950 2002-03-04 Akim Demaille <akim@epita.fr>
8951
8952 * src/output.c (output): Don't free the grammar.
8953 * src/reader.c (grammar_free): New.
8954 * src/main.c (main): Call it and don't free symtab here.
8955
8956 2002-03-04 Akim Demaille <akim@epita.fr>
8957
8958 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
8959 before returning.
8960 Reported by Benoit Perrot.
8961
8962 2002-03-04 Akim Demaille <akim@epita.fr>
8963
8964 Use bitset operations when possible, not loops over bits.
8965
8966 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
8967 bitset_or.
8968 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
8969 * src/reduce.c (useless_nonterminals): Formatting changes.
8970 * src/warshall.c (TC): Use bitset_or.
8971
8972 2002-03-04 Akim Demaille <akim@epita.fr>
8973
8974 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
8975 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
8976 Ditto.
8977
8978 2002-03-04 Akim Demaille <akim@epita.fr>
8979
8980 * src/lalr.c (F): Now a bitset*.
8981 Adjust all dependencies.
8982
8983 2002-03-04 Akim Demaille <akim@epita.fr>
8984
8985 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
8986 Adjust all dependencies.
8987
8988 2002-03-04 Akim Demaille <akim@epita.fr>
8989
8990 * src/L0.c, src/LR0.h (nstates): Be size_t.
8991 Adjust comparisons (signed vs unsigned).
8992 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
8993 bitset*.
8994 Adjust all dependencies.
8995
8996 2002-03-04 Akim Demaille <akim@epita.fr>
8997
8998 * src/closure.c (firsts): Now, also a bitset.
8999 Adjust all dependencies.
9000 (varsetsize): Remove, now unused.
9001 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
9002
9003 2002-03-04 Akim Demaille <akim@epita.fr>
9004
9005 * src/print.c: Convert to use bitset.h, not hand coded iterations
9006 over ints.
9007
9008 2002-03-04 Akim Demaille <akim@epita.fr>
9009
9010 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
9011
9012 2002-03-04 Akim Demaille <akim@epita.fr>
9013
9014 * src/closure.c (ruleset): Be a bitset.
9015 (rulesetsize): Remove.
9016
9017 2002-03-04 Akim Demaille <akim@epita.fr>
9018
9019 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
9020 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
9021 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
9022 * src/closure.c (fderives): Be an array of bitsets.
9023
9024 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
9025
9026 * data/bison.c++: Merge the two generated headers. Insert a copyright
9027 notice in each output file.
9028
9029 2002-02-28 Akim Demaille <akim@epita.fr>
9030
9031 * data/bison.c++: Copy the prologue of bison.simple to fetch
9032 useful M4 definitions, such as b4_header_guard.
9033
9034 2002-02-25 Akim Demaille <akim@epita.fr>
9035
9036 * src/getargs.c (version): Give the name of the authors, and use a
9037 translator friendly scheme for the bgr
9038 copyright notice.
9039
9040 2002-02-25 Akim Demaille <akim@epita.fr>
9041
9042 * src/output.c (header_output): Remove, now handled completely via
9043 M4.
9044
9045 2002-02-25 Akim Demaille <akim@epita.fr>
9046
9047 * m4/m4.m4: New, from CVS Autoconf.
9048 * configure.in: Invoke it.
9049 * src/output.c (output_skeleton): Use its result instead of the
9050 hard coded name.
9051
9052 2002-02-25 Akim Demaille <akim@epita.fr>
9053
9054 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
9055 Fileutils 4.1.5.
9056 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
9057 * src/output.c (output_skeleton): Use mkstemp to create a real
9058 temporary file.
9059 Move the filling of `skeleton' and its muscle to...
9060 (prepare): here.
9061 (output): Move the definition of the prologue muscle to...
9062 (prepare): here.
9063 * src/system.h (DEFAULT_TMPDIR): New.
9064
9065 2002-02-14 Paul Eggert <eggert@twinsun.com>
9066
9067 Remove the support for C++ namespace cleanliness; it was
9068 causing more problems than it was curing, since it didn't work
9069 properly on some nonstandard C++ compilers. This can wait
9070 for a proper C++ parser.
9071
9072 * NEWS: Document this.
9073 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
9074 of C++, as it's treated like C now.
9075 * src/bison.simple (YYSTD): Remove.
9076 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
9077 Treat C++ just like Standard C instead of trying to support
9078 namespace cleanliness.
9079
9080 2002-02-14 Akim Demaille <akim@epita.fr>
9081
9082 * tests/regression.at (else): Adjust to Andreas' change.
9083
9084 2002-02-14 Akim Demaille <akim@epita.fr>
9085
9086 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
9087
9088 2002-02-13 Andreas Schwab <schwab@suse.de>
9089
9090 * src/output.c (output_rule_data): Don't output NULL, it might
9091 not be defined yet.
9092
9093 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
9094
9095 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
9096 (Copyright notice): Update.
9097
9098 2002-02-11 Akim Demaille <akim@epita.fr>
9099
9100 * tests/regression.at (%nonassoc and eof): Don't include
9101 nonportable headers.
9102
9103 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
9104
9105 * data/bison.c++: Correct error recovery. Make the user able to
9106 initialize the starting location.
9107
9108 2002-02-07 Akim Demaille <akim@epita.fr>
9109
9110 * tests/input.at: New.
9111
9112 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
9113
9114 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9115 more consistent when naming methods and variables. Put preprocessor
9116 directives around tables only needed for debugging.
9117
9118 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
9119
9120 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
9121 C++ parsers.
9122 (yy::b4_name::parse): Use print_.
9123
9124 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
9125
9126 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
9127
9128 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
9129
9130 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
9131 C++ parsers.
9132 (yy::b4_name::parse): Build verbose error messages, and use error_.
9133
9134 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
9135
9136 * data/bison.c++: Fix m4 quoting in comments.
9137
9138 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
9139
9140 * data/bison.c++: Adjust the parser code. Fix some muscles that were
9141 not expanded by m4.
9142
9143 2002-02-05 Akim Demaille <akim@epita.fr>
9144
9145 * data/bison.c++: Adjust to the M4 back end.
9146 More is certainly needed.
9147
9148 2002-02-05 Akim Demaille <akim@epita.fr>
9149
9150 Give a try to M4 as a back end.
9151
9152 * lib/readpipe.c: New, from wdiff.
9153 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
9154 BISON_HAIRY.
9155 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
9156 specific values. Now it is m4 that performs the lookup.
9157 * src/parse-skel.y: Remove.
9158 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
9159 * src/output.c (actions_output, guards_output)
9160 (token_definitions_output): No longer keeps track of the output
9161 line number, hence remove the second argument.
9162 (guards_output): Check against the guard member of a rule, not the
9163 action member.
9164 Adjust callers.
9165 (output_skeleton): Don't look for the skeleton location, let m4 do
9166 that.
9167 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
9168 file will be used.
9169 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
9170 (prepare): Given that for the time being changesyntax is not
9171 usable in M4, rename the muscles using `-' to `_'.
9172 Define `defines_flag', `output_parser_name' and `output_header_name'.
9173 * src/output.h (actions_output, guards_output)
9174 (token_definitions_output): Adjust prototypes.
9175 * src/scan-skel.l: Instead of scanning the skeletons, it now
9176 processes the output of m4: `__oline__' and `#output'.
9177 * data/bison.simple: Adjust to be used by M4(sugar).
9178 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
9179 to date.
9180 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
9181 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
9182 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
9183 shamelessly stolen from CVS Autoconf.
9184
9185 2002-02-05 Akim Demaille <akim@epita.fr>
9186
9187 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
9188 * configure.in: Check for the declarations of free and malloc.
9189 * src/muscle_tab.c: Adjust.
9190
9191 2002-02-05 Akim Demaille <akim@epita.fr>
9192
9193 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
9194 which have no values.
9195
9196 2002-02-05 Akim Demaille <akim@epita.fr>
9197
9198 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
9199 * data/: here.
9200
9201 2002-01-29 Paul Eggert <eggert@twinsun.com>
9202
9203 * src/bison.simple (YYSIZE_T): Do not define merely because
9204 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
9205 On some platforms, <alloca.h> does not declare YYSTD (size_t).
9206
9207 2002-01-27 Akim Demaille <akim@epita.fr>
9208
9209 Fix `%nonassoc and eof'.
9210
9211 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
9212 which were not properly copied! Replace
9213 memcpy (res->errs, src->errs, src->nerrs);
9214 with
9215 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
9216 !!!
9217 * tests/regression.at (%nonassoc and eof): Adjust to newest
9218 Autotest: `.' is not in the PATH.
9219
9220 2002-01-27 Akim Demaille <akim@epita.fr>
9221
9222 * tests/sets.at (AT_EXTRACT_SETS): New.
9223 (Nullable): Use it.
9224 (Firsts): New.
9225
9226 2002-01-26 Akim Demaille <akim@epita.fr>
9227
9228 * tests/actions.at, tests/calc.at, tests/headers.at,
9229 * tests/torture.at: Adjust to the newest Autotest which no longer
9230 forces `.' in the PATH.
9231
9232 2002-01-25 Akim Demaille <akim@epita.fr>
9233
9234 * tests/regression.at (%nonassoc and eof): New.
9235 Suggested by Robert Anisko.
9236
9237 2002-01-24 Akim Demaille <akim@epita.fr>
9238
9239 Bison dumps core when trying to complain about broken input files.
9240 Reported by Cris van Pelt.
9241
9242 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
9243 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
9244 into...
9245 (Invalid inputs): Strengthen: exercise parse_percent_token.
9246
9247 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
9248
9249 * src/Makefile.am: Add bison.c++.
9250 * src/bison.c++: New skeleton.
9251
9252 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
9253
9254 * po/it.po: New.
9255
9256 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
9257
9258 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
9259
9260 2002-01-20 Marc Autret <marc@gnu.org>
9261
9262 * src/files.c (compute_output_file_names): Fix
9263
9264 2002-01-20 Marc Autret <marc@gnu.org>
9265
9266 * tests/output.at: New test.
9267 * src/files.c (compute_base_names): Don't map extensions when
9268 the YACC flag is set, use defaults.
9269 Reported by Evgeny Stambulchik.
9270
9271 2002-01-20 Marc Autret <marc@gnu.org>
9272
9273 * src/system.h: Need to define __attribute__ away for non-GCC
9274 compilers as well (i.e., the vendor C compiler).
9275 Suggested by Albert Chin-A-Young.
9276
9277 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
9278
9279 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
9280 canonical definition.
9281 * src/system.h: Use the canonical definition for PARAMS (avoids
9282 a conflict with the macro from lib/hash.h).
9283
9284 2002-01-11 Akim Demaille <akim@epita.fr>
9285
9286 * configure.in: Use AC_FUNC_STRNLEN.
9287 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
9288
9289 2002-01-09 Akim Demaille <akim@epita.fr>
9290
9291 * src/files.c, src/files.h (output_infix): New.
9292 (tab_extension): Remove.
9293 (compute_base_names): Compute the former, drop the latter.
9294 * src/output.c (prepare): Insert the muscles `output-infix', and
9295 `output-suffix'.
9296 * src/parse-skel.y (string, string.1): New.
9297 (section.header): Use it.
9298 (section.yacc): Remove.
9299 (prefix): Remove too.
9300 * src/scan-skel.l: Adjust.
9301 * src/bison.simple, src/bison.hairy: Adjust.
9302
9303 2002-01-09 Akim Demaille <akim@epita.fr>
9304
9305 * configure.in (WERROR_CFLAGS): Compute it.
9306 * src/Makefile.am (CFLAGS): Pass it.
9307 * tests/atlocal.in (CFLAGS): Idem.
9308 * src/files.c: Fix a few warnings.
9309 (get_extension_index): Remove, unused.
9310
9311 2002-01-08 Akim Demaille <akim@epita.fr>
9312
9313 * src/getargs.c (AS_FILE_NAME): New.
9314 (getargs): Use it to convert DOSish file names.
9315 * src/files.c (base_name): Rename as full_base_name to avoid
9316 clashes with `base_name ()'.
9317 (filename_split): New.
9318 (compute_base_names): N-th rewrite, using filename_split.
9319
9320 2002-01-08 Akim Demaille <akim@epita.fr>
9321
9322 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
9323 New, stolen from the Fileutils 4.1.
9324 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
9325 * configure.in: Check for the presence of memrchr, and of its
9326 prototype.
9327
9328 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
9329
9330 * lib/hash.h (__P): Added definition for this macro.
9331 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
9332 BUILT_SOURCES, to ensure they are generated first.
9333 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
9334 %error-verbose to allow bootstrapping with bison 1.30x.
9335
9336 2002-01-06 Akim Demaille <akim@epita.fr>
9337
9338 * src/reader.c (parse_braces): Don't fetch the next char, the
9339 convention is to fetch on entry.
9340 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
9341 'switch' without a following semicolon.
9342 * tests/regression.at (braces parsing): New.
9343
9344 2002-01-06 Akim Demaille <akim@epita.fr>
9345
9346 Bison is dead wrong in its RR conflict reports.
9347
9348 * tests/torture.at (GNU Cim Grammar): New.
9349 * src/conflicts.c (count_rr_conflicts): Fix.
9350
9351 2002-01-06 Akim Demaille <akim@epita.fr>
9352
9353 Creating package.m4 from configure.ac causes too many problems.
9354
9355 * tests/Makefile.am (package.m4): Create it by hand,
9356 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
9357
9358 2002-01-06 Akim Demaille <akim@epita.fr>
9359
9360 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
9361 skeleton.h.
9362
9363 2002-01-04 Paul Eggert <eggert@twinsun.com>
9364
9365 * doc/bison.texinfo (Debugging):
9366 Remove YYSTDERR; it's no longer defined or used.
9367 Also, s/cstdio.h/cstdio/.
9368
9369 2002-01-03 Akim Demaille <akim@epita.fr>
9370
9371 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
9372
9373 2002-01-03 Akim Demaille <akim@epita.fr>
9374
9375 * src/parse-skel.y (process_skeleton): Don't bind the parser's
9376 tracing code to --trace, wait for a better --trace option, with
9377 args.
9378
9379 2002-01-03 Akim Demaille <akim@epita.fr>
9380
9381 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
9382 The ISO C++ standard is extremely clear about it: stderr is
9383 considered a macro, not a regular symbol (see table 94 `Header
9384 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
9385 Therefore std:: does not apply to it. It still does with fprintf.
9386 Also, s/cstdio.h/cstdio/.
9387
9388 2002-01-03 Akim Demaille <akim@epita.fr>
9389
9390 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
9391 for non system headers.
9392
9393 2002-01-02 Akim Demaille <akim@epita.fr>
9394
9395 Equip the skeleton chain with location tracking, runtime trace,
9396 pure parser and scanner.
9397
9398 * src/parse-skel.y: Request a pure parser, locations, and prefix
9399 renaming.
9400 (%union): Having several members with the same type does not help
9401 type mismatches, simplify.
9402 (YYPRINT, yyprint): New.
9403 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
9404 (skel_error): this.
9405 Handle locations.
9406 * src/scan-skel.l: Adjust to these changes.
9407 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
9408 (LOCATION_PRINT, skel_control_t): New.
9409
9410 2001-12-30 Akim Demaille <akim@epita.fr>
9411
9412 * src/parse-skel.y: Get rid of the shift/reduce conflict:
9413 replace `gb' with BLANKS.
9414 * src/scan-skel.l: Adjust.
9415
9416 2001-12-30 Akim Demaille <akim@epita.fr>
9417
9418 * src/system.h: We don't need nor want bcopy.
9419 Throw away MS-DOS crap: we don't need getpid.
9420 * configure.in: We don't need strndup. It was even causing
9421 problems: because Flex includes the headers *before* us,
9422 _GNU_SOURCE is not defined by config.h, and therefore strndup was
9423 not visible.
9424 * lib/xstrndup.c: New.
9425 * src/scan-skel.l: Use it.
9426 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
9427 * src/parse-skel.y: Use %directives instead of #defines.
9428
9429 2001-12-30 Akim Demaille <akim@epita.fr>
9430
9431 * src/skeleton.h: New.
9432 * src/output.c (output_parser, output_master_parser): Remove, dead
9433 code.
9434 * src/output.h (get_lines_number, actions_output, guards_output)
9435 (token_definitions_output): Prototype them.
9436 * src/parse-skel.y: Add the license notice.
9437 Include output.h and skeleton.h.
9438 (process_skeleton): Returns void, and takes a single parameter.
9439 * src/scan-skel.l: Add the license notice.
9440 Include skeleton.h.
9441 Don't use %option yylineno: it seems that then Flex imagines
9442 REJECT has been used, and therefore it won't reallocate its
9443 buffers (which makes no other sense to me than a bug). It results
9444 in warnings for `unused: yy_flex_realloc'.
9445
9446 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
9447
9448 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
9449 (MUSCLE_INSERT_PREFIX): ...to there.
9450 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
9451 (MUSCLE_INSERT_PREFIX): Move from here...
9452
9453 * src/bison.hairy: Add a section directive. Put braces around muscle
9454 names. This parser skeleton is still broken, but Bison should not
9455 choke on a bad muscle 'syntax'.
9456 * src/bison.simple: Add a section directive. Put braces around muscle
9457 names.
9458
9459 * src/files.h (strsuffix, stringappend): Add declarations.
9460 (tab_extension): Add declaration.
9461 (short_base_name): Add declaration.
9462
9463 * src/files.c (strsuffix, stringappend): No longer static. These
9464 functions are used in the skeleton parser.
9465 (tab_extension): New.
9466 (compute_base_names): Use the computations done in this function
9467 to guess if the generated parsers should have '.tab' in their
9468 names.
9469 (short_base_name): No longer static.
9470
9471 * src/output.c (output_skeleton): New.
9472 (output): Disable call to output_master_parser, and give a try to
9473 a new skeleton handling system.
9474 (guards_output, actions_output): No longer static.
9475 (token_definitions_output, get_lines_number): No longer static.
9476
9477 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
9478
9479 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9480 parse-skel.y.
9481
9482 * src/parse-skel.y: New file.
9483 * src/scan-skel.l: New file.
9484
9485 2001-12-29 Akim Demaille <akim@epita.fr>
9486
9487 %name-prefix is broken.
9488
9489 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
9490 Adjust all dependencies.
9491 * tests/headers.at (export YYLTYPE): Strengthen this test: use
9492 %name-prefix.
9493
9494 Renaming yylval but not yylloc is not consistent. Now we do.
9495
9496 * src/bison.simple: Prefix yylloc if used.
9497 * doc/bison.texinfo (Decl Summary): Document that.
9498
9499 2001-12-29 Akim Demaille <akim@epita.fr>
9500
9501 * doc/bison.texinfo: Promote `%long-directive' over
9502 `%long_directive'.
9503 Remove all references to fixed-output-files, yacc is enough.
9504
9505 2001-12-29 Akim Demaille <akim@epita.fr>
9506
9507 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
9508 user prologue. These are defaults.
9509 * tests/actions.at (Mid-rule actions): Make sure the user can
9510 define YYDEBUG and YYERROR_VERBOSE.
9511
9512 2001-12-29 Akim Demaille <akim@epita.fr>
9513
9514 * src/output.c (header_output): Don't forget to export YYLTYPE and
9515 yylloc.
9516 * tests/headers.at (export YYLTYPE): New, make sure it does.
9517 * tests/regression.at (%union and --defines, Invalid CPP headers):
9518 Move to...
9519 * tests/headers.at: here.
9520
9521 2001-12-29 Akim Demaille <akim@epita.fr>
9522
9523 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
9524
9525 2001-12-29 Akim Demaille <akim@epita.fr>
9526
9527 * tests/actions.at (Mid-rule actions): Output on a single line
9528 instead of several.
9529
9530 2001-12-29 Akim Demaille <akim@epita.fr>
9531
9532 * doc/bison.texinfo: Formatting changes.
9533
9534 2001-12-29 Akim Demaille <akim@epita.fr>
9535
9536 Don't store the token defs in a muscle, just be ready to output it
9537 on command. Now possible via `symbols'. Fixes a memory leak.
9538
9539 * src/output.c (token_definitions_output): New.
9540 (output_parser, header_output): Use it.
9541 * src/reader.c (symbols_save): Remove.
9542
9543 2001-12-29 Akim Demaille <akim@epita.fr>
9544
9545 * src/bison.simple: Do not provide a default for YYSTYPE and
9546 YYLTYPE before the user's prologue. Otherwise it's hardly... a
9547 default.
9548
9549 2001-12-29 Akim Demaille <akim@epita.fr>
9550
9551 Mid-rule actions are simply... ignored!
9552
9553 * src/reader.c (readgram): Be sure to attach mid-rule actions to
9554 the empty-rule associated to the dummy symbol, not to the host
9555 rule.
9556 * tests/actions.at (Mid-rule actions): New.
9557
9558 2001-12-29 Akim Demaille <akim@epita.fr>
9559
9560 Memory leak.
9561
9562 * src/reader.c (reader): Free grammar.
9563
9564 2001-12-29 Akim Demaille <akim@epita.fr>
9565
9566 Memory leak.
9567
9568 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
9569 since it allocates it for each state, although only one is needed.
9570 (allocate_storage): Do it here.
9571
9572 2001-12-29 Akim Demaille <akim@epita.fr>
9573
9574 * src/options.h, src/options.c (create_long_option_table): Rename
9575 as...
9576 (long_option_table_new): this, with a clearer prototype.
9577 (percent_table): Remove, unused,
9578 * src/getargs.c (getargs): Adjust.
9579
9580 2001-12-29 Akim Demaille <akim@epita.fr>
9581
9582 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
9583 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
9584 as states.
9585
9586 2001-12-29 Akim Demaille <akim@epita.fr>
9587
9588 * src/lalr.c (build_relations): Rename `states' as `states1'.
9589 Sorry, I don't understand exactly what it is, no better name...
9590
9591 2001-12-29 Akim Demaille <akim@epita.fr>
9592
9593 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
9594 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
9595 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
9596 as rules.
9597
9598 2001-12-29 Akim Demaille <akim@epita.fr>
9599
9600 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
9601 ago.
9602
9603 2001-12-29 Akim Demaille <akim@epita.fr>
9604
9605 * src/reader.c, src/reader.h (user_toknums): Remove.
9606 Adjust all users to use symbols[i]->user_token_number.
9607
9608 2001-12-29 Akim Demaille <akim@epita.fr>
9609
9610 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
9611 Adjust all users to use symbols[i]->prec or ->assoc.
9612
9613 2001-12-29 Akim Demaille <akim@epita.fr>
9614
9615 * src/reader.c, src/reader.h (tags): Remove.
9616 Adjust all users to use symbols[i]->tag.
9617
9618 2001-12-29 Akim Demaille <akim@epita.fr>
9619
9620 * src/gram.h, src/gram.c (symbols): New, similar to state_table
9621 and rule_table.
9622 * src/reader.c (packsymbols): Fill this table.
9623 Drop sprec.
9624 * src/conflicts.c (resolve_sr_conflict): Adjust.
9625 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
9626 single table.
9627 Use symbols[i]->tag instead of tags[i].
9628
9629 2001-12-29 Akim Demaille <akim@epita.fr>
9630
9631 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
9632 In addition, put a comment in there, to replace...
9633 * tests/regression.at (%union and C comments): Remove.
9634
9635 2001-12-29 Akim Demaille <akim@epita.fr>
9636
9637 * tests/regression.at (Web2c Actions): Blindly move the actual
9638 output as expected output. The contents *seem* right to me, but I
9639 can't pretend reading perfectly parser tables... Nonetheless, all
9640 the other tests pass correctly, the table look OK, even though the
9641 presence of `$axiom' is to be noted: AFAICS it is useless (but
9642 harmless).
9643
9644 2001-12-29 Akim Demaille <akim@epita.fr>
9645
9646 * src/reader.c (readgram): Don't add the rule 0 if there were no
9647 rules read. In other words, add it _after_ having performed
9648 grammar sanity checks.
9649 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
9650
9651 2001-12-29 Akim Demaille <akim@epita.fr>
9652
9653 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
9654 visible, and some states have now a different number.
9655
9656 2001-12-29 Akim Demaille <akim@epita.fr>
9657
9658 * src/reader.c (readgram): Bind the initial rule's lineno to that
9659 of the first rule.
9660 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
9661 (Solved SR Conflicts): Adjust rule 0's line number.
9662
9663 2001-12-29 Akim Demaille <akim@epita.fr>
9664
9665 Fix the `GAWK Grammar' failure.
9666
9667 * src/LR0.c (final_state): Initialize to -1 so that we do compute
9668 the reductions of the first state which was mistakenly confused
9669 with the final state because precisely final_state was initialized
9670 to 0.
9671 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
9672 now noticed by Bison.
9673 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
9674 have a reduction on $default.
9675
9676 2001-12-29 Akim Demaille <akim@epita.fr>
9677
9678 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
9679 rule line numbers.
9680 * src/closure.c (print_closure): Likewise.
9681 * src/derives.c (print_derives): Likewise.
9682 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
9683 now.
9684
9685 2001-12-29 Akim Demaille <akim@epita.fr>
9686
9687 * src/lalr.c (lookaheads_print): New.
9688 (lalr): Call it when --trace-flag.
9689 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
9690 are dumped.
9691
9692 2001-12-29 Akim Demaille <akim@epita.fr>
9693
9694 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
9695 when walking through ritem, even via rule->rhs.
9696 * src/reduce.c (dump_grammar, useful_production, reduce_output)
9697 (useful_production, useless_nonterminals): Likewise.
9698 (reduce_grammar_tables): Likewise, plus update nritems.
9699 * src/nullable.c (set_nullable): Likewise.
9700 * src/lalr.c (build_relations): Likewise.
9701 * tests/sets.at (Nullable): Adjust.
9702 Fortunately, now, the $axiom is no longer nullable.
9703
9704 2001-12-29 Akim Demaille <akim@epita.fr>
9705
9706 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
9707 the 0-sentinel.
9708 * src/gram.c (ritem_longest_rhs): Likewise.
9709 * src/reduce.c (nonterminals_reduce): Likewise.
9710 * src/print_graph.c (print_graph): Likewise.
9711 * src/output.c (output_rule_data): Likewise.
9712 * src/nullable.c (set_nullable): Likewise.
9713
9714 2001-12-29 Akim Demaille <akim@epita.fr>
9715
9716 * src/output.c: Comment changes.
9717
9718 2001-12-27 Paul Eggert <eggert@twinsun.com>
9719
9720 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
9721 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
9722 Sparc, as they were causing more porting problems than the
9723 (minor) performance improvement was worth.
9724
9725 Also, catch up with 1.31's YYSTD.
9726
9727 2001-12-27 Akim Demaille <akim@epita.fr>
9728
9729 * src/output.c (output_gram): Rely on nritems, not the
9730 0-sentinel. See below.
9731 Use -1 as separator, not 0.
9732 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
9733 Rely on -1 as separator in yyrhs, instead of 0.
9734 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
9735 twice `Now at end of input', therefore there are two lines less to
9736 expect.
9737
9738 2001-12-27 Akim Demaille <akim@epita.fr>
9739
9740 * tests/regression.at (Unresolved SR Conflicts):
9741 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
9742 below.
9743
9744 2001-12-27 Akim Demaille <akim@epita.fr>
9745
9746 * src/LR0.c (new_state): Recognize the final state by the fact it
9747 is reached by eoftoken.
9748 (insert_start_shifting_state, insert_eof_shifting_state)
9749 (insert_accepting_state, augment_automaton): Remove, since now
9750 these states are automatically computed from the initial state.
9751 (generate_states): Adjust.
9752 * src/print.c: When reporting a rule number to the user, substract
9753 1, so that the axiom rule is rule 0, and the first user rule is 1.
9754 * src/reduce.c: Likewise.
9755 * src/print_graph.c (print_core): For the time being, just as for
9756 the report, depend upon --trace-flags to dump the full set of
9757 items.
9758 * src/reader.c (readgram): Once the grammar read, insert the rule
9759 0: `$axiom: START-SYMBOL $'.
9760 * tests/set.at: Adjust: rule 0 is now displayed, and since the
9761 number of the states has changed (the final state is no longer
9762 necessarily the last), catch up.
9763
9764 2001-12-27 Akim Demaille <akim@epita.fr>
9765
9766 Try to make the use of the eoftoken valid. Given that its value
9767 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
9768 is used instead of > 0 where appropriate, (ii), depend upon nritems
9769 instead of the 0-sentinel.
9770
9771 * src/gram.h, src/gram.c (nritems): New.
9772 Expected to be duplication of nitems, but for the time being...
9773 * src/reader.c (packgram): Assert nritems and nitems are equal.
9774 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
9775 * src/closure.c (print_closure, print_fderives): Likewise.
9776 * src/gram.c (ritem_print): Likewise.
9777 * src/print.c (print_core, print_grammar): Likewise.
9778 * src/print_graph.c: Likewise.
9779
9780 2001-12-27 Akim Demaille <akim@epita.fr>
9781
9782 * src/main.c (main): If there are complains after grammar
9783 reductions, then output the report anyway if requested, then die.
9784 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
9785 * src/reader.c (eoftoken): New.
9786 (parse_token_decl): If the token being defined has value `0', it
9787 is the eoftoken.
9788 (packsymbols): No longer hack `tags' to insert `$' by hand.
9789 Be sure to preserve the value of the eoftoken.
9790 (reader): Make sure eoftoken is defined.
9791 Initialize nsyms to 0: now eoftoken is created just like the others.
9792 * src/print.c (print_grammar): Don't special case the eof token.
9793 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
9794 lie anyway, albeit pleasant.
9795 * tests/calc.at: Exercise error messages with eoftoken.
9796 Change the grammar so that empty input is invalid.
9797 Adjust expectations.
9798 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
9799
9800 2001-12-27 Akim Demaille <akim@epita.fr>
9801
9802 * configure.in: Check the protos of strchr ans strspn.
9803 Replace strchr if needed.
9804 * src/system.h: Provide the protos of strchr, strspn and memchr if
9805 missing.
9806 * lib/strchr.c: New.
9807 * src/reader.c (symbols_save): Use strchr.
9808
9809 2001-12-27 Akim Demaille <akim@epita.fr>
9810
9811 * src/print.c, src/print_graph.c (escape): New.
9812 Use it to quote the TAGS outputs.
9813 * src/print_graph.c (print_state): Now errors are in red, and
9814 reductions in green.
9815 Prefer high to wide: output the state number on a line of its own.
9816
9817 2001-12-27 Akim Demaille <akim@epita.fr>
9818
9819 * src/state.h, src/state.c (reductions_new): New.
9820 * src/LR0.c (set_state_table): Let all the states have a
9821 `reductions', even if reduced to 0.
9822 (save_reductions): Adjust.
9823 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
9824 * src/print.c (print_reductions, print_actions): Adjust.
9825 * src/output.c (action_row): Adjust.
9826
9827 2001-12-27 Akim Demaille <akim@epita.fr>
9828
9829 * src/state.h, src/state.c (errs_new, errs_dup): New.
9830 * src/LR0.c (set_state_table): Let all the states have an errs,
9831 even if reduced to 0.
9832 * src/print.c (print_errs, print_reductions): Adjust.
9833 * src/output.c (output_actions, action_row): Adjust.
9834 * src/conflicts.c (resolve_sr_conflict): Adjust.
9835
9836 2001-12-27 Akim Demaille <akim@epita.fr>
9837
9838 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
9839
9840 2001-12-27 Akim Demaille <akim@epita.fr>
9841
9842 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
9843 * src/print.c: here.
9844 (lookaheadset, shiftset): New, used as additional storage by
9845 print_reductions.
9846 (print_results): Adjust.
9847 (print_shifts, print_gotos, print_errs): New, extracted from...
9848 (print_actions): here.
9849 * src/print_graph.c (print_actions): Remove dead code.
9850
9851 2001-12-27 Akim Demaille <akim@epita.fr>
9852
9853 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
9854 `$n' and `@n'.
9855
9856 2001-12-27 Akim Demaille <akim@epita.fr>
9857
9858 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
9859 (build_relations): Adjust.
9860
9861 2001-12-27 Akim Demaille <akim@epita.fr>
9862
9863 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
9864 duplication.
9865
9866 2001-12-27 Akim Demaille <akim@epita.fr>
9867
9868 * src/reader.c (packgram): Catch nitems overflows.
9869
9870 2001-12-27 Akim Demaille <akim@epita.fr>
9871
9872 * src/files.c, src/files.h (guard_obstack): Remove.
9873 * src/output.c (output): Adjust.
9874 * src/reader.c (parse_braces): New, factoring...
9875 (copy_action, copy_guard): these two which are renamed as...
9876 (parse_action, parse_guard): these.
9877 As a voluntary consequence, using braces around guards is now
9878 mandatory.
9879
9880 2001-12-27 Akim Demaille <akim@epita.fr>
9881
9882 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
9883 * src/reader.c (symbol_list): `guard' and `guard_line' are new
9884 members.
9885 (symbol_list_new): Adjust.
9886 (copy_action): action_line is the first line, not the last.
9887 (copy_guard): Just as for actions, store the `action' only, not
9888 the switch/case/break flesh.
9889 Don't parse the user action that might follow the guard, let...
9890 (readgram): do it, i.e., now, there can be an action after a
9891 guard.
9892 In other words the guard is just explicitly optional.
9893 (packgram): Adjust.
9894 * src/output.c (guards_output): New.
9895 (output_parser): Call it when needed.
9896 (output): Also free the guard and attrs obstacks.
9897 * src/files.c, src/files.h (obstack_save): Remove.
9898 (output_files): Remove.
9899 As a result, if one needs the former `.act' file, using an
9900 appropriate skeleton which requires actions and guards is now
9901 required.
9902 * src/main.c (main): Adjust.
9903 * tests/semantic.at: New.
9904 * tests/regression.at: Use `input.y' as input file name.
9905 Avoid 8+3 problems by requiring input.c when the test needs the
9906 parser.
9907
9908 2001-12-27 Akim Demaille <akim@epita.fr>
9909
9910 * src/reader.c (symbol_list_new): Be sure to initialize all the
9911 fields.
9912
9913 2001-12-27 Akim Demaille <akim@epita.fr>
9914
9915 All the hacks using a final pseudo state are now useless.
9916
9917 * src/LR0.c (set_state_table): state_table holds exactly nstates.
9918 * src/lalr.c (nLA): New.
9919 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
9920 instead of lookaheadsp from the pseudo state (nstate + 1).
9921
9922 2001-12-27 Akim Demaille <akim@epita.fr>
9923
9924 * src/output.c (action_row, token_actions): Use a state_t instead
9925 of a integer, and nlookaheads instead of the following state's
9926 lookaheadsp.
9927
9928 2001-12-27 Akim Demaille <akim@epita.fr>
9929
9930 * src/conflicts.c (log_resolution, flush_shift)
9931 (resolve_sr_conflict, set_conflicts, solve_conflicts)
9932 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
9933 (conflicts_print, print_reductions): Use a state_t instead of an
9934 integer when referring to a state.
9935 As much as possible, depend upon nlookaheads, instead of the
9936 `lookaheadsp' member of the following state (since lookaheads of
9937 successive states are successive, the difference between state n + 1
9938 and n served as the number of lookaheads for state n).
9939 * src/lalr.c (add_lookback_edge): Likewise.
9940 * src/print.c (print_core, print_actions, print_state)
9941 (print_results): Likewise.
9942 * src/print_graph.c (print_core, print_actions, print_state)
9943 (print_graph): Likewise.
9944 * src/conflicts.h: Adjust.
9945
9946 2001-12-27 Akim Demaille <akim@epita.fr>
9947
9948 * src/bison.hairy: Formatting/comment changes.
9949 ANSIfy.
9950 Remove `register' indications.
9951 Add plenty of `static'.
9952
9953 2001-12-27 Akim Demaille <akim@epita.fr>
9954
9955 * src/output.c (prepare): Drop the muscle `ntbase' which
9956 duplicates ntokens.
9957 * src/bison.simple: Formatting/comment changes.
9958 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
9959 is an undocumented synonym.
9960
9961 2001-12-22 Akim Demaille <akim@epita.fr>
9962
9963 * src/output.c (output_table_data): Change the prototype to use
9964 `int' for array ranges: some invocations do pass an int, not a
9965 short.
9966 Reported by Wayne Green.
9967
9968 2001-12-22 Akim Demaille <akim@epita.fr>
9969
9970 Some actions of web2c.y are improperly triggered.
9971 Reported by Mike Castle.
9972
9973 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
9974 * tests/regression.at (Web2c): Rename as...
9975 (Web2c Report): this.
9976 (Web2c Actions): New.
9977
9978 2001-12-22 Akim Demaille <akim@epita.fr>
9979
9980 Reductions in web2c.y are improperly reported.
9981 Reported by Mike Castle.
9982
9983 * src/conflicts.c (print_reductions): Fix.
9984 * tests/regression.at (Web2c): New.
9985
9986 2001-12-18 Akim Demaille <akim@epita.fr>
9987
9988 Some host fail on `assert (!"foo")', which expands to
9989 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
9990 Reported by Nelson Beebee.
9991
9992 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
9993 `#define it_succeeded 0' and `assert (it_succeeded)'.
9994
9995 2001-12-17 Marc Autret <autret_m@epita.fr>
9996
9997 * src/bison.simple: Don't hard code the skeleton line and filename.
9998 * src/output.c (output_parser): Rename 'line' as 'output_line'.
9999 New line counter 'skeleton_line' (skeleton-line muscle).
10000
10001 2001-12-17 Paul Eggert <eggert@twinsun.com>
10002
10003 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
10004 YYDEBUG must be defined to a nonzero value.
10005
10006 * src/bison.simple (yytname): Do not assume that the user defines
10007 YYDEBUG to a properly parenthesized expression.
10008
10009 2001-12-17 Akim Demaille <akim@epita.fr>
10010
10011 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
10012 nlookaheads is a new member.
10013 Adjust all users.
10014 * src/lalr.h (nlookaheads): Remove this orphan declaration.
10015 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
10016 state.
10017
10018 2001-12-17 Akim Demaille <akim@epita.fr>
10019
10020 * src/files.h, src/files.c (open_files, close_files): Remove.
10021 * src/main.c (main): Don't open/close files, nor invoke lex_free,
10022 let...
10023 * src/reader.c (reader): Do it.
10024
10025 2001-12-17 Akim Demaille <akim@epita.fr>
10026
10027 * src/conflicts.c (print_reductions): Formatting changes.
10028
10029 2001-12-17 Akim Demaille <akim@epita.fr>
10030
10031 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
10032 (flush_reduce): New.
10033 (resolve_sr_conflict): Adjust.
10034
10035 2001-12-17 Akim Demaille <akim@epita.fr>
10036
10037 * src/output.c (output_obstack): Be static and rename as...
10038 (format_obstack): this, to avoid any confusion with files.c's
10039 output_obstack.
10040 * src/reader.h (muscle_obstack): Move to...
10041 * src/output.h: here, since it's defined in output.c.
10042
10043 2001-12-17 Akim Demaille <akim@epita.fr>
10044
10045 * src/output.c (action_row, save_column, default_goto)
10046 (sort_actions, matching_state, pack_vector): Better variable
10047 locality.
10048
10049 2001-12-17 Akim Demaille <akim@epita.fr>
10050
10051 * src/output.c: Various formatting changes.
10052
10053 2001-12-17 Akim Demaille <akim@epita.fr>
10054
10055 * src/files.c (output_files): Free the output_obstack.
10056 * src/main.c (main): Call print and print_graph conditionally.
10057 * src/print.c (print): Work unconditionally.
10058 * src/print_graph.c (print_graph): Work unconditionally.
10059 * src/conflicts.c (log_resolution): Output only if verbose_flag.
10060
10061 2001-12-16 Marc Autret <autret_m@epita.fr>
10062
10063 * src/output.c (actions_output): Fix. When we use %no-lines,
10064 there is one less line per action.
10065
10066 2001-12-16 Marc Autret <autret_m@epita.fr>
10067
10068 * src/bison.simple: Remove a useless #line directive.
10069 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
10070 * src/output.c (get_lines_number): New.
10071 (output_parser): Adjust, now takes care about the lines of a
10072 output muscles.
10073 Fix line numbering.
10074 (actions_output): Computes the number of lines taken by actions.
10075 (output_master_parser): Insert new skeleton which is the name of
10076 the output parser file name.
10077
10078 2001-12-15 Marc Autret <autret_m@epita.fr>
10079
10080 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
10081
10082 2001-12-15 Marc Autret <autret_m@epita.fr>
10083
10084 * src/output.c (output_gram): Keep track of the hairy one.
10085
10086 2001-12-15 Akim Demaille <akim@epita.fr>
10087
10088 Make `make distcheck' work.
10089
10090 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
10091 system.h which uses libgettext.h.
10092
10093 2001-12-15 Akim Demaille <akim@epita.fr>
10094
10095 * src/nullable.c (set_nullable): Useless rules must be skipped,
10096 otherwise, since we range over their symbols, we might look at a
10097 nonterminal which no longer ``exists'', i.e., it is not counted in
10098 `nvars', hence we overflow our arrays.
10099
10100 2001-12-15 Akim Demaille <akim@epita.fr>
10101
10102 The header can also be produced directly, without any obstack!
10103 Yahoo!
10104
10105 * src/files.c, src/files.h (defines_obstack): Remove.
10106 (compute_header_macro): Global.
10107 (defines_obstack_save): Remove.
10108 * src/reader.c (parse_union_decl): No longer output to
10109 defines_obstack: its content can be found in the `stype' muscle
10110 anyway.
10111 (output_token_translations): Merge into...
10112 (symbols_output): this.
10113 Rename as...
10114 (symbols_save): this.
10115 (reader): Adjust.
10116 * src/output.c (header_output): New.
10117 (output): Call it.
10118
10119 2001-12-15 Akim Demaille <akim@epita.fr>
10120
10121 * src/reader.c (parse_union_decl): Instead of handling two obstack
10122 simultaneously, use one to define the `stype' muscle, and use the
10123 value of the latter to fill defines_obstack.
10124 (copy_comment): Remove.
10125 (copy_comment2): Work for a single obstack.
10126 Rename as...
10127 (copy_comment): this.
10128
10129 2001-12-15 Akim Demaille <akim@epita.fr>
10130
10131 * src/lex.c, src/lex.h (xgetc): No longer static.
10132 * src/reader.c (parse_union_decl): Revamp.
10133
10134 2001-12-15 Akim Demaille <akim@epita.fr>
10135
10136 Still making progress in separating Bison into (i) input, (ii)
10137 process, (iii) output: now we can directly output the parser file
10138 without using table_obstack at all.
10139
10140 * src/files.c, src/files.h (table_obstack): Bye bye.
10141 (parser_file_name): New.
10142 * src/files.c (compute_output_file_names): Compute it.
10143 * src/output.c (actions_output, output_parser)
10144 (output_master_parser): To a file instead of an obstack.
10145
10146 2001-12-15 Akim Demaille <akim@epita.fr>
10147
10148 Attach actions to rules, instead of pre-outputting them to
10149 actions_obstack.
10150
10151 * src/gram.h (rule_t): action and action_line are new members.
10152 * src/reader.c (symbol_list): Likewise.
10153 (copy_action): Save the actions within the rule.
10154 (packgram): Save them in rule_table.
10155 * src/output.c (actions_output): New.
10156 (output_parser): Use it on `%%actions'.
10157 (output_rule_data): Don't free rule_table.
10158 (output): Do it.
10159 (prepare): Don't save the `action' muscle.
10160 * src/bison.simple: s/%%action/%%actions/.
10161
10162 2001-12-15 Akim Demaille <akim@epita.fr>
10163
10164 * src/reader.c (copy_action): When --yacc, don't append a `;'
10165 to the user action: let it fail if lacking.
10166 Suggested by Arnold Robbins and Tom Tromey.
10167
10168 2001-12-14 Akim Demaille <akim@epita.fr>
10169
10170 * src/lex.c (literalchar): Simply return the char you decoded, non
10171 longer mess around with obstacks and int pointers.
10172 Adjust all callers.
10173
10174 2001-12-14 Akim Demaille <akim@epita.fr>
10175
10176 * src/lex.c (literalchar): Don't escape the special characters,
10177 just decode them, and keep them as char (before, eol was output as
10178 the 2 char string `\n' etc.).
10179 * src/output.c (output_rule_data): Use quotearg to output the
10180 token strings.
10181
10182 2001-12-13 Paul Eggert <eggert@twinsun.com>
10183
10184 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
10185 Do not infringe on the global user namespace when using C++.
10186 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
10187 All uses of `fprintf' and `stderr' changed.
10188
10189 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
10190
10191 2001-12-13 Akim Demaille <akim@epita.fr>
10192
10193 The computation of nullable is broken: it doesn't handle empty
10194 RHS's properly.
10195
10196 * tests/torture.at (GNU AWK Grammar): New.
10197 * tests/sets.at (Nullable): New.
10198 * src/nullable.c (set_nullable): Instead of blindly looping over
10199 `ritems', loop over the rules, and then over their rhs's.
10200
10201 Work around Autotest bugs.
10202
10203 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
10204 frame, because Autotest understand lines starting with a `+' as
10205 traces from the shell. Then, they are not processed properly.
10206 Admittedly an Autotest bug, but we don't have time to wait for
10207 Autotest to catch up.
10208 * tests/regression.at (Broken Closure): Adjust to the new table
10209 frames.
10210 Move to...
10211 * tests/sets.at: here.
10212
10213 2001-12-13 Akim Demaille <akim@epita.fr>
10214
10215 * src/closure.c (closure): Use nrules instead of playing tricks
10216 with BITS_PER_WORD.
10217
10218 2001-12-13 Akim Demaille <akim@epita.fr>
10219
10220 * src/print.c (print_actions): Output the handling of `$' as the
10221 traces do: shifting the token EOF. Before EOF was treated as a
10222 nonterminal.
10223 * tests/regression.at: Adjust some tests.
10224 * src/print_graph.c (print_core): Complete the set of items via
10225 closure. The next-to-final and final states are still unsatisfying,
10226 but that's to be addressed elsewhere.
10227 No longer output the rule numbers, but do output the state number.
10228 A single loop for the shifts + gotos is enough, but picked a
10229 distinct color for each.
10230 (print_graph): Initialize and finalize closure.
10231
10232 2001-12-13 Akim Demaille <akim@epita.fr>
10233
10234 * src/reader.c (readgram): Remove dead code, an strip useless
10235 braces.
10236 (get_type): Remove, unused.
10237
10238 2001-12-12 Akim Demaille <akim@epita.fr>
10239
10240 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
10241 on that of lib/error.c.
10242
10243 2001-12-12 Akim Demaille <akim@epita.fr>
10244
10245 Some hosts don't like `/' in includes.
10246
10247 * src/system.h: Include libgettext.h without qualifying the path.
10248 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
10249 $(top_srcdir).
10250
10251 2001-12-11 Marc Autret <autret_m@epita.fr>
10252
10253 * src/output.c (output_parser): Remove useless muscle.
10254
10255 2001-12-11 Marc Autret <autret_m@epita.fr>
10256
10257 * src/bison.simple: Remove #line just before %%epilogue. It
10258 is now handled in ...
10259 * src/reader.c (read_additionnal_code): Add the output of a
10260 #line for the epilogue.
10261
10262 2001-12-10 Marc Autret <autret_m@epita.fr>
10263
10264 * src/reader.c (copy_definition): Re-use CPP-outed code which
10265 replace precedent remove.
10266 * src/bison.simple: Remove #line before %%prologue because
10267 %%input-line is wrong at this time.
10268
10269 2001-12-10 Marc Autret <autret_m@epita.fr>
10270
10271 * src/reader.c (symbols_output): Clean up.
10272 * src/output.c (output_gram, output): Clean up.
10273
10274 2001-12-10 Akim Demaille <akim@epita.fr>
10275
10276 * src/lalr.c (initialize_lookaheads): New. Extracted from...
10277 * src/LR0.c (set_state_table): here.
10278 * src/lalr.c (lalr): Call it.
10279
10280 2001-12-10 Akim Demaille <akim@epita.fr>
10281
10282 * src/state.h (shifts): Remove the `number' member: shifts are
10283 attached to state, hence no longer need to be labelled with a
10284 state number.
10285
10286 2001-12-10 Akim Demaille <akim@epita.fr>
10287
10288 Now that states have a complete set of members, the linked list of
10289 shifts is useless: just fill directly the state's shifts member.
10290
10291 * src/state.h (shifts): Remove the `next' member.
10292 * src/LR0.c (first_state, last_state): Remove.
10293 Adjust the callers.
10294 (augment_automaton): Don't look for the shifts that must be added
10295 a shift on EOF: it is those of the state we looked for! But now,
10296 since shifts are attached, it is no longer needed to looking
10297 merely by its id: its number.
10298
10299 2001-12-10 Akim Demaille <akim@epita.fr>
10300
10301 * src/LR0.c (augment_automaton): Better variable locality.
10302 Remove an impossible branch: if there is a state corresponding to
10303 the start symbol being shifted, then there is shift for the start
10304 symbol from the initial state.
10305
10306 2001-12-10 Akim Demaille <akim@epita.fr>
10307
10308 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
10309 only when appropriate: when insert_start_shifting_state' is not
10310 invoked.
10311 * tests/regression.at (Rule Line Numbers): Adjust.
10312
10313 2001-12-10 Akim Demaille <akim@epita.fr>
10314
10315 * src/LR0.c (augment_automaton): Now that all states have shifts,
10316 merge the two cases addition shifts to the initial state.
10317
10318 2001-12-10 Akim Demaille <akim@epita.fr>
10319
10320 * src/lalr.c (set_state_table): Move to...
10321 * src/LR0.c: here.
10322 * src/lalr.c (lalr): Don't call it...
10323 * src/LR0.c (generate_states): do it.
10324 * src/LR0.h (first_state): Remove, only the table is used.
10325
10326 2001-12-10 Akim Demaille <akim@epita.fr>
10327
10328 * src/LR0.h (first_shift, first_reduction): Remove.
10329 * src/lalr.c: Don't use first_shift: find shifts through the
10330 states.
10331
10332 2001-12-10 Akim Demaille <akim@epita.fr>
10333
10334 * src/LR0.c: Attach shifts to states as soon as they are
10335 computed.
10336 * src/lalr.c (set_state_table): Instead of assigning shifts to
10337 state, just assert that the mapping was properly done.
10338
10339 2001-12-10 Akim Demaille <akim@epita.fr>
10340
10341 * src/LR0.c (insert_start_shift): Rename as...
10342 (insert_start_shifting_state): this.
10343 (insert_eof_shifting_state, insert_accepting_state): New.
10344 (augment_automaton): Adjust.
10345 Better locality of the variables.
10346 When looking if the start_symbol is shifted from the initial
10347 state, using `while (... symbol != start_symbol ...)' sounds
10348 better than `while (... symbol < start_symbol ...)': If fail
10349 to see how the order between symbols could be relevant!
10350
10351 2001-12-10 Akim Demaille <akim@epita.fr>
10352
10353 * src/getargs.h: Don't declare `spec_name_prefix' and
10354 `spec_file_prefix', declared by src/files.h.
10355 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
10356 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
10357 * src/output.c (prepare): Adjust.
10358 * src/reader.c (symbols_output): Likewise.
10359 * src/vmsgetargs.c: Vaguely adjust, but who cares?
10360
10361 2001-12-10 Akim Demaille <akim@epita.fr>
10362
10363 * src/muscle_tab.c (muscle_init): NULL is a better default than
10364 `"0"'.
10365
10366 2001-12-10 Akim Demaille <akim@epita.fr>
10367
10368 * src/reader.c (reader): Calling symbols_output once is enough.
10369
10370 2001-12-10 Akim Demaille <akim@epita.fr>
10371
10372 Now that states have a complete set of members, the linked list of
10373 reductions is useless: just fill directly the state's reductions
10374 member.
10375
10376 * src/state.h (struct reductions): Remove member `number' and
10377 `next'.
10378 * src/LR0.c (first_reduction, last_reduction): Remove.
10379 (save_reductions): Don't link the new reductions, store them in
10380 this_state.
10381 * src/lalr.c (set_state_table): No need to attach reductions to
10382 states, it's already done.
10383 * src/output.c (output_actions): No longer free the shifts, then
10384 the reductions, then the states: free all the states and their
10385 members.
10386
10387 2001-12-10 Akim Demaille <akim@epita.fr>
10388
10389 * src/options.c (OPTN, DRTV, BOTH): New.
10390 (option_table): Use them.
10391
10392 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
10393 the job of system.h.
10394 * src/options.c: Don't include stdio.h and xalloc.h for the same
10395 reasons.
10396
10397 2001-12-10 Akim Demaille <akim@epita.fr>
10398
10399 * src/output.c (output, prepare): Make sure the values of the
10400 muscles `action' and `prologue' are 0-terminated.
10401
10402 2001-12-10 Akim Demaille <akim@epita.fr>
10403
10404 Clean up GCC warnings.
10405
10406 * src/reader.c (copy_action): `buf' is not used.
10407 (parse_skel_decl): Be static.
10408 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
10409 * src/options.h (create_long_option_table): Have a real prototype.
10410 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
10411 (hash_delete_at): Return const void *.
10412 Adjust casts to preserve the const.
10413
10414 2001-12-10 Akim Demaille <akim@epita.fr>
10415
10416 * configure.in: Require 2.52g.
10417 M4 is not needed, but AUTOM4TE is.
10418 * m4/m4.m4: Remove.
10419 * tests/Makefile.am: Adjust.
10420
10421 2001-12-10 Akim Demaille <akim@epita.fr>
10422
10423 One structure for states is enough, even though theoretically
10424 there are LR(0) states and LALR(1) states.
10425
10426 * src/lalr.h (state_t): Remove.
10427 (state_table): Be state_t **, not state_t *.
10428 * src/state.h (core, CORE_ALLOC): Rename as...
10429 (state_t, STATE_ALLOC): this.
10430 Add the LALR(1) members: shifts, reductions, errs.
10431 * src/LR0.c (state_table): Rename as...
10432 (state_hash): this, to avoid name clashes with the global
10433 `state_table'.
10434 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
10435 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
10436
10437 2001-12-10 Akim Demaille <akim@epita.fr>
10438
10439 Bison dumps core on bash.y.
10440 Reported by Pascal Bart.
10441
10442 * src/warshall.c (bitmatrix_print): New.
10443 (TC): Use it.
10444 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
10445 j must be the outer loop.
10446 * tests/regression.at (Broken Closure): New.
10447
10448 2001-12-05 Akim Demaille <akim@epita.fr>
10449
10450 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
10451 its argument.
10452 Reported by Peter Hamorsky.
10453
10454 2001-12-05 Akim Demaille <akim@epita.fr>
10455
10456 * src/conflicts.c (err_table): Remove.
10457 (resolve_sr_conflict): Adjust.
10458 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
10459 Rename as...
10460 (state_t.reductions, state_t.shifts): this.
10461
10462 2001-12-05 Akim Demaille <akim@epita.fr>
10463
10464 * src/reduce.c (reduce_grammar_tables): No longer disable the
10465 removal of useless rules via CPP but via `if (0)', so that the
10466 compiler still check the code is valid.
10467 For instance, it should have noticed `rline' no longer exists: use
10468 the `line' member of rule_t.
10469 * src/gram.c (dummy, rline): Remove, unused.
10470
10471 2001-12-05 Akim Demaille <akim@epita.fr>
10472
10473 * src/output.c (pack_vector): Use assert, not berror.
10474 * src/main.c (berror): Remove, unused.
10475
10476 2001-12-05 Akim Demaille <akim@epita.fr>
10477
10478 New experimental feature: if --verbose --trace output all the
10479 items of a state, not only its kernel.
10480
10481 * src/print.c (print_core): If `trace_flag', then invoke closure
10482 before outputting the items of the state (print_core is no longer
10483 a correct name them).
10484 (print_results): Invoke new_closure/free_closure if needed.
10485
10486 2001-12-05 Akim Demaille <akim@epita.fr>
10487
10488 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
10489 * src/closure.c, src/closure.h (itemsetsize): Rename as...
10490 (nitemset): for consistency with the rest of the project.
10491
10492 2001-12-05 Akim Demaille <akim@epita.fr>
10493
10494 * src/closure.c (print_closure): Improve.
10495 (closure): Use it for printing input and output.
10496
10497 2001-12-05 Akim Demaille <akim@epita.fr>
10498
10499 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
10500 indexed by nonterminals.
10501
10502 2001-12-05 Akim Demaille <akim@epita.fr>
10503
10504 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
10505 what it was!).
10506 * src/warshall.h: Remove accidental duplication of the content.
10507
10508 2001-12-05 Akim Demaille <akim@epita.fr>
10509
10510 * src/closure.c (set_fderives): De-obfuscate.
10511
10512 2001-12-05 Akim Demaille <akim@epita.fr>
10513
10514 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
10515
10516 2001-12-05 Akim Demaille <akim@epita.fr>
10517
10518 * src/closure.c (set_firsts): De-obfuscate.
10519
10520 2001-12-05 Akim Demaille <akim@epita.fr>
10521
10522 * src/output.c (action_row): De-obfuscate
10523 using the good o' techniques: arrays not pointers, variable
10524 locality, BITISSET, RESETBIT etc.
10525
10526 2001-12-05 Akim Demaille <akim@epita.fr>
10527
10528 Pessimize the code to simplify it: from now on, all the states
10529 have a valid SHIFTS, which NSHIFTS is possibly 0.
10530
10531 * src/LR0.c (shifts_new): Be global and move to..
10532 * src/state.c, src/state.h: here.
10533 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
10534 * src/print_graph: Adjust.
10535
10536 2001-12-05 Akim Demaille <akim@epita.fr>
10537
10538 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
10539 * src/conflicts.c: Use it.
10540 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
10541 incorrectly ``simplified''.
10542
10543 2001-12-05 Akim Demaille <akim@epita.fr>
10544
10545 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
10546 using the good o' techniques: arrays not pointers, variable
10547 locality, BITISSET, RESETBIT etc.
10548
10549 2001-12-05 Akim Demaille <akim@epita.fr>
10550
10551 * src/state.h (SHIFT_SYMBOL): New.
10552 * src/conflicts.c: Use it to deobfuscate.
10553
10554 2001-12-05 Akim Demaille <akim@epita.fr>
10555
10556 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
10557 (print_reductions): De-obfuscate using the good o' techniques:
10558 arrays not pointers, variable locality, BITISSET.
10559
10560 2001-12-05 Akim Demaille <akim@epita.fr>
10561
10562 * src/conflicts.c (print_reductions): Arrays, not pointers.
10563 Use BITISSET.
10564
10565 2001-12-05 Akim Demaille <akim@epita.fr>
10566
10567 * src/conflicts.c (print_reductions): Pessimize, but clarify.
10568
10569 2001-12-05 Akim Demaille <akim@epita.fr>
10570
10571 * src/conflicts.c (print_reductions): Improve variable locality.
10572
10573 2001-12-05 Akim Demaille <akim@epita.fr>
10574
10575 * src/conflicts.c (print_reductions): Pessimize, but clarify.
10576
10577 2001-12-05 Akim Demaille <akim@epita.fr>
10578
10579 * src/conflicts.c (print_reductions): Improve variable locality.
10580
10581 2001-12-05 Akim Demaille <akim@epita.fr>
10582
10583 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
10584 * src/lalr.c: Use them.
10585
10586 2001-12-05 Akim Demaille <akim@epita.fr>
10587
10588 * src/LR0.c (augment_automaton): Formatting changes.
10589 Better variable locality.
10590
10591 2001-12-05 Akim Demaille <akim@epita.fr>
10592
10593 * src/lalr.c (matrix_print): New.
10594 (transpose): Use it.
10595 Use arrays instead of pointers.
10596
10597 2001-12-05 Akim Demaille <akim@epita.fr>
10598
10599 * src/lalr.c (maxrhs): Move to...
10600 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
10601 * src/lalr.c (build_relations): Adjust.
10602
10603 2001-12-05 Akim Demaille <akim@epita.fr>
10604
10605 * src/lalr.c (transpose): Free the memory allocated to the
10606 argument, as it is replaced by the results by the unique caller.
10607 (build_relations): Merely invoke transpose: it handles the memory
10608 deallocation.
10609 Improve variable locality.
10610 Avoid variables used as mere abbreviations.
10611 (compute_lookaheads): Use arrays instead of pointers.
10612
10613 2001-12-05 Akim Demaille <akim@epita.fr>
10614
10615 * src/lalr.c (initialize_F): Improve variable locality.
10616 Avoid variables used as mere abbreviations.
10617
10618 2001-12-05 Akim Demaille <akim@epita.fr>
10619
10620 * src/derives.c (print_derives): Display the ruleno.
10621 * src/lalr.c (initialize_F, transpose): Better variable locality
10622 to improve readability.
10623 Avoid variables used as mere abbreviations.
10624
10625 2001-12-05 Akim Demaille <akim@epita.fr>
10626
10627 * src/lalr.c (traverse): Use arrays instead of pointers.
10628
10629 2001-12-05 Akim Demaille <akim@epita.fr>
10630
10631 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
10632 the handling of squeue.
10633 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
10634
10635 2001-12-05 Akim Demaille <akim@epita.fr>
10636
10637 Because useless nonterminals are now kept alive (instead of being
10638 `destroyed'), we now sometimes examine them, and store information
10639 related to them. Hence we need to know their number, and adjust
10640 memory allocations.
10641
10642 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
10643 static.
10644 * src/LR0.c (allocate_itemsets): The memory allocated to
10645 `symbol_count' was used for two different purpose: once to count
10646 the number of occurrences of each symbol, and later reassigned to
10647 `shift_symbol', containing the symbol that can be shifted from a
10648 given state.
10649 Deobfuscate, i.e., allocate, use and free `symbol_count' here
10650 only, and...
10651 (new_itemsets): Allocate `shift_symbol' here.
10652 (allocate_itemsets): symbol_count includes useless nonterminals.
10653 Make room for them.
10654 (free_storage): Use `free', not `XFREE', for pointers that cannot
10655 be null.
10656
10657 2001-12-05 Akim Demaille <akim@epita.fr>
10658
10659 * src/nullable.c (set_nullable): Deobfuscate the handling of
10660 ritem.
10661 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
10662
10663 2001-12-05 Akim Demaille <akim@epita.fr>
10664
10665 * src/gram.c, src/gram.h (ritem_print): New.
10666 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
10667 (This useless function was defined only to work around VMS linkers
10668 that can't handle compilation units with variables only).
10669 * src/reduce.c (dump_grammar): Use it to trace the construction of
10670 ritem.
10671
10672 2001-12-04 Paul Eggert <eggert@twinsun.com>
10673
10674 * src/bison.simple (union yyalloc): Change member names
10675 to be the same as the stack names.
10676 (yyparse): yyptr is now union yyalloc *, not char *.
10677 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
10678 and may generate better code on some machines.
10679 (yystpcpy): Use prototype if __STDC__ is defined, not just
10680 if __cplusplus is defined.
10681
10682 2001-11-30 Akim Demaille <akim@epita.fr>
10683
10684 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
10685 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
10686 Gettext doesn't compile cleanly, and dies with -Werror.
10687 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
10688 Include WARNING_CFLAGS here.
10689 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
10690 before being defined.
10691
10692 2001-11-27 Paul Eggert <eggert@twinsun.com>
10693
10694 * lib/quotearg.h (quotearg_n, quotearg_n_style):
10695 First arg is int, not unsigned.
10696 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
10697 (SIZE_MAX, UINT_MAX): New macros.
10698 (quotearg_n_options): Abort if N is negative.
10699 Avoid overflow check on hosts where size_t is 64 bits and int
10700 is 32 bits, as overflow is impossible there.
10701 Fix off-by-one typo that caused unnecessary reallocation.
10702
10703 2001-11-29 Paul Eggert <eggert@twinsun.com>
10704
10705 Name space cleanup in generated parser.
10706
10707 * doc/bison.texinfo (Bison Parser): Discuss system headers
10708 and their effect on the user name space.
10709
10710 * src/bison.simple:
10711 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
10712 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
10713 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
10714
10715 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
10716 on user names when possible.
10717
10718 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
10719 Simplify test for whather <alloca.h> exists.
10720
10721 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
10722
10723 (<stdio.h>): Include if YYDEBUG.
10724
10725 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
10726 ! defined (yyoverflow) && ! defined (yymemcpy).
10727
10728 (yymemcpy, yyparse): Rename local variables as needed so that
10729 they all begin with 'yy'.
10730
10731 (yystrlen, yystpcpy): New functions.
10732
10733 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
10734 All uses changed.
10735
10736 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
10737 instead of relying on string.h functions. Use YYSTACK_ALLOC
10738 and YYSTACK_FREE instead of malloc and free.
10739
10740 2001-11-30 Akim Demaille <akim@epita.fr>
10741
10742 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
10743 before their first uses.
10744 (YYBISON, YYPURE): Move to the top of the output.
10745
10746 2001-11-30 Akim Demaille <akim@epita.fr>
10747
10748 * tests/reduce.at (Useless Nonterminals): Fix.
10749
10750 2001-11-30 Akim Demaille <akim@epita.fr>
10751
10752 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
10753 if body instead of `;' to pacify GCC's warnings.
10754
10755 2001-11-30 Akim Demaille <akim@epita.fr>
10756
10757 Instead of mapping the LHS of unused rules to -1, keep the LHS
10758 valid, but flag the rules as invalid.
10759
10760 * src/gram.h (rule_t): `useful' is a new member.
10761 * src/print.c (print_grammar): Adjust.
10762 * src/derives.c (set_derives): Likewise.
10763 * src/reader.c (packgram, reduce_output): Likewise.
10764 * src/reduce.c (reduce_grammar_tables): Likewise.
10765 * tests/reduce.at (Underivable Rules, Useless Rules): New.
10766
10767 2001-11-30 Akim Demaille <akim@epita.fr>
10768
10769 * src/reduce.c (reduce_output): Formatting changes.
10770 * src/print.c (print_results, print_grammar): Likewise.
10771 * tests/regression.at (Rule Line Numbers)
10772 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
10773
10774 2001-11-30 Akim Demaille <akim@epita.fr>
10775
10776 * src/reduce.c (nonterminals_reduce): Instead of throwing away
10777 useless nonterminals, move them at the end of the symbol arrays.
10778 (reduce_output): Adjust.
10779 * tests/reduce.at (Useless Nonterminals): Adjust.
10780
10781 2001-11-30 Akim Demaille <akim@epita.fr>
10782
10783 * src/reduce.c: Various comment/formatting changes.
10784 (nonterminals_reduce): New, extracted from...
10785 (reduce_grammar_tables): here.
10786 (reduce_grammar): Call nonterminals_reduce.
10787
10788 2001-11-29 Paul Eggert <eggert@twinsun.com>
10789
10790 * src/bison.simple (YYSTACK_REALLOC): Remove.
10791 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
10792 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
10793 New macros.
10794 (union yyalloc): New type.
10795 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
10796 an arbitrary restriction on hosts where size_t is wider than int.
10797
10798 (yyparse): Don't dump core if alloca or malloc fails; instead, report
10799 a parser stack overflow. Allocate just one block of memory for all
10800 three stacks, instead of allocating three blocks; this typically is
10801 faster and reduces fragmentation.
10802
10803 Do not limit the number of items in the stack to a value that fits
10804 in 'int', as this is an arbitrary limit on hosts with 64-bit
10805 size_t and 32-bit int.
10806
10807 2001-11-29 Marc Autret <autret_m@epita.fr>
10808
10809 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
10810 of defining YYERROR_VERBOSE.
10811 [AT_DATA]: $4 is now out of C declarations in the prologue.
10812
10813 2001-11-28 Marc Autret <autret_m@epita.fr>
10814
10815 * src/reader.c (parse_dquoted_param): New.
10816 (parse_skel_decl): Use it.
10817 * src/lex.h: Add its prototype.
10818 * src/lex.c (literalchar): Become not static.
10819
10820 2001-11-28 Marc Autret <autret_m@epita.fr>
10821
10822 * src/output.h: And put its extern declaration here.
10823 * src/output.c (error_verbose): Define here.
10824 (prepare): Echo name modification.
10825 * src/getargs.h: Clean its extern declaration.
10826 * src/getargs.c (error_verbose_flag): Remove.
10827 (getargs): Remove case 'e'.
10828 * src/options.c (option_table): 'error-verbose' is now seen as simple
10829 percent option.
10830 Include output.h.
10831
10832 * src/reader.c (read_declarations): Remove case tok_include.
10833 (parse_include_decl): Remove.
10834 * src/lex.h (token_t): Remove tok_include.
10835 * src/options.c (option_table): 'include' is now a simple command line
10836 option.
10837
10838 2001-11-28 Marc Autret <autret_m@epita.fr>
10839
10840 * src/bison.simple: Adjust muscle names.
10841 * src/muscle_tab.c (muscle_init): Also rename the muscles.
10842 * src/output.c (prepare): s/_/-/ for the muscles names.
10843 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
10844
10845 2001-11-28 Marc Autret <autret_m@epita.fr>
10846
10847 * src/bison.simple: Fix debug.
10848 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
10849
10850 2001-11-28 Akim Demaille <akim@epita.fr>
10851
10852 * src/LR0.c (shifts_new): New.
10853 (save_shifts, insert_start_shift, augment_automaton): Use it.
10854
10855 2001-11-28 Akim Demaille <akim@epita.fr>
10856
10857 * src/closure.c (closure): `b' and `ruleno' denote the same value:
10858 keep ruleno only.
10859
10860 2001-11-28 Akim Demaille <akim@epita.fr>
10861
10862 * src/closure.c (closure): Instead of looping over word in array
10863 then bits in words, loop over bits in array.
10864
10865 2001-11-28 Akim Demaille <akim@epita.fr>
10866
10867 * src/closure.c (closure): No longer optimize the special case
10868 where all the bits of `ruleset[r]' are set to 0, to make the code
10869 clearer.
10870
10871 2001-11-28 Akim Demaille <akim@epita.fr>
10872
10873 * src/closure.c (closure): `r' and `c' are new variables, used to
10874 de-obfuscate accesses to RULESET and CORE.
10875
10876 2001-11-28 Akim Demaille <akim@epita.fr>
10877
10878 * src/reduce.c (reduce_print): Use ngettext.
10879 (dump_grammar): Improve the trace accuracy.
10880
10881 2001-11-28 Akim Demaille <akim@epita.fr>
10882
10883 * src/reduce.c (dump_grammar): Don't translate trace messages.
10884
10885 2001-11-28 Akim Demaille <akim@epita.fr>
10886
10887 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
10888 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
10889 as all tags are free'ed afterwards.
10890 From Enrico Scholz.
10891
10892 2001-11-27 Paul Eggert <eggert@twinsun.com>
10893
10894 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
10895 use alloca when we didn't want to, and vice versa.
10896
10897 2001-11-27 Marc Autret <autret_m@epita.fr>
10898
10899 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
10900 initialization.
10901 * src/output.c (prepare): Remove its update.
10902
10903 2001-11-27 Marc Autret <autret_m@epita.fr>
10904
10905 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
10906 Use %error-verbose.
10907
10908 2001-11-27 Marc Autret <autret_m@epita.fr>
10909
10910 * src/bison.simple: Remove YYERROR_VERBOSE using.
10911 Use %%error_verbose.
10912 (yyparse): Likewise.
10913 * src/output.c (prepare): Give its final value.
10914 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
10915 * src/getargs.h: Add its extern declaration.
10916 * src/getargs.c (error_verbose_flag): New int.
10917 (getargs): Update to catch new case.
10918 * src/options.c (option_table): 'error-verbose' is a new option.
10919 (shortopts): Update.
10920
10921 2001-11-27 Akim Demaille <akim@epita.fr>
10922
10923 * src/system.h: Use intl/libgettext.h.
10924 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
10925
10926 2001-11-27 Akim Demaille <akim@epita.fr>
10927
10928 * tests/torture.at (Exploding the Stack Size with Malloc):
10929 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
10930
10931 2001-11-27 Akim Demaille <akim@epita.fr>
10932
10933 * src/files.c: Include error.h.
10934 Reported by Hans Aberg.
10935
10936 2001-11-26 Marc Autret <autret_m@epita.fr>
10937
10938 * src/reader.c (parse_include_decl): New, not yet implemented.
10939 (read_declarations): Add case tok_include.
10940 * src/getargs.h (include): Add its extern definition.
10941 * src/getargs.c (include): New const char *.
10942 (getargs): Add case '-I'.
10943 * src/options.c (option_table): Add include as command line and
10944 percent option.
10945 * src/lex.h (token_t): Add tok_include.
10946
10947 2001-11-26 Akim Demaille <akim@epita.fr>
10948
10949 * src/reader.c (readgram): Make sure rules for mid-rule actions
10950 have a lineno equal to that of their host rule.
10951 Reported by Hans Aberg.
10952 * tests/regression.at (Rule Line Numbers): New.
10953
10954 2001-11-26 Akim Demaille <akim@epita.fr>
10955
10956 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
10957 size_ts.
10958
10959 2001-11-26 Akim Demaille <akim@epita.fr>
10960
10961 * src/complain.c, src/complain.h (error): Remove, provided by
10962 lib/error.[ch].
10963
10964 2001-11-26 Akim Demaille <akim@epita.fr>
10965
10966 * src/reader.c (read_declarations): Don't abort on tok_illegal,
10967 issue an error message.
10968 * tests/regression.at (Invalid %directive): New.
10969 Reported by Hans Aberg.
10970
10971 2001-11-26 Akim Demaille <akim@epita.fr>
10972
10973 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
10974 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
10975
10976 2001-11-26 Akim Demaille <akim@epita.fr>
10977
10978 * src/conflicts.c (conflicts_print): Don't complain at all when
10979 there are no reduce/reduce conflicts, and as many shift/reduce
10980 conflicts as expected.
10981 * tests/regression.at (%expect right): Adjust.
10982
10983 2001-11-23 Akim Demaille <akim@epita.fr>
10984
10985 * lib/alloca.c: Update, from fileutils.
10986
10987 2001-11-23 Akim Demaille <akim@epita.fr>
10988
10989 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
10990
10991 2001-11-23 Akim Demaille <akim@epita.fr>
10992
10993 * src/system.h: Include alloca.h.
10994 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
10995
10996 2001-11-23 Akim Demaille <akim@epita.fr>
10997
10998 * src/print_graph.c (print_actions): Remove `rule', unused.
10999 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
11000 pacify GCC's signed < unsigned warnings.
11001 * src/closure.c (itemsetsize): Likewise.
11002 * src/reader.c (symbol_list_new): Static.
11003
11004 2001-11-23 Akim Demaille <akim@epita.fr>
11005
11006 Attaching lineno to buckets is stupid, since only one copy of each
11007 symbol is kept, only the line of the first occurrence is kept too.
11008
11009 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
11010 * src/reader.c (rline_allocated): Remove, unused.
11011 (symbol_list): Have a `line' member.
11012 (symbol_list_new): New.
11013 (readgram): Use it.
11014 * src/print.c (print_grammar): Output the rule line numbers.
11015 * tests/regression.at (Solved SR Conflicts)
11016 (Unresolved SR Conflicts): Adjust.
11017 Reported by Hans Aberg.
11018
11019 2001-11-22 Marc Autret <autret_m@epita.fr>
11020
11021 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
11022
11023 2001-11-22 Marc Autret <autret_m@epita.fr>
11024
11025 * src/muscle_tab.c (muscle_init): Remove initialization of
11026 skeleton muscle.
11027 * src/output.c (output_master_parser): Do it here.
11028
11029 2001-11-20 Akim Demaille <akim@epita.fr>
11030
11031 * po/sv.po: New.
11032 * configure.in (ALL_LINGUAS): Adjust.
11033 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
11034 longer contains strings to translate.
11035
11036 2001-11-19 Akim Demaille <akim@epita.fr>
11037
11038 * src/conflicts.c (conflicts_print): Add a missing \n.
11039
11040 2001-11-19 Akim Demaille <akim@epita.fr>
11041
11042 * src/nullable.c (nullable_print): New.
11043 (set_nullable): Call it when tracing.
11044 Better locality of variables.
11045
11046 2001-11-19 Akim Demaille <akim@epita.fr>
11047
11048 * src/print.c (print_actions): Better locality of variables.
11049
11050 2001-11-19 Akim Demaille <akim@epita.fr>
11051
11052 * src/derives.c (print_derives): Fix and enrich.
11053 * src/closure.c (print_fderives): Likewise.
11054
11055 2001-11-19 Akim Demaille <akim@epita.fr>
11056
11057 * src/closure.c (itemsetend): Remove, replaced with...
11058 (itemsetsize): new.
11059
11060 2001-11-19 Akim Demaille <akim@epita.fr>
11061
11062 * src/LR0.c (kernel_end): Remove, replaced with...
11063 (kernel_size): new.
11064
11065 2001-11-19 Akim Demaille <akim@epita.fr>
11066
11067 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
11068 to clarify.
11069
11070 2001-11-19 Akim Demaille <akim@epita.fr>
11071
11072 * src/closure.c (closure): Use arrays instead of pointers to clarify.
11073
11074 2001-11-19 Akim Demaille <akim@epita.fr>
11075
11076 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
11077 trace messages.
11078 * src/LR0.c: Likewise.
11079 (allocate_itemsets): Use arrays instead of pointers to clarify.
11080
11081 2001-11-19 Akim Demaille <akim@epita.fr>
11082
11083 * src/getargs.c (statistics_flag): Replace with...
11084 (trace_flag): New.
11085 (longopts): Accept --trace instead of --statistics.
11086 * src/getargs.h, src/options.c: Adjust.
11087 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
11088 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
11089
11090 2001-11-19 Akim Demaille <akim@epita.fr>
11091
11092 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
11093 pointers to clarify the code.
11094 (save_reductions, save_shifts): Factor common parts of alternatives.
11095
11096 2001-11-19 Akim Demaille <akim@epita.fr>
11097
11098 * src/LR0.c (new_state, get_state): Complete TRACE code.
11099 * src/closure.c: Include `reader.h' to get `tags', needed by the
11100 trace code.
11101 Rename the conditional DEBUG as TRACE.
11102 Output consistently TRACEs to stderr, not stdout.
11103 * src/derives.c: Likewise.
11104 * src/reduce.c: (inaccessable_symbols): Using if is better style
11105 than goto.
11106 Use `#if TRACE' instead of `#if 0' for tracing code.
11107
11108 2001-11-19 Akim Demaille <akim@epita.fr>
11109
11110 * src/system.h (LIST_FREE, shortcpy): New.
11111 * src/LR0.c: Use them.
11112 * src/output.c (free_itemsets, free_reductions, free_shifts):
11113 Remove, replaced by LIST_FREE.
11114
11115 2001-11-19 Akim Demaille <akim@epita.fr>
11116
11117 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
11118 (REDUCTIONS_ALLOC): New.
11119 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
11120 allocation.
11121
11122 2001-11-19 Akim Demaille <akim@epita.fr>
11123
11124 * src/LR0.c (new_state): Complete trace code.
11125 * src/nullable.c (set_nullable): Don't translate traces.
11126
11127 2001-11-19 Akim Demaille <akim@epita.fr>
11128
11129 * src/print_graph.c (print_core): Better locality of variables.
11130 * src/print.c (print_core): Likewise.
11131
11132 2001-11-19 Akim Demaille <akim@epita.fr>
11133
11134 * src/vcg.c: You do the output, so you are responsible of the
11135 handling of VCG syntax, in particular: use quotearg.
11136 * src/print_graph.c: Don't.
11137 (print_actions): Don't output the actions as part of the nodes,
11138 since that's the job of the edges.
11139 (print_state): Don't output by hand: fill the node description,
11140 and ask for its output.
11141
11142 2001-11-19 Akim Demaille <akim@epita.fr>
11143
11144 * src/bison.simple (yyparse): When verbosely reporting an error,
11145 no longer put additional quotes around token names.
11146 * tests/calc.at: Adjust.
11147
11148 2001-11-19 Akim Demaille <akim@epita.fr>
11149
11150 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
11151 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
11152 * src/output.c: Adjust.
11153
11154 2001-11-19 Akim Demaille <akim@epita.fr>
11155
11156 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
11157 (rule_t): this.
11158 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
11159
11160 2001-11-19 Akim Demaille <akim@epita.fr>
11161
11162 * src/gram.h (rule_t): New.
11163 (rule_table): New.
11164 (rrhs, rlhs): Remove, part of state_t.
11165 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
11166 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
11167 * src/reader.c, src/reduce.c: Adjust.
11168
11169 2001-11-19 Akim Demaille <akim@epita.fr>
11170
11171 * src/reader.c (symbols_output): New, extracted from...
11172 (packsymbols): Here.
11173 (reader): Call it.
11174
11175 2001-11-19 Akim Demaille <akim@epita.fr>
11176
11177 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
11178 (maxrhs): this new function.
11179
11180 2001-11-19 Akim Demaille <akim@epita.fr>
11181
11182 * src/lalr.c (F): New macro to access the variable F.
11183 Adjust.
11184
11185 2001-11-19 Akim Demaille <akim@epita.fr>
11186
11187 * src/lalr.h (LA): New macro to access the variable LA.
11188 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
11189 * src/lalr.c: Adjust.
11190
11191 2001-11-19 Akim Demaille <akim@epita.fr>
11192
11193 * src/lalr.c (initialize_LA): Only initialize LA. Let...
11194 (set_state_table): handle the `lookaheads' members.
11195
11196 2001-11-19 Akim Demaille <akim@epita.fr>
11197
11198 * src/lalr.h (lookaheads): Removed array, whose contents is now
11199 a member of...
11200 (state_t): this structure.
11201 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
11202 Adjust.
11203
11204 2001-11-19 Akim Demaille <akim@epita.fr>
11205
11206 * src/lalr.h (consistent): Removed array, whose contents is now
11207 a member of...
11208 (state_t): this structure.
11209 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
11210 Adjust.
11211
11212 2001-11-19 Akim Demaille <akim@epita.fr>
11213
11214 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
11215 contents are now members of...
11216 (state_t): this structure.
11217 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
11218 Adjust.
11219
11220 2001-11-19 Akim Demaille <akim@epita.fr>
11221
11222 * src/lalr.h (state_t): New.
11223 (state_table): Be a state_t * instead of a core **.
11224 (accessing_symbol): Remove, part of state_t.
11225 * src/lalr.c: Adjust.
11226 (set_accessing_symbol): Merge into...
11227 (set_state_table): this.
11228 * src/print_graph.c, src/conflicts.c: Adjust.
11229
11230 2001-11-14 Akim Demaille <akim@epita.fr>
11231
11232 * tests/calc.at, tests/output.at, tests/regression.at,
11233 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
11234 now the tests are run in private dirs, therefore AC_CLEANUP and
11235 family can be simplified to 0-ary.
11236 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
11237 use abs. path to find config.h.
11238 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
11239 stderr, there can be way too much random noise.
11240 Instead pass -Werror to GCC and rely on the exit status.
11241 Reported by Wolfram Wagner.
11242
11243 2001-11-14 Akim Demaille <akim@epita.fr>
11244
11245 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
11246 defined only if yyoverflow is defined, to avoid `warning: unused
11247 variable `yyvs1''.
11248 Reported by The Test Suite.
11249
11250 2001-11-14 Akim Demaille <akim@epita.fr>
11251
11252 * src/print.c: Include reduce.h.
11253 Reported by Hans Aberg.
11254
11255 2001-11-14 Akim Demaille <akim@epita.fr>
11256
11257 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
11258 Revert a previous patch: these are really const.
11259 * src/conflicts.c (conflict_report): Additional useless pair of
11260 braces to pacify GCC's warnings for `if () if () {} else {}'.
11261 * src/lex.c (parse_percent_token): Replace equal_offset with
11262 arg_offset.
11263 arg is const.
11264 Be sure to strdup `arg' when used, since there is no reason for
11265 token_buffer not to change.
11266
11267 2001-11-14 Akim Demaille <akim@epita.fr>
11268
11269 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
11270 definition.
11271 * src/main.c (main): Use them.
11272 Suggested by Hans Aberg.
11273
11274 2001-11-12 Akim Demaille <akim@epita.fr>
11275
11276 * src/system.h (ngettext): Now that we use ngettext, be sure to
11277 provide a default definition when NLS are not used.
11278
11279 2001-11-12 Akim Demaille <akim@epita.fr>
11280
11281 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
11282 Use @kbd to denote user input.
11283 (Language and Grammar): ANSIfy the example.
11284 Adjust its layout for info/notinfo.
11285 (Location Tracking Calc): Output error messages to stderr.
11286 Output locations in a more GNUtically correct way.
11287 Fix a couple of Englishos.
11288 Adjust @group/@end group pairs.
11289
11290 2001-11-12 Akim Demaille <akim@epita.fr>
11291
11292 %expect was not functioning at all.
11293
11294 * src/conflicts.c (expected_conflicts): Set to -1.
11295 (conflict_report): Use ngettext.
11296 (conflicts_print): Check %expect and make its violation an error.
11297 * doc/bison.texinfo (Expect Decl): Adjust.
11298 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
11299 * tests/regression.at (%expect not enough, %expect right)
11300 (%expect too much): New.
11301
11302 2001-11-12 Akim Demaille <akim@epita.fr>
11303
11304 * tests/regression.at (Conflicts): Rename as...
11305 (Unresolved SR Conflicts): this.
11306 (Solved SR Conflicts): New.
11307
11308 2001-11-12 Akim Demaille <akim@epita.fr>
11309
11310 * src/reduce.c (print_results): Rename as...
11311 (reduce_output): This.
11312 Output to OUT, passed as argument, instead of output_obstack.
11313 (dump_grammar): Likewise.
11314 (reduce_free): New.
11315 Also free V1.
11316 (reduce_grammar): No longer call reduce_output, since...
11317 * src/print.c (print_results): do it.
11318 * src/main.c (main): Call reduce_free;
11319
11320 2001-11-12 Akim Demaille <akim@epita.fr>
11321
11322 * src/conflicts.c (print_reductions): Accept OUT as argument.
11323 Output to it, not to output_obstack.
11324 * src/print.c (print_actions): Adjust.
11325
11326 2001-11-12 Akim Demaille <akim@epita.fr>
11327
11328 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
11329 the result instead of using...
11330 (src_total, rrc_total, src_count, rrc_count): Remove.
11331 (any_conflicts): Remove.
11332 (print_conflicts): Split into...
11333 (conflicts_print, conflicts_output): New.
11334 * src/conflicts.h: Adjust.
11335 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
11336 * src/print.c (print_grammar): Issue `\n' between two rules.
11337 * tests/regression.at (Conflicts): New.
11338 Reported by Tom Lane.
11339
11340 2001-11-12 Akim Demaille <akim@epita.fr>
11341
11342 * tests/regression.at (Invalid input): Remove, duplicate with
11343 ``Invalid input: 1''.
11344
11345 2001-11-12 Akim Demaille <akim@epita.fr>
11346
11347 * tests/torture.at (AT_DATA_STACK_TORTURE)
11348 (Exploding the Stack Size with Alloca)
11349 (Exploding the Stack Size with Malloc): New.
11350
11351 2001-11-12 Akim Demaille <akim@epita.fr>
11352
11353 * src/bison.simple (YYSTACK_REALLOC): New.
11354 (yyparse) [!yyoverflow]: Use it and free the old stack.
11355 Reported by Per Allansson.
11356
11357 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
11358
11359 * src/bison.simple: Define type yystype instead of YYSTYPE, and
11360 define CPP macro, which substitute YYSTYPE by yystype.
11361 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
11362 with yyltype/YYLTYPE. This allows inclusion of the generated
11363 header within the parser if the compiler, such as GGC, accepts
11364 multiple equivalent #defines.
11365 From Akim.
11366
11367 2001-11-05 Akim Demaille <akim@epita.fr>
11368
11369 * src/reader.c (symbols_output): New, extracted from...
11370 (packsymbols): here.
11371 (reader): Adjust.
11372
11373 2001-11-05 Akim Demaille <akim@epita.fr>
11374
11375 * src/lex.c (parse_percent_token): s/quotearg/quote/.
11376
11377 2001-11-05 Akim Demaille <akim@epita.fr>
11378
11379 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
11380 pattern.
11381
11382 2001-11-05 Akim Demaille <akim@epita.fr>
11383
11384 * src/options.h (struct option_table_struct): set_flags is void*.
11385 * src/options.c (longopts): Support `--output' and `%output'.
11386 (usage): Adjust.
11387 * src/lex.h (tok_setopt): Remove, replaced with...
11388 (tok_intopt, tok_stropt): these new guys.
11389 * src/lex.c (getopt.h): Not needed.
11390 (token_buffer, unlexed_token_buffer): Not const.
11391 (percent_table): Promote `-' over `_' in directive names.
11392 Active `%name-prefix', `file-prefix', and `output'.
11393 (parse_percent_token): Accept possible arguments to directives.
11394 Promote `-' over `_' in directive names.
11395
11396 2001-11-04 Akim Demaille <akim@epita.fr>
11397
11398 * doc/bison.texinfo (Decl Summary): Split the list into
11399 `directives for grammars' and `directives for bison'.
11400 Sort'em.
11401 Add description of `%name-prefix', `file-prefix', and `output'.
11402 Promote `-' over `_' in directive names.
11403 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
11404 Simplify the description of `--name-prefix'.
11405 Promote `-' over `_' in directive names.
11406 Promote `--output' over `--output-file'.
11407 Fix the description of `--defines'.
11408 * tests/output.at: Exercise %file-prefix and %output.
11409
11410 2001-11-02 Akim Demaille <akim@epita.fr>
11411
11412 * doc/refcard.tex: Update.
11413
11414 2001-11-02 Akim Demaille <akim@epita.fr>
11415
11416 * src/symtab.h (SUNDEF): New.
11417 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
11418 stand for `uninitialized', instead of 0.
11419 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
11420 * src/lex.c (lex): Adjust.
11421
11422 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
11423 Number it 0.
11424 Let yylex return it instead of a plain 0.
11425 Reported by Dick Streefland.
11426
11427 2001-11-02 Akim Demaille <akim@epita.fr>
11428
11429 * tests/regression.at (Mixing %token styles): New test.
11430
11431 2001-11-02 Akim Demaille <akim@epita.fr>
11432
11433 * src/reader.c (parse_thong_decl): Formatting changes.
11434 (token_translations_init): New, extracted from...
11435 (packsymbols): Here.
11436 Adjust.
11437
11438 2001-11-01 Akim Demaille <akim@epita.fr>
11439
11440 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
11441 Check that `9foo.y' produces correct cpp guards.
11442 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
11443 guards.
11444 Reported by Wwp.
11445
11446 2001-11-01 Akim Demaille <akim@epita.fr>
11447
11448 * tests/regression.at (Invalid input: 2): New.
11449 * src/lex.c (unlexed_token_buffer): New.
11450 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
11451 too.
11452 Reported by Wwp.
11453
11454 2001-11-01 Akim Demaille <akim@epita.fr>
11455
11456 * tests/calc.at: Catch up with 1.30.
11457 * configure.in: Bump to 1.49a.
11458 Adjust to newer Autotest.
11459
11460 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
11461
11462 * src/conflicts.c: Move global variables rrc_total and src_total ...
11463 (print_conflicts): here.
11464 * src/output.c (output): Free global variable user_toknums.
11465 * src/lex.c (token_obstack): Become static.
11466
11467 2001-10-18 Akim Demaille <akim@epita.fr>
11468
11469 * tests/atlocal.in (GCC): Add.
11470 * tests/calc.at: s/m4_match/m4_bmatch/.
11471 s/m4_patsubst/m4_bpatsubst/.
11472 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
11473 * configure.in: AC_SUBST(GCC).
11474
11475 2001-10-14 Marc Autret <autret_m@epita.fr>
11476
11477 * src/options.c (create_long_option_table): Fix.
11478
11479 2001-10-10 Akim Demaille <akim@epita.fr>
11480
11481 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
11482
11483 2001-10-04 Akim Demaille <akim@epita.fr>
11484
11485 * src/reader.c (parse_union_decl): Push the caracters in
11486 union_obstack, not attrs_obstack.
11487
11488 2001-10-04 Akim Demaille <akim@epita.fr>
11489
11490 Merge in the branch 1.29.
11491
11492 * src/reader.c (packsymbols): Use a temporary obstack for
11493 `%%tokendef', since output_stack is already used elsewhere.
11494
11495 2001-10-02 Akim Demaille <akim@epita.fr>
11496
11497 Bump 1.29d.
11498
11499 2001-10-02 Akim Demaille <akim@epita.fr>
11500
11501 Version 1.29c.
11502
11503 2001-10-02 Akim Demaille <akim@epita.fr>
11504
11505 * tests/regression.at (Invalid CPP headers): New.
11506 From Alexander Belopolsky.
11507 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
11508
11509 2001-10-02 Akim Demaille <akim@epita.fr>
11510
11511 * tests/regression.at (Invalid input): New.
11512 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
11513 Reported by Shura.
11514
11515 2001-10-02 Akim Demaille <akim@epita.fr>
11516
11517 * tests/calc.at: Now that --debug works, the tests must be adjusted.
11518
11519 2001-10-02 Akim Demaille <akim@epita.fr>
11520
11521 * src/output.c (output_parser): Assert `skeleton'.
11522 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
11523 systems.
11524 From Shura.
11525
11526 2001-10-01 Marc Autret <autret_m@epita.fr>
11527
11528 * src/lex.h: Echo modifications.
11529 * src/lex.c (unlex): Parameter is now token_t.
11530 From Hans Aberg.
11531
11532 2001-10-01 Marc Autret <autret_m@epita.fr>
11533
11534 * src/main.c: Include lex.h.
11535 From Hans Aberg.
11536
11537 2001-09-29 Akim Demaille <akim@epita.fr>
11538
11539 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
11540
11541 2001-09-28 Akim Demaille <akim@epita.fr>
11542
11543 * tests/testsuite.at: Update to newer Autotest.
11544 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
11545
11546 2001-09-27 Akim Demaille <akim@epita.fr>
11547
11548 Position independent wrapper.
11549
11550 * tests/bison: Remove.
11551 * tests/bison.in: New.
11552 * configure.in: Adjust.
11553
11554 2001-09-27 Paul Eggert <eggert@twinsun.com>
11555
11556 Port quotearg fixes from tar 1.13.24.
11557
11558 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
11559 tm to be declared.
11560 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
11561 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
11562
11563 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
11564 * m4/mbrtowc.m4: New file.
11565 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
11566 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
11567
11568 2001-09-27 Akim Demaille <akim@epita.fr>
11569
11570 Bump to 1.29c.
11571
11572 2001-09-27 Akim Demaille <akim@epita.fr>
11573
11574 Version 1.29b.
11575
11576 2001-09-25 Akim Demaille <akim@epita.fr>
11577
11578 * src/system.h: Include `xalloc.h'.
11579 Remove it from the C files.
11580 * src/files.c (output_files): Free the obstacks.
11581 * src/lex.c (init_lex): Rename as...
11582 (lex_init): this.
11583 (lex_free): New.
11584 * src/main.c (main): Use it.
11585
11586 2001-09-24 Marc Autret <autret_m@epita.fr>
11587
11588 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
11589 to output informations in fout (FILE*).
11590 (open_graph, close_graph): Likewise.
11591 (output_graph, output_edge, output_node): Likewise.
11592 * src/vcg.h: Update function prototypes.
11593 * src/print_graph.c (print_graph): Open output graph file.
11594 (print_actions): Adjust.
11595 * src/files.h: Remove extern declaration.
11596 * src/files.c: Remove graph_obstack declaration.
11597 (open_files): Remove graph_obstack initialization.
11598 (output_files): Remove graph_obstack saving.
11599
11600 2001-09-24 Marc Autret <autret_m@epita.fr>
11601
11602 * src/files.c (compute_output_file_names): Fix.
11603
11604 2001-09-24 Marc Autret <autret_m@epita.fr>,
11605 Akim Demaille <akim@epita.fr>
11606
11607 * src/reader.c (reader): Remove call to free_symtab ().
11608 * src/main.c (main): Call it here.
11609 Include symtab.h.
11610 * src/conflicts.c (initialize_conflicts): Rename as...
11611 (solve_conflicts): this.
11612 * src/print.c (print_core, print_actions, print_state)
11613 (print_grammar): Dump to a file instead a `output_obstack'.
11614 (print_results): Dump `output_obstack', and then proceed with the
11615 FILE *.
11616 * src/files.c (compute_output_file_names, close_files): New.
11617 (output_files): Adjust.
11618 * src/main.c (main): Adjust.
11619
11620 2001-09-23 Marc Autret <autret_m@epita.fr>
11621
11622 * src/files.c (compute_header_macro): Computes header macro name
11623 from spec_defines_file when given.
11624
11625 2001-09-23 Marc Autret <autret_m@epita.fr>
11626
11627 * src/files.c (output_files): Add default extensions.
11628
11629 2001-09-22 Akim Demaille <akim@epita.fr>
11630
11631 * src/conflicts.c (finalize_conflicts): Rename as...
11632 (free_conflicts): this.
11633
11634 2001-09-22 Akim Demaille <akim@epita.fr>
11635
11636 * src/gram.c (gram_free): Rename back as...
11637 (dummy): this.
11638 (output_token_translations): Free `token_translations'.
11639 * src/symtab.c (free_symtab): Free the tag field.
11640
11641 2001-09-22 Akim Demaille <akim@epita.fr>
11642
11643 Remove `translations' as it is always set to true.
11644
11645 * src/gram.h: Adjust.
11646 * src/reader.c (packsymbols, parse_token_decl): Adjust
11647 * src/print.c (print_grammar): Adjust.
11648 * src/output.c (output_token_translations): Adjust.
11649 * src/lex.c (lex): Adjust.
11650 * src/gram.c: Be sure the set pointers to NULL.
11651 (dummy): Rename as...
11652 (gram_free): this.
11653
11654 2001-09-22 Akim Demaille <akim@epita.fr>
11655
11656 * configure.in: Invoke AM_LIB_DMALLOC.
11657 * src/system.h: Use dmalloc.
11658 * src/LR0.c: Be sure to have pointers initialized to NULL.
11659 (allocate_itemsets): Allocate kernel_items only if needed.
11660
11661 2001-09-22 Akim Demaille <akim@epita.fr>
11662
11663 * configure.in: Bump to 1.29b.
11664 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
11665 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
11666 need xmalloc.c in calc.y.
11667 From Pascal Bart.
11668
11669 2001-09-21 Akim Demaille <akim@epita.fr>
11670
11671 Version 1.29a.
11672 * Makefile.maint, config/config.guess, config/config.sub,
11673 * config/missing: Update from masters.
11674 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
11675 upon package.m4.
11676 * configure.in (ALL_LINGUAS): Add `tr'.
11677
11678 2001-09-21 Akim Demaille <akim@epita.fr>
11679
11680 * tests/Makefile.am (package.m4): Move to...
11681 ($(srcdir)/$(TESTSUITE)): here.
11682
11683 2001-09-20 Akim Demaille <akim@epita.fr>
11684
11685 * src/complain.c: No longer try to be standalone: use system.h.
11686 Don't assume __STDC__ is defined to 1. Just test if it is defined.
11687 * src/complain.h: Likewise.
11688 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
11689 Remove the unused variable `n'.
11690 From Albert Chin-A-Young.
11691
11692 2001-09-18 Marc Autret <autret_m@epita.fr>
11693
11694 * doc/bison.1: Update.
11695 * doc/bison.texinfo (Bison Options): Update --defines and --graph
11696 descriptions.
11697 (Option Cross Key): Update.
11698 Add --graph.
11699
11700 2001-09-18 Marc Autret <autret_m@epita.fr>
11701
11702 * tests/regression.at: New test (comment in %union).
11703
11704 2001-09-18 Marc Autret <autret_m@epita.fr>
11705
11706 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
11707 do that.
11708 Reported by Keith Browne.
11709
11710 2001-09-18 Marc Autret <autret_m@epita.fr>
11711
11712 * tests/output.at: Add tests for --defines and --graph.
11713
11714 2001-09-18 Marc Autret <autret_m@epita.fr>
11715
11716 * tests/output.at: Removes tests of %{header,src}_extension features.
11717
11718 2001-09-18 Akim Demaille <akim@epita.fr>
11719
11720 * tests/Makefile.am (package.m4): New.
11721 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
11722 (_AT_CHECK_CALC_ERROR): Likewise.
11723 Factor the `, ' part of verbose error messages.
11724
11725 2001-09-18 Marc Autret <autret_m@epita.fr>
11726
11727 * src/getargs.c (longopts): Declare --defines and --graph as options
11728 with optional arguments.
11729 * src/files.h: Add extern declarations.
11730 * src/files.c (spec_graph_file, spec_defines_file): New.
11731 (output_files): Update.
11732 Remove CPP-outed code.
11733
11734 2001-09-18 Marc Autret <autret_m@epita.fr>
11735
11736 Turn off %{source,header}_extension feature.
11737
11738 * src/files.c (compute_exts_from_gf): Update.
11739 (compute_exts_from_src): Update.
11740 (output_files): CPP-out useless code.
11741 * src/files.h: Remove {header,source}_extension extern declarations.
11742 * src/reader.c (parse_dquoted_param): CPP-out.
11743 (parse_header_extension_decl): Remove.
11744 (parse_source_extension_decl): Remove.
11745 (read_declarations): Remove cases tok_{hdrext,srcext}.
11746 * src/lex.c (percent_table): Remove {header,source}_extension entries.
11747 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
11748
11749 2001-09-10 Akim Demaille <akim@epita.fr>
11750
11751 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
11752 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
11753 (AT_CHECK_OUTPUT): this.
11754 Merely check ls' exit status, its output is useless.
11755
11756 2001-09-10 Akim Demaille <akim@epita.fr>
11757
11758 * tests/calc.at: Use m4_match.
11759 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
11760
11761 2001-09-10 Marc Autret <autret_m@epita.fr>,
11762 Akim Demaille <akim@epita.fr>
11763
11764 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
11765 enum color_e.
11766 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
11767 to `normal'.
11768 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
11769 * src/lex.h: Adjust prototype.
11770 (token_t): Add `tok_undef'.
11771 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
11772 (parse_percent_token): Now returns token_t.
11773 Add default statement in switch.
11774 (lex): Separate `c' as an input variable, from the token_t result
11775 part.
11776 (unlexed): Is a token_t.
11777
11778 2001-09-10 Akim Demaille <akim@epita.fr>
11779
11780 * configure.in: Bump to 1.29a.
11781
11782 2001-09-07 Akim Demaille <akim@epita.fr>
11783
11784 Version 1.29.
11785
11786 2001-08-30 Akim Demaille <akim@epita.fr>
11787
11788 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
11789 * m4/atconfig.m4: Remove.
11790 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
11791 * tests/bison: New.
11792 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
11793 m4_if, m4_patsubst, and m4_regexp.
11794 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
11795 `input' file instead of echo.
11796
11797 2001-08-29 Akim Demaille <akim@epita.fr>
11798
11799 Bump to 1.28e.
11800
11801 2001-08-29 Akim Demaille <akim@epita.fr>
11802
11803 Version 1.28d.
11804
11805 2001-08-29 Paul Eggert <eggert@twinsun.com>
11806
11807 * src/bison.simple (yyparse): Don't take the address of an
11808 item before the start of an array, as that doesn't conform to
11809 the C Standard.
11810
11811 2001-08-29 Robert Anisko <anisko_r@epita.fr>
11812
11813 * doc/bison.texinfo (Location Tracking Calc): New node.
11814
11815 2001-08-29 Paul Eggert <eggert@twinsun.com>
11816
11817 * src/output.c (output): Do not define const, as this now
11818 causes more problems than it cures.
11819
11820 2001-08-29 Akim Demaille <akim@epita.fr>
11821
11822 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
11823 the nodes.
11824 Be sure to tag the `detailmenu'.
11825
11826 2001-08-29 Akim Demaille <akim@epita.fr>
11827
11828 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
11829 download in a tmp dir.
11830
11831 2001-08-28 Marc Autret <autret_m@epita.fr>
11832
11833 * config/depcomp: New file.
11834
11835 2001-08-28 Marc Autret <autret_m@epita.fr>
11836
11837 * doc/bison.1 (mandoc): Adjust.
11838 From Juan Manuel Guerrero.
11839
11840 2001-08-28 Marc Autret <autret_m@epita.fr>
11841
11842 * src/print_graph.c (print_state): Fix.
11843
11844 2001-08-27 Marc Autret <autret_m@epita.fr>
11845
11846 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
11847 char * members.
11848 Echo modifications to the functions prototypes.
11849 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
11850
11851 2001-08-27 Marc Autret <autret_m@epita.fr>
11852
11853 * src/vcg.c: Include `xalloc.h'.
11854 (add_colorentry): New.
11855 (add_classname): New.
11856 (add_infoname): New.
11857 * src/vcg.h: Add new prototypes.
11858
11859 2001-08-27 Akim Demaille <akim@epita.fr>
11860
11861 * Makefile.maint: Sync. again with CVS Autoconf.
11862
11863 2001-08-27 Akim Demaille <akim@epita.fr>
11864
11865 * Makefile.maint: Formatting changes.
11866 (po-update, cvs-update, update): New targets.
11867 (AMTAR): Remove.
11868
11869 2001-08-27 Akim Demaille <akim@epita.fr>
11870
11871 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
11872 * Makefile.maint: Sync. with CVS Autoconf.
11873
11874 2001-08-27 Marc Autret <autret_m@epita.fr>
11875
11876 * src/vcg.h (struct infoname_s): New.
11877 (struct colorentry_s): New.
11878 (graph_s): New fields {vertical,horizontal}_order in structure.
11879 Add `infoname' field.
11880 Add `colorentry' field;
11881 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
11882 (G_HORIZONTAL_ORDER): New.
11883 (G_INFONAME): New.
11884 (G_COLORENTRY): New.
11885 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
11886 Add output of `infoname'.
11887 Add output of `colorentry'.
11888
11889 2001-08-27 Marc Autret <autret_m@epita.fr>
11890
11891 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
11892 This one shadowed a global parameter.
11893
11894 2001-08-24 Marc Autret <autret_m@epita.fr>
11895
11896 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
11897 instead of `unsigned'.
11898 (print_state): Do not call obstack_object_size () in obstack_grow ()
11899 to avoid macro variables shadowing.
11900
11901 2001-08-23 Marc Autret <autret_m@epita.fr>
11902
11903 * src/lex.c (percent_table): Typo: s/naem/name/.
11904 Add graph option.
11905 Normalize new options declarations.
11906
11907 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
11908
11909 * tests/suite.at: Exercise %header_extension and %source_extension.
11910
11911 2001-08-16 Marc Autret <autret_m@epita.fr>
11912
11913 * src/reader.c (parse_dquoted_param): New.
11914 (parse_header_extension_decl): Use it.
11915 (parse_source_extension_decl): Likewise.
11916
11917 2001-08-16 Marc Autret <autret_m@epita.fr>
11918
11919 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
11920 (get_xxxx_str): Use assert () instead of complain ().
11921 Remove return invokations in default cases.
11922 (get_decision_str): Modify default behaviour. Remove second argument.
11923 Echo modifications on calls.
11924 (output_graph): Fix.
11925
11926 2001-08-16 Marc Autret <autret_m@epita.fr>
11927
11928 * src/getargs.c (usage): Update with ``-g, --graph''.
11929
11930 2001-08-16 Marc Autret <autret_m@epita.fr>
11931
11932 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
11933 (Option Cross Key): Likewise.
11934 * doc/bison.1: Update.
11935
11936 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
11937
11938 * src/output.c (output_master_parser): Don't finish action_obstack.
11939 (output_parser): Don't care about the muscle action, here.
11940 (prepare): Copy the action_obstack in the action muscle.
11941 (output): Free action_obstack.
11942
11943 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
11944
11945 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
11946 will contain `%union' declaration.
11947 (parse_union_decl): Delete #line directive output.
11948 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
11949 informations about %union.
11950 (parse_union_decl): Copy the union_obstack in the muscle stype.
11951 * src/bison.simple: Add new #line directive.
11952 Add typdef %%stype YYSTYPE.
11953
11954 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
11955
11956 * src/bison.simple: Add new `#line' directive.
11957
11958 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
11959
11960 * src/bison.simple: New `#line' directive.
11961 * src/output.c (output_parser): Support new dynamic muscle input_line.
11962
11963 2001-09-22 Marc Autret <autret_m@epita.fr>
11964
11965 * src/output.c (output_master_parser): New.
11966 (output_parser): Be more re-entrant.
11967
11968 2001-09-21 Marc Autret <autret_m@epita.fr>
11969
11970 * src/reader.c (copy_definition, parse_union_decl): Update and use
11971 `linef' muscle.
11972 (copy_action): Likewise.
11973 Use obstack_1grow ().
11974 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
11975
11976 2001-09-21 Marc Autret <autret_m@epita.fr>
11977
11978 * src/options.c (option_table): Adjust.
11979 * src/lex.c (parse_percent_token): Fix.
11980
11981 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
11982
11983 * src/options.c (symtab.h): Include it, need by lex.h.
11984
11985 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
11986
11987 * src/lex.c (parse_percent_token): Change type of variable `tx', which
11988 is now an option_table_struct*.
11989 (option_strcmp): New function option_strcmp.
11990 (parse_percent_token): Call option_strcmp.
11991 * src/getargs.c (xalloc.h, options.h): Include it.
11992 (getargs): Call create_long_option_table.
11993 (getargs): Free longopts at the end of the function.
11994 (shortopts): Move in options.c.
11995 * src/options.c (create_long_option_table): New function. Convert
11996 information from option_table to option structure.
11997 * src/reader.c (options.h): Include it.
11998
11999 * src/Makefile.am: Adjust.
12000 * src/options.c (option_table): Create from longopts and percent_table.
12001 * src/getargs.c (longopts): Delete.
12002 * src/lex.c (struct percent_table_struct): Delete.
12003 (percent_table): Delete.
12004 (options.h): Include it.
12005 * src/options.c: Create.
12006 * src/options.h: Create.
12007 Declare enum opt_access_e.
12008 Define struct option_table_struct.
12009
12010 2001-09-20 Marc Autret <autret_m@epita.fr>
12011
12012 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
12013 sections of Bison.
12014
12015 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
12016
12017 * src/bison.simple: s/%%filename/%%skeleton.
12018 * src/muscle_tab.c (getargs.h): Include it.
12019 (muscle_init): Insert new muscle skeleton.
12020
12021 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
12022
12023 * src/output.c (output_parser): Delete unused variable actions_dumped.
12024
12025 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
12026
12027 * src/output.c (output): Delete call to reader_output_yylsp.
12028 * src/reader.c (reader): Likewise.
12029 * src/reader.h: Delete declaration of reader_output_yylsp.
12030
12031 2001-09-02 Marc Autret <autret_m@epita.fr>
12032
12033 * src/reader.c: Include muscle_tab.h.
12034 (parse_union_decl): Update.
12035 (parse_macro_decl): Rename parse_muscle_decl.
12036 Update to use renamed functions and variable.
12037 (read_declarations, copy_action, read_additionnal_code, : Updated
12038 with correct variables and functions names.
12039 (packsymbols, reader): Likewise.
12040
12041 * src/reader.h (muscle_obstack): Extern declaration update.
12042
12043 * src/output.c: Include muscle_tab.h
12044 In all functions using macro_insert, change by using muscle_insert ().
12045 (macro_obstack): Rename muscle_obstack.
12046 Echo modifications in the whole file.
12047 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
12048 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
12049 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
12050
12051 * src/muscle_tab.h: Update double inclusion macros.
12052 (macro_entry_s): Rename muscle_entry_s.
12053 Update prototypes.
12054
12055 * src/muscle_tab.c: Include muscle_tab.h.
12056 Rename macro_tabble to muscle_table.
12057 (mhash1, mhash2, mcmp): Use muscle_entry.
12058 (macro_init): Rename muscle_init. Update.
12059 (macro_insert): Rename muscle_insert. Update.
12060 (macro_find): Rename muscle_find. Update.
12061
12062 * src/main.c: Include muscle_tab.h.
12063 (main): Call muscle_init ().
12064 * src/Makefile.am (bison_SOURCES): Echo modifications.
12065
12066 2001-09-02 Marc Autret <autret_m@epita.fr>
12067
12068 Now the files macro_tab.[ch] are named muscle_tab.[ch].
12069
12070 * src/muscle_tab.c, src/muscle_tab.h: Add files.
12071
12072 2001-09-02 Marc Autret <autret_m@epita.fr>
12073
12074 * src/macrotab.c, src/macrotab.h: Remove.
12075
12076 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
12077
12078 * src/reader.c (copy_guard): Use muscle to specify the `#line'
12079 filename.
12080
12081 2001-09-01 Marc Autret <autret_m@epita.fr>
12082
12083 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
12084 to an explicit value to activate the feature. We do it here.
12085
12086 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
12087
12088 * src/output.c (prepare): Delete the `filename' muscule insertion.
12089 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
12090 (parse_union_decl): Likewise.
12091 * src/macrotab.c (macro_init): Initialize filename by infile.
12092
12093 2001-08-31 Marc Autret <autret_m@epita.fr>
12094
12095 * src/bison.simple (YYLSP_NEEDED): New definition.
12096 * src/output.c (prepare): Add macro insertion of `locations_flag'
12097
12098 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
12099
12100 * src/output.c (prepare): Delete insertion of previous muscles,
12101 and insert the `prefix' muscles.
12102 * src/macrotab.c (macro_init): Likewise.
12103 (macro_init): Initialization prefix directive by `yy'.
12104 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
12105 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
12106 yylval, yydebug, yyerror, yynerrs and yyparse.
12107 New directive `#define' to substitute yydebug, ... with option
12108 name_prefix.
12109
12110 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
12111
12112 * src/main.c (main): Standardize.
12113 * src/output.c (output_table_data, output_parser): Likewise.
12114 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
12115
12116 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
12117
12118 * src/reader.c (read_additionnal_code): Rename %%user_code to
12119 %%epilogue.
12120 * src/output.c (output): Rename %%declarations to %%prologue.
12121 * src/bison.simple: Echo modifications.
12122
12123 2001-08-31 Marc Autret <autret_m@epita.fr>
12124
12125 * src/reader.c (readgram): CleanUp.
12126 (output_token_defines): Likewise.
12127 (packsymbols): Likewise.
12128 (reader): Likewise.
12129 * src/output.c (output): CPP-out useless code.
12130
12131 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
12132
12133 * src/reader.c (reader): Delete obsolete call to function
12134 output_trailers and output_headers.
12135 * src/output.h: Remove obsolete functions prototypes of output_headers
12136 and output_trailers.
12137
12138 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
12139
12140 * src/main.c: Include macrotab.h.
12141 * src/macrotab.h (macro_entry_s): Constify fields.
12142 Adjust functions prototypes.
12143 * src/macrotab.c (macro_insert): Constify key and value.
12144 (macro_find): Constify key.
12145 (macro_insert): Include 'xalloc.h'
12146 (macro_insert): Use XMALLOC.
12147 (macro_find): Constify return value.
12148 * src/output.c (output_table_data): Rename table to table_data.
12149 (output_parser): Constify macro_key, macro_value.
12150
12151 2001-08-30 Marc Autret <autret_m@epita.fr>
12152
12153 * src/reader.c (parse_skel_decl): New.
12154 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
12155 * src/lex.h (token_t): New token `tok_skel'.
12156 * src/lex.c (percent_table): Add skeleton option entry.
12157 Standardize.
12158
12159 2001-08-29 Marc Autret <autret_m@epita.fr>
12160
12161 * src/bison.simple: Add %%user_code directive at the end.
12162 * src/reader.c (read_additionnal_code): New.
12163 (reader): Use it.
12164 * src/output.c (output_program): Remove.
12165 (output): Update.
12166
12167 2001-08-28 Marc Autret <autret_m@epita.fr>
12168
12169 * src/output.c (output_actions): Clean up.
12170 (output_gram): CPP-out useless code.
12171 * src/reader.c (reader): Clean up, CPP-out useless code.
12172
12173 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
12174
12175 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
12176 directive.
12177 * src/bison.simple: Add `%%definitions'.
12178
12179 2001-08-28 Marc Autret <autret_m@epita.fr>
12180
12181 * config/depcomp: New file.
12182
12183 2001-08-27 Paul Eggert <eggert@twinsun.com>
12184
12185 * src/bison.simple (yyparse): Don't take the address of an
12186 item before the start of an array, as that doesn't conform to
12187 the C Standard.
12188
12189 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
12190
12191 * src/output.c (output): Remove the initialization of the macro
12192 obstack. It was done too late here.
12193
12194 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
12195 completely wrong.
12196 (reader): Initialize the macro obstack here, since we need it to grow
12197 '%define' directives.
12198
12199 * src/reader.h: Declare the macro obstack as extern.
12200
12201 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
12202
12203 * src/output.c (output_parser): Fix. Store single '%' characters in
12204 the output obstack instead of throwing them away.
12205
12206 2001-08-27 Akim Demaille <akim@epita.fr>
12207
12208 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
12209
12210 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
12211
12212 * lib/Makefile.am: Adjust.
12213
12214 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
12215
12216 * src/bison.simple: Update and add '%%' directives.
12217
12218 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
12219
12220 * src/reader.c (reader): Remove calls to 'output_headers' and
12221 'output_trailers'. Remove some C output.
12222 (readgram): Disable a piece of code that was writing a default
12223 definition for 'YYSTYPE'.
12224 (reader_output_yylsp): Remove.
12225 (packsymbols): Output token defintions to a macro.
12226 (copy_definition): Disable C output.
12227
12228 * src/reader.c (parse_macro_decl): New function used to parse macro
12229 declarations.
12230 (copy_string2): Put the body of copy_string into this new function.
12231 Add a parameter to let the caller choose whether he wants to copy the
12232 string delimiters or not.
12233 (copy_string): Be a simple call to copy_string2 with the last argument
12234 bound to true.
12235 (read_declarations): Add case for macro definition.
12236 (copy_identifier): New.
12237 (parse_macro_decl): Read macro identifiers using copy_identifier
12238 rather than lex.
12239
12240 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
12241
12242 * src/output.c (prepare): Add prefixed names.
12243 (output_parser): Output semantic actions.
12244 (output_parser): Fix bug on '%%line' directives.
12245
12246 * src/output.c (output_headers): Remove. The C code printed by this
12247 function should now be in the skeletons.
12248 (output_trailers): Remove.
12249 (output): Disable call to 'reader_output_yylsp'.
12250 (output_rule_data): Do not output tables to the table obstack.
12251
12252 * src/output.c: Remove some C dedicated output.
12253 Improve the use of macro and output obstacks.
12254 (output_defines): Remove.
12255
12256 * src/output.c (output_token_translations): Associate 'translate'
12257 table with a macro. No output to the table obstack.
12258 (output_gram): Same for 'rhs' and 'prhs'.
12259 (output_stos): Same for 'stos'.
12260 (output_rule_data): Same for 'r1' and 'r2'.
12261 (token_actions): Same for 'defact'.
12262 (goto_actions): Same for 'defgoto'.
12263 (output_base): Same for 'pact' and 'pgoto'.
12264 (output_table): Same for 'table'.
12265 (output_check): Same for 'check'.
12266
12267 * src/output.c (output_table_data): New function.
12268 (output_short_table): Remove.
12269 (output_short_or_char_table): Remove.
12270
12271 * src/output.c (output_parser): Replace most of the skeleton copy code
12272 with something new. Skeletons are now processed character by character
12273 rather than line by line, and Bison looks for '%%' macros. This is the
12274 first step in making Bison's output process (a lot) more flexible.
12275 (output_parser): Use the macro table.
12276
12277 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
12278
12279 * src/main.c (main): Initialize the macro table.
12280
12281 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
12282
12283 * src/lex.c (percent_table): Add tok_define.
12284 * src/lex.h: Add tok_define.
12285
12286 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
12287
12288 * src/macrotab.c: New file.
12289 * src/macrotab.h: New file.
12290 * src/Makefile.am: Update.
12291
12292 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
12293
12294 * lib/hash.c: New file.
12295 * lib/hash.h: New file.
12296 * lib/Makefile.am: Update.
12297
12298 2001-08-15 Akim Demaille <akim@epita.fr>
12299
12300 Version 1.28c.
12301
12302 2001-08-15 Marc Autret <autret_m@epita.fr>
12303
12304 * src/reader.c (readgram): Indent output macro YYSTYPE.
12305 (packsymbols): Likewise.
12306 (output_token_defines): Likewise.
12307 * src/files.c: Standardize.
12308 (compute_header_macro): New.
12309 (defines_obstack_save): New. Use compute_header_macro.
12310 (output_files): Update. Use defines_obstack_save.
12311
12312 2001-08-15 Akim Demaille <akim@epita.fr>
12313
12314 * doc/bison.texinfo (Table of Symbols): Document
12315 YYSTACK_USE_ALLOCA.
12316
12317 2001-08-15 Akim Demaille <akim@epita.fr>
12318
12319 * missing: Update from CVS Automake.
12320 * config/config.guess, config/config.sub, config/texinfo.tex:
12321 Update from gnu.org.
12322
12323 2001-08-15 Akim Demaille <akim@epita.fr>
12324
12325 * Makefile.maint: Sync with CVS Autoconf.
12326
12327 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
12328
12329 * doc/bison.texinfo: Include GNU Free Documentation License from
12330 `fdl.texi'.
12331 * doc/fdl.texi: Add to package.
12332
12333 2001-08-14 Marc Autret <autret_m@epita.fr>
12334
12335 Turn on %{source,header}_extension features.
12336
12337 * src/lex.c (percent_table): Un-CPP out header_extension and
12338 source_extension.
12339 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
12340 (compute_exts_from_src): Remove conditions. It restores priorities
12341 between options.
12342
12343 2001-08-14 Marc Autret <autret_m@epita.fr>
12344
12345 * src/files.c (compute_base_names): Add extensions computing when
12346 `--file-prefix' used.
12347 Standardize function calls.
12348
12349 2001-08-13 Marc Autret <autret_m@epita.fr>
12350
12351 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
12352 defining it (defined but null disables alloca).
12353
12354 2001-08-13 Marc Autret <autret_m@epita.fr>
12355
12356 * src/bison.simple (_yy_memcpy): CPP reformat.
12357
12358 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
12359
12360 * tests/atconfig.in (CPPFLAGS): Fix.
12361
12362 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
12363
12364 * doc/bison.texinfo: Include GNU General Public License from
12365 `gpl.texi'.
12366 * doc/gpl.texi: Add to package.
12367
12368 2001-08-10 Marc Autret <autret_m@epita.fr>
12369
12370 * src/print_graph.h: Fix.
12371 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
12372
12373 2001-08-10 Akim Demaille <akim@epita.fr>
12374
12375 * src/system.h: Provide default declarations for stpcpy, strndup,
12376 and strnlen.
12377
12378 2001-08-10 Robert Anisko <anisko_r@epita.fr>
12379
12380 * doc/bison.texinfo (Locations): Update @$ stuff.
12381
12382 2001-08-09 Robert Anisko <anisko_r@epita.fr>
12383
12384 * src/bison.simple (YYLLOC_DEFAULT): Update.
12385 (yyparse): Adjust.
12386
12387 2001-08-08 Marc Autret <autret_m@epita.fr>
12388
12389 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
12390 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
12391 Reported by Fabrice Bauzac.
12392
12393 2001-08-08 Marc Autret <autret_m@epita.fr>
12394
12395 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
12396 * src/vcg.c (output_node): Fix.
12397 * src/vcg.h: Cleanup.
12398 * src/print_graph.c: Add comments.
12399 (node_output_size): New global variable. Simplify the formatting of
12400 the VCG graph output.
12401 (print_actions): Unused code is now used. It notifies the final state
12402 and no action states in the VCG graph. It also give the reduce actions.
12403 The `shift and goto' edges are red and the `go to state' edges are
12404 blue.
12405 Get the current node name and node_obstack by argument.
12406 (node_obstack): New variable.
12407 (print_state): Manage node_obstack.
12408 (print_core): Use node_obstack given by argument.
12409 A node is not only computed here but in print_actions also.
12410 (print_graph): CPP out useless code instead of commenting it.
12411
12412 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
12413
12414 * tests/atconfig.in (CPPFLAGS): Fix.
12415
12416 2001-08-07 Akim Demaille <akim@epita.fr>
12417
12418 * src/print_graph.c (quote): New.
12419 (print_core): Use it.
12420
12421 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
12422
12423 * src/vcg.c (complain.h): Include it.
12424 Unepitaize `return' invocations.
12425 [NDEBUG] (main): Remove.
12426 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
12427 * src/files.c (open_files): Initialize graph_obstack.
12428 * src/print_graph.c (print_actions): CPP out useless code.
12429 (print_core): Don't output the last `\n' in labels.
12430 Use `quote'.
12431 * src/files.c (output_files): Output the VCG file.
12432 * src/main.c (main): Invoke print_graph ();
12433
12434 2001-08-06 Marc Autret <autret_m@epita.fr>
12435
12436 Automaton VCG graph output.
12437 Using option ``-g'' or long option ``--graph'', you can generate
12438 a gram_filename.vcg file containing a VCG description of the LALR (1)
12439 automaton of your grammar.
12440
12441 * src/main.c: Call to print_graph() function.
12442 * src/getargs.h: Update.
12443 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
12444 (graph_flag): New flag.
12445 (longopts): Update.
12446 (getargs): Add case `g'.
12447 * src/files.c (graph_obstack): New obstack struct.
12448 (open_files): Initialize new obstack.
12449 (output_files): Saves graph_obstack if required.
12450 * src/files.h (graph_obstack): New extern declaration.
12451 * src/Makefile.am: Add new source files.
12452
12453 2001-08-06 Marc Autret <autret_m@epita.fr>
12454
12455 * src/print_graph.c, src/print_graph.h (graph): New.
12456 * src/vcg.h: New file.
12457 * src/vcg.c: New file, VCG graph handling.
12458
12459 2001-08-06 Marc Autret <autret_m@epita.fr>
12460
12461 Add of %source_extension and %header_extension which specify
12462 the source or/and the header output file extension.
12463
12464 * src/files.c (compute_base_names): Remove initialisation of
12465 src_extension and header_extension.
12466 (compute_exts_from_gf): Update.
12467 (compute_exts_from_src): Update.
12468 (output_files): Update.
12469 * src/reader.c (parse_header_extension_decl): New.
12470 (parse_source_extension_decl): New.
12471 (read_declarations): New case statements for the new tokens.
12472 * src/lex.c (percent_table): Add entries for %source_extension
12473 and %header_extension.
12474 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
12475
12476 2001-08-06 Marc Autret <autret_m@epita.fr>
12477
12478 * configure.in: Bump to 1.28c.
12479 * doc/bison.texinfo: Texinfo thingies.
12480
12481 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
12482
12483 * tests/atconfig.in (CPPFLAGS): Add.
12484 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
12485
12486 2001-08-03 Akim Demaille <akim@epita.fr>
12487
12488 Version 1.28b.
12489
12490 2001-08-03 Akim Demaille <akim@epita.fr>
12491
12492 * tests/Makefile.am (check-local): Ship testsuite.
12493 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
12494 Include `string.h'.
12495
12496 2001-08-03 Akim Demaille <akim@epita.fr>
12497
12498 * configure.in: Try using -Wformat when compiling.
12499
12500 2001-08-03 Akim Demaille <akim@epita.fr>
12501
12502 * configure.in: Bump to 1.28b.
12503
12504 2001-08-03 Akim Demaille <akim@epita.fr>
12505
12506 * src/complain.c: Adjust strerror_r portability issues.
12507
12508 2001-08-03 Akim Demaille <akim@epita.fr>
12509
12510 Version 1.28a.
12511
12512 2001-08-03 Akim Demaille <akim@epita.fr>
12513
12514 * src/getargs.c, src/getarg.h (skeleton)): Constify.
12515 * src/lex.c (literalchar): Avoid name clashes on `buf'.
12516 * src/getargs.c: Include complain.h.
12517 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
12518 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
12519
12520 2001-08-03 Akim Demaille <akim@epita.fr>
12521
12522 * src/reader.c (readgram): Display hidden chars in error messages.
12523
12524 2001-08-03 Akim Demaille <akim@epita.fr>
12525
12526 Update to gettext 0.10.39.
12527
12528 2001-08-03 Akim Demaille <akim@epita.fr>
12529
12530 * lib/strspn.c: New.
12531
12532 2001-08-01 Marc Autret <autret_m@epita.fr>
12533
12534 * doc/bison.texinfo: Update.
12535 * doc/bison.1 (mandoc): Update.
12536 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
12537 * src/files.c: Support output files extensions computing.
12538 (src_extension): New static variable.
12539 (header_extension): New static variable.
12540 (tr): New function.
12541 (get_extension_index): New function, gets the index of an extension
12542 filename in a string.
12543 (compute_exts_from_gf): New function, computes extensions from the
12544 grammar file extension.
12545 (compute_exts_from_src): New functions, computes extensions from the
12546 C source file extension, file given by ``-o'' option.
12547 (compute_base_names): Update.
12548 (output_files): Update.
12549
12550 2001-08-01 Robert Anisko <anisko_r@epita.fr>
12551
12552 * doc/bison.texi: Document @$.
12553 (Locations): New section.
12554
12555 2001-07-18 Akim Demaille <akim@epita.fr>
12556
12557 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
12558 * config/prev-version.txt, config/move-if-change: New.
12559 * Makefile.am: Adjust.
12560
12561 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
12562
12563 * src/bison.simple (yyparse): Suppress warning `comparaison
12564 between signed and unsigned'.
12565
12566 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
12567
12568 * src/getargs.h (raw_flag): Remove.
12569 * src/getargs.c: Die on `-r'/`--raw'.
12570 * src/lex.c (parse_percent_token): Die on `%raw'.
12571 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
12572 * tests/calc.at: Suppress test with option `--raw'.
12573
12574 2001-07-14 Akim Demaille <akim@epita.fr>
12575
12576 * config/: New.
12577 * configure.in: Require Autoconf 2.50.
12578 Update to gettext 0.10.38.
12579
12580 2001-03-16 Akim Demaille <akim@epita.fr>
12581
12582 * doc/bison.texinfo: ANSIfy the examples.
12583
12584 2001-03-16 Akim Demaille <akim@epita.fr>
12585
12586 * getargs.c (skeleton): New variable.
12587 (longopts): --skeleton is a new option.
12588 (shortopts, getargs): -S is a new option.
12589 * getargs.h: Declare skeleton.
12590 * output.c (output_parser): Use it.
12591
12592 2001-03-16 Akim Demaille <akim@epita.fr>
12593
12594 * m4/strerror_r.m4: New.
12595 * m4/error.m4: Run AC_FUNC_STRERROR_R.
12596 * lib/error.h, lib/error.c: Update.
12597
12598 2001-03-16 Akim Demaille <akim@epita.fr>
12599
12600 * src/getargs.c (longopts): Clean up.
12601
12602 2001-02-21 Akim Demaille <akim@epita.fr>
12603
12604 * src/reader.c (gensym): `gensym_count' is your own.
12605 Use a static buf to create the symbol name, as token_buffer is no
12606 longer a buffer.
12607
12608 2001-02-08 Akim Demaille <akim@epita.fr>
12609
12610 * src/conflicts.c (conflict_report): Be sure not to append to res
12611 between two calls, which could happen if both first sprintf were
12612 skipped, but not the first cp += strlen.
12613
12614 2001-02-08 Akim Demaille <akim@epita.fr>
12615
12616 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
12617 New, from fileutils 4.0.37.
12618 * configure.in: Require Autoconf 2.49c. I took some time before
12619 making this decision. This is the only way out for portability
12620 issues in Bison, it would mean way too much duplicate effort to
12621 import in Bison features implemented in 2.49c since 2.13.
12622 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
12623
12624 2001-02-02 Akim Demaille <akim@epita.fr>
12625
12626 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
12627 * lib/xalloc.h, lib/xmalloc.c: Update.
12628
12629 2001-01-19 Akim Demaille <akim@epita.fr>
12630
12631 Get rid of the ad hoc handling of token_buffer in the scanner: use
12632 the obstacks.
12633
12634 * src/lex.c (token_obstack): New.
12635 (init_lex): Initialize it. No longer call...
12636 (grow_token_buffer): this. Remove it.
12637 Adjust all the places which used it to use the obstack.
12638
12639 2001-01-19 Akim Demaille <akim@epita.fr>
12640
12641 * src/lex.h: Rename all the tokens:
12642 s/\bENDFILE\b/tok_eof/g;
12643 s/\bIDENTIFIER\b/tok_identifier/g;
12644 etc.
12645 Let them be enums, not #define, to ease debugging.
12646 Adjust all the code.
12647
12648 2001-01-18 Akim Demaille <akim@epita.fr>
12649
12650 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
12651 * src/lex.c (maxtoken, grow_token_buffer): Static.
12652
12653 2001-01-18 Akim Demaille <akim@epita.fr>
12654
12655 Since we now use obstacks, more % directives can be enabled.
12656
12657 * src/lex.c (percent_table): Also accept `%yacc',
12658 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
12659 `%debug'.
12660 Handle the actions for `%semantic_parser' and `%pure_parser' here,
12661 instead of returning a token.
12662 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
12663 * src/reader.c (read_declarations): Adjust.
12664 * src/files.c (open_files): Don't call `compute_base_names', don't
12665 compute `attrsfile' since they depend upon data which might be
12666 *in* the input file now.
12667 (output_files): Do it here.
12668 * src/output.c (output_headers): Document the fact that this patch
12669 introduces a guaranteed SEGV for semantic parsers.
12670 * doc/bison.texinfo: Document them.
12671 * tests/suite.at: Exercise these %options.
12672
12673 2000-12-20 Akim Demaille <akim@epita.fr>
12674
12675 Also handle the output file (--verbose) with obstacks.
12676
12677 * files.c (foutput): Remove.
12678 (output_obstack): New.
12679 Adjust all dependencies.
12680 * src/conflicts.c: Return a string.
12681 * src/system.h (obstack_grow_string): Rename as...
12682 (obstack_sgrow): this. Be ready to work with non literals.
12683 (obstack_fgrow4): New.
12684
12685 2000-12-20 Akim Demaille <akim@epita.fr>
12686
12687 * src/files.c (open_files): Fix the computation of short_base_name
12688 in the case of `-o foo.tab.c'.
12689
12690 2000-12-20 Akim Demaille <akim@epita.fr>
12691
12692 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
12693 (copy_dollar): Now that everything uses obstacks, get rid of the
12694 FILE * parameters.
12695
12696 2000-12-20 Akim Demaille <akim@epita.fr>
12697
12698 * src/files.c (open_files): Actually the `.output' file is based
12699 on the short_base_name, not base_name.
12700 * tests/suite.at (Checking output file names): Adjust.
12701
12702 2000-12-20 Akim Demaille <akim@epita.fr>
12703
12704 * src/bison.s1: Remove, we now use directly...
12705 * src/bison.simple: this.
12706 * src/Makefile.am: Use pkgdata instead of data.
12707
12708 2000-12-20 Akim Demaille <akim@epita.fr>
12709
12710 * src/files.c (guard_obstack): New.
12711 (open_files): Initialize it.
12712 (output_files): Dump it...
12713 * src/files.h: Export it.
12714 * src/reader.c (copy_guard): Use it.
12715
12716 2000-12-19 Akim Demaille <akim@epita.fr>
12717
12718 * src/files.c (outfile, defsfile, actfile): Removed as global
12719 vars.
12720 (open_files): Don't compute them.
12721 (output_files): Adjust.
12722 (base_name, short_base_name): Be global.
12723 Adjust dependencies.
12724
12725 2000-12-19 Akim Demaille <akim@epita.fr>
12726
12727 * src/files.c (strsuffix): New.
12728 (stringappend): Be just like strcat but allocate.
12729 (base_names): Eve out from open_files.
12730 Try to simplify the rather hairy computation of base_name and
12731 short_base_name.
12732 (open_files): Use it.
12733 * tests/suite.at (Checking output file names): New test.
12734
12735 2000-12-19 Akim Demaille <akim@epita.fr>
12736
12737 * src/system.h (obstack_grow_literal_string): Rename as...
12738 (obstack_grow_string): this.
12739 * src/output.c (output_parser): Recognize `%% actions' instead of
12740 `$'.
12741 * src/bison.s1: s/$/%% actions/.
12742 * src/bison.hairy: Likewise.
12743
12744 2000-12-19 Akim Demaille <akim@epita.fr>
12745
12746 * src/output.c (output_parser): Compute the `#line' lines when
12747 there are.
12748 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
12749 Suggested by Hans Aberg.
12750
12751 2000-12-19 Akim Demaille <akim@epita.fr>
12752
12753 Let the handling of the skeleton files be local to the procedures
12754 that use it.
12755
12756 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
12757 longer static.
12758 (fparser, open_extra_files): Remove.
12759 (open_files, output_files): Don't take care of fparser.
12760 * src/files.h: Adjust.
12761 * src/output.c (output_parser): Open and close the file to the
12762 skeleton.
12763 * src/reader.c (read_declarations): When %semantic_parser, open
12764 fguard.
12765
12766 2000-12-19 Akim Demaille <akim@epita.fr>
12767
12768 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
12769 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
12770
12771 2000-12-19 Akim Demaille <akim@epita.fr>
12772
12773 * src/files.c (open_files): Yipee! We no longer need all the code
12774 looking for `/tmp' since we have no tmp file.
12775
12776 2000-12-19 Akim Demaille <akim@epita.fr>
12777
12778 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
12779 New macros.
12780 * src/files.c (open_files): Less dependency on MSDOS etc.
12781
12782 2000-12-14 Akim Demaille <akim@epita.fr>
12783
12784 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
12785 Provide a default definition.
12786 Use it when executing the default @ action.
12787 * src/reader.c (reader_output_yylsp): No longer include
12788 `timestamp' and `text' in the default YYLTYPE.
12789
12790 2000-12-12 Akim Demaille <akim@epita.fr>
12791
12792 * src/reader.c (copy_definition, parse_union_decl, copy_action)
12793 (copy_guard): Quote the file names.
12794 Reported by Laurent Mascherpa.
12795
12796 2000-12-12 Akim Demaille <akim@epita.fr>
12797
12798 * src/output.c (output_headers, output_program, output): Be sure
12799 to escape special characters when outputting filenames.
12800 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
12801 (output_headers): Don't depend on them, Use ACTSTR.
12802
12803 2000-11-17 Akim Demaille <akim@epita.fr>
12804
12805 * lib/obstack.h: Formatting changes.
12806 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
12807 prevents type checking.
12808 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
12809 cast the value to (void *): assigning a `foo *' to a `void *'
12810 variable is valid.
12811 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
12812 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
12813 append characters.
12814
12815 2000-11-17 Akim Demaille <akim@epita.fr>
12816
12817 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
12818 as...
12819 (suite.m4, regression.m4, calc.m4): these.
12820 * tests/atgeneral.m4: Update from CVS Autoconf.
12821
12822 2000-11-17 Akim Demaille <akim@epita.fr>
12823
12824 * tests/regression.m4 (%union and --defines): New test,
12825 demonstrating a current bug in the obstack implementation.
12826
12827 2000-11-17 Akim Demaille <akim@epita.fr>
12828
12829 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
12830 macros.
12831 Use them to declare the variables which are global or local to
12832 `yyparse'.
12833
12834 2000-11-17 Akim Demaille <akim@epita.fr>
12835
12836 * acconfig.h: Remove, no longer used.
12837
12838 2000-11-07 Akim Demaille <akim@epita.fr>
12839
12840 * src: s/Copyright (C)/Copyright/g.
12841
12842 2000-11-07 Akim Demaille <akim@epita.fr>
12843
12844 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
12845 defining.
12846 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
12847
12848 2000-11-07 Akim Demaille <akim@epita.fr>
12849
12850 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
12851 Merge in a single CPP if/else.
12852
12853 2000-11-07 Akim Demaille <akim@epita.fr>
12854
12855 * src/output.c (output): Remove useless variables.
12856 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
12857 argument `data' for consistency with the prototypes.
12858 Qualify it `const'.
12859 (obstack_copy, obstack_copy0): Rename the second argument as
12860 `address' for consistency. Qualify it `const'.
12861 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
12862 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
12863 `const' their input argument (`data' or `address').
12864 Adjust the corresponding macros to include `const' in casts.
12865
12866 2000-11-03 Akim Demaille <akim@epita.fr>
12867
12868 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
12869 s/PFILE1/BISON_HAIRY/.
12870 Adjust dependencies.
12871
12872 2000-11-03 Akim Demaille <akim@epita.fr>
12873
12874 For some reason, this was not applied.
12875
12876 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
12877 `unlink': it's no longer used.
12878
12879 2000-11-03 Akim Demaille <akim@epita.fr>
12880
12881 * src/files.c (skeleton_find): New function, eved out of...
12882 (open_files, open_extra_files): here.
12883
12884 2000-11-03 Akim Demaille <akim@epita.fr>
12885
12886 Don't use `atexit'.
12887
12888 * src/files.c (obstack_save): New function.
12889 (done): Rename as...
12890 (output_files): this.
12891 Use `obstack_save'.
12892 * src/main.c (main): Don't use `atexit' to register `done', since
12893 it no longer has to remove tmp files, just call `output_files'
12894 when there are no errors.
12895
12896 2000-11-02 Akim Demaille <akim@epita.fr>
12897
12898 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
12899 `unlink': it's no longer used.
12900 * src/files.h: Formatting changes.
12901
12902 2000-11-02 Akim Demaille <akim@epita.fr>
12903
12904 Remove the last uses of mktemp and unlink/delete.
12905
12906 * src/files.c (fdefines, ftable): Removed.
12907 (defines_ostack, table_obstack): New.
12908 Adjust dependencies of the former into uses of the latter.
12909 * src/output.c (output_short_or_char_table, output_short_table):
12910 Convert to using obstacks.
12911 * src/reader.c (copy_comment2): Accept one FILE * and two
12912 obstacks.
12913 (output_token_defines, reader_output_yylsp): Use obstacks.
12914 * src/system.h (obstack_fgrow3): New.
12915 * po/POTFILES.in: Adjust.
12916
12917 2000-11-01 Akim Demaille <akim@epita.fr>
12918
12919 Change each use of `fattrs' into a use of `attrs_obstack'.
12920
12921 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
12922 * src/files.c (fattrs): Remove.
12923 (attrs_obstack): New.
12924 Adjust all dependencies.
12925 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
12926
12927 2000-11-01 Akim Demaille <akim@epita.fr>
12928
12929 Introduce obstacks.
12930 Change each use of `faction' into a use of `action_obstack'.
12931
12932 * lib/obstack.h, lib/obstack.c: New files.
12933 * src/files.c (faction): Remove.
12934 (action_obstack): New.
12935 Adjust all dependencies.
12936
12937 2000-10-20 Akim Demaille <akim@epita.fr>
12938
12939 * lib/quote.h (PARAMS): New macro. Use it.
12940
12941 2000-10-16 Akim Demaille <akim@epita.fr>
12942
12943 * src/output.c (output_short_or_char_table): New function.
12944 (output_short_table, output_token_translations): Use it.
12945 (goto_actions): Use output_short_table.
12946
12947 2000-10-16 Akim Demaille <akim@epita.fr>
12948
12949 * src/symtab.c (bucket_new): New function.
12950 (getsym): Use it.
12951
12952 * src/output.c (output_short_table): New argument to display the
12953 comment associated with the table.
12954 Adjust dependencies.
12955 (output_gram): Use it.
12956 (output_rule_data): Nicer output layout for YYTNAME.
12957
12958 2000-10-16 Akim Demaille <akim@epita.fr>
12959
12960 * src/lex.c (read_typename): New function.
12961 (lex): Use it.
12962 * src/reader.c (copy_dollar): Likewise.
12963
12964 2000-10-16 Akim Demaille <akim@epita.fr>
12965
12966 * src/reader.c (copy_comment2): Expect the input stream to be on
12967 the `/' which is suspected to open a comment, instead of being
12968 called after `//' or `/*' was read.
12969 (copy_comment, copy_definition, parse_union_decl, copy_action)
12970 (copy_guard): Adjust.
12971
12972 2000-10-16 Akim Demaille <akim@epita.fr>
12973
12974 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
12975 `read_signed_integer'.
12976
12977 2000-10-16 Akim Demaille <akim@epita.fr>
12978
12979 * src/reader.c (copy_dollar): New function.
12980 (copy_guard, copy_action): Use it.
12981
12982 2000-10-16 Akim Demaille <akim@epita.fr>
12983
12984 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
12985 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
12986 New files, from Fileutils 4.0.27.
12987 * src/main.c (printable_version): Remove.
12988 * src/lex.c, src/reader.c: Use `quote'.
12989
12990 2000-10-04 Akim Demaille <akim@epita.fr>
12991
12992 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
12993
12994 2000-10-04 Akim Demaille <akim@epita.fr>
12995
12996 * doc/bison.texinfo: Various typos spotted by Neil Booth.
12997
12998 2000-10-04 Akim Demaille <akim@epita.fr>
12999
13000 When a literal string is used to define two different tokens,
13001 `bison -v' segfaults.
13002 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
13003
13004 * tests/regression.m4: New file.
13005 Include the core of the sample provided by Piotr Gackiewicz.
13006 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
13007 properly.
13008
13009 2000-10-04 Akim Demaille <akim@epita.fr>
13010
13011 * src/reader.c (parse_expect_decl): Keep `count' within the size
13012 of `buffer'.
13013 From Neil Booth.
13014
13015 2000-10-02 Paul Eggert <eggert@twinsun.com>
13016
13017 * bison.s1 (yyparse): Assign the default value
13018 unconditionally, to avoid a GCC warning and make the parser a
13019 tad smaller.
13020
13021 2000-10-02 Akim Demaille <akim@epita.fr>
13022
13023 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
13024 options.
13025
13026 2000-10-02 Akim Demaille <akim@epita.fr>
13027
13028 * src/derives.c, src/print.c, src/reduce.c: To ease the
13029 translation, move some `\n' out of the translated strings.
13030
13031 2000-10-02 Akim Demaille <akim@epita.fr>
13032
13033 The location tracking mechanism is precious for parse error
13034 messages. Nevertheless, it is enabled only when `@n' is used in
13035 the grammar, which is a different issue (you can use it in error
13036 message, but not in the grammar per se). Therefore, there should
13037 be another means to enable it.
13038
13039 * src/getargs.c (getargs): Support `--locations'.
13040 (usage): Report it.
13041 * src/getargs.h (locationsflag): Export it.
13042 * src/lex.c (percent_table): Support `%locations'.
13043 * src/reader.c (yylsp_needed): Remove this variable, now replaced
13044 with `locationsflag'.
13045 * doc/bison.texinfo: Document `--locations' and `%locations'.
13046 Sort the options.
13047 * tests/calc.m4: Test it.
13048
13049 For regularity of the names, replace each
13050 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
13051 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
13052 In addition replace each `flag' with `_flag'.
13053
13054 2000-10-02 Akim Demaille <akim@epita.fr>
13055
13056 Also test parse error messages, including with YYERROR_VERBOSE.
13057
13058 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
13059 associative).
13060 Use it to check the computations.
13061 Use it to check `nonassoc' is honored.
13062 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
13063 `--yyerror-verbose'.
13064 (_AT_CHECK_CALC): Adjust to this option.
13065 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
13066
13067 2000-10-02 Akim Demaille <akim@epita.fr>
13068
13069 Test also `--verbose', `--defines' and `--name-prefix'. Testing
13070 the latter demonstrates a flaw in the handling of non debugging
13071 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
13072 was used in order to simplify:
13073
13074 #if YYDEBUG
13075 if (yydebug)
13076 {
13077 ...
13078 }
13079 #endif
13080
13081 into
13082
13083 if (yydebug)
13084 {
13085 ...
13086 }
13087
13088 unfortunately this leads to a CPP conflict when
13089 `--name-prefix=foo' is used since it produces `#define yydebug
13090 foodebug'.
13091
13092 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
13093 (YYDPRINTF): New macro.
13094 Spread its use.
13095 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
13096 the bison options.
13097 Also test `--verbose', `--defines' and `--name-prefix'.
13098
13099 2000-10-02 Akim Demaille <akim@epita.fr>
13100
13101 Improve the readability of the produced parsers.
13102
13103 * src/bison.s1: Formatting changes.
13104 Improve the comment related to the `$' mark.
13105 (yydefault): Don't fall through to `yyresume': `goto' there.
13106 * src/output.c (output_parser): When the `$' is met, skip the end
13107 of its line.
13108 New variable, `number_of_dollar_signs', to check there's exactly
13109 one `$' in the parser skeleton.
13110
13111 2000-10-02 Akim Demaille <akim@epita.fr>
13112
13113 * lib/xstrdup.c: New file, from the fileutils.
13114 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
13115 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
13116 instead of strlen + xmalloc + strcpy.
13117 * src/symtab.c (copys): Remove, use xstrdup instead.
13118
13119 2000-10-02 Akim Demaille <akim@epita.fr>
13120
13121 * src/gram.h (associativity): New enum type which replaces the
13122 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
13123 `right_assoc', `left_assoc' and `non_assoc'.
13124 Adjust all dependencies.
13125 * src/reader.c: Formatting changes.
13126 (LTYPESTR): Don't define it, use it as a literal in
13127 `reader_output_yylsp'.
13128 * src/symtab.h (symbol_class): New enum type which replaces the
13129 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
13130 `sunknown', `stoken and `snterm'.
13131
13132 2000-10-02 Akim Demaille <akim@epita.fr>
13133
13134 * src/getargs.c (fixed_outfiles): Rename as...
13135 (yaccflag): for consistency and accuracy.
13136 Adjust dependencies.
13137
13138 2000-10-02 Akim Demaille <akim@epita.fr>
13139
13140 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
13141 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
13142 difficult and introduced a lot of core dump. It turns out that
13143 Bison used an implementation of `xmalloc' based on `calloc', and
13144 at various places it does depend upon the initialization to 0. I
13145 have not tried to isolate the pertinent places, and all the former
13146 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
13147 someone should address this issue.
13148
13149 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
13150 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
13151 files.
13152 Adjust dependencies.
13153 * src/warshall.h: New file.
13154 Propagate.
13155
13156 2000-10-02 Akim Demaille <akim@epita.fr>
13157
13158 Various anti-`extern in *.c' changes.
13159
13160 * src/system.h: Include `assert.h'.
13161
13162 2000-10-02 Akim Demaille <akim@epita.fr>
13163
13164 * src/state.h (nstates, final_state, first_state, first_shift)
13165 (first_reduction): Move their exportation from here...
13166 * src/LR0.h: to here.
13167 Adjust dependencies.
13168 * src/getargs.c (statisticsflag): New variable.
13169 Add support for `--statistics'.
13170 Adjust dependencies.
13171
13172 Remove a lot of now useless `extern' statements in most files.
13173
13174 2000-10-02 Akim Demaille <akim@epita.fr>
13175
13176 * src/LR0.h: New file.
13177 Propagate its use.
13178
13179 2000-10-02 Akim Demaille <akim@epita.fr>
13180
13181 * src/print.h: New file.
13182 Propagate its use.
13183 * src/print.c: Formatting and ordering changes.
13184 (verbose, terse): Replace with...
13185 (print_results): this new function.
13186 Adjust dependencies.
13187
13188 2000-10-02 Akim Demaille <akim@epita.fr>
13189
13190 * src/conflicts.c (conflict_report): New function.
13191 (conflict_log, verbose_conflict_log): Replace with...
13192 (print_conflicts): this function.
13193 Adjust dependencies.
13194 * src/conflicts.h: New file.
13195 Propagate its inclusion.
13196
13197 2000-10-02 Akim Demaille <akim@epita.fr>
13198
13199 * src/nullable.h: New file.
13200 Propagate its inclusion.
13201 * src/nullable.c: Formatting changes.
13202
13203 2000-10-02 Akim Demaille <akim@epita.fr>
13204
13205 * src/reduce.h: New file.
13206 Propagate its inclusion.
13207 * src/reduce.c: Topological sort and other formatting changes.
13208 (bool, TRUE, FALSE): Move their definition to...
13209 * src/system.h: here.
13210
13211 2000-10-02 Akim Demaille <akim@epita.fr>
13212
13213 * src/files.c: Formatting changes.
13214 (tryopen, tryclose, openfiles): Rename as...
13215 (xfopen, xfclose, open_files): this.
13216 (stringappend): static.
13217 * src/files.h: Complete the list of exported symbols.
13218 Propagate its use.
13219
13220 2000-10-02 Akim Demaille <akim@epita.fr>
13221
13222 * src/reader.h: New file.
13223 Propagate its use instead of tedious list of `extern' and
13224 prototypes.
13225 * src/reader.c: Formatting changes, topological sort,
13226 s/register//.
13227
13228 2000-10-02 Akim Demaille <akim@epita.fr>
13229
13230 * src/lex.h: Prototype `lex.c' exported functions.
13231 * src/reader.c: Adjust.
13232 * src/lex.c: Formatting changes.
13233 (safegetc): Rename as...
13234 (xgetc): this.
13235
13236 2000-10-02 Akim Demaille <akim@epita.fr>
13237
13238 * src/lalr.h: New file.
13239 Propagate its inclusion instead of prototypes and `extern'.
13240 * src/lalr.c: Formatting changes, topological sorting etc.
13241
13242 2000-10-02 Akim Demaille <akim@epita.fr>
13243
13244 * src/output.c (token_actions): Introduce a temporary array,
13245 YYDEFACT, that makes it possible for this function to use
13246 output_short_table.
13247
13248 2000-10-02 Akim Demaille <akim@epita.fr>
13249
13250 `user_toknums' is output as a `short[]' in `output.c', while it is
13251 defined as a `int[]' in `reader.c'. For consistency with the
13252 other output tables, `user_toknums' is now defined as a table of
13253 shorts.
13254
13255 * src/reader.c (user_toknums): Be a short table instead of an int
13256 table.
13257 Adjust dependencies.
13258
13259 Factor the short table outputs.
13260
13261 * src/output.c (output_short_table): New function.
13262 * src/output.c (output_gram, output_stos, output_rule_data)
13263 (output_base, output_table, output_check): Use it.
13264
13265 2000-10-02 Akim Demaille <akim@epita.fr>
13266
13267 * src/output.c (output): Topological sort of the functions, in
13268 order to get rid of the `static' prototypes.
13269 No longer use `register'.
13270 * src/output.h: New file.
13271 Propagate its inclusion in files explicitly prototyping functions
13272 from output.c.
13273
13274 2000-09-21 Akim Demaille <akim@epita.fr>
13275
13276 * src/atgeneral.m4: Update from Autoconf.
13277
13278 2000-09-21 Akim Demaille <akim@epita.fr>
13279
13280 * src/closure.h: New file.
13281 * src/closure.c: Formatting changes, topological sort over the
13282 functions, use of closure.h.
13283 (initialize_closure, finalize_closure): Rename as...
13284 (new_closure, free_closure): these. Adjust dependencies.
13285 * src/LR0.c: Formatting changes, topological sort, use of
13286 cloture.h.
13287 (initialize_states): Rename as...
13288 (new_states): this.
13289 * src/Makefile.am (noinst_HEADERS): Adjust.
13290
13291 2000-09-20 Akim Demaille <akim@epita.fr>
13292
13293 * src/acconfig.h: Don't protect config.h against multiple
13294 inclusion.
13295 Don't define PARAMS.
13296 * src/system.h: Define PARAMS.
13297 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
13298 purpose of config.h. system.h must not try to fix wrong
13299 definitions in config.h.
13300
13301 2000-09-20 Akim Demaille <akim@epita.fr>
13302
13303 * src/derives.h: New file.
13304 * src/main.c, src/derives.h: Use it.
13305 Formatting changes.
13306 * src/Makefile.am (noinst_HEADERS): Adjust.
13307
13308 2000-09-20 Akim Demaille <akim@epita.fr>
13309
13310 * tests/atgeneral.m4: Update from Autoconf.
13311 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
13312 (AT_CHECK_CALC): New macros.
13313 Use these macros to test bison with options `', `--raw',
13314 `--debug', `--yacc', `--yacc --debug'.
13315
13316 2000-09-19 Akim Demaille <akim@epita.fr>
13317
13318 * src/output.c: Formatting changes.
13319 * src/machine.h: Remove, leaving its contents in...
13320 * src/system.h: here.
13321 Include stdio.h.
13322 Adjust all dependencies on stdio.h and machine.h.
13323 * src/getargs.h: New file.
13324 Let all `extern' declarations about getargs.c be replaced with
13325 inclusion of `getargs.h'.
13326 * src/Makefile.am (noinst_HEADERS): Adjust.
13327
13328 * tests/calc.m4 (yyin): Be initialized in main, not on the global
13329 scope.
13330 (yyerror): Returns void, not int.
13331 * doc/bison.texinfo: Formatting changes.
13332
13333 2000-09-19 Akim Demaille <akim@epita.fr>
13334
13335 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
13336 portable.
13337
13338 2000-09-18 Akim Demaille <akim@epita.fr>
13339
13340 * configure.in: Append WARNING_CFLAGS to CFLAGS.
13341 * src/Makefile.am (INCLUDES): Don't.
13342 Be ready to fetch headers in lib/.
13343
13344 2000-09-18 Akim Demaille <akim@epita.fr>
13345
13346 * doc/bison.texinfo: Update the copyright.
13347 ANSIfy and GNUify the examples.
13348 Remove the old menu.
13349
13350 2000-09-18 Akim Demaille <akim@epita.fr>
13351
13352 First set of tests: use the `calc' example from the documentation.
13353
13354 * src/bison.s1 (yyparse): Condition the code using `yytname' which
13355 is defined only when YYDEBUG is.
13356 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
13357 * src/files.c (tryopen, tryclose): Formatting changes.
13358 Move to the top and be static.
13359 * src/reader.c (read_signed_integer): Likewise.
13360 * tests/calc.m4: New file.
13361 * Makefile.am, suite.m4: Adjust.
13362 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
13363
13364 2000-09-18 Akim Demaille <akim@epita.fr>
13365
13366 Add support for an Autotest test suite for Bison.
13367
13368 * m4/m4.m4, m4/atconfig.m4: New files.
13369 * m4/Makefile.am (EXTRA_DIST): Adjust.
13370 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
13371 files.
13372 * src/getargs.c: Display a more standard --version message.
13373 * src/reader.c (reader): Formatting changes.
13374 No longer depend upon VERSION_STRING.
13375 * configure.in: No longer use `dnl'.
13376 Set up the test suite and the new directory `tests/.
13377 (VERSION_STRING): Remove.
13378
13379 2000-04-14 Akim Demaille <akim@epita.fr>
13380
13381 * src/reader.c (copy_comment2): New function, same as former
13382 `copy_comment', but outputs into two FILE *.
13383 (copy_comment): Use it.
13384 (parse_union_decl): Use it.
13385 (get_type, parse_start_decl): Use the same `invalid' message.
13386 (parse_start_decl, parse_union_decl): Use the same `multiple'
13387 message.
13388 (parse_union_decl, copy_guard, copy_action): Use the same
13389 `unmatched' message.
13390 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
13391
13392 2000-03-31 Akim Demaille <akim@epita.fr>
13393
13394 * src/files.c (tryopen, tryclose): Move to the top.
13395 Be static.
13396
13397 2000-03-31 Akim Demaille <akim@epita.fr>
13398
13399 * src/main.c (main): Don't call `done', exit does it.
13400
13401 2000-03-31 Akim Demaille <akim@epita.fr>
13402
13403 * allocate.c: s/return (foo)/return foo/.
13404 * lalr.c: Likewise.
13405 * LR0.c: Likewise.
13406 * output.c: Likewise.
13407 * reader.c: Likewise.
13408 * symtab.c: Likewise.
13409 * vmsgetargs.c: Likewise.
13410
13411 2000-03-31 Akim Demaille <akim@epita.fr>
13412
13413 Clean up the error reporting functions.
13414
13415 * src/report.c: New file.
13416 * src/report.h: Likewise.
13417 * src/Makefile.am: Adjust.
13418 * m4/error.m4: New file.
13419 * m4/Makefile.am: Adjust.
13420 * configure.in (jm_PREREQ_ERROR): Call it.
13421 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
13422 Remove.
13423 (fatal, fatals): Remove. All callers use complain.c::fatal.
13424 (warn, warni, warns, warnss, warnss): Remove. All callers use
13425 complain.c::complain.
13426 (toomany): Remove, use fatal instead.
13427 * src/files.c (done): No argument, use complain_message_count.
13428 * src/main.c (main): Register `done' to `atexit'.
13429
13430 * src/getargs.c (usage): More `fputs', less `fprintf'.
13431
13432 2000-03-28 Akim Demaille <akim@epita.fr>
13433
13434 * lib/: New directory.
13435 * Makefile.am (SUBDIRS): Adjust.
13436 * configure.in: Adjust.
13437 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
13438 useless.
13439 * src/alloca.c: Moved to lib/.
13440 * src/getopt.c: Likewise.
13441 * src/getopt1.c: Likewise.
13442 * src/getopt.h: Likewise.
13443 * src/ansi2knr.c: Likewise.
13444 * src/ansi2knr.1: Likewise.
13445 * src/Makefile.am: Adjust.
13446 * lib/Makefile.am: New file.
13447
13448 2000-03-28 Akim Demaille <akim@epita.fr>
13449
13450 * src/getargs.c (usage): Refresh the help message.
13451
13452 2000-03-17 Akim Demaille <akim@epita.fr>
13453
13454 * src/getopt1.c: Updated from textutils 2.0e
13455 * src/getopt.c: Likewise.
13456 * src/getopt.h: Likewise.
13457
13458 2000-03-17 Akim Demaille <akim@epita.fr>
13459
13460 * src/Makefile.am (bison.simple): Fix the awk program: quote only
13461 the file name, not the whole `#line LINE FILE'.
13462
13463 2000-03-17 Akim Demaille <akim@epita.fr>
13464
13465 On syntax errors, report the token on which we choked.
13466
13467 * src/bison.s1 (yyparse): In the label yyerrlab, when
13468 YYERROR_VERBOSE, add yychar in msg.
13469
13470 2000-03-17 Akim Demaille <akim@epita.fr>
13471
13472 * src/reader.c (copy_at): New function.
13473 (copy_guard): Use it.
13474 (copy_action): Use it.
13475
13476 2000-03-17 Akim Demaille <akim@epita.fr>
13477
13478 Be kind to translators, save some useless translations.
13479
13480 * src/main.c (banner): New function.
13481 (fatal_banner): Use it.
13482 (warn_banner): Use it.
13483
13484 2000-03-17 Akim Demaille <akim@epita.fr>
13485
13486 * src/reader.c (copy_definition): Use copy_string and
13487 copy_comment. Removed now unused `match', `ended',
13488 `cplus_comment'.
13489 (copy_comment, copy_string): Moved, to be visible from
13490 copy_definition.
13491
13492 2000-03-17 Akim Demaille <akim@epita.fr>
13493
13494 * src/reader.c (copy_string): Declare `static inline'. No
13495 problems with inline, since it is checked by configure.
13496 (copy_comment): Likewise.
13497
13498 2000-03-17 Akim Demaille <akim@epita.fr>
13499
13500 * src/reader.c (packsymbols): Formatting changes.
13501
13502 2000-03-17 Akim Demaille <akim@epita.fr>
13503
13504 * src/reader.c (copy_comment): New function, factored out from:
13505 (copy_action): Use it. Removed now unused `match', `ended',
13506 `cplus_comment'.
13507 (copy_guard): Likewise.
13508
13509 2000-03-17 Akim Demaille <akim@epita.fr>
13510
13511 * src/reader.c (copy_string): New function, factored out from:
13512 (copy_action): Use it.
13513 (copy_guard): Likewise.
13514
13515 2000-03-17 Akim Demaille <akim@epita.fr>
13516
13517 Change the handling of @s so that they behave exactly like $s.
13518 There is now a pseudo variable @$ (readble and writable), location
13519 of the lhs of the rule (by default ranging from the location of
13520 the first symbol of the rhs, to the location of the last symbol,
13521 or, if the rhs is empty, YYLLOC).
13522
13523 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
13524 yyval.
13525 (yyparse): When providing a default semantic action, provide a
13526 default location action.
13527 (after the $): No longer change `*YYLSP', just stack YYLOC the
13528 same way you stack YYVAL.
13529 * src/reader.c (read_declarations): Use warns.
13530 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
13531 (copy_action, case '@'): Likewise.
13532 Use a standard error message, to save useless work from
13533 translators.
13534
13535 2000-03-17 Akim Demaille <akim@epita.fr>
13536
13537 * src/bison.s1: Formatting and cosmetics changes.
13538 * src/reader.c: Likewise.
13539 Update the Copyright notice.
13540
13541 2000-03-17 Akim Demaille <akim@epita.fr>
13542
13543 * src/bison.s1 (#line): All set to `#line' only, since the
13544 Makefile now handles them.
13545
13546 2000-03-16 Akim Demaille <akim@epita.fr>
13547
13548 * src/output.c (output_rule_data): Output the documentation of
13549 some of the tables.
13550 (Copyright notice): Update.
13551 Formatting changes.
13552
13553 2000-03-16 Akim Demaille <akim@epita.fr>
13554
13555 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
13556 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
13557 One `#if YYDEBUG' remains, since it uses variables which are
13558 defined only if `YYDEBUG != 0'.
13559
13560 2000-03-16 Akim Demaille <akim@epita.fr>
13561
13562 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
13563 and related variables so that the similarities are highlighted.
13564
13565 2000-03-16 Akim Demaille <akim@epita.fr>
13566
13567 * src/bison.s1: Properly indent CPP directives.
13568
13569 2000-03-16 Akim Demaille <akim@epita.fr>
13570
13571 * src/bison.s1: Properly indent the `alloca' CPP section.
13572
13573 2000-03-16 Akim Demaille <akim@epita.fr>
13574
13575 Do not hard code values of directories in `configure.in'.
13576 Update the `configure' tool chain.
13577
13578 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
13579 src/makefile.am.
13580 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
13581 (AC_OUTPUT): Add m4/Makefile.
13582 Bump to bison 1.28a, 1.29 has never been released.
13583 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
13584 handled via src/Makefile.am.
13585 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
13586 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
13587 autoheader.
13588 * Makefile.am (SUBDIRS): Add m4.
13589 (ACLOCAL_AM_FLAGS): New variable.
13590 (AUTOMAKE_OPTIONS): Add check-news.
13591 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
13592 the proper line number and file name.
13593 (DEFS): Propagate the location of bison library files and of the
13594 locale files.
13595 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
13596 builddir.
13597 * acinclude.m4: Remove, replaced by the directory m4.
13598 * m4/Makefile.am (EXTRA_DIST): New variable.
13599 * m4/gettext.m4: New file, from the fileutils.
13600 * m4/lcmessage.m4: Likewise
13601 * m4/progtest.m4: Likewise.
13602 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
13603
13604 2000-03-10 Akim Demaille <akim@epita.fr>
13605
13606 * src/closure.c:
13607 Formatting changes of various comments.
13608 Respect the GNU coding standards at various places.
13609 Don't use `_()' when no translation is needed.
13610
13611 1999-12-13 Jesse Thilo <jthilo@gnu.org>
13612
13613 * src/files.c:
13614 OS/2 honors TMPDIR environment variable.
13615
13616 1999-12-13 Jesse Thilo <jthilo@gnu.org>
13617
13618 * doc/bison.texinfo: Tweaked spelling and grammar.
13619 Updated ISBN.
13620 Removed reference to price of printed copy.
13621 Mention BISON_SIMPLE and BISON_HAIRY.
13622
13623 1999-12-13 Jesse Thilo <jthilo@gnu.org>
13624
13625 * configure.in, NEWS:
13626 Bison 1.29 released.
13627
13628 1999-10-27 Jesse Thilo <jthilo@gnu.org>
13629
13630 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
13631 Added reference card.
13632
13633 1999-07-26 Jesse Thilo <jthilo@gnu.org>
13634
13635 * po/ru.po: Added Russian translation.
13636
13637 1999-07-26 Jesse Thilo <jthilo@gnu.org>
13638
13639 * configure.in: Added Russian translation.
13640
13641 1999-07-06 Jesse Thilo <jthilo@gnu.org>
13642
13643 * configure.in, NEWS, README:
13644 Released version 1.28.
13645
13646 1999-06-14 Jesse Thilo <jthilo@gnu.org>
13647
13648 * src/system.h:
13649 Squashed redefinition warning on some systems.
13650
13651 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
13652 Have configure build version string instead of relying on ANSI string
13653 concatentation.
13654
13655 1999-06-14 Jesse Thilo <jthilo@gnu.org>
13656
13657 * po/POTFILES.in: Got rid of version.c.
13658
13659 1999-06-14 Jesse Thilo <jthilo@gnu.org>
13660
13661 * acconfig.h, configure.in:
13662 Have configure build version string instead of relying on ANSI string
13663 concatentation.
13664
13665 1999-06-08 Jesse Thilo <jthilo@gnu.org>
13666
13667 * doc/bison.1:
13668 Dropped mention of `+' for long-named options.
13669
13670 1999-05-30 Jesse Thilo <jthilo@gnu.org>
13671
13672 * src/files.c: Added <unistd.h> for unlink().
13673
13674 * src/Makefile.am, src/system.h:
13675 I18n fixes.
13676
13677 1999-05-30 Jesse Thilo <jthilo@gnu.org>
13678
13679 * README: Added a FAQ list.
13680
13681 * configure.in, acconfig.h:
13682 I18n fixes.
13683
13684 1999-05-30 Jesse Thilo <jthilo@gnu.org>
13685
13686 * doc/FAQ, doc/Makefile.am:
13687 Added a FAQ list.
13688
13689 1999-05-19 Jesse Thilo <jthilo@gnu.org>
13690
13691 * src/alloc.h, src/symtab.h, src/version.c:
13692 Protected inclusion of "config.h" with HAVE_CONFIG_H.
13693
13694 1999-04-18 Jesse Thilo <jthilo@gnu.org>
13695
13696 * src/.cvsignore, src/Makefile.am:
13697 Reorganized: sources in `src', documentation in `doc'.
13698
13699 * src/lex.c (literalchar):
13700 fixed the code for escaping double quotes (thanks
13701 Jonathan Czisny.)
13702
13703 1999-04-18 Jesse Thilo <jthilo@gnu.org>
13704
13705 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
13706 Adjusted paths to reflect directory reorganization.
13707
13708 1999-04-18 Jesse Thilo <jthilo@gnu.org>
13709
13710 * doc/.cvsignore, doc/Makefile.am:
13711 Reorganized: sources in `src', documentation in `doc'.
13712
13713 1999-04-18 Jesse Thilo <jthilo@gnu.org>
13714
13715 * configure.in:
13716 Updated AC_INIT file to reflect directory reorganization.
13717
13718 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
13719 Reorganized: sources in `src', documentation in `doc'.
13720
13721 1999-04-13 Jesse Thilo <jthilo@gnu.org>
13722
13723 * src/allocate.c:
13724 Don't declare calloc() and realloc() if not necessary.
13725
13726 1999-04-13 Jesse Thilo <jthilo@gnu.org>
13727
13728 * configure.in, acconfig.h, acinclude.m4:
13729 Don't declare calloc() and realloc() if not necessary.
13730
13731 1999-03-23 Jesse Thilo <jthilo@gnu.org>
13732
13733 * po/.cvsignore: Added i18n support.
13734
13735 1999-03-23 Jesse Thilo <jthilo@gnu.org>
13736
13737 * acconfig.h, configure.in, Makefile.am:
13738 Added i18n support.
13739
13740 1999-03-22 Jesse Thilo <jthilo@gnu.org>
13741
13742 * src/bison.s1: Fixed #line numbers.
13743
13744 1999-03-15 Jesse Thilo <jthilo@gnu.org>
13745
13746 * po/es.po, po/fr.po, po/nl.po, po/de.po:
13747 Added PO files from Translation Project.
13748
13749 1999-03-03 Jesse Thilo <jthilo@gnu.org>
13750
13751 * Makefile.am:
13752 Added support for non-ANSI compilers (ansi2knr).
13753
13754 1999-02-16 Jesse Thilo <jthilo@gnu.org>
13755
13756 * configure.in: Bumped version number to 1.27.
13757
13758 * Makefile.am:
13759 Added `bison.simple' to list of files removed by `make distclean'.
13760
13761 1999-02-12 Jesse Thilo <jthilo@gnu.org>
13762
13763 * src/files.c, src/files.h:
13764 Defined locations of parser files in config.h instead of Makefile.
13765
13766 1999-02-12 Jesse Thilo <jthilo@gnu.org>
13767
13768 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
13769 Defined locations of parser files in config.h instead of Makefile.
13770
13771 1999-02-09 Jesse Thilo <jthilo@gnu.org>
13772
13773 * Makefile.am:
13774 Removed inappropriate use of $< macro.
13775
13776 1999-02-05 Jesse Thilo <jthilo@gnu.org>
13777
13778 * po/Makefile.in.in, po/POTFILES.in:
13779 Add `po' directory skeleton.
13780
13781 1999-01-27 Jesse Thilo <jthilo@gnu.org>
13782
13783 * README: Document help-bison list.
13784
13785 * configure.in: Add check for mkstemp().
13786
13787 1999-01-20 Jesse Thilo <jthilo@gnu.org>
13788
13789 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
13790 Hush a few compiler warnings.
13791
13792 * src/files.c:
13793 Add tryclose(), which verifies that fclose was successful.
13794 Hush a couple of compiler warnings.
13795
13796 1999-01-20 Jesse Thilo <jthilo@gnu.org>
13797
13798 * Makefile.am, OChangeLog:
13799 ChangeLog is now automatically generated. Include the old version as
13800 OChangeLog.
13801
13802 1999-01-14 Jesse Thilo <jthilo@gnu.org>
13803
13804 * 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:
13805 Update FSF address.
13806
13807 1999-01-14 Jesse Thilo <jthilo@gnu.org>
13808
13809 * doc/bison.texinfo: Fix formatting glitch.
13810
13811 * doc/bison.texinfo: Update FSF address.
13812
13813 1999-01-14 Jesse Thilo <jthilo@gnu.org>
13814
13815 * acconfig.h: Update FSF address.
13816
13817 1999-01-08 Jesse Thilo <jthilo@gnu.org>
13818
13819 * src/system.h:
13820 Don't define PACKAGE here, since config.h defines it.
13821
13822 1998-12-30 Jesse Thilo <jthilo@gnu.org>
13823
13824 * src/reader.c: Update copyright date.
13825
13826 * src/main.c:
13827 Ditch sprintf to statically-sized buffers in fatal/warn functions in
13828 favor of output directly to stderr (avoids buffer overruns).
13829
13830 * src/reader.c: Some checks for premature EOF.
13831
13832 * 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:
13833 Use prototypes if the compiler understands them.
13834
13835 * src/files.c: Honor TMPDIR on Unix hosts.
13836 Use prototypes if the compiler understands them.
13837
13838 * src/reader.c:
13839 Fix a couple of buffer overrun bugs.
13840 Use prototypes if the compiler understands them.
13841
13842 * src/system.h: Include unistd.h and ctype.h.
13843 Use #ifdef instead of #if for NLS symbols.
13844
13845 1998-12-30 Jesse Thilo <jthilo@gnu.org>
13846
13847 * doc/bison.texinfo:
13848 Delete comment "consider using @set for edition number, etc..." since
13849 we now are doing so.
13850
13851 1998-12-30 Jesse Thilo <jthilo@gnu.org>
13852
13853 * configure.in:
13854 Use prototypes if the compiler understands them.
13855
13856 * NEWS: Document 1.26 highlights.
13857
13858 * Makefile.am: Require Automake 1.3 or later.
13859
13860 * acconfig.h:
13861 Use prototypes if the compiler understands them.
13862
13863 1998-12-29 Jesse Thilo <jthilo@gnu.org>
13864
13865 * src/version.c:
13866 Use VERSION symbol from automake for version number.
13867
13868 1998-12-29 Jesse Thilo <jthilo@gnu.org>
13869
13870 * acconfig.h, configure.in, version.cin:
13871 Use VERSION symbol from automake for version number.
13872
13873 1998-11-28 Jesse Thilo <jthilo@gnu.org>
13874
13875 * Makefile.am:
13876 Distribute original version of simple parser (bison.s1), not built
13877 version (bison.simple).
13878
13879 1998-11-28 Jesse Thilo <jthilo@gnu.org>
13880
13881 * doc/bison.texinfo: Add info dir entry.
13882
13883 * doc/bison.texinfo:
13884 Let automake put version number into documentation.
13885
13886 1998-11-26 Jesse Thilo <jthilo@gnu.org>
13887
13888 * src/bison.cld, src/build.com, src/vmshlp.mar:
13889 Add non-RCS files from /gd/gnu/bison.
13890
13891 1998-11-26 Jesse Thilo <jthilo@gnu.org>
13892
13893 * doc/bison.1:
13894 Document the BISON_HAIRY and BISON_SIMPLE variables.
13895
13896 1998-11-25 Jesse Thilo <jthilo@gnu.org>
13897
13898 * src/version.c: Build version.c automatically.
13899
13900 * src/reader.c:
13901 Fix token numbering (used to start at 258, not 257).
13902
13903 * src/system.h: Include config.h.
13904
13905 * src/getargs.c: Update bug report address.
13906
13907 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
13908 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
13909
13910 1998-11-25 Jesse Thilo <jthilo@gnu.org>
13911
13912 * Makefile.am:
13913 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
13914
13915 * configure.in, version.cin:
13916 Build version.c automatically.
13917
13918 * AUTHORS: Add AUTHORS file.
13919
13920 * README: Update bug report address.
13921
13922 * bison.simple:
13923 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
13924
13925 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
13926 Add automake stuff.
13927
13928 1998-11-25 Jesse Thilo <jthilo@gnu.org>
13929
13930 * doc/bison.texinfo: Clean up some formatting.
13931
13932 1998-05-05 Richard Stallman <rms@gnu.org>
13933
13934 * doc/bison.texinfo:
13935 Explain better why to make a pure parser.
13936
13937 1998-01-05 Richard Stallman <rms@gnu.org>
13938
13939 * src/files.c (openfiles):
13940 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
13941 find a temporary directory, if possible. Do not unlink files while
13942 they are open.
13943
13944 1997-08-25 Richard Stallman <rms@gnu.org>
13945
13946 * src/reader.c (stack_offset;):
13947 Change some warni to warns.
13948
13949 * src/lex.c (literalchar): Use warns, not warni.
13950
13951 1997-06-28 Richard Stallman <rms@gnu.org>
13952
13953 * src/bison.s1: Add a Bison version comment.
13954
13955 * src/main.c (fatal, warn, berror):
13956 Use program_name.
13957
13958 1997-06-28 Richard Stallman <rms@gnu.org>
13959
13960 * Makefile.in (bison_version): New variable.
13961 (dist): Use that variable.
13962 (bison.s1): Substitute the Bison version into bison.simple.
13963
13964 * bison.simple: Add a Bison version comment.
13965
13966 1997-06-18 Richard Stallman <rms@gnu.org>
13967
13968 * src/main.c (fatal, warn, berror):
13969 Make error messages standard.
13970 (toomany): Improve error message text.
13971
13972 * 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:
13973 new.h renamed to alloc.h.
13974
13975 1997-06-18 Richard Stallman <rms@gnu.org>
13976
13977 * Makefile.in: new.h renamed to alloc.h.
13978
13979 1997-05-24 Richard Stallman <rms@gnu.org>
13980
13981 * src/lex.c (literalchar):
13982 Fix the code for escaping \, " and '.
13983
13984 (lex): Avoid trouble when there are many chars
13985 to discard in a char literal with just several chars in it.
13986
13987 1997-05-17 Richard Stallman <rms@gnu.org>
13988
13989 * src/bison.s1:
13990 Use malloc, if using alloca is troublesome.
13991 (YYSTACK_USE_ALLOCA): New flag macro.
13992 Define it for some systems and compilers.
13993 (YYSTACK_ALLOC): New macro.
13994 (yyparse): Use YYSTACK_ALLOC to allocate stack.
13995 If it was malloc'd, free it.
13996
13997 1997-05-17 Richard Stallman <rms@gnu.org>
13998
13999 * bison.simple:
14000 Use malloc, if using alloca is troublesome.
14001 (YYSTACK_USE_ALLOCA): New flag macro.
14002 Define it for some systems and compilers.
14003 (YYSTACK_ALLOC): New macro.
14004 (yyparse): Use YYSTACK_ALLOC to allocate stack.
14005 If it was malloc'd, free it.
14006
14007 1997-04-23 Richard Stallman <rms@gnu.org>
14008
14009 * src/bison.s1:
14010 (alloca) [__hpux]: Always define as __builtin_alloca.
14011
14012 1997-04-23 Richard Stallman <rms@gnu.org>
14013
14014 * bison.simple:
14015 (alloca) [__hpux]: Always define as __builtin_alloca.
14016
14017 1997-04-22 Richard Stallman <rms@gnu.org>
14018
14019 * src/bison.s1:
14020 [__hpux]: Include alloca.h (right for HPUX 10)
14021 instead of declaring alloca (right for HPUX 9).
14022
14023 * src/bison.s1 (__yy_memcpy):
14024 Declare arg `count' as unsigned int.
14025 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
14026
14027 1997-04-22 Richard Stallman <rms@gnu.org>
14028
14029 * bison.simple:
14030 [__hpux]: Include alloca.h (right for HPUX 10)
14031 instead of declaring alloca (right for HPUX 9).
14032
14033 * bison.simple (__yy_memcpy):
14034 Declare arg `count' as unsigned int.
14035 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
14036
14037 1997-01-03 Richard Stallman <rms@gnu.org>
14038
14039 * src/allocate.c: [__STDC__ or _MSC_VER]:
14040 Declare calloc and realloc to return void *.
14041
14042 1997-01-02 Richard Stallman <rms@gnu.org>
14043
14044 * src/system.h:
14045 [_MSC_VER]: Include stdlib.h and process.h.
14046 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
14047
14048 * src/main.c (main): Return FAILURE as a value.
14049 (printable_version): Declare arg as int, not char.
14050
14051 1997-01-02 Richard Stallman <rms@gnu.org>
14052
14053 * Makefile.in (dist):
14054 Explicitly check for symlinks, and copy them.
14055
14056 1996-12-19 Richard Stallman <rms@gnu.org>
14057
14058 * src/files.c:
14059 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
14060
14061 1996-12-18 Paul Eggert <eggert@gnu.org>
14062
14063 * src/bison.s1 (yyparse):
14064 If __GNUC__ and YYPARSE_PARAM are both defined,
14065 declare yyparse to have a void * argument.
14066
14067 1996-12-18 Paul Eggert <eggert@gnu.org>
14068
14069 * bison.simple (yyparse):
14070 If __GNUC__ and YYPARSE_PARAM are both defined,
14071 declare yyparse to have a void * argument.
14072
14073 1996-12-17 Richard Stallman <rms@gnu.org>
14074
14075 * src/reduce.c (nbits): Add some casts.
14076
14077 1996-08-12 Richard Stallman <rms@gnu.org>
14078
14079 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
14080
14081 1996-08-12 Richard Stallman <rms@gnu.org>
14082
14083 * bison.simple: Test _MSDOS as well as _MSDOS_.
14084
14085 1996-07-31 Richard Stallman <rms@gnu.org>
14086
14087 * src/bison.s1:
14088 [__sun && __i386]: Include alloca.h.
14089
14090 1996-07-31 Richard Stallman <rms@gnu.org>
14091
14092 * bison.simple:
14093 [__sun && __i386]: Include alloca.h.
14094
14095 1996-07-30 Richard Stallman <rms@gnu.org>
14096
14097 * src/bison.s1: Comment change.
14098
14099 * src/bison.s1: Test _MSDOS_, not MSDOS.
14100
14101 1996-07-30 Richard Stallman <rms@gnu.org>
14102
14103 * bison.simple: Comment change.
14104
14105 * bison.simple: Test _MSDOS_, not MSDOS.
14106
14107 1996-06-01 Richard Stallman <rms@gnu.org>
14108
14109 * 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:
14110 Insert `_' macro around many string constants.
14111
14112 * src/main.c:
14113 Insert `_' macro around many string constants.
14114
14115 (main): Call setlocale, bindtextdomain and textdomain.
14116
14117 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
14118 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
14119 [ENABLE_NLS]: Include libintl.h.
14120 [ENABLE_NLS] (gettext): Define.
14121 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
14122 (N_, PACKAGE, LOCALEDIR): New macros.
14123
14124 1996-06-01 Richard Stallman <rms@gnu.org>
14125
14126 * POTFILES.in: New file.
14127
14128 * Makefile.in (allocate.o):
14129 Define target explicitly.
14130
14131 * Makefile.in (CFLAGS): Set to @CFLAGS@.
14132 (LDFLAGS): Set to @LDFLAGS@.
14133 (configure): Run autoconf only if preceding `cd' succeeds.
14134 (bison.s1): Redirect output to temporary file then move the
14135 temporary to the target, rather than redirecting directly to bison.s1.
14136 (clean): Remove config.status and config.log.
14137 (distclean): Don't remove config.status here.
14138
14139 1996-05-12 Richard Stallman <rms@gnu.org>
14140
14141 * src/bison.s1:
14142 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
14143
14144 1996-05-12 Richard Stallman <rms@gnu.org>
14145
14146 * bison.simple:
14147 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
14148
14149 1996-05-11 Richard Stallman <rms@gnu.org>
14150
14151 * src/bison.s1 (__yy_memcpy):
14152 Really reorder the args, as was supposedly done on Feb 14 1995.
14153 (yyparse): Calls changed accordingly.
14154
14155 1996-05-11 Richard Stallman <rms@gnu.org>
14156
14157 * Makefile.in (dist): Don't use $(srcdir).
14158
14159 * bison.simple (__yy_memcpy):
14160 Really reorder the args, as was supposedly done on Feb 14 1995.
14161 (yyparse): Calls changed accordingly.
14162
14163 1996-01-27 Richard Stallman <rms@gnu.org>
14164
14165 * src/output.c (output_rule_data):
14166 Test YYERROR_VERBOSE in the conditional
14167 around the definition of ttyname.
14168
14169 1995-12-29 Richard Stallman <rms@gnu.org>
14170
14171 * src/bison.s1:
14172 Fix line numbers in #line commands.
14173
14174 1995-12-29 Richard Stallman <rms@gnu.org>
14175
14176 * bison.simple:
14177 Fix line numbers in #line commands.
14178
14179 1995-12-27 Richard Stallman <rms@gnu.org>
14180
14181 * src/bison.s1 (YYPARSE_PARAM_DECL):
14182 In C++, make it always null.
14183 (YYPARSE_PARAM_ARG): New macro.
14184 (yyparse): Use YYPARSE_PARAM_ARG.
14185
14186 1995-12-27 Richard Stallman <rms@gnu.org>
14187
14188 * bison.simple (YYPARSE_PARAM_DECL):
14189 In C++, make it always null.
14190 (YYPARSE_PARAM_ARG): New macro.
14191 (yyparse): Use YYPARSE_PARAM_ARG.
14192
14193 1995-11-29 Richard Stallman <rms@gnu.org>
14194
14195 * doc/bison.texinfo:
14196 Describe literal string tokens, %raw, %no_lines, %token_table.
14197
14198 1995-11-29 Daniel Hagerty <hag@gnu.org>
14199
14200 * doc/bison.texinfo: Fixed update date
14201
14202 1995-10-16 Richard Stallman <rms@gnu.org>
14203
14204 * src/version.c: Version 1.25.
14205
14206 1995-10-16 Richard Stallman <rms@gnu.org>
14207
14208 * NEWS: *** empty log message ***
14209
14210 1995-10-16 Richard Stallman <rms@gnu.org>
14211
14212 * doc/bison.1, doc/bison.rnh:
14213 Add new options.
14214
14215 1995-10-15 Richard Stallman <rms@gnu.org>
14216
14217 * src/vmsgetargs.c, src/getargs.c:
14218 Added -n, -k, and -raw switches.
14219 (noparserflag, toknumflag, rawtoknumflag): New variables.
14220
14221 * src/symtab.h (SALIAS):
14222 New #define for adding aliases to %token.
14223 (struct bucket): Added `alias' field.
14224
14225 * src/reduce.c (reduce_grammar):
14226 Revise error message.
14227 (print_notices): Remove final `.' from error message.
14228
14229 * src/reader.c (reader_output_yylsp):
14230 New function.
14231 (readgram): Use `#if 0' around code that accepted %command
14232 inside grammar rules: The documentation doesn't allow it,
14233 and it will fail since the %command processors scan for the next %.
14234 (parse_token_decl): Extended the %token
14235 declaration to allow a multi-character symbol as an alias.
14236 (parse_thong_decl): New function.
14237 (read_declarations): Added %thong declarations.
14238 (read_declarations): Handle NOOP to deal with allowing
14239 % declarations as another means to specify the flags.
14240 (readgram): Allow %prec prior to semantics embedded in a rule.
14241 (skip_to_char, read_declarations, copy_definition)
14242 (parse_token_decl, parse_start_decl, parse_type_decl)
14243 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
14244 (get_type_name, copy_guard, copy_action, readgram)
14245 (get_type, packsymbols): Revised most error messages.
14246 Changed `fatal' to `warnxxx' to avoid aborting for error.
14247 Revised and use multiple warnxxx functions to avoid using VARARGS1.
14248 (read_declarations): Improve the error message for
14249 an invalid character. Do not abort.
14250 (read_declarations, copy_guard, copy_action): Use
14251 printable_version to avoid unprintable characters in printed output.
14252 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
14253 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
14254 Allow the type of a non-terminal can be given
14255 more than once, as long as all specifications give the same type.
14256
14257 * src/output.c:
14258 (output_headers, output_trailers, output, output_gram)
14259 (output_rule_data): Implement noparserflag variable.
14260 Implement toknumflag variable.
14261 (output): Call reader_output_yylsp to output LTYPESTR.
14262
14263 * src/main.c (main):
14264 If reader sees an error, don't process the grammar.
14265 (fatals): Updated to not use VARARGS1.
14266 (printable_version, int_to_string, warn, warni, warns, warnss)
14267 (warnsss): New error reporting functions. Avoid abort for error.
14268
14269 * src/lex.h:
14270 Added THONG and NOOP for alias processing.
14271 Added SETOPT for the new code that allows setting options with %flags.
14272
14273 * src/lex.c:
14274 Include getopt.h. Add some extern decls.
14275 (safegetc): New function to deal with EOF gracefully.
14276 (literalchar); new function to deal with reading \ escapes.
14277 (lex): Use literalchar.
14278 (lex): Implemented "..." tokens.
14279 (literalchar, lex, parse_percent_token): Made tokenbuffer
14280 always contain the token. This includes growing the token
14281 buffer while reading an integer.
14282 (parse_percent_token): Replaced if-else statement with percent_table.
14283 (parse_percent_token): Added % declarations as another
14284 way to specify the flags -n, -l, and -r. Also added hooks for
14285 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
14286 major changes to files.c.
14287 (lex) Retain in the incoming stream a character following
14288 an incorrect '/'.
14289 (skip_white_space, lex): Revised most error messages
14290 and changed fatal to warn to avoid aborting.
14291 (percent_table): Added %thong declarations.
14292
14293 * src/gram.h: Comment changes.
14294
14295 * src/files.c (openfiles, open_extra_files, done):
14296 Add faction flag
14297 and actfile file. Handle noparserflag. Both for -n switch.
14298
14299 * src/conflicts.c (resolve_sr_conflict):
14300 Remove use of alloca.
14301
14302 1995-06-01 Jim Meyering <meyering@gnu.org>
14303
14304 * doc/bison.texinfo: *** empty log message ***
14305
14306 1995-05-06 Richard Stallman <rms@gnu.org>
14307
14308 * src/bison.s1: Comment change.
14309
14310 1995-05-06 Richard Stallman <rms@gnu.org>
14311
14312 * bison.simple: Comment change.
14313
14314 1995-05-03 Richard Stallman <rms@gnu.org>
14315
14316 * src/version.c: Version now 1.24.
14317
14318 * src/bison.s1: Change distribution terms.
14319
14320 * src/version.c: Version now 1.23.
14321
14322 1995-05-03 Richard Stallman <rms@gnu.org>
14323
14324 * doc/bison.texinfo:
14325 Rewrite "Conditions for Using Bison".
14326 Update version to 1.24.
14327
14328 1995-05-03 Richard Stallman <rms@gnu.org>
14329
14330 * bison.simple: Change distribution terms.
14331
14332 1995-02-23 Richard Stallman <rms@gnu.org>
14333
14334 * src/files.c: Test __VMS_POSIX as well as VMS.
14335
14336 1995-02-14 Jim Meyering <meyering@gnu.org>
14337
14338 * src/bison.s1 (__yy_memcpy):
14339 Renamed from __yy_bcopy to avoid
14340 confusion. Reverse FROM and TO arguments to be consistent with
14341 those of memcpy.
14342
14343 1995-02-14 Jim Meyering <meyering@gnu.org>
14344
14345 * bison.simple (__yy_memcpy):
14346 Renamed from __yy_bcopy to avoid
14347 confusion. Reverse FROM and TO arguments to be consistent with
14348 those of memcpy.
14349
14350 1994-11-10 David J. MacKenzie <djm@gnu.org>
14351
14352 * NEWS: reformat
14353
14354 * NEWS: New file.
14355
14356 * Makefile.in (DISTFILES): Include NEWS.
14357
14358 * Makefile.in (DISTFILES):
14359 Include install-sh, not install.sh.
14360
14361 * configure.in: Update to Autoconf v2 macro names.
14362
14363 1994-10-05 David J. MacKenzie <djm@gnu.org>
14364
14365 * Makefile.in: fix typo
14366
14367 * Makefile.in (prefix, exec_prefix):
14368 Let configure set them.
14369
14370 1994-09-28 David J. MacKenzie <djm@gnu.org>
14371
14372 * Makefile.in: Set datadir to $(prefix)/share.
14373
14374 1994-09-15 Richard Stallman <rms@gnu.org>
14375
14376 * src/bison.s1:
14377 Update copyright notice and GPL version.
14378
14379 1994-09-15 Richard Stallman <rms@gnu.org>
14380
14381 * bison.simple:
14382 Update copyright notice and GPL version.
14383
14384 1994-07-12 Richard Stallman <rms@gnu.org>
14385
14386 * src/reduce.c, src/reader.c:
14387 entered into RCS
14388
14389 1994-05-05 David J. MacKenzie <djm@gnu.org>
14390
14391 * Makefile.in: entered into RCS
14392
14393 1994-03-26 Richard Stallman <rms@gnu.org>
14394
14395 * src/bison.s1: entered into RCS
14396
14397 1994-03-26 Richard Stallman <rms@gnu.org>
14398
14399 * bison.simple: entered into RCS
14400
14401 1994-03-25 Richard Stallman <rms@gnu.org>
14402
14403 * src/main.c: entered into RCS
14404
14405 1994-03-24 Richard Stallman <rms@gnu.org>
14406
14407 * src/conflicts.c: entered into RCS
14408
14409 1994-01-02 Richard Stallman <rms@gnu.org>
14410
14411 * Makefile.in: *** empty log message ***
14412
14413 1993-11-21 Richard Stallman <rms@gnu.org>
14414
14415 * src/bison.s1: *** empty log message ***
14416
14417 1993-11-21 Richard Stallman <rms@gnu.org>
14418
14419 * doc/bison.texinfo: entered into RCS
14420
14421 * doc/bison.texinfo: *** empty log message ***
14422
14423 1993-11-21 Richard Stallman <rms@gnu.org>
14424
14425 * bison.simple: *** empty log message ***
14426
14427 1993-10-25 David J. MacKenzie <djm@gnu.org>
14428
14429 * doc/bison.texinfo: *** empty log message ***
14430
14431 1993-10-19 Richard Stallman <rms@gnu.org>
14432
14433 * src/bison.s1: *** empty log message ***
14434
14435 1993-10-19 Richard Stallman <rms@gnu.org>
14436
14437 * bison.simple: *** empty log message ***
14438
14439 1993-10-14 Richard Stallman <rms@gnu.org>
14440
14441 * src/bison.s1: *** empty log message ***
14442
14443 1993-10-14 Richard Stallman <rms@gnu.org>
14444
14445 * bison.simple: *** empty log message ***
14446
14447 1993-09-14 David J. MacKenzie <djm@gnu.org>
14448
14449 * doc/bison.texinfo: *** empty log message ***
14450
14451 1993-09-13 Noah Friedman <friedman@gnu.org>
14452
14453 * Makefile.in: *** empty log message ***
14454
14455 1993-09-10 Richard Stallman <rms@gnu.org>
14456
14457 * src/conflicts.c: *** empty log message ***
14458
14459 * src/system.h: entered into RCS
14460
14461 1993-09-10 Richard Stallman <rms@gnu.org>
14462
14463 * doc/bison.1: entered into RCS
14464
14465 1993-09-06 Noah Friedman <friedman@gnu.org>
14466
14467 * src/version.c: entered into RCS
14468
14469 1993-09-06 Noah Friedman <friedman@gnu.org>
14470
14471 * Makefile.in: *** empty log message ***
14472
14473 1993-07-30 David J. MacKenzie <djm@gnu.org>
14474
14475 * Makefile.in: *** empty log message ***
14476
14477 1993-07-24 Richard Stallman <rms@gnu.org>
14478
14479 * src/bison.s1: *** empty log message ***
14480
14481 1993-07-24 Richard Stallman <rms@gnu.org>
14482
14483 * bison.simple: *** empty log message ***
14484
14485 1993-07-08 David J. MacKenzie <djm@gnu.org>
14486
14487 * Makefile.in: *** empty log message ***
14488
14489 1993-07-04 Richard Stallman <rms@gnu.org>
14490
14491 * src/bison.s1: *** empty log message ***
14492
14493 1993-07-04 Richard Stallman <rms@gnu.org>
14494
14495 * bison.simple: *** empty log message ***
14496
14497 1993-06-26 David J. MacKenzie <djm@gnu.org>
14498
14499 * src/getargs.c: entered into RCS
14500
14501 1993-06-26 David J. MacKenzie <djm@gnu.org>
14502
14503 * doc/bison.texinfo: *** empty log message ***
14504
14505 * doc/bison.1: New file.
14506
14507 1993-06-25 Richard Stallman <rms@gnu.org>
14508
14509 * src/getargs.c: New file.
14510
14511 1993-06-16 Richard Stallman <rms@gnu.org>
14512
14513 * src/bison.s1: *** empty log message ***
14514
14515 1993-06-16 Richard Stallman <rms@gnu.org>
14516
14517 * bison.simple: *** empty log message ***
14518
14519 1993-06-03 Richard Stallman <rms@gnu.org>
14520
14521 * src/bison.s1: New file.
14522
14523 1993-06-03 Richard Stallman <rms@gnu.org>
14524
14525 * doc/bison.texinfo: *** empty log message ***
14526
14527 1993-06-03 Richard Stallman <rms@gnu.org>
14528
14529 * bison.simple: New file.
14530
14531 1993-05-19 Richard Stallman <rms@gnu.org>
14532
14533 * doc/bison.texinfo: New file.
14534
14535 1993-05-07 Noah Friedman <friedman@gnu.org>
14536
14537 * Makefile.in: *** empty log message ***
14538
14539 1993-04-28 Noah Friedman <friedman@gnu.org>
14540
14541 * src/reader.c: *** empty log message ***
14542
14543 1993-04-23 Noah Friedman <friedman@gnu.org>
14544
14545 * src/alloc.h: entered into RCS
14546
14547 1993-04-20 David J. MacKenzie <djm@gnu.org>
14548
14549 * src/version.c: *** empty log message ***
14550
14551 * src/files.c, src/allocate.c:
14552 entered into RCS
14553
14554 * src/reader.c: *** empty log message ***
14555
14556 * src/lex.c: entered into RCS
14557
14558 * src/conflicts.c: New file.
14559
14560 * src/symtab.c: entered into RCS
14561
14562 * src/alloc.h: New file.
14563
14564 * src/LR0.c: entered into RCS
14565
14566 1993-04-18 Noah Friedman <friedman@gnu.org>
14567
14568 * src/reader.c: New file.
14569
14570 * src/version.c: *** empty log message ***
14571
14572 1993-04-18 Noah Friedman <friedman@gnu.org>
14573
14574 * Makefile.in: *** empty log message ***
14575
14576 1993-04-17 Noah Friedman <friedman@gnu.org>
14577
14578 * Makefile.in: *** empty log message ***
14579
14580 1993-04-15 Richard Stallman <rms@gnu.org>
14581
14582 * src/main.c, src/files.c:
14583 New file.
14584
14585 1993-04-15 Noah Friedman <friedman@gnu.org>
14586
14587 * configure.in: entered into RCS
14588
14589 * configure.in: *** empty log message ***
14590
14591 * configure.in: New file.
14592
14593 1993-04-14 Richard Stallman <rms@gnu.org>
14594
14595 * Makefile.in: New file.
14596
14597 1993-04-13 Richard Stallman <rms@gnu.org>
14598
14599 * src/version.c: New file.
14600
14601 1993-03-25 Richard Stallman <rms@gnu.org>
14602
14603 * src/output.c: entered into RCS
14604
14605 1992-09-25 Richard Stallman <rms@gnu.org>
14606
14607 * configure.bat: entered into RCS
14608
14609 1992-06-22 Richard Stallman <rms@gnu.org>
14610
14611 * src/vmsgetargs.c: entered into RCS
14612
14613 1992-06-22 Richard Stallman <rms@gnu.org>
14614
14615 * doc/bison.rnh: entered into RCS
14616
14617 1992-04-20 David J. MacKenzie <djm@gnu.org>
14618
14619 * README: entered into RCS
14620
14621 1992-01-22 Richard Stallman <rms@gnu.org>
14622
14623 * src/machine.h: entered into RCS
14624
14625 1991-12-21 Richard Stallman <rms@gnu.org>
14626
14627 * src/lalr.c, src/closure.c:
14628 entered into RCS
14629
14630 1991-12-20 Richard Stallman <rms@gnu.org>
14631
14632 * src/state.h: entered into RCS
14633
14634 1991-12-18 Richard Stallman <rms@gnu.org>
14635
14636 * src/print.c, src/nullable.c, src/derives.c:
14637 entered into RCS
14638
14639 1991-11-03 David J. MacKenzie <djm@gnu.org>
14640
14641 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
14642 entered into RCS
14643
14644 1988-09-09 Richard Stallman <rms@gnu.org>
14645
14646 * src/bison.hairy: entered into RCS
14647
14648 1987-12-16 Richard Stallman <rms@gnu.org>
14649
14650 * REFERENCES: entered into RCS
14651
14652
14653 -----
14654
14655 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
14656 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software
14657 Foundation, Inc.
14658
14659 Copying and distribution of this file, with or without
14660 modification, are permitted provided the copyright notice and this
14661 notice are preserved.