]> git.saurik.com Git - bison.git/blob - ChangeLog
Generalize the display of semantic values and locations in traces.
[bison.git] / ChangeLog
1 2005-11-16 Akim Demaille <akim@epita.fr>
2
3 Generalize the display of semantic values and locations in traces.
4 * data/glr.c (yy_reduce_print): Fix indices (again).
5 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
6 literal integers.
7 * data/lalr1.cc (yyreduce_print): Rename as...
8 (yy_reduce_print): this.
9 Display values and locations.
10 * data/yacc.c (yy_reduce_print): Likewise.
11 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
12 (yysymprint): Move higher to be visible from yy_reduce_print).
13 (yyparse): Adjust.
14 * tests/calc.at: Adjust the expected length of the traces.
15
16 2005-11-14 Akim Demaille <akim@epita.fr>
17
18 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
19 from 1 to N, while values and location start at 0.
20 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
21
22 2005-11-14 Akim Demaille <akim@epita.fr>
23
24 * data/glr.c (yy_reduce_print): Fix the $ number.
25
26 2005-11-14 Akim Demaille <akim@epita.fr>
27
28 "Use" parse parameters.
29 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
30 * data/glr.c, data/glr.cc: Use them.
31 * data/glr.c (YYUSE): Have a C++ definition that supports
32 non-pointer types.
33
34 2005-11-14 Akim Demaille <akim@epita.fr>
35
36 * data/glr.c (yyexpandGLRStack): Declare only if defined.
37
38 2005-11-14 Akim Demaille <akim@epita.fr>
39
40 * data/glr.cc: New.
41 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
42
43 2005-11-12 Akim Demaille <akim@epita.fr>
44
45 Let position and location be PODs.
46 * data/location.cc (position::initialize, location::initialize): New.
47 (position::position, location::location): Define only if
48 b4_location_constructors is defined.
49 * data/lalr1.cc (b4_location_constructors): Define it for backward
50 compatibility.
51 * doc/bison.texinfo (Initial Action Decl): Use initialize.
52
53 2005-11-12 Akim Demaille <akim@epita.fr>
54
55 * data/lalr1.cc: Move the body of the ctor and dtor into the
56 parser file (instead of the header).
57 Wrap the implementations in a "namespace yy".
58
59 2005-11-12 Akim Demaille <akim@epita.fr>
60
61 Have glr.c include its header file when created.
62 * data/glr.c (b4_shared_declarations): New.
63 Output them verbatim in the parser if !%defines, otherwise
64 output then in the header file, and include it instead.
65
66 2005-11-11 Akim Demaille <akim@epita.fr>
67
68 * data/glr.c: Comment changes.
69
70 2005-11-11 Akim Demaille <akim@epita.fr>
71
72 When yydebug, report semantic and location values for reductions.
73 * data/glr.c (yy_reduce_print): Report the semantic values and the
74 locations.
75 (YY_REDUCE_PRINT): Adjust.
76 (yyglrReduce): Use them.
77 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
78 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
79 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
80 traces.
81
82 2005-11-10 Akim Demaille <akim@epita.fr>
83
84 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
85 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
86 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
87
88 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
89
90 * m4/cxx.m4, examples/Makefile.am: Don't build
91 examples/calc++ if no C++ compiler is available. (trivial change)
92
93 2005-11-09 Akim Demaille <akim@epita.fr>
94
95 * src/scan-skel.l: Use a couple of asserts.
96
97 2005-11-03 Akim Demaille <akim@epita.fr>
98
99 In some (weird) cases, the final state number is incorrect.
100 Reported by Alexandre Duret-Lutz.
101 * src/LR0.c (state_list_append): Remove the computation of
102 final_state.
103 (save_reductions): Do it here.
104 (get_state): Alpha conversion.
105 (generate_states): Use a for loop.
106 * src/gram.h (item_number_is_rule_number)
107 (item_number_is_symbol_number): New.
108 * src/state.c: Use assert.
109 * src/system.h: Include assert.h.
110 * tests/sets.at (Accept): New.
111
112 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
113
114 * data/glr.c (yyfill): Adjust comment.
115 (yyresolveAction): Initialize default location properly
116 for empty right-hand sides.
117 (yydoAction): Ditto.
118 Add comment explaining apparently dead code.
119 * tests/glr-regression.at
120 (Incorrectly initialized location for empty right-hand side in GLR):
121 New test.
122
123 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
124
125 * bootstrap (cleanup_gnulib): New function. Use it to clean up
126 gnulib when interrupted. This fixes some race conditions and
127 works around some portability problems (one noted by Paul
128 Hilfinger).
129
130 2005-10-22 Akim <akim@epita.fr>
131
132 * Makefile.cfg: Adjust to config -> build-aux.
133 Reported by twledo.
134
135 2005-10-21 Akim Demaille <akim@epita.fr>
136
137 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
138 the %parse-params.
139 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
140 * data/yacc.c (b4_Pure_if): Rename as...
141 (b4_yacc_pure_if): this.
142 (YY_SYMBOL_PRINT, yyparse): Adjust.
143 * doc/bison.texinfo: Formatting changes.
144
145 2005-10-21 Akim Demaille <akim@epita.fr>
146
147 Finish the transition config -> build-aux.
148 * configure.ac, Makefile.am: Use build-aux.
149 * config/prev-version, config/announce-gen, config/Makefile.am:
150 Move to...
151 * build-aux/prev-version, build-aux/announce-gen,
152 * build-aux/Makefile.am: here.
153
154 2005-10-14 Akim Demaille <akim@epita.fr>
155
156 * examples/calc++/test: Use set -x only when VERBOSE.
157
158 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
159
160 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
161 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
162
163 2005-10-13 Akim Demaille <akim@epita.fr>
164
165 * src/scan-skel.l: Output the base name parts of the parser and
166 header file names.
167 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
168 additional checks.
169 Use this to exercise C++ outputs in subdirs.
170 Reported by Oleg Smolsky.
171
172 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
173
174 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
175 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
176 Problem reported by John P. Hartmann.
177 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
178 already defined it.
179
180 2005-10-12 Akim Demaille <akim@epita.fr>
181
182 * src/parse-gram.y (version_check): Exit 63 to please missing
183 (stands for "version mismatch).
184 * tests/input.at, doc/bison.texinfo: Adjust.
185
186 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
187
188 Work around portability problems with Visual Age C compiler
189 (xlc and xlC_r) reported by John P. Hartmann.
190 * data/location.cc (initial_column, initial_line): Remove.
191 All uses replaced by 0 and 1.
192 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
193 that xlc complains about.
194 * src/scan-skel.l (skel_wrap): Likewise.
195 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
196 as __STDC__.
197 * data/yacc.c (YYMODERN_C): New macro, which also looks at
198 __STDC_VERSION__. Use it everywhere instead of looking at
199 __STDC__ and __cplusplus.
200
201 2005-10-10 Akim Demaille <akim@epita.fr>
202
203 * examples/calc++/test: Be quiet unless VERBOSE.
204
205 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
206
207 * data/c.m4 (yydestruct, yysymprint):
208 Use YYUSE instead of casting to void.
209 * data/glr.c (YYUSE): New macro.
210 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
211 Use it instead of rolling our own.
212 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
213 (YYCHK1):
214 Use /*CONSTCOND*/ to suppress lint warnings.
215 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
216 (YY_STACK_PRINT): Use 'false' not '0'.
217 (YYUSE): New macro.
218 (yysymprint_, yydestruct_): Use it instead of rolling our own.
219 * data/yacc.c (YYUSE): New macro.
220 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
221 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
222 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
223
224
225 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
226 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
227
228 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
229
230 Undo the parts of the unlocked-I/O change that substituted
231 putc or puts for printf. This might hurt performance a bit,
232 but some people prefer the printf style.
233 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
234 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
235 All uses replaced by YYFPRINTF and YYDPRINTF.
236 * data/yacc.c: Likewise.
237 * lib/bitset.c (bitset_print): Likewise.
238 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
239 putc and puts.
240 * lib/lbitset.c (debug_lbitset): Likewise.
241 * src/closure.c (print_firsts, print_fderives): Likewise.
242 * src/gram.c (grammar_dump): Likewise.
243 * src/lalr.c (look_ahead_tokens_print): Likewise.
244 * src/output.c (escaped_output): Likewise.
245 (user_actions_output): Break apart two printfs.
246 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
247 * src/reduce.c (reduce_print): Likewise.
248 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
249 * src/system.h: Include unlocked-io.h rathe than stdio.h.
250
251 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
252 Use assignments rather than casts-to-void to suppress
253 unused-variable warnings. This pacifies 'lint'.
254 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
255 unused-variable warnings.
256
257 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
258
259 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
260
261 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
262
263 Use unlocked I/O for a minor performance improvement on hosts like
264 GNU/Linux and Solaris that support unlocked I/O. The basic idea
265 is to use the gnlib unlocked-io module, and to prefer putc and
266 puts to printf when either will work (since the latter doesn't
267 come in an unlocked flavor).
268 * bootstrap (gnulib_modules): Add unlocked-io.
269 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
270 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
271 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
272 and similarly for puts and putc and printf.
273 * data/yacc.c: Likewise.
274 * lib/bitset.c (bitset_print): Likewise.
275 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
276 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
277 to printf.
278 * lib/lbitset.c (debug_lbitset): Likewise.
279 * src/closure.c (print_firsts, print_fderives): Likewise.
280 * src/gram.c (grammar_dump): Likewise.
281 * src/lalr.c (look_ahead_tokens_print): Likewise.
282 * src/output.c (escaped_output): Likewise.
283 (user_actions_output): Coalesce two printfs.
284 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
285 * src/reduce.c (reduce_print): Likewise.
286 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
287 * src/system.h: Include unlocked-io.h rather than stdio.h.
288
289 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
290 this confuses xgettext.
291
292 2005-10-02 Akim Demaille <akim@epita.fr>
293
294 * bootstrap (gnulib_modules): Add strverscmp.
295 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
296 * m4/.cvsignore: Add strverscmp.m4.
297 * src/parse-gram.y (%require): New token, new rule.
298 (version_check): New.
299 * src/scan-gram.l (%require): Adjust.
300 * tests/input.at (AT_REQUIRE): New.
301 Use it.
302 * doc/bison.texinfo (Require Decl): New.
303 (Calc++ Parser): Use %require.
304
305 2005-10-02 Akim Demaille <akim@epita.fr>
306
307 * data/location.cc: New.
308
309 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
310 Akim Demaille <akim@epita.fr>
311
312 Make sure -odir/foo.cc creates dir/location.hh etc.
313 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
314 (spec_file_prefix, spec_verbose_file, spec_graph_file)
315 (spec_defines_file): Now const.
316 (dir_prefix): New.
317 (short_base_name): Remove.
318 * src/files.c: Adjust.
319 (dirname.h): Include.
320 (base_name): Don't prototype it.
321 (finput): Remove, duplicates gram_in.
322 (full_base_name, short_base_name): Replace by...
323 (all_but_ext, all_but_tab_ext): these.
324 (compute_base_names): Rename as...
325 (compute_file_name_parts): this.
326 Update to compute the new variables, including dir_prefix.
327 Adjust dependencies.
328 * src/output.c (prepare): Output them.
329 * src/reader.c: Adjust to use gram_in, not finput.
330 * src/scan-skel.l (@dir_prefix@): New.
331
332 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
333
334 * lib/subpipe.c: New function end_of_output_subpipe() added
335 to allow support for non-posix systems. This is a no-op function
336 for posix systems.
337
338 * lib/subpipe.h: New function end_of_output_subpipe() added
339 to allow support for non-posix systems. This is a no-op function
340 for posix systems.
341
342 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
343 handle the lack of pipe/fork functionality on non-posix systems.
344
345 * djgpp/Makefile.maint: DJGPP specific file.
346
347 * djgpp/README.in: DJGPP specific file.
348
349 * djgpp/config.bat: DJGPP specific configuration file.
350
351 * djgpp/config.sed: DJGPP specific configuration file.
352
353 * djgpp/config.site: DJGPP specific configuration file.
354
355 * djgpp/config_h.sed: DJGPP specific configuration file.
356
357 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
358
359 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
360
361 2005-10-02 Akim Demaille <akim@epita.fr>
362
363 * data/location.cc: New, extract from...
364 * data/lalr1.cc: here.
365 (location.hh): Include it after the user prologue, in case the
366 filename type is defined by the user.
367 Forward declation location and position before the pre-prologue.
368 (yyresult_): Rename as...
369 (yyresult): this, it's a local variable, not an attribute.
370 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
371
372 2005-10-01 Akim Demaille <akim@epita.fr>
373
374 * examples/extexi: Restore the #line generation.
375
376 2005-09-30 Akim Demaille <akim@epita.fr>,
377 Alexandre Duret-Lutz <adl@gnu.org>
378
379 Move the token type and YYSTYPE in the parser class.
380 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
381 (parser::token): New, from the moved free definition of tokens.
382 (parser::semantic_value): Now a full definition instead of an
383 indirection to YYSTYPE.
384 (b4_post_prologue): No longer included in the header file, but
385 in the implementation file.
386 * doc/bison.texi (C+ Language Interface): Update.
387 * src/parse-gram.y: Support unary %define.
388 * tests/actions.at: Define global_tokens_and_yystype for backward
389 compatibility until we update the tests.
390 * tests/calc.at: Idem.
391 (first_line, first_column, last_line, last_column): Define for lalr1.cc
392 to simplify the code.
393
394 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
395
396 Port to SunOS 4.1.4, which lacks strtoul and strerror.
397 Ah, the good old days! Problem reported by Peter Klein.
398 * bootstrap (gnulib_modules): Add strerror, strtoul.
399 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
400 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
401
402 2005-09-29 Akim Demaille <akim@epita.fr>
403
404 * data/c.m4 (b4_error_verbose_if): New.
405 * data/lalr1.cc: Use it.
406 (YYERROR_VERBOSE_IF): Remove.
407 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
408 parser members, replaced by...
409 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
410 local variables.
411 (yysyntax_error_): Takes the state number as argument.
412 (yyreduce_print_): Use the argument yyrule, not the former
413 attribute yyn_.
414
415 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
416
417 * bootstrap (gnulib_modules): Add verify.
418 * lib/.cvsignore: Add verify.h.
419 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
420 * src/system.h (verify): Remove.
421 Include verify.h instead.
422 * src/tables.c (tables_generate): Use new API for 'verify'.
423
424 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
425
426 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
427 local variables whose names begin with 'yy'.
428 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
429 Trivial changes from Joel E. Denny.
430
431 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
432 it itself.
433 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
434 don't use alloca any more.
435
436 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
437 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
438 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
439 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
440 to match yacc.c, to test more hosts.
441
442 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
443
444 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
445 doesn't affect behavior.
446 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
447 Solaris, AIX, MSC.
448 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
449 This works a bit better with glibc, if user code has already included
450 stdlib.h.
451 * doc/bison.texinfo (Bison Parser): Document that users can't
452 arbitrarily use malloc and free for other purposes. Document
453 that <alloca.h> and <malloc.h> might be included.
454 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
455 user must declare alloca.
456
457 * HACKING (release): Forwarn the Translation Project about
458 stable releses.
459
460 2005-09-20 Akim Demaille <akim@epita.fr>
461
462 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
463
464 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
465
466 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
467 (YYSTACK_ALLOC_MAXIMUM): Use it.
468 (yysyntax_error): New function.
469 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
470 multiple syntax errors are reported, and alloca is being used.
471 Instead, reallocate buffers twice as big each time, so that
472 we waste at most half the allocated memory. Start with a small
473 (128-byte) buffer that will suffice in most cases anyway.
474 Use yysyntax_error to do most of the work.
475
476 * doc/bison.texinfo (Error Reporting, Table of Symbols):
477 yynerrs is the number of errors reported, not the number of
478 errors encountered.
479
480 * tests/glr-regression.at (Duplicated user destructor for lookahead):
481 Mark it as expected to fail.
482 Cast result of malloc; problem reported by twlevo@xs4all.nl.
483 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
484 Don't start user-code symbols with "yy", to avoid name space problems.
485
486 2005-09-19 Akim Demaille <akim@epita.fr>
487
488 Remove the traits, failed experiment.
489 It never proved useful, and anyway because of the current
490 definition, it was not possible to have several specialization of
491 this traits, making it useless.
492 * data/lalr1.cc (yy:traits): Remove.
493 Inline its definitions in the parser class.
494
495 2005-09-19 Akim Demaille <akim@epita.fr>
496
497 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
498 least Mac OSX with a /usr/local install of gettext.
499
500 2005-09-19 Akim Demaille <akim@epita.fr>
501
502 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
503 and yytoken for similarity with the other skeletons.
504
505 2005-09-19 Akim Demaille <akim@epita.fr>
506
507 * NEWS, configure.ac: Bump to 2.1a.
508
509 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
510
511 * NEWS: Version 2.1.
512
513 * NEWS: Remove notice of yytname change, since it was never in an
514 official release.
515 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
516 diagnostic.
517 * src/output.c (prepare): Likewise.
518 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
519 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
520 is not defined. This is an awful hack, but it's enough for now.
521 All callers changed.
522 * tests/glr-regression-at (make_value): Args are const pointers now,
523 to avoid GCC warning.
524 (Duplicated user destructor for lookahead): New test. Currently
525 skipped. It fails on my host but I'm not sure it'll always fail.
526
527 2005-09-16 Akim Demaille <akim@epita.fr>
528
529 * src/symtab.h (struct symbol): Declare the printer and destructor
530 as const, to avoid accidental calls to free.
531 (symbol_destructor_set, symbol_printer_set): Adjust.
532 * src/symtab.c: Adjust.
533
534 2005-09-16 Akim Demaille <akim@epita.fr>
535
536 * data/c.m4 (b4_token_enums): New.
537 (b4_token_defines): Rename as...
538 (b4_token_enums_defines): this.
539 (b4_token_defines): New, output only the #defines.
540 * data/yacc.c, data/glr.c: Adjust.
541 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
542 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
543 as default values.
544
545 2005-09-16 Akim Demaille <akim@epita.fr>
546
547 * data/lalr1.cc (yylex_): Remove, inline its code.
548 (yyreport_syntax_error_): Remove, replaced by...
549 (yysyntax_error_): this which returns a string and leaves to the
550 caller the call to the users' error function.
551 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
552 Move from members of the parser object...
553 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
554 to local variables of the parse function.
555
556 2005-09-16 Akim Demaille <akim@epita.fr>
557
558 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
559 since it's in Bison's name space.
560
561 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
562
563 * data/glr.c (yyresolveValue): Add default case to pacify
564 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
565
566 * NEWS: Document when yyparse started to return 2.
567 * doc/bison.texinfo (Parser Function): Document when yyparse
568 returns 2.
569
570 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
571 (b4_filename_type): Renamed back from b4_file_name_type. All uses
572 changed.
573 (class position): file_name -> filename (reverting). All uses changed.
574
575 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
576
577 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
578 do anything if $@ exists. This reverts part of the 2005-07-07
579 patch.
580
581 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
582
583 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
584 contains obsolete information and isn't worth distributing as a
585 separate file anyway.
586 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
587 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
588 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
589 (yyparse): Abort if user code uses longjmp to throw an unexpected
590 value.
591
592 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
593
594 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
595 Suggested by twlevo@xs4all.nl.
596
597 * data/glr.c (YYCHK1): Do not assume YYE is in range.
598 This avoids a diagnostic from gcc -Wswitch-enum.
599 Problem reported by twlevo@xs4all.nl.
600
601 * doc/bison.texinfo: Don't use "filename", as per GNU coding
602 standards. Use "file name" or "file" or "name", depending on
603 the context.
604 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
605 not to hack/foo.tab.c.
606 (Calc++ Top Level): 2nd arg of main is not const.
607 * data/glr.c: b4_filename -> b4_file_name.
608 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
609 All uses changed.
610 (class position): filename -> file_name. All uses changed.
611 * data/yacc.c: b4_filename -> b4_file_name.
612 * lib/bitset.h: filename -> file_name in local vars.
613 * lib/bitset_stats.c: Likewise.
614 * src/files.c: Likewise.
615 * src/scan-skel.l ("@output ".*\n): Likewise.
616 * src/files.c (file_name_split): Renamed from filename_split.
617 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
618
619 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
620
621 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
622 to accommodate latest gnulib.
623
624 * tests/glr-regression.at (Duplicate representation of merged trees):
625 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
626
627 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
628 needed.
629
630 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
631
632 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
633 All uses changed. Invoke user destructor after an error during a
634 split parse (trivial change from Joel E. Denny).
635
636 * tests/glr-regression.at
637 (User destructor after an error during a split parse): New test case.
638 Problem reported by Joel E. Denny in:
639 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
640
641 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
642
643 * README-cvs: Give URLs for recommended tools.
644 Mention Gzip version problem, and bootstrapping issues.
645 Remove troubleshooting section, as it's somewhat obsolete.
646
647 * bootstrap (no_cache): New var, to accommodate different wget
648 variants. Use it instead of '-C off'. Problem reported by
649 twlevo@xs4all.nl.
650
651 * data/glr.c (yydestroyStackItem): New function.
652 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
653 debugging information. Problem reported by Joel E. Denny.
654
655 2005-08-25 Akim Demaille <akim@epita.fr>
656
657 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
658
659 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
660
661 * data/glr.c (yyrecoverSyntaxError, yyreturn):
662 Don't invoke destructor on unresolved entries.
663 * tests/glr-regression.at
664 (User destructor for unresolved GLR semantic value): New test case.
665 Problem reported by Joel E. Denny in:
666 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
667
668 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
669
670 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
671 Add strnlen.c.
672 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
673 lib-prefix.m4, po.m4.
674
675 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
676 in yydestruct diagnostic, since it might not be an error.
677 Problem reported by Joel Denny near end of
678 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
679 * data/lalr1.cc (yyerturn): Likewise.
680 * data/yacc.c (yyreturn): Likewise.
681 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
682
683 * src/files.c: Remove obsolete FIXME comment.
684
685 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
686 with the other templates, and to fix bogus run-on messages such
687 as the one reported at the end of
688 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
689 All callers changed to avoid the newline.
690 (yyprocessOneStack): Output two lines rather than one, to accommodate
691 the above change. This changes the debug output format slightly.
692
693 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
694 reported by Joel E. Denny in
695 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
696 (trivial change).
697 * tests/glr-regression.at (Duplicate representation of merged trees):
698 New test, from Joel E. Denny in:
699 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
700 * THANKS: Add Joel E. Denny.
701
702 * configure.ac (AC_INIT): Bump to 2.0c.
703
704 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
705
706 * NEWS: Version 2.0b.
707
708 * Makefile.am (SUBDIRS): Put examples before tests, so that
709 "make check" doesn't finish with "All 1 tests passed".
710
711 * tests/regression.at (Token definitions): Don't rely on
712 AT_PARSER_CHECK for data that contains backslashes. It currently
713 uses 'echo', and 'echo' isn't portable if its argument contains
714 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
715 that the byte '\0xff' is not printable in the C locale; it is,
716 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
717 not printable, so use '\0x81' to test.
718
719 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
720 version of GCC, since the macro is used with non-GCC compilers.
721
722 Fix core dump reported by Pablo De Napoli in
723 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
724 * tests/regression.at (Invalid inputs with {}): New test.
725 * src/parse-gram.y (token_name): Translate type before using
726 it as an index.
727
728 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
729 the user's name space. All uses changed to __attribute__
730 ((__unused__)).
731 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
732 Add __attribute__ ((__noreturn__)).
733
734 * etc/clcommit: Remove. We weren't using it, and it failed
735 "make maintainer-distcheck".
736 * Makefile.maint: Merge from coreutils.
737 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
738 (syntax-check-rules): Change list of rules as described below.
739 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
740 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
741 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
742 (sc_trailing_space): New rules.
743 (sc_xalloc_h_in_src): Remove.
744 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
745 (sc_space_tab, sc_error_exit_success, sc_changelog):
746 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
747 (makefile-check, po-check, author_mark_check):
748 (makefile_path_separator_check, copyright-check):
749 Use grep -n, to make it easier to find violations.
750 Use CVS_LIST and CVS_LIST_EXCEPT.
751 (header_regexp, h_re): Remove.
752 (dd_c): New macro.
753 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
754 (my-distcheck): Use more-modern GCC flags.
755 (signatures, %.asc): Remove.
756 (rel-files, announcement): Remove signatures.
757 Restore old updating code, even though we don't use it, so
758 that we're the same as coreutils.
759 (alpha, beta, major): Depend on news-date-check.
760 Make the upload commands.
761
762 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
763 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
764 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
765 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
766 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
767 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
768 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
769 * tests/sets.at: Likewise.
770
771 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
772 we comment out the Autoconf version number.
773 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
774 it's error-prone and "make maintainer-distcheck" rejects it.
775
776 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
777 Indent calls to "error" to pacify "make maintainer-distcheck",
778 when the calls are not intended to be translated.
779 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
780
781 * src/Makefile.am (DEFS): Use +=, to pacify
782 "make maintainer-distcheck".
783 (bison_SOURCES): Add scan-skel.h.
784 (sc_tight_scope): New rule, from coreutils.
785
786 * src/files.c (src_extension, header_extension):
787 Now static, not extern.
788 * src/getargs.c (short_options): Likewise.
789 * src/muscle_tab.c (muscle_table): Likewise.
790 * src/parse-gram.y (current_class, current_type, current_prec):
791 Likewise.
792 * src/reader.c (grammar_end, previous_rule_end): Likewise.
793 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
794 * src/main.c (main): Cast bindtextdomain and textdomain calls to
795 void, to avoid warning when NLS is disabled.
796 * src/output.c: Include scan-skel.h.
797 (scan_skel): Remove decl, since scan-skel.h does this.
798 (output_skeleton):
799 Indent calls to "error" to pacify "make maintainer-distcheck".
800 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
801 * src/reader.h (gram_end, gram_lineno): New decls to pacify
802 "make maintainer-distcheck".
803 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
804 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
805 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
806 (skel_lex_destroy, scan_skel): Move these decls to...
807 * src/scan-skel.h: New file.
808 * src/uniqstr.c (uniqstr_assert):
809 Indent calls to "error" to pacify "make maintainer-distcheck".
810
811 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
812 not @VAR@.
813
814 * tests/torture.at: Revamp to avoid misuse of atoi that
815 "make maintainer-distcheck" complained about.
816
817 * examples/extexi (message): Don't print a message more than once,
818 and omit line-number decoration that makes Emacs compile think
819 that informative messages are worth worrying about.
820
821 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
822
823 * configure.ac: Update version number.
824
825 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
826 accidentally.
827 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
828 autogenerated by the maintainer.
829 * examples/calc++/.cvsignore: Add *.yy.
830
831 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
832 * lib/bitset_stats.c (bitset_stats_init): Likewise.
833 * lib/bitsetv.c (bitsetv_alloc): Likewise.
834
835 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
836
837 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
838 from maintainer-distcheck about casting the argument of 'free'.
839
840 * NEWS: Mention recent yytname changes.
841 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
842
843 * bootstrap: For translations that have not yet been upgraded to
844 the new runtime-po domain, prime the pump by extracting the
845 relevant strings from the obsolete translations. This code can be
846 removed once the bison-runtime domain has been translated by each
847 team.
848
849 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
850 now that token names are already quoted.
851
852 Fix problem reported by Anthony Heading.
853 * data/glr.c (YYTOKEN_TABLE): New macro.
854 (yytname): Define if YYTOKEN_TABLE.
855 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
856 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
857 (YYERROR_VERBOSE): Define the same way the other skeletons do.
858 * src/output.c (prepare_symbols): Output token_table_flag.
859
860 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
861
862 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
863 again if the first call fails.
864
865 * data/glr.c (yytnamerr): New function.
866 (yyreportSyntaxError): Use it to dequote most string literals.
867 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
868 with other skeletons. All uses changed.
869 (yytnameerr_): New function.
870 (yyreport_syntax_error): Use it to dequote most string literals.
871 * data/yacc.c (yytnamerr): New function.
872 (yyerrlab): Use it to decode most string literals.
873 * doc/bison.texinfo (Decl Summary, Calling Convention):
874 Clarify quoting convention of yytname.
875 * src/output.c (prepare_symbols): Quote all names. This undoes
876 the 2005-04-17 change, which is now accomplished (mostly) via
877 changes in the parsers as described above.
878 * tests/regression.at (Token definitions, Web2c Actions):
879 Undo most 2005-04-17 change here, too.
880
881 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
882
883 Fix more problems reported by twlevo@xs4all.nl.
884 * tests/cxx-type.at: Don't pipe output of ./types through sed to
885 remove trailing spaces. This loses the exit status of ./types,
886 and isn't needed since ./types shouldn't be emitting trailing
887 spaces.
888 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
889 as the stack isn't valid in that case.
890
891 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
892 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
893 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
894 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
895 is used.
896 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
897 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
898 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
899 Likewise.
900
901 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
902 overly-picky compilers that reject 'char *foo = "bar";'.
903
904 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
905 to FILE * parameter, not to stderr. This fixes a typo introduced
906 in the 2005-07-12 change.
907
908 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
909 warnings from GCC 4.
910
911 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
912 (yyglrShiftDefer, yysplitStack):
913 Remove unused parameters b4_pure_formals. All uses changed.
914 (yyglrShift): Remove unused parameters b4_user_formals.
915 All uses changed.
916 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
917
918 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
919
920 Destructor cleanups and regularization among the three skeletons.
921 * NEWS: Document the behavior changes.
922 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
923 stack before failing, as the cleanup code will do it for us now.
924 * data/lalr1.cc (yyerrlab): Likewise.
925 * data/glr.c (yyparse): Pop everything off the stack before
926 freeing it, so that destructors get called properly.
927 * data/lalr1.cc (yyreturn): Likewise.
928 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
929 This is more consistent.
930 * doc/bison.texinfo (Destructor Decl): Mention more reasons
931 why destructors might be called. 1.875 -> 2.1.
932 (Destructor Decl, Decl Summary, Table of Symbols):
933 Some English-language cleanups for %destructor.
934 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
935 Add output line for destructor of start symbol.
936 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
937 because of that same extra output line.
938
939 * NEWS: Document minor wording changes in diagnostics of
940 Bison-generated parsers.
941 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
942 Remove unused formals. All uses changed.
943 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
944 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
945 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
946 Rename yyoverflowab to yyexhaustedlab.
947 When memory exhaustion occurs during syntax-error reporting,
948 report it separately rather than in a single diagnostic; this
949 eases translation.
950 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
951 (Memory Exhausted): Renamed from Parser Stack Overflow.
952 Revamp wording slightly to prefer "memory exhaustion".
953 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
954
955 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
956
957 Add i18n support to the GLR skeleton. Partially fix the C++
958 skeleton; a C++ expert needs to finish this. Remove debugging
959 msgids; there's little point to having them translated, since they
960 can be understood only by someone who can read the
961 (English-language) source code.
962
963 Generate runtime-po/bison-runtime.pot automatically, so that we
964 don't have to worry about garbage getting in that file. We'll
965 make sure after the next official release that old msgids don't
966 get lost. See
967 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
968
969 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
970 Now auto-generated.
971 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
972 Fix typos in explanations of the runtime file.
973 * bootstrap: Change gettext keyword from YYI18N to YY_.
974 Use standard Makefile.in.in in runtime-po, since we'll arrange
975 for backward-compatible bison-runtime.po files in a different way.
976 * data/glr.c (YY_): New macro, from yacc.c.
977 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
978 Translate messages intended for users.
979 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
980 the wording in the other skeletons. We don't know that the memory
981 is virtual.
982 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
983 Use same method that yacc.c uses.
984 Don't translate debugging messages.
985 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
986 it doesn't work (yet), and requires C++ expertise to fix.
987 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
988 Move defn to a more logical place, to be consistent with other
989 skeletons.
990 Don't translate debugging messages.
991 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
992 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
993 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
994 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
995
996 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
997 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
998 void, not int.
999 * tests/glr-regression.at (Badly Collapsed GLR States):
1000 Likewise.
1001 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
1002 yylex should return 0 at EOF rather than aborting.
1003
1004 Improve tests for stack overflow in GLR parser.
1005 Problem reported by twlevo@xs4all.nl.
1006 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
1007 All uses removed.
1008 (yyStackOverflow): Just longjmp, but with value 2 so that caller
1009 can handle the problem.
1010 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
1011 (yyparse): New local variable yyresult to record the result.
1012 Use result of setjmp to set it, rather than storing itinto
1013 struct.
1014 (yyDone): Remove label.
1015 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
1016 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
1017 if YYABORT is used).
1018 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
1019 yyparse status; put status > 1 into diagnostic.
1020 Check that status==2 works.
1021 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
1022 Use exit status 3 for failure to open (which shouldn't happen).
1023
1024 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
1025
1026 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
1027 1 on syntax error; just let yyparse do its thing.
1028 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
1029 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
1030 (Exploding the Stack Size with Alloca):
1031 (Exploding the Stack Size with Malloc):
1032 Expect exit status 2, not 1, since the parser is supposed to blow
1033 its stack. Problem reported by twlevo@xs4all.nl.
1034
1035 * data/glr.c (yyparse): Don't assume that the initial calls
1036 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
1037 Print a stack-overflow message and fail instead.
1038 Initialize the line-number information before creating the stack,
1039 so that the stack-overflow message can report line zero safely.
1040
1041 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
1042
1043 Fix problems reported by twlevo@xs4all.nl.
1044 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
1045 (yyuserMerge): Provide a default case if b4_mergers is empty.
1046 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
1047 * tests/glr-regression.at
1048 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
1049 Add casts to pacify C++ compilers.
1050 * tests/glr-regression.at (Improper merging of GLR delayed action
1051 sets): Declare yylex before using it.
1052 * tests/Makefile.am (maintainer-check-g++): Fix a stray
1053 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
1054 test for valgrind; valgrind is independent of g++.
1055 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
1056 for compatibility with POSIX 1003.1-2001 (if running coreutils).
1057 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
1058 Use a destructor, so that we can expand the stack. Change
1059 YYSTYPE to char * so that we can free it. Cast result of malloc.
1060
1061 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
1062
1063 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
1064 a valgrind failure. Problem reported by twlevo@xs4all.nl.
1065
1066 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
1067
1068 * PACKAGING: New file, suggested by Bruno Haible and taken from
1069 similar wording in gettext's PACKAGING file.
1070 * NEWS: Mention PACKAGING.
1071 * Makefile.am (EXTRA_DIST): Add PACKAGING.
1072
1073 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
1074
1075 * NEWS: Document recent i18n improvements.
1076 * bootstrap: Get runtime translations into runtime-po.
1077 Create runtime-po files automatically, if possible.
1078 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
1079 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
1080 does not infringe on the user's name space.
1081 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
1082 * doc/bison.texinfo (Internationalization): Revamp the English
1083 and Texinfo syntax a bit, to try to make it clearer.
1084 (Bison Options, Option Cross Key): Mention --print-localedir.
1085 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
1086 YYENABLE_NLS. Quote a bit more.
1087 * runtime-po/.cvsignore: New file.
1088 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
1089 * runtime-po/Rules-quot: Remove; now created by bootstrap.
1090 * runtime-po/quot.sed: Likewise.
1091 * runtime-po/boldquot.sed: Likewise.
1092 * runtime-po/en@quot.header: Likewise.
1093 * runtime-po/en@boldquot.header: Likewise.
1094 * runtime-po/insert-header.sin: Likewise.
1095 * runtime-po/remove-potcdate.sin: Likewise.
1096 * runtime-po/Makevars: Likewise.
1097 * runtime-po/LINGUAS: Likewise.
1098 * runtime-po/de.po: Likewise; we will rely on the translation project
1099 to maintain this, so "bootstrap" should get it.
1100 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
1101 its value.
1102 * src/main.c (main): Bind the bison-runtime domain, too.
1103
1104 2005-07-12 Bruno Haible <bruno@clisp.org>
1105
1106 * data/yacc.c: Include <libintl.h> when NLS is enabled.
1107 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
1108 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
1109 * runtime-po: New directory.
1110 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
1111 $(DOMAIN).pot-update rule, so that old messages are never dropped.
1112 * runtime-po/Rules-quot: New file, copied from po/.
1113 * runtime-po/quot.sed: Likewise.
1114 * runtime-po/boldquot.sed: Likewise.
1115 * runtime-po/en@quot.header: Likewise.
1116 * runtime-po/en@boldquot.header: Likewise.
1117 * runtime-po/insert-header.sin: Likewise.
1118 * runtime-po/remove-potcdate.sin: Likewise.
1119 * runtime-po/Makevars: New file.
1120 * runtime-po/POTFILES.in: New file.
1121 * runtime-po/LINGUAS: New file.
1122 * runtime-po/bison-runtime.pot: New file.
1123 * runtime-po/de.po: New file.
1124 * m4/bison.m4: New file.
1125 * Makefile.am (SUBDIRS): Add runtime-po.
1126 (aclocaldir, aclocal_DATA): New variables.
1127 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
1128 Define aclocaldir.
1129 * src/getargs.c (usage): Document --print-localedir option.
1130 (PRINT_LOCALEDIR_OPTION): New enum item.
1131 (long_options): Add --print-localedir option.
1132 (getargs): Handle --print-localedir option.
1133 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
1134 (Internationalization): New section.
1135
1136 2005-07-12 Akim Demaille <akim@epita.fr>
1137
1138 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
1139 for consistency with the rest of the code.
1140 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
1141 Add separators.
1142
1143 2005-07-12 Akim Demaille <akim@epita.fr>
1144
1145 * src/parse-gram.y: Use %printer instead of YYPRINT.
1146
1147 2005-07-12 Akim Demaille <akim@epita.fr>
1148
1149 * src/symtab.h, src/symtab.c (symbol_print): New.
1150 * src/symlist.h, src/symlist.c (symbol_list_print): New.
1151 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
1152
1153 2005-07-12 Akim Demaille <akim@epita.fr>
1154
1155 * data/glr.c (b4_syncline): Fix (swap) the definitions of
1156 b4_at_dollar and b4_dollar_dollar.
1157
1158 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
1159
1160 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
1161 and Pennello's paper.
1162
1163 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
1164
1165 * data/yacc.c (yyparse): Undo previous patch. Instead,
1166 set yylsp[0] and yyvsp[0] only if the initial action
1167 sets yylloc and yylval, respectively.
1168
1169 * data/yacc.c (yyparse): In the initial action, set
1170 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
1171 This avoids the use of undefined variables if the initial
1172 action does not set yylloc and/or yylval.
1173
1174 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
1175
1176 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
1177 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
1178 Remove from CVS. These files are automatically generated.
1179 * examples/extexi: Clarify that this file is now part of Bison,
1180 not GNU M4, and that it works with any POSIX-compatible Awk.
1181 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
1182 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
1183 so that we also get calc++-parser.yy. Geneate it.
1184 Use $(AWK), not gawk, since any conforming Awk will do.
1185 Put comment before action, since older 'make' can't handle comment
1186 in action.
1187 $(BUILT_SOURCES): List all built sources, not just some of them.
1188 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
1189 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
1190 $($(calc_sources_generated)): Remove unnecessary test for existence
1191 of target. (This had a shell syntax error anyway; a stray "x".)
1192 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
1193 calc++-parser.yy.
1194 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
1195
1196 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
1197 implied by the other modules.
1198
1199 2005-07-06 Akim Demaille <akim@epita.fr>
1200
1201 Bind examples/calc++ to the package.
1202 * examples/calc++/Makefile: Remove, replaced by...
1203 * examples/calc++/Makefile.am: ... this new file.
1204 * examples/calc++/test: Remove input.
1205 * examples/calc++/compile: Remove.
1206 * examples/Makefile.am: New.
1207 * configure.ac, Makefile.am: Adjust.
1208 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
1209
1210 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
1211
1212 * data/glr.c (yyFail): Drastically simplify; since the format argument
1213 never had any % directives, we can simply pass it to yyerror.
1214 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
1215 be modified later, as that is the usual style in glr.c.
1216 Problems reported by Paul Hilfinger.
1217
1218 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
1219 and size overflow errors.
1220 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
1221 in case the user prolog sets feature-test macros like _GNU_SOURCE.
1222 (YYSIZEMAX): New macro.
1223 (yystpcpy): New function, taken from yacc.c.
1224 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
1225 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
1226 so that we don't have to maintain their signatures.
1227 (yyFail): Check for buffer overflow, by using vsnprintf rather
1228 than vsprintf. Allocate a bigger buffer if possible.
1229 Report an error if buffer allocation fails.
1230 (yyStackOverflow): New function.
1231 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
1232 the initialization was successful. It might fail if storage was
1233 exhausted.
1234 (yyexpandGLRStack): Add more checks for storage allocation failure.
1235 Use yyStackOverflow to report failures.
1236 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
1237 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
1238 Don't assume stack number fits in int.
1239 (yysplitStack): Check for storage allocation failure.
1240 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
1241 can print diagnostics on storage allocation failure. All callers
1242 changed.
1243 (yyresolveValue): Use yybool for boolean.
1244 (yyreportSyntaxError): Check for size-calculation overflow.
1245 This code is taken from yacc.c.
1246 (yyparse): Check for storage allocation errors when allocating
1247 the initial stack.
1248
1249 2005-07-05 Akim Demaille <akim@epita.fr>
1250
1251 Extract calc++ from the documentation.
1252 * doc/bison.texinfo (Calc++): Add the extraction marks.
1253 * examples/extexi: New, from the aborted GNU Programming 2E.
1254 Separate the different paragraph of a file with empty lines.
1255 * examples/Makefile: Use it to extract the whole calc++ example.
1256
1257 2005-06-24 Akim Demaille <akim@epita.fr>
1258
1259 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
1260 class typedefs.
1261
1262 2005-06-22 Akim Demaille <akim@epita.fr>
1263
1264 * doc/bison.texinfo (C++ Language Interface): First stab.
1265 (C++ Parsers): Remove.
1266
1267 2005-06-22 Akim Demaille <akim@epita.fr>
1268
1269 * data/lalr1.cc (yylex_): Honor %lex-param.
1270
1271 2005-06-22 Akim Demaille <akim@epita.fr>
1272
1273 Start a set of simple examples.
1274 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
1275 * examples/calc++/calc++-driver.hh,
1276 * examples/calc++/calc++-parser.yy,
1277 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
1278 * examples/calc++/compile, examples/calc++/test: New.
1279
1280 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
1281
1282 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
1283 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
1284 which stems from the 2005-05-27 patch.
1285
1286 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
1287
1288 * data/glr.c: Modify treatment of unused parameters to permit use
1289 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
1290
1291 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
1292
1293 Fix infringement on user name space reported by Janos Zoltan Szabo.
1294 * data/yacc.c (yyparse): strlen -> yystrlen.
1295
1296 2005-05-30 Akim Demaille <akim@epita.fr>
1297
1298 * data/lalr1.cc (_): New.
1299 Translate the various messages.
1300
1301 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
1302
1303 Fix infringement on user name space reported by Bruno Haible.
1304 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
1305 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
1306 the user's name space.
1307 (alloca): Include <stdlib.h> to get it, if it's not built in.
1308 (YYMALLOC, YYFREE): Define only if needed.
1309 (malloc, free): Declare, but only if needed, as this infringes on
1310 the user name space.
1311
1312 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
1313
1314 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
1315 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
1316 with %d format.
1317 * lib/ebitset.c (min, max): Undef before defining.
1318 * lib/vbitset.c (min, max): Likewise.
1319 * lib/subpipe.c (create_subpipe): Save local variables in case
1320 vfork clobbers them.
1321
1322 2005-05-24 Bruno Haible <bruno@clisp.org>
1323
1324 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
1325 error message syntax used by gcc-4.0.
1326
1327 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
1328
1329 * README: Mention m4 1.4.3. Remove obsolete advice about
1330 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
1331
1332 * bootstrap: Remove workaround for problem I encountered with
1333 gettext 0.14.1; it seems to be fixed now.
1334
1335 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
1336
1337 * NEWS: Version 2.0a.
1338
1339 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
1340 the previous change.
1341
1342 Various maintainer cleanups.
1343 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
1344 conftest*, for benefit of CVS commands run at the same time as
1345 "configure". Add build-aux, since "bootstrap" now creates it and
1346 its subfiles.
1347 * Makefile.cfg (move_if_change): Remove.
1348 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
1349 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
1350 (po_repo, do-po-update, po-update, wget_files, get-targets):
1351 (config.guess-url_prefix, config.sub-url_prefix):
1352 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
1353 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
1354 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
1355 Remove.
1356 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
1357 this is now the recommended name.
1358 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
1359 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
1360 ylwrap. These files now go into build-aux.
1361 * config/move-if-change: Remove.
1362 * config/prev-version.txt: Bump from 1.75 to 2.0.
1363
1364 * bootstrap: Add stdio-safer, unistd-safer modules.
1365 Remove m4/glibc2.m4 (introduced by latest gnulib, but
1366 we don't need it).
1367 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
1368 fopen-safer.c, stdio-safer.h, unistd-safer.h.
1369 * lib/subpipe.c: Include "unistd-safer.h".
1370 (create_subpipe): Make sure all the newly-created
1371 file descriptors are > 2, so that diagnostics don't
1372 get sent down them (which might cause Bison to hang, in theory).
1373 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
1374 * src/files.c (xfopen): Use fopen_safer, not fopen.
1375
1376 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
1377 yesterday's yacc.c fix.
1378
1379 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
1380
1381 * data/glr.c, data/lalr1.cc: Update copyright date.
1382
1383 Fix a destructor bug reported by Wolfgang Spraul in
1384 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
1385 * data/yacc.c (yyabortlab): Don't call destructor, and
1386 don't set yychar to EMPTY.
1387 (yyoverflowlab): Don't call destructor.
1388 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
1389 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
1390 since we no longer output the message "discarding lookahead token
1391 end of input ()".
1392
1393 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
1394
1395 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
1396 fix a small glitch in debugging output.
1397 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
1398 after YY_SYMBOL_PRINT where needed.
1399
1400 (struct yyGLRState): Add some comments.
1401 (struct yySemanticOption): Add some comments.
1402 (union yyGLRStackItem): Add comment.
1403
1404 (yymergeOptionSets): Correct this to properly perform the union,
1405 avoiding infinite reported by Michael Rosien.
1406 Update comment.
1407
1408 * tests/glr-regression.at: Add test for GLR merging error reported
1409 by M. Rosien.
1410
1411 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
1412
1413 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
1414 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
1415 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
1416 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
1417 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
1418 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
1419 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
1420 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
1421 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
1422 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
1423 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
1424 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
1425 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
1426 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
1427 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
1428 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
1429 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
1430 src/derives.h, src/files.c, src/files.h, src/getargs.c,
1431 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
1432 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
1433 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
1434 src/output.h, src/parse-gram.c, src/parse-gram.h,
1435 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
1436 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
1437 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
1438 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
1439 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
1440 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
1441 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
1442 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
1443 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
1444 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
1445 tests/reduce.at, tests/regression.at, tests/sets.at,
1446 tests/synclines.at, tests/testsuite.at, tests/torture.at:
1447 Update FSF postal mail address.
1448
1449 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
1450
1451 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
1452 Problem reported by Ralf Menzel.
1453
1454 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
1455
1456 * tests/actions.at: Test that stack overflow invokes destructors.
1457 From Marcus Holland-Moritz.
1458 * data/yacc.c (yyerrlab): Move the code that destroys the stack
1459 from here....
1460 (yyreturn): to here. That way, destructors are called properly
1461 even if the stack overflows, or the user calls YYACCEPT or
1462 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
1463 (yyoverflowlab): Destroy the lookahead.
1464
1465 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
1466
1467 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
1468
1469 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
1470
1471 * NEWS: Bison-generated C parsers no longer quote literal strings
1472 associated with tokens.
1473 * src/output.c (prepare_symbols): Don't escape strings,
1474 since users don't want to see C escapes.
1475 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
1476 in diagnostics.
1477 * tests/input.at (Torturing the Scanner): Likewise.
1478 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
1479
1480 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
1481
1482 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
1483 the data size is known to be too small and we can't increase it.
1484 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
1485
1486 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
1487
1488 * src/parse-gram.y: Include quotearg.h.
1489 (string_as_id): Quote $1 before using it as a key, since the
1490 lexer no longer quotes it for us.
1491 (string_content): Don't strip quotes, since lexer no longer
1492 quotes it for us.
1493 * src/scan-gram.l: Include quotearg.h.
1494 ("\""): Omit quote.
1495 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
1496 a key, since the rest of the lexer doesn't quote it.
1497 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
1498 * tests/regression.at (Token definitions): Check for backslashes
1499 in token strings.
1500
1501 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
1502 (YYSIZE_T): Define to unsigned long int when using an older compiler.
1503 (yyparse): Revamp code to generate long syntax error message, to
1504 make it easier to translate, and to avoid problems with arithmetic
1505 overflow. Change "virtual memory" to "memory" in diagnostic, since
1506 we don't know whether the memory is virtual.
1507
1508 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
1509
1510 * NEWS: Bison-generated C parsers now use the _ macro to
1511 translate strings.
1512 * data/yacc.c (_) [!defined _]: New macro.
1513 All English strings wrapped inside this macro.
1514 * doc/bison.texinfo (Bison Parser): Document _.
1515 * po/POTFILES.in: Include src/parse-gram.c, since it now
1516 includes translateable strings that parse-gram.y doesn't.
1517
1518 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
1519
1520 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
1521 reverting the 2004-10-11 change to this function.
1522 (symbol_check_alias_consistency): Don't call symbol_type_set
1523 if the type name is already correct.
1524 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
1525
1526 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
1527
1528 * tests/regression.at (Token definitions): Don't use a token named
1529 c, as that generates a "#define c ..." that runs afoul of buggy
1530 stdlib.h that uses the identifier c as a member of struct
1531 drand48_data. Problem reported by Horst Wente.
1532
1533 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
1534
1535 * bootstrap: Change translation URL from
1536 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
1537 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
1538 redirection glitches. Problem reported by twlevo@xs4all.nl.
1539
1540 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
1541
1542 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
1543 after operands; POSIX says this isn't portable for the c99 command.
1544
1545 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
1546
1547 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
1548 immediately if a data overrun has occurred; this may help us track
1549 down what may be a spurious failure on MacOS.
1550
1551 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
1552
1553 Respond to problems reported by twlevo@xs4all.nl.
1554
1555 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
1556
1557 * src/vcg.h: Comment fix.
1558 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
1559 (G_CMAX): Change to -1 instead of INT_MAX.
1560
1561 * data/yacc.c (yyparse): Omit spaces before #line.
1562
1563 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
1564
1565 * src/tables.c (state_number_to_vector_number): Put it inside an
1566 "#if 0", since it's not currently used. Problem reported by
1567 Roland McGrath.
1568
1569 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
1570
1571 * src/output.c (escaped_output): Renamed from
1572 escaped_file_name_output, since we now use it for symbol tags as
1573 well. All uses changed.
1574 (symbol_destructors_output, symbol_printers_output):
1575 Escape symbol tags too.
1576 Problem reported by Matyas Forstner in
1577 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
1578
1579 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
1580 not needed.
1581 * src/output.c (user_actions_output, token_definitions_output,
1582 symbol_destructors_output, symbol_printers_output): Likewise.
1583 * src/reader.c (prologue_augment): Likewise.
1584 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
1585
1586 * src/vcg.c (output_edge): Don't quote linestyle arg.
1587 Problem reported by twlevo@xs4all.nl.
1588
1589 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
1590
1591 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
1592 example, reported by Derek M Jones. Also, make the example even
1593 more outrageous, to better illustrate how bad the problem is.
1594
1595 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
1596
1597 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
1598 putsym. Typo reported by Sebastian Piping.
1599
1600 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
1601
1602 * doc/bison.texinfo (Language and Grammar): some -> same
1603 (Epilogue): int he -> in the
1604 Typos reported by Sebastian Piping via Justin Pence.
1605
1606 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
1607
1608 * tests/glr-regression.at (Improper handling of embedded actions
1609 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
1610 embedded actions and $-N in GLR parsers", work around an Autoconf bug
1611 with dollar signs in test names.
1612 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
1613 for a similar reason.
1614
1615 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
1616
1617 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
1618 wants to redefine G_VIEW.
1619
1620 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
1621
1622 * src/vcg.c (get_view_str): Remove case for normal_view.
1623 Problem reported by twlevo@xs4all.nl.
1624
1625 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
1626
1627 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
1628 Problem reported by twlevo@xs4all.nl.
1629
1630 * doc/bison.texinfo: Change @dircategory from "GNU programming
1631 tools" to "Software development". Requested by Richard Stallman
1632 via Karl Berry.
1633
1634 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
1635
1636 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
1637 Problem reported by twlevo@xs4all.nl.
1638
1639 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
1640
1641 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
1642 keyword; it's not needed with modern compilers, and it doesn't
1643 affect correctness with older compilers. Suggested by
1644 twlevo@xs4all.nl.
1645
1646 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
1647
1648 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
1649 gcc -Wswitch-default.
1650 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
1651 * data/yacc.c (yyparse): Likewise.
1652
1653 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
1654
1655 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
1656 already. Let config.h define any nonstandard values.
1657
1658 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
1659
1660 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
1661 for the benefit of slower hosts. Problem reported by
1662 Nelson H. F. Beebe.
1663
1664 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
1665
1666 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
1667 being defined and not used.
1668 * data/lalr1.cc (yyparse): Likewise.
1669 Use "if (false)" rather than "if (0)".
1670
1671 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
1672
1673 * TODO: Mention that we should allow NUL bytes in tokens.
1674
1675 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
1676
1677 * src/scan-skel.l (<<EOF>>): Don't close standard output.
1678 Problem reported by Hans Aberg.
1679
1680 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
1681
1682 * src/getargs.c (version): Happy new year; update overall
1683 program copyright date from 2004 to 2005.
1684
1685 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
1686 Problem reported by Hans Aberg.
1687 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
1688 (Output file names.): Add a test for the case when standard output
1689 is closed.
1690
1691 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
1692
1693 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
1694 to fix an oversight in the Bison 2.0 manual.
1695
1696 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
1697
1698 * NEWS: Version 2.0. Reformat the existing news items since
1699 1.875, so that related items are grouped together.
1700 * configure.ac (AC_INIT): Bump version to 2.0.
1701 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
1702
1703 * tests/torture.at (Exploding the Stack Size with Alloca): Set
1704 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
1705 otherwise, we're not testing alloca. Unfortunately there's no
1706 simple way to consult HAVE_ALLOCA here.
1707
1708 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
1709 for yymsg, too.
1710
1711 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
1712 hand. This avoids a warning about comparing int to size_t when
1713 GCC warnings are enabled.
1714
1715 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
1716
1717 * NEWS: Bison-generated parsers no longer default to using the
1718 alloca function (when available) to extend the parser stack, due
1719 to widespread problems in unchecked stack-overflow detection.
1720 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
1721 responsibility to set it to a positive value. This lets the user
1722 specify a value that is not a preprocessor constant.
1723 * data/yacc.c (YYMAXDEPTH): Likewise.
1724 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
1725 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
1726 to be a compile-time constant. However, explain the constraints on it.
1727 Also, explain the constraints on YYINITDEPTH.
1728 (Table of Symbols): Explain that alloca is no longer the default.
1729 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
1730 to 1.
1731
1732 * doc/bison.texinfo (Location Default Action): Mention that n must
1733 be zero when k is zero. Suggested by Frank Heckenbach.
1734
1735 2004-12-22 Akim Demaille <akim@epita.fr>
1736
1737 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
1738 (parser::state_type, parser::semantic_type, parser::location_type):
1739 Private, not public.
1740 (parser::parse): Return ints, not bool.
1741 Returning a bool introduces a problem: 0 corresponds to false, and
1742 it seems weird to return false on success. Returning true changes
1743 the conventions for yyparse.
1744 Alternatively we could return void and send an exception.
1745 There is no clear consensus (yet?).
1746 (state_stack, semantic_stack, location_stack): Rename as...
1747 (state_stack_type, semantic_stack_type, location_stack_type): these.
1748 Private, not public.
1749 * tests/c++.at: New.
1750 * tests/testsuite.at, tests/Makefile.am: Adjust.
1751
1752 2004-12-21 Akim Demaille <akim@epita.fr>
1753
1754 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
1755
1756 2004-12-21 Akim Demaille <akim@epita.fr>
1757
1758 Don't impose std::string for filenames.
1759
1760 * data/lalr1.cc (b4_filename_type): New.
1761 (position::filename): Use it.
1762 (parser.hh): Move the inclusion of stack.hh and location.hh below
1763 the user code, so that needed headers for the filename type can be
1764 included first.
1765 Forward declare them before the user code.
1766 * tests/Makefile.am (check-local, installcheck-local): Pass
1767 TESTSUITEFLAGS to the TESTSUITE.
1768
1769 2004-12-20 Akim Demaille <akim@epita.fr>
1770
1771 Use more STL like names: my_class instead of MyClass.
1772
1773 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
1774 (SemanticStack, SemanticType, StateStack, StateType)
1775 (TokenNumberType, Stack, Slice, Traits, Parser::location)
1776 (Parser::value): Rename as...
1777 (location_stack, location_type, rhs_number_type, semantic_stack)
1778 (semantic_type, state_stack, state_type, token_number_type, stack)
1779 (slice, traits, parser::yylloc, parser::yylval): these.
1780
1781 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
1782
1783 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
1784
1785 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
1786 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
1787
1788 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
1789
1790 Remove uses of 'short int' and 'unsigned short int'. This raises
1791 some arbitrary limits. It uses more memory but nowadays that's
1792 not much of an issue.
1793
1794 This change does not affect the generated parsers; that's a different
1795 task, as some users will want to conserve memory there.
1796
1797 Ideally we should use size_t to represent all object counts, and
1798 something like ptrdiff_t to represent signed differences of object
1799 counts; but that will require more code-cleanup than I have the
1800 time to do right now.
1801
1802 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
1803 Use size_t, not int or short int, to count objects.
1804 * src/closure.c (nritemset, closure): Likewise.
1805 * src/closure.h (nritemset, closure): Likewise.
1806 * src/nullable.c (nullable_compute): Likewise.
1807 * src/print.c (print_core): Likewise.
1808 * src/print_graph.c (print_core): Likewise.
1809 * src/state.c (state_compare, state_hash): Likewise.
1810 * src/state.h (struct state): Likewise.
1811 * src/tables.c (default_goto, goto_actions): Likewise.
1812
1813 * src/gram.h (rule_number, rule): Use int, not short int.
1814 * src/output.c (prepare_rules): Likewise.
1815 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
1816 errs, reductions): Likewise.
1817 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
1818 Likewise.
1819 * src/tables.c (vector_number, tally, action_number,
1820 ACTION_NUMBER_MINIMUM): Likewise.
1821 * src/output.c (muscle_insert_short_int_table): Remove.
1822
1823 2004-12-17 Akim Demaille <akim@epita.fr>
1824
1825 * data/lalr1.cc: Extensive Doxygenation.
1826 (error_): Rename as...
1827 (error): this, since it is visible to the user.
1828 Adjust callers.
1829 (Parser::message): Now an automatic variable from...
1830 (Parser::yyreport_syntax_error_): here.
1831 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
1832 Parser::error.
1833 * tests/input.at: Escape $.
1834
1835 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
1836
1837 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
1838 Parenthesize rhs to avoid obscure problems with mistakes like
1839 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
1840 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
1841 b4_rhs_location): Likewise.
1842 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
1843 b4_rhs_location): Likewise.
1844
1845 2004-12-16 Akim Demaille <akim@epita.fr>
1846
1847 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
1848 yacc.c: be sure to stay within yycheck_.
1849 * tests/actions.at: Re-enable C++ tests.
1850
1851 2004-12-16 Akim Demaille <akim@epita.fr>
1852
1853 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
1854 real.
1855
1856 2004-12-16 Akim Demaille <akim@epita.fr>
1857
1858 Use #define to handle the %name-prefix.
1859
1860 * data/glr.c, data/yacc.c: Comment changes.
1861 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
1862 so that one can refer to yylex in the parser file, and have it
1863 renamed, as is the case with other skeletons.
1864
1865 2004-12-16 Akim Demaille <akim@epita.fr>
1866
1867 Move lalr1.cc internals into yy*.
1868
1869 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
1870 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
1871 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
1872 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
1873 (empty_, final_, terror_, errcode_, ntokens_)
1874 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
1875 (looka_, ilooka_, error_range_, nerrs_):
1876 Rename as...
1877 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
1878 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
1879 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
1880 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
1881 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
1882 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
1883 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
1884 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
1885 these.
1886
1887 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
1888
1889 Fix some problems reported by twlevo at xs4all.
1890 * src/symtab.c (symbol_new): Report an error if the input grammar
1891 contains too many symbols. This is better than calling abort() later.
1892 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
1893 (struct node, struct graph):
1894 Rename member expand to stretch. All uses changed.
1895 (struct graph): Remove member layoutalgorithm. All uses removed.
1896 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
1897 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
1898 All uses changed.
1899 (N_STRETCH): Rename from N_EXPAND. All uses changed.
1900
1901 2004-12-15 Akim Demaille <akim@epita.fr>
1902
1903 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
1904 Add more Doxygen comments.
1905 (symprint_, stack_print_, reduce_print_, destruct_, pop)
1906 (report_syntax_error_, translate_): Rename as...
1907 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
1908 (yypop_, yyreport_syntax_error_, yytranslate_): this.
1909
1910 2004-12-15 Akim Demaille <akim@epita.fr>
1911
1912 * data/lalr1.cc (lex_): Rename as...
1913 (yylex_): this.
1914 Move the trace here.
1915 Take the %name-prefix into account.
1916 Reported by Alexandre Duret-Lutz.
1917
1918 2004-12-15 Akim Demaille <akim@epita.fr>
1919
1920 Simplify the C++ parser constructor.
1921
1922 * data/lalr1.cc (debug_): Rename as...
1923 (yydebug_): so that the parser's internals are always in the yy*
1924 pseudo namespace.
1925 Adjust uses.
1926 (b4_parse_param_decl): Remove the leading comma as it is now only
1927 called as unique argument list.
1928 (Parser::Parser): Remove the constructor accepting a location and
1929 an initial debugging level.
1930 Remove from the other ctor the argument for the debugging level.
1931 (debug_level_type, debug_level, set_debug_level): New.
1932
1933 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
1934 constructor calls.
1935
1936 2004-12-15 Akim Demaille <akim@epita.fr>
1937
1938 Remove b4_root related material: failure experiment
1939 (which goal was to allow to derive from a class).
1940
1941 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
1942 definitions and uses.
1943
1944 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
1945
1946 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
1947 not 2, since it's not portable to subtract 1 from the start of an
1948 array. The new item 0 is never set or used. All uses changed.
1949
1950 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
1951 the default definition of YYLLOC_DEFAULT. Problem reported
1952 by Frank Heckenbach.
1953
1954 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
1955
1956 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
1957 the normal case and one for the error case. Just use the
1958 first one uniformly. Problem reported by Frank Heckenbach.
1959 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
1960 use exactly the same macro in both places.
1961 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
1962 so that the normal-case YYRHSLOC works for the error case too.
1963 All uses changed.
1964 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
1965 (YYLLOC_DEFAULT): Use the same macro as glr.c.
1966 * doc/bison.texinfo (Location Default Action): Don't claim that
1967 we have an array of locations. Use the same macro for both glr
1968 and lalr parsers. Mention YYRHSLOC. Mention what happens when
1969 the index is 0.
1970
1971 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
1972
1973 * HACKING: Update email addresses to send announcements to.
1974
1975 * configure.ac (AC_INIT): Bump version to 1.875f.
1976
1977 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
1978
1979 * NEWS: Version 1.875e.
1980 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
1981
1982 * src/scan-skel.l: Include "complain.h", for "fatal".
1983
1984 * src/relation.h (relation_print, relation_digraph):
1985 Relation sizes are of type relation_node, not size_t (this is
1986 merely a doc fix, since the two types are equivalent).
1987 (relation_transpose): Relation sizes are of type relation_node,
1988 not int.
1989 * src/relation.c: Likewise.
1990 (top, infinity): Now of type relation_node, not int.
1991 (traverse, relation_transpose): Use relation_node, not int.
1992
1993 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
1994 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
1995 (yyparse): Remove unused local introduced in 2004-10-25 patch.
1996
1997 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
1998 specifying whether the test should be skipped. Use it tp
1999 specify that the [%defines %skeleton "lalr1.cc"] tests currently
2000 fail on some hosts, and should be skipped.
2001
2002 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
2003
2004 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
2005 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
2006 unless otherwise specified below.
2007
2008 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
2009 to allocate kernel_base, kernel_items, kernel_size, since
2010 they needn't be initialized to 0.
2011 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
2012 * src/closure.c (new_closure): Likewise, for itemset.
2013 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
2014 * src/lalr.c (set_goto_map): Likewise, for temp_map.
2015 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
2016 (build_relations): Likewise for edge, states1, includes.
2017 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
2018 * src/reader.c (packgram): Likewise, for ritem, rules.
2019 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
2020 * src/relation.c (relation_digraph): Likewise for VERTICES.
2021 (relation_transpose): Likewise for new_R, end_R.
2022 * src/symtab.c (symbols_token_translations_init): Likewise for
2023 token_translations.
2024 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
2025 (token_actions): Likewise for yydefact, actrow, conflrow,
2026 conflict_list.
2027 (save_column): Likewise for froms[symno], tos[symno].
2028 (goto_actions): Likewise for state_count.
2029 (pack_table): Likewise for base, pos, check.
2030 (tables_generate): Likewise for width.
2031
2032 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
2033 for initial core. Just have a separate core, so we needn't worry
2034 about whether kernel_size and kernel_base are initialized.
2035
2036 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
2037 kernel_size, kernel_items): Remove unnecessary initialization.
2038 * src/conflicts.c (conflicts): Likewise.
2039 * src/derives.c (derives): Likewise.
2040 * src/muscle_tablc (muscle_insert): Likewise.
2041 * src/relation.c (relation_digraph): Likewise.
2042 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
2043 conflrow, conflict_table, conflict_list, table, check):
2044 Likewise.
2045
2046 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
2047 This is because all callers pass unsigned int.
2048 * src/closure.h (new_closure): Likewise.
2049
2050 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
2051 (build_relations): Initialize includes[i] in all cases.
2052 * src/reader.c (packgram): Always initialize rules[ruleno].prec
2053 and rules[ruleno].precsym. Initialize members in order.
2054 * src/relation.c (relation_transpose): Always initialize new_R[i]
2055 and end_R[i].
2056 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
2057
2058 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
2059 conflict_list[0] was always 0, but now it isn't initialized.
2060
2061 * src/table.c (table_grow): When conflict_table grew, the grown
2062 area wasn't cleared. Fix this.
2063
2064 * lib/.cvsignore: Add strdup.c, strdup.h.
2065 * m4/.cvsignore: Add strdup.m4.
2066
2067 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
2068
2069 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
2070 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
2071 GOTO_NUMBER_MAXIMUM, since we occasionally compute
2072 ngotos + 1 without checking for overflow.
2073 (build_relations): Use END_NODE, not -1, to denote end of edges.
2074 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
2075 build_relations): Use goto_number, not int, for goto numbers.
2076 * src/tables.c (save_column, default_goto): Likewise.
2077
2078 2004-11-23 Akim Demaille <akim@epita.fr>
2079
2080 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
2081 of #defining from yystype.
2082 Don't typedef yystype, C++ does not need it.
2083 This lets it possible to forward declare it as union.
2084
2085 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
2086
2087 * bootstrap (gnulib_modules): Add extensions.
2088 Problem reported by Jim Meyering.
2089
2090 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
2091
2092 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
2093 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
2094 src/system.h, src/tables.c: XFREE -> free, to accommodate
2095 recent change to gnulib xalloc.h.
2096 Problem reported by Jim Meyering.
2097
2098 2004-11-17 Akim Demaille <akim@epita.fr>
2099
2100 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
2101
2102 2004-10-28 Akim Demaille <akim@epita.fr>,
2103 Alexandre Duret-Lutz <adl@gnu.org>
2104
2105 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
2106 changes.
2107 (YYCDEBUG): Adjust.
2108 Use it instead of cdebug_.
2109 (Parser::debug_stream, Parser::set_debug_stream): New.
2110 (Parser::symprint_): Define cdebug_ for temporary backward
2111 compatibility.
2112 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
2113 debug_stream ().
2114
2115 2004-11-17 Akim Demaille <akim@epita.fr>
2116
2117 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
2118 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
2119 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
2120 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
2121
2122 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
2123
2124 * data/glr.c (yyloc_default): Remove; not used.
2125 Problem reported by Frank Heckenbach.
2126
2127 2004-10-25 Akim Demaille <akim@epita.fr>
2128
2129 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
2130 Introduce another definition to address simple location arrays.
2131 (yyGLRStack): New member: yyerror_range.
2132 (yyrecoverSyntaxError, yyparse): Update it.
2133 (yyrecoverSyntaxError): Use it when shifting the error token to
2134 have an accurate range, equivalent to the one computed by both
2135 yacc.c and lalr1.cc.
2136 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
2137 that column numbers start at column 0, as per GNU Coding
2138 Standards, the others tests, and the doc.
2139 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
2140 Adjust to the above change (first column is 0).
2141 And adjust the location of the "<error>", now covering the whole
2142 line.
2143
2144 2004-10-22 Akim Demaille <akim@epita.fr>
2145 and Paul Eggert <eggert@cs.ucla.edu>
2146
2147 Remove some arbitrary limits on goto numbers and relations.
2148 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
2149 initial values, since they're never used.
2150 (set_goto_map): ngotos is now unsigned, so test for overflow
2151 by seeing whether it wraps around to zero.
2152 * src/lalr.h (goto_number): Now size_t, not short int.
2153 (GOTO_NUMBER_MAXIMUM): Remove.
2154 * src/relation.c (relation_print, traverse, relation_transpose):
2155 Check for END_NODE rather than looking at sign.
2156 * src/relation.h (END_NODE): New macro.
2157 (relation_node): Now size_t, not short int.
2158
2159 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
2160
2161 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
2162 keyword, not an identifier. Problem reported by Baron Schwartz in
2163 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
2164
2165 2004-10-11 Akim Demaille <akim@epita.fr>
2166
2167 * src/symtab.c (symbol_check_alias_consistency): Also check
2168 type names, destructors, and printers.
2169 Reported by Alexandre Duret-Lutz.
2170 Recode the handling of associativity and precedence in terms
2171 of symbol_precedence_set.
2172 Accept no redeclaration at all, not even equal to the previous
2173 value.
2174 (redeclaration): New.
2175 Use it to factor redeclaration complaints.
2176 (symbol_make_alias): Don't set the type of the alias, let
2177 symbol_check_alias_consistency do it as for other features.
2178 * src/symtab.h (symbol): Add new member prec_location, and
2179 type_location.
2180 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
2181 * tests/input.at (Incompatible Aliases): New.
2182
2183 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
2184
2185 .cvsignore fixes to accommodate gnulib changes,
2186 and the practice of naming build directories "_build".
2187 * .cvsignore: Add "_*". Sort.
2188 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
2189 * m4/.cvsignore: Add "*_gl.m4".
2190
2191 2004-10-06 Akim Demaille <akim@epita.fr>
2192
2193 * src/parse-gram.y (add_param): Fix the truncation of trailing
2194 spaces.
2195
2196 2004-10-05 Akim Demaille <akim@epita.fr>
2197
2198 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
2199 whether the reducion was empty or not. This leaves room to
2200 improve the use of YYLLOC_DEFAULT in such a case.
2201 lalr1.cc is still experimental, so changing this is acceptable.
2202 And finally, there are probably not many users who changed the
2203 handling of locations in GLR, so changing is admissible too.
2204
2205 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
2206 empty reduction, set @$ to an empty location ending the previously
2207 stacked symbol.
2208 Adjust uses to make sure the code is triggered on empty
2209 reductions.
2210 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
2211 expected output: empty reductions have empty locations.
2212
2213 2004-09-29 Akim Demaille <akim@epita.fr>
2214
2215 * data/lalr1.cc: Move towards a more standard C++ coding style
2216 for templates: Class < T > -> Class<T>.
2217
2218 2004-09-29 Akim Demaille <akim@epita.fr>
2219
2220 * data/lalr1.cc: Reinstall the former ctor, for sake of
2221 compatibility, but warn it will be removed.
2222 Move towards a more standard C++ coding style (i.e., type *var ->
2223 type* var).
2224
2225 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
2226
2227 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
2228 since it's less likely to work if NULs are involved in the future.
2229
2230 2004-09-27 Akim Demaille <akim@epita.fr>
2231
2232 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
2233
2234 2004-09-27 Akim Demaille <akim@epita.fr>
2235
2236 * data/lalr1.cc (b4_parse_param_decl_1): New.
2237 (b4_parse_param_decl): Use it to have different names between attribute
2238 and argument names.
2239 (b4_cc_constructor_call): Likewise.
2240
2241 2004-09-24 Akim Demaille <akim@epita.fr>
2242
2243 * src/parse-gram.y (add_param): Strip the leading and trailing
2244 blanks from a formal argument declaration.
2245 (YY_LOCATION_PRINT): New.
2246
2247 2004-09-24 Akim Demaille <akim@epita.fr>
2248
2249 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
2250 after the location.
2251
2252 2004-09-24 Akim Demaille <akim@epita.fr>
2253
2254 * doc/bison.texinfo (Table of Symbols): Sort.
2255
2256 2004-09-21 Akim Demaille <akim@epita.fr>
2257
2258 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
2259 the useless parentheses.
2260 Suggested by Paul Eggert.
2261
2262 2004-09-20 Akim Demaille <akim@epita.fr>
2263
2264 Let the initial-action act on the look-ahead, and use it for the
2265 "initial push" (corresponding to an hypothetical beginning-of-file).
2266 And let lalr1.cc honor %initial-action.
2267
2268 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
2269 example.
2270 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
2271 (Parser::Parser): Remove the ctor that used to initialize it.
2272 (Parser::parse): Like in the other skeletons, issue the "starting
2273 parse" message before any action.
2274 Honor %initial-action.
2275 Initialize the stacks with the lookahead.
2276 * data/yacc.c: Let $$ and @$ in %initial-action designate the
2277 look-ahead.
2278 Push them in the stacks.
2279 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
2280
2281 2004-09-20 Akim Demaille <akim@epita.fr>
2282
2283 * doc/bison.texinfo (Initial Action Decl): New.
2284
2285 2004-09-20 Akim Demaille <akim@epita.fr>
2286
2287 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
2288 clearer criterion to define it.
2289 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
2290 When reducing on an empty RHS, use the latest stacked location as
2291 location.
2292 yylloc is not always available.
2293 * data/glr.c: Likewise.
2294 Also, honor initial-actions.
2295
2296 2004-09-20 Akim Demaille <akim@epita.fr>
2297
2298 * data/yacc.c (YY_LOCATION_PRINT): New.
2299 Define when we know YYLTYPE's structure, i.e., when the default
2300 YYLLOC_DEFAULT is used.
2301 * data/c.m4 (b4_yysymprint_generate): Use it.
2302 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
2303 value of the result.
2304 (error_start_): Replace with...
2305 (error_range_): this location array.
2306 This allows to replace code relying on the implementation of
2307 locations by portable code.
2308 * data/yacc.c (yylerrsp): Replace with...
2309 (yyerror_range): this.
2310 Every time a token is popped, update yyerror_range[0], to have an
2311 accurate location for the error token.
2312 * data/glr.c (YY_LOCATION_PRINT): New.
2313 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
2314 deference a pointer.
2315 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
2316 report the location in %printers.
2317
2318 * src/scan-skel.l: Instead of abort, report error messages to ease
2319 understanding skeleton scanning failures.
2320
2321 2004-09-16 Akim Demaille <akim@epita.fr>
2322
2323 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
2324 (iterator, const_iterator): these, to be more in the C++ spirit.
2325 Also, return reverse iterators so that when displaying the stack
2326 we display its bottom first.
2327 (Parser::stack_print_, Parser::reduce_print_): Match the messages
2328 from yacc.c.
2329 We should probably use vector here though.
2330
2331 2004-09-16 Akim Demaille <akim@epita.fr>
2332
2333 Have more complete shift traces.
2334
2335 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
2336 to report Shifts instead of ad hoc YYDPRINTF invocations,
2337 including for the error token.
2338 * data/lalr1.cc (symprint_): Output the location.
2339 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
2340 output the location within the %printer.
2341 Activate GLR tests, at least to make sure they compile properly.
2342 They still don't pass though.
2343 * tests/calc.at: Adjust expect verbose output, since now "Entering
2344 state..." is on a different line than the "Shifting" message.
2345
2346 2004-09-08 Akim Demaille <akim@epita.fr>
2347
2348 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
2349 Bison directive from the Bison file to the invocation of this
2350 macro, so that these directives are passed to
2351 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
2352 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
2353 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
2354 the extra Bison directives instead of the whole series.
2355 Change the grammar so that there are recoverable errors, and
2356 unrecoverable errors. Now we can have the parser give up before
2357 consuming the whole input. As a result we now can observe that
2358 the lookahead is freed when needed.
2359 Change the parser source to parse argv[1] instead of a hard coded
2360 string.
2361 Simplify yylex, and give a value and location to EOF.
2362 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
2363 passed directives already coded in the file.
2364 Add some tests to check the location of "error".
2365 For some tests, the C++ parser is correct, and not yacc.c.
2366 For other tests, they provide different, but unsatisfying, values,
2367 so keep the C++ value so that at least one parser is "correct"
2368 according to the test suite.
2369 (Actions after errors): Remove, this is subsumed by the
2370 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
2371
2372 2004-09-06 Akim Demaille <akim@epita.fr>
2373
2374 * data/lalr1.cc: Adjust the indentation of the labels.
2375 (Parser::pop): New.
2376 Use it.
2377
2378 2004-09-06 Akim Demaille <akim@epita.fr>
2379
2380 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
2381 argument, an informative message.
2382 Call YY_SYMBOL_PRINT.
2383 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
2384 * data/lalr1.cc (destruct_): Likewise.
2385 In addition, no longer depend on b4_yysymprint_generate and
2386 b4_yydestruct_generate to generate these functions, do it "by
2387 hand".
2388
2389 2004-09-03 Akim Demaille <akim@epita.fr>
2390
2391 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
2392 invoked, yydestruct the lookahead.
2393 * tests/calc.at (Calculator $1): Update the expected lengths of
2394 traces: there is an added line for the discarded lookahead.
2395 * doc/bison.texinfo (Destructor Decl): Some rewording.
2396 Define "discarded" symbols.
2397
2398 2004-09-02 Akim Demaille <akim@epita.fr>
2399
2400 * data/lalr1.cc (translate_, destruct_): No reason to be static.
2401
2402 2004-09-02 Akim Demaille <akim@epita.fr>
2403
2404 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
2405 (YYDSYMPRINTF): Rename as...
2406 (YY_SYMBOL_PRINT): this.
2407 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
2408 two.
2409 Use it instead of direct symprint_ calls.
2410 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
2411 one.
2412
2413 2004-09-02 Akim Demaille <akim@epita.fr>
2414
2415 * data/lalr1.cc (b4_yysymprint_generate): New.
2416 (symprint_): New member function, defined when YYDEBUG.
2417 Use it consistently instead of token/nterm debugging output by
2418 hand.
2419 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
2420 %printer calls to use cdebug_ when using lalr1.cc.
2421
2422 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
2423
2424 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
2425 with #ifdef YYDEBUG.
2426
2427 2004-08-26 Akim Demaille <akim@epita.fr>
2428
2429 * doc/bison.texinfo (Implementing Loops): Rename as...
2430 (Implementing Gotos/Loops): this.
2431
2432 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
2433
2434 Adjust to latest gnulib.
2435 * bootstrap (gnulib_modules): Add xalloc-die.
2436 Set LC_ALL=C so that file names sort consistently.
2437 Prefer the gnulib copies of gettext.m4, glibc21.m4,
2438 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
2439 uintmax_t.m4, ulonglong.m4.
2440 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
2441 po.m4 since we are now using _gl.m4 instead.
2442
2443 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
2444
2445 * src/scan-action.l: Remove. Scanning of semantic actions is
2446 handled in scan-gram.l.
2447
2448 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
2449
2450 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
2451
2452 * src/location.h (struct): The file member is a uniqstr.
2453 (equal_boundaries): Use UNIQSTR_EQ for comparison.
2454
2455 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
2456
2457 Fix bug with non-%union parsers that have printers or destructors,
2458 which led to a Bison core dump. Reported by Peter Fales in
2459 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
2460
2461 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
2462 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
2463 not to our own type.
2464 * src/output.c (symbol_destructors_output, symbol_printers_output):
2465 Don't assume %union.
2466 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
2467 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
2468 UNION-FLAG. All callers changed.
2469 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
2470 Use type char, not unsigned int, when declaring an array of char;
2471 this lets us remove a cast.
2472 (Printers and Destructors): Add non-%union test cases.
2473
2474 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
2475
2476 * doc/bison.texinfo: Minor editorial changes, mostly to the new
2477 GLR writeups. E.g., avoid frenchspacing and the future tense,
2478 change "lookahead" to "look-ahead", and change "wrt" to "with
2479 respect to".
2480
2481 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
2482
2483 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
2484 New sections, split off from the GLR Parsers section. Put the new
2485 Simple GLR Parser near the start of the GLR section, for clarity.
2486 Rewrite connective text.
2487
2488 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
2489
2490 * doc/bison.texinfo (Simple GLR Parsers): New section.
2491
2492 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
2493
2494 * NEWS, TODO, doc/bison.texinfo:
2495 Use "look-ahead" instead of "lookahead", to be consistent.
2496 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
2497 while we're fixing "look-ahead".
2498 * src/conflicts.c (shift_set): Renamed from shiftset.
2499 (look_ahead_set): Renamed from lookaheadset.
2500 * src/print.c: Likewise.
2501 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
2502 name for "lookahead".
2503 (report_types, usage): Likewise.
2504 * src/getargs.h (report_look_ahead_tokens): Renamed from
2505 report_lookaheads.
2506 * src/lalr.c (compute_look_ahead_tokens): Renamed from
2507 compute_lookaheads.
2508 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
2509 (look_ahead_tokens_print): Renamed from lookaheads_print.
2510 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
2511 state_rule_lookaheads_print.
2512 * src/state.h: Likewise.
2513 (reductions.look_ahead_tokens): Renamed from lookaheads.
2514 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
2515 AT_DATA_LOOKAHEADS_GRAMMAR.
2516
2517 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
2518
2519 * README: Update location of patched M4 distribution.
2520
2521 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
2522
2523 Don't assume the C++ compiler takes the same arguments as the C compiler
2524 (trivial change).
2525 * configure.ac (O0CXXFLAGS): New var.
2526 * tests/atlocal.in (CXXFLAGS): Use it.
2527
2528 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
2529
2530 Fix some "make check" problems with C++ reported by
2531 Albert Chin-A-Young for Tru64 C++ in this thread:
2532 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
2533
2534 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
2535 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
2536 Output to a .cc file for C++, not to a .c file.
2537 * tests/calc.at (AT_CHECK_CALC): Likewise.
2538 * tests/regression.at (AT_CHECK_DANCER): Likewise.
2539 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
2540
2541 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
2542
2543 * tests/calc.at, tests/actions.at: Workaround for SGI
2544 C++ compiler. (trivial change)
2545
2546 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
2547
2548 Spent a few hours checking out which prerequisite versions the
2549 current sources actually require. I went all the way back to
2550 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
2551 a seemingly endless set of combinations of versions more recent
2552 than that. The bottom line is that the current sources require
2553 fairly recent versions of the build tools, and it'll be some work
2554 to change this.
2555 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
2556 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
2557 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
2558 Add comments explaining why those particular versions are
2559 currently needed.
2560
2561 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
2562 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
2563 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
2564
2565 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
2566 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
2567
2568 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
2569
2570 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
2571 0.11.5. Suggested by Bruno Haible.
2572 * bootstrap: Remove gettext version checking.
2573
2574 * doc/bison.texinfo (Decl Summary): Also mention that %union
2575 can depend on prerequisite types. Problem reported by Tim
2576 Van Holder.
2577
2578 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
2579
2580 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
2581 * README-alpha: Don't tell people not to package this.
2582
2583 * bootstrap: Don't assume $(...) works; use `...` instead.
2584 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
2585 gettext better.
2586
2587 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
2588 put into the -d output file, and mention what to do if YYSTYPE is
2589 defined as a macro.
2590
2591 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
2592
2593 Undo change made earlier today: it caused autopoint to not bring
2594 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
2595 autopoint's.
2596
2597 * bootstrap: Check that gettext version matches what's in
2598 configure.ac. Warn users to ignore robots.txt ERROR 404.
2599 * bootstrap: Undo today's earlier change (logged below).
2600 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
2601
2602 The gettext version checking is causing more trouble than it's
2603 curing; remove it. Problem reported by Paul Hilfinger.
2604
2605 * bootstrap: Issue a warning that one can expect a message
2606 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
2607 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
2608
2609 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
2610
2611 Ensure that the C++ compiler used for testing actually works on a
2612 simple test program; if not, skip the C++-related tests. Problem
2613 reported by Vin Shelton in:
2614 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
2615
2616 * m4/cxx.m4: New file.
2617 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
2618 * tests/atlocal.in (BISON_CXX_WORKS): Add.
2619 * tests/local.at (AT_COMPILE_CXX): Use it.
2620
2621 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
2622
2623 * data/glr.c (yylloc): Output this macro even if locations are not
2624 being generated, as the GLR parser needs it even in that case.
2625 Problem reported by Troy A. Johnson
2626 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
2627
2628 * configure.ac (AC_INIT): Update to 1.875e.
2629
2630 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
2631
2632 * NEWS: Version 1.875d.
2633 * configure.ac (AC_INIT): Likewise.
2634 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
2635
2636 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
2637 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
2638 lalr1.cc runs afoul of the first, and the last two are no longer
2639 supported by GCC 3.4.0.
2640 * README: Mention GNU m4 1.4 or later; mention m4 patches.
2641 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
2642
2643 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
2644
2645 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
2646 unsigned int, for compatibility with latest gnulib hash module.
2647 * src/state.c (state_hash, state_hasher): Likewise.
2648 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
2649 * src/uniqstr.c (hash_uniqstr): Likewise.
2650
2651 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
2652
2653 * NEWS: Unescaped newlines are no longer allowed in char & strings.
2654
2655 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
2656 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
2657 character and string literals.
2658 (unexpected_end): New function.
2659 (unexpected_eof): Use it.
2660 (unexpected_newline): New function.
2661 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
2662 actions.
2663
2664 * NEWS: Document %expect-rr.
2665
2666 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
2667 Fix typo by replacing $1 with $option.
2668 Remove more 'intl'-related files.
2669 Don't DEFUN AM_INTL_SUBDIR twice.
2670
2671 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
2672 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
2673 strtoul.c.
2674 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
2675 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
2676 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
2677 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
2678 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
2679 * src/.cvsignore: Add *.output.
2680
2681 * src/parse-gram.y: Put copyright notice inside %{ %} so it
2682 gets copied to the output file.
2683
2684 2004-04-28 Paul Eggert <eggert@twinsun.com>
2685
2686 Get files from the gnulib and po repositories, instead of relying
2687 on them being in our CVS. Upgrade to latest versions of gnulib
2688 and Automake.
2689
2690 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
2691 * bootstrap: Bootstrap from gnulib and po repositories.
2692 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
2693 * README-cvs: Document these changes. Remove version numbers from
2694 mentions of build tools, since they change so often. Mention Flex.
2695
2696 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
2697 (gl_USE_SYSTEM_EXTENSIONS): Add.
2698 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
2699 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
2700 does this for us.
2701 (AC_ISC_POSIX): Remove; we no longer support this
2702 ancient OS, as it gets in the way of latest Autoconf & gnulib.
2703 (AC_HEADER_STDC): Remove: we now assume C89 or better.
2704 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
2705 Do not check for C89 headers, except for locale.h which is used
2706 by the Yacc library and must port to K&R hosts.
2707 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
2708 Do not check for C89 functions, except for setlocale which is
2709 used by the Yacc library.
2710 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
2711 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
2712 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
2713 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
2714 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
2715 AM_GNU_GETTEXT): Remove; now done by:
2716 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
2717 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
2718 for us.
2719
2720 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
2721 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
2722 Define to empty, as gnulib.mk will do the rest for us.
2723 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
2724 for us.
2725 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
2726 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
2727
2728 * src/files.c: Include gnulib's xstrndup.h.
2729
2730 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
2731 (REALLOC): Use xnrealloc, for likewise.
2732 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
2733 (strnlen, memrchr): Remove decls; functions no longer used.
2734 Include <stpcpy.h>.
2735
2736 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
2737 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
2738 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
2739 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
2740 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
2741 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
2742 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
2743 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
2744 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
2745 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
2746 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
2747 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
2748 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
2749 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
2750 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
2751 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
2752 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
2753 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
2754 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
2755 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
2756 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
2757 Remove, as these files are now generated automatically
2758 by bootstrap or automake.
2759
2760 * po/ChangeLog: Remove: all but one entry was a duplicate
2761 of this file, and I moved that 2000-11-02 entry here.
2762
2763 * config/.cvsignore: Add Makefile, depcomp, install-sh.
2764 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
2765 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
2766 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
2767 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
2768 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
2769 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
2770 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
2771 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
2772 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
2773 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
2774 xstrndup.h.
2775 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
2776 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
2777 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
2778 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
2779 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
2780 * src/.cvsignore: Remove *_.c.
2781
2782
2783 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
2784 support it. (The latest stable gzip doesn't.)
2785
2786 2004-04-27 Paul Eggert <eggert@twinsun.com>
2787
2788 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
2789 case, as stos_ is now used by destructors due to the 2004-02-09
2790 change.
2791
2792 Remove more K&R C support.
2793 * lib/libiberty.y (PARAMS): Remove. All uses removed.
2794 * lib/subpipe.c (errno): Remove decl.
2795 Include <stdlib.h> unconditionally.
2796 (EXIT_FAILURE): Remove macro.
2797 * src/complain.c (vfprintf, strerror): Remove.
2798 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
2799 unconditionally.
2800 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
2801 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
2802 (strchr, strspn, memchr): Remove decls.
2803 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
2804 unconditionally. Do not declare perror.
2805 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
2806 unconditionally.
2807
2808 * src/complain.c (_): Remove useless defn, as system.h defines this.
2809
2810 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
2811 with latest obstack.h.
2812 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
2813 to procedure types, as obstack.h now does that for us.
2814 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
2815
2816 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
2817 so that this include file can stand alone.
2818 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
2819 does this now. Include subpipe.h first after config.h, to
2820 test whether it can stand alone.
2821
2822 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
2823 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
2824 unused declaration.
2825
2826 * tests/synclines.at (%union synch line): Put a dummy member in
2827 the union, because empty unions aren't allowed in C. Caught
2828 by GCC 3.4.0.
2829
2830 2004-04-13 Jim Meyering <jim@meyering.net>
2831
2832 * src/conflicts.c (conflicts_print): Correct format string typo:
2833 use `%%' to produce literal `%'. (trivial change)
2834
2835 2004-03-30 Paul Eggert <eggert@twinsun.com>
2836
2837 * src/getargs.c (version): Update copyright year to 2004.
2838
2839 * data/c.m4 (b4_int_type): Use 'short int' rather than
2840 'short', and similarly for 'long', 'unsigned', etc.
2841 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
2842 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
2843 yy_yypstack, yydumpstack): Likewise.
2844 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
2845 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
2846 Likewise.
2847 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
2848 yy_stack_print, yyparse): Likewise.
2849 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
2850 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
2851 * lib/bitset.c (bitset_print): Likewise.
2852 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
2853 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
2854 * lib/bitsetv.c (bitsetv_dump): Likewise.
2855 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
2856 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
2857 Likewise.
2858 * src/LR0.c (allocate_itemsets): Likewise.
2859 * src/gram.h (rule_number, rule): Likewise.
2860 * src/lalr.h (goto_number): Likewise.
2861 * src/nullable.c (nullable_compute): Likewise.
2862 * src/output.c (prepare_rules): Likewise.
2863 * src/relation.c (relation_print, relation_digraph): Likewise.
2864 * src/relation.h (relation_node): Likewise.
2865 * src/state.h (state_number, transitions, errs, reductions,
2866 struct state): Likewise.
2867 * src/symtab.h (symbol_number, struct symbol): Likewise.
2868 * src/tables.c (vector_number, tally, action_number,
2869 default_goto, goto_actions): Likewise.
2870 * tests/existing.at (GNU Cim Grammar): Likewise.
2871 * tests/regression.at (Web2c Actions): Likewise.
2872
2873 * src/output.c (muscle_insert_short_int_table): Renamed from
2874 muscle_insert_short_table. All uses changed.
2875
2876 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
2877
2878 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
2879 (declaration): Replace expected_conflicts with expected_sr_conflicts.
2880 Add %expect-rr rule.
2881
2882 * src/scan-gram.l: Recognize %expect-rr.
2883
2884 * src/conflicts.h (expected_sr_conflicts): Rename from
2885 expected_conflicts.
2886 (expected_rr_conflicts): Declare.
2887
2888 * src/conflicts.c (expected_sr_conflicts): Rename from
2889 expected_conflicts.
2890 (expected_rr_conflicts): Define.
2891 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
2892 for GLR parsers.
2893 Use expected_sr_conflicts in place of expected_conflicts.
2894 Warn if expected_rr_conflicts used in non-GLR parser.
2895
2896 * doc/bison.texinfo: Add documentation for %expect-rr.
2897
2898 2004-03-08 Paul Eggert <eggert@gnu.org>
2899
2900 Add support for hex token numbers. Suggested by Odd Arild Olsen in
2901 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
2902
2903 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
2904 in lalr1.cc.
2905 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
2906 * src/scan-gram.l (scan_integer): New function.
2907 ({int}): Use it.
2908 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
2909 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
2910 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
2911 Say "long int", not "long", for uniformity with GNU style.
2912
2913 2004-02-25 Paul Eggert <eggert@twinsun.com>
2914
2915 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
2916 compilers. This fixes a problem with Intel's C++ compiler being
2917 chatty, reported by Guido Trentalancia in
2918 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
2919
2920 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
2921
2922 Support %destructor and merge error locations in lalr1.cc.
2923
2924 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
2925 (Parser::stos_): Define unconditionally.
2926 (Parser::destruct_): New method. Generate its body with
2927 b4_yydestruct_generate.
2928 (Parser::error_start_): New attribute.
2929 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
2930 token which are discarded.
2931 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
2932 error_start_ when erroneous token are discarded.
2933 (Parser::parse) <yyerrlab1>: Compute the location of the error
2934 token so that it covers all the discarded tokens.
2935 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
2936 it can be called with `%skeleton "lalr1.cc"', and do that.
2937
2938 2004-02-02 Paul Eggert <eggert@twinsun.com>
2939
2940 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
2941 $(top_srcdir)/lib and ../lib. This fixes a bug reported
2942 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
2943 There's no need to mention top_builddir since Automake does that
2944 for us.
2945 (INCLUDES): Remove, as Automake says it's obsolescent.
2946 Contents migrated into AM_CPPFLAGS as described above.
2947 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
2948
2949 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
2950
2951 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
2952 (yyreportSyntaxError): Handle case where lookahead token is
2953 YYEMPTY.
2954
2955 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2956
2957 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
2958 resulting parsers are compilable with C++.
2959
2960 2003-12-23 Paul Eggert <eggert@twinsun.com>
2961
2962 * config/depcomp, config/install-sh: Sync with Automake 1.8.
2963 * src/output.c (output_skeleton): Rename local var.
2964 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
2965 Bison tokens, as this runs afoul of the 2003-10-07 change that
2966 disallowed NUL bytes in character constants or string literals.
2967
2968 * tests/local.at: Require Autoconf 2.59's Autotest.
2969 * tests/testsuite.at: Don't include local.at, since we now assume
2970 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
2971 including it.
2972 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
2973 multiple inclusion warnings.
2974
2975 2003-12-02 Akim Demaille <akim@epita.fr>
2976
2977 * doc/bison.texinfo (How Can I Reset the Parser): More about start
2978 conditions.
2979 From Bruno Haible.
2980
2981 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
2982
2983 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
2984
2985 2003-10-07 Paul Eggert <eggert@twinsun.com>
2986
2987 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
2988 if testsuite doesn't exist.
2989
2990 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
2991 literals, unfortunately.
2992 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
2993 Complain about NUL bytes in character constants or string literals.
2994
2995 2003-10-05 Paul Eggert <eggert@twinsun.com>
2996
2997 * NEWS: Don't document %no-default-prec, as it's still
2998 too experimental.
2999 * doc/bison.texinfo: Document %no-default-prec only if
3000 the defaultprec flag is set. Normally it's not.
3001
3002 2003-10-04 Paul Eggert <eggert@twinsun.com>
3003
3004 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
3005 non-modifiable lvalue, instead of a modifiable one.
3006 * doc/bison.texinfo (Actions): Document that $$ can
3007 be assigned to. Do not claim that $$ and $N are
3008 array element references: user code should not rely on this.
3009
3010 2003-10-01 Paul Eggert <eggert@twinsun.com>
3011
3012 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
3013 (grammar_declaration): Use it.
3014 * src/scan-gram.l: New token %no-default-prec.
3015 * tests/conflicts.at: Revamp tests to use %no-default-prec.
3016 * NEWS, doc/bison.texinfo: Document the above.
3017
3018 2003-10-01 Akim Demaille <akim@epita.fr>
3019
3020 VCG no longer supports long_straight_phase.
3021
3022 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
3023 * src/print_graph.c (print_graph): Adjust.
3024
3025 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
3026 and Paul Eggert <eggert@twinsun.com>
3027
3028 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
3029 Table of Symbols): Document %default-prec.
3030 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
3031 (grammar_declaration): Set default_prec on %default-prec.
3032 * src/scan-gram.l (%default-prec): New token.
3033 * src/reader.h (default_prec): New flag.
3034 * src/reader.c: Likewise.
3035 (packgram): Handle it.
3036 * tests/conflicts.at (%default-prec without %prec,
3037 %default-prec with %prec, %default-prec 1): New tests.
3038
3039 2003-09-30 Paul Eggert <eggert@twinsun.com>
3040
3041 * tests/testsuite.at: Include local.at, not input.at, fixing
3042 a typo in the 2003-08-25 patch.
3043
3044 2003-08-27 Akim Demaille <akim@epita.fr>
3045
3046 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
3047 GCC warnings.
3048
3049 2003-08-26 Akim Demaille <akim@epita.fr>
3050
3051 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
3052 "<\#" to avoid magic from Gnus when posting parts of this script.
3053
3054 2003-08-26 Akim Demaille <akim@epita.fr>
3055
3056 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
3057 (Parser::parse): here.
3058 Adjust: nerrs and errstatus is now replaced by...
3059 (Parser::nerrs_, Parser::errstatus_): New.
3060
3061 2003-08-25 Akim Demaille <akim@epita.fr>
3062
3063 * config/announce-gen, Makefile.cfg: New.
3064 * Makefile.am: Adjust.
3065 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
3066 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
3067
3068 2003-08-25 Akim Demaille <akim@epita.fr>
3069
3070 When reducing initial empty rules, Bison parser read an initial
3071 location that is not defined. This results in garbage, and that
3072 affects Bison's own parser. Therefore we need (i) to extend Bison
3073 to support a means to initialize this location, and (ii) to use
3074 this CVS Bison to fix CVS Bison's parser.
3075
3076 * src/reader.h, reader.c (epilogue_augment): Remove, replace
3077 with...
3078 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
3079 * src/parse-gram.y: Adjust.
3080 (%initial-action): New.
3081 (%error-verbose): Since we require CVS Bison, there is no reason
3082 not to use it.
3083 * src/scan-gram.l: Adjust.
3084 * src/Makefile.am (YACC): New, to make sure we use our own parser.
3085 * data/yacc.c (yyparse): Use b4_initial_action.
3086
3087 2003-08-25 Akim Demaille <akim@epita.fr>
3088
3089 * doc/bison.texinfo: Don't promote stdout for error messages.
3090
3091 2003-08-25 Akim Demaille <akim@epita.fr>
3092
3093 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
3094 From Alexandre Duret-Lutz.
3095
3096 2003-08-25 Akim Demaille <akim@epita.fr>
3097
3098 Version 1.875c.
3099
3100 2003-08-25 Akim Demaille <akim@epita.fr>
3101
3102 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
3103 Use them.
3104
3105 2003-08-25 Akim Demaille <akim@epita.fr>
3106
3107 * data/lalr1.cc (Parser::reduce_print_): New.
3108 Use it.
3109
3110 2003-08-25 Akim Demaille <akim@epita.fr>
3111
3112 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
3113 error recovery loops. This patch is based on
3114 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
3115 Also, augment the similarity between lalr1.cc and yacc.c.
3116 Note: the locations of error recovery rules are not correct yet.
3117
3118 * data/lalr1.cc: Comment changes to augment the similarity between
3119 lalr1.cc and yacc.c.
3120 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
3121 (yyerrlab1): Remove, but where it used to be (now the bottom part of
3122 yyerrlab), when hitting EOF, pop the whole stack here instead of
3123 merely falling thru the default error handling mechanism.
3124 (yyerrorlab): New label, with the old contents of YYERROR,
3125 plus the following change: pop the stack of rhs corresponding
3126 to the production that invoked YYERROR. That is how Yacc
3127 behaves (required by POSIX).
3128 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
3129 fail.
3130
3131 2003-08-25 Akim Demaille <akim@epita.fr>
3132
3133 Tune local.at so that people can "autom4te -l autotest calc.at -o
3134 calc" for instance, to extract a sub test suite.
3135
3136 * tests/testsuite.at: Move the initialization, Autotest version
3137 requirement, and AT_TESTED invocation into...
3138 * tests/local.at: here.
3139 * tests/testsuite.at: Include it for compatibility with Autoconf
3140 2.57.
3141 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
3142 be ignore.
3143
3144 2003-08-04 Paul Eggert <eggert@twinsun.com>
3145
3146 Rework code slightly to avoid gcc -Wtraditional warnings.
3147 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
3148 The returned value is now stored in *YY0. All callers changed.
3149 * src/output.c (merge_output): Adjust to the above change.
3150
3151 2003-07-26 Paul Eggert <eggert@twinsun.com>
3152
3153 * data/glr.c (YYASSERT): New macro.
3154 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
3155 yyresolveStates, yyprocessOneStack):
3156 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
3157 Derived from a suggestion by Frank Heckenbach.
3158
3159 2003-07-25 Paul Eggert <eggert@twinsun.com>
3160
3161 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
3162 for portability to K&R C (after ansi2knr, presumably). See
3163 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
3164 by Frank Heckenbach, though I have omitted the structure-initialization
3165 part of his glr-knr.diff patch since I recall that the Portable
3166 C Compiler didn't require that change.
3167
3168 Let the user specify how to allocate and free memory.
3169 Derived from a suggestion by Frank Heckenbach in
3170 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
3171 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
3172 All uses of free, malloc, realloc changed to use these macros,
3173 and unnecessary casts removed.
3174 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
3175
3176 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
3177
3178 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
3179 use s.empty() rather than s == "" to test for empty string; see
3180 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
3181 (trivial change)
3182
3183 2003-06-25 Akim Demaille <akim@epita.fr>
3184
3185 * config/depcomp, config/install-sh: Update from masters.
3186
3187 2003-06-20 Paul Eggert <eggert@twinsun.com>
3188
3189 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
3190 and return properly parenthesized result.
3191 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
3192 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
3193 Remove unnecessary parentheses from uses.
3194 * doc/bison.texinfo (Location Default Action): Describe the
3195 conventions for parentheses.
3196
3197 2003-06-19 Paul Eggert <eggert@twinsun.com>
3198
3199 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
3200 yyreportTree): Do not assume that size_t is the same width as int,
3201 when printing sizes. Print sizes using an unsigned format.
3202 Problem reported by Frank Heckenbach in
3203 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
3204
3205 Port to Forte Developer 7 C compiler.
3206 * data/glr.c (struct YYLTYPE): If locations are not being used,
3207 declare a single dummy member, as empty structs do not conform
3208 to the C standard.
3209 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
3210 the Forte Developer 7 C compiler complains that end-of-loop
3211 code is not reached.
3212
3213 2003-06-17 Paul Eggert <eggert@twinsun.com>
3214
3215 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
3216 avoid warnings from picky compilers about redefinition of PARAMS.
3217
3218 2003-06-17 Paul Eggert <eggert@twinsun.com>
3219
3220 Version 1.875b.
3221
3222 * NEWS: Document 1.875b.
3223
3224 * lib/bbitset.h: Do not include config.h; that's the includer's job.
3225 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
3226 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
3227 Don't use 'index' in comments, as it's a builtin fn on some hosts.
3228 * lib/bitset_stats.c: Include gettext.h unconditionally, as
3229 per recent gettext manual's suggestion.
3230 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
3231 Use prototypes, not old-style definitions.
3232 * lib/lbitset.c (lbitset_unused_clear): Likewise.
3233 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
3234 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
3235 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
3236 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
3237 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
3238 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
3239 vbitset_or_and_cmp, vbitset_copy): Likewise.
3240
3241 * lib/libiberty.h: Do not include config.h; that's the includer's job.
3242 Do not include <stdlib.h>.
3243 (PARAMS): Define unconditionally for C89.
3244 (ATTRIBUTE_NORETURN): Remove.
3245 (ATTRIBUTE_UNUSED): Define unconditionally.
3246
3247 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
3248 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
3249 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
3250 * lib/vbitset.c, lib/vbitset.h: New files.
3251 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
3252 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
3253 from libbitset.
3254
3255 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
3256 `How Can I Reset @code{yyparse}', since texinfo does not allow
3257 arbitrary @ in node names.
3258
3259 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
3260 shouldn't be needed according to the gettext 0.12.1 documentation
3261 but which seem to be needed anyway: codeset.m4 glibc21.m4
3262 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
3263 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
3264 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
3265
3266 * lib/.cvsignore: Add stdbool.h.
3267 * m4/.cvsignore: Add nls.m4, po.m4.
3268
3269 Upgrade to CVS gnulib.
3270 * stdbool_.h: File renamed from stdbool.h.in.
3271 * configure.ac (AM_STDBOOL_H): Invoke this instead of
3272 AC_HEADER_STDBOOL.
3273 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
3274 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
3275 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
3276 (MOSTLYCLEANFILES): New var.
3277 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
3278 (stdbool.h): New rule.
3279 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
3280 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
3281 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
3282 m4/quote.m4: Upgrade to today's gnulib.
3283
3284 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
3285 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
3286 the tests right now.
3287 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
3288 yyerror are declared before use; C99 requires this.
3289
3290 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3291
3292 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
3293 first.
3294 (yyrecoverSyntaxError): Correct the logic for setting and testing
3295 yyerrState.
3296 Correct comment on handling EOF.
3297 Allow states with only a default reduction, rather than failing
3298 (I can't quite reconstruct why these were not allowed before).
3299
3300 Fixes to avoid problem that $-N rules in GLR parsers can cause
3301 buffer overruns, corrupting state.
3302
3303 * src/output.c (prepare_rules): Output max_left_semantic_context
3304 definition.
3305 * src/reader.h (max_left_semantic_context): New variable declaration.
3306 * src/scan-gram.l (max_left_semantic_context): Define.
3307 (handle_action_dollar): Update max_left_semantic_context.
3308 * data/glr.c (YYMAXLEFT): New definition.
3309 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
3310 (yyresolveAction): Ditto.
3311
3312 Fixes to problems with location handling in GLR parsers reported by
3313 Frank Heckenbach (2003/06/05).
3314
3315 * data/glr.c (YYLTYPE): Make trivial if locations not used.
3316 (YYRHSLOC): Add parentheses, and define only if locations used.
3317 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
3318 locations not used.
3319 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
3320 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
3321
3322 * tests/cxx-type.at: Exercise location information; update tests
3323 to differentiate output with and without locations.
3324 Remove forward declarations of yylex and yyerror---caused errors
3325 because default YYLTYPE not yet defined.
3326 Change semantic actions to compute strings, rather than printing
3327 them directly (to test proper passing of semantics values). Change
3328 output to prefix notation and update test data and expected results.
3329 (yylex): Track locations.
3330 (stmtMerge): Return value rather than printing, and include arguments
3331 in value.
3332
3333 2003-06-03 Paul Eggert <eggert@twinsun.com>
3334
3335 Avoid warnings generated by GCC 2.95.4 when Bison is
3336 configured with --enable-gcc-warnings.
3337 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
3338 yy::]b4_parser_class_name[::translate_,
3339 yy::Stack::operator[] (unsigned),
3340 yy::Stack::operator[] (unsigned) const,
3341 yy::Slice::operator[] (unsigned),
3342 yy::Slice::operator[] (unsigned) const):
3343 Rename local vars to avoid warnings.
3344 * tests/glr-regression.at (Improper handling of embedded actions
3345 and $-N in GLR parsers): Remove unused local variable from yylex.
3346 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
3347 (void) as arg when not pure, since we now assume C89 when building
3348 Bison. Pacify GCC by using parameter.
3349
3350 2003-06-02 Paul Eggert <eggert@twinsun.com>
3351
3352 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
3353 yy::Location::lines, yy::Location::columns): Rename arguments
3354 to avoid shadowing; this removes a warning generated by GCC 3.3.
3355
3356 2003-06-01 Paul Eggert <eggert@twinsun.com>
3357
3358 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
3359 to g++, as GCC 3.3 complains if you do it.
3360 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
3361 everything that WARNING_CFLAGS has, except omit warnings
3362 not suitable for C++.
3363 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
3364 * tests/atlocal.in (CXXFLAGS): New var.
3365 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
3366
3367 Fix a GLR parser bug I reported in February; see
3368 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
3369 The problem was that GLR parsers did not conform to the C standard,
3370 because actions like { $1 = $2 + $3; } expanded to expressions
3371 that invoked YYFILL in separate subexpressions, and YYFILL assigned
3372 to a local variable. The C standard says that expressions
3373 like (var = f ()) + (var = f ()) have undefined behavior.
3374 Another problem was that GCC sometimes issues warnings that
3375 yyfill and its parameters are unused.
3376
3377 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
3378 as possibly unused.
3379 (yyfill): New function.
3380 (YYFILL): Use it.
3381 (yyuserAction): Change type of yynormal to bool, so that it matches
3382 the new yyfill signature. Mark it as possibly unused.
3383
3384
3385 Follow up on a bug I reported in February, where a Bison-generated
3386 parser can loop. Provide a test case and a fix for yacc.c. I
3387 don't have a fix for lalr1.cc or for glr.c, unfortunately.
3388 The original bug report is in:
3389 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
3390
3391 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
3392 macro's size was becoming unwieldy.
3393 (yyerrlab): Do not discard an empty lookahead symbol, as this
3394 might destroy garbage.
3395 (yyerrorlab): New label, with the old contents of YYERROR,
3396 plus the following change: pop the stack of rhs corresponding
3397 to the production that invoked YYERROR. That is how Yacc
3398 behaves, and POSIX requires this behavior.
3399 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
3400 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
3401 Define 'alarm' to do nothing if unistd.h is not available.
3402 Add a new rule "exp: '-' error;" to test the above change to
3403 data/yacc.c. Use 'alarm' to abort any test taking longer than
3404 10 seconds, as it's probably looping.
3405 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
3406 Also, the new yacc.c generates two fewer diagnostics for an
3407 existing test.
3408
3409 2003-05-24 Paul Eggert <eggert@twinsun.com>
3410
3411 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
3412 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
3413 This fixes a problem reported by John Bowman when the Compaq/HP
3414 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
3415 -ansi -Wall -gall).
3416 * data/yacc.c (union yyalloc): Likewise.
3417 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
3418
3419 Switch from 'int' to 'bool' where that makes sense.
3420
3421 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
3422 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
3423 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
3424 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
3425 Return or accept bool, not int. All callers changed.
3426 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
3427 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
3428 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
3429 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
3430 bitset_or_and_cmp_): Likewise.
3431 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
3432 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
3433 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
3434 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
3435 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
3436 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
3437 bitset_stats_or_and_cmp): Likewise.
3438 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
3439 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
3440 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
3441 ebitset_xor_cmp): Likewise.
3442 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
3443 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
3444 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
3445 lbitset_xor_cmp): Likewise.
3446 * lib/bbitset.h: Include <stdbool.h>.
3447 (struct bitset_vtable): The following members now return bool, not
3448 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
3449 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
3450 or_and_cmp).
3451 * src/conflicts.c (count_rr_conflicts): Likewise.
3452 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
3453 All uses changed.
3454 * lib/ebitset.c (ebitset_obstack_init): Likewise.
3455 * lib/lbitset.c (lbitset_obstack_init): Likewise.
3456 * src/getargs.c (debug_flag, defines_flag, locations_flag,
3457 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
3458 graph_flag): Likewise.
3459 * src/getargs.h (debug_flag, defines_flag, locations_flag,
3460 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
3461 graph_flag): Likewise.
3462 * src/output.c (error_verbose): Likewise.
3463 * src/output.h (error_verbose): Likewise.
3464 * src/reader.c (start_flag, typed): Likewise.
3465 * src/reader.h (typed): Likewise.
3466 * src/getargs.c (LOCATIONS_OPTION): New constant.
3467 (long_options, getargs): Use it.
3468 * src/lalr.c (build_relations): Use bool, not int.
3469 * src/nullable.c (nullable_compute): Likewise.
3470 * src/print.c (print_reductions): Likewise.
3471 * src/tables.c (action_row, pack_vector): Likewise.
3472 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
3473 * src/output.c (prepare): Use it.
3474 * src/output.c (token_definitions_output,
3475 symbol_destructors_output, symbol_destructors_output): Use string,
3476 not boolean integer, to keep track of whether to output separator.
3477 * src/print_graph.c (print_core): Likewise.
3478 * src/state.c (state_rule_lookaheads_print): Likewise.
3479
3480 * config/install-sh: Sync from automake 1.7.5.
3481
3482 2003-05-14 Paul Eggert <eggert@twinsun.com>
3483
3484 * src/parse-gram.y (rules_or_grammar_declaration): Require a
3485 semicolon after a grammar declaration, in the interest of possible
3486 future changes to the Bison input language.
3487 Do not allow a stray semicolon at the start of the grammar.
3488 (rhses.1): Allow one or more semicolons after any rule, including
3489 just before "|" as required by POSIX.
3490 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
3491 grammar.
3492
3493 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
3494
3495 %parse-param support for lalr1.cc.
3496
3497 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
3498 b4_cc_constructor_calls, b4_cc_constructor_call,
3499 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
3500 definitions.
3501 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
3502 parse-param arguments.
3503 (yy::b4_parser_class_name): Declare instance variables to
3504 hold parse-param arguments.
3505 * tests/calc.at: s/value/semantic_value/ because value clashes
3506 with a member of yy::b4_parser_class_name. Adjust C++ code
3507 to handle %parse-param. Enable %parse-param test in C++.
3508
3509 2003-05-12 Paul Eggert <eggert@twinsun.com>
3510
3511 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
3512 English a bit. Fix fclose typo. Change "const char" to "char
3513 const", and use ANSI C rather than K&R for "main". Suggest
3514 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
3515 and suggest yy_switch_to_buffer.
3516
3517 2003-05-05 Paul Eggert <eggert@twinsun.com>
3518
3519 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
3520 C89. This avoids a diagnostic on compilers that define __STDC__
3521 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
3522 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
3523
3524 2003-05-03 Paul Eggert <eggert@twinsun.com>
3525
3526 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
3527 Do not overrun array bounds.
3528 This should fix a bug reported today by Olatunji Oluwabukunmi in
3529 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
3530
3531 2003-04-29 Akim Demaille <akim@epita.fr>
3532
3533 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
3534 * src/getargs.c, src/getargs.h: here, as bool, not int.
3535 (nondeterministic_parser): New.
3536 * src/parse-gram.y, src/scan-gram.l: Support
3537 %nondeterministic-parser.
3538 * src/output.c (prepare): Use nondeterministic_parser instead
3539 of glr_parser where appropriate.
3540 * src/tables.c (conflict_row, action_row, save_row)
3541 (token_actions, token_actions, pack_vector): Ditto.
3542
3543 2003-04-29 Akim Demaille <akim@epita.fr>
3544
3545 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
3546
3547 2003-04-29 Akim Demaille <akim@epita.fr>
3548
3549 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
3550 with %pure-parser and %locations to exercise the patch from Yakov
3551 Markovitch below.
3552
3553 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
3554
3555 * data/yacc.c: (b4_lex_param): Corrected for the case where
3556 %lex-param is provided and %pure-parser isn't.
3557
3558 2003-04-27 Paul Eggert <eggert@twinsun.com>
3559
3560 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
3561 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
3562 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
3563 if it is not defined.
3564 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
3565
3566 2003-04-26 Paul Eggert <eggert@twinsun.com>
3567
3568 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
3569 Declare to be of type suitable for the ninf value itself, not of
3570 type suitable for the corresponding table, since the latter might
3571 be unsigned but the ninf value might be negative. This fixes a
3572 bug reported by Alexandre Duret-Lutz in
3573 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
3574
3575 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
3576 invokes it. We shouldn't invoke it twice because it will attempt
3577 to put error.o in the archive twice. This fixes a glitch reported
3578 by Martin Mokrejs in
3579 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
3580
3581 2003-04-21 Paul Eggert <eggert@twinsun.com>
3582
3583 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
3584 to gnulib.
3585
3586 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
3587
3588 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
3589 Fix obvious typo that results in uncompilable GLR parsers
3590 when both %pure-parser and %locations are used. (trivial change)
3591
3592 2003-04-17 Paul Eggert <eggert@twinsun.com>
3593
3594 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
3595 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
3596 Do not insert the expected token via unput, as this runs afoul
3597 of a POSIX-compatibility bug in flex 2.5.31.
3598 All uses changed to BEGIN the parent state,
3599 since we no longer insert the expected token via unput.
3600 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
3601 that is no longer emitted after the above change.
3602
3603 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
3604 the first one. This change is from Paul Hilfinger, and it fixes
3605 regression reported by Werner Lemberg in
3606 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
3607
3608 (resolve_sr_conflict): Don't invoke state_errs_set
3609 unless one or more tokens have been explicitly made errors.
3610 Otherwise, the above change causes Bison to abort.
3611
3612 * tests/existing.at (GNU pic Grammar): New test case, taken from
3613 Lemberg's email.
3614
3615 2003-03-31 Akim Demaille <akim@epita.fr>
3616
3617 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
3618
3619 2003-03-31 Akim Demaille <akim@epita.fr>
3620
3621 * src/output.c (prepare_symbols): Avoid trailing spaces in the
3622 output.
3623
3624 2003-03-31 Akim Demaille <akim@epita.fr>
3625
3626 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
3627 From Paul Hilfinger.
3628
3629 2003-03-29 Akim Demaille <akim@epita.fr>
3630
3631 * m4/error.m4: Do not put under dynamic conditions some code which
3632 expansion is under static control.
3633
3634 2003-03-29 Akim Demaille <akim@epita.fr>
3635
3636 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
3637
3638 2003-03-29 Akim Demaille <akim@epita.fr>
3639
3640 * doc/bison.texinfo (Strings are Destroyed): New.
3641
3642 2003-03-13 Paul Eggert <eggert@twinsun.com>
3643
3644 * .cvsignore: Add configure.lineno.
3645 * src/.cvsignore: Add yacc.
3646 * tests/.cvsignore: Add testsuite.log.
3647 * doc/fdl.texi: Sync with latest FSF version.
3648
3649 2003-03-12 Paul Eggert <eggert@twinsun.com>
3650
3651 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
3652 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
3653 cursor, instead of leaving it undefined. This fixes a bug
3654 reported by Tim Van Holder in
3655 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
3656 * tests/input.at (Torturing the Scanner): Test the scanner on
3657 an empty input file, which was Tim Van Holder's test case.
3658
3659 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
3660 <sys/resource.h> can be included, include sys/time.h and
3661 sys/times.h first, if available. This works around the SunOS
3662 4.1.4 porting bug reported by Bruce Becker in
3663 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
3664
3665 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
3666 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
3667 AC_HEADER_SYS_WAIT.
3668
3669 Merge changes from gnulib. This was prompted because the CVS
3670 snapshot didn't build on Solaris 7 due to strnlen problems.
3671
3672 These changes need to be merged back into gnulib:
3673 * lib/hash.c: Include <stdbool.h> unconditionally.
3674 * m4/onceonly.m4 (m4_quote): New macro.
3675 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
3676 Quote AC_FOREACH variable-expansions properly.
3677 The 2003-01-03 obstack.h change also needs merging.
3678 {end of changes requiring merging}
3679
3680 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
3681 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
3682 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
3683 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
3684 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
3685 New files, imported from gnulib.
3686 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
3687 above.
3688
3689 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
3690 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
3691 gnulib sources.
3692
3693 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
3694 Add.
3695 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
3696 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
3697 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
3698 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
3699 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
3700 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
3701 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
3702 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
3703 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
3704 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
3705 (jm_PREREQ_ARGMATCH): Remove.
3706 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
3707 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
3708
3709 * src/system.h: Include <stdbool.h> unconditionally.
3710
3711 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
3712 assuming at least C89 in the bitset code for some time now.
3713
3714 2003-03-03 Akim Demaille <akim@epita.fr>
3715
3716 * ro.po: New.
3717
3718 2003-03-02 Akim Demaille <akim@epita.fr>
3719
3720 * doc/bison.texinfo (Table of Symbols): Reactivate the
3721 documentation for %lex-param, and %parse-param.
3722
3723 2003-03-02 Akim Demaille <akim@epita.fr>
3724
3725 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
3726 generate verbose error messages.
3727 Use the number of tokens as an upper bound in yytname, as it
3728 cannot be a non terminal.
3729
3730 2003-03-02 Akim Demaille <akim@epita.fr>
3731
3732 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
3733 message.
3734
3735 2003-03-02 Akim Demaille <akim@epita.fr>
3736
3737 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
3738 Use them to exercise yycheck overrun.
3739 Based on Andrew Suffield's grammar.
3740
3741 2003-03-02 Akim Demaille <akim@epita.fr>
3742
3743 Create tests/local.at for Bison generic testing macros.
3744
3745 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
3746 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
3747 This new file.
3748 * tests/calc.at (AT_CHECK_CALC): Adjust.
3749 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
3750 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
3751 * tests/local.at: here.
3752 (AT_COMPILE_CXX): Tags the tests using it as c++.
3753 Ignore the test if CXX is not functional.
3754
3755 2003-03-01 Paul Eggert <eggert@twinsun.com>
3756
3757 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
3758 not loc->end, since loc->end might contain garbage and this leads
3759 to undefined behavior on some platforms.
3760 (id_loc, token_start): Use (IF_LINTed) initial values that do not
3761 depend on *loc, so that the reader doesn't give the the false
3762 impression that *loc is initialized.
3763 (<INITIAL>"%%"): Do not bother setting code_start, since its value
3764 does not survive the return.
3765
3766 2003-03-01 Akim Demaille <akim@epita.fr>
3767
3768 * src/scan-gram.l (code_start): Always initialize it when entering
3769 into yylex, as SC_EPILOGUE is activated *before* the corresponding
3770 yylex invocation. An alternative would be making it static, but
3771 then it starts with the second %%'s beginning, instead of its end.
3772
3773 2003-02-28 Paul Eggert <eggert@twinsun.com>
3774
3775 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
3776 around a UnixWare 7.1.1 porting bug reported by John Hughes in
3777 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
3778
3779 2003-02-26 Paul Eggert <eggert@twinsun.com>
3780
3781 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
3782 Remove Sequent/Pyramid discussion (nobody uses them any more).
3783 Merge VMS and MS-DOS discussion; these ports may well be dead
3784 but let's keep mentioning them for now. Put <> around email
3785 addresses. Add copyright notice.
3786
3787 2003-02-24 Paul Eggert <eggert@twinsun.com>
3788
3789 * data/glr.c (yy_reduce_print): yylineno -> yylno,
3790 to avoid collision with flex use of yylineno.
3791 Problem reported by Bruce Lilly in
3792 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
3793 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
3794 * data/yacc.c (yy_reduce_print): Likewise.
3795
3796 * config/depcomp: Sync with Automake 1.7.3.
3797
3798 2003-02-21 Akim Demaille <akim@epita.fr>
3799
3800 * data/lalr1.cc: Use temporary variables instead of casts to
3801 change integer types.
3802 Suggested by Paul Eggert.
3803
3804 2003-02-21 Akim Demaille <akim@epita.fr>
3805
3806 * doc/bison.texinfo: Use "location" consistently to refer to @n,
3807 to avoid confusions with lalr1.cc's notion of Position.
3808 Suggested by Paul Eggert.
3809
3810 2003-02-20 Akim Demaille <akim@epita.fr>
3811
3812 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
3813 before initial_columns.
3814 (location.hh): Use consistent variable names when defining the
3815 operator<<.
3816 Use "last" so that we subtract from Positions, not from unsigned.
3817
3818 2003-02-20 Akim Demaille <akim@epita.fr>
3819
3820 * data/lalr1.cc (position.hh): New subfile, including the extended
3821 and Doxygen'ed documentation of class Position.
3822 (location.hh): Use it.
3823 Document a` la Doxygen.
3824 With the help of Benoit Perrot.
3825
3826 2003-02-20 Akim Demaille <akim@epita.fr>
3827
3828 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
3829 AT_YACC_IF.
3830 Redefine AT_YYERROR_SEES_LOC_IF using it.
3831 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
3832 not defined.
3833 Don't use the location in yy::Parser::error_ and
3834 yy::Parser::print_ when not %locations.
3835 Activate more lalr1.cc tests.
3836
3837 2003-02-19 Akim Demaille <akim@epita.fr>
3838
3839 * data/lalr1.cc: When displaying a line number, be sure to make it
3840 an int.
3841
3842 2003-02-19 Akim Demaille <akim@epita.fr>
3843
3844 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
3845 Remove, useless.
3846 (YYABORT, YYACCEPT, YYERROR): New.
3847 * tests/calc.at: Renable the lalr1.cc test.
3848
3849 2003-02-19 Akim Demaille <akim@epita.fr>
3850
3851 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
3852 error recovery, mixing with/without pops and discarding of the
3853 lookahead.
3854 Exercise YYERROR.
3855 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
3856
3857 2003-02-17 Paul Eggert <eggert@twinsun.com>
3858
3859 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
3860 * tests/testsuite.at (AT_COMPILE): Use them.
3861 This fixes the testsuite problem reported by Robert Lentz in
3862 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
3863
3864 2003-02-12 Paul Eggert <eggert@twinsun.com>
3865
3866 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
3867 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
3868 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
3869 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
3870 Check for malloc failure, for consistency with yacc.c.
3871 (yytname_size): Remove, for consistency with yacc.c.
3872
3873 The bug still remains in data/lalr1.cc, as I didn't have time
3874 to fix it there.
3875
3876 2003-02-06 Akim Demaille <akim@epita.fr>
3877
3878 * configure.ac (GXX): Rename as...
3879 (CXX): this, to keep the original Autoconf semantics.
3880 Require 2.57.
3881 * data/lalr1.cc: Fix b4_copyright invocations.
3882 If YYDEBUG is not defined, don't depend upon name_ being defined.
3883 (location.hh): Include string and iostream.
3884 (Position::filename): New member.
3885 (Position::Position ()): New.
3886 (operator<< (Position)): New.
3887 (operator- (Position, int)): New.
3888 (Location::first, Location::last): Rename as...
3889 (Location::begin, Location::end): these, to mock the conventional
3890 iterator names.
3891 (operator<< (Location)): New.
3892 * tests/atlocal.in (CXX): New.
3893 * tests/testsuite.at (AT_COMPILE_CXX): New.
3894 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
3895 locations in a more synthetic way.
3896 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
3897 lalr1.cc is used.
3898 Adjust the C locations to match those from Emacs: first column is
3899 column 0.
3900 Change all the expected results.
3901 Conform to the GCS: simplify the locations when applicable.
3902 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
3903 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
3904 these CPP macros with the m4 macros new defined by...
3905 (AT_CHECK_PUSHDEFS): this, i.e.:
3906 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
3907 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
3908 New macros.
3909 (AT_CHECK_POPDEFS): Undefine them.
3910 (AT_CHECK_CALC_LALR1_CC): New.
3911 Use it for the first lalr1.cc test.
3912
3913 2003-02-04 Akim Demaille <akim@epita.fr>
3914
3915 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
3916 Location as is defined.
3917
3918 2003-02-04 Akim Demaille <akim@epita.fr>
3919
3920 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
3921 name_ being defined.
3922
3923 2003-02-03 Paul Eggert <eggert@twinsun.com>
3924
3925 * src/gram.h (start_symbol): Remove unused decl.
3926
3927 Use more-consistent naming conventions for local vars.
3928
3929 * src/derives.c (derives_compute): Change type of local var from
3930 int to rule_number.
3931 * src/gram.c (grammar_rules_partial_print): Likewise.
3932 * src/print.c (print_core): Likewise.
3933 * src/reduce.c (reduce_grammar_tables): Likewise.
3934
3935 * src/gram.c (grammar_dump): Change name of item_number *
3936 local var from r to rp.
3937 * src/nullable.c (nullable_compute): Likewise.
3938
3939 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
3940
3941 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
3942 for symbol or symbol_number var.
3943 * src/reader.c (grammar_start_symbol_set): Likewise.
3944 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
3945 Likewise.
3946 * src/state.c (transitions_to): Likewise.
3947 * src/state.h: Likewise.
3948 * src/tables.c (symbol_number_to_vector_number): Likewise.
3949
3950 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
3951 char * var.
3952
3953 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
3954 var.
3955
3956 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
3957 var.
3958
3959 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
3960 Use str, not s, for char * var. Use ch, not c, for character var.
3961 Use size for size var.
3962
3963 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
3964 char * var.
3965 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
3966 uniqstr var.
3967 * src/uniqstr.h: Likewise.
3968
3969 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
3970 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
3971 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
3972 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
3973 param to have same name as that of enum, so that we don't use
3974 "s" to stand for a non-state.
3975
3976 2003-02-02 Akim Demaille <akim@epita.fr>
3977
3978 * src/scan-skel.l: Scan more than one inert character per yylex
3979 invocation.
3980
3981 2003-02-01 Paul Eggert <eggert@twinsun.com>
3982
3983 Version 1.875a.
3984
3985 * po/LINGUAS: Add ms.
3986
3987 2003-01-30 Akim Demaille <akim@epita.fr>
3988
3989 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
3990
3991 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3992
3993 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
3994 of $1.
3995
3996 Changes in response to error report by S. Eken: GLR mode does not
3997 handle negative $ indices or $ indices in embedded rules correctly.
3998 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
3999
4000 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
4001 (b4_rhs_location): Ditto.
4002 (yyfill): New function to copy from stack tree into array
4003 incrementally.
4004 (yyuserAction): Modify to allow incremental move of semantic values
4005 to rhs array when in GLR mode.
4006 Define YYFILL to use in user-defined actions to fill semantic array
4007 as needed.
4008 Remove dummy use of yystack, as there is now a guaranteed use.
4009 (yydoAction): Modify to allow incremental move of semantic values
4010 to rhs array when in GLR mode.
4011 (yyresolveAction): Ditto.
4012 (yyglrShiftDefer): Update comment.
4013 (yyresolveStates): Use X == NULL for pointers, not !X.
4014 (yyglrReduce): Ditto.
4015 (yydoAction): Ditto
4016
4017 * tests/glr-regr1.at: Rename to ...
4018 * tests/glr-regression.at: Add new regression test for the problems
4019 described above (adapted from S. Eken).
4020 Update copyright notice.
4021 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
4022 * tests/Makefile.am: Ditto.
4023
4024 2003-01-28 Paul Eggert <eggert@twinsun.com>
4025
4026 * data/lalr1.cc: Do not use @output_header_name@ unless
4027 b4_defines_flag is set. This fixes two bugs reported by
4028 Tim Van Holder in
4029 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
4030 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
4031
4032 2003-01-21 Paul Eggert <eggert@twinsun.com>
4033
4034 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
4035 we don't need to worry about yyerrlab1 being reported as an
4036 "unused label" by non-GCC C compilers. The downside is that if
4037 locations are used then a couple of statements are duplicated each
4038 time YYERROR is invoked, but the upside is that the warnings
4039 should vanish.
4040 (yyerrlab1): Move code to YERROR.
4041 (yyerrlab2): Remove. Change uses back to yyerrlab1.
4042 This reverts some of the 2002-12-27 change.
4043
4044 2003-01-17 Paul Eggert <eggert@twinsun.com>
4045
4046 * src/output.c (symbol_printers_output): Fix typo that led
4047 to core dump. Problem reported by Antonio Rus in
4048 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
4049
4050 2003-01-13 Akim Demaille <akim@epita.fr>,
4051 Quoc Peyrot <chojin@lrde.epita.fr>,
4052 Robert Anisko <anisko_r@lrde.epita.fr>
4053
4054 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
4055 when the stacks contain one element, as the loop would otherwise
4056 free the last state, and then use the top state (the one we just
4057 popped). This means that the initial elements will not be freed
4058 explicitly, as is the case in yacc.c; it is not a problem, as
4059 these elements have fake values.
4060
4061 2003-01-11 Paul Eggert <eggert@twinsun.com>
4062
4063 * NEWS: %expect-violations are now just warnings, reverting
4064 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
4065 bootstrapping problem reported by Matthias Klose; see
4066 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
4067 * src/conflicts.c (conflicts_print): Likewise.
4068 * tests/conflicts.at (%expect not enough, %expect too much,
4069 %expect with reduce conflicts): Likewise.
4070 * doc/bison.texinfo (Expect Decl): Document this. Also mention
4071 that the warning is enabled if the number of conflicts changes
4072 (not necessarily increases).
4073
4074 * src/getargs.c (version): Update copyright year.
4075
4076 2003-01-09 Akim Demaille <akim@epita.fr>
4077
4078 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
4079
4080 2003-01-08 Paul Eggert <eggert@twinsun.com>
4081
4082 * Makefile.maint (WGETFLAGS):
4083 New macro, containing "-C off" to disable proxy caches.
4084 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
4085 (rel-check): Use $(WGET) instead of wget.
4086
4087 2003-01-06 Paul Eggert <eggert@twinsun.com>
4088
4089 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
4090 the GLR paper of Scott, Johnstone and Hussain.
4091
4092 2003-01-04 Paul Eggert <eggert@twinsun.com>
4093
4094 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
4095 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
4096 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
4097 (EXTRA_LIBRARIES): New var, for liby.a.
4098 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
4099 (EXTRA_SCRIPTS): New var, for yacc.
4100
4101 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
4102 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
4103 Problem reported by Nelson H. F. Beebe.
4104
4105 2003-01-03 Paul Eggert <eggert@twinsun.com>
4106
4107 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
4108 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
4109 when compiling Bison 1.875's `bitset bset = obstack_alloc
4110 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
4111
4112 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
4113 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
4114 grow to a huge size with typical invocation.
4115
4116 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
4117 Use the pattern recommended by Autoconf 2.57, except also protect
4118 against double-definition.
4119 * src/system.h: Likewise.
4120 Portability issues reported by Nelson H. F. Beebe.
4121
4122 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
4123 All uses changed. Provide a definition in both C and C++.
4124 (yytrue, yyfalse): Define even if defined (__cplusplus).
4125
4126 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
4127 Reported by Nelson H. F. Beebe.
4128
4129 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
4130
4131 2003-01-02 Paul Eggert <eggert@twinsun.com>
4132
4133 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
4134 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
4135 Bug reported by Nelson H. F. Beebe.
4136
4137 2003-01-01 Paul Eggert <eggert@twinsun.com>
4138
4139 * Version 1.875.
4140
4141 2002-12-30 Paul Eggert <eggert@twinsun.com>
4142
4143 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
4144 Moved here from...
4145 (<INITIAL>","): Here. This causes stray "," to be treated
4146 more uniformly.
4147
4148 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
4149 last brace in braced code when not in Yacc mode, for compatibility
4150 with Bison 1.35. This resurrects the 2001-12-15 patch to
4151 src/reader.c.
4152
4153 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
4154 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
4155
4156 2002-12-28 Paul Eggert <eggert@twinsun.com>
4157
4158 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
4159 that of SYM's type. This fixes Debian bug 168069, reported by
4160 Thomas Olsson.
4161
4162 2002-12-28 Paul Eggert <eggert@twinsun.com>
4163
4164 Version 1.75f.
4165
4166 Switch back to the Yacc style of conflict reports, undoing some
4167 of the 2002-07-30 change.
4168 * doc/bison.texinfo (Understanding): Use Yacc style for
4169 conflict reports. Also, use new way of locating rules.
4170 * src/conflicts.c (conflict_report):
4171 Renamed from conflict_report_yacc, removing the old
4172 'conflict_report'. Translate the entire conflict report at once,
4173 so that we don't assume that "," has the same interpretation in
4174 all languages.
4175 (conflicts_output): Use Yacc-style conflict report for each state,
4176 instead of our more-complicated style.
4177 (conflicts_print): Use Yacc-style conflict report, except print
4178 the input file name when not emulating Yacc.
4179 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
4180 Conflicted Reduction, %expect not enough, %expect too much,
4181 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
4182 * tests/existing.at (GNU Cim Grammar): Likewise.
4183 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
4184
4185 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
4186 fatal): Don't invoke fflush; it's not needed and it might even be
4187 harmful for stdout, as stdout might not be open.
4188 * src/reduce.c (reduce_print): Likewise.
4189
4190 2002-12-27 Paul Eggert <eggert@twinsun.com>
4191
4192 Fix a bug where error locations were not being recorded correctly.
4193 This problem was originally reported by Paul Hilfinger in
4194 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
4195
4196 * data/yacc.c (yyparse): New local var yylerrsp, to record the
4197 top of the location stack's error locations.
4198 (yyerrlab): Set it. When discarding a token, push its location
4199 onto yylerrsp so that we don't lose track of the error's end.
4200 (yyerrlab1): Now is only the target of YYERROR, so that we can
4201 properly record the location of the action that failed. For GCC
4202 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
4203 GCC warning about yyerrlab1 being unused if YYERROR is unused.
4204 (yyerrlab2): New label, which yyerrlab now falls through to.
4205 Compute the error's location by applying YYLLOC_DEFAULT to
4206 the locations of all the symbols that went into the error.
4207 * doc/bison.texinfo (Location Default Action): Mention that
4208 YYLLOC_DEFAULT is also invoked for syntax errors.
4209 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
4210 Error locations include the locations of all the tokens that were
4211 discarded, not just the last token.
4212
4213 2002-12-26 Paul Eggert <eggert@twinsun.com>
4214
4215 * src/files.c: Include quote.h.
4216 (compute_output_file_names): Warn if we detect conflicting
4217 outputs to the same file. This should catch the misunderstanding
4218 exemplified by Debian Bug 165349, reported by Bruce Stephens..
4219
4220 * src/conflicts.c (conflicts_print): If the user specifies
4221 "%expect N", report an error if there are any reduce/reduce
4222 conflicts. This is what the manual says should happen.
4223 This fixes Debian bug 130890, reported by Anthony DeRobertis.
4224 * tests/conflicts.at (%expect with reduce conflicts): New test.
4225
4226 Don't use m4_include on relative file names, as it doesn't work as
4227 desired if there happens to be a file with that name under ".".
4228
4229 * m4sugar/version.m4: Remove; it was included but it wasn't used.
4230 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
4231 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
4232 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
4233 * src/output.c (output_skeleton): Use full path names when
4234 specifying a file to include; don't rely on include path, as
4235 it's unreliable when the working file contains a file with
4236 that name.
4237
4238 2002-12-25 Paul Eggert <eggert@twinsun.com>
4239
4240 Remove obsolete references to bison.simple and bison.hairy.
4241 Problem mentioned by Aubin Mahe in
4242 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
4243 * data/glr.c: Comment fix.
4244 * doc/bison.1: Remove references. Also, mention "yacc".
4245
4246 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
4247 with -g option.
4248
4249 * src/parse-gram.y (declaration): Use enum "report_states" rather
4250 than its numeric value 1.
4251
4252 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
4253 opening a new one. This fixes Debian bug 165349, reported by
4254 Bruce Stephens.
4255
4256 2002-12-24 Paul Eggert <eggert@twinsun.com>
4257
4258 Version 1.75e.
4259
4260 * Makefile.maint (cvs-update): Don't assume that the shell
4261 supports $(...), as Solaris sh doesn't.
4262
4263 * src/parse-gram.y (lloc_default): Remove test for empty
4264 nonterminals at the end, since it didn't change the result.
4265
4266 2002-12-24 Paul Eggert <eggert@twinsun.com>
4267
4268 If the user does not define YYSTYPE as a macro, Bison now declares it
4269 using typedef instead of defining it as a macro. POSIX requires this.
4270 For consistency, YYLTYPE is also declared instead of defined.
4271
4272 %union directives can now have a tag before the `{', e.g., the
4273 directive `%union foo {...}' now generates the C code
4274 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
4275 The default union tag is `YYSTYPE', for compatibility with Solaris 9
4276 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
4277 instead of `yyltype'.
4278
4279 `yystype' and `yyltype' are now obsolescent macros instead of being
4280 typedefs or tags; they are no longer documented and will be
4281 withdrawn in a future release.
4282
4283 * data/glr.c (b4_location_type): Remove.
4284 (YYSTYPE): Renamed from yystype.
4285 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
4286 (struct YYLTYPE): Renamed from struct yyltype.
4287 (YYLTYPE): Renamed from yyltype.
4288 (yyltype, yystype): New (and obsolescent) macros,
4289 for backward compatibility.
4290 * data/yacc.c: Likewise.
4291
4292 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
4293 does not specify a union tag. This is for compatibility with
4294 Solaris 9 yacc.
4295
4296 * src/parse-gram.y (add_param): 2nd arg is now char * not char
4297 const *, since it is now modified by stripping surrounding { }.
4298 (current_braced_code): Remove.
4299 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
4300 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
4301 trailing " {...}". Now of type <chars>.
4302 (grammar_declaration): Adjust to bundled tokens.
4303 (code_content): Remove; stripping is now done by add_param.
4304 (print_token_value): Print contents of bundled tokens.
4305 (token_name): New function.
4306
4307 * src/reader.h (braced_code, current_braced_code): Remove.
4308 (token_name): New decl.
4309
4310 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
4311 token_type, not braced_code code_kind. All uses changed.
4312 (SC_PRE_CODE): New state, for scanning after a keyword that
4313 has (or usually has) an immediately-following braced code.
4314 (token_type): New local var, to keep track of which token type
4315 to return when scanning braced code.
4316 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
4317 <INITIAL>"%parse-param", <INITIAL>"%printer",
4318 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
4319 instead of returning a token type immediately.
4320 (<INITIAL>"{"): Set token type.
4321 (<SC_BRACED_CODE>"}"): Use it.
4322 (handle_action_dollar, handle_action_at): Now returns bool
4323 indicating success. Fail if ! current_rule; this prevents a core dump.
4324 (handle_symbol_code_dollar, handle_symbol_code_at):
4325 Remove; merge body into caller.
4326 (handle_dollar, handle_at): Complain in invalid contexts.
4327
4328 * NEWS, doc/bison.texinfo: Document the above.
4329 * NEWS: Fix years and program names in copyright notice.
4330
4331 2002-12-17 Paul Eggert <eggert@twinsun.com>
4332
4333 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
4334 Reporting, Table of Symbols): Omit mentions of %lex-param and
4335 %parse-param from the documentation for now.
4336
4337 2002-12-15 Paul Eggert <eggert@twinsun.com>
4338
4339 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
4340 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
4341 lookahead symbol, and which sets yychar in parser actions) and it
4342 disagreed with the Bison documentation. Bug
4343 reported by Andrew Walrond.
4344
4345 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
4346 as the caller now does that.
4347 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
4348 (YYEMPTY): Parenthesize right hand side, since others use it.
4349 (yyparse): Don't assume that our generated code is the only code
4350 that sets yychar.
4351
4352 2002-12-13 Paul Eggert <eggert@twinsun.com>
4353
4354 Version 1.75d.
4355
4356 POSIX requires a "yacc" command.
4357 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
4358 (MOSTLYCLEANFILES): Add yacc.
4359 (yacc): New rule.
4360 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
4361 as an alias for bison y.
4362
4363 * po/LINGUAS: Add da.
4364
4365 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
4366 problem with latest <getopt.h>.
4367 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
4368
4369 * doc/fdl.texi: Upgrade to 1.2.
4370 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
4371 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
4372 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
4373 gnulib.
4374 * config/install-sh: Sync with autotools.
4375
4376 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
4377 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
4378 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
4379 locations are requested.
4380 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
4381 locations are requested.
4382
4383 2002-12-12 Paul Eggert <eggert@twinsun.com>
4384
4385 Remove unportable casts and storage allocation tricks.
4386 While we're at it, remove almost all casts, since they
4387 usually aren't needed and are a sign of trouble.
4388
4389 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
4390
4391 * src/derives.c (derives_compute): Do not subtract NTOKENS from
4392 the pointer DSET returned by malloc; this isn't portable.
4393 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
4394 Similarly for DERIVES.
4395 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
4396 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
4397 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
4398
4399 * src/derives.c (derives_compute): Do not bother invoking
4400 int_of_rule_number, since rule numbers are integers.
4401
4402 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
4403 rather than XMALLOC (char, N).
4404
4405 * src/files.c (filename_split): Rewrite to avoid cast.
4406
4407 * src/gram.h (symbol_number_as_item_number,
4408 item_number_as_symbol_number, rule_number_as_item_number,
4409 item_number_as_rule_number):
4410 Now inline functions rather than macros, to avoid casts.
4411 * src/state.h (state_number_as_int): Likewise.
4412 * src/tables.c (state_number_to_vector_number,
4413 symbol_number_to_vector_number): Likewise.
4414
4415 * src/gram.h (int_of_rule_number): Remove; no longer used.
4416
4417 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
4418 since the resulting storage is always stored into.
4419
4420 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
4421 where it's needed.
4422
4423 * src/muscle_tab.c (muscle_m4_output):
4424 Now inline. Return bool, not int.
4425 * src/state.c (state_compare): Likewise.
4426 * src/symtab.c (symbol_check_defined,
4427 symbol_check_alias_consistency, symbol_pack, symbol_translation,
4428 hash_compare_symbol, hash_symbol):
4429 Likewise.
4430 * src/uniqstr.c (uniqstr_print): Likewise.
4431 * src/muscle_tab.c (muscle_m4_output_processor):
4432 New function, to avoid casts.
4433 * src/state.c (state_comparator, stage_hasher): Likewise.
4434 * src/symtab.c (symbol_check_defined_processor,
4435 symbol_check_alias_consistency_processor, symbol_pack_processor,
4436 symbol_translation_processor, hash_symbol_comparator,
4437 hash_symbol_hasher): Likewise.
4438 * src/uniqstr.c (uniqstr_print_processor): Likewise.
4439 * src/muscle_tab.c (muscles_m4_output):
4440 Use new functions instead of casting old functions unportably.
4441 * src/state.c (state_hash_new): Likewise.
4442 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
4443 symbols_token_translations_init):
4444 Likewise.
4445 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
4446
4447 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
4448 var instead of casting to long, to avoid casts.
4449 (prepare_states): Use MALLOC rather than alloca, so that we don't
4450 have to worry about alloca.
4451 * src/state.c (state_hash_lookup): Likewise.
4452
4453 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
4454 local var instead of casting to unsigned char, to avoid casts.
4455
4456 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
4457 STATE_ALLOC): Remove.
4458 (transitions_new, errs_new, reductions_new, state_new): Use malloc
4459 rather than calloc, and use offsetof to avoid allocating slightly
4460 too much storage.
4461 (state_new): Initialize all members.
4462
4463 * src/state.c (state_hash): Use unsigned accumulator, not signed.
4464
4465 * src/symtab.c (symbol_free): Remove; unused.
4466 (symbol_get): Remove cast in lhs of assignment.
4467 (symbols_do): Now static. Accept generic arguments, not
4468 hashing-related ones.
4469
4470 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
4471 (symbol_processor): Remove.
4472 (symbols_do): Remove decl; now static.
4473
4474 * src/system.h (alloca): Remove; decl no longer needed.
4475 (<stddef.h>): Include, for offsetof.
4476 (<inttypes.>, <stdint.h>): Include if available.
4477 (uintptr_t): New type, if system lacks it.
4478 (CALLOC, MALLOC, REALLOC): New macros.
4479 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
4480 new macros.
4481
4482 * src/tables.c (table_size): Now int, to pacify GCC.
4483 (table_grow, table_ninf_remap): Use signed table size.
4484 (save_row): Don't bother initializing locals when not needed.
4485 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
4486 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
4487
4488 * src/vcg.h: Correct misspellings.
4489
4490 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
4491
4492
4493 * src/getargs.c (getargs): Don't assume EOF == -1.
4494
4495 2002-12-09 Paul Eggert <eggert@twinsun.com>
4496
4497 Change identifier spellings to avoid collisions with names
4498 that are reserved by POSIX.
4499
4500 Don't use names ending in _t, since POSIX reserves them.
4501 For consistency, remove _e and _s endings -- they're weren't
4502 needed to remove ambiguity. All uses changed.
4503 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
4504 turn was just renamed from struniq_t.
4505 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
4506 which in turn was just renamed from struniq_processor_t.
4507 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
4508 in turn was renamed from hash_compare_struniq_t.
4509 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
4510 (state_list): Renamed from state_list_t.
4511 * src/assoc.h (assoc): Renamed from assoc_t.
4512 * src/conflicts.c (enum conflict_resolution): Renamed from
4513 enum conflict_resolution_e.
4514 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
4515 (rule_list): Renamed from rule_list_t.
4516 * src/getargs.h (enum trace): Renamed from enum trace_e.
4517 (enum report): Renamed from enum report_e.
4518 * src/gram.h (item_number): Renamed from item_number_t.
4519 (rule_number): Renamed from rule_number_t.
4520 (struct rule_s): Remove the "rule_s" part; not used.
4521 (rule): Renamed from rule_t.
4522 (rule_filter): Renamed from rule_filter_t.
4523 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
4524 (goto_list): Renamed from goto_list_t.
4525 * src/lalr.h (goto_number): Renamed from goto_number_t.
4526 * src/location.h (location): Renamed from location_t.
4527 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
4528 and moved here from:
4529 * src/muscle_tab.h (muscle_entry_t): here.
4530 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
4531 (rule_list): Renamed from rule_list_t.
4532 * src/print_graph.c (static_graph): Renamed from graph.
4533 * src/reader.h (braced_code): Renamed from braced_code_t.
4534 Remove brace_code_e tag.
4535 * src/relation.h (relation_node): Renamed from relation_node_t.
4536 (relation_nodes): Renamed from relation_nodes_t.
4537 (relation): Renamed from relation_t.
4538 * src/state.h (state_number): Renamed from state_number_t.
4539 (struct state): Renamed from struct state_s.
4540 (state): Renamed from state_t.
4541 (transitions): Renamed from transitions_t. Unused (and
4542 misspelled) transtion_s tag removed.
4543 (errs): Renamed from errs_t. Unused errs_s tag removed.
4544 (reductions): Renamed from reductions_t. Unused tag
4545 reductions_s removed.
4546 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
4547 (struct symbol_list): Renamed from struct symbol_list_s.
4548 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
4549 (struct symbol): Renamed from struct symbol_s.
4550 (symbol): Renamed from symbol_t.
4551 * src/tables.c (vector_number): Renamed from vector_number_t.
4552 (action_number): Renamed from action_t.
4553 * src/tables.h (base_number): Renamed from base_t.
4554 * src/vcg.h (enum color): Renamed from enum color_e.
4555 (enum textmode): Renamed from enum textmode_e.
4556 (enum shape): Renamed from enum shape_e.
4557 (struct colorentry): Renamed from struct colorentry_s.
4558 (struct classname): Renamed from struct classname_s.
4559 (struct infoname): Renamed from struct infoname_s.
4560 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
4561 (enum decision): Renamed from enum decision_e.
4562 (enum orientation): Renamed from enum orientation_e.
4563 (enum alignment): Renamed from enum alignment_e.
4564 (enum arrow_mode): Renamed from enum arrow_mode_e.
4565 (enum crossing_type): Renamed from enum crossing_type_e.
4566 (enum view): Renamed from enum view_e.
4567 (struct node): Renamed from struct node_s.
4568 (node): Renamed from node_t.
4569 (enum linestyle): Renamed from enum linestyle_e.
4570 (enum arrowstyle): Renamed from enum arrowstyle_e.
4571 (struct edge): Renamed from struct edge.
4572 (edge): Renamed from edge_t.
4573 (struct graph): Renamed from struct graph_s.
4574 (graph): Renamed from graph_t.
4575 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
4576 Rename value_t -> value.
4577 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
4578 value_t_as_yystype -> value_as_yystype.
4579
4580 Don't include <errno.h> in the mainstream code, since it
4581 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
4582 * lib/get-errno.c, lib/get-errno.h: New files.
4583 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
4584 get-errno.c.
4585 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
4586 * src/output.c (output_skeleton): Likewise.
4587 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
4588 instead of errno.
4589 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
4590 Likewise.
4591 (handle_action_dollar, handle_action_at): Likewise.
4592 * src/system.h: Do not include <errno.h>.
4593 (TAB_EXT): Renamed from EXT_TAB.
4594 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
4595
4596 Avoid str[a-z]*, since <string.h> reserves that name space.
4597 Change all instances of "struniq" in names to "uniqstr", and
4598 likewise for "STRUNIQ" and "UNIQSTR".
4599 * src/uniqstr.c: Renamed from src/struniq.c.
4600 * src/uniqstr.h: Renamed from src/struniq.h.
4601 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
4602 * src/files.c (strsuffix): Remove; unused.
4603 (concat2): Renamed from stringappend. Now static.
4604 * src/files.h (strsuffix, stringappend): Remove; unused.
4605 * src/parse-gram.y (<chars>): Renamed from <string>.
4606 (<uniqstr>): Renamed from <struniq>.
4607 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
4608 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
4609 (struct graph_s.expand): Renamed from struct graph_s.stretch.
4610 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
4611 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
4612 (N_EXPAND): Renamed from N_STRETCH.
4613
4614 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
4615 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
4616 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
4617 Remove; unused.
4618 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
4619 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
4620 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
4621 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
4622 (BASE_MAXIMUM): Renamed from BASE_MAX.
4623 (BASE_MINIMUM): Renamed from BASE_MIN.
4624 (ACTION_MAX): Remove; unused.
4625 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
4626 Unnecessary casts removed from above defines.
4627
4628
4629 Fix misspelling in names.
4630 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
4631 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
4632 G_NODE_ALIGNEMENT.
4633
4634
4635 * lib/timevar.c (timevar_report): Renamed from time_report,
4636 for consistency with other names.
4637 * lib/timevar.h (timevar_report): New decl.
4638 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
4639
4640
4641 Sort include-file uses.
4642
4643 Reorder all include files under src to be in the order "system.h".
4644 then the ../lib include files in angle brackets (alphabetized),
4645 then the . include files in double-quotes (alphabetized). Fix
4646 dependency breakages encountered in this process, as follows:
4647 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
4648 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
4649 * src/state.h: Include "symtab.h".
4650
4651 2002-12-08 Paul Eggert <eggert@twinsun.com>
4652
4653 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
4654 since this causes problems when __file__ contains character
4655 sequences like "@" that are treated specially by src/scan-skel.l.
4656 Instead, just use the file's basename. This fixes the bug
4657 reported by Martin Mokrejs in
4658 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
4659
4660 2002-12-06 Paul Eggert <eggert@twinsun.com>
4661
4662 Add support for rules that do not have trailing semicolons, as
4663 POSIX requires. Improve the quality of locations in Bison
4664 diagnostics.
4665
4666 * src/location.c: Include <quotearg.h>.
4667 (empty_location): Now const.
4668 (location_print): New function. Follow the recommendation of the
4669 GNU Coding Standards for locations that span file boundaries.
4670 * src/location.h: Do not include <quotearg.h>; no longer needed.
4671 (boundary): New type.
4672 (location_t): Use it. This allows locations to span file boundaries.
4673 All member uses changed: file -> start.file or end.file (as needed),
4674 first_line -> start.line, first_column -> start.column,
4675 last_line -> end.line, last_column -> end.column.
4676 (equal_boundaries): New function.
4677 (LOCATION_RESET, LOCATION_STEP): Remove.
4678 (LOCATION_PRINT): Remove. All callers changed to use location_print.
4679 (empty_location): Now const.
4680 (location_print): New decl.
4681 * src/parse-gram.y (lloc_default): New function, which handles
4682 empty locations more accurately.
4683 (YYLLOC_DEFAULT): Use it.
4684 (%token COLON): Remove.
4685 (%token ID_COLON): New token.
4686 (rules): Use it.
4687 (declarations, rules): Remove trailing semicolon.
4688 (declaration, rules_or_grammar_declaration):
4689 Allow empty (";") declaration.
4690 (symbol_def): Remove empty actions; no longer needed.
4691 (rules_or_grammar_declaration): Remove trailing semicolon.
4692 (semi_colon.opt): Remove.
4693 * src/reader.h: Include location.h.
4694 (scanner_cursor): New decl.
4695 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
4696 rolling our own.
4697 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
4698 of *loc.
4699 (STEP): Remove. No longer needed, now that adjust_location does
4700 the work. All uses removed.
4701 (scanner_cursor): New var.
4702 (adjust_location): Renamed from extend_location. It now sets
4703 *loc and adjusts the scanner cursor. All uses changed.
4704 Don't bother testing for CR.
4705 (handle_syncline): Remove location arg; now updates scanner cursor.
4706 All callers changed.
4707 (unexpected_end_of_file): Now accepts start boundary of token or
4708 comment, not location. All callers changed. Update scanner cursor,
4709 not the location.
4710 (SC_AFTER_IDENTIFIER): New state.
4711 (context_state): Renamed from c_context. All uses changed.
4712 (id_loc, code_start, token_start): New local vars.
4713 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
4714 processing of Yacc white space and equivalents here.
4715 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
4716 instead of returning ID immediately, since we need to search for
4717 a subsequent colon.
4718 (<INITIAL>"'", "\""): Save token_start.
4719 (<INITIAL>"%{", "{", "%%"): Save code_start.
4720 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
4721 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
4722 BEGIN context_state at end, not INITIAL.
4723 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
4724 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
4725 Return correct token start.
4726 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
4727 the start of a character, string or multiline comment is found.
4728 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
4729 Reduction): Adjust reported locations to match the more-precise
4730 results now expected.
4731 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
4732 * tests/reduce.at (Useless Rules, Reduced Automaton,
4733 Underivable Rules): Likewise.
4734 * tests/regression.at (Invalid inputs): No longer `expecting ";"
4735 or "|"' now that so many other tokens are allowed by the new grammar.
4736
4737 * src/complain.h (current_file): Remove duplicate decl;
4738 current_file is now owned by files.h.
4739 * src/complain.c, src/scan-gram.l: Include files.h.
4740
4741 2002-12-06 Paul Eggert <eggert@twinsun.com>
4742
4743 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
4744 promotes to int; it might be unsigned int.
4745 * data/yacc.c (yy_reduce_print): Likewise.
4746
4747 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
4748 be #defined in the prologue, not in the Bison declarations.
4749 This fixes Debian Bug 102878, reported by Shaul Karl.
4750
4751 2002-12-02 Paul Eggert <eggert@twinsun.com>
4752
4753 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
4754 * lib/strtoul.c: New file, from gnulib.
4755 This fixes a porting bug reported by Peter Klein in
4756 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
4757
4758 2002-11-30 Paul Eggert <eggert@twinsun.com>
4759
4760 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
4761 and put only a forward declaration in the prologue. This is for
4762 consistency with the other scanner helper functions.
4763
4764 Type clashes now generate warnings, not errors, since it
4765 appears that POSIX may allow some grammars with type clashes.
4766 * src/reader.c (grammar_current_rule_check): Warn about
4767 type clashes instead of complaining.
4768 * tests/input.at (Type Clashes): Expect warnings, not complaints.
4769
4770 Add Yacc library, since POSIX requires it.
4771 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
4772 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
4773 * lib/main.c, lib/yyerror.c: New files.
4774
4775 gram_error can be static; it need not be extern.
4776 * src/reader.h (gram_error): Remove decl.
4777 * src/parse-gram.y (gram_error): Now static. Add static decl.
4778 (print_token_value): Omit parameter names from forward decl,
4779 for consistency.
4780
4781 2002-11-29 Paul Eggert <eggert@twinsun.com>
4782
4783 * doc/bison.texinfo: Emphasize that yylex and yyerror must
4784 be declared before being used. E.g., one should typically
4785 declare them in the prologue. Use GNU coding style in examples.
4786 Put "const" consistently after the type it modifies. Mention
4787 that C99 supports "inline". Mention that yyerror traditionally
4788 returns "int".
4789
4790 %parse-param and %lex-param now take just one argument, the
4791 declaration; the argument name is deduced from the declaration.
4792
4793 * doc/bison.texinfo (Parser Function, Pure Calling, Error
4794 Reporting, Table of Symbols): Document this.
4795 * src/parse-gram.y (add_param): New function.
4796 (COMMA): Remove.
4797 (declaration): Implement new rule for %parse-param and %lex-param.
4798 * src/scan-gram.l: "," now elicits a warning, rather than being
4799 a token; this is more compatible with byacc.
4800 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
4801
4802 2002-11-27 Paul Eggert <eggert@twinsun.com>
4803
4804 Rename identifiers to avoid real and potential collisions.
4805
4806 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
4807 to avoid collision with lex macro described by Bruce Lilly in
4808 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
4809 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
4810 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
4811 * src/parse-gram.y (print_token_value): Renamed from yyprint.
4812 All uses changed.
4813 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
4814 The name "yycontrol" violates the name space rules, and this stuff
4815 wasn't being used anyway.
4816 (input): Remove action; this stuff wasn't being used.
4817 (gram_error): Rename local variable yylloc -> loc.
4818 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
4819 (YY_DECL): Don't use "yy" at start of local variables.
4820 All uses changed, e.g., yylloc -> loc.
4821 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
4822 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
4823 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
4824 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
4825
4826 * src/parse-gram.y (gram_error): loc is now const *.
4827 * src/reader.h (gram_error): Likewise.
4828
4829 2002-11-24 Paul Eggert <eggert@twinsun.com>
4830
4831 Version 1.75c.
4832
4833 * tests/actions.at (Actions after errors): Use an output format
4834 more similar to that of the Printers and Destructors test.
4835 Test the position of the ';' token too.
4836 (Printers and Destructors): Likewise.
4837 (Printers and Destructors: %glr-parser): Remove for now, to avoid
4838 unnecessarily alarming people when the test fails.
4839
4840 * data/yacc.c (yyerrlab1): Move this label down, so that the
4841 parser does not discard the lookahead token if the user code
4842 invokes YYERROR. This change is required for POSIX conformance.
4843
4844 * lib/error.c: Sync with gnulib.
4845
4846 2002-11-22 Paul Eggert <eggert@twinsun.com>
4847
4848 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
4849 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
4850 * lib/xmalloc.c: Likewise.
4851
4852 2002-11-20 Paul Eggert <eggert@twinsun.com>
4853
4854 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
4855
4856 2002-11-20 Paul Eggert <eggert@twinsun.com>
4857
4858 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
4859 should use `if (! x) abort ();' rather than `assert (x);', and
4860 anyway it's one less thing to worry about configuring.
4861
4862 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
4863 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
4864 and replace all instances of assert with abort.
4865 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
4866 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
4867
4868 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
4869 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
4870 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
4871 hash_find_entry, hash_rehash, hash_insert): Likewise.
4872 * src/conflicts.c (resolve_sr_conflict): Likewise.
4873 * src/lalr.c (set_goto_map, map_goto): Likewise.
4874 * src/nullable.c (nullable_compute): Likewise.
4875 * src/output.c (prepare_rules, token_definitions_output): Likewise.
4876 * src/reader.c (packgram, reader): Likewise.
4877 * src/state.c (state_new, state_free, state_transitions_set,
4878 state_reduction_find): Likewise.
4879 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
4880 symbol_pack): Likewise.
4881 * src/tables.c (conflict_row, pack_vector): Likewise.
4882 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
4883 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
4884 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
4885 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
4886
4887 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
4888 (ARGMATCH_CONSTRAINT): New macro.
4889 (ARGMATCH_ASSERT): Use it.
4890
4891 * src/system.h (verify): New macro.
4892 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
4893 rather than assert.
4894 * src/tables.c (tables_generate): Likewise.
4895
4896 * src/struniq.c (struniq_assert): Now returns void, and aborts
4897 if the assertion is false.
4898 (struniq_assert_p): Remove.
4899 * src/struniq.h: Likewise.
4900
4901 2002-11-18 Paul Eggert <eggert@twinsun.com>
4902
4903 * data/glr.c (yygetLRActions): Replace `yyindex' with
4904 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
4905 This fixes the regression with Sun ONE Studio 7 cc that I reported in
4906 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
4907
4908 2002-11-18 Akim Demaille <akim@epita.fr>
4909
4910 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
4911 space.
4912 From Tim Van Holder.
4913
4914 2002-11-17 Paul Eggert <eggert@twinsun.com>
4915
4916 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
4917 to "SyntaxError" for consistency with my 2002-11-15 change.
4918
4919 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
4920 not define to {}, since this breaks the common use of `YYDPRINTF
4921 ((...));' if a single statement is desired (e.g. before `else').
4922 Work around GCC warnings by surrounding corresponding calls with
4923 {} if needed.
4924 (yyhasResolvedValue): Remove unused function.
4925 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
4926 loop body.
4927 (yyreportSyntaxError): Renamed from yyreportParseError.
4928 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
4929 All uses changed.
4930 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
4931 extern when possible. Remove unused initializations.
4932
4933 2002-11-16 Akim Demaille <akim@epita.fr>
4934
4935 Augment the similarity between GLR and LALR traces.
4936
4937 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
4938 (YY_REDUCE_PRINT): New.
4939 (yyparse): Use them.
4940 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
4941 YYDPRINT here.
4942 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
4943 state reached after the reduction/recovery, since...
4944 (yyparse, yyprocessOneStack): Report the state we are entering in.
4945
4946 2002-11-16 Akim Demaille <akim@epita.fr>
4947
4948 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
4949 Add support for --trace=skeleton.
4950 * src/scan-skel.l: %option debug.
4951 Scan strings of non-@ or \n instead of character by character.
4952 (scan_skel): Handle trace_skeleton.
4953 (QPUTS): New.
4954 (@output_parser_name@, @output_header_name@): ``Restore'' their
4955 support (used to be M4 macros).
4956 * data/yacc.c: Quote larger chunks, a la glr.c.
4957 * data/lalr1.cc: Likewise.
4958 The header guards are no longer available, so use some other
4959 string than `YYLSP_NEEDED'.
4960
4961 2002-11-16 Akim Demaille <akim@epita.fr>
4962
4963 Make the ``Printers and Destructors'' test more verbose, taking
4964 `yacc.c''s behavior as (possibly wrong) reference.
4965
4966 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
4967 instead of fprint on stdout.
4968 Set and report the last_line of the symbols.
4969 Consistently display values and locations.
4970
4971 2002-11-16 Paul Eggert <eggert@twinsun.com>
4972
4973 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
4974
4975 2002-11-15 Paul Eggert <eggert@twinsun.com>
4976
4977 * tests/actions.at (Actions after errors): New test case.
4978
4979 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
4980 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
4981 tests/action.at, tests/calc.at, tests/conflicts.at,
4982 tests/cxx-type.at, tests/regression.at:
4983 "parse error" -> "syntax error" for POSIX compatibility.
4984 "parsing stack overflow..." -> "parser stack overflow" so
4985 that code matches Bison documentation.
4986
4987 2002-11-15 Akim Demaille <akim@epita.fr>
4988
4989 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
4990 take two BRACED_CODE, not two string_content.
4991 Free the scanner's obstack when we are done.
4992 (code_content): New.
4993 * tests/calc.at: Adjust.
4994 * doc/bison.texinfo: Adjust.
4995 Also, make sure to include the `,' for these declarations.
4996
4997 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
4998
4999 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
5000 definition; avoids potential autoreconf problems.
5001
5002 2002-11-15 Akim Demaille <akim@epita.fr>
5003
5004 Always check the value returned by yyparse.
5005
5006 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
5007 returned by yyparse.
5008 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
5009 Adjust calls.
5010 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
5011 returned by yyparse.
5012
5013 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5014
5015 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
5016 on input.at test.
5017
5018 2002-11-14 Paul Eggert <eggert@twinsun.com>
5019
5020 * src/output.c (output_skeleton): Call xfopen instead of
5021 duplicating xfopen's body.
5022
5023 Fix bugs reported by Nelson H. F. Beebe in
5024 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
5025
5026 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
5027 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
5028 Group compiler. Instead, use "$CC -E bar.c". Include the .h
5029 file twice in the grammar, as an extra check.
5030
5031 * tests/input.at (Torturing the Scanner): Surround the
5032 backslash-newline tests with "#if 0", to make it less likely that
5033 we'll run into compiler bugs. Bring back solitary \ inside
5034 comment, but add a closing comment to work around HP C bug. Don't
5035 test backslash-newline in C character constant.
5036
5037 2002-11-14 Akim Demaille <akim@epita.fr>
5038
5039 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
5040 status of the compiler.
5041 Calling `exit 1' is no longer needed.
5042 Reported by Nelson H. F. Beebe.
5043
5044 2002-11-14 Akim Demaille <akim@epita.fr>
5045
5046 * tests/atlocal.in (CPPFLAGS): We have config.h.
5047 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
5048 New.
5049 * tests/actions.at, tests/calc.at, tests/conflicts.at,
5050 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
5051 * tests/regression.at, tests/torture.at: Use them for all the
5052 grammars that are to be compiled.
5053 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
5054 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
5055 * doc/bison.texinfo (GLR Parsers): Document `inline'.
5056
5057 2002-11-14 Akim Demaille <akim@epita.fr>
5058
5059 * doc/bison.texinfo: Various formatting changes (alignments in
5060 samples, additional @group/@end group, GCS in samples.
5061 Use @deffn instead of simple @table to define the directives,
5062 macros, variables etc.
5063
5064 2002-11-13 Paul Eggert <eggert@twinsun.com>
5065
5066 Fix some bugs reported by Albert Chin-A-Young in
5067 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
5068
5069 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
5070 -o c"; the HP C compiler chatters during compilation.
5071 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
5072 * tests/headers.at (export YYLTYPE): Likewise.
5073
5074 * tests/input.at (Torturing the Scanner): Remove lines containing
5075 solitary backslashes, as they tickle a bug in the HP C compiler.
5076
5077 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
5078 comments, since they're not portable. Use GNU coding style.
5079
5080 2002-11-13 Akim Demaille <akim@epita.fr>
5081
5082 * data/yacc.c: Leave bigger chunks of quoted text.
5083 (YYDSYMPRINTF): New.
5084 Use it to report symbol activities.
5085 * data/glr.c (YYDSYMPRINTF): New.
5086 Use it.
5087
5088 2002-11-12 Paul Eggert <eggert@twinsun.com>
5089
5090 Version 1.75b.
5091
5092 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
5093 (yyglrReduce): Return yyok, not 0.
5094 This should avoid the enumerated-type warnings reported
5095 by Nelson H. F. Beebe in
5096 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
5097
5098 * lib/bbitset.h (BITSET_INLINE): Remove.
5099 * lib/bitset.h [! BITSET_INLINE]: Remove.
5100 (bitset_set, bitset_reset, bitset_test): Rename local vars
5101 to avoid shadowing warnings by GCC.
5102
5103 * data/glr.c (inline): Remove #define. It's the user's
5104 responsibility to #define it away, just like 'const'.
5105 This fixes one of the bugs reported by Nelson H. F. Beebe in
5106 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
5107
5108 * Makefile.maint (po-check): Scan .l and .y files instead of the
5109 .c and the .h files that they generate. This fixes the bug
5110 reported by Tim Van Holder in:
5111 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
5112 Look for N_ as well as for _. Try to avoid matching #define for
5113 N_ and _.
5114 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
5115 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
5116 * src/scan-gram.l: Revamp regular expressions so that " and '
5117 do not confuse xgettext.
5118
5119 * src/struniq.h (struniq_new): Do not declare the return type
5120 to be 'const'; this violates the C standard.
5121 * src/struniq.c (struniq_new): Likewise.
5122
5123 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
5124
5125 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
5126 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
5127 linker.
5128
5129 2002-11-12 Akim Demaille <akim@epita.fr>
5130
5131 * Makefile.maint: Sync with Autoconf:
5132 (local_updates): New.
5133
5134 2002-11-12 Akim Demaille <akim@epita.fr>
5135
5136 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
5137
5138 2002-11-12 Akim Demaille <akim@epita.fr>
5139
5140 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
5141 locations.
5142
5143 2002-11-12 Akim Demaille <akim@epita.fr>
5144
5145 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
5146 not yyvalue.
5147
5148 2002-11-12 Akim Demaille <akim@epita.fr>
5149
5150 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
5151 Use it to test the GLR parser.
5152
5153 2002-11-12 Akim Demaille <akim@epita.fr>
5154
5155 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
5156 defines it.
5157 * data/glr.c (yystos): New.
5158 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
5159 (YYDSYMPRINT): New.
5160 (yyval): Don't define it, it is handled via M4.
5161 (yyrecoverParseError): Free verbosely the discarded symbols.
5162 * data/yacc.c (yysymprint): Remove, rather...
5163 (b4_yysymprint_generate): invoke.
5164 * data/c.m4 (b4_yysymprint_generate): New.
5165 Accept pointers as arguments, as opposed to the version from
5166 yacc.c.
5167 (b4_yydestruct_generate): Likewise.
5168 * tests/cations.at (Printers and Destructors): Use Bison directives
5169 instead of CPP macros.
5170 Don't rely on internal details.
5171
5172 2002-11-12 Akim Demaille <akim@epita.fr>
5173
5174 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
5175 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
5176 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
5177 it against YYEMPTY and so forth), work on yytoken (i.e., set
5178 it to YYEMPTY etc.).
5179 (yydestruct): Replace with a b4_yydestruct_generate invocation.
5180 (b4_symbol_actions): Remove.
5181 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
5182 for 0, end-of-input.
5183
5184 2002-11-12 Akim Demaille <akim@epita.fr>
5185
5186 * doc/bison.texinfo (Destructor Decl): New.
5187
5188 2002-11-12 Akim Demaille <akim@epita.fr>
5189
5190 * src/tables.c (tables_generate): Use free for pointers that
5191 cannot be NULL, not XFREE.
5192 (pack_vector): Use assert, not fatal, for bound violations.
5193 * src/state.c (state_new): Likewise.
5194 * src/reader.c (reader): Likewise.
5195 * src/lalr.c (set_goto_map): Likewise.
5196 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
5197 the file name.
5198
5199 2002-11-12 Akim Demaille <akim@epita.fr>
5200
5201 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
5202 Restore.
5203 * src/scan-gram.l (last_string): Is global to the file, not to
5204 yylex.
5205 * src/parse-gram.y (input): Don't append the epilogue here,
5206 (epilogue.opt): do it here, and free the scanner's obstack.
5207 * src/reader.c (epilogue_set): Rename as...
5208 (epilogue_augment): this.
5209 * data/c.m4 (b4_epilogue): Defaults to empty.
5210
5211 2002-11-12 Akim Demaille <akim@epita.fr>
5212
5213 * src/getargs.c (long_options): Remove duplicates.
5214 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
5215 Remove.
5216 * doc/bison.rnh: Remove.
5217 * doc/bison.texinfo (VMS Invocation): Remove.
5218
5219 2002-11-12 Akim Demaille <akim@epita.fr>
5220
5221 * src/struniq.h, src/struniq.c (struniq_t): Is const.
5222 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
5223
5224 Use struniq for symbols.
5225
5226 * src/symtab.h (symbol_t): The tag member is a struniq.
5227 (symbol_type_set): Adjust.
5228 * src/symtab.c (symbol_new): Takes a struniq.
5229 (symbol_free): Don't free the tag member.
5230 (hash_compare_symbol_t, hash_symbol_t): Rename as...
5231 (hash_compare_symbol, hash_symbol): these.
5232 Use the fact that tags as struniqs.
5233 (symbol_get): Use struniq_new.
5234 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
5235 Returns a strniq.
5236 * src/reader.h (merger_list, grammar_currentmerge_set): The name
5237 and type members are struniqs.
5238 * src/reader.c (get_merge_function)
5239 (grammar_current_rule_merge_set): Adjust.
5240 (TYPE, current_type): Are struniq.
5241
5242 Use struniq for file names.
5243
5244 * src/files.h, src/files.c (infile): Split into...
5245 (grammar_file, current_file): these.
5246 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
5247 * src/reduce.c (reduce_print): Likewise.
5248 * src/getargs.c (getargs): Likewise.
5249 * src/complain.h, src/complain.c: Likewise.
5250 * src/main.c (main): Call struniqs_new early enough to use it for
5251 file names.
5252 Don't free the input file name.
5253
5254 2002-11-12 Akim Demaille <akim@epita.fr>
5255
5256 * src/symtab.c (symbol_free): Remove dead deactivated code:
5257 type_name are properly removed.
5258 Don't use XFREE to free items that cannot be NULL.
5259 * src/struniq.h, src/struniq.c: New.
5260 * src/main.c (main): Initialize/free struniqs.
5261 * src/parse-gram.y (%union): Add astruniq member.
5262 (yyprint): Adjust.
5263 * src/scan-gram.l (<{tag}>): Return a struniq.
5264 Free the obstack bit that used to store it.
5265 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
5266
5267 2002-11-11 Paul Eggert <eggert@twinsun.com>
5268
5269 Revamp to fix many (but not all) of the C- and M4-related quoting
5270 problems. Among other things, this fixes the Bison bug reported
5271 by Jan Hubicka when processing the Bash grammar; see:
5272 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
5273
5274 Use new @ escapes consistently. Represent brackets with @{ and @}
5275 rather than @<:@ and @:>@, since this works a bit better with dumb
5276 editors like vi. Represent @ with @@, since @ is now consistently
5277 an escape. Use @oline@ and @ofile@ rather than __oline__ and
5278 __ofile__, to avoid unexpected expansions. Similarly, use @output
5279 rather than #output.
5280
5281 * data/c.m4 (b4_copyright): Omit file name from comment, since
5282 the file name could contain "*/".
5283 (b4_synclines_flag): Don't quote the 2nd argument; it should already
5284 be quoted. All uses changed.
5285
5286 * data/glr.c: Use new @ escapes consistently.
5287 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
5288 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
5289 Remove, since they couldn't handle arbitrary characters in file
5290 names.
5291 * data/lalr1.cc: Likewise.
5292 * data/yacc.c: Likewise.
5293
5294 * src/files.c (output_infix): Remove; all uses removed.
5295 * src/files.h: Likewise.
5296
5297 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
5298 mishandled funny characters in file names, and anyway it isn't
5299 needed any more.
5300 * data/yacc.c: Likewise.
5301 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
5302
5303 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
5304 * data/yacc.c: Likewise.
5305
5306 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
5307 strings now.
5308 (muscle_init): Quote filename as a C string.
5309 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
5310 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
5311 * src/output.c (escaped_file_name_output): New function.
5312 (prepare_symbols): Quote tokens for M4.
5313 (prepare): Don't insert output_infix, output_prefix,
5314 output_parser_name, output_header_name; this is now down by scan-skel.
5315 Insert skeleton as a C string.
5316
5317 * src/output.c (user_actions_output, symbol_destructors_output,
5318 symbol_printers_output): Quote filenames for C and M4.
5319 * src/reader.c (prologue_augment, epilogue_set): Likewise.
5320
5321 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
5322 escapes other than \\ and \'; this simplifies the code.
5323 (<SC_STRING>): Likewise, for \\ and \".
5324 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
5325 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
5326 Use new escapes @{ and @} for [ and ].
5327
5328 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
5329 them with auto vars.
5330 Switch to new escape scheme, where @ is the escape character uniformly.
5331 Abort if a stray escape character is found. Avoid unbounded input
5332 buffer when parsing non-escaped text.
5333
5334 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
5335 __oline__, #output, $@, and @{ do not have unintended meanings.
5336
5337 2002-11-09 Paul Eggert <eggert@twinsun.com>
5338
5339 Fix the test failure due to GCC warnings described in
5340 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
5341 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
5342 evaluate to 0 if it's impossible for NINF to be in the respective
5343 table.
5344 (yygetLRActions, yyrecoverParseError): Use them.
5345
5346 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
5347 counted in the token inserted at end of file. Now takes
5348 location_t *, not location_t, so that the location can be
5349 adjusted. All uses changed.
5350
5351 * tests/regression.at (Invalid inputs): Adjust wording in
5352 diagnostic to match the new behavior.
5353
5354 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
5355 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
5356 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
5357 abort ();'. This reduces the runtime of the "Many lookaheads"
5358 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
5359 GCC 3.2.
5360
5361 2002-11-07 Paul Eggert <eggert@twinsun.com>
5362
5363 * src/parse-gram.y (CHARACTER): Remove unused token.
5364 All uses removed.
5365
5366 * src/scan-gram.l: Remove stack option. We no longer use the
5367 stack, since the stack was never deeper than 1; instead, use the
5368 new auto var c_context to record the stacked value.
5369
5370 Remove nounput option. At an unexpected end of file, we now unput
5371 the minimal input necessary to end cleanly; this simplifies the
5372 code.
5373
5374 Avoid unbounded token sizes where this is easy.
5375
5376 (unexpected_end_of_file): New function.
5377 Use it to systematize the error message on unexpected EOF.
5378 (last-string): Now auto, not static.
5379 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
5380 (scanner_last_string_free): Remove; not used.
5381 (percent_percent_count): Move decl to just before use.
5382 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
5383 not the (never otherwised-used) CHARACTER.
5384
5385 2002-11-07 Akim Demaille <akim@epita.fr>
5386
5387 Let yyerror always receive the msg as last argument, so that
5388 yyerror can be variadic.
5389
5390 * data/yacc.c (b4_yyerror_args): New.
5391 Use it when calling yyerror.
5392 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
5393 Use it when calling yyerror.
5394 * doc/bison.texinfo (Error Reporting): Adjust.
5395 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
5396 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
5397
5398 2002-11-06 Akim Demaille <akim@epita.fr>
5399
5400 #line should have quoted strings.
5401 Ideally, this should be done by m4_quotearg.
5402
5403 * src/scan-skel.l: Include quotearg.h.
5404 Quote __ofile__.
5405 * src/output.c (symbol_printers_output)
5406 (symbol_destructors_output): Quote the file name.
5407
5408 2002-11-06 Akim Demaille <akim@epita.fr>
5409
5410 * tests/regression.at (Invalid inputs): Adjust to the recent
5411 messages.
5412
5413 2002-11-06 Akim Demaille <akim@epita.fr>
5414
5415 Restore --no-lines.
5416 Reported by Jim Kent.
5417
5418 * data/c.m4 (b4_syncline): New.
5419 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
5420 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
5421 * src/output.c (user_actions_output): Likewise.
5422 (prepare): Define 'b4_synclines_flag'.
5423 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
5424
5425 2002-11-06 Akim Demaille <akim@epita.fr>
5426
5427 * src/main.c (main): Free `infile'.
5428 * src/scan-gram.l (handle_syncline): New.
5429 Recognize `#line'.
5430 * src/output.c (user_actions_output, symbol_destructors_output)
5431 (symbol_printers_output): Use the location's file name, not
5432 infile.
5433 * src/reader.c (prologue_augment, epilogue_set): Likewise.
5434
5435 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5436
5437 * src/tables.c (matching_state): Don't allow states to match if
5438 either has GLR conflict entries.
5439
5440 2002-11-05 Paul Eggert <eggert@twinsun.com>
5441
5442 * src/scan-gram.l: Use more accurate diagnostics, e.g.
5443 "integer out of range" rather than "invalid value".
5444 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
5445 accordingly.
5446
5447 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
5448 Also, remove one static variable in the scanner.
5449
5450 * src/scan-gram.l (braces_level): Now auto, not static.
5451 Initialize to zero if the compiler is being picky.
5452 (INITIAL): Clear braces_level instead of incrementing it.
5453 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
5454 as POSIX 1003.1-2001 requires.
5455 * src/system.h (IF_LINT): New macro, taken from coreutils.
5456 * configure.ac: Define "lint" if --enable-gcc-warnings.
5457
5458 2002-11-05 Akim Demaille <akim@epita.fr>
5459
5460 * src/scan-gram.l: When it starts with `%', complain about the
5461 whole directive, not just that `invalid character: %'.
5462
5463 2002-11-04 Akim Demaille <akim@epita.fr>
5464
5465 * Makefile.maint: Update from Autoconf.
5466 (update, cvs-update, po-update, do-po-update): New.
5467
5468 2002-11-04 Akim Demaille <akim@epita.fr>
5469
5470 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
5471 and yyerror.
5472 Have yyerror `use' its arguments.
5473 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
5474 returns true when location & yacc & pure & parse-param.
5475 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
5476
5477 2002-11-04 Akim Demaille <akim@epita.fr>
5478
5479 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
5480 clashes.
5481 * src/scan-gram.l: Use [\'] instead of ['] to pacify
5482 font-lock-mode.
5483 Use complain_at.
5484 Use quote, not quote_n since LOCATION_PRINT no longer uses the
5485 slot 0.
5486
5487 2002-11-03 Paul Eggert <eggert@twinsun.com>
5488
5489 * src/reader.c (get_merge_function, grammar_current_rule_check):
5490 Use consistent diagnostics for reporting type name clashes.
5491 Quote the types with <>, for consistency with Yacc.
5492 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
5493
5494 2002-11-03 Akim Demaille <akim@epita.fr>
5495
5496 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
5497 New.
5498 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
5499 (b4_parse_param): Remove.
5500 Use b4_identification.
5501 Propagate b4_pure_args where needed to pass them to yyerror.
5502 * data/glr.m4 (b4_parse_param): Remove.
5503 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
5504 (b4_lpure_formals): New.
5505 Use b4_identification.
5506 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
5507 b4_user_formals and b4_user_args.
5508 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
5509 (yyreportAmbiguity): When using a pure parser, also need
5510 the location, and the parse-params.
5511 Adjust callers.
5512 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
5513 When using a pure parser, also need the parse-params.
5514 Adjust callers.
5515 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
5516 (%pure-parser + %parse-param) LALR and GLR parsers.
5517 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
5518 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
5519 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
5520 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
5521 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
5522 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
5523 * doc/bison.texinfo: Untabify the whole file.
5524 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
5525 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
5526 (Error Reporting): Adjust to these new directives.
5527 Document %error-verbose, deprecate YYERROR_VERBOSE.
5528
5529 2002-11-03 Akim Demaille <akim@epita.fr>
5530
5531 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
5532 AT_CHECK_CALC_GLR invocations to use % directives, instead of
5533 command line options.
5534 * tests/cxx-type.at: Formatting changes.
5535
5536 2002-11-03 Paul Eggert <eggert@twinsun.com>
5537
5538 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
5539 to count columns correctly, and to check for invalid inputs.
5540
5541 Use mbsnwidth to count columns correctly. Account for tabs, too.
5542 Include mbswidth.h.
5543 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
5544 (extend_location): New function.
5545 (YY_LINES): Remove.
5546
5547 Handle CRLF in C code rather than in Lex code.
5548 (YY_INPUT): New macro.
5549 (no_cr_read): New function.
5550
5551 Scan UCNs, even though we don't fully handle them yet.
5552 (convert_ucn_to_byte): New function.
5553
5554 Handle backslash-newline correctly in C code.
5555 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
5556 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
5557 all uses changed.
5558 (tag, splice): New EREs. Do not allow NUL or newline in tags.
5559 Use {splice} wherever C allows backslash-newline.
5560 YY_STEP after space, newline, vertical-tab.
5561 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
5562
5563 (letter, id): Don't assume ASCII; e.g., spell out a-z.
5564
5565 ({int}, handle_action_dollar, handle_action_at): Check for integer
5566 overflow.
5567
5568 (YY_STEP): Omit trailing semicolon, so that it's more like C.
5569
5570 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
5571 as well as \000. Check for UCHAR_MAX, not 255.
5572 Allow \x with an arbitrary positive number of digits, as in C.
5573 Check for overflow here.
5574 Allow \? and UCNs, for compatibility with C.
5575
5576 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
5577 with quote slot used by complain_at.
5578
5579 * tests/input.at: Add tests for backslash-newline, m4 quotes
5580 in symbols, long literals, and funny escapes in strings.
5581
5582 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
5583 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
5584 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
5585 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
5586 * m4/mbswidth.m4: New file, from GNU coreutils.
5587
5588 * doc/bison.texinfo (Grammar Outline): Document // comments.
5589 (Symbols): Document that trigraphs have no special meaning in Bison,
5590 nor is backslash-newline allowed.
5591 (Actions): Document that trigraphs have no special meaning.
5592
5593 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
5594 no longer used.
5595
5596 2002-11-02 Paul Eggert <eggert@twinsun.com>
5597
5598 * src/reader.c: Don't include quote.h; not needed.
5599 (get_merge_function): Reword warning to be consistent with
5600 type clash diagnostic in grammar_current_rule_check.
5601
5602 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
5603 bug in trigraph handling.
5604
5605 * src/output.c (prepare_symbols): When printing token names,
5606 escape "[" as "@<:@" and likewise for "]".
5607
5608 * src/system.h (errno): Remove declaration, as we are now
5609 assuming C89 or better, and C89 guarantees errno.
5610
5611 2002-10-30 Paul Eggert <eggert@twinsun.com>
5612
5613 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
5614 Check for close failures.
5615 * src/files.h (xfclose): Return void, not int, since it always
5616 returned zero.
5617 * src/files.c (xfclose): Likewise. Report I/O error if ferror
5618 indicates one.
5619 * src/output.c (output_skeleton): Use xfclose rather than fclose
5620 and ferror. xfclose now checks ferror.
5621
5622 * data/glr.c (YYLEFTMOST_STATE): Remove.
5623 (yyreportTree): Use a stack-based leftmost state. This avoids
5624 our continuing battles with bogus warnings about initializers.
5625
5626 2002-10-30 Akim Demaille <akim@epita.fr>
5627
5628 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
5629 #if.
5630
5631 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5632
5633 * tests/glr-regr1.at: New test for reported regressions.
5634 * tests/testsuite.at: Add glr-regr1.at test.
5635 * tests/Makefile.am: Add glr-regr1.at test.
5636
5637 2002-10-24 Paul Eggert <eggert@twinsun.com>
5638
5639 Version 1.75a.
5640
5641 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
5642 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
5643 we use malloc. Don't assume 'A' through 'Z' are contiguous.
5644 Don't assume strdup exists; POSIX says its an XSI extension.
5645 Check for buffer overflow on input.
5646
5647 2002-10-24 Akim Demaille <akim@epita.fr>
5648
5649 * src/output.c (output_skeleton): Don't disable M4sugar comments
5650 too soon: it results in comments being expanded.
5651 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
5652 first output.
5653
5654 2002-10-24 Akim Demaille <akim@epita.fr>
5655
5656 * data/yacc.c (m4_int_type): New.
5657 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
5658 char' as only yacc.c wants K&R portability.
5659 * data/glr.c (yysigned_char): Remove.
5660 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
5661 Reported by Quoc Peyrot.
5662
5663 2002-10-23 Paul Eggert <eggert@twinsun.com>
5664
5665 * src/main.c (main): With --trace=time, report times even if a
5666 non-fatal error occurs. Formerly, the times were reported in some
5667 such cases but not in others.
5668 * src/reader.c (reader): Just return if a complaint has been issued,
5669 instead of exiting, so that 'main' can report times.
5670
5671 2002-10-22 Akim Demaille <akim@epita.fr>
5672
5673 * src/system.h: Include sys/types.
5674 Reported by Bert Deknuydt.
5675
5676 2002-10-23 Paul Eggert <eggert@twinsun.com>
5677
5678 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
5679 Suggested by Art Haas.
5680
5681 2002-10-22 Paul Eggert <eggert@twinsun.com>
5682
5683 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
5684 decl; not needed any more.
5685 * src/main.c (main): Use return to exit, undoing yesterday's change.
5686 The last OS that we could find where this wouldn't work is
5687 SunOS 3.5, and that's too old to worry about now.
5688
5689 * data/glr.c (struct yyltype): Define members even when not
5690 doing locations. This is more consistent with yacc.c, and it
5691 works around the following bug reports:
5692 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
5693 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
5694
5695 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
5696 @acronym consistently. Standardize on "Yacc" instead of "YACC",
5697 "Algol" instead of "ALGOL". Give a bit more history about BNF.
5698
5699 2002-10-22 Akim Demaille <akim@epita.fr>
5700
5701 * data/README: New.
5702
5703 2002-10-21 Paul Eggert <eggert@twinsun.com>
5704
5705 Be consistent about 'bool'; the old code used an enum in one
5706 module and an int in another, and this violates the C standard.
5707 * m4/stdbool.m4: New file, from coreutils 4.5.3.
5708 * configure.ac (AC_HEADER_STDBOOL): Add.
5709 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
5710 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
5711 * src/symtab.c (hash_compare_symbol_t): Likewise.
5712 * src/system.h (bool, false, true): Use a definition consistent
5713 with ../lib/hash.c. All uses changed.
5714
5715 * src/complain.c (warning_issued): Renamed from warn_message_count,
5716 so that we needn't worry about integer overflow (!).
5717 Now of type bool. All uses changed.
5718 (complaint_issued): Renamed from complain_message_count; likewise.
5719
5720 * src/main.c (main): Use exit to exit with failure.
5721
5722 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
5723 rather than 1 and 0.
5724 * src/main.c (main): Likewise.
5725 * src/getargs.c (getargs): Likewise.
5726 * src/reader.c (reader): Likewise.
5727
5728 * src/getarg.c (getargs): Remove duplicate code for
5729 "Try `bison --help'".
5730
5731 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
5732 What was that "2" for?
5733
5734 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
5735 * src/getargs.c (usage): Likewise.
5736
5737 * src/getargs.c (getargs): When there are too few operands, report
5738 the last one. When there are too many, report the first extra
5739 one. This is how diffutils does it.
5740
5741 2002-10-20 Paul Eggert <eggert@twinsun.com>
5742
5743 Remove K&R vestiges.
5744 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
5745 * src/complain.c (VA_START): Remove. Assume prototypes.
5746 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
5747 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
5748 fatal): Assume prototypes.
5749 * src/complain.h: Assume prototypes.
5750 * src/system.h (PARAMS): Remove.
5751 Include <limits.h> unconditionally, since it's guaranteeed even
5752 for a freestanding C89 compiler.
5753 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
5754 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
5755
5756 2002-10-20 Akim Demaille <akim@epita.fr>
5757
5758 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
5759 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
5760 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
5761 (yyresolveStates, yyresolveAction, yyresolveStack)
5762 (yyprocessOneStack): Use them.
5763 (yy_reduce_print): New.
5764 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
5765
5766 2002-10-20 Akim Demaille <akim@epita.fr>
5767
5768 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
5769 arguments and output `void'.
5770 (b4_c_function): Rename as...
5771 (b4_c_function_def): this.
5772 (b4_c_function_decl, b4_c_ansi_function_def)
5773 (b4_c_ansi_function_decl): New.
5774 Change the interpretation of the arguments: before `int, foo', now
5775 `int foo, foo'.
5776 * data/yacc.c (yyparse): Prototype and define thanks to these.
5777 Adjust b4_c_function_def uses.
5778 * data/glr.c (yyparse): Likewise, but ANSI only.
5779
5780 2002-10-20 Akim Demaille <akim@epita.fr>
5781
5782 * src/output.c (prepare): Move the definition of `tokens_number',
5783 `nterms_number', `undef_token_number', `user_token_number_max'
5784 to...
5785 (prepare_tokens): Here.
5786 (prepare_tokens): Rename as...
5787 (prepare_symbols): this.
5788 (prepare): Move the definition of `rules_number' to...
5789 (prepare_rules): here.
5790 (prepare): Move the definition of `last', `final_state_number',
5791 `states_number' to...
5792 (prepare_states): here.
5793 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
5794
5795 2002-10-20 Akim Demaille <akim@epita.fr>
5796
5797 * src/tables.h, src/tables.c, src/output.c: Comment changes.
5798
5799 2002-10-20 Akim Demaille <akim@epita.fr>
5800
5801 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
5802 * data/c.m4: here.
5803
5804 2002-10-20 Akim Demaille <akim@epita.fr>
5805
5806 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
5807 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
5808 `pair'.
5809 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
5810 `name' to...
5811 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
5812 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
5813 These.
5814
5815 2002-10-19 Paul Eggert <eggert@twinsun.com>
5816
5817 Do not create a temporary file, as that involves security and
5818 cleanup headaches. Instead, use a pair of pipes.
5819 Derived from a suggestion by Florian Krohm.
5820 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
5821 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
5822 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
5823 (BISON_PREREQ_SUBPIPE): Add.
5824 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
5825 Add subpipe.h, subpipe.c.
5826 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
5827 * po/POTFILES.in: Add lib/subpipe.c.
5828 * src/output.c: Include "subpipe.h".
5829 (m4_invoke): Remove decl.
5830 (scan_skel): New decl.
5831 (output_skeleton): Use pipe rather than temporary file for m4 input.
5832 Check that m4sugar.m4 is readable, to avoid deadlock.
5833 Check for pipe I/O error.
5834 * src/scan-skel.l (readpipe): Remove decl.
5835 (scan_skel): New function, to be used in place of m4_invoke.
5836 Read from stream rather than file.
5837
5838 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
5839 float, as this generates a warning on Solaris 8 + GCC 3.2 with
5840 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
5841 this generates a more-accurate value anyway.
5842
5843 * lib/timevar.c (timervar_accumulate): Rename locals to
5844 avoid confusion with similarly-named more-global.
5845 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
5846
5847 * src/output.c (prepare): Use xstrdup to convert char const *
5848 to char *, to avoid GCC warning.
5849
5850 2002-10-19 Akim Demaille <akim@epita.fr>
5851
5852 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
5853 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
5854 Use them to have `calc.y' ready for %pure-parser.
5855 * data/yacc.c (YYLEX): Pass a yylex return type to
5856 b4_c_function_call.
5857
5858 2002-10-19 Akim Demaille <akim@epita.fr>
5859
5860 Prototype support of %lex-param and %parse-param.
5861
5862 * src/parse-gram.y: Add the definition of the %lex-param and
5863 %parse-param tokens, plus their rules.
5864 Drop the `_' version of %glr-parser.
5865 Add the "," token.
5866 * src/scan-gram.l (INITIAL): Scan them.
5867 * src/muscle_tab.c: Comment changes.
5868 (muscle_insert, muscle_find): Rename `pair' as `probe'.
5869 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
5870 (muscle_entry_s): The `value' member is no longer const.
5871 Adjust all dependencies.
5872 * src/muscle_tab.c (muscle_init): Adjust: use
5873 MUSCLE_INSERT_STRING.
5874 Initialize the obstack earlier.
5875 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
5876 (muscle_pair_list_grow): New.
5877 * data/c.m4 (b4_c_function_call, b4_c_args): New.
5878 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
5879 * tests/calc.at: Use %locations, not --locations.
5880 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
5881
5882 2002-10-19 Akim Demaille <akim@epita.fr>
5883
5884 * src/getargs.c (usage): Take status as argument and exit
5885 accordingly.
5886 Report the traditional `Try ... --help' message when status != 0.
5887 (usage, version): Don't take a FILE * as arg, it is pointless.
5888 (getargs): When there is an incorrect number of arguments, make it
5889 an error, and report it GNUlically thanks to `usage ()'.
5890
5891 2002-10-18 Paul Eggert <eggert@twinsun.com>
5892
5893 * data/glr.c (yyreportParseError): Don't assume that sprintf
5894 yields the length of the printed string, as this is not true
5895 on SunOS 4.1.4. Reported by Peter Klein.
5896
5897 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
5898 * tests/conflicts.at (%nonassoc and eof): Likewise.
5899 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
5900
5901 2002-10-17 Akim Demaille <akim@epita.fr>
5902
5903 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
5904 * src/getargs.c (trace_types, trace_args): Adjust.
5905 * src/reader.c (grammar_current_rule_prec_set)
5906 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
5907 Standardize error messages.
5908 And s/@prec/%prec/!
5909 (reader): Use trace_flag to enable scanner/parser debugging,
5910 instead of an adhoc scheme.
5911 * src/scan-gram.l: Remove trailing debugging code.
5912
5913 2002-10-16 Paul Eggert <eggert@twinsun.com>
5914
5915 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
5916 MUSCLE_TAB_H.
5917
5918 * NEWS: Officially drop support for building Bison with K&R C,
5919 since it didn't work anyway and it's not worth worrying about.
5920 * Makefile.maint (wget_files): Remove ansi2knr.c.
5921 (ansi2knr.c-url_prefix): Remove.
5922 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
5923 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
5924 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
5925
5926 2002-10-15 Paul Eggert <eggert@twinsun.com>
5927
5928 Stop using the "enum_" trick for K&R-style function definitions;
5929 it confused me, and I was the author! Instead, assume that people
5930 who want to use K&R C compilers (when using these modules in GCC,
5931 perhaps?) will run ansi2knr.
5932
5933 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
5934 All uses of "enum_" changed to "enum ".
5935 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
5936 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
5937
5938 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
5939 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
5940 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
5941 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
5942 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
5943 abitset_not, abitset_ones, abitset_or, abitset_or_and,
5944 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
5945 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
5946 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
5947 Use function prototypes; this removes the need for declaring
5948 static functions simply to provide their prototypes.
5949 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
5950 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
5951 bitset_count_, bitset_create, bitset_dump, bitset_first,
5952 bitset_free, bitset_init, bitset_last, bitset_next,
5953 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
5954 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
5955 bitset_print, bitset_release_memory, bitset_toggle_,
5956 bitset_type_choose, bitset_type_get, bitset_type_name_get,
5957 debug_bitset): Likewise.
5958 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
5959 * lib/bitset_stats.c (bitset_log_histogram_print,
5960 bitset_percent_histogram_print, bitset_stats_and,
5961 bitset_stats_and_cmp, bitset_stats_and_or,
5962 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
5963 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
5964 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
5965 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
5966 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
5967 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
5968 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
5969 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
5970 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
5971 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
5972 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
5973 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
5974 bitset_stats_zero): Likewise.
5975 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
5976 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
5977 bitsetv_dump, debug_bitsetv): Likewise.
5978 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
5979 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
5980 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
5981 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
5982 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
5983 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
5984 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
5985 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
5986 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
5987 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
5988 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
5989 Likewise.
5990 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
5991 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
5992 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
5993 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
5994 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
5995 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
5996 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
5997 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
5998 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
5999 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
6000 lbitset_xor_cmp, lbitset_zero): Likewise.
6001
6002 2002-10-14 Akim Demaille <akim@epita.fr>
6003
6004 Version 1.75.
6005
6006 2002-10-14 Akim Demaille <akim@epita.fr>
6007
6008 * tests/Makefile.am (maintainer-check-posix): New.
6009
6010 2002-10-14 Akim Demaille <akim@epita.fr>
6011
6012 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
6013 member.
6014
6015 2002-10-14 Akim Demaille <akim@epita.fr>
6016
6017 * src/tables.c (table_ninf_remap): base -> tab.
6018 Reported by Matt Rosing.
6019
6020 2002-10-14 Paul Eggert <eggert@twinsun.com>
6021
6022 * tests/action.at, tests/calc.at, tests/conflicts.at,
6023 tests/cxx-type.at, tests/headers.at, tests/input.at,
6024 tests/regression.at, tests/synclines.at, tests/torture.at:
6025 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
6026 so that the tests still work even if POSIXLY_CORRECT is set.
6027 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
6028
6029 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
6030 for portability to K&R hosts. Fix typo: signed char is guaranteed
6031 only to 127, not to 128.
6032 * data/glr.c (yysigned_char): New type.
6033 * data/yacc.c (yysigned_char): Likewise.
6034 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
6035
6036 2002-10-13 Paul Eggert <eggert@twinsun.com>
6037
6038 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
6039 true due to limited range of data type" warning from GCC.
6040
6041 * data/c.m4 (b4_token_defines): Protect against double-inclusion
6042 by wrapping enum yytokentype's definition inside #ifndef
6043 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
6044
6045 2002-10-13 Akim Demaille <akim@epita.fr>
6046
6047 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
6048 Un yy- yyrhs to avoid the name clash with the global YYRHS.
6049
6050 2002-10-13 Akim Demaille <akim@epita.fr>
6051
6052 * Makefile.maint: Update from Autoconf 2.54.
6053 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
6054
6055 2002-10-13 Akim Demaille <akim@epita.fr>
6056
6057 * src/print.c (print_state): Separate the list of solved conflicts
6058 from the other items.
6059 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
6060
6061 2002-10-13 Akim Demaille <akim@epita.fr>
6062
6063 Let nondeterministic skeletons be usable with deterministic
6064 tables.
6065
6066 With the patch, GAWK compiled by GCC without -O2 passes its test
6067 suite using a GLR parser driven by LALR tables. It fails with -O2
6068 because `struct stat' gives two different answers on my machine:
6069 88 (definition of an auto var) and later 96 (memset on this var).
6070 Hence the stack is badly corrumpted. The headers inclusion is to
6071 blame: if I move the awk.h inclusion before GLR's system header
6072 inclusion, the two struct stat have the same size.
6073
6074 * src/tables.c (pack_table): Always create conflict_table.
6075 (token_actions): Always create conflict_list.
6076 * data/glr.c (YYFLAG): Remove, unused.
6077
6078 2002-10-13 Akim Demaille <akim@epita.fr>
6079
6080 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
6081 (O0FLAGS): New.
6082 (VALGRIND, GXX): New.
6083 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
6084 * tests/bison.in: Run $PREBISON a pre-command.
6085 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
6086 (maintainer-check-g++): New.
6087 * Makefile.am (maintainer-check): New.
6088
6089 2002-10-13 Akim Demaille <akim@epita.fr>
6090
6091 * data/glr.c: Formatting changes.
6092 Tweak some trace messages to match yacc.c's.
6093
6094 2002-10-13 Akim Demaille <akim@epita.fr>
6095
6096 GLR parsers sometimes raise parse errors instead of performing the
6097 default reduction.
6098 Reported by Charles-Henry de Boysson.
6099
6100 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
6101 check the length of the traces when %glr.
6102 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
6103 GLR's traces.
6104 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
6105 Test GLR parsers.
6106 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
6107 (yyltype): Remove the yy prefix from the member names.
6108 (yytable): Complete its comment.
6109 (yygetLRActions): Map error action number from YYTABLE from
6110 YYTABLE_NINF to 0.
6111 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
6112 (which was a bug: it should have been YYTABEL_NINF, and yet it was
6113 not satisfying as we could compare an YYACTION computed from
6114 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
6115 only value for error actions.
6116 (yyreportParseError): In verbose parse error messages, don't issue
6117 `error' in the list of expected tokens.
6118 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
6119 next action to perform to match glr.c's decoding.
6120 (yytable): Complete its comment.
6121
6122 2002-10-13 Paul Eggert <eggert@twinsun.com>
6123
6124 Fix problem reported by Henrik Grubbstroem in
6125 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
6126 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
6127 because the Bison parser reads the second action before reducing
6128 the first one.
6129 * src/scan-gram.l (rule_length): New static var.
6130 Use it to keep track of the rule length in the scanner, since
6131 we can't expect the parser to be in lock-step sync with the scanner.
6132 (handle_action_dollar, handle_action_at): Use this var.
6133 * tests/actions.at (Exotic Dollars): Test for the problem.
6134
6135 2002-10-12 Paul Eggert <eggert@twinsun.com>
6136
6137 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
6138 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
6139 Include <sys/time.h> when checking for clock_t and struct tms.
6140 Use same include order as source.
6141 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
6142 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
6143
6144 * lib/timevar.c: Update copyright date and clarify comments.
6145 (get_time) [IN_GCC]: Keep the GCC version for reference.
6146
6147 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
6148 GCC version as of today, then merge Bison's changes.
6149 Change "GCC" to "Bison" in copyright notice. timevar.def's
6150 author is Akim, so change that too.
6151
6152 * src/reader.c (grammar_current_rule_check):
6153 Don't worry about the default action if $$ is untyped.
6154 Prevents bogus warnings reported by Jim Gifford in
6155 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
6156
6157 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
6158 * data/glr.c, data/lalr1.cc, data/yacc.c:
6159 Output token definitions before the first part of user declarations.
6160 Fixes compatibility problem reported by Jim Gifford for kbd in
6161 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
6162
6163 2002-10-11 Paul Eggert <eggert@twinsun.com>
6164
6165 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
6166 (yyparse): here. This undoes some of the 2002-07-25 change.
6167 Compatibility problem reported by Ralf S. Engelschall with
6168 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
6169
6170 2002-10-11 Akim Demaille <akim@epita.fr>
6171
6172 * tests/regression.at Characters Escapes): New.
6173 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
6174 characters.
6175 Reported by Jan Nieuwenhuizen.
6176
6177 2002-10-11 Akim Demaille <akim@epita.fr>
6178
6179 * po/id.po: New.
6180
6181 2002-10-10 Paul Eggert <eggert@twinsun.com>
6182
6183 Portability fixes for bitsets; this also avoids several GCC
6184 warnings.
6185
6186 * lib/abitset.c: Include <stddef.h>, for offsetof.
6187 * lib/lbitset.c: Likewise.
6188
6189 * lib/abitset.c (abitset_bytes): Return a size that is aligned
6190 properly for vectors of objects. Do not assume that adding a
6191 header size to a multiple of a word size yields a value that is
6192 properly aligned for the whole union.
6193 * lib/bitsetv.c (bitsetv_alloc): Likewise.
6194
6195 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
6196 unique names for structures.
6197 * lib/ebitset.c (ebitset_bytes): Likewise.
6198 * lib/lbitset.c (lbitset_bytes): Likewise.
6199
6200 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
6201 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
6202 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
6203 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
6204 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
6205 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
6206 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
6207 to improve the type-checking that GCC can do.
6208 * lib/bitset.c (bitset_op4_cmp): Likewise.
6209 * lib/bitset_stats.c (bitset_stats_count,
6210 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
6211 bitset_stats_copy, bitset_stats_disjoint_p,
6212 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
6213 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
6214 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
6215 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
6216 bitset_stats_and_or_cmp, bitset_stats_andn_or,
6217 bitset_stats_andn_or_cmp, bitset_stats_or_and,
6218 bitset_stats_or_and_cmp): Likewise.
6219 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
6220 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
6221 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
6222 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
6223
6224 * lib/abitset.h: Include bitset.h, not bbitset.h.
6225 * lib/ebitset.h: Likewise.
6226 * lib/lbitset.h: Likewise.
6227
6228 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
6229 All instances of parameters of type enum bitset_opts are now of
6230 type enum_bitset_opts, to conform to the C Standard, and similarly
6231 for enum_bitset_type.
6232 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
6233 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
6234
6235 Do not use "struct bitset_struct" to mean different things in
6236 different modules. Not only is this confusing, it violates
6237 the C Standard, which requires that structure types in different
6238 modules must be compatible if one is to be passed to the other.
6239 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
6240 All instances of "struct bitset_struct *" replaced with "bitset".
6241 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
6242 (union bitset_union, struct abitset_struct, struct ebitset_struct,
6243 struct lbitset_struct, struct bitset_stats_struct): New types.
6244 All uses of struct bitset_struct changed to union bitset_union,
6245 etc.
6246 * lib/abitset.c (struct abitset_struct, abitset,
6247 struct bitset_struct): Remove.
6248 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
6249 struct bitset_struct): Remove.
6250 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
6251 bitset_struct): Remove.
6252 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
6253 Likewise.
6254
6255 Do not call a function of type T using a call that assumes the
6256 function is of a different type U. Standard C requires that a
6257 function must be called with a type that is compatible with its
6258 definition.
6259 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
6260 New decls.
6261 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
6262 New functions.
6263 * lib/ebitset.c (PFV): Remove.
6264 * lib/lbitset.c (PFV): Likewise.
6265 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
6266 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
6267 decls.
6268 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
6269 (ebitset_vtable): Use them.
6270 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
6271 lbitset_xor): New functions.
6272 (lbitset_vtable): Use them.
6273
6274 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
6275 Declare.
6276
6277 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
6278 GCC warning.
6279 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
6280 Use offsetof, for simplicity.
6281
6282 2002-10-06 Paul Eggert <eggert@twinsun.com>
6283
6284 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
6285 the same width as int. This reapplies a hunk of the 2002-08-12 patch
6286 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
6287 which was inadvertently undone by the 2002-09-30 patch.
6288 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
6289 the same width as int.
6290
6291 2002-10-04 Paul Eggert <eggert@twinsun.com>
6292
6293 Version 1.50.
6294
6295 * configure.ac (AC_INIT), NEWS: Increment version number.
6296
6297 * doc/bison.texinfo: Minor spelling, grammar, and white space
6298 fixes.
6299 (Symbols): Mention that any negative value returned from yylex
6300 signifies end-of-input. Warn about negative chars. Mention
6301 the portable Standard C character set.
6302
6303 The GNU coding standard says CFLAGS and YFLAGS are reserved
6304 for the installer to set.
6305 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
6306 * src/Makefile.am (AM_CFLAGS): Likewise.
6307 (AM_YFLAGS): Renamed from YFLAGS.
6308
6309 Fix some MAX and MIN problems.
6310 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
6311 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
6312 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
6313 * src/reader.c (reader): Use it.
6314
6315 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
6316 POSIX 1003.1-2001 has removed fgrep.
6317
6318 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
6319
6320 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
6321 interpreted as signed.
6322 * lib/ebitset.c (ebitset_list): Fix bug.
6323
6324 2002-10-01 Paul Eggert <eggert@twinsun.com>
6325
6326 More fixes for 64-bit hosts and large bitsets.
6327
6328 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
6329 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
6330 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
6331 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
6332 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
6333 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
6334 bitset_count_): Likewise.
6335 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
6336 bitset_first, bitset_last): Likewise.
6337 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
6338 bitset_stats_list_reverse, bitset_stats_size,
6339 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
6340 Likewise.
6341 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
6342 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
6343 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
6344 bitsetv_reflexive_transitive_closure): Likewise.
6345 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
6346 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
6347 Likewise.
6348 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
6349 Likewise.
6350
6351 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
6352 Use size_t, not unsigned int, to count bytes.
6353 * lib/abitset.h (abitset_bytes): Likewise.
6354 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
6355 Likewise.
6356 * lib/bitset.h (bitset_bytes): Likewise.
6357 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
6358 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
6359 * lib/bitsetv.c (bitsetv_alloc): Likewise.
6360 * lib/ebitset.c (ebitset_bytes): Likewise.
6361 * lib/ebitset.h (ebitset_bytes): Likewise.
6362 * lib/lbitset.c (lbitset_bytes): Likewise.
6363 * lib/lbitset.h (lbitset_bytes): Likewise.
6364
6365 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
6366 abitset_subset_p, abitset_disjoint_p, abitset_and,
6367 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
6368 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
6369 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
6370 abitset_or_and, abitset_or_and_cmp):
6371 Use bitset_windex instead of unsigned int.
6372 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
6373 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
6374 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
6375 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
6376 Likewise.
6377 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
6378
6379 * lib/bitset.c (bitset_print):
6380 Use proper printf formats for widths of integer types.
6381 * lib/bitset_stats.c (bitset_percent_histogram_print,
6382 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
6383 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
6384 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
6385 * lib/lbitset.c (lbitset_bytes): Likewise.
6386
6387 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
6388 BITSET_SIZE_MAX): New macros.
6389 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
6390 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
6391 to BITSET_WINDEX_MAX.
6392
6393 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
6394 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
6395 since we now return the bitset_bindex type (not int).
6396
6397 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
6398 when computing sizes.
6399 * lib/ebitset.c (ebitset_elts_grow): Likewise.
6400
6401 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
6402 and avoid cast to unsigned.
6403
6404 2002-09-30 Akim Demaille <akim@epita.fr>
6405
6406 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
6407 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
6408 Updates from Michael Hayes.
6409
6410 2002-09-30 Art Haas <ahaas@neosoft.com>
6411
6412 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
6413 invocations.
6414 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
6415 defined.
6416
6417 2002-09-27 Akim Demaille <akim@epita.fr>
6418
6419 Version 1.49c.
6420
6421 2002-09-27 Akim Demaille <akim@epita.fr>
6422
6423 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
6424 (Because of AC_LIBSOURCE).
6425
6426 2002-09-27 Akim Demaille <akim@epita.fr>
6427
6428 Playing with Autoscan.
6429
6430 * configure.ac: Remove the old LIBOBJ tweaks.
6431 (AC_REPLACE_FUNCS): Add strrchr and strtol.
6432 * lib/strrchr.c: New.
6433 * lib/strtol.c: New, from the Coreutils 4.5.1.
6434
6435 2002-09-27 Akim Demaille <akim@epita.fr>
6436
6437 Playing with Autoscan.
6438
6439 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
6440 * lib/Makefile.am (libbison_a_SOURCES): No longer include
6441 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
6442 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
6443 Coreutils 4.5.1.
6444
6445 2002-09-24 Akim Demaille <akim@epita.fr>
6446
6447 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
6448 (Frequently Asked Questions, Parser Stack Overflow): New.
6449
6450 2002-09-13 Akim Demaille <akim@epita.fr>
6451
6452 Playing with autoscan.
6453
6454 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
6455 * src/files.c (skeleton_find): Remove, unused.
6456 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
6457 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
6458
6459 2002-09-13 Akim Demaille <akim@epita.fr>
6460
6461 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
6462 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
6463
6464 2002-09-13 Akim Demaille <akim@epita.fr>
6465
6466 * configure.ac: Require 2.54.
6467 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
6468 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
6469 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
6470 Remove, provided by Autoconf macros.
6471
6472 2002-09-12 Akim Demaille <akim@epita.fr>
6473
6474 * m4/prereq.m4: Update, from Coreutils 4.5.1.
6475
6476 2002-09-12 Akim Demaille <akim@epita.fr>
6477
6478 * m4/prereq.m4: Update, from Fileutils 4.1.5.
6479 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
6480 Reported by Martin Mokrejs.
6481
6482 2002-09-10 Akim Demaille <akim@epita.fr>
6483
6484 * src/parse-gram.y: Associate a human readable string to each
6485 token type.
6486 * tests/regression.at (Invalid inputs): Adjust.
6487
6488 2002-09-10 Gary V. Vaughan <gary@gnu.org>
6489
6490 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
6491 with an Autoconf-2.5x style configure.ac.
6492
6493 2002-09-06 Paul Eggert <eggert@twinsun.com>
6494
6495 * doc/bison.texinfo (Conditions): Make explicit that the GPL
6496 exception applies only to yacc.c. This is a modification of a
6497 patch originally suggested by Akim Demaille.
6498
6499 2002-09-06 Akim Demaille <akim@epita.fr>
6500
6501 * data/c.m4 (b4_copyright): Move the GPL exception comment from
6502 here to...
6503 * data/yacc.c: here.
6504
6505 * data/lalr1.cc (struct yyltype): Don't define it, since we use
6506 LocationType.
6507 (b4_ltype): Default to yy::Location from location.hh.
6508
6509 2002-09-04 Jim Meyering <jim@meyering.net>
6510
6511 * data/yacc.c: Guard the declaration of yytoknum also with
6512 `#ifdef YYPRINT', so it is declared only when used.
6513
6514 2002-09-04 Akim Demaille <akim@epita.fr>
6515
6516 * configure.in: Rename as...
6517 * configure.ac: this.
6518 Bump to 1.49c.
6519
6520 2002-09-04 Akim Demaille <akim@epita.fr>
6521
6522 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
6523 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
6524 translate maintainer only messages.
6525
6526 2002-08-12 Paul Eggert <eggert@twinsun.com>
6527
6528 Version 1.49b.
6529
6530 * Makefile.am (SUBDIRS): Remove intl.
6531 (DISTCLEANFILES): Remove.
6532 * NEWS: Mention that GNU M4 is now required. Clarify what is
6533 meant by "larger grammars". Mention the pt_BR translation.
6534 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
6535 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
6536 Bump version from 0.11.2 to 0.11.5.
6537 (BISON_PREREQ_STAGE): Remove.
6538 (AM_GNU_GETTEXT): Use external gettext.
6539 (AC_OUTPUT): Remove intl/Makefile.
6540
6541 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
6542
6543 * data/glr.c: Include string.h, for strlen.
6544 (yyreportParseError): Use size_t for yysize.
6545 (yy_yypstack): No longer nested inside yypstates, as nested
6546 functions are not portable. Do not assume size_t is the
6547 same width as int.
6548 (yypstates): Do not assume that ptrdiff_t is the same width
6549 as int, and similarly for yyposn and YYINDEX.
6550
6551 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
6552
6553 * lib/Makefile.am (INCLUDES): Do not include from the intl
6554 directory, which has been removed.
6555 * src/Makefile.am (INCLUDES): Likewise.
6556
6557 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
6558 (bitsets_sources, additional_bitsets_sources, timevars_sources):
6559 New vars.
6560
6561 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
6562 * tests/Makefile.am (EXTRA_DIST): Likewise.
6563
6564 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
6565 Do not assume that bitset_windex is the same width as unsigned.
6566
6567 * lib/abitset.c (abitset_unused_clear): Do not assume that
6568 bitset_word is the same width as int.
6569 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
6570 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
6571 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
6572 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
6573 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
6574
6575 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
6576 portability to one's complement hosts!).
6577 * lib/ebitset.c (ebitset_op1): Likewise.
6578 * lib/lbitset.c (lbitset_op1): Likewise.
6579
6580 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
6581 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
6582 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
6583 Sync with fileutils.
6584 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
6585 lib/gettext.h: Sync with diffutils.
6586
6587 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
6588 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
6589
6590 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
6591 PROTOTYPES to check for prototypes, and "defined __STDC__" to
6592 check for void *.
6593
6594 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
6595 size_t; the old version tried to do this but casted improperly.
6596 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
6597 (bitset_test): Now returns int, not unsigned long.
6598
6599 * lib/bitset_stats.c: Include "gettext.h".
6600 (_): New macro.
6601 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
6602 name locals "index", as it generates unnecessary warnings on some
6603 hosts that have an "index" function.
6604
6605 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
6606 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
6607 they need translation.
6608 * src/LR0.c (state_list_append, new_itemsets, get_state,
6609 append_states, generate_states): Likewise.
6610 * src/assoc.c (assoc_to_string): Likewise.
6611 * src/closure.c (print_closure, set_firsts, closure): Likewise.
6612 * src/gram.c (grammar_dump): Likewise.
6613 * src/injections.c (injections_compute): Likewise.
6614 * src/lalr.c (lookaheads_print): Likewise.
6615 * src/relation.c (relation_transpose): Likewise.
6616 * src/scan-gram.l: Likewise.
6617 * src/tables.c (table_grow, pack_vector): Likewise.
6618
6619 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
6620 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
6621 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
6622 * m4/mbstate_t.m4: Sync with fileutils.
6623 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
6624
6625 * po/LINGUAS: Add pt_BR.
6626 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
6627 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
6628 lib/timevar.c.
6629 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
6630 manual recommends.
6631 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
6632
6633 * src/complain.c (strerror_r): Remove decl; not needed.
6634 (strerror): Use same pattern as ../lib/error.c.
6635
6636 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
6637
6638 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
6639
6640 * src/main.c (main): Cast result of bindtextdomain and textdomain
6641 to void, to avoid a GCC warning when --disable-nls is in effect.
6642
6643 * src/scan-gram.l: Use strings rather than escapes when possible,
6644 to minimize the number of warnings from xgettext.
6645 (handle_action_dollar, handle_action_at): Don't use isdigit,
6646 as it mishandles negative chars and it may not work as expected
6647 outside the C locale.
6648
6649 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
6650 this is a GCC extension and is not portable to other compilers.
6651
6652 * src/system.h (alloca): Use same pattern as ../lib/error.c.
6653 Do not include <ctype.h>; no longer needed.
6654 Do not include <malloc.h>; no longer needed (and generates
6655 warnings on OpenBSD 3.0).
6656
6657 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
6658 it's not portable.
6659
6660 * tests/regression.at: Do not use 'cc -c input.c -o input';
6661 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
6662
6663 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
6664 exit status as failure, not just exit status 1. Sun C exits
6665 with status 2 sometimes.
6666
6667 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
6668 Use it for the two large tests.
6669
6670 2002-08-02 Akim Demaille <akim@epita.fr>
6671
6672 * src/conflicts.c (conflicts_output): Don't output rules never
6673 reduced here, since anyway that computation doesn't work.
6674 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
6675 (rule_useless_p, rule_never_reduced_p): New.
6676 (grammar_rules_partial_print): Use a filter instead of a range.
6677 Display the title only if needed.
6678 (grammar_rules_print): Adjust.
6679 (grammar_rules_never_reduced_report): New.
6680 * src/tables.c (action_row): Move the computation of rules never
6681 reduced to...
6682 (token_actions): here.
6683 * src/main.c (main): Make the parser before making the report, so
6684 that rules never reduced are computed.
6685 Call grammar_rules_never_reduced_report.
6686 * src/print.c (print_results): Report rules never reduced.
6687 * tests/conflicts.at, tests/reduce.at: Adjust.
6688
6689 2002-08-01 Akim Demaille <akim@epita.fr>
6690
6691 Instead of attaching lookaheads and duplicating the rules being
6692 reduced by a state, attach the lookaheads to the reductions.
6693
6694 * src/state.h (state_t): Remove the `lookaheads',
6695 `lookaheads_rule' member.
6696 (reductions_t): Add a `lookaheads' member.
6697 Use a regular array for the `rules'.
6698 * src/state.c (reductions_new): Initialize the lookaheads member
6699 to 0.
6700 (state_rule_lookaheads_print): Adjust.
6701 * src/state.h, src/state.c (state_reductions_find): New.
6702 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
6703 (count_rr_conflicts): Adjust.
6704 * src/lalr.c (LArule): Remove.
6705 (add_lookback_edge): Adjust.
6706 (state_lookaheads_count): New.
6707 (states_lookaheads_initialize): Merge into...
6708 (initialize_LA): this.
6709 (lalr_free): Adjust.
6710 * src/main.c (main): Don't free nullable and derives too early: it
6711 is used by --verbose.
6712 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
6713
6714 2002-08-01 Akim Demaille <akim@epita.fr>
6715
6716 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
6717 `rule_number_t**'.
6718 (set_derives, free_derives): Rename as...
6719 (derives_compute, derives_free): this.
6720 Adjust all dependencies.
6721 * src/nullable.c (set_nullable, free_nullable): Rename as...
6722 (nullable_compute, nullable_free): these.
6723 (rule_list_t): Store rule_t *, not rule_number_t.
6724 * src/state.c (state_rule_lookaheads_print): Directly compare rule
6725 pointers, instead of their numbers.
6726 * src/main.c (main): Call nullable_free, and derives_free earlier,
6727 as they were lo longer used.
6728
6729 2002-08-01 Akim Demaille <akim@epita.fr>
6730
6731 * lib/timevar.c (get_time): Include children time.
6732 * src/lalr.h (LA, LArule): Don't export them: used with the
6733 state_t.
6734 * src/lalr.c (LA, LArule): Static.
6735 * src/lalr.h, src/lalr.c (lalr_free): New.
6736 * src/main.c (main): Call it.
6737 * src/tables.c (pack_vector): Check whether loc is >= to the
6738 table_size, not >.
6739 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
6740 (tables_generate): do it, since that's also it which allocates
6741 them.
6742 Don't free LA and LArule, main does.
6743
6744 2002-07-31 Akim Demaille <akim@epita.fr>
6745
6746 Separate parser tables computation and output.
6747
6748 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
6749 (conflict_list, conflict_list_cnt, table, check, table_ninf)
6750 (yydefgoto, yydefact, high): Move to...
6751 * src/tables.h, src/tables.c: here.
6752 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
6753 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
6754 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
6755 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
6756 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
6757 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
6758 (action_row, save_row, token_actions, save_column, default_goto)
6759 (goto_actions, sort_actions, matching_state, pack_vector)
6760 (table_ninf_remap, pack_table, prepare_actions): Move to...
6761 * src/tables.c: here.
6762 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
6763 * src/output.c (token_actions, output_base, output_conflicts)
6764 (output_check): Merge into...
6765 (prepare_actions): this.
6766 (actions_output): Rename as...
6767 (user_actions_output): this.
6768 * src/main.c (main): Call tables_generate and tables_free.
6769
6770 2002-07-31 Akim Demaille <akim@epita.fr>
6771
6772 Steal GCC's --time-report support.
6773
6774 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
6775 stolen/adjusted from GCC.
6776 * m4/stage.m4: Remove time related checks.
6777 * m4/timevar.m4: New.
6778 * configure.in: Adjust.
6779 * src/system.h: Adjust to using timevar.h.
6780 * src/getargs.h, src/getargs.c: Support trace_time for
6781 --trace=time.
6782 * src/main.c (stage): Remove.
6783 (main): Replace `stage' invocations with timevar calls.
6784 * src/output.c: Insert pertinent timevar calls.
6785
6786 2002-07-31 Akim Demaille <akim@epita.fr>
6787
6788 Let --trace have arguments.
6789
6790 * src/getargs.h (enum trace_e): New.
6791 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
6792 (long_options, short_options): --trace/-T takes an optional
6793 argument.
6794 Change all the uses of trace_flag to reflect the new flags.
6795 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
6796
6797 Strengthen `stage' portability.
6798
6799 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
6800 * configure.in: Use it.
6801 Don't check for malloc.h and sys/times.h.
6802 * src/system.h: Include them when appropriate.
6803 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
6804 times and struct tms are available.
6805
6806 2002-07-30 Akim Demaille <akim@epita.fr>
6807
6808 In verbose parse error message, don't report `error' as an
6809 expected token.
6810 * tests/actions.at (Printers and Destructors): Adjust.
6811 * tests/calc.at (Calculator $1): Adjust.
6812 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
6813 error message, do not report the parser accepts the error token in
6814 that state.
6815
6816 2002-07-30 Akim Demaille <akim@epita.fr>
6817
6818 Normalize conflict related messages.
6819
6820 * src/complain.h, src/complain.c (warn, complain): New.
6821 * src/conflicts.c (conflicts_print): Use them.
6822 (conflict_report_yacc): New, extracted from...
6823 (conflicts_print): here.
6824 * tests/conflicts.at, tests/existing.at: Adjust.
6825
6826 2002-07-30 Akim Demaille <akim@epita.fr>
6827
6828 Report rules which are never reduced by the parser: those hidden
6829 by conflicts.
6830
6831 * src/LR0.c (save_reductions): Don't make the final state too
6832 different: save its reduction (accept) instead of having a state
6833 without any action (no shift or goto, no reduce).
6834 Note: the final state is now a ``regular'' state, i.e., the
6835 parsers now contain `reduce 0' as default reduction.
6836 Nevertheless, since they decide to `accept' when yystate =
6837 final_state, they still will not reduce rule 0.
6838 * src/print.c (print_actions, print_reduction): Adjust.
6839 * src/output.c (action_row): Track reduced rules.
6840 (token_actions): Report rules never reduced.
6841 * tests/conflicts.at, tests/regression.at: Adjust.
6842
6843 2002-07-30 Akim Demaille <akim@epita.fr>
6844
6845 `stage' was accidently included in a previous patch.
6846 Initiate its autoconfiscation.
6847
6848 * configure.in: Look for malloc.h and sys/times.h.
6849 * src/main.c (stage): Adjust.
6850 Report only when trace_flag.
6851
6852 2002-07-29 Akim Demaille <akim@epita.fr>
6853
6854 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
6855 state_number_t.
6856 (errs_t): symbol_t*, not symbol_number_t.
6857 (reductions_t): rule_t*, not rule_number_t.
6858 (FOR_EACH_SHIFT): New.
6859 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
6860 * src/print.c, src/print_graph.c: Adjust.
6861
6862 2002-07-29 Akim Demaille <akim@epita.fr>
6863
6864 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
6865
6866 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
6867 (endtoken, accept): these.
6868 * src/reader.c (reader): Set endtoken's default tag to "$end".
6869 Set undeftoken's tag to "$undefined" instead of "$undefined.".
6870 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
6871 Adjust.
6872
6873 2002-07-29 Akim Demaille <akim@epita.fr>
6874
6875 * src/reduce.c (reduce_grammar): When the language is empty,
6876 complain about the start symbol, not the axiom.
6877 Use its location.
6878 * tests/reduce.at (Empty Language): New.
6879
6880 2002-07-26 Akim Demaille <akim@epita.fr>
6881
6882 * src/reader.h, src/reader.c (gram_error): ... can't get
6883 yycontrol without making too strong assumptions on the parser
6884 itself.
6885 * src/output.c (prepare_tokens): Use the real 0th value of
6886 token_translations instead of `0'.
6887 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
6888 visible here.
6889 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
6890 for the time being: %locations ought to provide it to yyerror.
6891
6892 2002-07-25 Akim Demaille <akim@epita.fr>
6893
6894 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
6895 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
6896 * tests/regression.at (Web2c Actions): Adjust.
6897
6898 2002-07-25 Akim Demaille <akim@epita.fr>
6899
6900 Stop storing rules from 1 to nrules + 1.
6901
6902 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
6903 * src/nullable.c, src/output.c, src/print.c, src/reader.c
6904 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
6905 Iterate from 0 to nrules.
6906 Use rule_number_as_item_number and item_number_as_rule_number.
6907 Adjust to `derive' now containing possibly 0.
6908 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
6909 Handle the `- 1' part in rule numbers from/to item numbers.
6910 * src/conflicts.c (log_resolution): Fix the message which reversed
6911 shift and reduce.
6912 * src/output.c (action_row): Initialize default_rule to -1.
6913 (token_actions): Adjust.
6914 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
6915 expected output.
6916 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
6917
6918 2002-07-25 Akim Demaille <akim@epita.fr>
6919
6920 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
6921 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
6922 (b4_c_knr_arg_decl): New.
6923 * data/yacc.c: Use it to define yysymprint, yydestruct, and
6924 yyreport_parse_error.
6925
6926 2002-07-25 Akim Demaille <akim@epita.fr>
6927
6928 * data/yacc.c (yyreport_parse_error): New, extracted from...
6929 (yyparse): here.
6930 (yydestruct, yysymprint): Move above yyparse.
6931 Be K&R compliant.
6932
6933 2002-07-25 Akim Demaille <akim@epita.fr>
6934
6935 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
6936 replace...
6937 (b4_sint_type, b4_uint_type): these.
6938 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
6939 * tests/regression.at (Web2c Actions): Adjust.
6940
6941 2002-07-25 Akim Demaille <akim@epita.fr>
6942
6943 * src/gram.h (TIEM_NUMBER_MAX): New.
6944 (item_number_of_rule_number, rule_number_of_item_number): Rename
6945 as...
6946 (rule_number_as_item_number, item_number_as_rule_number): these.
6947 Adjust dependencies.
6948 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
6949 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
6950 (symbol_number_to_vector_number): New.
6951 (order): Of vector_number_t* type.
6952 (base_t, BASE_MAX, BASE_MIN): New.
6953 (froms, tos, width, pos, check): Of base_t type.
6954 (action_number_t, ACTION_MIN, ACTION_MAX): New.
6955 (actrow): Of action_number_t type.
6956 (conflrow): Of unsigned int type.
6957 (table_ninf, base_ninf): New.
6958 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
6959 (muscle_insert_int_table, muscle_insert_base_table)
6960 (muscle_insert_rule_number_table): New.
6961 (prepare_tokens): Output `toknum' as int_table.
6962 (action_row): Returns a rule_number_t.
6963 Use ACTION_MIN, not SHRT_MIN.
6964 (token_actions): yydefact is rule_number_t*.
6965 (table_ninf_remap): New.
6966 (pack_table): Use it for `base' and `table'.
6967 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
6968 replaced with...
6969 (YYPACT_NINF, YYTABLE_NINF): these.
6970 (yypact, yytable): Compute their types instead of hard-coded
6971 `short'.
6972 * tests/regression.at (Web2c Actions): Adjust.
6973
6974 2002-07-19 Akim Demaille <akim@epita.fr>
6975
6976 * src/scan-gram.l (id): Can start with an underscore.
6977
6978 2002-07-16 Akim Demaille <akim@epita.fr>
6979
6980 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
6981 Adjust all former `associativity' dependencies.
6982 * src/symtab.c (symbol_new): Default associativity is `undef', not
6983 `right'.
6984 (symbol_check_alias_consistence): Adjust.
6985
6986 2002-07-09 Akim Demaille <akim@epita.fr>
6987
6988 * doc/bison.texinfo: Properly set the ``header'' part.
6989 Use @dircategory ``GNU programming tools'' as per Texinfo's
6990 documentation.
6991 Use @copying.
6992
6993 2002-07-09 Akim Demaille <akim@epita.fr>
6994
6995 * lib/quotearg.h: Protect against multiple inclusions.
6996 * src/location.h (location_t): Add a `file' member.
6997 (LOCATION_RESET, LOCATION_PRINT): Adjust.
6998 * src/complain.c (warn_at, complain_at, fatal_at): Drop
6999 `error_one_per_line' support.
7000
7001 2002-07-09 Akim Demaille <akim@epita.fr>
7002
7003 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
7004 * src/reader.c (lineno): Remove.
7005 Adjust all dependencies.
7006 (get_merge_function): Take a location and use complain_at.
7007 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
7008 * tests/regression.at (Invalid inputs, Mixing %token styles):
7009 Adjust.
7010
7011 2002-07-09 Akim Demaille <akim@epita.fr>
7012
7013 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
7014 recovery rule, and forbid extensions when --yacc.
7015 (gram_error): Use complain_at.
7016 * src/reader.c (reader): Exit if there were parse errors.
7017
7018 2002-07-09 Akim Demaille <akim@epita.fr>
7019
7020 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
7021 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
7022 Reported by R Blake <blakers@mac.com>.
7023
7024 2002-07-09 Akim Demaille <akim@epita.fr>
7025
7026 * data/yacc.c: Output the copyright notive in the header.
7027
7028 2002-07-03 Akim Demaille <akim@epita.fr>
7029
7030 * src/output.c (froms, tos): Are state_number_t.
7031 (save_column): sp, sp1, and sp2 are state_number_t.
7032 (prepare): Rename `final' as `final_state_number', `nnts' as
7033 `nterms_number', `nrules' as `rules_number', `nstates' as
7034 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
7035 unused.
7036 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
7037 * data/lalr1.cc (nsym_): Remove, unused.
7038
7039 2002-07-03 Akim Demaille <akim@epita.fr>
7040
7041 * src/lalr.h, src/lalr.c (goto_number_t): New.
7042 * src/lalr.c (goto_list_t): New.
7043 Propagate them.
7044 * src/nullable.c (rule_list_t): New.
7045 Propagate.
7046 * src/types.h: Remove.
7047
7048 2002-07-03 Akim Demaille <akim@epita.fr>
7049
7050 * src/closure.c (print_fderives): Use rule_rhs_print.
7051 * src/derives.c (print_derives): Use rule_rhs_print.
7052 (rule_list_t): New, replaces `shorts'.
7053 (set_derives): Add comments.
7054 * tests/sets.at (Nullable, Firsts): Adjust.
7055
7056 2002-07-03 Akim Demaille <akim@epita.fr>
7057
7058 * src/output.c (prepare_actions): Free `tally' and `width'.
7059 (prepare_actions): Allocate and free `order'.
7060 * src/symtab.c (symbols_free): Free `symbols'.
7061 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
7062 * src/output.c (m4_invoke): Move to...
7063 * src/scan-skel.l: here.
7064 (<<EOF>>): Close yyout, and free its name.
7065
7066 2002-07-03 Akim Demaille <akim@epita.fr>
7067
7068 Fix some memory leaks, and fix a bug: state 0 was examined twice.
7069
7070 * src/LR0.c (new_state): Merge into...
7071 (state_list_append): this.
7072 (new_states): Merge into...
7073 (generate_states): here.
7074 (set_states): Don't ensure a proper `errs' state member here, do it...
7075 * src/conflicts.c (conflicts_solve): here.
7076 * src/state.h, src/state.c: Comment changes.
7077 (state_t): Rename member `shifts' as `transitions'.
7078 Adjust all dependencies.
7079 (errs_new): For consistency, also take the values as argument.
7080 (errs_dup): Remove.
7081 (state_errs_set): New.
7082 (state_reductions_set, state_transitions_set): Assert that no
7083 previous value was assigned.
7084 (state_free): New.
7085 (states_free): Use it.
7086 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
7087 temporary storage: use `errs' and `nerrs' as elsewhere.
7088 (set_conflicts): Allocate and free this `errs'.
7089
7090 2002-07-02 Akim Demaille <akim@epita.fr>
7091
7092 * lib/libiberty.h: New.
7093 * lib: Update the bitset implementation from upstream.
7094 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
7095 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
7096 * src/main.c: Adjust bitset stats calls.
7097
7098 2002-07-01 Paul Eggert <eggert@twinsun.com>
7099
7100 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
7101 char, so that negative chars don't collide with $.
7102
7103 2002-06-30 Akim Demaille <akim@epita.fr>
7104
7105 Have the GLR tests be `warning' checked, and fix the warnings.
7106
7107 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
7108 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
7109 (yyremoveDeletes): `yyi' and `yyj' are size_t.
7110 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
7111 (yyaddDeferredAction): static.
7112 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
7113 (yyreportParseError): yyprefix is const.
7114 yytokenp is used only when verbose.
7115 (yy__GNUC__): Replace with __GNUC__.
7116 (yypdumpstack): yyi is size_t.
7117 (yypreference): Un-yy local variables and arguments, to avoid
7118 clashes with `yyr1'. Anyway, we are not in the user name space.
7119 (yytname_size): be an int, as is compared with ints.
7120 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
7121 Use them.
7122 * tests/cxx-gram.at: Use quotation to protect $1.
7123 Use AT_COMPILE to enable warnings hunts.
7124 Prototype yylex and yyerror.
7125 `Use' argc.
7126 Include `string.h', not `strings.h'.
7127 Produce and prototype stmtMerge only when used.
7128 yylex takes a location.
7129
7130 2002-06-30 Akim Demaille <akim@epita.fr>
7131
7132 We spend a lot of time in quotearg, in particular when --verbose.
7133
7134 * src/symtab.c (symbol_get): Store a quoted version of the key.
7135 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
7136 Adjust all callers.
7137
7138 2002-06-30 Akim Demaille <akim@epita.fr>
7139
7140 * src/state.h (reductions_t): Rename member `nreds' as num.
7141 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
7142 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
7143
7144 2002-06-30 Akim Demaille <akim@epita.fr>
7145
7146 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
7147 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
7148 (shifts_to): Rename as...
7149 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
7150 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
7151 (TRANSITION_IS_DISABLED, transitions_to): these.
7152
7153 2002-06-30 Akim Demaille <akim@epita.fr>
7154
7155 * src/print.c (print_shifts, print_gotos): Merge into...
7156 (print_transitions): this.
7157 (print_transitions, print_errs, print_reductions): Align the
7158 lookaheads columns.
7159 (print_core, print_transitions, print_errs, print_state,
7160 print_grammar): Output empty lines separator before, not after.
7161 (state_default_rule_compute): Rename as...
7162 (state_default_rule): this.
7163 * tests/conflicts.at (Defaulted Conflicted Reduction),
7164 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
7165 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
7166
7167 2002-06-30 Akim Demaille <akim@epita.fr>
7168
7169 Display items as we display rules.
7170
7171 * src/gram.h, src/gram.c (rule_lhs_print): New.
7172 * src/gram.c (grammar_rules_partial_print): Use it.
7173 * src/print.c (print_core): Likewise.
7174 * tests/conflicts.at (Defaulted Conflicted Reduction),
7175 (Unresolved SR Conflicts): Adjust.
7176 (Unresolved SR Conflicts): Adjust and rename as...
7177 (Resolved SR Conflicts): this, as was meant.
7178 * tests/regression.at (Web2c Report): Adjust.
7179
7180 2002-06-30 Akim Demaille <akim@epita.fr>
7181
7182 * src/print.c (state_default_rule_compute): New, extracted from...
7183 (print_reductions): here.
7184 Pessimize, but clarify the code.
7185 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
7186
7187 2002-06-30 Akim Demaille <akim@epita.fr>
7188
7189 * src/output.c (action_row): Let default_rule be always a rule
7190 number.
7191
7192 2002-06-30 Akim Demaille <akim@epita.fr>
7193
7194 * src/closure.c (print_firsts, print_fderives, closure):
7195 Use BITSET_EXECUTE.
7196 * src/lalr.c (lookaheads_print): Likewise.
7197 * src/state.c (state_rule_lookaheads_print): Likewise.
7198 * src/print_graph.c (print_core): Likewise.
7199 * src/print.c (print_reductions): Likewise.
7200 * src/output.c (action_row): Likewise.
7201 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
7202
7203 2002-06-30 Akim Demaille <akim@epita.fr>
7204
7205 * src/print_graph.c: Use report_flag.
7206
7207 2002-06-30 Akim Demaille <akim@epita.fr>
7208
7209 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
7210 to...
7211 * src/relation.h, src/relation.c (traverse, relation_digraph)
7212 (relation_print, relation_transpose): New.
7213
7214 2002-06-30 Akim Demaille <akim@epita.fr>
7215
7216 * src/state.h, src/state.c (shifts_to): New.
7217 * src/lalr.c (build_relations): Use it.
7218
7219 2002-06-30 Akim Demaille <akim@epita.fr>
7220
7221 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
7222 (item_number_of_rule_number, rule_number_of_item_number): New.
7223 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
7224 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
7225 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
7226 Propagate their use.
7227 Much remains to be done, in particular wrt `shorts' from types.h.
7228
7229 2002-06-30 Akim Demaille <akim@epita.fr>
7230
7231 * src/symtab.c (symbol_new): Initialize the `printer' member.
7232
7233 2002-06-30 Akim Demaille <akim@epita.fr>
7234
7235 * src/LR0.c (save_reductions): Remove, replaced by...
7236 * src/state.h, src/state.c (state_reductions_set): New.
7237 (reductions, errs): Rename as...
7238 (reductions_t, errs_t): these.
7239 Adjust all dependencies.
7240
7241 2002-06-30 Akim Demaille <akim@epita.fr>
7242
7243 * src/LR0.c (state_list_t, state_list_append): New.
7244 (first_state, last_state): Now symbol_list_t.
7245 (this_state): Remove.
7246 (new_itemsets, append_states, save_reductions): Take a state_t as
7247 argument.
7248 (set_states, generate_states): Adjust.
7249 (save_shifts): Remove, replaced by...
7250 * src/state.h, src/state.c (state_shifts_set): New.
7251 (shifts): Rename as...
7252 (shifts_t): this.
7253 Adjust all dependencies.
7254 * src/state.h (state_t): Remove the `next' member.
7255
7256 2002-06-30 Akim Demaille <akim@epita.fr>
7257
7258 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
7259 escaped in slot 0.
7260
7261 2002-06-30 Akim Demaille <akim@epita.fr>
7262
7263 Use hash.h for the state hash table.
7264
7265 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
7266 (allocate_storage): Use state_hash_new.
7267 (free_storage): Use state_hash_free.
7268 (new_state, get_state): Adjust.
7269 * src/lalr.h, src/lalr.c (states): Move to...
7270 * src/states.h (state_t): Remove the `link' member, no longer
7271 used.
7272 * src/states.h, src/states.c: here.
7273 (state_hash_new, state_hash_free, state_hash_lookup)
7274 (state_hash_insert, states_free): New.
7275 * src/states.c (state_table, state_compare, state_hash): New.
7276 * src/output.c (output_actions): Do not free states now, since we
7277 still need to know the final_state number in `prepare', called
7278 afterwards. Do it...
7279 * src/main.c (main): here: call states_free after `output'.
7280
7281 2002-06-30 Akim Demaille <akim@epita.fr>
7282
7283 * src/state.h, src/state.c (state_new): New, extracted from...
7284 * src/LR0.c (new_state): here.
7285 * src/state.h (STATE_ALLOC): Move to...
7286 * src/state.c: here.
7287 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
7288 * src/state.h, src/state.c: here.
7289
7290 2002-06-30 Akim Demaille <akim@epita.fr>
7291
7292 * src/reader.c (gensym): Rename as...
7293 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
7294 (getsym): Rename as...
7295 (symbol_get): this.
7296
7297 2002-06-30 Akim Demaille <akim@epita.fr>
7298
7299 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
7300 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
7301 * src/output.c, src/print.c, src/print_graph.c: Propagate.
7302 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
7303
7304 2002-06-30 Akim Demaille <akim@epita.fr>
7305
7306 Make the test suite pass with warnings checked.
7307
7308 * tests/actions.at (Printers and Destructors): Improve.
7309 Avoid unsigned vs. signed issues.
7310 * tests/calc.at: Don't exercise the scanner here, do it...
7311 * tests/input.at (Torturing the Scanner): here.
7312
7313 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7314
7315 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
7316 reorganize first lines parallel to yacc.c.
7317
7318 2002-06-28 Akim Demaille <akim@epita.fr>
7319
7320 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
7321 (b4_token_enum, b4_token_defines): New, factored from...
7322 * data/lalr1.cc, data/yacc.c, glr.c: here.
7323
7324 2002-06-28 Akim Demaille <akim@epita.fr>
7325
7326 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
7327 unused variables.
7328 * src/output.c (merger_output): static.
7329
7330 2002-06-28 Akim Demaille <akim@epita.fr>
7331
7332 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
7333 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
7334 pacify GCC.
7335 * src/output.c (save_row): Initialize all the variables to pacify GCC.
7336
7337 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7338
7339 Accumulated changelog for new GLR parsing features.
7340
7341 * src/conflicts.c (count_total_conflicts): Change name to
7342 conflicts_total_count.
7343 * src/conflicts.h: Ditto.
7344 * src/output.c (token_actions): Use the new name.
7345 (output_conflicts): Change conflp => conflict_list_heads, and
7346 confl => conflict_list for better readability.
7347 * data/glr.c: Use the new names.
7348 * NEWS: Add self to GLR announcement.
7349
7350 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
7351
7352 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
7353 Akim Demaille.
7354
7355 * data/bison.glr: Change name to glr.c
7356 * data/glr.c: Renamed from bison.glr.
7357 * data/Makefile.am: Add glr.c
7358
7359 * src/getargs.c:
7360
7361 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
7362 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
7363
7364 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7365
7366 * data/bison.glr: Be sure to restore the
7367 current #line when returning to the skeleton contents after having
7368 exposed the input file's #line.
7369
7370 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7371
7372 * data/bison.glr: Bring up to date with changes to bison.simple.
7373
7374 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7375
7376 * data/bison.glr: Correct definitions that use b4_prefix.
7377 Various reformatting.
7378 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
7379 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
7380 yytokenp argument; now part of stack.
7381 (yychar): Define to behave as documented.
7382 (yyclearin): Ditto.
7383
7384 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7385
7386 * src/reader.h: Add declaration for free_merger_functions.
7387
7388 * src/reader.c (merge_functions): New variable.
7389 (get_merge_function): New function.
7390 (free_merger_functions): New function.
7391 (readgram): Check for %prec that is not followed by a symbol.
7392 Handle %dprec and %merge declarations.
7393 (packgram): Initialize dprec and merger fields in rules array.
7394
7395 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
7396 conflict_list_cnt, conflict_list_free): New variables.
7397 (table_grow): Also grow conflict_table.
7398 (prepare_rules): Output dprec and merger tables.
7399 (conflict_row): New function.
7400 (action_row): Output conflict lists for GLR parser. Don't use
7401 default reduction in conflicted states for GLR parser so that there
7402 are spaces for the conflict lists.
7403 (save_row): Also save conflict information.
7404 (token_actions): Allocate conflict list.
7405 (merger_output): New function.
7406 (pack_vector): Pack conflict table, too.
7407 (output_conflicts): New function to output yyconflp and yyconfl.
7408 (output_check): Allocate conflict_tos.
7409 (output_actions): Output conflict tables, also.
7410 (output_skeleton): Output b4_mergers definition.
7411 (prepare): Output b4_max_rhs_length definition.
7412 Use 'bison.glr' as default skeleton for GLR parsers.
7413
7414 * src/gram.c (glr_parser): New flag.
7415 (grammar_free): Call free_merger_functions.
7416
7417 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
7418 all pairs of conflicting reductions, rather than just all tokens
7419 causing conflicts. Needed to size conflict tables.
7420 (conflicts_output): Modify call to count_rr_conflicts for new
7421 interface.
7422 (conflicts_print): Ditto.
7423 (count_total_conflicts): New function.
7424
7425 * src/reader.h (merger_list): New type.
7426 (merge_functions): New variable.
7427
7428 * src/lex.h (tok_dprec, tok_merge): New token types.
7429
7430 * src/gram.h (rule_s): Add dprec and merger fields.
7431 (glr_parser): New flag.
7432
7433 * src/conflicts.h (count_total_conflicts): New function.
7434
7435 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
7436
7437 * doc/bison.texinfo (Generalized LR Parsing): New section.
7438 (GLR Parsers): New section.
7439 (Language and Grammar): Mention GLR parsing.
7440 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
7441 Correct typo ("tge" -> "the").
7442
7443 * data/bison.glr: New skeleton for GLR parsing.
7444
7445 * tests/cxx-gram.at: New tests for GLR parsing.
7446
7447 * tests/testsuite.at: Include cxx-gram.at.
7448
7449 * tests/Makefile.am: Add cxx-gram.at.
7450
7451 * src/parse-gram.y:
7452
7453 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
7454
7455 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
7456
7457 2002-06-27 Akim Demaille <akim@epita.fr>
7458
7459 * src/options.h, src/options.c: Remove.
7460 * src/getargs.c (short_options, long_options): New.
7461
7462 2002-06-27 Akim Demaille <akim@epita.fr>
7463
7464 * data/bison.simple, data/bison.c++: Rename as...
7465 * data/yacc.c, data/lalr1.cc: these.
7466 * doc/bison.texinfo (Environment Variables): Remove.
7467
7468 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
7469
7470 * src/getargs.c (report_argmatch): Initialize strtok().
7471
7472 2002-06-20 Akim Demaille <akim@epita.fr>
7473
7474 * data/bison.simple (b4_symbol_actions): New, replaces...
7475 (b4_symbol_destructor, b4_symbol_printer): these.
7476 (yysymprint): Be sure to call YYPRINT only for tokens, and using
7477 user token numbers.
7478
7479 2002-06-20 Akim Demaille <akim@epita.fr>
7480
7481 * data/bison.simple (yydestructor): Rename as...
7482 (yydestruct): this.
7483
7484 2002-06-20 Akim Demaille <akim@epita.fr>
7485
7486 * src/symtab.h, src/symtab.c (symbol_type_set)
7487 (symbol_destructor_set, symbol_precedence_set): The location is
7488 the last argument.
7489 Adjust all callers.
7490
7491 2002-06-20 Akim Demaille <akim@epita.fr>
7492
7493 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
7494 internals.
7495 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
7496 Takes a location.
7497 * src/symtab.h, src/symtab.c (symbol_class_set)
7498 (symbol_user_token_number_set): Likewise.
7499 Adjust all callers.
7500 Promote complain_at.
7501 * tests/input.at (Type Clashes): Adjust.
7502
7503 2002-06-20 Akim Demaille <akim@epita.fr>
7504
7505 * data/bison.simple (YYLEX): Fix the declaration when
7506 %pure-parser.
7507
7508 2002-06-20 Akim Demaille <akim@epita.fr>
7509
7510 * data/bison.simple (yysymprint): Don't print the token number,
7511 just its name.
7512 * tests/actions.at (Destructors): Rename as...
7513 (Printers and Destructors): this.
7514 Also exercise %printer.
7515
7516 2002-06-20 Akim Demaille <akim@epita.fr>
7517
7518 * data/bison.simple (YYDSYMPRINT): New.
7519 Use it to remove many of the #if YYDEBUG/if (yydebug).
7520
7521 2002-06-20 Akim Demaille <akim@epita.fr>
7522
7523 * src/symtab.h, src/symtab.c (symbol_t): printer and
7524 printer_location are new members.
7525 (symbol_printer_set): New.
7526 * src/parse-gram.y (PERCENT_PRINTER): New token.
7527 Handle its associated rule.
7528 * src/scan-gram.l: Adjust.
7529 (handle_destructor_at, handle_destructor_dollar): Rename as...
7530 (handle_symbol_code_at, handle_symbol_code_dollar): these.
7531 * src/output.c (symbol_printers_output): New.
7532 (output_skeleton): Call it.
7533 * data/bison.simple (yysymprint): New. Cannot be named yyprint
7534 since there are already many grammar files with a user `yyprint'.
7535 Replace the calls to YYPRINT to calls to yysymprint.
7536 * tests/calc.at: Adjust.
7537 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
7538 taking advantage of parser very internal details (stack size!).
7539
7540 2002-06-20 Akim Demaille <akim@epita.fr>
7541
7542 * src/scan-gram.l: Complete the scanner with the missing patterns
7543 to pacify Flex.
7544 Use `quote' and `symbol_tag_get' where appropriate.
7545
7546 2002-06-19 Akim Demaille <akim@epita.fr>
7547
7548 * tests/actions.at (Destructors): Augment to test locations.
7549 * data/bison.simple (yydestructor): Pass it the current location
7550 if locations are enabled.
7551 Prototype only when __STDC__ or C++.
7552 Change the argument names to move into the yy name space: there is
7553 user code here.
7554
7555 2002-06-19 Akim Demaille <akim@epita.fr>
7556
7557 * data/bison.simple (b4_pure_if): New.
7558 Use it instead of #ifdef YYPURE.
7559
7560 2002-06-19 Akim Demaille <akim@epita.fr>
7561
7562 * data/bison.simple (b4_location_if): New.
7563 Use it instead of #ifdef YYLSP_NEEDED.
7564
7565 2002-06-19 Akim Demaille <akim@epita.fr>
7566
7567 Prepare @$ in %destructor, but currently don't bind it in the
7568 skeleton, as %location use is not cleaned up yet.
7569
7570 * src/scan-gram.l (handle_dollar, handle_destructor_at)
7571 (handle_action_at): New.
7572 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
7573 a braced_code_t and a location as additional arguments.
7574 (handle_destructor_dollar): Instead of requiring `b4_eval', just
7575 unquote one when outputting `b4_dollar_dollar'.
7576 Adjust callers.
7577 * data/bison.simple (b4_eval): Remove.
7578 (b4_symbol_destructor): Adjust.
7579 * tests/input.at (Invalid @n): Adjust.
7580
7581 2002-06-19 Zack Weinberg <zack@codesourcery.com>
7582
7583 * doc/bison.texinfo: Document ability to have multiple
7584 prologue sections.
7585
7586 2002-06-18 Akim Demaille <akim@epita.fr>
7587
7588 * src/files.c (compute_base_names): When computing the output file
7589 names from the input file name, strip the directory part.
7590
7591 2002-06-18 Akim Demaille <akim@epita.fr>
7592
7593 * data/bison.simple.new: Comment changes.
7594 Reported by Andreas Schwab.
7595
7596 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
7597
7598 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
7599 there are no `label `yyoverflowlab' defined but not used' warnings
7600 when yyoverflow is defined.
7601
7602 2002-06-18 Akim Demaille <akim@epita.fr>
7603
7604 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
7605 new member.
7606 (symbol_destructor_set): Adjust.
7607 * src/output.c (symbol_destructors_output): Output the destructor
7608 locations.
7609 Output the symbol name.
7610 * data/bison.simple (b4_symbol_destructor): Adjust.
7611
7612 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
7613 and Akim Demaille <akim@epita.fr>
7614
7615 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
7616 what's left on the stack when the error recovery hits EOF.
7617 * tests/actions.at (Destructors): Complete to exercise this case.
7618
7619 2002-06-17 Akim Demaille <akim@epita.fr>
7620
7621 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
7622 arguments is really empty, not only equal to `[]'.
7623 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
7624 member.
7625 (symbol_destructor_set): New.
7626 * src/output.c (symbol_destructors_output): New.
7627 * src/reader.h (brace_code_t, current_braced_code): New.
7628 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
7629 (handle_dollar): Rename as...
7630 (handle_action_dollar): this.
7631 (handle_destructor_dollar): New.
7632 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
7633 (grammar_declaration): Use it.
7634 * data/bison.simple (yystos): Is always defined.
7635 (yydestructor): New.
7636 * tests/actions.at (Destructors): New.
7637 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
7638
7639 2002-06-17 Akim Demaille <akim@epita.fr>
7640
7641 * src/symlist.h, src/symlist.c (symbol_list_length): New.
7642 * src/scan-gram.l (handle_dollar, handle_at): Compute the
7643 rule_length only when needed.
7644 * src/output.c (actions_output, token_definitions_output): Output
7645 the full M4 block.
7646 * src/symtab.c: Don't access directly to the symbol tag, use
7647 symbol_tag_get.
7648 * src/parse-gram.y: Use symbol_list_free.
7649
7650 2002-06-17 Akim Demaille <akim@epita.fr>
7651
7652 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
7653 (symbol_list_prepend, get_type_name): Move to...
7654 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
7655 (symbol_list_prepend, symbol_list_n_type_name_get): here.
7656 Adjust all callers.
7657 (symbol_list_free): New.
7658 * src/scan-gram.l (handle_dollar): Takes a location.
7659 * tests/input.at (Invalid $n): Adjust.
7660
7661 2002-06-17 Akim Demaille <akim@epita.fr>
7662
7663 * src/reader.h, src/reader.c (symbol_list_new): Export it.
7664 (symbol_list_prepend): New.
7665 * src/parse-gram.y (%union): `list' is a new member.
7666 (symbols.1): New, replaces...
7667 (terms_to_prec.1, nterms_to_type.1): these.
7668 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
7669 Take a location as additional argument.
7670 Adjust all callers.
7671
7672 2002-06-15 Akim Demaille <akim@epita.fr>
7673
7674 * src/parse-gram.y: Move %token in the declaration section so that
7675 we don't depend upon CVS Bison.
7676
7677 2002-06-15 Akim Demaille <akim@epita.fr>
7678
7679 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
7680 * src/print.c (print_core): Use it.
7681
7682 2002-06-15 Akim Demaille <akim@epita.fr>
7683
7684 * src/conflicts.c (log_resolution): Accept the rule involved in
7685 the sr conflicts instead of the lookahead number that points to
7686 that rule.
7687 (flush_reduce): Accept the current lookahead vector as argument,
7688 instead of the index in LA.
7689 (resolve_sr_conflict): Accept the current number of lookahead
7690 bitset to consider for the STATE, instead of the index in LA.
7691 (set_conflicts): Adjust.
7692 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
7693
7694 2002-06-15 Akim Demaille <akim@epita.fr>
7695
7696 * src/state.h (state_t): Replace the `lookaheadsp' member, a
7697 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
7698 Adjust all dependencies.
7699 * src/lalr.c (initialize_lookaheads): Split into...
7700 (states_lookaheads_count, states_lookaheads_initialize): these.
7701 (lalr): Adjust.
7702
7703 2002-06-15 Akim Demaille <akim@epita.fr>
7704
7705 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
7706 out of...
7707 (grammar_rules_print): here.
7708 * src/reduce.c (reduce_output): Use it.
7709 * tests/reduce.at (Useless Rules, Reduced Automaton)
7710 (Underivable Rules): Adjust.
7711
7712 2002-06-15 Akim Demaille <akim@epita.fr>
7713
7714 Copy BYacc's nice way to report the grammar.
7715
7716 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
7717 New.
7718 Don't print the rules' location, it is confusing and useless.
7719 (rule_print): Use grammar_rhs_print.
7720 * src/print.c (print_grammar): Use grammar_rules_print.
7721
7722 2002-06-15 Akim Demaille <akim@epita.fr>
7723
7724 Complete and rationalize `useless thing' warnings.
7725
7726 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
7727 (symbol_tag_print): New.
7728 Use them everywhere in place of accessing directly the tag member.
7729 * src/gram.h, src/gram.c (rule_print): New.
7730 Use it where a rule used to be printed `by hand'.
7731 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
7732 (reduce_grammar_tables): Report the useless rules.
7733 (reduce_print): Useless things are a warning, not an error.
7734 Report it as such.
7735 * tests/reduce.at (Useless Nonterminals, Useless Rules):
7736 (Reduced Automaton, Underivable Rules): Adjust.
7737 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
7738 * tests/conflicts.at (Unresolved SR Conflicts)
7739 (Solved SR Conflicts): Adjust.
7740
7741 2002-06-15 Akim Demaille <akim@epita.fr>
7742
7743 Let symbols have a location.
7744
7745 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
7746 (getsym): Adjust.
7747 Adjust all callers.
7748 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
7749 Use location_t, not int.
7750 * src/symtab.c (symbol_check_defined): Take advantage of the
7751 location.
7752 * tests/regression.at (Invalid inputs): Adjust.
7753
7754 2002-06-15 Akim Demaille <akim@epita.fr>
7755
7756 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
7757 (input): Don't try to initialize yylloc here, do it in the
7758 scanner.
7759 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
7760 * src/gram.h (rule_t): Change line and action_line into location
7761 and action_location, of location_t type.
7762 Adjust all dependencies.
7763 * src/location.h, src/location.c (empty_location): New.
7764 * src/reader.h, src/reader.c (grammar_start_symbol_set)
7765 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
7766 (grammar_current_rule_symbol_append)
7767 (grammar_current_rule_action_append): Expect a location as argument.
7768 * src/reader.c (grammar_midrule_action): Adjust to attach an
7769 action's location as dummy symbol location.
7770 * src/symtab.h, src/symtab.c (startsymbol_location): New.
7771 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
7772 the line numbers.
7773
7774 2002-06-14 Akim Demaille <akim@epita.fr>
7775
7776 Grammar declarations may be found in the grammar section.
7777
7778 * src/parse-gram.y (rules_or_grammar_declaration): New.
7779 (declarations): Each declaration may end with a semicolon, not
7780 just...
7781 (grammar_declaration): `"%union"'.
7782 (grammar): Branch to rules_or_grammar_declaration.
7783
7784 2002-06-14 Akim Demaille <akim@epita.fr>
7785
7786 * src/main.c (main): Invoke scanner_free.
7787
7788 2002-06-14 Akim Demaille <akim@epita.fr>
7789
7790 * src/output.c (m4_invoke): Extracted from...
7791 (output_skeleton): here.
7792 Free tempfile.
7793
7794 2002-06-14 Akim Demaille <akim@epita.fr>
7795
7796 * src/parse-gram.y (directives, directive, gram)
7797 (grammar_directives, precedence_directives, precedence_directive):
7798 Rename as...
7799 (declarations, declaration, grammar, grammar_declaration)
7800 (precedence_declaration, precedence_declarator): these.
7801 (symbol_declaration): New.
7802
7803 2002-06-14 Akim Demaille <akim@epita.fr>
7804
7805 * src/files.c (action_obstack): Remove, unused.
7806 (output_obstack): Remove it, and all its dependencies, as it is no
7807 longer needed.
7808 * src/reader.c (epilogue_set): Build the epilogue in the
7809 muscle_obstack.
7810 * src/output.h, src/output.c (muscle_obstack): Move to...
7811 * src/muscle_tab.h, src/muscle_tab.h: here.
7812 (muscle_init): Initialize muscle_obstack.
7813 (muscle_free): New.
7814 * src/main.c (main): Call it.
7815
7816 2002-06-14 Akim Demaille <akim@epita.fr>
7817
7818 * src/location.h: New, extracted from...
7819 * src/reader.h: here.
7820 * src/Makefile.am (noinst_HEADERS): Merge into
7821 (bison_SOURCES): this.
7822 Add location.h.
7823 * src/parse-gram.y: Use location_t instead of Bison's.
7824 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
7825 Use location_t instead of ints.
7826
7827 2002-06-14 Akim Demaille <akim@epita.fr>
7828
7829 * data/bison.simple, data/bison.c++: Be sure to restore the
7830 current #line when returning to the skeleton contents after having
7831 exposed the input file's #line.
7832
7833 2002-06-12 Akim Demaille <akim@epita.fr>
7834
7835 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
7836 eager.
7837 * tests/actions.at (Exotic Dollars): New.
7838
7839 2002-06-12 Akim Demaille <akim@epita.fr>
7840
7841 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
7842 ['"/] too eagerly.
7843 * tests/input.at (Torturing the Scanner): New.
7844
7845 2002-06-11 Akim Demaille <akim@epita.fr>
7846
7847 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
7848 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
7849 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
7850 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
7851 * src/reader.c (reader): Use it.
7852
7853 2002-06-11 Akim Demaille <akim@epita.fr>
7854
7855 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
7856 Adjust all callers.
7857 (scanner_last_string_free): New.
7858
7859 2002-06-11 Akim Demaille <akim@epita.fr>
7860
7861 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
7862 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
7863 (last_string, YY_OBS_FREE): New.
7864 Use them when returning an ID.
7865
7866 2002-06-11 Akim Demaille <akim@epita.fr>
7867
7868 Have Bison grammars parsed by a Bison grammar.
7869
7870 * src/reader.c, src/reader.h (prologue_augment): New.
7871 * src/reader.c (copy_definition): Remove.
7872
7873 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
7874 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
7875 (grammar_current_rule_prec_set, grammar_current_rule_check)
7876 (grammar_current_rule_symbol_append)
7877 (grammar_current_rule_action_append): Export.
7878 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
7879 (symbol_list_action_append): Remove.
7880 Hook the routines from reader.
7881 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
7882 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
7883
7884 * src/reader.c (read_declarations): Remove, unused.
7885
7886 * src/parse-gram.y: Handle the epilogue.
7887 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
7888 (grammar_start_symbol_set): this.
7889 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
7890 * src/reader.c (readgram): Remove, unused.
7891 (reader): Adjust to insert eoftoken and axiom where appropriate.
7892
7893 * src/reader.c (copy_dollar): Replace with...
7894 * src/scan-gram.h (handle_dollar): this.
7895 * src/parse-gram.y: Remove `%thong'.
7896
7897 * src/reader.c (copy_at): Replace with...
7898 * src/scan-gram.h (handle_at): this.
7899
7900 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
7901 New.
7902
7903 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
7904 time being.
7905
7906 * src/reader.h, src/reader.c (grammar_rule_end): New.
7907
7908 * src/parse.y (current_type, current_class): New.
7909 Implement `%nterm', `%token' support.
7910 Merge `%term' into `%token'.
7911 (string_as_id): New.
7912 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
7913 type name.
7914
7915 * src/parse-gram.y: Be sure to handle properly the beginning of
7916 rules.
7917
7918 * src/parse-gram.y: Handle %type.
7919 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
7920
7921 * src/parse-gram.y: More directives support.
7922 * src/options.c: No longer handle source directives.
7923
7924 * src/parse-gram.y: Fix %output.
7925
7926 * src/parse-gram.y: Handle %union.
7927 Use the prologue locations.
7928 * src/reader.c (parse_union_decl): Remove.
7929
7930 * src/reader.h, src/reader.c (epilogue_set): New.
7931 * src/parse-gram.y: Use it.
7932
7933 * data/bison.simple, data/bison.c++: b4_stype is now either not
7934 defined, then default to int, or to the contents of %union,
7935 without `union' itself.
7936 Adjust.
7937 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
7938
7939 * src/output.c (actions_output): Don't output braces, as they are
7940 already handled by the scanner.
7941
7942 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
7943 characters to themselves.
7944
7945 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
7946 that the epilogue has a proper #line.
7947
7948 * src/parse-gram.y: Handle precedence/associativity.
7949
7950 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
7951 a terminal.
7952 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
7953 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
7954 at all to define terminals that cannot be emitted.
7955
7956 * src/scan-gram.l: Escape M4 characters.
7957
7958 * src/scan-gram.l: Working properly with escapes in user
7959 strings/characters.
7960
7961 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
7962 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
7963 grammar.
7964 Use more modest sizes, as for the time being the parser does not
7965 release memory, and therefore the process swallows a huge amount
7966 of memory.
7967
7968 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
7969 stricter %token grammar.
7970
7971 * src/symtab.h (associativity): Add `undef_assoc'.
7972 (symbol_precedence_set): Do nothing when passed an undef_assoc.
7973 * src/symtab.c (symbol_check_alias_consistence): Adjust.
7974
7975 * tests/regression.at (Invalid %directive): Remove, as it is now
7976 meaningless.
7977 (Invalid inputs): Adjust to the new error messages.
7978 (Token definitions): The new grammar doesn't allow too many
7979 eccentricities.
7980
7981 * src/lex.h, src/lex.c: Remove.
7982 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
7983 (copy_character, copy_string2, copy_string, copy_identifier)
7984 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
7985 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
7986 (parse_action): Remove.
7987 * po/POTFILES.in: Adjust.
7988
7989 2002-06-11 Akim Demaille <akim@epita.fr>
7990
7991 * src/reader.c (parse_action): Don't store directly into the
7992 rule's action member: return the action as a string.
7993 Don't require `rule_length' as an argument: compute it.
7994 (grammar_current_rule_symbol_append)
7995 (grammar_current_rule_action_append): New, eved out from
7996 (readgram): here.
7997 Remove `action_flag', `rulelength', unused now.
7998
7999 2002-06-11 Akim Demaille <akim@epita.fr>
8000
8001 * src/reader.c (grammar_current_rule_prec_set).
8002 (grammar_current_rule_check): New, eved out from...
8003 (readgram): here.
8004 Remove `xaction', `first_rhs': useless.
8005 * tests/input.at (Type clashes): New.
8006 * tests/existing.at (GNU Cim Grammar): Adjust.
8007
8008 2002-06-11 Akim Demaille <akim@epita.fr>
8009
8010 * src/reader.c (grammar_midrule_action): New, Eved out from
8011 (readgram): here.
8012
8013 2002-06-11 Akim Demaille <akim@epita.fr>
8014
8015 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
8016 New.
8017 (readgram): Use them as replacement of inlined code, crule and
8018 crule1.
8019
8020 2002-06-11 Akim Demaille <akim@epita.fr>
8021
8022 * src/reader.c (grammar_end, grammar_symbol_append): New.
8023 (readgram): Use them.
8024 Make the use of `p' as local as possible.
8025
8026 2002-06-10 Akim Demaille <akim@epita.fr>
8027
8028 GCJ's parser requires the tokens to be defined before the prologue.
8029
8030 * data/bison.simple: Output the token definition before the user's
8031 prologue.
8032 * tests/regression.at (Braces parsing, Duplicate string)
8033 (Mixing %token styles): Check the output from bison.
8034 (Early token definitions): New.
8035
8036 2002-06-10 Akim Demaille <akim@epita.fr>
8037
8038 * src/symtab.c (symbol_user_token_number_set): Don't complain when
8039 assigning twice the same user number to a token, so that we can
8040 use it in...
8041 * src/lex.c (lex): here.
8042 Also use `symbol_class_set' instead of hand written code.
8043 * src/reader.c (parse_assoc_decl): Likewise.
8044
8045 2002-06-10 Akim Demaille <akim@epita.fr>
8046
8047 * src/symtab.c, src/symtab.c (symbol_class_set)
8048 (symbol_user_token_number_set): New.
8049 * src/reader.c (parse_token_decl): Use them.
8050 Use a switch instead of ifs.
8051 Use a single argument.
8052
8053 2002-06-10 Akim Demaille <akim@epita.fr>
8054
8055 Remove `%thong' support as it is undocumented, unused, duplicates
8056 `%token's job, and creates useless e-mail traffic with people who
8057 want to know what it is, why it is undocumented, unused, and
8058 duplicates `%token's job.
8059
8060 * src/reader.c (parse_thong_decl): Remove.
8061 * src/options.c (option_table): Remove "thong".
8062 * src/lex.h (tok_thong): Remove.
8063
8064 2002-06-10 Akim Demaille <akim@epita.fr>
8065
8066 * src/symtab.c, src/symtab.c (symbol_type_set)
8067 (symbol_precedence_set): New.
8068 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
8069 (value_components_used): Remove, unused.
8070
8071 2002-06-09 Akim Demaille <akim@epita.fr>
8072
8073 Move symbols handling code out of the reader.
8074
8075 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
8076 (axiom): Move to...
8077 * src/symtab.h, src/symtab.c: here.
8078
8079 * src/gram.c (start_symbol): Remove: use startsymbol->number.
8080 * src/reader.c (startval): Rename as...
8081 * src/symtab.h, src/symtab.c (startsymbol): this.
8082 * src/reader.c: Adjust.
8083
8084 * src/reader.c (symbol_check_defined, symbol_make_alias)
8085 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
8086 (token_translations_init)
8087 Move to...
8088 * src/symtab.c: here.
8089 * src/reader.c (packsymbols): Move to...
8090 * src/symtab.h, src/symtab.c (symbols_pack): here.
8091 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
8092 argument.
8093
8094 2002-06-03 Akim Demaille <akim@epita.fr>
8095
8096 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
8097 then statements.
8098
8099 2002-06-03 Akim Demaille <akim@epita.fr>
8100
8101 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
8102 structs with non literals.
8103 * src/scan-skel.l: never-interactive.
8104 * src/conflicts.c (enum conflict_resolution_e): No trailing
8105 comma.
8106 * src/getargs.c (usage): Split long literal strings.
8107 Reported by Hans Aberg.
8108
8109 2002-05-28 Akim Demaille <akim@epita.fr>
8110
8111 * data/bison.c++: Use C++ ostreams.
8112 (cdebug_): New member.
8113
8114 2002-05-28 Akim Demaille <akim@epita.fr>
8115
8116 * src/output.c (output_skeleton): Be sure to allocate enough room
8117 for `/' _and_ for `\0' in full_skeleton.
8118
8119 2002-05-28 Akim Demaille <akim@epita.fr>
8120
8121 * data/bison.c++: Catch up with bison.simple:
8122 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8123 and Paul Eggert <eggert@twinsun.com>: `error' handing.
8124 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
8125 and popping traces.
8126
8127 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8128
8129 * src/output.c (output_skeleton): Put an explicit path in front of
8130 the skeleton file name, rather than relying on the -I directory,
8131 to partially alleviate effects of having a skeleton file lying around
8132 in the current directory.
8133
8134 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8135
8136 * src/conflicts.c (log_resolution): Correct typo:
8137 obstack_printf should be obstack_fgrow1.
8138
8139 2002-05-26 Akim Demaille <akim@epita.fr>
8140
8141 * src/state.h (state_t): `solved_conflicts' is a new member.
8142 * src/LR0.c (new_state): Set it to 0.
8143 * src/conflicts.h, src/conflicts.c (print_conflicts)
8144 (free_conflicts, solve_conflicts): Rename as...
8145 (conflicts_print, conflicts_free, conflicts_solve): these.
8146 Adjust callers.
8147 * src/conflicts.c (enum conflict_resolution_e)
8148 (solved_conflicts_obstack): New, used by...
8149 (log_resolution): this.
8150 Adjust to attach the conflict resolution to each state.
8151 Complete the description with the precedence/associativity
8152 information.
8153 (resolve_sr_conflict): Adjust.
8154 * src/print.c (print_state): Output its solved_conflicts.
8155 * tests/conflicts.at (Unresolved SR Conflicts)
8156 (Solved SR Conflicts): Exercise --report=all.
8157
8158 2002-05-26 Akim Demaille <akim@epita.fr>
8159
8160 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
8161 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
8162 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
8163 (token_number_t, item_number_as_token_number)
8164 (token_number_as_item_number, muscle_insert_token_number_table):
8165 Rename as...
8166 (symbol_number_t, item_number_as_symbol_number)
8167 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
8168 these, since it is more appropriate.
8169
8170 2002-05-26 Akim Demaille <akim@epita.fr>
8171
8172 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
8173 `Error:' lines.
8174 * data/bison.simple (yystos) [YYDEBUG]: New.
8175 (yyparse) [YYDEBUG]: Display the symbols which are popped during
8176 error recovery.
8177 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
8178
8179 2002-05-25 Akim Demaille <akim@epita.fr>
8180
8181 * doc/bison.texinfo (Debugging): Split into...
8182 (Tracing): this new section, its former contents, and...
8183 (Understanding): this new section.
8184 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
8185 by...
8186 (report_flag): this.
8187 Adjust all dependencies.
8188 (report_args, report_types, report_argmatch): New.
8189 (usage, getargs): Report/support -r, --report.
8190 * src/options.h
8191 (struct option_table_struct): Rename as..,
8192 (struct option_table_s): this.
8193 Rename the `set_flag' member to `flag' to match with getopt_long's
8194 struct.
8195 * src/options.c (option_table): Split verbose into an entry for
8196 %verbose, and another for --verbose.
8197 Support --report/-r, so remove -r from the obsolete --raw.
8198 * src/print.c: Attach full item sets and lookaheads reports to
8199 report_flag instead of trace_flag.
8200 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
8201
8202 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8203 and Paul Eggert <eggert@twinsun.com>
8204
8205 * data/bison.simple (yyparse): Correct error handling to conform to
8206 POSIX and yacc. Specifically, after syntax error is discovered,
8207 do not reduce further before shifting the error token.
8208 Clean up the code a bit by removing the labels yyerrdefault,
8209 yyerrhandle, yyerrpop.
8210 * NEWS: Document the above.
8211
8212 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8213
8214 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
8215 type; it isn't always big enough, since it doesn't necessarily
8216 include non-terminals.
8217 (yytranslate): Expand definition of yy_token_number_type, so that
8218 the latter can be removed.
8219 (yy_token_number_type): Remove, only one use.
8220 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
8221 don't use TokenNumberType as element type.
8222
8223 * tests/regression.at: Modify expected output to agree with change
8224 to yyr1 and yytranslate.
8225
8226 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
8227
8228 * src/reader.c (parse_action): Use copy_character instead of
8229 obstack_1grow.
8230
8231 2002-05-13 Akim Demaille <akim@epita.fr>
8232
8233 * tests/regression.at (Token definitions): Prototype yylex and
8234 yyerror.
8235
8236 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8237
8238 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
8239 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
8240 32-bit arithmetic.
8241 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
8242
8243 2002-05-07 Akim Demaille <akim@epita.fr>
8244
8245 * tests/synclines.at: Be sure to prototype yylex and yyerror to
8246 avoid GCC warnings.
8247
8248 2002-05-07 Akim Demaille <akim@epita.fr>
8249
8250 Kill GCC warnings.
8251
8252 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
8253 over the RHS of each rule.
8254 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
8255 * src/state.h (state_t): Member `nitems' is unsigned short.
8256 * src/LR0.c (get_state): Adjust.
8257 * src/reader.c (packgram): Likewise.
8258 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
8259 `Type'.
8260 (muscle_insert_int_table): Remove, unused.
8261 (prepare_rules): Remove `max'.
8262
8263 2002-05-06 Akim Demaille <akim@epita.fr>
8264
8265 * src/closure.c (print_firsts): Display of the symbol tags.
8266 (bitmatrix_print): Move to...
8267 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
8268 here.
8269 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
8270
8271 2002-05-06 Akim Demaille <akim@epita.fr>
8272
8273 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
8274 hash_do_for_each.
8275
8276 2002-05-06 Akim Demaille <akim@epita.fr>
8277
8278 * src/LR0.c (new_state, get_state): Instead of using the global
8279 `kernel_size' and `kernel_base', have two new arguments:
8280 `core_size' and `core'.
8281 Adjust callers.
8282
8283 2002-05-06 Akim Demaille <akim@epita.fr>
8284
8285 * src/reader.c (packgram): No longer end `ritem' with a 0
8286 sentinel: it is not used.
8287
8288 2002-05-05 Akim Demaille <akim@epita.fr>
8289
8290 New experimental feature: display the lookaheads in the report and
8291 graph.
8292
8293 * src/print (print_core): When --trace-flag, display the rules
8294 lookaheads.
8295 * src/print_graph.c (print_core): Likewise.
8296 Swap the arguments.
8297 Adjust caller.
8298
8299 2002-05-05 Akim Demaille <akim@epita.fr>
8300
8301 * tests/torture.at (Many lookaheads): New test.
8302
8303 2002-05-05 Akim Demaille <akim@epita.fr>
8304
8305 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
8306 (GENERATE_MUSCLE_INSERT_TABLE): this.
8307 (output_int_table, output_unsigned_int_table, output_short_table)
8308 (output_token_number_table, output_item_number_table): Replace with...
8309 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
8310 (muscle_insert_short_table, muscle_insert_token_number_table)
8311 (muscle_insert_item_number_table): these.
8312 Adjust all callers.
8313 (prepare_tokens): Don't free `translations', since...
8314 * src/reader.h, src/reader.c (grammar_free): do it.
8315 Move to...
8316 * src/gram.h, src/gram.c (grammar_free): here.
8317 * data/bison.simple, data/bison.c++: b4_token_number_max is now
8318 b4_translate_max.
8319
8320 2002-05-05 Akim Demaille <akim@epita.fr>
8321
8322 * src/output.c (output_unsigned_int_table): New.
8323 (prepare_rules): `i' is unsigned.
8324 `prhs', `rline', `r2' are unsigned int.
8325 Rename muscle `rhs_number_max' as `rhs_max'.
8326 Output muscles `prhs_max', `rline_max', and `r2_max'.
8327 Free rline and r1.
8328 * data/bison.simple, data/bison.c++: Adjust to use these muscles
8329 to compute types instead of constant types.
8330 * tests/regression.at (Web2c Actions): Adjust.
8331
8332 2002-05-04 Akim Demaille <akim@epita.fr>
8333
8334 * src/symtab.h (SALIAS, SUNDEF): Rename as...
8335 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
8336 Adjust dependencies.
8337 * src/output.c (token_definitions_output): Be sure not to output a
8338 `#define 'a'' when fed with `%token 'a' "a"'.
8339 * tests/regression.at (Token definitions): New.
8340
8341 2002-05-03 Paul Eggert <eggert@twinsun.com>
8342
8343 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
8344 for K&R C.
8345
8346 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
8347
8348 * Makefile.am (SUBDIRS): Remove intl.
8349 (EXTRA_DIST): Add config/config.rpath.
8350
8351 2002-05-03 Akim Demaille <akim@epita.fr>
8352
8353 * data/bison.simple (m4_if): Don't output empty enums.
8354 And actually, output valid enum definitions :(.
8355
8356 2002-05-03 Akim Demaille <akim@epita.fr>
8357
8358 * configure.bat: Remove, completely obsolete.
8359 * Makefile.am (EXTRA_DIST): Adjust.
8360 Don't distribute config.rpath...
8361 * config/Makefile.am (EXTRA_DIST): Do it.
8362
8363 2002-05-03 Akim Demaille <akim@epita.fr>
8364
8365 * configure.in (GETTEXT_VERSION): New.
8366 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
8367
8368 2002-05-03 Akim Demaille <akim@epita.fr>
8369
8370 * data/bison.simple (b4_token_enum): New.
8371 (b4_token_defines): Use it to output tokens both as #define and
8372 enums.
8373 Suggested by Paul Eggert.
8374 * src/output.c (token_definitions_output): Don't output spurious
8375 white spaces.
8376
8377 2002-05-03 Akim Demaille <akim@epita.fr>
8378
8379 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
8380
8381 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
8382
8383 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
8384 Update the stack class, give a try to deque as the default container.
8385
8386 2002-05-02 Akim Demaille <akim@epita.fr>
8387
8388 * data/bison.simple (yyparse): Do not implement @$ = @1.
8389 (YYLLOC_DEFAULT): Adjust to do it.
8390 * doc/bison.texinfo (Location Default Action): Fix.
8391
8392 2002-05-02 Akim Demaille <akim@epita.fr>
8393
8394 * src/reader.c (parse_braces): Merge into...
8395 (parse_action): this.
8396
8397 2002-05-02 Akim Demaille <akim@epita.fr>
8398
8399 * configure.in (ALL_LINGUAS): Remove.
8400 * po/LINGUAS, hr.po: New.
8401
8402 2002-05-02 Akim Demaille <akim@epita.fr>
8403
8404 Remove the so called hairy (semantic) parsers.
8405
8406 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
8407 * src/gram.h, src/gram.c (semantic_parser): Remove.
8408 (rule_t): Remove the guard and guard_line members.
8409 * src/lex.h (token_t): remove tok_guard.
8410 * src/options.c (option_table): Remove %guard and %semantic_parser
8411 support.
8412 * src/output.c, src/output.h (guards_output): Remove.
8413 (prepare): Adjust.
8414 (token_definitions_output): Don't output the `T'
8415 tokens (???).
8416 (output_skeleton): Don't output the guards.
8417 * src/files.c, src/files.c (attrsfile): Remove.
8418 * src/reader.c (symbol_list): Remove the guard and guard_line
8419 members.
8420 Adjust dependencies.
8421 (parse_guard): Remove.
8422 * data/bison.hairy: Remove.
8423 * doc/bison.texinfo (Environment Variables): Remove occurrences of
8424 BISON_HAIRY.
8425
8426 2002-05-02 Akim Demaille <akim@epita.fr>
8427
8428 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
8429 (parse_guard): Rename the formal argument `stack_offset' as
8430 `rule_length', which is more readable.
8431 Adjust callers.
8432 (copy_at, copy_dollar): Instead of outputting the hard coded
8433 values of $$, $n and so forth, output invocation to b4_lhs_value,
8434 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
8435 Note: this patch partially drops `semantic-parser' support: it
8436 always does `rule_length - n', where semantic parsers ought to
8437 always use `-n'.
8438 * data/bison.simple, data/bison.c++ (b4_lhs_value)
8439 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
8440
8441 2002-05-02 Akim Demaille <akim@epita.fr>
8442
8443 * configure.in (AC_INIT): Bump to 1.49b.
8444 (AM_INIT_AUTOMAKE): Short invocation.
8445
8446 2002-05-02 Akim Demaille <akim@epita.fr>
8447
8448 Version 1.49a.
8449
8450 2002-05-01 Akim Demaille <akim@epita.fr>
8451
8452 * src/skeleton.h: Remove.
8453
8454 2002-05-01 Akim Demaille <akim@epita.fr>
8455
8456 * src/skeleton.h: Fix the #endif.
8457 Reported by Magnus Fromreide.
8458
8459 2002-04-26 Paul Eggert <eggert@twinsun.com>
8460
8461 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
8462 Define if we define YYSTYPE and YYLTYPE, respectively.
8463 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8464
8465 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
8466
8467 * src/scan-skel.l: Postprocess quadrigraphs.
8468
8469 * src/reader.c (copy_character): New function, used to output
8470 single characters while replacing `[' and `]' with quadrigraphs, to
8471 avoid troubles with M4 quotes.
8472 (copy_comment): Output characters with copy_character.
8473 (read_additionnal_code): Likewise.
8474 (copy_string2): Likewise.
8475 (copy_definition): Likewise.
8476
8477 * tests/calc.at: Exercise M4 quoting.
8478
8479 2002-04-25 Akim Demaille <akim@epita.fr>
8480
8481 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
8482 between `!' and the command.
8483 Reported by Paul Eggert.
8484
8485 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
8486
8487 * tests/calc.at: Exercise prologue splitting.
8488
8489 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
8490 `b4_post_prologue' instead of `b4_prologue'.
8491
8492 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
8493 muscles.
8494 (output): Free pre_prologue_obstack and post_prologue_obstack.
8495 * src/files.h, src/files.c (attrs_obstack): Remove.
8496 (pre_prologue_obstack, post_prologue_obstack): New.
8497 * src/reader.c (copy_definition): Add a parameter to specify the
8498 obstack to fill, instead of using attrs_obstack unconditionally.
8499 (read_declarations): Pass pre_prologue_obstack to copy_definition if
8500 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
8501
8502 2002-04-23 Paul Eggert <eggert@twinsun.com>
8503
8504 * data/bison.simple: Remove unnecessary commentary and white
8505 space differences from 1_29-branch.
8506 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
8507
8508 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
8509 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
8510 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
8511 constructors or destructors.
8512
8513 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
8514
8515 2002-04-23 Akim Demaille <akim@epita.fr>
8516
8517 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
8518 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
8519 location with columns.
8520 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
8521 All reported by Paul Eggert.
8522
8523 2002-04-22 Akim Demaille <akim@epita.fr>
8524
8525 * src/reduce.c (dump_grammar): Move to...
8526 * src/gram.h, src/gram.c (grammar_dump): here.
8527 Be sure to separate long item numbers.
8528 Don't read the members of a rule's prec if its nil.
8529
8530 2002-04-22 Akim Demaille <akim@epita.fr>
8531
8532 * src/output.c (table_size, table_grow): New.
8533 (MAXTABLE): Remove, replace uses with table_size.
8534 (pack_vector): Instead of dying when the table is too big, grow it.
8535
8536 2002-04-22 Akim Demaille <akim@epita.fr>
8537
8538 * data/bison.simple (yyr1): Its type is that of a token number.
8539 * data/bison.c++ (r1_): Likewise.
8540 * tests/regression.at (Web2c Actions): Adjust.
8541
8542 2002-04-22 Akim Demaille <akim@epita.fr>
8543
8544 * src/reader.c (token_translations_init): 256 is now the default
8545 value for the error token, i.e., it will be assigned another
8546 number if the user assigned 256 to one of her tokens.
8547 (reader): Don't force 256 to error.
8548 * doc/bison.texinfo (Symbols): Adjust.
8549 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
8550 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
8551 etc. instead of 10, 20, 30 (which was used to `jump' over error
8552 (256) and undefined (2)).
8553
8554 2002-04-22 Akim Demaille <akim@epita.fr>
8555
8556 Propagate more token_number_t.
8557
8558 * src/gram.h (token_number_as_item_number)
8559 (item_number_as_token_number): New.
8560 * src/output.c (GENERATE_OUTPUT_TABLE): New.
8561 Use it to create output_item_number_table and
8562 output_token_number_table.
8563 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
8564 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
8565 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
8566 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
8567
8568 2002-04-22 Akim Demaille <akim@epita.fr>
8569
8570 * src/output.h, src/output.c (get_lines_number): Remove.
8571
8572 2002-04-19 Akim Demaille <akim@epita.fr>
8573
8574 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
8575 as Lex/Flex'.
8576 (Debugging): More details about enabling the debugging features.
8577 (Table of Symbols): Describe $$, $n, @$, and @n.
8578 Suggested by Tim Josling.
8579
8580 2002-04-19 Akim Demaille <akim@epita.fr>
8581
8582 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
8583
8584 2002-04-10 Akim Demaille <akim@epita.fr>
8585
8586 * src/system.h: Rely on HAVE_LIMITS_H.
8587 Suggested by Paul Eggert.
8588
8589 2002-04-09 Akim Demaille <akim@epita.fr>
8590
8591 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
8592 full stderr, and strip it according to the bison options, instead
8593 of composing the error message from different bits.
8594 This makes it easier to check for several error messages.
8595 Adjust all the invocations.
8596 Add an invocation exercising the error token.
8597 Add an invocation demonstrating a stupid error message.
8598 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
8599 Adjust the tests.
8600 Error message are for stderr, not stdout.
8601
8602 2002-04-09 Akim Demaille <akim@epita.fr>
8603
8604 * src/gram.h, src/gram.c (error_token_number): Remove, use
8605 errtoken->number.
8606 * src/reader.c (reader): Don't specify the user token number (2)
8607 for $undefined, as it uselessly prevents using it.
8608 * src/gram.h (token_number_t): Move to...
8609 * src/symtab.h: here.
8610 (state_t.number): Is a token_number_t.
8611 * src/print.c, src/reader.c: Use undeftoken->number instead of
8612 hard coded 2.
8613 (Even though this 2 is not the same as above: the number of the
8614 undeftoken remains being 2, it is its user token number which
8615 might not be 2).
8616 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
8617 `user_token_number_max'.
8618 Output `undef_token_number'.
8619 * data/bison.simple, data/bison.c++: Use them.
8620 Be sure to map invalid yylex return values to
8621 `undef_token_number'. This saves us from gratuitous SEGV.
8622
8623 * tests/conflicts.at (Solved SR Conflicts)
8624 (Unresolved SR Conflicts): Adjust.
8625 * tests/regression.at (Web2c Actions): Adjust.
8626
8627 2002-04-08 Akim Demaille <akim@epita.fr>
8628
8629 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
8630 Adding #line.
8631 Remove the duplicate `typedefs'.
8632 (RhsNumberType): Fix the declaration and various other typos.
8633 Use __ofile__.
8634 * data/bison.simple: Use __ofile__.
8635 * src/scan-skel.l: Handle __ofile__.
8636
8637 2002-04-08 Akim Demaille <akim@epita.fr>
8638
8639 * src/gram.h (item_number_t): New, the type of item numbers in
8640 RITEM. Note that it must be able to code symbol numbers as
8641 positive number, and the negation of rule numbers as negative
8642 numbers.
8643 Adjust all dependencies (pretty many).
8644 * src/reduce.c (rule): Remove this `short *' pointer: use
8645 item_number_t.
8646 * src/system.h (MINSHORT, MAXSHORT): Remove.
8647 Include `limits.h'.
8648 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
8649 (shortcpy): Remove.
8650 (MAXTABLE): Move to...
8651 * src/output.c (MAXTABLE): here.
8652 (prepare_rules): Use output_int_table to output rhs.
8653 * data/bison.simple, data/bison.c++: Adjust.
8654 * tests/torture.at (Big triangle): Move the limit from 254 to
8655 500.
8656 * tests/regression.at (Web2c Actions): Ajust.
8657
8658 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
8659 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
8660 passes, but produces negative #line number, once fixed, GCC is
8661 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
8662 C), it passes.
8663 * src/state.h (state_h): Code input lines on ints, not shorts.
8664
8665 2002-04-08 Akim Demaille <akim@epita.fr>
8666
8667 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
8668 and then the grammar.
8669
8670 2002-04-08 Akim Demaille <akim@epita.fr>
8671
8672 * src/system.h: No longer using strndup.
8673
8674 2002-04-07 Akim Demaille <akim@epita.fr>
8675
8676 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
8677 * src/output.c (output_table_data): Return the longest number.
8678 (prepare_tokens): Output `token_number_max').
8679 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
8680 New.
8681 Use them to define yy_token_number_type/TokenNumberType.
8682 Use this type for yytranslate.
8683 * tests/torture.at (Big triangle): Push the limit from 124 to
8684 253.
8685 * tests/regression.at (Web2c Actions): Adjust.
8686
8687 2002-04-07 Akim Demaille <akim@epita.fr>
8688
8689 * tests/torture.at (Big triangle): New.
8690 (GNU AWK Grammar, GNU Cim Grammar): Move to...
8691 * tests/existing.at: here.
8692
8693 2002-04-07 Akim Demaille <akim@epita.fr>
8694
8695 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
8696 nritems.
8697 Adjust dependencies.
8698
8699 2002-04-07 Akim Demaille <akim@epita.fr>
8700
8701 * src/reader.c: Normalize increments to prefix form.
8702
8703 2002-04-07 Akim Demaille <akim@epita.fr>
8704
8705 * src/reader.c, symtab.c: Remove debugging code.
8706
8707 2002-04-07 Akim Demaille <akim@epita.fr>
8708
8709 Rename all the `bucket's as `symbol_t'.
8710
8711 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
8712 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
8713 * src/symtab.c, src/symtab.h (bucket): Rename as...
8714 (symbol_t): this.
8715 (symbol_list_new, bucket_check_defined, bucket_make_alias)
8716 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
8717 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
8718 (buckets_new, buckets_free, buckets_do): Rename as...
8719 (symbol_list_new, symbol_check_defined, symbol_make_alias)
8720 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
8721 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
8722 (symbols_new, symbols_free, symbols_do): these.
8723
8724 2002-04-07 Akim Demaille <akim@epita.fr>
8725
8726 Use lib/hash for the symbol table.
8727
8728 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
8729 EOF.
8730 * src/lex.c (lex): Set the `number' member of new terminals.
8731 * src/reader.c (bucket_check_defined, bucket_make_alias)
8732 (bucket_check_alias_consistence, bucket_translation): New.
8733 (reader, grammar_free, readgram, token_translations_init)
8734 (packsymbols): Adjust.
8735 (reader): Number the predefined tokens.
8736 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
8737 for predefined tokens.
8738 * src/symtab.h (bucket): Remove all the hash table related
8739 members.
8740 * src/symtab.c (symtab): Replace by...
8741 (bucket_table): this.
8742 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
8743 (buckets_new, buckets_do): New.
8744
8745 2002-04-07 Akim Demaille <akim@epita.fr>
8746
8747 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
8748 (start_symbol, max_user_token_number, semantic_parser)
8749 (error_token_number): Initialize.
8750 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
8751 Initialize.
8752 (reader): Don't.
8753 (errtoken, eoftoken, undeftoken, axiom): Extern.
8754
8755 2002-04-07 Akim Demaille <akim@epita.fr>
8756
8757 * src/gram.h (rule_s): prec and precsym are now pointers
8758 to the bucket giving the priority/associativity.
8759 Member `associativity' removed: useless.
8760 * src/reduce.c, src/conflicts.c: Adjust.
8761
8762 2002-04-07 Akim Demaille <akim@epita.fr>
8763
8764 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
8765 Properly escape the symbols' TAG when outputting them.
8766
8767 2002-04-07 Akim Demaille <akim@epita.fr>
8768
8769 * src/lalr.h (LA): Is a bitsetv, not bitset*.
8770
8771 2002-04-07 Akim Demaille <akim@epita.fr>
8772
8773 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
8774 (LArule): this, which is an array to rule_t*.
8775 * src/print.c, src/conflicts.c: Adjust.
8776
8777 2002-04-07 Akim Demaille <akim@epita.fr>
8778
8779 * src/gram.h (rule_t): Rename `number' as `user_number'.
8780 `number' is a new member.
8781 Adjust dependencies.
8782 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
8783
8784 2002-04-07 Akim Demaille <akim@epita.fr>
8785
8786 As a result of the previous patch, it is no longer needed
8787 to reorder ritem itself.
8788
8789 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
8790
8791 2002-04-07 Akim Demaille <akim@epita.fr>
8792
8793 Be sure never to walk through RITEMS, but use only data related to
8794 the rules themselves. RITEMS should be banished.
8795
8796 * src/output.c (output_token_translations): Rename as...
8797 (prepare_tokens): this.
8798 In addition to `translate', prepare the muscles `tname' and
8799 `toknum', which were handled by...
8800 (output_rule_data): this.
8801 Remove, and move the remainder of its outputs into...
8802 (prepare_rules): this new routines, which also merges content from
8803 (output_gram): this.
8804 (prepare_rules): Be sure never to walk through RITEMS.
8805 (output_stos): Rename as...
8806 (prepare_stos): this.
8807 (output): Always invoke prepare_states, after all, just don't use it
8808 in the output if you don't need it.
8809
8810 2002-04-07 Akim Demaille <akim@epita.fr>
8811
8812 * src/LR0.c (new_state): Display `nstates' as the name of the
8813 newly created state.
8814 Adjust to initialize first_state and last_state if needed.
8815 Be sure to distinguish the initial from the final state.
8816 (new_states): Create the itemset of the initial state, and use
8817 new_state.
8818 * src/closure.c (closure): Now that the initial state has its
8819 items properly set, there is no need for a special case when
8820 creating `ruleset'.
8821
8822 As a result, now the rule 0, reducing to $axiom, is visible in the
8823 outputs. Adjust the test suite.
8824
8825 * tests/conflicts.at (Solved SR Conflicts)
8826 (Unresolved SR Conflicts): Adjust.
8827 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
8828 * tests/conflicts.at (S/R in initial): New.
8829
8830 2002-04-07 Akim Demaille <akim@epita.fr>
8831
8832 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
8833 the RHS of the rules.
8834 * src/output.c (output_gram): Likewise.
8835
8836 2002-04-07 Akim Demaille <akim@epita.fr>
8837
8838 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
8839 bucket.
8840 Adjust all dependencies.
8841 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
8842 `number' of the buckets too.
8843 * src/gram.h: Include `symtab.h'.
8844 (associativity): Move to...
8845 * src/symtab.h: here.
8846 No longer include `gram.h'.
8847
8848 2002-04-07 Akim Demaille <akim@epita.fr>
8849
8850 * src/gram.h, src/gram.c (rules_rhs_length): New.
8851 (ritem_longest_rhs): Use it.
8852 * src/gram.h (rule_t): `number' is a new member.
8853 * src/reader.c (packgram): Set it.
8854 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
8855 the end of `rules', and count them out of `nrules'.
8856 (reduce_output, dump_grammar): Adjust.
8857 * src/print.c (print_grammar): It is no longer needed to check for
8858 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
8859 * tests/reduce.at (Reduced Automaton): New test.
8860
8861 2002-04-07 Akim Demaille <akim@epita.fr>
8862
8863 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
8864 lacking `+ 1' to nrules, Bison reported as useless a token if it
8865 was used solely to set the precedence of the last rule...
8866
8867 2002-04-07 Akim Demaille <akim@epita.fr>
8868
8869 * data/bison.c++, data/bison.simple: Don't output the current file
8870 name in #line, to avoid useless diffs between two identical
8871 outputs under different names.
8872
8873 2002-04-07 Akim Demaille <akim@epita.fr>
8874
8875 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
8876 Normalize loops to using `< nrules + 1', not `<= nrules'.
8877
8878 2002-04-07 Akim Demaille <akim@epita.fr>
8879
8880 * TODO: Update.
8881
8882 2002-04-07 Akim Demaille <akim@epita.fr>
8883
8884 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
8885 bucket.value as bucket.number.
8886
8887 2002-04-07 Akim Demaille <akim@epita.fr>
8888
8889 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
8890 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
8891 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
8892 RHS, instead of being an index in RITEMS.
8893
8894 2002-04-04 Paul Eggert <eggert@twinsun.com>
8895
8896 * doc/bison.texinfo: Update copyright date.
8897 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
8898 (Symbols): Warn about running Bison in one character set,
8899 but compiling and/or running in an incompatible one.
8900 Warn about character code 256, too.
8901
8902 2002-04-03 Paul Eggert <eggert@twinsun.com>
8903
8904 * src/bison.data (YYSTACK_ALLOC): Depend on whether
8905 YYERROR_VERBOSE is nonzero, not whether it is defined.
8906
8907 Merge changes from bison-1_29-branch.
8908
8909 2002-03-20 Paul Eggert <eggert@twinsun.com>
8910
8911 Merge fixes from Debian bison_1.34-1.diff.
8912
8913 * configure.in (AC_PREREQ): 2.53.
8914
8915 2002-03-20 Akim Demaille <akim@epita.fr>
8916
8917 * src/conflicts.c (log_resolution): Argument `resolution' is const.
8918
8919 2002-03-19 Paul Eggert <eggert@twinsun.com>
8920
8921 * src/bison.simple (YYCOPY): New macro.
8922 (YYSTACK_RELOCATE): Use it.
8923 Remove Type arg; no longer needed. All callers changed.
8924 (yymemcpy): Remove; no longer needed.
8925
8926 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
8927 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
8928
8929 2002-03-19 Akim Demaille <akim@epita.fr>
8930
8931 Test and fix the #line outputs.
8932
8933 * tests/atlocal.at (GCC): New.
8934 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
8935 (Prologue synch line, %union synch line, Postprologue synch line)
8936 (Action synch line, Epilogue synch line): New tests.
8937 * src/reader.c (parse_union_decl): Define the muscle stype_line.
8938 * data/bison.simple, data/bison.c++: Use it.
8939
8940 2002-03-19 Akim Demaille <akim@epita.fr>
8941
8942 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
8943 (Solved SR Conflicts, %expect not enough, %expect right)
8944 (%expect too much): Move to...
8945 * tests/conflicts.at: this new file.
8946
8947 2002-03-19 Akim Demaille <akim@epita.fr>
8948
8949 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
8950 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
8951 that we can move to enums for instance.
8952 * src/output.c (token_definitions_output): Output a list of
8953 `token-name, token-number' instead of the #define.
8954 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
8955
8956 2002-03-14 Akim Demaille <akim@epita.fr>
8957
8958 Use Gettext 0.11.1.
8959
8960 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
8961
8962 * data/bison.c++: Make the user able to add members to the generated
8963 parser by subclassing.
8964
8965 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
8966
8967 * src/reader.c (read_additionnal_code): `c' should be an integer, not
8968 a character.
8969 Reported by Nicolas Tisserand and Nicolas Burrus.
8970
8971 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
8972
8973 * src/reader.c: Warn about lacking semi-colons, do not complain.
8974
8975 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
8976
8977 * data/bison.c++: Remove a debug line.
8978
8979 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
8980
8981 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
8982 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
8983 provide a default implementation.
8984
8985 2002-03-04 Akim Demaille <akim@epita.fr>
8986
8987 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
8988 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
8989 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
8990 * tests/semantic.at (Parsing Guards): Similarly.
8991 * src/reader.at (readgram): Complain if the last rule is not ended
8992 with a semi-colon.
8993
8994 2002-03-04 Akim Demaille <akim@epita.fr>
8995
8996 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
8997 * src/closure.c: here.
8998 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
8999 RTC.
9000 * src/warshall.h, src/warshall.c: Remove.
9001 * tests/sets.at (Broken Closure): Adjust.
9002
9003 2002-03-04 Akim Demaille <akim@epita.fr>
9004
9005 * src/output.c (output_skeleton): tempdir is const.
9006 bytes_read is unused.
9007
9008 2002-03-04 Akim Demaille <akim@epita.fr>
9009
9010 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
9011 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
9012 Update.
9013 From Michael Hayes.
9014
9015 2002-03-04 Akim Demaille <akim@epita.fr>
9016
9017 * src/closure.c (closure): `r' is unused.
9018
9019 2002-03-04 Akim Demaille <akim@epita.fr>
9020
9021 * tests/sets.at (Broken Closure): Add the ending `;'.
9022 * src/reader.at (readgram): Complain if a rule is not ended with a
9023 semi-colon.
9024
9025 2002-03-04 Akim Demaille <akim@epita.fr>
9026
9027 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
9028 (count_sr_conflicts): Use bitset_count.
9029 * src/reduce.c (inaccessable_symbols): Ditto.
9030 (bits_size): Remove.
9031 * src/warshall.h, src/warshall.c: Convert to bitsetv.
9032
9033 2002-03-04 Akim Demaille <akim@epita.fr>
9034
9035 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
9036 * src/reduce.c: Remove the `bitset_zero's following the
9037 `bitset_create's, as now it is performed by the latter.
9038
9039 2002-03-04 Akim Demaille <akim@epita.fr>
9040
9041 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
9042 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
9043 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
9044 latest sources from Michael.
9045
9046 2002-03-04 Akim Demaille <akim@epita.fr>
9047
9048 * src/output.c (output): Don't free the grammar.
9049 * src/reader.c (grammar_free): New.
9050 * src/main.c (main): Call it and don't free symtab here.
9051
9052 2002-03-04 Akim Demaille <akim@epita.fr>
9053
9054 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
9055 before returning.
9056 Reported by Benoit Perrot.
9057
9058 2002-03-04 Akim Demaille <akim@epita.fr>
9059
9060 Use bitset operations when possible, not loops over bits.
9061
9062 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
9063 bitset_or.
9064 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
9065 * src/reduce.c (useless_nonterminals): Formatting changes.
9066 * src/warshall.c (TC): Use bitset_or.
9067
9068 2002-03-04 Akim Demaille <akim@epita.fr>
9069
9070 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
9071 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
9072 Ditto.
9073
9074 2002-03-04 Akim Demaille <akim@epita.fr>
9075
9076 * src/lalr.c (F): Now a bitset*.
9077 Adjust all dependencies.
9078
9079 2002-03-04 Akim Demaille <akim@epita.fr>
9080
9081 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
9082 Adjust all dependencies.
9083
9084 2002-03-04 Akim Demaille <akim@epita.fr>
9085
9086 * src/L0.c, src/LR0.h (nstates): Be size_t.
9087 Adjust comparisons (signed vs unsigned).
9088 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
9089 bitset*.
9090 Adjust all dependencies.
9091
9092 2002-03-04 Akim Demaille <akim@epita.fr>
9093
9094 * src/closure.c (firsts): Now, also a bitset.
9095 Adjust all dependencies.
9096 (varsetsize): Remove, now unused.
9097 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
9098
9099 2002-03-04 Akim Demaille <akim@epita.fr>
9100
9101 * src/print.c: Convert to use bitset.h, not hand coded iterations
9102 over ints.
9103
9104 2002-03-04 Akim Demaille <akim@epita.fr>
9105
9106 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
9107
9108 2002-03-04 Akim Demaille <akim@epita.fr>
9109
9110 * src/closure.c (ruleset): Be a bitset.
9111 (rulesetsize): Remove.
9112
9113 2002-03-04 Akim Demaille <akim@epita.fr>
9114
9115 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
9116 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
9117 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
9118 * src/closure.c (fderives): Be an array of bitsets.
9119
9120 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
9121
9122 * data/bison.c++: Merge the two generated headers. Insert a copyright
9123 notice in each output file.
9124
9125 2002-02-28 Akim Demaille <akim@epita.fr>
9126
9127 * data/bison.c++: Copy the prologue of bison.simple to fetch
9128 useful M4 definitions, such as b4_header_guard.
9129
9130 2002-02-25 Akim Demaille <akim@epita.fr>
9131
9132 * src/getargs.c (version): Give the name of the authors, and use a
9133 translator friendly scheme for the bgr
9134 copyright notice.
9135
9136 2002-02-25 Akim Demaille <akim@epita.fr>
9137
9138 * src/output.c (header_output): Remove, now handled completely via
9139 M4.
9140
9141 2002-02-25 Akim Demaille <akim@epita.fr>
9142
9143 * m4/m4.m4: New, from CVS Autoconf.
9144 * configure.in: Invoke it.
9145 * src/output.c (output_skeleton): Use its result instead of the
9146 hard coded name.
9147
9148 2002-02-25 Akim Demaille <akim@epita.fr>
9149
9150 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
9151 Fileutils 4.1.5.
9152 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
9153 * src/output.c (output_skeleton): Use mkstemp to create a real
9154 temporary file.
9155 Move the filling of `skeleton' and its muscle to...
9156 (prepare): here.
9157 (output): Move the definition of the prologue muscle to...
9158 (prepare): here.
9159 * src/system.h (DEFAULT_TMPDIR): New.
9160
9161 2002-02-14 Paul Eggert <eggert@twinsun.com>
9162
9163 Remove the support for C++ namespace cleanliness; it was
9164 causing more problems than it was curing, since it didn't work
9165 properly on some nonstandard C++ compilers. This can wait
9166 for a proper C++ parser.
9167
9168 * NEWS: Document this.
9169 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
9170 of C++, as it's treated like C now.
9171 * src/bison.simple (YYSTD): Remove.
9172 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
9173 Treat C++ just like Standard C instead of trying to support
9174 namespace cleanliness.
9175
9176 2002-02-14 Akim Demaille <akim@epita.fr>
9177
9178 * tests/regression.at (else): Adjust to Andreas' change.
9179
9180 2002-02-14 Akim Demaille <akim@epita.fr>
9181
9182 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
9183
9184 2002-02-13 Andreas Schwab <schwab@suse.de>
9185
9186 * src/output.c (output_rule_data): Don't output NULL, it might
9187 not be defined yet.
9188
9189 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
9190
9191 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
9192 (Copyright notice): Update.
9193
9194 2002-02-11 Akim Demaille <akim@epita.fr>
9195
9196 * tests/regression.at (%nonassoc and eof): Don't include
9197 nonportable headers.
9198
9199 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
9200
9201 * data/bison.c++: Correct error recovery. Make the user able to
9202 initialize the starting location.
9203
9204 2002-02-07 Akim Demaille <akim@epita.fr>
9205
9206 * tests/input.at: New.
9207
9208 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
9209
9210 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9211 more consistent when naming methods and variables. Put preprocessor
9212 directives around tables only needed for debugging.
9213
9214 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
9215
9216 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
9217 C++ parsers.
9218 (yy::b4_name::parse): Use print_.
9219
9220 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
9221
9222 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
9223
9224 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
9225
9226 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
9227 C++ parsers.
9228 (yy::b4_name::parse): Build verbose error messages, and use error_.
9229
9230 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
9231
9232 * data/bison.c++: Fix m4 quoting in comments.
9233
9234 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
9235
9236 * data/bison.c++: Adjust the parser code. Fix some muscles that were
9237 not expanded by m4.
9238
9239 2002-02-05 Akim Demaille <akim@epita.fr>
9240
9241 * data/bison.c++: Adjust to the M4 back end.
9242 More is certainly needed.
9243
9244 2002-02-05 Akim Demaille <akim@epita.fr>
9245
9246 Give a try to M4 as a back end.
9247
9248 * lib/readpipe.c: New, from wdiff.
9249 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
9250 BISON_HAIRY.
9251 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
9252 specific values. Now it is m4 that performs the lookup.
9253 * src/parse-skel.y: Remove.
9254 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
9255 * src/output.c (actions_output, guards_output)
9256 (token_definitions_output): No longer keeps track of the output
9257 line number, hence remove the second argument.
9258 (guards_output): Check against the guard member of a rule, not the
9259 action member.
9260 Adjust callers.
9261 (output_skeleton): Don't look for the skeleton location, let m4 do
9262 that.
9263 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
9264 file will be used.
9265 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
9266 (prepare): Given that for the time being changesyntax is not
9267 usable in M4, rename the muscles using `-' to `_'.
9268 Define `defines_flag', `output_parser_name' and `output_header_name'.
9269 * src/output.h (actions_output, guards_output)
9270 (token_definitions_output): Adjust prototypes.
9271 * src/scan-skel.l: Instead of scanning the skeletons, it now
9272 processes the output of m4: `__oline__' and `#output'.
9273 * data/bison.simple: Adjust to be used by M4(sugar).
9274 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
9275 to date.
9276 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
9277 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
9278 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
9279 shamelessly stolen from CVS Autoconf.
9280
9281 2002-02-05 Akim Demaille <akim@epita.fr>
9282
9283 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
9284 * configure.in: Check for the declarations of free and malloc.
9285 * src/muscle_tab.c: Adjust.
9286
9287 2002-02-05 Akim Demaille <akim@epita.fr>
9288
9289 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
9290 which have no values.
9291
9292 2002-02-05 Akim Demaille <akim@epita.fr>
9293
9294 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
9295 * data/: here.
9296
9297 2002-01-29 Paul Eggert <eggert@twinsun.com>
9298
9299 * src/bison.simple (YYSIZE_T): Do not define merely because
9300 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
9301 On some platforms, <alloca.h> does not declare YYSTD (size_t).
9302
9303 2002-01-27 Akim Demaille <akim@epita.fr>
9304
9305 Fix `%nonassoc and eof'.
9306
9307 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
9308 which were not properly copied! Replace
9309 memcpy (res->errs, src->errs, src->nerrs);
9310 with
9311 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
9312 !!!
9313 * tests/regression.at (%nonassoc and eof): Adjust to newest
9314 Autotest: `.' is not in the PATH.
9315
9316 2002-01-27 Akim Demaille <akim@epita.fr>
9317
9318 * tests/sets.at (AT_EXTRACT_SETS): New.
9319 (Nullable): Use it.
9320 (Firsts): New.
9321
9322 2002-01-26 Akim Demaille <akim@epita.fr>
9323
9324 * tests/actions.at, tests/calc.at, tests/headers.at,
9325 * tests/torture.at: Adjust to the newest Autotest which no longer
9326 forces `.' in the PATH.
9327
9328 2002-01-25 Akim Demaille <akim@epita.fr>
9329
9330 * tests/regression.at (%nonassoc and eof): New.
9331 Suggested by Robert Anisko.
9332
9333 2002-01-24 Akim Demaille <akim@epita.fr>
9334
9335 Bison dumps core when trying to complain about broken input files.
9336 Reported by Cris van Pelt.
9337
9338 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
9339 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
9340 into...
9341 (Invalid inputs): Strengthen: exercise parse_percent_token.
9342
9343 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
9344
9345 * src/Makefile.am: Add bison.c++.
9346 * src/bison.c++: New skeleton.
9347
9348 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
9349
9350 * po/it.po: New.
9351
9352 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
9353
9354 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
9355
9356 2002-01-20 Marc Autret <marc@gnu.org>
9357
9358 * src/files.c (compute_output_file_names): Fix
9359
9360 2002-01-20 Marc Autret <marc@gnu.org>
9361
9362 * tests/output.at: New test.
9363 * src/files.c (compute_base_names): Don't map extensions when
9364 the YACC flag is set, use defaults.
9365 Reported by Evgeny Stambulchik.
9366
9367 2002-01-20 Marc Autret <marc@gnu.org>
9368
9369 * src/system.h: Need to define __attribute__ away for non-GCC
9370 compilers as well (i.e., the vendor C compiler).
9371 Suggested by Albert Chin-A-Young.
9372
9373 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
9374
9375 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
9376 canonical definition.
9377 * src/system.h: Use the canonical definition for PARAMS (avoids
9378 a conflict with the macro from lib/hash.h).
9379
9380 2002-01-11 Akim Demaille <akim@epita.fr>
9381
9382 * configure.in: Use AC_FUNC_STRNLEN.
9383 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
9384
9385 2002-01-09 Akim Demaille <akim@epita.fr>
9386
9387 * src/files.c, src/files.h (output_infix): New.
9388 (tab_extension): Remove.
9389 (compute_base_names): Compute the former, drop the latter.
9390 * src/output.c (prepare): Insert the muscles `output-infix', and
9391 `output-suffix'.
9392 * src/parse-skel.y (string, string.1): New.
9393 (section.header): Use it.
9394 (section.yacc): Remove.
9395 (prefix): Remove too.
9396 * src/scan-skel.l: Adjust.
9397 * src/bison.simple, src/bison.hairy: Adjust.
9398
9399 2002-01-09 Akim Demaille <akim@epita.fr>
9400
9401 * configure.in (WERROR_CFLAGS): Compute it.
9402 * src/Makefile.am (CFLAGS): Pass it.
9403 * tests/atlocal.in (CFLAGS): Idem.
9404 * src/files.c: Fix a few warnings.
9405 (get_extension_index): Remove, unused.
9406
9407 2002-01-08 Akim Demaille <akim@epita.fr>
9408
9409 * src/getargs.c (AS_FILE_NAME): New.
9410 (getargs): Use it to convert DOSish file names.
9411 * src/files.c (base_name): Rename as full_base_name to avoid
9412 clashes with `base_name ()'.
9413 (filename_split): New.
9414 (compute_base_names): N-th rewrite, using filename_split.
9415
9416 2002-01-08 Akim Demaille <akim@epita.fr>
9417
9418 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
9419 New, stolen from the Fileutils 4.1.
9420 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
9421 * configure.in: Check for the presence of memrchr, and of its
9422 prototype.
9423
9424 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
9425
9426 * lib/hash.h (__P): Added definition for this macro.
9427 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
9428 BUILT_SOURCES, to ensure they are generated first.
9429 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
9430 %error-verbose to allow bootstrapping with bison 1.30x.
9431
9432 2002-01-06 Akim Demaille <akim@epita.fr>
9433
9434 * src/reader.c (parse_braces): Don't fetch the next char, the
9435 convention is to fetch on entry.
9436 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
9437 'switch' without a following semicolon.
9438 * tests/regression.at (braces parsing): New.
9439
9440 2002-01-06 Akim Demaille <akim@epita.fr>
9441
9442 Bison is dead wrong in its RR conflict reports.
9443
9444 * tests/torture.at (GNU Cim Grammar): New.
9445 * src/conflicts.c (count_rr_conflicts): Fix.
9446
9447 2002-01-06 Akim Demaille <akim@epita.fr>
9448
9449 Creating package.m4 from configure.ac causes too many problems.
9450
9451 * tests/Makefile.am (package.m4): Create it by hand,
9452 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
9453
9454 2002-01-06 Akim Demaille <akim@epita.fr>
9455
9456 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
9457 skeleton.h.
9458
9459 2002-01-04 Paul Eggert <eggert@twinsun.com>
9460
9461 * doc/bison.texinfo (Debugging):
9462 Remove YYSTDERR; it's no longer defined or used.
9463 Also, s/cstdio.h/cstdio/.
9464
9465 2002-01-03 Akim Demaille <akim@epita.fr>
9466
9467 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
9468
9469 2002-01-03 Akim Demaille <akim@epita.fr>
9470
9471 * src/parse-skel.y (process_skeleton): Don't bind the parser's
9472 tracing code to --trace, wait for a better --trace option, with
9473 args.
9474
9475 2002-01-03 Akim Demaille <akim@epita.fr>
9476
9477 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
9478 The ISO C++ standard is extremely clear about it: stderr is
9479 considered a macro, not a regular symbol (see table 94 `Header
9480 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
9481 Therefore std:: does not apply to it. It still does with fprintf.
9482 Also, s/cstdio.h/cstdio/.
9483
9484 2002-01-03 Akim Demaille <akim@epita.fr>
9485
9486 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
9487 for non system headers.
9488
9489 2002-01-02 Akim Demaille <akim@epita.fr>
9490
9491 Equip the skeleton chain with location tracking, runtime trace,
9492 pure parser and scanner.
9493
9494 * src/parse-skel.y: Request a pure parser, locations, and prefix
9495 renaming.
9496 (%union): Having several members with the same type does not help
9497 type mismatches, simplify.
9498 (YYPRINT, yyprint): New.
9499 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
9500 (skel_error): this.
9501 Handle locations.
9502 * src/scan-skel.l: Adjust to these changes.
9503 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
9504 (LOCATION_PRINT, skel_control_t): New.
9505
9506 2001-12-30 Akim Demaille <akim@epita.fr>
9507
9508 * src/parse-skel.y: Get rid of the shift/reduce conflict:
9509 replace `gb' with BLANKS.
9510 * src/scan-skel.l: Adjust.
9511
9512 2001-12-30 Akim Demaille <akim@epita.fr>
9513
9514 * src/system.h: We don't need nor want bcopy.
9515 Throw away MS-DOS crap: we don't need getpid.
9516 * configure.in: We don't need strndup. It was even causing
9517 problems: because Flex includes the headers *before* us,
9518 _GNU_SOURCE is not defined by config.h, and therefore strndup was
9519 not visible.
9520 * lib/xstrndup.c: New.
9521 * src/scan-skel.l: Use it.
9522 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
9523 * src/parse-skel.y: Use %directives instead of #defines.
9524
9525 2001-12-30 Akim Demaille <akim@epita.fr>
9526
9527 * src/skeleton.h: New.
9528 * src/output.c (output_parser, output_master_parser): Remove, dead
9529 code.
9530 * src/output.h (get_lines_number, actions_output, guards_output)
9531 (token_definitions_output): Prototype them.
9532 * src/parse-skel.y: Add the license notice.
9533 Include output.h and skeleton.h.
9534 (process_skeleton): Returns void, and takes a single parameter.
9535 * src/scan-skel.l: Add the license notice.
9536 Include skeleton.h.
9537 Don't use %option yylineno: it seems that then Flex imagines
9538 REJECT has been used, and therefore it won't reallocate its
9539 buffers (which makes no other sense to me than a bug). It results
9540 in warnings for `unused: yy_flex_realloc'.
9541
9542 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
9543
9544 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
9545 (MUSCLE_INSERT_PREFIX): ...to there.
9546 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
9547 (MUSCLE_INSERT_PREFIX): Move from here...
9548
9549 * src/bison.hairy: Add a section directive. Put braces around muscle
9550 names. This parser skeleton is still broken, but Bison should not
9551 choke on a bad muscle 'syntax'.
9552 * src/bison.simple: Add a section directive. Put braces around muscle
9553 names.
9554
9555 * src/files.h (strsuffix, stringappend): Add declarations.
9556 (tab_extension): Add declaration.
9557 (short_base_name): Add declaration.
9558
9559 * src/files.c (strsuffix, stringappend): No longer static. These
9560 functions are used in the skeleton parser.
9561 (tab_extension): New.
9562 (compute_base_names): Use the computations done in this function
9563 to guess if the generated parsers should have '.tab' in their
9564 names.
9565 (short_base_name): No longer static.
9566
9567 * src/output.c (output_skeleton): New.
9568 (output): Disable call to output_master_parser, and give a try to
9569 a new skeleton handling system.
9570 (guards_output, actions_output): No longer static.
9571 (token_definitions_output, get_lines_number): No longer static.
9572
9573 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
9574
9575 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9576 parse-skel.y.
9577
9578 * src/parse-skel.y: New file.
9579 * src/scan-skel.l: New file.
9580
9581 2001-12-29 Akim Demaille <akim@epita.fr>
9582
9583 %name-prefix is broken.
9584
9585 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
9586 Adjust all dependencies.
9587 * tests/headers.at (export YYLTYPE): Strengthen this test: use
9588 %name-prefix.
9589
9590 Renaming yylval but not yylloc is not consistent. Now we do.
9591
9592 * src/bison.simple: Prefix yylloc if used.
9593 * doc/bison.texinfo (Decl Summary): Document that.
9594
9595 2001-12-29 Akim Demaille <akim@epita.fr>
9596
9597 * doc/bison.texinfo: Promote `%long-directive' over
9598 `%long_directive'.
9599 Remove all references to fixed-output-files, yacc is enough.
9600
9601 2001-12-29 Akim Demaille <akim@epita.fr>
9602
9603 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
9604 user prologue. These are defaults.
9605 * tests/actions.at (Mid-rule actions): Make sure the user can
9606 define YYDEBUG and YYERROR_VERBOSE.
9607
9608 2001-12-29 Akim Demaille <akim@epita.fr>
9609
9610 * src/output.c (header_output): Don't forget to export YYLTYPE and
9611 yylloc.
9612 * tests/headers.at (export YYLTYPE): New, make sure it does.
9613 * tests/regression.at (%union and --defines, Invalid CPP headers):
9614 Move to...
9615 * tests/headers.at: here.
9616
9617 2001-12-29 Akim Demaille <akim@epita.fr>
9618
9619 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
9620
9621 2001-12-29 Akim Demaille <akim@epita.fr>
9622
9623 * tests/actions.at (Mid-rule actions): Output on a single line
9624 instead of several.
9625
9626 2001-12-29 Akim Demaille <akim@epita.fr>
9627
9628 * doc/bison.texinfo: Formatting changes.
9629
9630 2001-12-29 Akim Demaille <akim@epita.fr>
9631
9632 Don't store the token defs in a muscle, just be ready to output it
9633 on command. Now possible via `symbols'. Fixes a memory leak.
9634
9635 * src/output.c (token_definitions_output): New.
9636 (output_parser, header_output): Use it.
9637 * src/reader.c (symbols_save): Remove.
9638
9639 2001-12-29 Akim Demaille <akim@epita.fr>
9640
9641 * src/bison.simple: Do not provide a default for YYSTYPE and
9642 YYLTYPE before the user's prologue. Otherwise it's hardly... a
9643 default.
9644
9645 2001-12-29 Akim Demaille <akim@epita.fr>
9646
9647 Mid-rule actions are simply... ignored!
9648
9649 * src/reader.c (readgram): Be sure to attach mid-rule actions to
9650 the empty-rule associated to the dummy symbol, not to the host
9651 rule.
9652 * tests/actions.at (Mid-rule actions): New.
9653
9654 2001-12-29 Akim Demaille <akim@epita.fr>
9655
9656 Memory leak.
9657
9658 * src/reader.c (reader): Free grammar.
9659
9660 2001-12-29 Akim Demaille <akim@epita.fr>
9661
9662 Memory leak.
9663
9664 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
9665 since it allocates it for each state, although only one is needed.
9666 (allocate_storage): Do it here.
9667
9668 2001-12-29 Akim Demaille <akim@epita.fr>
9669
9670 * src/options.h, src/options.c (create_long_option_table): Rename
9671 as...
9672 (long_option_table_new): this, with a clearer prototype.
9673 (percent_table): Remove, unused,
9674 * src/getargs.c (getargs): Adjust.
9675
9676 2001-12-29 Akim Demaille <akim@epita.fr>
9677
9678 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
9679 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
9680 as states.
9681
9682 2001-12-29 Akim Demaille <akim@epita.fr>
9683
9684 * src/lalr.c (build_relations): Rename `states' as `states1'.
9685 Sorry, I don't understand exactly what it is, no better name...
9686
9687 2001-12-29 Akim Demaille <akim@epita.fr>
9688
9689 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
9690 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
9691 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
9692 as rules.
9693
9694 2001-12-29 Akim Demaille <akim@epita.fr>
9695
9696 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
9697 ago.
9698
9699 2001-12-29 Akim Demaille <akim@epita.fr>
9700
9701 * src/reader.c, src/reader.h (user_toknums): Remove.
9702 Adjust all users to use symbols[i]->user_token_number.
9703
9704 2001-12-29 Akim Demaille <akim@epita.fr>
9705
9706 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
9707 Adjust all users to use symbols[i]->prec or ->assoc.
9708
9709 2001-12-29 Akim Demaille <akim@epita.fr>
9710
9711 * src/reader.c, src/reader.h (tags): Remove.
9712 Adjust all users to use symbols[i]->tag.
9713
9714 2001-12-29 Akim Demaille <akim@epita.fr>
9715
9716 * src/gram.h, src/gram.c (symbols): New, similar to state_table
9717 and rule_table.
9718 * src/reader.c (packsymbols): Fill this table.
9719 Drop sprec.
9720 * src/conflicts.c (resolve_sr_conflict): Adjust.
9721 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
9722 single table.
9723 Use symbols[i]->tag instead of tags[i].
9724
9725 2001-12-29 Akim Demaille <akim@epita.fr>
9726
9727 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
9728 In addition, put a comment in there, to replace...
9729 * tests/regression.at (%union and C comments): Remove.
9730
9731 2001-12-29 Akim Demaille <akim@epita.fr>
9732
9733 * tests/regression.at (Web2c Actions): Blindly move the actual
9734 output as expected output. The contents *seem* right to me, but I
9735 can't pretend reading perfectly parser tables... Nonetheless, all
9736 the other tests pass correctly, the table look OK, even though the
9737 presence of `$axiom' is to be noted: AFAICS it is useless (but
9738 harmless).
9739
9740 2001-12-29 Akim Demaille <akim@epita.fr>
9741
9742 * src/reader.c (readgram): Don't add the rule 0 if there were no
9743 rules read. In other words, add it _after_ having performed
9744 grammar sanity checks.
9745 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
9746
9747 2001-12-29 Akim Demaille <akim@epita.fr>
9748
9749 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
9750 visible, and some states have now a different number.
9751
9752 2001-12-29 Akim Demaille <akim@epita.fr>
9753
9754 * src/reader.c (readgram): Bind the initial rule's lineno to that
9755 of the first rule.
9756 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
9757 (Solved SR Conflicts): Adjust rule 0's line number.
9758
9759 2001-12-29 Akim Demaille <akim@epita.fr>
9760
9761 Fix the `GAWK Grammar' failure.
9762
9763 * src/LR0.c (final_state): Initialize to -1 so that we do compute
9764 the reductions of the first state which was mistakenly confused
9765 with the final state because precisely final_state was initialized
9766 to 0.
9767 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
9768 now noticed by Bison.
9769 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
9770 have a reduction on $default.
9771
9772 2001-12-29 Akim Demaille <akim@epita.fr>
9773
9774 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
9775 rule line numbers.
9776 * src/closure.c (print_closure): Likewise.
9777 * src/derives.c (print_derives): Likewise.
9778 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
9779 now.
9780
9781 2001-12-29 Akim Demaille <akim@epita.fr>
9782
9783 * src/lalr.c (lookaheads_print): New.
9784 (lalr): Call it when --trace-flag.
9785 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
9786 are dumped.
9787
9788 2001-12-29 Akim Demaille <akim@epita.fr>
9789
9790 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
9791 when walking through ritem, even via rule->rhs.
9792 * src/reduce.c (dump_grammar, useful_production, reduce_output)
9793 (useful_production, useless_nonterminals): Likewise.
9794 (reduce_grammar_tables): Likewise, plus update nritems.
9795 * src/nullable.c (set_nullable): Likewise.
9796 * src/lalr.c (build_relations): Likewise.
9797 * tests/sets.at (Nullable): Adjust.
9798 Fortunately, now, the $axiom is no longer nullable.
9799
9800 2001-12-29 Akim Demaille <akim@epita.fr>
9801
9802 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
9803 the 0-sentinel.
9804 * src/gram.c (ritem_longest_rhs): Likewise.
9805 * src/reduce.c (nonterminals_reduce): Likewise.
9806 * src/print_graph.c (print_graph): Likewise.
9807 * src/output.c (output_rule_data): Likewise.
9808 * src/nullable.c (set_nullable): Likewise.
9809
9810 2001-12-29 Akim Demaille <akim@epita.fr>
9811
9812 * src/output.c: Comment changes.
9813
9814 2001-12-27 Paul Eggert <eggert@twinsun.com>
9815
9816 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
9817 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
9818 Sparc, as they were causing more porting problems than the
9819 (minor) performance improvement was worth.
9820
9821 Also, catch up with 1.31's YYSTD.
9822
9823 2001-12-27 Akim Demaille <akim@epita.fr>
9824
9825 * src/output.c (output_gram): Rely on nritems, not the
9826 0-sentinel. See below.
9827 Use -1 as separator, not 0.
9828 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
9829 Rely on -1 as separator in yyrhs, instead of 0.
9830 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
9831 twice `Now at end of input', therefore there are two lines less to
9832 expect.
9833
9834 2001-12-27 Akim Demaille <akim@epita.fr>
9835
9836 * tests/regression.at (Unresolved SR Conflicts):
9837 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
9838 below.
9839
9840 2001-12-27 Akim Demaille <akim@epita.fr>
9841
9842 * src/LR0.c (new_state): Recognize the final state by the fact it
9843 is reached by eoftoken.
9844 (insert_start_shifting_state, insert_eof_shifting_state)
9845 (insert_accepting_state, augment_automaton): Remove, since now
9846 these states are automatically computed from the initial state.
9847 (generate_states): Adjust.
9848 * src/print.c: When reporting a rule number to the user, substract
9849 1, so that the axiom rule is rule 0, and the first user rule is 1.
9850 * src/reduce.c: Likewise.
9851 * src/print_graph.c (print_core): For the time being, just as for
9852 the report, depend upon --trace-flags to dump the full set of
9853 items.
9854 * src/reader.c (readgram): Once the grammar read, insert the rule
9855 0: `$axiom: START-SYMBOL $'.
9856 * tests/set.at: Adjust: rule 0 is now displayed, and since the
9857 number of the states has changed (the final state is no longer
9858 necessarily the last), catch up.
9859
9860 2001-12-27 Akim Demaille <akim@epita.fr>
9861
9862 Try to make the use of the eoftoken valid. Given that its value
9863 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
9864 is used instead of > 0 where appropriate, (ii), depend upon nritems
9865 instead of the 0-sentinel.
9866
9867 * src/gram.h, src/gram.c (nritems): New.
9868 Expected to be duplication of nitems, but for the time being...
9869 * src/reader.c (packgram): Assert nritems and nitems are equal.
9870 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
9871 * src/closure.c (print_closure, print_fderives): Likewise.
9872 * src/gram.c (ritem_print): Likewise.
9873 * src/print.c (print_core, print_grammar): Likewise.
9874 * src/print_graph.c: Likewise.
9875
9876 2001-12-27 Akim Demaille <akim@epita.fr>
9877
9878 * src/main.c (main): If there are complains after grammar
9879 reductions, then output the report anyway if requested, then die.
9880 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
9881 * src/reader.c (eoftoken): New.
9882 (parse_token_decl): If the token being defined has value `0', it
9883 is the eoftoken.
9884 (packsymbols): No longer hack `tags' to insert `$' by hand.
9885 Be sure to preserve the value of the eoftoken.
9886 (reader): Make sure eoftoken is defined.
9887 Initialize nsyms to 0: now eoftoken is created just like the others.
9888 * src/print.c (print_grammar): Don't special case the eof token.
9889 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
9890 lie anyway, albeit pleasant.
9891 * tests/calc.at: Exercise error messages with eoftoken.
9892 Change the grammar so that empty input is invalid.
9893 Adjust expectations.
9894 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
9895
9896 2001-12-27 Akim Demaille <akim@epita.fr>
9897
9898 * configure.in: Check the protos of strchr ans strspn.
9899 Replace strchr if needed.
9900 * src/system.h: Provide the protos of strchr, strspn and memchr if
9901 missing.
9902 * lib/strchr.c: New.
9903 * src/reader.c (symbols_save): Use strchr.
9904
9905 2001-12-27 Akim Demaille <akim@epita.fr>
9906
9907 * src/print.c, src/print_graph.c (escape): New.
9908 Use it to quote the TAGS outputs.
9909 * src/print_graph.c (print_state): Now errors are in red, and
9910 reductions in green.
9911 Prefer high to wide: output the state number on a line of its own.
9912
9913 2001-12-27 Akim Demaille <akim@epita.fr>
9914
9915 * src/state.h, src/state.c (reductions_new): New.
9916 * src/LR0.c (set_state_table): Let all the states have a
9917 `reductions', even if reduced to 0.
9918 (save_reductions): Adjust.
9919 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
9920 * src/print.c (print_reductions, print_actions): Adjust.
9921 * src/output.c (action_row): Adjust.
9922
9923 2001-12-27 Akim Demaille <akim@epita.fr>
9924
9925 * src/state.h, src/state.c (errs_new, errs_dup): New.
9926 * src/LR0.c (set_state_table): Let all the states have an errs,
9927 even if reduced to 0.
9928 * src/print.c (print_errs, print_reductions): Adjust.
9929 * src/output.c (output_actions, action_row): Adjust.
9930 * src/conflicts.c (resolve_sr_conflict): Adjust.
9931
9932 2001-12-27 Akim Demaille <akim@epita.fr>
9933
9934 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
9935
9936 2001-12-27 Akim Demaille <akim@epita.fr>
9937
9938 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
9939 * src/print.c: here.
9940 (lookaheadset, shiftset): New, used as additional storage by
9941 print_reductions.
9942 (print_results): Adjust.
9943 (print_shifts, print_gotos, print_errs): New, extracted from...
9944 (print_actions): here.
9945 * src/print_graph.c (print_actions): Remove dead code.
9946
9947 2001-12-27 Akim Demaille <akim@epita.fr>
9948
9949 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
9950 `$n' and `@n'.
9951
9952 2001-12-27 Akim Demaille <akim@epita.fr>
9953
9954 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
9955 (build_relations): Adjust.
9956
9957 2001-12-27 Akim Demaille <akim@epita.fr>
9958
9959 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
9960 duplication.
9961
9962 2001-12-27 Akim Demaille <akim@epita.fr>
9963
9964 * src/reader.c (packgram): Catch nitems overflows.
9965
9966 2001-12-27 Akim Demaille <akim@epita.fr>
9967
9968 * src/files.c, src/files.h (guard_obstack): Remove.
9969 * src/output.c (output): Adjust.
9970 * src/reader.c (parse_braces): New, factoring...
9971 (copy_action, copy_guard): these two which are renamed as...
9972 (parse_action, parse_guard): these.
9973 As a voluntary consequence, using braces around guards is now
9974 mandatory.
9975
9976 2001-12-27 Akim Demaille <akim@epita.fr>
9977
9978 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
9979 * src/reader.c (symbol_list): `guard' and `guard_line' are new
9980 members.
9981 (symbol_list_new): Adjust.
9982 (copy_action): action_line is the first line, not the last.
9983 (copy_guard): Just as for actions, store the `action' only, not
9984 the switch/case/break flesh.
9985 Don't parse the user action that might follow the guard, let...
9986 (readgram): do it, i.e., now, there can be an action after a
9987 guard.
9988 In other words the guard is just explicitly optional.
9989 (packgram): Adjust.
9990 * src/output.c (guards_output): New.
9991 (output_parser): Call it when needed.
9992 (output): Also free the guard and attrs obstacks.
9993 * src/files.c, src/files.h (obstack_save): Remove.
9994 (output_files): Remove.
9995 As a result, if one needs the former `.act' file, using an
9996 appropriate skeleton which requires actions and guards is now
9997 required.
9998 * src/main.c (main): Adjust.
9999 * tests/semantic.at: New.
10000 * tests/regression.at: Use `input.y' as input file name.
10001 Avoid 8+3 problems by requiring input.c when the test needs the
10002 parser.
10003
10004 2001-12-27 Akim Demaille <akim@epita.fr>
10005
10006 * src/reader.c (symbol_list_new): Be sure to initialize all the
10007 fields.
10008
10009 2001-12-27 Akim Demaille <akim@epita.fr>
10010
10011 All the hacks using a final pseudo state are now useless.
10012
10013 * src/LR0.c (set_state_table): state_table holds exactly nstates.
10014 * src/lalr.c (nLA): New.
10015 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
10016 instead of lookaheadsp from the pseudo state (nstate + 1).
10017
10018 2001-12-27 Akim Demaille <akim@epita.fr>
10019
10020 * src/output.c (action_row, token_actions): Use a state_t instead
10021 of a integer, and nlookaheads instead of the following state's
10022 lookaheadsp.
10023
10024 2001-12-27 Akim Demaille <akim@epita.fr>
10025
10026 * src/conflicts.c (log_resolution, flush_shift)
10027 (resolve_sr_conflict, set_conflicts, solve_conflicts)
10028 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
10029 (conflicts_print, print_reductions): Use a state_t instead of an
10030 integer when referring to a state.
10031 As much as possible, depend upon nlookaheads, instead of the
10032 `lookaheadsp' member of the following state (since lookaheads of
10033 successive states are successive, the difference between state n + 1
10034 and n served as the number of lookaheads for state n).
10035 * src/lalr.c (add_lookback_edge): Likewise.
10036 * src/print.c (print_core, print_actions, print_state)
10037 (print_results): Likewise.
10038 * src/print_graph.c (print_core, print_actions, print_state)
10039 (print_graph): Likewise.
10040 * src/conflicts.h: Adjust.
10041
10042 2001-12-27 Akim Demaille <akim@epita.fr>
10043
10044 * src/bison.hairy: Formatting/comment changes.
10045 ANSIfy.
10046 Remove `register' indications.
10047 Add plenty of `static'.
10048
10049 2001-12-27 Akim Demaille <akim@epita.fr>
10050
10051 * src/output.c (prepare): Drop the muscle `ntbase' which
10052 duplicates ntokens.
10053 * src/bison.simple: Formatting/comment changes.
10054 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
10055 is an undocumented synonym.
10056
10057 2001-12-22 Akim Demaille <akim@epita.fr>
10058
10059 * src/output.c (output_table_data): Change the prototype to use
10060 `int' for array ranges: some invocations do pass an int, not a
10061 short.
10062 Reported by Wayne Green.
10063
10064 2001-12-22 Akim Demaille <akim@epita.fr>
10065
10066 Some actions of web2c.y are improperly triggered.
10067 Reported by Mike Castle.
10068
10069 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
10070 * tests/regression.at (Web2c): Rename as...
10071 (Web2c Report): this.
10072 (Web2c Actions): New.
10073
10074 2001-12-22 Akim Demaille <akim@epita.fr>
10075
10076 Reductions in web2c.y are improperly reported.
10077 Reported by Mike Castle.
10078
10079 * src/conflicts.c (print_reductions): Fix.
10080 * tests/regression.at (Web2c): New.
10081
10082 2001-12-18 Akim Demaille <akim@epita.fr>
10083
10084 Some host fail on `assert (!"foo")', which expands to
10085 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
10086 Reported by Nelson Beebee.
10087
10088 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
10089 `#define it_succeeded 0' and `assert (it_succeeded)'.
10090
10091 2001-12-17 Marc Autret <autret_m@epita.fr>
10092
10093 * src/bison.simple: Don't hard code the skeleton line and filename.
10094 * src/output.c (output_parser): Rename 'line' as 'output_line'.
10095 New line counter 'skeleton_line' (skeleton-line muscle).
10096
10097 2001-12-17 Paul Eggert <eggert@twinsun.com>
10098
10099 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
10100 YYDEBUG must be defined to a nonzero value.
10101
10102 * src/bison.simple (yytname): Do not assume that the user defines
10103 YYDEBUG to a properly parenthesized expression.
10104
10105 2001-12-17 Akim Demaille <akim@epita.fr>
10106
10107 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
10108 nlookaheads is a new member.
10109 Adjust all users.
10110 * src/lalr.h (nlookaheads): Remove this orphan declaration.
10111 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
10112 state.
10113
10114 2001-12-17 Akim Demaille <akim@epita.fr>
10115
10116 * src/files.h, src/files.c (open_files, close_files): Remove.
10117 * src/main.c (main): Don't open/close files, nor invoke lex_free,
10118 let...
10119 * src/reader.c (reader): Do it.
10120
10121 2001-12-17 Akim Demaille <akim@epita.fr>
10122
10123 * src/conflicts.c (print_reductions): Formatting changes.
10124
10125 2001-12-17 Akim Demaille <akim@epita.fr>
10126
10127 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
10128 (flush_reduce): New.
10129 (resolve_sr_conflict): Adjust.
10130
10131 2001-12-17 Akim Demaille <akim@epita.fr>
10132
10133 * src/output.c (output_obstack): Be static and rename as...
10134 (format_obstack): this, to avoid any confusion with files.c's
10135 output_obstack.
10136 * src/reader.h (muscle_obstack): Move to...
10137 * src/output.h: here, since it's defined in output.c.
10138
10139 2001-12-17 Akim Demaille <akim@epita.fr>
10140
10141 * src/output.c (action_row, save_column, default_goto)
10142 (sort_actions, matching_state, pack_vector): Better variable
10143 locality.
10144
10145 2001-12-17 Akim Demaille <akim@epita.fr>
10146
10147 * src/output.c: Various formatting changes.
10148
10149 2001-12-17 Akim Demaille <akim@epita.fr>
10150
10151 * src/files.c (output_files): Free the output_obstack.
10152 * src/main.c (main): Call print and print_graph conditionally.
10153 * src/print.c (print): Work unconditionally.
10154 * src/print_graph.c (print_graph): Work unconditionally.
10155 * src/conflicts.c (log_resolution): Output only if verbose_flag.
10156
10157 2001-12-16 Marc Autret <autret_m@epita.fr>
10158
10159 * src/output.c (actions_output): Fix. When we use %no-lines,
10160 there is one less line per action.
10161
10162 2001-12-16 Marc Autret <autret_m@epita.fr>
10163
10164 * src/bison.simple: Remove a useless #line directive.
10165 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
10166 * src/output.c (get_lines_number): New.
10167 (output_parser): Adjust, now takes care about the lines of a
10168 output muscles.
10169 Fix line numbering.
10170 (actions_output): Computes the number of lines taken by actions.
10171 (output_master_parser): Insert new skeleton which is the name of
10172 the output parser file name.
10173
10174 2001-12-15 Marc Autret <autret_m@epita.fr>
10175
10176 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
10177
10178 2001-12-15 Marc Autret <autret_m@epita.fr>
10179
10180 * src/output.c (output_gram): Keep track of the hairy one.
10181
10182 2001-12-15 Akim Demaille <akim@epita.fr>
10183
10184 Make `make distcheck' work.
10185
10186 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
10187 system.h which uses libgettext.h.
10188
10189 2001-12-15 Akim Demaille <akim@epita.fr>
10190
10191 * src/nullable.c (set_nullable): Useless rules must be skipped,
10192 otherwise, since we range over their symbols, we might look at a
10193 nonterminal which no longer ``exists'', i.e., it is not counted in
10194 `nvars', hence we overflow our arrays.
10195
10196 2001-12-15 Akim Demaille <akim@epita.fr>
10197
10198 The header can also be produced directly, without any obstack!
10199 Yahoo!
10200
10201 * src/files.c, src/files.h (defines_obstack): Remove.
10202 (compute_header_macro): Global.
10203 (defines_obstack_save): Remove.
10204 * src/reader.c (parse_union_decl): No longer output to
10205 defines_obstack: its content can be found in the `stype' muscle
10206 anyway.
10207 (output_token_translations): Merge into...
10208 (symbols_output): this.
10209 Rename as...
10210 (symbols_save): this.
10211 (reader): Adjust.
10212 * src/output.c (header_output): New.
10213 (output): Call it.
10214
10215 2001-12-15 Akim Demaille <akim@epita.fr>
10216
10217 * src/reader.c (parse_union_decl): Instead of handling two obstack
10218 simultaneously, use one to define the `stype' muscle, and use the
10219 value of the latter to fill defines_obstack.
10220 (copy_comment): Remove.
10221 (copy_comment2): Work for a single obstack.
10222 Rename as...
10223 (copy_comment): this.
10224
10225 2001-12-15 Akim Demaille <akim@epita.fr>
10226
10227 * src/lex.c, src/lex.h (xgetc): No longer static.
10228 * src/reader.c (parse_union_decl): Revamp.
10229
10230 2001-12-15 Akim Demaille <akim@epita.fr>
10231
10232 Still making progress in separating Bison into (i) input, (ii)
10233 process, (iii) output: now we can directly output the parser file
10234 without using table_obstack at all.
10235
10236 * src/files.c, src/files.h (table_obstack): Bye bye.
10237 (parser_file_name): New.
10238 * src/files.c (compute_output_file_names): Compute it.
10239 * src/output.c (actions_output, output_parser)
10240 (output_master_parser): To a file instead of an obstack.
10241
10242 2001-12-15 Akim Demaille <akim@epita.fr>
10243
10244 Attach actions to rules, instead of pre-outputting them to
10245 actions_obstack.
10246
10247 * src/gram.h (rule_t): action and action_line are new members.
10248 * src/reader.c (symbol_list): Likewise.
10249 (copy_action): Save the actions within the rule.
10250 (packgram): Save them in rule_table.
10251 * src/output.c (actions_output): New.
10252 (output_parser): Use it on `%%actions'.
10253 (output_rule_data): Don't free rule_table.
10254 (output): Do it.
10255 (prepare): Don't save the `action' muscle.
10256 * src/bison.simple: s/%%action/%%actions/.
10257
10258 2001-12-15 Akim Demaille <akim@epita.fr>
10259
10260 * src/reader.c (copy_action): When --yacc, don't append a `;'
10261 to the user action: let it fail if lacking.
10262 Suggested by Arnold Robbins and Tom Tromey.
10263
10264 2001-12-14 Akim Demaille <akim@epita.fr>
10265
10266 * src/lex.c (literalchar): Simply return the char you decoded, non
10267 longer mess around with obstacks and int pointers.
10268 Adjust all callers.
10269
10270 2001-12-14 Akim Demaille <akim@epita.fr>
10271
10272 * src/lex.c (literalchar): Don't escape the special characters,
10273 just decode them, and keep them as char (before, eol was output as
10274 the 2 char string `\n' etc.).
10275 * src/output.c (output_rule_data): Use quotearg to output the
10276 token strings.
10277
10278 2001-12-13 Paul Eggert <eggert@twinsun.com>
10279
10280 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
10281 Do not infringe on the global user namespace when using C++.
10282 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
10283 All uses of `fprintf' and `stderr' changed.
10284
10285 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
10286
10287 2001-12-13 Akim Demaille <akim@epita.fr>
10288
10289 The computation of nullable is broken: it doesn't handle empty
10290 RHS's properly.
10291
10292 * tests/torture.at (GNU AWK Grammar): New.
10293 * tests/sets.at (Nullable): New.
10294 * src/nullable.c (set_nullable): Instead of blindly looping over
10295 `ritems', loop over the rules, and then over their rhs's.
10296
10297 Work around Autotest bugs.
10298
10299 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
10300 frame, because Autotest understand lines starting with a `+' as
10301 traces from the shell. Then, they are not processed properly.
10302 Admittedly an Autotest bug, but we don't have time to wait for
10303 Autotest to catch up.
10304 * tests/regression.at (Broken Closure): Adjust to the new table
10305 frames.
10306 Move to...
10307 * tests/sets.at: here.
10308
10309 2001-12-13 Akim Demaille <akim@epita.fr>
10310
10311 * src/closure.c (closure): Use nrules instead of playing tricks
10312 with BITS_PER_WORD.
10313
10314 2001-12-13 Akim Demaille <akim@epita.fr>
10315
10316 * src/print.c (print_actions): Output the handling of `$' as the
10317 traces do: shifting the token EOF. Before EOF was treated as a
10318 nonterminal.
10319 * tests/regression.at: Adjust some tests.
10320 * src/print_graph.c (print_core): Complete the set of items via
10321 closure. The next-to-final and final states are still unsatisfying,
10322 but that's to be addressed elsewhere.
10323 No longer output the rule numbers, but do output the state number.
10324 A single loop for the shifts + gotos is enough, but picked a
10325 distinct color for each.
10326 (print_graph): Initialize and finalize closure.
10327
10328 2001-12-13 Akim Demaille <akim@epita.fr>
10329
10330 * src/reader.c (readgram): Remove dead code, an strip useless
10331 braces.
10332 (get_type): Remove, unused.
10333
10334 2001-12-12 Akim Demaille <akim@epita.fr>
10335
10336 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
10337 on that of lib/error.c.
10338
10339 2001-12-12 Akim Demaille <akim@epita.fr>
10340
10341 Some hosts don't like `/' in includes.
10342
10343 * src/system.h: Include libgettext.h without qualifying the path.
10344 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
10345 $(top_srcdir).
10346
10347 2001-12-11 Marc Autret <autret_m@epita.fr>
10348
10349 * src/output.c (output_parser): Remove useless muscle.
10350
10351 2001-12-11 Marc Autret <autret_m@epita.fr>
10352
10353 * src/bison.simple: Remove #line just before %%epilogue. It
10354 is now handled in ...
10355 * src/reader.c (read_additionnal_code): Add the output of a
10356 #line for the epilogue.
10357
10358 2001-12-10 Marc Autret <autret_m@epita.fr>
10359
10360 * src/reader.c (copy_definition): Re-use CPP-outed code which
10361 replace precedent remove.
10362 * src/bison.simple: Remove #line before %%prologue because
10363 %%input-line is wrong at this time.
10364
10365 2001-12-10 Marc Autret <autret_m@epita.fr>
10366
10367 * src/reader.c (symbols_output): Clean up.
10368 * src/output.c (output_gram, output): Clean up.
10369
10370 2001-12-10 Akim Demaille <akim@epita.fr>
10371
10372 * src/lalr.c (initialize_lookaheads): New. Extracted from...
10373 * src/LR0.c (set_state_table): here.
10374 * src/lalr.c (lalr): Call it.
10375
10376 2001-12-10 Akim Demaille <akim@epita.fr>
10377
10378 * src/state.h (shifts): Remove the `number' member: shifts are
10379 attached to state, hence no longer need to be labelled with a
10380 state number.
10381
10382 2001-12-10 Akim Demaille <akim@epita.fr>
10383
10384 Now that states have a complete set of members, the linked list of
10385 shifts is useless: just fill directly the state's shifts member.
10386
10387 * src/state.h (shifts): Remove the `next' member.
10388 * src/LR0.c (first_state, last_state): Remove.
10389 Adjust the callers.
10390 (augment_automaton): Don't look for the shifts that must be added
10391 a shift on EOF: it is those of the state we looked for! But now,
10392 since shifts are attached, it is no longer needed to looking
10393 merely by its id: its number.
10394
10395 2001-12-10 Akim Demaille <akim@epita.fr>
10396
10397 * src/LR0.c (augment_automaton): Better variable locality.
10398 Remove an impossible branch: if there is a state corresponding to
10399 the start symbol being shifted, then there is shift for the start
10400 symbol from the initial state.
10401
10402 2001-12-10 Akim Demaille <akim@epita.fr>
10403
10404 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
10405 only when appropriate: when insert_start_shifting_state' is not
10406 invoked.
10407 * tests/regression.at (Rule Line Numbers): Adjust.
10408
10409 2001-12-10 Akim Demaille <akim@epita.fr>
10410
10411 * src/LR0.c (augment_automaton): Now that all states have shifts,
10412 merge the two cases addition shifts to the initial state.
10413
10414 2001-12-10 Akim Demaille <akim@epita.fr>
10415
10416 * src/lalr.c (set_state_table): Move to...
10417 * src/LR0.c: here.
10418 * src/lalr.c (lalr): Don't call it...
10419 * src/LR0.c (generate_states): do it.
10420 * src/LR0.h (first_state): Remove, only the table is used.
10421
10422 2001-12-10 Akim Demaille <akim@epita.fr>
10423
10424 * src/LR0.h (first_shift, first_reduction): Remove.
10425 * src/lalr.c: Don't use first_shift: find shifts through the
10426 states.
10427
10428 2001-12-10 Akim Demaille <akim@epita.fr>
10429
10430 * src/LR0.c: Attach shifts to states as soon as they are
10431 computed.
10432 * src/lalr.c (set_state_table): Instead of assigning shifts to
10433 state, just assert that the mapping was properly done.
10434
10435 2001-12-10 Akim Demaille <akim@epita.fr>
10436
10437 * src/LR0.c (insert_start_shift): Rename as...
10438 (insert_start_shifting_state): this.
10439 (insert_eof_shifting_state, insert_accepting_state): New.
10440 (augment_automaton): Adjust.
10441 Better locality of the variables.
10442 When looking if the start_symbol is shifted from the initial
10443 state, using `while (... symbol != start_symbol ...)' sounds
10444 better than `while (... symbol < start_symbol ...)': If fail
10445 to see how the order between symbols could be relevant!
10446
10447 2001-12-10 Akim Demaille <akim@epita.fr>
10448
10449 * src/getargs.h: Don't declare `spec_name_prefix' and
10450 `spec_file_prefix', declared by src/files.h.
10451 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
10452 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
10453 * src/output.c (prepare): Adjust.
10454 * src/reader.c (symbols_output): Likewise.
10455 * src/vmsgetargs.c: Vaguely adjust, but who cares?
10456
10457 2001-12-10 Akim Demaille <akim@epita.fr>
10458
10459 * src/muscle_tab.c (muscle_init): NULL is a better default than
10460 `"0"'.
10461
10462 2001-12-10 Akim Demaille <akim@epita.fr>
10463
10464 * src/reader.c (reader): Calling symbols_output once is enough.
10465
10466 2001-12-10 Akim Demaille <akim@epita.fr>
10467
10468 Now that states have a complete set of members, the linked list of
10469 reductions is useless: just fill directly the state's reductions
10470 member.
10471
10472 * src/state.h (struct reductions): Remove member `number' and
10473 `next'.
10474 * src/LR0.c (first_reduction, last_reduction): Remove.
10475 (save_reductions): Don't link the new reductions, store them in
10476 this_state.
10477 * src/lalr.c (set_state_table): No need to attach reductions to
10478 states, it's already done.
10479 * src/output.c (output_actions): No longer free the shifts, then
10480 the reductions, then the states: free all the states and their
10481 members.
10482
10483 2001-12-10 Akim Demaille <akim@epita.fr>
10484
10485 * src/options.c (OPTN, DRTV, BOTH): New.
10486 (option_table): Use them.
10487
10488 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
10489 the job of system.h.
10490 * src/options.c: Don't include stdio.h and xalloc.h for the same
10491 reasons.
10492
10493 2001-12-10 Akim Demaille <akim@epita.fr>
10494
10495 * src/output.c (output, prepare): Make sure the values of the
10496 muscles `action' and `prologue' are 0-terminated.
10497
10498 2001-12-10 Akim Demaille <akim@epita.fr>
10499
10500 Clean up GCC warnings.
10501
10502 * src/reader.c (copy_action): `buf' is not used.
10503 (parse_skel_decl): Be static.
10504 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
10505 * src/options.h (create_long_option_table): Have a real prototype.
10506 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
10507 (hash_delete_at): Return const void *.
10508 Adjust casts to preserve the const.
10509
10510 2001-12-10 Akim Demaille <akim@epita.fr>
10511
10512 * configure.in: Require 2.52g.
10513 M4 is not needed, but AUTOM4TE is.
10514 * m4/m4.m4: Remove.
10515 * tests/Makefile.am: Adjust.
10516
10517 2001-12-10 Akim Demaille <akim@epita.fr>
10518
10519 One structure for states is enough, even though theoretically
10520 there are LR(0) states and LALR(1) states.
10521
10522 * src/lalr.h (state_t): Remove.
10523 (state_table): Be state_t **, not state_t *.
10524 * src/state.h (core, CORE_ALLOC): Rename as...
10525 (state_t, STATE_ALLOC): this.
10526 Add the LALR(1) members: shifts, reductions, errs.
10527 * src/LR0.c (state_table): Rename as...
10528 (state_hash): this, to avoid name clashes with the global
10529 `state_table'.
10530 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
10531 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
10532
10533 2001-12-10 Akim Demaille <akim@epita.fr>
10534
10535 Bison dumps core on bash.y.
10536 Reported by Pascal Bart.
10537
10538 * src/warshall.c (bitmatrix_print): New.
10539 (TC): Use it.
10540 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
10541 j must be the outer loop.
10542 * tests/regression.at (Broken Closure): New.
10543
10544 2001-12-05 Akim Demaille <akim@epita.fr>
10545
10546 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
10547 its argument.
10548 Reported by Peter Hamorsky.
10549
10550 2001-12-05 Akim Demaille <akim@epita.fr>
10551
10552 * src/conflicts.c (err_table): Remove.
10553 (resolve_sr_conflict): Adjust.
10554 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
10555 Rename as...
10556 (state_t.reductions, state_t.shifts): this.
10557
10558 2001-12-05 Akim Demaille <akim@epita.fr>
10559
10560 * src/reduce.c (reduce_grammar_tables): No longer disable the
10561 removal of useless rules via CPP but via `if (0)', so that the
10562 compiler still check the code is valid.
10563 For instance, it should have noticed `rline' no longer exists: use
10564 the `line' member of rule_t.
10565 * src/gram.c (dummy, rline): Remove, unused.
10566
10567 2001-12-05 Akim Demaille <akim@epita.fr>
10568
10569 * src/output.c (pack_vector): Use assert, not berror.
10570 * src/main.c (berror): Remove, unused.
10571
10572 2001-12-05 Akim Demaille <akim@epita.fr>
10573
10574 New experimental feature: if --verbose --trace output all the
10575 items of a state, not only its kernel.
10576
10577 * src/print.c (print_core): If `trace_flag', then invoke closure
10578 before outputting the items of the state (print_core is no longer
10579 a correct name them).
10580 (print_results): Invoke new_closure/free_closure if needed.
10581
10582 2001-12-05 Akim Demaille <akim@epita.fr>
10583
10584 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
10585 * src/closure.c, src/closure.h (itemsetsize): Rename as...
10586 (nitemset): for consistency with the rest of the project.
10587
10588 2001-12-05 Akim Demaille <akim@epita.fr>
10589
10590 * src/closure.c (print_closure): Improve.
10591 (closure): Use it for printing input and output.
10592
10593 2001-12-05 Akim Demaille <akim@epita.fr>
10594
10595 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
10596 indexed by nonterminals.
10597
10598 2001-12-05 Akim Demaille <akim@epita.fr>
10599
10600 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
10601 what it was!).
10602 * src/warshall.h: Remove accidental duplication of the content.
10603
10604 2001-12-05 Akim Demaille <akim@epita.fr>
10605
10606 * src/closure.c (set_fderives): De-obfuscate.
10607
10608 2001-12-05 Akim Demaille <akim@epita.fr>
10609
10610 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
10611
10612 2001-12-05 Akim Demaille <akim@epita.fr>
10613
10614 * src/closure.c (set_firsts): De-obfuscate.
10615
10616 2001-12-05 Akim Demaille <akim@epita.fr>
10617
10618 * src/output.c (action_row): De-obfuscate
10619 using the good o' techniques: arrays not pointers, variable
10620 locality, BITISSET, RESETBIT etc.
10621
10622 2001-12-05 Akim Demaille <akim@epita.fr>
10623
10624 Pessimize the code to simplify it: from now on, all the states
10625 have a valid SHIFTS, which NSHIFTS is possibly 0.
10626
10627 * src/LR0.c (shifts_new): Be global and move to..
10628 * src/state.c, src/state.h: here.
10629 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
10630 * src/print_graph: Adjust.
10631
10632 2001-12-05 Akim Demaille <akim@epita.fr>
10633
10634 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
10635 * src/conflicts.c: Use it.
10636 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
10637 incorrectly ``simplified''.
10638
10639 2001-12-05 Akim Demaille <akim@epita.fr>
10640
10641 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
10642 using the good o' techniques: arrays not pointers, variable
10643 locality, BITISSET, RESETBIT etc.
10644
10645 2001-12-05 Akim Demaille <akim@epita.fr>
10646
10647 * src/state.h (SHIFT_SYMBOL): New.
10648 * src/conflicts.c: Use it to deobfuscate.
10649
10650 2001-12-05 Akim Demaille <akim@epita.fr>
10651
10652 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
10653 (print_reductions): De-obfuscate using the good o' techniques:
10654 arrays not pointers, variable locality, BITISSET.
10655
10656 2001-12-05 Akim Demaille <akim@epita.fr>
10657
10658 * src/conflicts.c (print_reductions): Arrays, not pointers.
10659 Use BITISSET.
10660
10661 2001-12-05 Akim Demaille <akim@epita.fr>
10662
10663 * src/conflicts.c (print_reductions): Pessimize, but clarify.
10664
10665 2001-12-05 Akim Demaille <akim@epita.fr>
10666
10667 * src/conflicts.c (print_reductions): Improve variable locality.
10668
10669 2001-12-05 Akim Demaille <akim@epita.fr>
10670
10671 * src/conflicts.c (print_reductions): Pessimize, but clarify.
10672
10673 2001-12-05 Akim Demaille <akim@epita.fr>
10674
10675 * src/conflicts.c (print_reductions): Improve variable locality.
10676
10677 2001-12-05 Akim Demaille <akim@epita.fr>
10678
10679 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
10680 * src/lalr.c: Use them.
10681
10682 2001-12-05 Akim Demaille <akim@epita.fr>
10683
10684 * src/LR0.c (augment_automaton): Formatting changes.
10685 Better variable locality.
10686
10687 2001-12-05 Akim Demaille <akim@epita.fr>
10688
10689 * src/lalr.c (matrix_print): New.
10690 (transpose): Use it.
10691 Use arrays instead of pointers.
10692
10693 2001-12-05 Akim Demaille <akim@epita.fr>
10694
10695 * src/lalr.c (maxrhs): Move to...
10696 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
10697 * src/lalr.c (build_relations): Adjust.
10698
10699 2001-12-05 Akim Demaille <akim@epita.fr>
10700
10701 * src/lalr.c (transpose): Free the memory allocated to the
10702 argument, as it is replaced by the results by the unique caller.
10703 (build_relations): Merely invoke transpose: it handles the memory
10704 deallocation.
10705 Improve variable locality.
10706 Avoid variables used as mere abbreviations.
10707 (compute_lookaheads): Use arrays instead of pointers.
10708
10709 2001-12-05 Akim Demaille <akim@epita.fr>
10710
10711 * src/lalr.c (initialize_F): Improve variable locality.
10712 Avoid variables used as mere abbreviations.
10713
10714 2001-12-05 Akim Demaille <akim@epita.fr>
10715
10716 * src/derives.c (print_derives): Display the ruleno.
10717 * src/lalr.c (initialize_F, transpose): Better variable locality
10718 to improve readability.
10719 Avoid variables used as mere abbreviations.
10720
10721 2001-12-05 Akim Demaille <akim@epita.fr>
10722
10723 * src/lalr.c (traverse): Use arrays instead of pointers.
10724
10725 2001-12-05 Akim Demaille <akim@epita.fr>
10726
10727 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
10728 the handling of squeue.
10729 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
10730
10731 2001-12-05 Akim Demaille <akim@epita.fr>
10732
10733 Because useless nonterminals are now kept alive (instead of being
10734 `destroyed'), we now sometimes examine them, and store information
10735 related to them. Hence we need to know their number, and adjust
10736 memory allocations.
10737
10738 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
10739 static.
10740 * src/LR0.c (allocate_itemsets): The memory allocated to
10741 `symbol_count' was used for two different purpose: once to count
10742 the number of occurrences of each symbol, and later reassigned to
10743 `shift_symbol', containing the symbol that can be shifted from a
10744 given state.
10745 Deobfuscate, i.e., allocate, use and free `symbol_count' here
10746 only, and...
10747 (new_itemsets): Allocate `shift_symbol' here.
10748 (allocate_itemsets): symbol_count includes useless nonterminals.
10749 Make room for them.
10750 (free_storage): Use `free', not `XFREE', for pointers that cannot
10751 be null.
10752
10753 2001-12-05 Akim Demaille <akim@epita.fr>
10754
10755 * src/nullable.c (set_nullable): Deobfuscate the handling of
10756 ritem.
10757 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
10758
10759 2001-12-05 Akim Demaille <akim@epita.fr>
10760
10761 * src/gram.c, src/gram.h (ritem_print): New.
10762 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
10763 (This useless function was defined only to work around VMS linkers
10764 that can't handle compilation units with variables only).
10765 * src/reduce.c (dump_grammar): Use it to trace the construction of
10766 ritem.
10767
10768 2001-12-04 Paul Eggert <eggert@twinsun.com>
10769
10770 * src/bison.simple (union yyalloc): Change member names
10771 to be the same as the stack names.
10772 (yyparse): yyptr is now union yyalloc *, not char *.
10773 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
10774 and may generate better code on some machines.
10775 (yystpcpy): Use prototype if __STDC__ is defined, not just
10776 if __cplusplus is defined.
10777
10778 2001-11-30 Akim Demaille <akim@epita.fr>
10779
10780 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
10781 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
10782 Gettext doesn't compile cleanly, and dies with -Werror.
10783 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
10784 Include WARNING_CFLAGS here.
10785 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
10786 before being defined.
10787
10788 2001-11-27 Paul Eggert <eggert@twinsun.com>
10789
10790 * lib/quotearg.h (quotearg_n, quotearg_n_style):
10791 First arg is int, not unsigned.
10792 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
10793 (SIZE_MAX, UINT_MAX): New macros.
10794 (quotearg_n_options): Abort if N is negative.
10795 Avoid overflow check on hosts where size_t is 64 bits and int
10796 is 32 bits, as overflow is impossible there.
10797 Fix off-by-one typo that caused unnecessary reallocation.
10798
10799 2001-11-29 Paul Eggert <eggert@twinsun.com>
10800
10801 Name space cleanup in generated parser.
10802
10803 * doc/bison.texinfo (Bison Parser): Discuss system headers
10804 and their effect on the user name space.
10805
10806 * src/bison.simple:
10807 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
10808 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
10809 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
10810
10811 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
10812 on user names when possible.
10813
10814 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
10815 Simplify test for whather <alloca.h> exists.
10816
10817 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
10818
10819 (<stdio.h>): Include if YYDEBUG.
10820
10821 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
10822 ! defined (yyoverflow) && ! defined (yymemcpy).
10823
10824 (yymemcpy, yyparse): Rename local variables as needed so that
10825 they all begin with 'yy'.
10826
10827 (yystrlen, yystpcpy): New functions.
10828
10829 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
10830 All uses changed.
10831
10832 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
10833 instead of relying on string.h functions. Use YYSTACK_ALLOC
10834 and YYSTACK_FREE instead of malloc and free.
10835
10836 2001-11-30 Akim Demaille <akim@epita.fr>
10837
10838 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
10839 before their first uses.
10840 (YYBISON, YYPURE): Move to the top of the output.
10841
10842 2001-11-30 Akim Demaille <akim@epita.fr>
10843
10844 * tests/reduce.at (Useless Nonterminals): Fix.
10845
10846 2001-11-30 Akim Demaille <akim@epita.fr>
10847
10848 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
10849 if body instead of `;' to pacify GCC's warnings.
10850
10851 2001-11-30 Akim Demaille <akim@epita.fr>
10852
10853 Instead of mapping the LHS of unused rules to -1, keep the LHS
10854 valid, but flag the rules as invalid.
10855
10856 * src/gram.h (rule_t): `useful' is a new member.
10857 * src/print.c (print_grammar): Adjust.
10858 * src/derives.c (set_derives): Likewise.
10859 * src/reader.c (packgram, reduce_output): Likewise.
10860 * src/reduce.c (reduce_grammar_tables): Likewise.
10861 * tests/reduce.at (Underivable Rules, Useless Rules): New.
10862
10863 2001-11-30 Akim Demaille <akim@epita.fr>
10864
10865 * src/reduce.c (reduce_output): Formatting changes.
10866 * src/print.c (print_results, print_grammar): Likewise.
10867 * tests/regression.at (Rule Line Numbers)
10868 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
10869
10870 2001-11-30 Akim Demaille <akim@epita.fr>
10871
10872 * src/reduce.c (nonterminals_reduce): Instead of throwing away
10873 useless nonterminals, move them at the end of the symbol arrays.
10874 (reduce_output): Adjust.
10875 * tests/reduce.at (Useless Nonterminals): Adjust.
10876
10877 2001-11-30 Akim Demaille <akim@epita.fr>
10878
10879 * src/reduce.c: Various comment/formatting changes.
10880 (nonterminals_reduce): New, extracted from...
10881 (reduce_grammar_tables): here.
10882 (reduce_grammar): Call nonterminals_reduce.
10883
10884 2001-11-29 Paul Eggert <eggert@twinsun.com>
10885
10886 * src/bison.simple (YYSTACK_REALLOC): Remove.
10887 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
10888 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
10889 New macros.
10890 (union yyalloc): New type.
10891 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
10892 an arbitrary restriction on hosts where size_t is wider than int.
10893
10894 (yyparse): Don't dump core if alloca or malloc fails; instead, report
10895 a parser stack overflow. Allocate just one block of memory for all
10896 three stacks, instead of allocating three blocks; this typically is
10897 faster and reduces fragmentation.
10898
10899 Do not limit the number of items in the stack to a value that fits
10900 in 'int', as this is an arbitrary limit on hosts with 64-bit
10901 size_t and 32-bit int.
10902
10903 2001-11-29 Marc Autret <autret_m@epita.fr>
10904
10905 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
10906 of defining YYERROR_VERBOSE.
10907 [AT_DATA]: $4 is now out of C declarations in the prologue.
10908
10909 2001-11-28 Marc Autret <autret_m@epita.fr>
10910
10911 * src/reader.c (parse_dquoted_param): New.
10912 (parse_skel_decl): Use it.
10913 * src/lex.h: Add its prototype.
10914 * src/lex.c (literalchar): Become not static.
10915
10916 2001-11-28 Marc Autret <autret_m@epita.fr>
10917
10918 * src/output.h: And put its extern declaration here.
10919 * src/output.c (error_verbose): Define here.
10920 (prepare): Echo name modification.
10921 * src/getargs.h: Clean its extern declaration.
10922 * src/getargs.c (error_verbose_flag): Remove.
10923 (getargs): Remove case 'e'.
10924 * src/options.c (option_table): 'error-verbose' is now seen as simple
10925 percent option.
10926 Include output.h.
10927
10928 * src/reader.c (read_declarations): Remove case tok_include.
10929 (parse_include_decl): Remove.
10930 * src/lex.h (token_t): Remove tok_include.
10931 * src/options.c (option_table): 'include' is now a simple command line
10932 option.
10933
10934 2001-11-28 Marc Autret <autret_m@epita.fr>
10935
10936 * src/bison.simple: Adjust muscle names.
10937 * src/muscle_tab.c (muscle_init): Also rename the muscles.
10938 * src/output.c (prepare): s/_/-/ for the muscles names.
10939 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
10940
10941 2001-11-28 Marc Autret <autret_m@epita.fr>
10942
10943 * src/bison.simple: Fix debug.
10944 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
10945
10946 2001-11-28 Akim Demaille <akim@epita.fr>
10947
10948 * src/LR0.c (shifts_new): New.
10949 (save_shifts, insert_start_shift, augment_automaton): Use it.
10950
10951 2001-11-28 Akim Demaille <akim@epita.fr>
10952
10953 * src/closure.c (closure): `b' and `ruleno' denote the same value:
10954 keep ruleno only.
10955
10956 2001-11-28 Akim Demaille <akim@epita.fr>
10957
10958 * src/closure.c (closure): Instead of looping over word in array
10959 then bits in words, loop over bits in array.
10960
10961 2001-11-28 Akim Demaille <akim@epita.fr>
10962
10963 * src/closure.c (closure): No longer optimize the special case
10964 where all the bits of `ruleset[r]' are set to 0, to make the code
10965 clearer.
10966
10967 2001-11-28 Akim Demaille <akim@epita.fr>
10968
10969 * src/closure.c (closure): `r' and `c' are new variables, used to
10970 de-obfuscate accesses to RULESET and CORE.
10971
10972 2001-11-28 Akim Demaille <akim@epita.fr>
10973
10974 * src/reduce.c (reduce_print): Use ngettext.
10975 (dump_grammar): Improve the trace accuracy.
10976
10977 2001-11-28 Akim Demaille <akim@epita.fr>
10978
10979 * src/reduce.c (dump_grammar): Don't translate trace messages.
10980
10981 2001-11-28 Akim Demaille <akim@epita.fr>
10982
10983 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
10984 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
10985 as all tags are free'ed afterwards.
10986 From Enrico Scholz.
10987
10988 2001-11-27 Paul Eggert <eggert@twinsun.com>
10989
10990 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
10991 use alloca when we didn't want to, and vice versa.
10992
10993 2001-11-27 Marc Autret <autret_m@epita.fr>
10994
10995 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
10996 initialization.
10997 * src/output.c (prepare): Remove its update.
10998
10999 2001-11-27 Marc Autret <autret_m@epita.fr>
11000
11001 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
11002 Use %error-verbose.
11003
11004 2001-11-27 Marc Autret <autret_m@epita.fr>
11005
11006 * src/bison.simple: Remove YYERROR_VERBOSE using.
11007 Use %%error_verbose.
11008 (yyparse): Likewise.
11009 * src/output.c (prepare): Give its final value.
11010 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
11011 * src/getargs.h: Add its extern declaration.
11012 * src/getargs.c (error_verbose_flag): New int.
11013 (getargs): Update to catch new case.
11014 * src/options.c (option_table): 'error-verbose' is a new option.
11015 (shortopts): Update.
11016
11017 2001-11-27 Akim Demaille <akim@epita.fr>
11018
11019 * src/system.h: Use intl/libgettext.h.
11020 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
11021
11022 2001-11-27 Akim Demaille <akim@epita.fr>
11023
11024 * tests/torture.at (Exploding the Stack Size with Malloc):
11025 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
11026
11027 2001-11-27 Akim Demaille <akim@epita.fr>
11028
11029 * src/files.c: Include error.h.
11030 Reported by Hans Aberg.
11031
11032 2001-11-26 Marc Autret <autret_m@epita.fr>
11033
11034 * src/reader.c (parse_include_decl): New, not yet implemented.
11035 (read_declarations): Add case tok_include.
11036 * src/getargs.h (include): Add its extern definition.
11037 * src/getargs.c (include): New const char *.
11038 (getargs): Add case '-I'.
11039 * src/options.c (option_table): Add include as command line and
11040 percent option.
11041 * src/lex.h (token_t): Add tok_include.
11042
11043 2001-11-26 Akim Demaille <akim@epita.fr>
11044
11045 * src/reader.c (readgram): Make sure rules for mid-rule actions
11046 have a lineno equal to that of their host rule.
11047 Reported by Hans Aberg.
11048 * tests/regression.at (Rule Line Numbers): New.
11049
11050 2001-11-26 Akim Demaille <akim@epita.fr>
11051
11052 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
11053 size_ts.
11054
11055 2001-11-26 Akim Demaille <akim@epita.fr>
11056
11057 * src/complain.c, src/complain.h (error): Remove, provided by
11058 lib/error.[ch].
11059
11060 2001-11-26 Akim Demaille <akim@epita.fr>
11061
11062 * src/reader.c (read_declarations): Don't abort on tok_illegal,
11063 issue an error message.
11064 * tests/regression.at (Invalid %directive): New.
11065 Reported by Hans Aberg.
11066
11067 2001-11-26 Akim Demaille <akim@epita.fr>
11068
11069 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
11070 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
11071
11072 2001-11-26 Akim Demaille <akim@epita.fr>
11073
11074 * src/conflicts.c (conflicts_print): Don't complain at all when
11075 there are no reduce/reduce conflicts, and as many shift/reduce
11076 conflicts as expected.
11077 * tests/regression.at (%expect right): Adjust.
11078
11079 2001-11-23 Akim Demaille <akim@epita.fr>
11080
11081 * lib/alloca.c: Update, from fileutils.
11082
11083 2001-11-23 Akim Demaille <akim@epita.fr>
11084
11085 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
11086
11087 2001-11-23 Akim Demaille <akim@epita.fr>
11088
11089 * src/system.h: Include alloca.h.
11090 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
11091
11092 2001-11-23 Akim Demaille <akim@epita.fr>
11093
11094 * src/print_graph.c (print_actions): Remove `rule', unused.
11095 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
11096 pacify GCC's signed < unsigned warnings.
11097 * src/closure.c (itemsetsize): Likewise.
11098 * src/reader.c (symbol_list_new): Static.
11099
11100 2001-11-23 Akim Demaille <akim@epita.fr>
11101
11102 Attaching lineno to buckets is stupid, since only one copy of each
11103 symbol is kept, only the line of the first occurrence is kept too.
11104
11105 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
11106 * src/reader.c (rline_allocated): Remove, unused.
11107 (symbol_list): Have a `line' member.
11108 (symbol_list_new): New.
11109 (readgram): Use it.
11110 * src/print.c (print_grammar): Output the rule line numbers.
11111 * tests/regression.at (Solved SR Conflicts)
11112 (Unresolved SR Conflicts): Adjust.
11113 Reported by Hans Aberg.
11114
11115 2001-11-22 Marc Autret <autret_m@epita.fr>
11116
11117 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
11118
11119 2001-11-22 Marc Autret <autret_m@epita.fr>
11120
11121 * src/muscle_tab.c (muscle_init): Remove initialization of
11122 skeleton muscle.
11123 * src/output.c (output_master_parser): Do it here.
11124
11125 2001-11-20 Akim Demaille <akim@epita.fr>
11126
11127 * po/sv.po: New.
11128 * configure.in (ALL_LINGUAS): Adjust.
11129 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
11130 longer contains strings to translate.
11131
11132 2001-11-19 Akim Demaille <akim@epita.fr>
11133
11134 * src/conflicts.c (conflicts_print): Add a missing \n.
11135
11136 2001-11-19 Akim Demaille <akim@epita.fr>
11137
11138 * src/nullable.c (nullable_print): New.
11139 (set_nullable): Call it when tracing.
11140 Better locality of variables.
11141
11142 2001-11-19 Akim Demaille <akim@epita.fr>
11143
11144 * src/print.c (print_actions): Better locality of variables.
11145
11146 2001-11-19 Akim Demaille <akim@epita.fr>
11147
11148 * src/derives.c (print_derives): Fix and enrich.
11149 * src/closure.c (print_fderives): Likewise.
11150
11151 2001-11-19 Akim Demaille <akim@epita.fr>
11152
11153 * src/closure.c (itemsetend): Remove, replaced with...
11154 (itemsetsize): new.
11155
11156 2001-11-19 Akim Demaille <akim@epita.fr>
11157
11158 * src/LR0.c (kernel_end): Remove, replaced with...
11159 (kernel_size): new.
11160
11161 2001-11-19 Akim Demaille <akim@epita.fr>
11162
11163 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
11164 to clarify.
11165
11166 2001-11-19 Akim Demaille <akim@epita.fr>
11167
11168 * src/closure.c (closure): Use arrays instead of pointers to clarify.
11169
11170 2001-11-19 Akim Demaille <akim@epita.fr>
11171
11172 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
11173 trace messages.
11174 * src/LR0.c: Likewise.
11175 (allocate_itemsets): Use arrays instead of pointers to clarify.
11176
11177 2001-11-19 Akim Demaille <akim@epita.fr>
11178
11179 * src/getargs.c (statistics_flag): Replace with...
11180 (trace_flag): New.
11181 (longopts): Accept --trace instead of --statistics.
11182 * src/getargs.h, src/options.c: Adjust.
11183 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
11184 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
11185
11186 2001-11-19 Akim Demaille <akim@epita.fr>
11187
11188 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
11189 pointers to clarify the code.
11190 (save_reductions, save_shifts): Factor common parts of alternatives.
11191
11192 2001-11-19 Akim Demaille <akim@epita.fr>
11193
11194 * src/LR0.c (new_state, get_state): Complete TRACE code.
11195 * src/closure.c: Include `reader.h' to get `tags', needed by the
11196 trace code.
11197 Rename the conditional DEBUG as TRACE.
11198 Output consistently TRACEs to stderr, not stdout.
11199 * src/derives.c: Likewise.
11200 * src/reduce.c: (inaccessable_symbols): Using if is better style
11201 than goto.
11202 Use `#if TRACE' instead of `#if 0' for tracing code.
11203
11204 2001-11-19 Akim Demaille <akim@epita.fr>
11205
11206 * src/system.h (LIST_FREE, shortcpy): New.
11207 * src/LR0.c: Use them.
11208 * src/output.c (free_itemsets, free_reductions, free_shifts):
11209 Remove, replaced by LIST_FREE.
11210
11211 2001-11-19 Akim Demaille <akim@epita.fr>
11212
11213 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
11214 (REDUCTIONS_ALLOC): New.
11215 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
11216 allocation.
11217
11218 2001-11-19 Akim Demaille <akim@epita.fr>
11219
11220 * src/LR0.c (new_state): Complete trace code.
11221 * src/nullable.c (set_nullable): Don't translate traces.
11222
11223 2001-11-19 Akim Demaille <akim@epita.fr>
11224
11225 * src/print_graph.c (print_core): Better locality of variables.
11226 * src/print.c (print_core): Likewise.
11227
11228 2001-11-19 Akim Demaille <akim@epita.fr>
11229
11230 * src/vcg.c: You do the output, so you are responsible of the
11231 handling of VCG syntax, in particular: use quotearg.
11232 * src/print_graph.c: Don't.
11233 (print_actions): Don't output the actions as part of the nodes,
11234 since that's the job of the edges.
11235 (print_state): Don't output by hand: fill the node description,
11236 and ask for its output.
11237
11238 2001-11-19 Akim Demaille <akim@epita.fr>
11239
11240 * src/bison.simple (yyparse): When verbosely reporting an error,
11241 no longer put additional quotes around token names.
11242 * tests/calc.at: Adjust.
11243
11244 2001-11-19 Akim Demaille <akim@epita.fr>
11245
11246 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
11247 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
11248 * src/output.c: Adjust.
11249
11250 2001-11-19 Akim Demaille <akim@epita.fr>
11251
11252 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
11253 (rule_t): this.
11254 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
11255
11256 2001-11-19 Akim Demaille <akim@epita.fr>
11257
11258 * src/gram.h (rule_t): New.
11259 (rule_table): New.
11260 (rrhs, rlhs): Remove, part of state_t.
11261 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
11262 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
11263 * src/reader.c, src/reduce.c: Adjust.
11264
11265 2001-11-19 Akim Demaille <akim@epita.fr>
11266
11267 * src/reader.c (symbols_output): New, extracted from...
11268 (packsymbols): Here.
11269 (reader): Call it.
11270
11271 2001-11-19 Akim Demaille <akim@epita.fr>
11272
11273 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
11274 (maxrhs): this new function.
11275
11276 2001-11-19 Akim Demaille <akim@epita.fr>
11277
11278 * src/lalr.c (F): New macro to access the variable F.
11279 Adjust.
11280
11281 2001-11-19 Akim Demaille <akim@epita.fr>
11282
11283 * src/lalr.h (LA): New macro to access the variable LA.
11284 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
11285 * src/lalr.c: Adjust.
11286
11287 2001-11-19 Akim Demaille <akim@epita.fr>
11288
11289 * src/lalr.c (initialize_LA): Only initialize LA. Let...
11290 (set_state_table): handle the `lookaheads' members.
11291
11292 2001-11-19 Akim Demaille <akim@epita.fr>
11293
11294 * src/lalr.h (lookaheads): Removed array, whose contents is now
11295 a member of...
11296 (state_t): this structure.
11297 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
11298 Adjust.
11299
11300 2001-11-19 Akim Demaille <akim@epita.fr>
11301
11302 * src/lalr.h (consistent): Removed array, whose contents is now
11303 a member of...
11304 (state_t): this structure.
11305 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
11306 Adjust.
11307
11308 2001-11-19 Akim Demaille <akim@epita.fr>
11309
11310 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
11311 contents are now members of...
11312 (state_t): this structure.
11313 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
11314 Adjust.
11315
11316 2001-11-19 Akim Demaille <akim@epita.fr>
11317
11318 * src/lalr.h (state_t): New.
11319 (state_table): Be a state_t * instead of a core **.
11320 (accessing_symbol): Remove, part of state_t.
11321 * src/lalr.c: Adjust.
11322 (set_accessing_symbol): Merge into...
11323 (set_state_table): this.
11324 * src/print_graph.c, src/conflicts.c: Adjust.
11325
11326 2001-11-14 Akim Demaille <akim@epita.fr>
11327
11328 * tests/calc.at, tests/output.at, tests/regression.at,
11329 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
11330 now the tests are run in private dirs, therefore AC_CLEANUP and
11331 family can be simplified to 0-ary.
11332 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
11333 use abs. path to find config.h.
11334 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
11335 stderr, there can be way too much random noise.
11336 Instead pass -Werror to GCC and rely on the exit status.
11337 Reported by Wolfram Wagner.
11338
11339 2001-11-14 Akim Demaille <akim@epita.fr>
11340
11341 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
11342 defined only if yyoverflow is defined, to avoid `warning: unused
11343 variable `yyvs1''.
11344 Reported by The Test Suite.
11345
11346 2001-11-14 Akim Demaille <akim@epita.fr>
11347
11348 * src/print.c: Include reduce.h.
11349 Reported by Hans Aberg.
11350
11351 2001-11-14 Akim Demaille <akim@epita.fr>
11352
11353 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
11354 Revert a previous patch: these are really const.
11355 * src/conflicts.c (conflict_report): Additional useless pair of
11356 braces to pacify GCC's warnings for `if () if () {} else {}'.
11357 * src/lex.c (parse_percent_token): Replace equal_offset with
11358 arg_offset.
11359 arg is const.
11360 Be sure to strdup `arg' when used, since there is no reason for
11361 token_buffer not to change.
11362
11363 2001-11-14 Akim Demaille <akim@epita.fr>
11364
11365 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
11366 definition.
11367 * src/main.c (main): Use them.
11368 Suggested by Hans Aberg.
11369
11370 2001-11-12 Akim Demaille <akim@epita.fr>
11371
11372 * src/system.h (ngettext): Now that we use ngettext, be sure to
11373 provide a default definition when NLS are not used.
11374
11375 2001-11-12 Akim Demaille <akim@epita.fr>
11376
11377 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
11378 Use @kbd to denote user input.
11379 (Language and Grammar): ANSIfy the example.
11380 Adjust its layout for info/notinfo.
11381 (Location Tracking Calc): Output error messages to stderr.
11382 Output locations in a more GNUtically correct way.
11383 Fix a couple of Englishos.
11384 Adjust @group/@end group pairs.
11385
11386 2001-11-12 Akim Demaille <akim@epita.fr>
11387
11388 %expect was not functioning at all.
11389
11390 * src/conflicts.c (expected_conflicts): Set to -1.
11391 (conflict_report): Use ngettext.
11392 (conflicts_print): Check %expect and make its violation an error.
11393 * doc/bison.texinfo (Expect Decl): Adjust.
11394 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
11395 * tests/regression.at (%expect not enough, %expect right)
11396 (%expect too much): New.
11397
11398 2001-11-12 Akim Demaille <akim@epita.fr>
11399
11400 * tests/regression.at (Conflicts): Rename as...
11401 (Unresolved SR Conflicts): this.
11402 (Solved SR Conflicts): New.
11403
11404 2001-11-12 Akim Demaille <akim@epita.fr>
11405
11406 * src/reduce.c (print_results): Rename as...
11407 (reduce_output): This.
11408 Output to OUT, passed as argument, instead of output_obstack.
11409 (dump_grammar): Likewise.
11410 (reduce_free): New.
11411 Also free V1.
11412 (reduce_grammar): No longer call reduce_output, since...
11413 * src/print.c (print_results): do it.
11414 * src/main.c (main): Call reduce_free;
11415
11416 2001-11-12 Akim Demaille <akim@epita.fr>
11417
11418 * src/conflicts.c (print_reductions): Accept OUT as argument.
11419 Output to it, not to output_obstack.
11420 * src/print.c (print_actions): Adjust.
11421
11422 2001-11-12 Akim Demaille <akim@epita.fr>
11423
11424 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
11425 the result instead of using...
11426 (src_total, rrc_total, src_count, rrc_count): Remove.
11427 (any_conflicts): Remove.
11428 (print_conflicts): Split into...
11429 (conflicts_print, conflicts_output): New.
11430 * src/conflicts.h: Adjust.
11431 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
11432 * src/print.c (print_grammar): Issue `\n' between two rules.
11433 * tests/regression.at (Conflicts): New.
11434 Reported by Tom Lane.
11435
11436 2001-11-12 Akim Demaille <akim@epita.fr>
11437
11438 * tests/regression.at (Invalid input): Remove, duplicate with
11439 ``Invalid input: 1''.
11440
11441 2001-11-12 Akim Demaille <akim@epita.fr>
11442
11443 * tests/torture.at (AT_DATA_STACK_TORTURE)
11444 (Exploding the Stack Size with Alloca)
11445 (Exploding the Stack Size with Malloc): New.
11446
11447 2001-11-12 Akim Demaille <akim@epita.fr>
11448
11449 * src/bison.simple (YYSTACK_REALLOC): New.
11450 (yyparse) [!yyoverflow]: Use it and free the old stack.
11451 Reported by Per Allansson.
11452
11453 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
11454
11455 * src/bison.simple: Define type yystype instead of YYSTYPE, and
11456 define CPP macro, which substitute YYSTYPE by yystype.
11457 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
11458 with yyltype/YYLTYPE. This allows inclusion of the generated
11459 header within the parser if the compiler, such as GGC, accepts
11460 multiple equivalent #defines.
11461 From Akim.
11462
11463 2001-11-05 Akim Demaille <akim@epita.fr>
11464
11465 * src/reader.c (symbols_output): New, extracted from...
11466 (packsymbols): here.
11467 (reader): Adjust.
11468
11469 2001-11-05 Akim Demaille <akim@epita.fr>
11470
11471 * src/lex.c (parse_percent_token): s/quotearg/quote/.
11472
11473 2001-11-05 Akim Demaille <akim@epita.fr>
11474
11475 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
11476 pattern.
11477
11478 2001-11-05 Akim Demaille <akim@epita.fr>
11479
11480 * src/options.h (struct option_table_struct): set_flags is void*.
11481 * src/options.c (longopts): Support `--output' and `%output'.
11482 (usage): Adjust.
11483 * src/lex.h (tok_setopt): Remove, replaced with...
11484 (tok_intopt, tok_stropt): these new guys.
11485 * src/lex.c (getopt.h): Not needed.
11486 (token_buffer, unlexed_token_buffer): Not const.
11487 (percent_table): Promote `-' over `_' in directive names.
11488 Active `%name-prefix', `file-prefix', and `output'.
11489 (parse_percent_token): Accept possible arguments to directives.
11490 Promote `-' over `_' in directive names.
11491
11492 2001-11-04 Akim Demaille <akim@epita.fr>
11493
11494 * doc/bison.texinfo (Decl Summary): Split the list into
11495 `directives for grammars' and `directives for bison'.
11496 Sort'em.
11497 Add description of `%name-prefix', `file-prefix', and `output'.
11498 Promote `-' over `_' in directive names.
11499 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
11500 Simplify the description of `--name-prefix'.
11501 Promote `-' over `_' in directive names.
11502 Promote `--output' over `--output-file'.
11503 Fix the description of `--defines'.
11504 * tests/output.at: Exercise %file-prefix and %output.
11505
11506 2001-11-02 Akim Demaille <akim@epita.fr>
11507
11508 * doc/refcard.tex: Update.
11509
11510 2001-11-02 Akim Demaille <akim@epita.fr>
11511
11512 * src/symtab.h (SUNDEF): New.
11513 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
11514 stand for `uninitialized', instead of 0.
11515 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
11516 * src/lex.c (lex): Adjust.
11517
11518 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
11519 Number it 0.
11520 Let yylex return it instead of a plain 0.
11521 Reported by Dick Streefland.
11522
11523 2001-11-02 Akim Demaille <akim@epita.fr>
11524
11525 * tests/regression.at (Mixing %token styles): New test.
11526
11527 2001-11-02 Akim Demaille <akim@epita.fr>
11528
11529 * src/reader.c (parse_thong_decl): Formatting changes.
11530 (token_translations_init): New, extracted from...
11531 (packsymbols): Here.
11532 Adjust.
11533
11534 2001-11-01 Akim Demaille <akim@epita.fr>
11535
11536 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
11537 Check that `9foo.y' produces correct cpp guards.
11538 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
11539 guards.
11540 Reported by Wwp.
11541
11542 2001-11-01 Akim Demaille <akim@epita.fr>
11543
11544 * tests/regression.at (Invalid input: 2): New.
11545 * src/lex.c (unlexed_token_buffer): New.
11546 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
11547 too.
11548 Reported by Wwp.
11549
11550 2001-11-01 Akim Demaille <akim@epita.fr>
11551
11552 * tests/calc.at: Catch up with 1.30.
11553 * configure.in: Bump to 1.49a.
11554 Adjust to newer Autotest.
11555
11556 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
11557
11558 * src/conflicts.c: Move global variables rrc_total and src_total ...
11559 (print_conflicts): here.
11560 * src/output.c (output): Free global variable user_toknums.
11561 * src/lex.c (token_obstack): Become static.
11562
11563 2001-10-18 Akim Demaille <akim@epita.fr>
11564
11565 * tests/atlocal.in (GCC): Add.
11566 * tests/calc.at: s/m4_match/m4_bmatch/.
11567 s/m4_patsubst/m4_bpatsubst/.
11568 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
11569 * configure.in: AC_SUBST(GCC).
11570
11571 2001-10-14 Marc Autret <autret_m@epita.fr>
11572
11573 * src/options.c (create_long_option_table): Fix.
11574
11575 2001-10-10 Akim Demaille <akim@epita.fr>
11576
11577 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
11578
11579 2001-10-04 Akim Demaille <akim@epita.fr>
11580
11581 * src/reader.c (parse_union_decl): Push the caracters in
11582 union_obstack, not attrs_obstack.
11583
11584 2001-10-04 Akim Demaille <akim@epita.fr>
11585
11586 Merge in the branch 1.29.
11587
11588 * src/reader.c (packsymbols): Use a temporary obstack for
11589 `%%tokendef', since output_stack is already used elsewhere.
11590
11591 2001-10-02 Akim Demaille <akim@epita.fr>
11592
11593 Bump 1.29d.
11594
11595 2001-10-02 Akim Demaille <akim@epita.fr>
11596
11597 Version 1.29c.
11598
11599 2001-10-02 Akim Demaille <akim@epita.fr>
11600
11601 * tests/regression.at (Invalid CPP headers): New.
11602 From Alexander Belopolsky.
11603 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
11604
11605 2001-10-02 Akim Demaille <akim@epita.fr>
11606
11607 * tests/regression.at (Invalid input): New.
11608 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
11609 Reported by Shura.
11610
11611 2001-10-02 Akim Demaille <akim@epita.fr>
11612
11613 * tests/calc.at: Now that --debug works, the tests must be adjusted.
11614
11615 2001-10-02 Akim Demaille <akim@epita.fr>
11616
11617 * src/output.c (output_parser): Assert `skeleton'.
11618 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
11619 systems.
11620 From Shura.
11621
11622 2001-10-01 Marc Autret <autret_m@epita.fr>
11623
11624 * src/lex.h: Echo modifications.
11625 * src/lex.c (unlex): Parameter is now token_t.
11626 From Hans Aberg.
11627
11628 2001-10-01 Marc Autret <autret_m@epita.fr>
11629
11630 * src/main.c: Include lex.h.
11631 From Hans Aberg.
11632
11633 2001-09-29 Akim Demaille <akim@epita.fr>
11634
11635 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
11636
11637 2001-09-28 Akim Demaille <akim@epita.fr>
11638
11639 * tests/testsuite.at: Update to newer Autotest.
11640 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
11641
11642 2001-09-27 Akim Demaille <akim@epita.fr>
11643
11644 Position independent wrapper.
11645
11646 * tests/bison: Remove.
11647 * tests/bison.in: New.
11648 * configure.in: Adjust.
11649
11650 2001-09-27 Paul Eggert <eggert@twinsun.com>
11651
11652 Port quotearg fixes from tar 1.13.24.
11653
11654 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
11655 tm to be declared.
11656 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
11657 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
11658
11659 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
11660 * m4/mbrtowc.m4: New file.
11661 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
11662 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
11663
11664 2001-09-27 Akim Demaille <akim@epita.fr>
11665
11666 Bump to 1.29c.
11667
11668 2001-09-27 Akim Demaille <akim@epita.fr>
11669
11670 Version 1.29b.
11671
11672 2001-09-25 Akim Demaille <akim@epita.fr>
11673
11674 * src/system.h: Include `xalloc.h'.
11675 Remove it from the C files.
11676 * src/files.c (output_files): Free the obstacks.
11677 * src/lex.c (init_lex): Rename as...
11678 (lex_init): this.
11679 (lex_free): New.
11680 * src/main.c (main): Use it.
11681
11682 2001-09-24 Marc Autret <autret_m@epita.fr>
11683
11684 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
11685 to output informations in fout (FILE*).
11686 (open_graph, close_graph): Likewise.
11687 (output_graph, output_edge, output_node): Likewise.
11688 * src/vcg.h: Update function prototypes.
11689 * src/print_graph.c (print_graph): Open output graph file.
11690 (print_actions): Adjust.
11691 * src/files.h: Remove extern declaration.
11692 * src/files.c: Remove graph_obstack declaration.
11693 (open_files): Remove graph_obstack initialization.
11694 (output_files): Remove graph_obstack saving.
11695
11696 2001-09-24 Marc Autret <autret_m@epita.fr>
11697
11698 * src/files.c (compute_output_file_names): Fix.
11699
11700 2001-09-24 Marc Autret <autret_m@epita.fr>,
11701 Akim Demaille <akim@epita.fr>
11702
11703 * src/reader.c (reader): Remove call to free_symtab ().
11704 * src/main.c (main): Call it here.
11705 Include symtab.h.
11706 * src/conflicts.c (initialize_conflicts): Rename as...
11707 (solve_conflicts): this.
11708 * src/print.c (print_core, print_actions, print_state)
11709 (print_grammar): Dump to a file instead a `output_obstack'.
11710 (print_results): Dump `output_obstack', and then proceed with the
11711 FILE *.
11712 * src/files.c (compute_output_file_names, close_files): New.
11713 (output_files): Adjust.
11714 * src/main.c (main): Adjust.
11715
11716 2001-09-23 Marc Autret <autret_m@epita.fr>
11717
11718 * src/files.c (compute_header_macro): Computes header macro name
11719 from spec_defines_file when given.
11720
11721 2001-09-23 Marc Autret <autret_m@epita.fr>
11722
11723 * src/files.c (output_files): Add default extensions.
11724
11725 2001-09-22 Akim Demaille <akim@epita.fr>
11726
11727 * src/conflicts.c (finalize_conflicts): Rename as...
11728 (free_conflicts): this.
11729
11730 2001-09-22 Akim Demaille <akim@epita.fr>
11731
11732 * src/gram.c (gram_free): Rename back as...
11733 (dummy): this.
11734 (output_token_translations): Free `token_translations'.
11735 * src/symtab.c (free_symtab): Free the tag field.
11736
11737 2001-09-22 Akim Demaille <akim@epita.fr>
11738
11739 Remove `translations' as it is always set to true.
11740
11741 * src/gram.h: Adjust.
11742 * src/reader.c (packsymbols, parse_token_decl): Adjust
11743 * src/print.c (print_grammar): Adjust.
11744 * src/output.c (output_token_translations): Adjust.
11745 * src/lex.c (lex): Adjust.
11746 * src/gram.c: Be sure the set pointers to NULL.
11747 (dummy): Rename as...
11748 (gram_free): this.
11749
11750 2001-09-22 Akim Demaille <akim@epita.fr>
11751
11752 * configure.in: Invoke AM_LIB_DMALLOC.
11753 * src/system.h: Use dmalloc.
11754 * src/LR0.c: Be sure to have pointers initialized to NULL.
11755 (allocate_itemsets): Allocate kernel_items only if needed.
11756
11757 2001-09-22 Akim Demaille <akim@epita.fr>
11758
11759 * configure.in: Bump to 1.29b.
11760 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
11761 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
11762 need xmalloc.c in calc.y.
11763 From Pascal Bart.
11764
11765 2001-09-21 Akim Demaille <akim@epita.fr>
11766
11767 Version 1.29a.
11768 * Makefile.maint, config/config.guess, config/config.sub,
11769 * config/missing: Update from masters.
11770 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
11771 upon package.m4.
11772 * configure.in (ALL_LINGUAS): Add `tr'.
11773
11774 2001-09-21 Akim Demaille <akim@epita.fr>
11775
11776 * tests/Makefile.am (package.m4): Move to...
11777 ($(srcdir)/$(TESTSUITE)): here.
11778
11779 2001-09-20 Akim Demaille <akim@epita.fr>
11780
11781 * src/complain.c: No longer try to be standalone: use system.h.
11782 Don't assume __STDC__ is defined to 1. Just test if it is defined.
11783 * src/complain.h: Likewise.
11784 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
11785 Remove the unused variable `n'.
11786 From Albert Chin-A-Young.
11787
11788 2001-09-18 Marc Autret <autret_m@epita.fr>
11789
11790 * doc/bison.1: Update.
11791 * doc/bison.texinfo (Bison Options): Update --defines and --graph
11792 descriptions.
11793 (Option Cross Key): Update.
11794 Add --graph.
11795
11796 2001-09-18 Marc Autret <autret_m@epita.fr>
11797
11798 * tests/regression.at: New test (comment in %union).
11799
11800 2001-09-18 Marc Autret <autret_m@epita.fr>
11801
11802 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
11803 do that.
11804 Reported by Keith Browne.
11805
11806 2001-09-18 Marc Autret <autret_m@epita.fr>
11807
11808 * tests/output.at: Add tests for --defines and --graph.
11809
11810 2001-09-18 Marc Autret <autret_m@epita.fr>
11811
11812 * tests/output.at: Removes tests of %{header,src}_extension features.
11813
11814 2001-09-18 Akim Demaille <akim@epita.fr>
11815
11816 * tests/Makefile.am (package.m4): New.
11817 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
11818 (_AT_CHECK_CALC_ERROR): Likewise.
11819 Factor the `, ' part of verbose error messages.
11820
11821 2001-09-18 Marc Autret <autret_m@epita.fr>
11822
11823 * src/getargs.c (longopts): Declare --defines and --graph as options
11824 with optional arguments.
11825 * src/files.h: Add extern declarations.
11826 * src/files.c (spec_graph_file, spec_defines_file): New.
11827 (output_files): Update.
11828 Remove CPP-outed code.
11829
11830 2001-09-18 Marc Autret <autret_m@epita.fr>
11831
11832 Turn off %{source,header}_extension feature.
11833
11834 * src/files.c (compute_exts_from_gf): Update.
11835 (compute_exts_from_src): Update.
11836 (output_files): CPP-out useless code.
11837 * src/files.h: Remove {header,source}_extension extern declarations.
11838 * src/reader.c (parse_dquoted_param): CPP-out.
11839 (parse_header_extension_decl): Remove.
11840 (parse_source_extension_decl): Remove.
11841 (read_declarations): Remove cases tok_{hdrext,srcext}.
11842 * src/lex.c (percent_table): Remove {header,source}_extension entries.
11843 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
11844
11845 2001-09-10 Akim Demaille <akim@epita.fr>
11846
11847 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
11848 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
11849 (AT_CHECK_OUTPUT): this.
11850 Merely check ls' exit status, its output is useless.
11851
11852 2001-09-10 Akim Demaille <akim@epita.fr>
11853
11854 * tests/calc.at: Use m4_match.
11855 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
11856
11857 2001-09-10 Marc Autret <autret_m@epita.fr>,
11858 Akim Demaille <akim@epita.fr>
11859
11860 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
11861 enum color_e.
11862 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
11863 to `normal'.
11864 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
11865 * src/lex.h: Adjust prototype.
11866 (token_t): Add `tok_undef'.
11867 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
11868 (parse_percent_token): Now returns token_t.
11869 Add default statement in switch.
11870 (lex): Separate `c' as an input variable, from the token_t result
11871 part.
11872 (unlexed): Is a token_t.
11873
11874 2001-09-10 Akim Demaille <akim@epita.fr>
11875
11876 * configure.in: Bump to 1.29a.
11877
11878 2001-09-07 Akim Demaille <akim@epita.fr>
11879
11880 Version 1.29.
11881
11882 2001-08-30 Akim Demaille <akim@epita.fr>
11883
11884 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
11885 * m4/atconfig.m4: Remove.
11886 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
11887 * tests/bison: New.
11888 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
11889 m4_if, m4_patsubst, and m4_regexp.
11890 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
11891 `input' file instead of echo.
11892
11893 2001-08-29 Akim Demaille <akim@epita.fr>
11894
11895 Bump to 1.28e.
11896
11897 2001-08-29 Akim Demaille <akim@epita.fr>
11898
11899 Version 1.28d.
11900
11901 2001-08-29 Paul Eggert <eggert@twinsun.com>
11902
11903 * src/bison.simple (yyparse): Don't take the address of an
11904 item before the start of an array, as that doesn't conform to
11905 the C Standard.
11906
11907 2001-08-29 Robert Anisko <anisko_r@epita.fr>
11908
11909 * doc/bison.texinfo (Location Tracking Calc): New node.
11910
11911 2001-08-29 Paul Eggert <eggert@twinsun.com>
11912
11913 * src/output.c (output): Do not define const, as this now
11914 causes more problems than it cures.
11915
11916 2001-08-29 Akim Demaille <akim@epita.fr>
11917
11918 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
11919 the nodes.
11920 Be sure to tag the `detailmenu'.
11921
11922 2001-08-29 Akim Demaille <akim@epita.fr>
11923
11924 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
11925 download in a tmp dir.
11926
11927 2001-08-28 Marc Autret <autret_m@epita.fr>
11928
11929 * config/depcomp: New file.
11930
11931 2001-08-28 Marc Autret <autret_m@epita.fr>
11932
11933 * doc/bison.1 (mandoc): Adjust.
11934 From Juan Manuel Guerrero.
11935
11936 2001-08-28 Marc Autret <autret_m@epita.fr>
11937
11938 * src/print_graph.c (print_state): Fix.
11939
11940 2001-08-27 Marc Autret <autret_m@epita.fr>
11941
11942 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
11943 char * members.
11944 Echo modifications to the functions prototypes.
11945 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
11946
11947 2001-08-27 Marc Autret <autret_m@epita.fr>
11948
11949 * src/vcg.c: Include `xalloc.h'.
11950 (add_colorentry): New.
11951 (add_classname): New.
11952 (add_infoname): New.
11953 * src/vcg.h: Add new prototypes.
11954
11955 2001-08-27 Akim Demaille <akim@epita.fr>
11956
11957 * Makefile.maint: Sync. again with CVS Autoconf.
11958
11959 2001-08-27 Akim Demaille <akim@epita.fr>
11960
11961 * Makefile.maint: Formatting changes.
11962 (po-update, cvs-update, update): New targets.
11963 (AMTAR): Remove.
11964
11965 2001-08-27 Akim Demaille <akim@epita.fr>
11966
11967 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
11968 * Makefile.maint: Sync. with CVS Autoconf.
11969
11970 2001-08-27 Marc Autret <autret_m@epita.fr>
11971
11972 * src/vcg.h (struct infoname_s): New.
11973 (struct colorentry_s): New.
11974 (graph_s): New fields {vertical,horizontal}_order in structure.
11975 Add `infoname' field.
11976 Add `colorentry' field;
11977 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
11978 (G_HORIZONTAL_ORDER): New.
11979 (G_INFONAME): New.
11980 (G_COLORENTRY): New.
11981 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
11982 Add output of `infoname'.
11983 Add output of `colorentry'.
11984
11985 2001-08-27 Marc Autret <autret_m@epita.fr>
11986
11987 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
11988 This one shadowed a global parameter.
11989
11990 2001-08-24 Marc Autret <autret_m@epita.fr>
11991
11992 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
11993 instead of `unsigned'.
11994 (print_state): Do not call obstack_object_size () in obstack_grow ()
11995 to avoid macro variables shadowing.
11996
11997 2001-08-23 Marc Autret <autret_m@epita.fr>
11998
11999 * src/lex.c (percent_table): Typo: s/naem/name/.
12000 Add graph option.
12001 Normalize new options declarations.
12002
12003 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
12004
12005 * tests/suite.at: Exercise %header_extension and %source_extension.
12006
12007 2001-08-16 Marc Autret <autret_m@epita.fr>
12008
12009 * src/reader.c (parse_dquoted_param): New.
12010 (parse_header_extension_decl): Use it.
12011 (parse_source_extension_decl): Likewise.
12012
12013 2001-08-16 Marc Autret <autret_m@epita.fr>
12014
12015 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
12016 (get_xxxx_str): Use assert () instead of complain ().
12017 Remove return invokations in default cases.
12018 (get_decision_str): Modify default behaviour. Remove second argument.
12019 Echo modifications on calls.
12020 (output_graph): Fix.
12021
12022 2001-08-16 Marc Autret <autret_m@epita.fr>
12023
12024 * src/getargs.c (usage): Update with ``-g, --graph''.
12025
12026 2001-08-16 Marc Autret <autret_m@epita.fr>
12027
12028 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
12029 (Option Cross Key): Likewise.
12030 * doc/bison.1: Update.
12031
12032 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
12033
12034 * src/output.c (output_master_parser): Don't finish action_obstack.
12035 (output_parser): Don't care about the muscle action, here.
12036 (prepare): Copy the action_obstack in the action muscle.
12037 (output): Free action_obstack.
12038
12039 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
12040
12041 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
12042 will contain `%union' declaration.
12043 (parse_union_decl): Delete #line directive output.
12044 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
12045 informations about %union.
12046 (parse_union_decl): Copy the union_obstack in the muscle stype.
12047 * src/bison.simple: Add new #line directive.
12048 Add typdef %%stype YYSTYPE.
12049
12050 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
12051
12052 * src/bison.simple: Add new `#line' directive.
12053
12054 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
12055
12056 * src/bison.simple: New `#line' directive.
12057 * src/output.c (output_parser): Support new dynamic muscle input_line.
12058
12059 2001-09-22 Marc Autret <autret_m@epita.fr>
12060
12061 * src/output.c (output_master_parser): New.
12062 (output_parser): Be more re-entrant.
12063
12064 2001-09-21 Marc Autret <autret_m@epita.fr>
12065
12066 * src/reader.c (copy_definition, parse_union_decl): Update and use
12067 `linef' muscle.
12068 (copy_action): Likewise.
12069 Use obstack_1grow ().
12070 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
12071
12072 2001-09-21 Marc Autret <autret_m@epita.fr>
12073
12074 * src/options.c (option_table): Adjust.
12075 * src/lex.c (parse_percent_token): Fix.
12076
12077 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
12078
12079 * src/options.c (symtab.h): Include it, need by lex.h.
12080
12081 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
12082
12083 * src/lex.c (parse_percent_token): Change type of variable `tx', which
12084 is now an option_table_struct*.
12085 (option_strcmp): New function option_strcmp.
12086 (parse_percent_token): Call option_strcmp.
12087 * src/getargs.c (xalloc.h, options.h): Include it.
12088 (getargs): Call create_long_option_table.
12089 (getargs): Free longopts at the end of the function.
12090 (shortopts): Move in options.c.
12091 * src/options.c (create_long_option_table): New function. Convert
12092 information from option_table to option structure.
12093 * src/reader.c (options.h): Include it.
12094
12095 * src/Makefile.am: Adjust.
12096 * src/options.c (option_table): Create from longopts and percent_table.
12097 * src/getargs.c (longopts): Delete.
12098 * src/lex.c (struct percent_table_struct): Delete.
12099 (percent_table): Delete.
12100 (options.h): Include it.
12101 * src/options.c: Create.
12102 * src/options.h: Create.
12103 Declare enum opt_access_e.
12104 Define struct option_table_struct.
12105
12106 2001-09-20 Marc Autret <autret_m@epita.fr>
12107
12108 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
12109 sections of Bison.
12110
12111 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
12112
12113 * src/bison.simple: s/%%filename/%%skeleton.
12114 * src/muscle_tab.c (getargs.h): Include it.
12115 (muscle_init): Insert new muscle skeleton.
12116
12117 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
12118
12119 * src/output.c (output_parser): Delete unused variable actions_dumped.
12120
12121 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
12122
12123 * src/output.c (output): Delete call to reader_output_yylsp.
12124 * src/reader.c (reader): Likewise.
12125 * src/reader.h: Delete declaration of reader_output_yylsp.
12126
12127 2001-09-02 Marc Autret <autret_m@epita.fr>
12128
12129 * src/reader.c: Include muscle_tab.h.
12130 (parse_union_decl): Update.
12131 (parse_macro_decl): Rename parse_muscle_decl.
12132 Update to use renamed functions and variable.
12133 (read_declarations, copy_action, read_additionnal_code, : Updated
12134 with correct variables and functions names.
12135 (packsymbols, reader): Likewise.
12136
12137 * src/reader.h (muscle_obstack): Extern declaration update.
12138
12139 * src/output.c: Include muscle_tab.h
12140 In all functions using macro_insert, change by using muscle_insert ().
12141 (macro_obstack): Rename muscle_obstack.
12142 Echo modifications in the whole file.
12143 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
12144 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
12145 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
12146
12147 * src/muscle_tab.h: Update double inclusion macros.
12148 (macro_entry_s): Rename muscle_entry_s.
12149 Update prototypes.
12150
12151 * src/muscle_tab.c: Include muscle_tab.h.
12152 Rename macro_tabble to muscle_table.
12153 (mhash1, mhash2, mcmp): Use muscle_entry.
12154 (macro_init): Rename muscle_init. Update.
12155 (macro_insert): Rename muscle_insert. Update.
12156 (macro_find): Rename muscle_find. Update.
12157
12158 * src/main.c: Include muscle_tab.h.
12159 (main): Call muscle_init ().
12160 * src/Makefile.am (bison_SOURCES): Echo modifications.
12161
12162 2001-09-02 Marc Autret <autret_m@epita.fr>
12163
12164 Now the files macro_tab.[ch] are named muscle_tab.[ch].
12165
12166 * src/muscle_tab.c, src/muscle_tab.h: Add files.
12167
12168 2001-09-02 Marc Autret <autret_m@epita.fr>
12169
12170 * src/macrotab.c, src/macrotab.h: Remove.
12171
12172 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
12173
12174 * src/reader.c (copy_guard): Use muscle to specify the `#line'
12175 filename.
12176
12177 2001-09-01 Marc Autret <autret_m@epita.fr>
12178
12179 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
12180 to an explicit value to activate the feature. We do it here.
12181
12182 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
12183
12184 * src/output.c (prepare): Delete the `filename' muscule insertion.
12185 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
12186 (parse_union_decl): Likewise.
12187 * src/macrotab.c (macro_init): Initialize filename by infile.
12188
12189 2001-08-31 Marc Autret <autret_m@epita.fr>
12190
12191 * src/bison.simple (YYLSP_NEEDED): New definition.
12192 * src/output.c (prepare): Add macro insertion of `locations_flag'
12193
12194 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
12195
12196 * src/output.c (prepare): Delete insertion of previous muscles,
12197 and insert the `prefix' muscles.
12198 * src/macrotab.c (macro_init): Likewise.
12199 (macro_init): Initialization prefix directive by `yy'.
12200 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
12201 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
12202 yylval, yydebug, yyerror, yynerrs and yyparse.
12203 New directive `#define' to substitute yydebug, ... with option
12204 name_prefix.
12205
12206 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
12207
12208 * src/main.c (main): Standardize.
12209 * src/output.c (output_table_data, output_parser): Likewise.
12210 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
12211
12212 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
12213
12214 * src/reader.c (read_additionnal_code): Rename %%user_code to
12215 %%epilogue.
12216 * src/output.c (output): Rename %%declarations to %%prologue.
12217 * src/bison.simple: Echo modifications.
12218
12219 2001-08-31 Marc Autret <autret_m@epita.fr>
12220
12221 * src/reader.c (readgram): CleanUp.
12222 (output_token_defines): Likewise.
12223 (packsymbols): Likewise.
12224 (reader): Likewise.
12225 * src/output.c (output): CPP-out useless code.
12226
12227 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
12228
12229 * src/reader.c (reader): Delete obsolete call to function
12230 output_trailers and output_headers.
12231 * src/output.h: Remove obsolete functions prototypes of output_headers
12232 and output_trailers.
12233
12234 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
12235
12236 * src/main.c: Include macrotab.h.
12237 * src/macrotab.h (macro_entry_s): Constify fields.
12238 Adjust functions prototypes.
12239 * src/macrotab.c (macro_insert): Constify key and value.
12240 (macro_find): Constify key.
12241 (macro_insert): Include 'xalloc.h'
12242 (macro_insert): Use XMALLOC.
12243 (macro_find): Constify return value.
12244 * src/output.c (output_table_data): Rename table to table_data.
12245 (output_parser): Constify macro_key, macro_value.
12246
12247 2001-08-30 Marc Autret <autret_m@epita.fr>
12248
12249 * src/reader.c (parse_skel_decl): New.
12250 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
12251 * src/lex.h (token_t): New token `tok_skel'.
12252 * src/lex.c (percent_table): Add skeleton option entry.
12253 Standardize.
12254
12255 2001-08-29 Marc Autret <autret_m@epita.fr>
12256
12257 * src/bison.simple: Add %%user_code directive at the end.
12258 * src/reader.c (read_additionnal_code): New.
12259 (reader): Use it.
12260 * src/output.c (output_program): Remove.
12261 (output): Update.
12262
12263 2001-08-28 Marc Autret <autret_m@epita.fr>
12264
12265 * src/output.c (output_actions): Clean up.
12266 (output_gram): CPP-out useless code.
12267 * src/reader.c (reader): Clean up, CPP-out useless code.
12268
12269 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
12270
12271 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
12272 directive.
12273 * src/bison.simple: Add `%%definitions'.
12274
12275 2001-08-28 Marc Autret <autret_m@epita.fr>
12276
12277 * config/depcomp: New file.
12278
12279 2001-08-27 Paul Eggert <eggert@twinsun.com>
12280
12281 * src/bison.simple (yyparse): Don't take the address of an
12282 item before the start of an array, as that doesn't conform to
12283 the C Standard.
12284
12285 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
12286
12287 * src/output.c (output): Remove the initialization of the macro
12288 obstack. It was done too late here.
12289
12290 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
12291 completely wrong.
12292 (reader): Initialize the macro obstack here, since we need it to grow
12293 '%define' directives.
12294
12295 * src/reader.h: Declare the macro obstack as extern.
12296
12297 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
12298
12299 * src/output.c (output_parser): Fix. Store single '%' characters in
12300 the output obstack instead of throwing them away.
12301
12302 2001-08-27 Akim Demaille <akim@epita.fr>
12303
12304 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
12305
12306 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
12307
12308 * lib/Makefile.am: Adjust.
12309
12310 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
12311
12312 * src/bison.simple: Update and add '%%' directives.
12313
12314 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
12315
12316 * src/reader.c (reader): Remove calls to 'output_headers' and
12317 'output_trailers'. Remove some C output.
12318 (readgram): Disable a piece of code that was writing a default
12319 definition for 'YYSTYPE'.
12320 (reader_output_yylsp): Remove.
12321 (packsymbols): Output token defintions to a macro.
12322 (copy_definition): Disable C output.
12323
12324 * src/reader.c (parse_macro_decl): New function used to parse macro
12325 declarations.
12326 (copy_string2): Put the body of copy_string into this new function.
12327 Add a parameter to let the caller choose whether he wants to copy the
12328 string delimiters or not.
12329 (copy_string): Be a simple call to copy_string2 with the last argument
12330 bound to true.
12331 (read_declarations): Add case for macro definition.
12332 (copy_identifier): New.
12333 (parse_macro_decl): Read macro identifiers using copy_identifier
12334 rather than lex.
12335
12336 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
12337
12338 * src/output.c (prepare): Add prefixed names.
12339 (output_parser): Output semantic actions.
12340 (output_parser): Fix bug on '%%line' directives.
12341
12342 * src/output.c (output_headers): Remove. The C code printed by this
12343 function should now be in the skeletons.
12344 (output_trailers): Remove.
12345 (output): Disable call to 'reader_output_yylsp'.
12346 (output_rule_data): Do not output tables to the table obstack.
12347
12348 * src/output.c: Remove some C dedicated output.
12349 Improve the use of macro and output obstacks.
12350 (output_defines): Remove.
12351
12352 * src/output.c (output_token_translations): Associate 'translate'
12353 table with a macro. No output to the table obstack.
12354 (output_gram): Same for 'rhs' and 'prhs'.
12355 (output_stos): Same for 'stos'.
12356 (output_rule_data): Same for 'r1' and 'r2'.
12357 (token_actions): Same for 'defact'.
12358 (goto_actions): Same for 'defgoto'.
12359 (output_base): Same for 'pact' and 'pgoto'.
12360 (output_table): Same for 'table'.
12361 (output_check): Same for 'check'.
12362
12363 * src/output.c (output_table_data): New function.
12364 (output_short_table): Remove.
12365 (output_short_or_char_table): Remove.
12366
12367 * src/output.c (output_parser): Replace most of the skeleton copy code
12368 with something new. Skeletons are now processed character by character
12369 rather than line by line, and Bison looks for '%%' macros. This is the
12370 first step in making Bison's output process (a lot) more flexible.
12371 (output_parser): Use the macro table.
12372
12373 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
12374
12375 * src/main.c (main): Initialize the macro table.
12376
12377 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
12378
12379 * src/lex.c (percent_table): Add tok_define.
12380 * src/lex.h: Add tok_define.
12381
12382 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
12383
12384 * src/macrotab.c: New file.
12385 * src/macrotab.h: New file.
12386 * src/Makefile.am: Update.
12387
12388 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
12389
12390 * lib/hash.c: New file.
12391 * lib/hash.h: New file.
12392 * lib/Makefile.am: Update.
12393
12394 2001-08-15 Akim Demaille <akim@epita.fr>
12395
12396 Version 1.28c.
12397
12398 2001-08-15 Marc Autret <autret_m@epita.fr>
12399
12400 * src/reader.c (readgram): Indent output macro YYSTYPE.
12401 (packsymbols): Likewise.
12402 (output_token_defines): Likewise.
12403 * src/files.c: Standardize.
12404 (compute_header_macro): New.
12405 (defines_obstack_save): New. Use compute_header_macro.
12406 (output_files): Update. Use defines_obstack_save.
12407
12408 2001-08-15 Akim Demaille <akim@epita.fr>
12409
12410 * doc/bison.texinfo (Table of Symbols): Document
12411 YYSTACK_USE_ALLOCA.
12412
12413 2001-08-15 Akim Demaille <akim@epita.fr>
12414
12415 * missing: Update from CVS Automake.
12416 * config/config.guess, config/config.sub, config/texinfo.tex:
12417 Update from gnu.org.
12418
12419 2001-08-15 Akim Demaille <akim@epita.fr>
12420
12421 * Makefile.maint: Sync with CVS Autoconf.
12422
12423 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
12424
12425 * doc/bison.texinfo: Include GNU Free Documentation License from
12426 `fdl.texi'.
12427 * doc/fdl.texi: Add to package.
12428
12429 2001-08-14 Marc Autret <autret_m@epita.fr>
12430
12431 Turn on %{source,header}_extension features.
12432
12433 * src/lex.c (percent_table): Un-CPP out header_extension and
12434 source_extension.
12435 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
12436 (compute_exts_from_src): Remove conditions. It restores priorities
12437 between options.
12438
12439 2001-08-14 Marc Autret <autret_m@epita.fr>
12440
12441 * src/files.c (compute_base_names): Add extensions computing when
12442 `--file-prefix' used.
12443 Standardize function calls.
12444
12445 2001-08-13 Marc Autret <autret_m@epita.fr>
12446
12447 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
12448 defining it (defined but null disables alloca).
12449
12450 2001-08-13 Marc Autret <autret_m@epita.fr>
12451
12452 * src/bison.simple (_yy_memcpy): CPP reformat.
12453
12454 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
12455
12456 * tests/atconfig.in (CPPFLAGS): Fix.
12457
12458 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
12459
12460 * doc/bison.texinfo: Include GNU General Public License from
12461 `gpl.texi'.
12462 * doc/gpl.texi: Add to package.
12463
12464 2001-08-10 Marc Autret <autret_m@epita.fr>
12465
12466 * src/print_graph.h: Fix.
12467 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
12468
12469 2001-08-10 Akim Demaille <akim@epita.fr>
12470
12471 * src/system.h: Provide default declarations for stpcpy, strndup,
12472 and strnlen.
12473
12474 2001-08-10 Robert Anisko <anisko_r@epita.fr>
12475
12476 * doc/bison.texinfo (Locations): Update @$ stuff.
12477
12478 2001-08-09 Robert Anisko <anisko_r@epita.fr>
12479
12480 * src/bison.simple (YYLLOC_DEFAULT): Update.
12481 (yyparse): Adjust.
12482
12483 2001-08-08 Marc Autret <autret_m@epita.fr>
12484
12485 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
12486 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
12487 Reported by Fabrice Bauzac.
12488
12489 2001-08-08 Marc Autret <autret_m@epita.fr>
12490
12491 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
12492 * src/vcg.c (output_node): Fix.
12493 * src/vcg.h: Cleanup.
12494 * src/print_graph.c: Add comments.
12495 (node_output_size): New global variable. Simplify the formatting of
12496 the VCG graph output.
12497 (print_actions): Unused code is now used. It notifies the final state
12498 and no action states in the VCG graph. It also give the reduce actions.
12499 The `shift and goto' edges are red and the `go to state' edges are
12500 blue.
12501 Get the current node name and node_obstack by argument.
12502 (node_obstack): New variable.
12503 (print_state): Manage node_obstack.
12504 (print_core): Use node_obstack given by argument.
12505 A node is not only computed here but in print_actions also.
12506 (print_graph): CPP out useless code instead of commenting it.
12507
12508 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
12509
12510 * tests/atconfig.in (CPPFLAGS): Fix.
12511
12512 2001-08-07 Akim Demaille <akim@epita.fr>
12513
12514 * src/print_graph.c (quote): New.
12515 (print_core): Use it.
12516
12517 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
12518
12519 * src/vcg.c (complain.h): Include it.
12520 Unepitaize `return' invocations.
12521 [NDEBUG] (main): Remove.
12522 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
12523 * src/files.c (open_files): Initialize graph_obstack.
12524 * src/print_graph.c (print_actions): CPP out useless code.
12525 (print_core): Don't output the last `\n' in labels.
12526 Use `quote'.
12527 * src/files.c (output_files): Output the VCG file.
12528 * src/main.c (main): Invoke print_graph ();
12529
12530 2001-08-06 Marc Autret <autret_m@epita.fr>
12531
12532 Automaton VCG graph output.
12533 Using option ``-g'' or long option ``--graph'', you can generate
12534 a gram_filename.vcg file containing a VCG description of the LALR (1)
12535 automaton of your grammar.
12536
12537 * src/main.c: Call to print_graph() function.
12538 * src/getargs.h: Update.
12539 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
12540 (graph_flag): New flag.
12541 (longopts): Update.
12542 (getargs): Add case `g'.
12543 * src/files.c (graph_obstack): New obstack struct.
12544 (open_files): Initialize new obstack.
12545 (output_files): Saves graph_obstack if required.
12546 * src/files.h (graph_obstack): New extern declaration.
12547 * src/Makefile.am: Add new source files.
12548
12549 2001-08-06 Marc Autret <autret_m@epita.fr>
12550
12551 * src/print_graph.c, src/print_graph.h (graph): New.
12552 * src/vcg.h: New file.
12553 * src/vcg.c: New file, VCG graph handling.
12554
12555 2001-08-06 Marc Autret <autret_m@epita.fr>
12556
12557 Add of %source_extension and %header_extension which specify
12558 the source or/and the header output file extension.
12559
12560 * src/files.c (compute_base_names): Remove initialisation of
12561 src_extension and header_extension.
12562 (compute_exts_from_gf): Update.
12563 (compute_exts_from_src): Update.
12564 (output_files): Update.
12565 * src/reader.c (parse_header_extension_decl): New.
12566 (parse_source_extension_decl): New.
12567 (read_declarations): New case statements for the new tokens.
12568 * src/lex.c (percent_table): Add entries for %source_extension
12569 and %header_extension.
12570 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
12571
12572 2001-08-06 Marc Autret <autret_m@epita.fr>
12573
12574 * configure.in: Bump to 1.28c.
12575 * doc/bison.texinfo: Texinfo thingies.
12576
12577 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
12578
12579 * tests/atconfig.in (CPPFLAGS): Add.
12580 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
12581
12582 2001-08-03 Akim Demaille <akim@epita.fr>
12583
12584 Version 1.28b.
12585
12586 2001-08-03 Akim Demaille <akim@epita.fr>
12587
12588 * tests/Makefile.am (check-local): Ship testsuite.
12589 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
12590 Include `string.h'.
12591
12592 2001-08-03 Akim Demaille <akim@epita.fr>
12593
12594 * configure.in: Try using -Wformat when compiling.
12595
12596 2001-08-03 Akim Demaille <akim@epita.fr>
12597
12598 * configure.in: Bump to 1.28b.
12599
12600 2001-08-03 Akim Demaille <akim@epita.fr>
12601
12602 * src/complain.c: Adjust strerror_r portability issues.
12603
12604 2001-08-03 Akim Demaille <akim@epita.fr>
12605
12606 Version 1.28a.
12607
12608 2001-08-03 Akim Demaille <akim@epita.fr>
12609
12610 * src/getargs.c, src/getarg.h (skeleton)): Constify.
12611 * src/lex.c (literalchar): Avoid name clashes on `buf'.
12612 * src/getargs.c: Include complain.h.
12613 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
12614 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
12615
12616 2001-08-03 Akim Demaille <akim@epita.fr>
12617
12618 * src/reader.c (readgram): Display hidden chars in error messages.
12619
12620 2001-08-03 Akim Demaille <akim@epita.fr>
12621
12622 Update to gettext 0.10.39.
12623
12624 2001-08-03 Akim Demaille <akim@epita.fr>
12625
12626 * lib/strspn.c: New.
12627
12628 2001-08-01 Marc Autret <autret_m@epita.fr>
12629
12630 * doc/bison.texinfo: Update.
12631 * doc/bison.1 (mandoc): Update.
12632 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
12633 * src/files.c: Support output files extensions computing.
12634 (src_extension): New static variable.
12635 (header_extension): New static variable.
12636 (tr): New function.
12637 (get_extension_index): New function, gets the index of an extension
12638 filename in a string.
12639 (compute_exts_from_gf): New function, computes extensions from the
12640 grammar file extension.
12641 (compute_exts_from_src): New functions, computes extensions from the
12642 C source file extension, file given by ``-o'' option.
12643 (compute_base_names): Update.
12644 (output_files): Update.
12645
12646 2001-08-01 Robert Anisko <anisko_r@epita.fr>
12647
12648 * doc/bison.texi: Document @$.
12649 (Locations): New section.
12650
12651 2001-07-18 Akim Demaille <akim@epita.fr>
12652
12653 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
12654 * config/prev-version.txt, config/move-if-change: New.
12655 * Makefile.am: Adjust.
12656
12657 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
12658
12659 * src/bison.simple (yyparse): Suppress warning `comparaison
12660 between signed and unsigned'.
12661
12662 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
12663
12664 * src/getargs.h (raw_flag): Remove.
12665 * src/getargs.c: Die on `-r'/`--raw'.
12666 * src/lex.c (parse_percent_token): Die on `%raw'.
12667 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
12668 * tests/calc.at: Suppress test with option `--raw'.
12669
12670 2001-07-14 Akim Demaille <akim@epita.fr>
12671
12672 * config/: New.
12673 * configure.in: Require Autoconf 2.50.
12674 Update to gettext 0.10.38.
12675
12676 2001-03-16 Akim Demaille <akim@epita.fr>
12677
12678 * doc/bison.texinfo: ANSIfy the examples.
12679
12680 2001-03-16 Akim Demaille <akim@epita.fr>
12681
12682 * getargs.c (skeleton): New variable.
12683 (longopts): --skeleton is a new option.
12684 (shortopts, getargs): -S is a new option.
12685 * getargs.h: Declare skeleton.
12686 * output.c (output_parser): Use it.
12687
12688 2001-03-16 Akim Demaille <akim@epita.fr>
12689
12690 * m4/strerror_r.m4: New.
12691 * m4/error.m4: Run AC_FUNC_STRERROR_R.
12692 * lib/error.h, lib/error.c: Update.
12693
12694 2001-03-16 Akim Demaille <akim@epita.fr>
12695
12696 * src/getargs.c (longopts): Clean up.
12697
12698 2001-02-21 Akim Demaille <akim@epita.fr>
12699
12700 * src/reader.c (gensym): `gensym_count' is your own.
12701 Use a static buf to create the symbol name, as token_buffer is no
12702 longer a buffer.
12703
12704 2001-02-08 Akim Demaille <akim@epita.fr>
12705
12706 * src/conflicts.c (conflict_report): Be sure not to append to res
12707 between two calls, which could happen if both first sprintf were
12708 skipped, but not the first cp += strlen.
12709
12710 2001-02-08 Akim Demaille <akim@epita.fr>
12711
12712 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
12713 New, from fileutils 4.0.37.
12714 * configure.in: Require Autoconf 2.49c. I took some time before
12715 making this decision. This is the only way out for portability
12716 issues in Bison, it would mean way too much duplicate effort to
12717 import in Bison features implemented in 2.49c since 2.13.
12718 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
12719
12720 2001-02-02 Akim Demaille <akim@epita.fr>
12721
12722 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
12723 * lib/xalloc.h, lib/xmalloc.c: Update.
12724
12725 2001-01-19 Akim Demaille <akim@epita.fr>
12726
12727 Get rid of the ad hoc handling of token_buffer in the scanner: use
12728 the obstacks.
12729
12730 * src/lex.c (token_obstack): New.
12731 (init_lex): Initialize it. No longer call...
12732 (grow_token_buffer): this. Remove it.
12733 Adjust all the places which used it to use the obstack.
12734
12735 2001-01-19 Akim Demaille <akim@epita.fr>
12736
12737 * src/lex.h: Rename all the tokens:
12738 s/\bENDFILE\b/tok_eof/g;
12739 s/\bIDENTIFIER\b/tok_identifier/g;
12740 etc.
12741 Let them be enums, not #define, to ease debugging.
12742 Adjust all the code.
12743
12744 2001-01-18 Akim Demaille <akim@epita.fr>
12745
12746 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
12747 * src/lex.c (maxtoken, grow_token_buffer): Static.
12748
12749 2001-01-18 Akim Demaille <akim@epita.fr>
12750
12751 Since we now use obstacks, more % directives can be enabled.
12752
12753 * src/lex.c (percent_table): Also accept `%yacc',
12754 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
12755 `%debug'.
12756 Handle the actions for `%semantic_parser' and `%pure_parser' here,
12757 instead of returning a token.
12758 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
12759 * src/reader.c (read_declarations): Adjust.
12760 * src/files.c (open_files): Don't call `compute_base_names', don't
12761 compute `attrsfile' since they depend upon data which might be
12762 *in* the input file now.
12763 (output_files): Do it here.
12764 * src/output.c (output_headers): Document the fact that this patch
12765 introduces a guaranteed SEGV for semantic parsers.
12766 * doc/bison.texinfo: Document them.
12767 * tests/suite.at: Exercise these %options.
12768
12769 2000-12-20 Akim Demaille <akim@epita.fr>
12770
12771 Also handle the output file (--verbose) with obstacks.
12772
12773 * files.c (foutput): Remove.
12774 (output_obstack): New.
12775 Adjust all dependencies.
12776 * src/conflicts.c: Return a string.
12777 * src/system.h (obstack_grow_string): Rename as...
12778 (obstack_sgrow): this. Be ready to work with non literals.
12779 (obstack_fgrow4): New.
12780
12781 2000-12-20 Akim Demaille <akim@epita.fr>
12782
12783 * src/files.c (open_files): Fix the computation of short_base_name
12784 in the case of `-o foo.tab.c'.
12785
12786 2000-12-20 Akim Demaille <akim@epita.fr>
12787
12788 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
12789 (copy_dollar): Now that everything uses obstacks, get rid of the
12790 FILE * parameters.
12791
12792 2000-12-20 Akim Demaille <akim@epita.fr>
12793
12794 * src/files.c (open_files): Actually the `.output' file is based
12795 on the short_base_name, not base_name.
12796 * tests/suite.at (Checking output file names): Adjust.
12797
12798 2000-12-20 Akim Demaille <akim@epita.fr>
12799
12800 * src/bison.s1: Remove, we now use directly...
12801 * src/bison.simple: this.
12802 * src/Makefile.am: Use pkgdata instead of data.
12803
12804 2000-12-20 Akim Demaille <akim@epita.fr>
12805
12806 * src/files.c (guard_obstack): New.
12807 (open_files): Initialize it.
12808 (output_files): Dump it...
12809 * src/files.h: Export it.
12810 * src/reader.c (copy_guard): Use it.
12811
12812 2000-12-19 Akim Demaille <akim@epita.fr>
12813
12814 * src/files.c (outfile, defsfile, actfile): Removed as global
12815 vars.
12816 (open_files): Don't compute them.
12817 (output_files): Adjust.
12818 (base_name, short_base_name): Be global.
12819 Adjust dependencies.
12820
12821 2000-12-19 Akim Demaille <akim@epita.fr>
12822
12823 * src/files.c (strsuffix): New.
12824 (stringappend): Be just like strcat but allocate.
12825 (base_names): Eve out from open_files.
12826 Try to simplify the rather hairy computation of base_name and
12827 short_base_name.
12828 (open_files): Use it.
12829 * tests/suite.at (Checking output file names): New test.
12830
12831 2000-12-19 Akim Demaille <akim@epita.fr>
12832
12833 * src/system.h (obstack_grow_literal_string): Rename as...
12834 (obstack_grow_string): this.
12835 * src/output.c (output_parser): Recognize `%% actions' instead of
12836 `$'.
12837 * src/bison.s1: s/$/%% actions/.
12838 * src/bison.hairy: Likewise.
12839
12840 2000-12-19 Akim Demaille <akim@epita.fr>
12841
12842 * src/output.c (output_parser): Compute the `#line' lines when
12843 there are.
12844 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
12845 Suggested by Hans Aberg.
12846
12847 2000-12-19 Akim Demaille <akim@epita.fr>
12848
12849 Let the handling of the skeleton files be local to the procedures
12850 that use it.
12851
12852 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
12853 longer static.
12854 (fparser, open_extra_files): Remove.
12855 (open_files, output_files): Don't take care of fparser.
12856 * src/files.h: Adjust.
12857 * src/output.c (output_parser): Open and close the file to the
12858 skeleton.
12859 * src/reader.c (read_declarations): When %semantic_parser, open
12860 fguard.
12861
12862 2000-12-19 Akim Demaille <akim@epita.fr>
12863
12864 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
12865 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
12866
12867 2000-12-19 Akim Demaille <akim@epita.fr>
12868
12869 * src/files.c (open_files): Yipee! We no longer need all the code
12870 looking for `/tmp' since we have no tmp file.
12871
12872 2000-12-19 Akim Demaille <akim@epita.fr>
12873
12874 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
12875 New macros.
12876 * src/files.c (open_files): Less dependency on MSDOS etc.
12877
12878 2000-12-14 Akim Demaille <akim@epita.fr>
12879
12880 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
12881 Provide a default definition.
12882 Use it when executing the default @ action.
12883 * src/reader.c (reader_output_yylsp): No longer include
12884 `timestamp' and `text' in the default YYLTYPE.
12885
12886 2000-12-12 Akim Demaille <akim@epita.fr>
12887
12888 * src/reader.c (copy_definition, parse_union_decl, copy_action)
12889 (copy_guard): Quote the file names.
12890 Reported by Laurent Mascherpa.
12891
12892 2000-12-12 Akim Demaille <akim@epita.fr>
12893
12894 * src/output.c (output_headers, output_program, output): Be sure
12895 to escape special characters when outputting filenames.
12896 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
12897 (output_headers): Don't depend on them, Use ACTSTR.
12898
12899 2000-11-17 Akim Demaille <akim@epita.fr>
12900
12901 * lib/obstack.h: Formatting changes.
12902 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
12903 prevents type checking.
12904 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
12905 cast the value to (void *): assigning a `foo *' to a `void *'
12906 variable is valid.
12907 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
12908 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
12909 append characters.
12910
12911 2000-11-17 Akim Demaille <akim@epita.fr>
12912
12913 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
12914 as...
12915 (suite.m4, regression.m4, calc.m4): these.
12916 * tests/atgeneral.m4: Update from CVS Autoconf.
12917
12918 2000-11-17 Akim Demaille <akim@epita.fr>
12919
12920 * tests/regression.m4 (%union and --defines): New test,
12921 demonstrating a current bug in the obstack implementation.
12922
12923 2000-11-17 Akim Demaille <akim@epita.fr>
12924
12925 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
12926 macros.
12927 Use them to declare the variables which are global or local to
12928 `yyparse'.
12929
12930 2000-11-17 Akim Demaille <akim@epita.fr>
12931
12932 * acconfig.h: Remove, no longer used.
12933
12934 2000-11-07 Akim Demaille <akim@epita.fr>
12935
12936 * src: s/Copyright (C)/Copyright/g.
12937
12938 2000-11-07 Akim Demaille <akim@epita.fr>
12939
12940 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
12941 defining.
12942 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
12943
12944 2000-11-07 Akim Demaille <akim@epita.fr>
12945
12946 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
12947 Merge in a single CPP if/else.
12948
12949 2000-11-07 Akim Demaille <akim@epita.fr>
12950
12951 * src/output.c (output): Remove useless variables.
12952 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
12953 argument `data' for consistency with the prototypes.
12954 Qualify it `const'.
12955 (obstack_copy, obstack_copy0): Rename the second argument as
12956 `address' for consistency. Qualify it `const'.
12957 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
12958 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
12959 `const' their input argument (`data' or `address').
12960 Adjust the corresponding macros to include `const' in casts.
12961
12962 2000-11-03 Akim Demaille <akim@epita.fr>
12963
12964 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
12965 s/PFILE1/BISON_HAIRY/.
12966 Adjust dependencies.
12967
12968 2000-11-03 Akim Demaille <akim@epita.fr>
12969
12970 For some reason, this was not applied.
12971
12972 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
12973 `unlink': it's no longer used.
12974
12975 2000-11-03 Akim Demaille <akim@epita.fr>
12976
12977 * src/files.c (skeleton_find): New function, eved out of...
12978 (open_files, open_extra_files): here.
12979
12980 2000-11-03 Akim Demaille <akim@epita.fr>
12981
12982 Don't use `atexit'.
12983
12984 * src/files.c (obstack_save): New function.
12985 (done): Rename as...
12986 (output_files): this.
12987 Use `obstack_save'.
12988 * src/main.c (main): Don't use `atexit' to register `done', since
12989 it no longer has to remove tmp files, just call `output_files'
12990 when there are no errors.
12991
12992 2000-11-02 Akim Demaille <akim@epita.fr>
12993
12994 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
12995 `unlink': it's no longer used.
12996 * src/files.h: Formatting changes.
12997
12998 2000-11-02 Akim Demaille <akim@epita.fr>
12999
13000 Remove the last uses of mktemp and unlink/delete.
13001
13002 * src/files.c (fdefines, ftable): Removed.
13003 (defines_ostack, table_obstack): New.
13004 Adjust dependencies of the former into uses of the latter.
13005 * src/output.c (output_short_or_char_table, output_short_table):
13006 Convert to using obstacks.
13007 * src/reader.c (copy_comment2): Accept one FILE * and two
13008 obstacks.
13009 (output_token_defines, reader_output_yylsp): Use obstacks.
13010 * src/system.h (obstack_fgrow3): New.
13011 * po/POTFILES.in: Adjust.
13012
13013 2000-11-01 Akim Demaille <akim@epita.fr>
13014
13015 Change each use of `fattrs' into a use of `attrs_obstack'.
13016
13017 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
13018 * src/files.c (fattrs): Remove.
13019 (attrs_obstack): New.
13020 Adjust all dependencies.
13021 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
13022
13023 2000-11-01 Akim Demaille <akim@epita.fr>
13024
13025 Introduce obstacks.
13026 Change each use of `faction' into a use of `action_obstack'.
13027
13028 * lib/obstack.h, lib/obstack.c: New files.
13029 * src/files.c (faction): Remove.
13030 (action_obstack): New.
13031 Adjust all dependencies.
13032
13033 2000-10-20 Akim Demaille <akim@epita.fr>
13034
13035 * lib/quote.h (PARAMS): New macro. Use it.
13036
13037 2000-10-16 Akim Demaille <akim@epita.fr>
13038
13039 * src/output.c (output_short_or_char_table): New function.
13040 (output_short_table, output_token_translations): Use it.
13041 (goto_actions): Use output_short_table.
13042
13043 2000-10-16 Akim Demaille <akim@epita.fr>
13044
13045 * src/symtab.c (bucket_new): New function.
13046 (getsym): Use it.
13047
13048 * src/output.c (output_short_table): New argument to display the
13049 comment associated with the table.
13050 Adjust dependencies.
13051 (output_gram): Use it.
13052 (output_rule_data): Nicer output layout for YYTNAME.
13053
13054 2000-10-16 Akim Demaille <akim@epita.fr>
13055
13056 * src/lex.c (read_typename): New function.
13057 (lex): Use it.
13058 * src/reader.c (copy_dollar): Likewise.
13059
13060 2000-10-16 Akim Demaille <akim@epita.fr>
13061
13062 * src/reader.c (copy_comment2): Expect the input stream to be on
13063 the `/' which is suspected to open a comment, instead of being
13064 called after `//' or `/*' was read.
13065 (copy_comment, copy_definition, parse_union_decl, copy_action)
13066 (copy_guard): Adjust.
13067
13068 2000-10-16 Akim Demaille <akim@epita.fr>
13069
13070 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
13071 `read_signed_integer'.
13072
13073 2000-10-16 Akim Demaille <akim@epita.fr>
13074
13075 * src/reader.c (copy_dollar): New function.
13076 (copy_guard, copy_action): Use it.
13077
13078 2000-10-16 Akim Demaille <akim@epita.fr>
13079
13080 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
13081 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
13082 New files, from Fileutils 4.0.27.
13083 * src/main.c (printable_version): Remove.
13084 * src/lex.c, src/reader.c: Use `quote'.
13085
13086 2000-10-04 Akim Demaille <akim@epita.fr>
13087
13088 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
13089
13090 2000-10-04 Akim Demaille <akim@epita.fr>
13091
13092 * doc/bison.texinfo: Various typos spotted by Neil Booth.
13093
13094 2000-10-04 Akim Demaille <akim@epita.fr>
13095
13096 When a literal string is used to define two different tokens,
13097 `bison -v' segfaults.
13098 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
13099
13100 * tests/regression.m4: New file.
13101 Include the core of the sample provided by Piotr Gackiewicz.
13102 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
13103 properly.
13104
13105 2000-10-04 Akim Demaille <akim@epita.fr>
13106
13107 * src/reader.c (parse_expect_decl): Keep `count' within the size
13108 of `buffer'.
13109 From Neil Booth.
13110
13111 2000-10-02 Paul Eggert <eggert@twinsun.com>
13112
13113 * bison.s1 (yyparse): Assign the default value
13114 unconditionally, to avoid a GCC warning and make the parser a
13115 tad smaller.
13116
13117 2000-10-02 Akim Demaille <akim@epita.fr>
13118
13119 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
13120 options.
13121
13122 2000-10-02 Akim Demaille <akim@epita.fr>
13123
13124 * src/derives.c, src/print.c, src/reduce.c: To ease the
13125 translation, move some `\n' out of the translated strings.
13126
13127 2000-10-02 Akim Demaille <akim@epita.fr>
13128
13129 The location tracking mechanism is precious for parse error
13130 messages. Nevertheless, it is enabled only when `@n' is used in
13131 the grammar, which is a different issue (you can use it in error
13132 message, but not in the grammar per se). Therefore, there should
13133 be another means to enable it.
13134
13135 * src/getargs.c (getargs): Support `--locations'.
13136 (usage): Report it.
13137 * src/getargs.h (locationsflag): Export it.
13138 * src/lex.c (percent_table): Support `%locations'.
13139 * src/reader.c (yylsp_needed): Remove this variable, now replaced
13140 with `locationsflag'.
13141 * doc/bison.texinfo: Document `--locations' and `%locations'.
13142 Sort the options.
13143 * tests/calc.m4: Test it.
13144
13145 For regularity of the names, replace each
13146 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
13147 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
13148 In addition replace each `flag' with `_flag'.
13149
13150 2000-10-02 Akim Demaille <akim@epita.fr>
13151
13152 Also test parse error messages, including with YYERROR_VERBOSE.
13153
13154 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
13155 associative).
13156 Use it to check the computations.
13157 Use it to check `nonassoc' is honored.
13158 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
13159 `--yyerror-verbose'.
13160 (_AT_CHECK_CALC): Adjust to this option.
13161 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
13162
13163 2000-10-02 Akim Demaille <akim@epita.fr>
13164
13165 Test also `--verbose', `--defines' and `--name-prefix'. Testing
13166 the latter demonstrates a flaw in the handling of non debugging
13167 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
13168 was used in order to simplify:
13169
13170 #if YYDEBUG
13171 if (yydebug)
13172 {
13173 ...
13174 }
13175 #endif
13176
13177 into
13178
13179 if (yydebug)
13180 {
13181 ...
13182 }
13183
13184 unfortunately this leads to a CPP conflict when
13185 `--name-prefix=foo' is used since it produces `#define yydebug
13186 foodebug'.
13187
13188 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
13189 (YYDPRINTF): New macro.
13190 Spread its use.
13191 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
13192 the bison options.
13193 Also test `--verbose', `--defines' and `--name-prefix'.
13194
13195 2000-10-02 Akim Demaille <akim@epita.fr>
13196
13197 Improve the readability of the produced parsers.
13198
13199 * src/bison.s1: Formatting changes.
13200 Improve the comment related to the `$' mark.
13201 (yydefault): Don't fall through to `yyresume': `goto' there.
13202 * src/output.c (output_parser): When the `$' is met, skip the end
13203 of its line.
13204 New variable, `number_of_dollar_signs', to check there's exactly
13205 one `$' in the parser skeleton.
13206
13207 2000-10-02 Akim Demaille <akim@epita.fr>
13208
13209 * lib/xstrdup.c: New file, from the fileutils.
13210 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
13211 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
13212 instead of strlen + xmalloc + strcpy.
13213 * src/symtab.c (copys): Remove, use xstrdup instead.
13214
13215 2000-10-02 Akim Demaille <akim@epita.fr>
13216
13217 * src/gram.h (associativity): New enum type which replaces the
13218 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
13219 `right_assoc', `left_assoc' and `non_assoc'.
13220 Adjust all dependencies.
13221 * src/reader.c: Formatting changes.
13222 (LTYPESTR): Don't define it, use it as a literal in
13223 `reader_output_yylsp'.
13224 * src/symtab.h (symbol_class): New enum type which replaces the
13225 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
13226 `sunknown', `stoken and `snterm'.
13227
13228 2000-10-02 Akim Demaille <akim@epita.fr>
13229
13230 * src/getargs.c (fixed_outfiles): Rename as...
13231 (yaccflag): for consistency and accuracy.
13232 Adjust dependencies.
13233
13234 2000-10-02 Akim Demaille <akim@epita.fr>
13235
13236 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
13237 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
13238 difficult and introduced a lot of core dump. It turns out that
13239 Bison used an implementation of `xmalloc' based on `calloc', and
13240 at various places it does depend upon the initialization to 0. I
13241 have not tried to isolate the pertinent places, and all the former
13242 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
13243 someone should address this issue.
13244
13245 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
13246 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
13247 files.
13248 Adjust dependencies.
13249 * src/warshall.h: New file.
13250 Propagate.
13251
13252 2000-10-02 Akim Demaille <akim@epita.fr>
13253
13254 Various anti-`extern in *.c' changes.
13255
13256 * src/system.h: Include `assert.h'.
13257
13258 2000-10-02 Akim Demaille <akim@epita.fr>
13259
13260 * src/state.h (nstates, final_state, first_state, first_shift)
13261 (first_reduction): Move their exportation from here...
13262 * src/LR0.h: to here.
13263 Adjust dependencies.
13264 * src/getargs.c (statisticsflag): New variable.
13265 Add support for `--statistics'.
13266 Adjust dependencies.
13267
13268 Remove a lot of now useless `extern' statements in most files.
13269
13270 2000-10-02 Akim Demaille <akim@epita.fr>
13271
13272 * src/LR0.h: New file.
13273 Propagate its use.
13274
13275 2000-10-02 Akim Demaille <akim@epita.fr>
13276
13277 * src/print.h: New file.
13278 Propagate its use.
13279 * src/print.c: Formatting and ordering changes.
13280 (verbose, terse): Replace with...
13281 (print_results): this new function.
13282 Adjust dependencies.
13283
13284 2000-10-02 Akim Demaille <akim@epita.fr>
13285
13286 * src/conflicts.c (conflict_report): New function.
13287 (conflict_log, verbose_conflict_log): Replace with...
13288 (print_conflicts): this function.
13289 Adjust dependencies.
13290 * src/conflicts.h: New file.
13291 Propagate its inclusion.
13292
13293 2000-10-02 Akim Demaille <akim@epita.fr>
13294
13295 * src/nullable.h: New file.
13296 Propagate its inclusion.
13297 * src/nullable.c: Formatting changes.
13298
13299 2000-10-02 Akim Demaille <akim@epita.fr>
13300
13301 * src/reduce.h: New file.
13302 Propagate its inclusion.
13303 * src/reduce.c: Topological sort and other formatting changes.
13304 (bool, TRUE, FALSE): Move their definition to...
13305 * src/system.h: here.
13306
13307 2000-10-02 Akim Demaille <akim@epita.fr>
13308
13309 * src/files.c: Formatting changes.
13310 (tryopen, tryclose, openfiles): Rename as...
13311 (xfopen, xfclose, open_files): this.
13312 (stringappend): static.
13313 * src/files.h: Complete the list of exported symbols.
13314 Propagate its use.
13315
13316 2000-10-02 Akim Demaille <akim@epita.fr>
13317
13318 * src/reader.h: New file.
13319 Propagate its use instead of tedious list of `extern' and
13320 prototypes.
13321 * src/reader.c: Formatting changes, topological sort,
13322 s/register//.
13323
13324 2000-10-02 Akim Demaille <akim@epita.fr>
13325
13326 * src/lex.h: Prototype `lex.c' exported functions.
13327 * src/reader.c: Adjust.
13328 * src/lex.c: Formatting changes.
13329 (safegetc): Rename as...
13330 (xgetc): this.
13331
13332 2000-10-02 Akim Demaille <akim@epita.fr>
13333
13334 * src/lalr.h: New file.
13335 Propagate its inclusion instead of prototypes and `extern'.
13336 * src/lalr.c: Formatting changes, topological sorting etc.
13337
13338 2000-10-02 Akim Demaille <akim@epita.fr>
13339
13340 * src/output.c (token_actions): Introduce a temporary array,
13341 YYDEFACT, that makes it possible for this function to use
13342 output_short_table.
13343
13344 2000-10-02 Akim Demaille <akim@epita.fr>
13345
13346 `user_toknums' is output as a `short[]' in `output.c', while it is
13347 defined as a `int[]' in `reader.c'. For consistency with the
13348 other output tables, `user_toknums' is now defined as a table of
13349 shorts.
13350
13351 * src/reader.c (user_toknums): Be a short table instead of an int
13352 table.
13353 Adjust dependencies.
13354
13355 Factor the short table outputs.
13356
13357 * src/output.c (output_short_table): New function.
13358 * src/output.c (output_gram, output_stos, output_rule_data)
13359 (output_base, output_table, output_check): Use it.
13360
13361 2000-10-02 Akim Demaille <akim@epita.fr>
13362
13363 * src/output.c (output): Topological sort of the functions, in
13364 order to get rid of the `static' prototypes.
13365 No longer use `register'.
13366 * src/output.h: New file.
13367 Propagate its inclusion in files explicitly prototyping functions
13368 from output.c.
13369
13370 2000-09-21 Akim Demaille <akim@epita.fr>
13371
13372 * src/atgeneral.m4: Update from Autoconf.
13373
13374 2000-09-21 Akim Demaille <akim@epita.fr>
13375
13376 * src/closure.h: New file.
13377 * src/closure.c: Formatting changes, topological sort over the
13378 functions, use of closure.h.
13379 (initialize_closure, finalize_closure): Rename as...
13380 (new_closure, free_closure): these. Adjust dependencies.
13381 * src/LR0.c: Formatting changes, topological sort, use of
13382 cloture.h.
13383 (initialize_states): Rename as...
13384 (new_states): this.
13385 * src/Makefile.am (noinst_HEADERS): Adjust.
13386
13387 2000-09-20 Akim Demaille <akim@epita.fr>
13388
13389 * src/acconfig.h: Don't protect config.h against multiple
13390 inclusion.
13391 Don't define PARAMS.
13392 * src/system.h: Define PARAMS.
13393 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
13394 purpose of config.h. system.h must not try to fix wrong
13395 definitions in config.h.
13396
13397 2000-09-20 Akim Demaille <akim@epita.fr>
13398
13399 * src/derives.h: New file.
13400 * src/main.c, src/derives.h: Use it.
13401 Formatting changes.
13402 * src/Makefile.am (noinst_HEADERS): Adjust.
13403
13404 2000-09-20 Akim Demaille <akim@epita.fr>
13405
13406 * tests/atgeneral.m4: Update from Autoconf.
13407 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
13408 (AT_CHECK_CALC): New macros.
13409 Use these macros to test bison with options `', `--raw',
13410 `--debug', `--yacc', `--yacc --debug'.
13411
13412 2000-09-19 Akim Demaille <akim@epita.fr>
13413
13414 * src/output.c: Formatting changes.
13415 * src/machine.h: Remove, leaving its contents in...
13416 * src/system.h: here.
13417 Include stdio.h.
13418 Adjust all dependencies on stdio.h and machine.h.
13419 * src/getargs.h: New file.
13420 Let all `extern' declarations about getargs.c be replaced with
13421 inclusion of `getargs.h'.
13422 * src/Makefile.am (noinst_HEADERS): Adjust.
13423
13424 * tests/calc.m4 (yyin): Be initialized in main, not on the global
13425 scope.
13426 (yyerror): Returns void, not int.
13427 * doc/bison.texinfo: Formatting changes.
13428
13429 2000-09-19 Akim Demaille <akim@epita.fr>
13430
13431 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
13432 portable.
13433
13434 2000-09-18 Akim Demaille <akim@epita.fr>
13435
13436 * configure.in: Append WARNING_CFLAGS to CFLAGS.
13437 * src/Makefile.am (INCLUDES): Don't.
13438 Be ready to fetch headers in lib/.
13439
13440 2000-09-18 Akim Demaille <akim@epita.fr>
13441
13442 * doc/bison.texinfo: Update the copyright.
13443 ANSIfy and GNUify the examples.
13444 Remove the old menu.
13445
13446 2000-09-18 Akim Demaille <akim@epita.fr>
13447
13448 First set of tests: use the `calc' example from the documentation.
13449
13450 * src/bison.s1 (yyparse): Condition the code using `yytname' which
13451 is defined only when YYDEBUG is.
13452 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
13453 * src/files.c (tryopen, tryclose): Formatting changes.
13454 Move to the top and be static.
13455 * src/reader.c (read_signed_integer): Likewise.
13456 * tests/calc.m4: New file.
13457 * Makefile.am, suite.m4: Adjust.
13458 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
13459
13460 2000-09-18 Akim Demaille <akim@epita.fr>
13461
13462 Add support for an Autotest test suite for Bison.
13463
13464 * m4/m4.m4, m4/atconfig.m4: New files.
13465 * m4/Makefile.am (EXTRA_DIST): Adjust.
13466 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
13467 files.
13468 * src/getargs.c: Display a more standard --version message.
13469 * src/reader.c (reader): Formatting changes.
13470 No longer depend upon VERSION_STRING.
13471 * configure.in: No longer use `dnl'.
13472 Set up the test suite and the new directory `tests/.
13473 (VERSION_STRING): Remove.
13474
13475 2000-04-14 Akim Demaille <akim@epita.fr>
13476
13477 * src/reader.c (copy_comment2): New function, same as former
13478 `copy_comment', but outputs into two FILE *.
13479 (copy_comment): Use it.
13480 (parse_union_decl): Use it.
13481 (get_type, parse_start_decl): Use the same `invalid' message.
13482 (parse_start_decl, parse_union_decl): Use the same `multiple'
13483 message.
13484 (parse_union_decl, copy_guard, copy_action): Use the same
13485 `unmatched' message.
13486 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
13487
13488 2000-03-31 Akim Demaille <akim@epita.fr>
13489
13490 * src/files.c (tryopen, tryclose): Move to the top.
13491 Be static.
13492
13493 2000-03-31 Akim Demaille <akim@epita.fr>
13494
13495 * src/main.c (main): Don't call `done', exit does it.
13496
13497 2000-03-31 Akim Demaille <akim@epita.fr>
13498
13499 * allocate.c: s/return (foo)/return foo/.
13500 * lalr.c: Likewise.
13501 * LR0.c: Likewise.
13502 * output.c: Likewise.
13503 * reader.c: Likewise.
13504 * symtab.c: Likewise.
13505 * vmsgetargs.c: Likewise.
13506
13507 2000-03-31 Akim Demaille <akim@epita.fr>
13508
13509 Clean up the error reporting functions.
13510
13511 * src/report.c: New file.
13512 * src/report.h: Likewise.
13513 * src/Makefile.am: Adjust.
13514 * m4/error.m4: New file.
13515 * m4/Makefile.am: Adjust.
13516 * configure.in (jm_PREREQ_ERROR): Call it.
13517 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
13518 Remove.
13519 (fatal, fatals): Remove. All callers use complain.c::fatal.
13520 (warn, warni, warns, warnss, warnss): Remove. All callers use
13521 complain.c::complain.
13522 (toomany): Remove, use fatal instead.
13523 * src/files.c (done): No argument, use complain_message_count.
13524 * src/main.c (main): Register `done' to `atexit'.
13525
13526 * src/getargs.c (usage): More `fputs', less `fprintf'.
13527
13528 2000-03-28 Akim Demaille <akim@epita.fr>
13529
13530 * lib/: New directory.
13531 * Makefile.am (SUBDIRS): Adjust.
13532 * configure.in: Adjust.
13533 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
13534 useless.
13535 * src/alloca.c: Moved to lib/.
13536 * src/getopt.c: Likewise.
13537 * src/getopt1.c: Likewise.
13538 * src/getopt.h: Likewise.
13539 * src/ansi2knr.c: Likewise.
13540 * src/ansi2knr.1: Likewise.
13541 * src/Makefile.am: Adjust.
13542 * lib/Makefile.am: New file.
13543
13544 2000-03-28 Akim Demaille <akim@epita.fr>
13545
13546 * src/getargs.c (usage): Refresh the help message.
13547
13548 2000-03-17 Akim Demaille <akim@epita.fr>
13549
13550 * src/getopt1.c: Updated from textutils 2.0e
13551 * src/getopt.c: Likewise.
13552 * src/getopt.h: Likewise.
13553
13554 2000-03-17 Akim Demaille <akim@epita.fr>
13555
13556 * src/Makefile.am (bison.simple): Fix the awk program: quote only
13557 the file name, not the whole `#line LINE FILE'.
13558
13559 2000-03-17 Akim Demaille <akim@epita.fr>
13560
13561 On syntax errors, report the token on which we choked.
13562
13563 * src/bison.s1 (yyparse): In the label yyerrlab, when
13564 YYERROR_VERBOSE, add yychar in msg.
13565
13566 2000-03-17 Akim Demaille <akim@epita.fr>
13567
13568 * src/reader.c (copy_at): New function.
13569 (copy_guard): Use it.
13570 (copy_action): Use it.
13571
13572 2000-03-17 Akim Demaille <akim@epita.fr>
13573
13574 Be kind to translators, save some useless translations.
13575
13576 * src/main.c (banner): New function.
13577 (fatal_banner): Use it.
13578 (warn_banner): Use it.
13579
13580 2000-03-17 Akim Demaille <akim@epita.fr>
13581
13582 * src/reader.c (copy_definition): Use copy_string and
13583 copy_comment. Removed now unused `match', `ended',
13584 `cplus_comment'.
13585 (copy_comment, copy_string): Moved, to be visible from
13586 copy_definition.
13587
13588 2000-03-17 Akim Demaille <akim@epita.fr>
13589
13590 * src/reader.c (copy_string): Declare `static inline'. No
13591 problems with inline, since it is checked by configure.
13592 (copy_comment): Likewise.
13593
13594 2000-03-17 Akim Demaille <akim@epita.fr>
13595
13596 * src/reader.c (packsymbols): Formatting changes.
13597
13598 2000-03-17 Akim Demaille <akim@epita.fr>
13599
13600 * src/reader.c (copy_comment): New function, factored out from:
13601 (copy_action): Use it. Removed now unused `match', `ended',
13602 `cplus_comment'.
13603 (copy_guard): Likewise.
13604
13605 2000-03-17 Akim Demaille <akim@epita.fr>
13606
13607 * src/reader.c (copy_string): New function, factored out from:
13608 (copy_action): Use it.
13609 (copy_guard): Likewise.
13610
13611 2000-03-17 Akim Demaille <akim@epita.fr>
13612
13613 Change the handling of @s so that they behave exactly like $s.
13614 There is now a pseudo variable @$ (readble and writable), location
13615 of the lhs of the rule (by default ranging from the location of
13616 the first symbol of the rhs, to the location of the last symbol,
13617 or, if the rhs is empty, YYLLOC).
13618
13619 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
13620 yyval.
13621 (yyparse): When providing a default semantic action, provide a
13622 default location action.
13623 (after the $): No longer change `*YYLSP', just stack YYLOC the
13624 same way you stack YYVAL.
13625 * src/reader.c (read_declarations): Use warns.
13626 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
13627 (copy_action, case '@'): Likewise.
13628 Use a standard error message, to save useless work from
13629 translators.
13630
13631 2000-03-17 Akim Demaille <akim@epita.fr>
13632
13633 * src/bison.s1: Formatting and cosmetics changes.
13634 * src/reader.c: Likewise.
13635 Update the Copyright notice.
13636
13637 2000-03-17 Akim Demaille <akim@epita.fr>
13638
13639 * src/bison.s1 (#line): All set to `#line' only, since the
13640 Makefile now handles them.
13641
13642 2000-03-16 Akim Demaille <akim@epita.fr>
13643
13644 * src/output.c (output_rule_data): Output the documentation of
13645 some of the tables.
13646 (Copyright notice): Update.
13647 Formatting changes.
13648
13649 2000-03-16 Akim Demaille <akim@epita.fr>
13650
13651 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
13652 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
13653 One `#if YYDEBUG' remains, since it uses variables which are
13654 defined only if `YYDEBUG != 0'.
13655
13656 2000-03-16 Akim Demaille <akim@epita.fr>
13657
13658 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
13659 and related variables so that the similarities are highlighted.
13660
13661 2000-03-16 Akim Demaille <akim@epita.fr>
13662
13663 * src/bison.s1: Properly indent CPP directives.
13664
13665 2000-03-16 Akim Demaille <akim@epita.fr>
13666
13667 * src/bison.s1: Properly indent the `alloca' CPP section.
13668
13669 2000-03-16 Akim Demaille <akim@epita.fr>
13670
13671 Do not hard code values of directories in `configure.in'.
13672 Update the `configure' tool chain.
13673
13674 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
13675 src/makefile.am.
13676 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
13677 (AC_OUTPUT): Add m4/Makefile.
13678 Bump to bison 1.28a, 1.29 has never been released.
13679 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
13680 handled via src/Makefile.am.
13681 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
13682 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
13683 autoheader.
13684 * Makefile.am (SUBDIRS): Add m4.
13685 (ACLOCAL_AM_FLAGS): New variable.
13686 (AUTOMAKE_OPTIONS): Add check-news.
13687 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
13688 the proper line number and file name.
13689 (DEFS): Propagate the location of bison library files and of the
13690 locale files.
13691 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
13692 builddir.
13693 * acinclude.m4: Remove, replaced by the directory m4.
13694 * m4/Makefile.am (EXTRA_DIST): New variable.
13695 * m4/gettext.m4: New file, from the fileutils.
13696 * m4/lcmessage.m4: Likewise
13697 * m4/progtest.m4: Likewise.
13698 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
13699
13700 2000-03-10 Akim Demaille <akim@epita.fr>
13701
13702 * src/closure.c:
13703 Formatting changes of various comments.
13704 Respect the GNU coding standards at various places.
13705 Don't use `_()' when no translation is needed.
13706
13707 1999-12-13 Jesse Thilo <jthilo@gnu.org>
13708
13709 * src/files.c:
13710 OS/2 honors TMPDIR environment variable.
13711
13712 1999-12-13 Jesse Thilo <jthilo@gnu.org>
13713
13714 * doc/bison.texinfo: Tweaked spelling and grammar.
13715 Updated ISBN.
13716 Removed reference to price of printed copy.
13717 Mention BISON_SIMPLE and BISON_HAIRY.
13718
13719 1999-12-13 Jesse Thilo <jthilo@gnu.org>
13720
13721 * configure.in, NEWS:
13722 Bison 1.29 released.
13723
13724 1999-10-27 Jesse Thilo <jthilo@gnu.org>
13725
13726 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
13727 Added reference card.
13728
13729 1999-07-26 Jesse Thilo <jthilo@gnu.org>
13730
13731 * po/ru.po: Added Russian translation.
13732
13733 1999-07-26 Jesse Thilo <jthilo@gnu.org>
13734
13735 * configure.in: Added Russian translation.
13736
13737 1999-07-06 Jesse Thilo <jthilo@gnu.org>
13738
13739 * configure.in, NEWS, README:
13740 Released version 1.28.
13741
13742 1999-06-14 Jesse Thilo <jthilo@gnu.org>
13743
13744 * src/system.h:
13745 Squashed redefinition warning on some systems.
13746
13747 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
13748 Have configure build version string instead of relying on ANSI string
13749 concatentation.
13750
13751 1999-06-14 Jesse Thilo <jthilo@gnu.org>
13752
13753 * po/POTFILES.in: Got rid of version.c.
13754
13755 1999-06-14 Jesse Thilo <jthilo@gnu.org>
13756
13757 * acconfig.h, configure.in:
13758 Have configure build version string instead of relying on ANSI string
13759 concatentation.
13760
13761 1999-06-08 Jesse Thilo <jthilo@gnu.org>
13762
13763 * doc/bison.1:
13764 Dropped mention of `+' for long-named options.
13765
13766 1999-05-30 Jesse Thilo <jthilo@gnu.org>
13767
13768 * src/files.c: Added <unistd.h> for unlink().
13769
13770 * src/Makefile.am, src/system.h:
13771 I18n fixes.
13772
13773 1999-05-30 Jesse Thilo <jthilo@gnu.org>
13774
13775 * README: Added a FAQ list.
13776
13777 * configure.in, acconfig.h:
13778 I18n fixes.
13779
13780 1999-05-30 Jesse Thilo <jthilo@gnu.org>
13781
13782 * doc/FAQ, doc/Makefile.am:
13783 Added a FAQ list.
13784
13785 1999-05-19 Jesse Thilo <jthilo@gnu.org>
13786
13787 * src/alloc.h, src/symtab.h, src/version.c:
13788 Protected inclusion of "config.h" with HAVE_CONFIG_H.
13789
13790 1999-04-18 Jesse Thilo <jthilo@gnu.org>
13791
13792 * src/.cvsignore, src/Makefile.am:
13793 Reorganized: sources in `src', documentation in `doc'.
13794
13795 * src/lex.c (literalchar):
13796 fixed the code for escaping double quotes (thanks
13797 Jonathan Czisny.)
13798
13799 1999-04-18 Jesse Thilo <jthilo@gnu.org>
13800
13801 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
13802 Adjusted paths to reflect directory reorganization.
13803
13804 1999-04-18 Jesse Thilo <jthilo@gnu.org>
13805
13806 * doc/.cvsignore, doc/Makefile.am:
13807 Reorganized: sources in `src', documentation in `doc'.
13808
13809 1999-04-18 Jesse Thilo <jthilo@gnu.org>
13810
13811 * configure.in:
13812 Updated AC_INIT file to reflect directory reorganization.
13813
13814 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
13815 Reorganized: sources in `src', documentation in `doc'.
13816
13817 1999-04-13 Jesse Thilo <jthilo@gnu.org>
13818
13819 * src/allocate.c:
13820 Don't declare calloc() and realloc() if not necessary.
13821
13822 1999-04-13 Jesse Thilo <jthilo@gnu.org>
13823
13824 * configure.in, acconfig.h, acinclude.m4:
13825 Don't declare calloc() and realloc() if not necessary.
13826
13827 1999-03-23 Jesse Thilo <jthilo@gnu.org>
13828
13829 * po/.cvsignore: Added i18n support.
13830
13831 1999-03-23 Jesse Thilo <jthilo@gnu.org>
13832
13833 * acconfig.h, configure.in, Makefile.am:
13834 Added i18n support.
13835
13836 1999-03-22 Jesse Thilo <jthilo@gnu.org>
13837
13838 * src/bison.s1: Fixed #line numbers.
13839
13840 1999-03-15 Jesse Thilo <jthilo@gnu.org>
13841
13842 * po/es.po, po/fr.po, po/nl.po, po/de.po:
13843 Added PO files from Translation Project.
13844
13845 1999-03-03 Jesse Thilo <jthilo@gnu.org>
13846
13847 * Makefile.am:
13848 Added support for non-ANSI compilers (ansi2knr).
13849
13850 1999-02-16 Jesse Thilo <jthilo@gnu.org>
13851
13852 * configure.in: Bumped version number to 1.27.
13853
13854 * Makefile.am:
13855 Added `bison.simple' to list of files removed by `make distclean'.
13856
13857 1999-02-12 Jesse Thilo <jthilo@gnu.org>
13858
13859 * src/files.c, src/files.h:
13860 Defined locations of parser files in config.h instead of Makefile.
13861
13862 1999-02-12 Jesse Thilo <jthilo@gnu.org>
13863
13864 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
13865 Defined locations of parser files in config.h instead of Makefile.
13866
13867 1999-02-09 Jesse Thilo <jthilo@gnu.org>
13868
13869 * Makefile.am:
13870 Removed inappropriate use of $< macro.
13871
13872 1999-02-05 Jesse Thilo <jthilo@gnu.org>
13873
13874 * po/Makefile.in.in, po/POTFILES.in:
13875 Add `po' directory skeleton.
13876
13877 1999-01-27 Jesse Thilo <jthilo@gnu.org>
13878
13879 * README: Document help-bison list.
13880
13881 * configure.in: Add check for mkstemp().
13882
13883 1999-01-20 Jesse Thilo <jthilo@gnu.org>
13884
13885 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
13886 Hush a few compiler warnings.
13887
13888 * src/files.c:
13889 Add tryclose(), which verifies that fclose was successful.
13890 Hush a couple of compiler warnings.
13891
13892 1999-01-20 Jesse Thilo <jthilo@gnu.org>
13893
13894 * Makefile.am, OChangeLog:
13895 ChangeLog is now automatically generated. Include the old version as
13896 OChangeLog.
13897
13898 1999-01-14 Jesse Thilo <jthilo@gnu.org>
13899
13900 * 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:
13901 Update FSF address.
13902
13903 1999-01-14 Jesse Thilo <jthilo@gnu.org>
13904
13905 * doc/bison.texinfo: Fix formatting glitch.
13906
13907 * doc/bison.texinfo: Update FSF address.
13908
13909 1999-01-14 Jesse Thilo <jthilo@gnu.org>
13910
13911 * acconfig.h: Update FSF address.
13912
13913 1999-01-08 Jesse Thilo <jthilo@gnu.org>
13914
13915 * src/system.h:
13916 Don't define PACKAGE here, since config.h defines it.
13917
13918 1998-12-30 Jesse Thilo <jthilo@gnu.org>
13919
13920 * src/reader.c: Update copyright date.
13921
13922 * src/main.c:
13923 Ditch sprintf to statically-sized buffers in fatal/warn functions in
13924 favor of output directly to stderr (avoids buffer overruns).
13925
13926 * src/reader.c: Some checks for premature EOF.
13927
13928 * 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:
13929 Use prototypes if the compiler understands them.
13930
13931 * src/files.c: Honor TMPDIR on Unix hosts.
13932 Use prototypes if the compiler understands them.
13933
13934 * src/reader.c:
13935 Fix a couple of buffer overrun bugs.
13936 Use prototypes if the compiler understands them.
13937
13938 * src/system.h: Include unistd.h and ctype.h.
13939 Use #ifdef instead of #if for NLS symbols.
13940
13941 1998-12-30 Jesse Thilo <jthilo@gnu.org>
13942
13943 * doc/bison.texinfo:
13944 Delete comment "consider using @set for edition number, etc..." since
13945 we now are doing so.
13946
13947 1998-12-30 Jesse Thilo <jthilo@gnu.org>
13948
13949 * configure.in:
13950 Use prototypes if the compiler understands them.
13951
13952 * NEWS: Document 1.26 highlights.
13953
13954 * Makefile.am: Require Automake 1.3 or later.
13955
13956 * acconfig.h:
13957 Use prototypes if the compiler understands them.
13958
13959 1998-12-29 Jesse Thilo <jthilo@gnu.org>
13960
13961 * src/version.c:
13962 Use VERSION symbol from automake for version number.
13963
13964 1998-12-29 Jesse Thilo <jthilo@gnu.org>
13965
13966 * acconfig.h, configure.in, version.cin:
13967 Use VERSION symbol from automake for version number.
13968
13969 1998-11-28 Jesse Thilo <jthilo@gnu.org>
13970
13971 * Makefile.am:
13972 Distribute original version of simple parser (bison.s1), not built
13973 version (bison.simple).
13974
13975 1998-11-28 Jesse Thilo <jthilo@gnu.org>
13976
13977 * doc/bison.texinfo: Add info dir entry.
13978
13979 * doc/bison.texinfo:
13980 Let automake put version number into documentation.
13981
13982 1998-11-26 Jesse Thilo <jthilo@gnu.org>
13983
13984 * src/bison.cld, src/build.com, src/vmshlp.mar:
13985 Add non-RCS files from /gd/gnu/bison.
13986
13987 1998-11-26 Jesse Thilo <jthilo@gnu.org>
13988
13989 * doc/bison.1:
13990 Document the BISON_HAIRY and BISON_SIMPLE variables.
13991
13992 1998-11-25 Jesse Thilo <jthilo@gnu.org>
13993
13994 * src/version.c: Build version.c automatically.
13995
13996 * src/reader.c:
13997 Fix token numbering (used to start at 258, not 257).
13998
13999 * src/system.h: Include config.h.
14000
14001 * src/getargs.c: Update bug report address.
14002
14003 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
14004 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
14005
14006 1998-11-25 Jesse Thilo <jthilo@gnu.org>
14007
14008 * Makefile.am:
14009 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
14010
14011 * configure.in, version.cin:
14012 Build version.c automatically.
14013
14014 * AUTHORS: Add AUTHORS file.
14015
14016 * README: Update bug report address.
14017
14018 * bison.simple:
14019 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
14020
14021 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
14022 Add automake stuff.
14023
14024 1998-11-25 Jesse Thilo <jthilo@gnu.org>
14025
14026 * doc/bison.texinfo: Clean up some formatting.
14027
14028 1998-05-05 Richard Stallman <rms@gnu.org>
14029
14030 * doc/bison.texinfo:
14031 Explain better why to make a pure parser.
14032
14033 1998-01-05 Richard Stallman <rms@gnu.org>
14034
14035 * src/files.c (openfiles):
14036 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
14037 find a temporary directory, if possible. Do not unlink files while
14038 they are open.
14039
14040 1997-08-25 Richard Stallman <rms@gnu.org>
14041
14042 * src/reader.c (stack_offset;):
14043 Change some warni to warns.
14044
14045 * src/lex.c (literalchar): Use warns, not warni.
14046
14047 1997-06-28 Richard Stallman <rms@gnu.org>
14048
14049 * src/bison.s1: Add a Bison version comment.
14050
14051 * src/main.c (fatal, warn, berror):
14052 Use program_name.
14053
14054 1997-06-28 Richard Stallman <rms@gnu.org>
14055
14056 * Makefile.in (bison_version): New variable.
14057 (dist): Use that variable.
14058 (bison.s1): Substitute the Bison version into bison.simple.
14059
14060 * bison.simple: Add a Bison version comment.
14061
14062 1997-06-18 Richard Stallman <rms@gnu.org>
14063
14064 * src/main.c (fatal, warn, berror):
14065 Make error messages standard.
14066 (toomany): Improve error message text.
14067
14068 * 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:
14069 new.h renamed to alloc.h.
14070
14071 1997-06-18 Richard Stallman <rms@gnu.org>
14072
14073 * Makefile.in: new.h renamed to alloc.h.
14074
14075 1997-05-24 Richard Stallman <rms@gnu.org>
14076
14077 * src/lex.c (literalchar):
14078 Fix the code for escaping \, " and '.
14079
14080 (lex): Avoid trouble when there are many chars
14081 to discard in a char literal with just several chars in it.
14082
14083 1997-05-17 Richard Stallman <rms@gnu.org>
14084
14085 * src/bison.s1:
14086 Use malloc, if using alloca is troublesome.
14087 (YYSTACK_USE_ALLOCA): New flag macro.
14088 Define it for some systems and compilers.
14089 (YYSTACK_ALLOC): New macro.
14090 (yyparse): Use YYSTACK_ALLOC to allocate stack.
14091 If it was malloc'd, free it.
14092
14093 1997-05-17 Richard Stallman <rms@gnu.org>
14094
14095 * bison.simple:
14096 Use malloc, if using alloca is troublesome.
14097 (YYSTACK_USE_ALLOCA): New flag macro.
14098 Define it for some systems and compilers.
14099 (YYSTACK_ALLOC): New macro.
14100 (yyparse): Use YYSTACK_ALLOC to allocate stack.
14101 If it was malloc'd, free it.
14102
14103 1997-04-23 Richard Stallman <rms@gnu.org>
14104
14105 * src/bison.s1:
14106 (alloca) [__hpux]: Always define as __builtin_alloca.
14107
14108 1997-04-23 Richard Stallman <rms@gnu.org>
14109
14110 * bison.simple:
14111 (alloca) [__hpux]: Always define as __builtin_alloca.
14112
14113 1997-04-22 Richard Stallman <rms@gnu.org>
14114
14115 * src/bison.s1:
14116 [__hpux]: Include alloca.h (right for HPUX 10)
14117 instead of declaring alloca (right for HPUX 9).
14118
14119 * src/bison.s1 (__yy_memcpy):
14120 Declare arg `count' as unsigned int.
14121 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
14122
14123 1997-04-22 Richard Stallman <rms@gnu.org>
14124
14125 * bison.simple:
14126 [__hpux]: Include alloca.h (right for HPUX 10)
14127 instead of declaring alloca (right for HPUX 9).
14128
14129 * bison.simple (__yy_memcpy):
14130 Declare arg `count' as unsigned int.
14131 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
14132
14133 1997-01-03 Richard Stallman <rms@gnu.org>
14134
14135 * src/allocate.c: [__STDC__ or _MSC_VER]:
14136 Declare calloc and realloc to return void *.
14137
14138 1997-01-02 Richard Stallman <rms@gnu.org>
14139
14140 * src/system.h:
14141 [_MSC_VER]: Include stdlib.h and process.h.
14142 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
14143
14144 * src/main.c (main): Return FAILURE as a value.
14145 (printable_version): Declare arg as int, not char.
14146
14147 1997-01-02 Richard Stallman <rms@gnu.org>
14148
14149 * Makefile.in (dist):
14150 Explicitly check for symlinks, and copy them.
14151
14152 1996-12-19 Richard Stallman <rms@gnu.org>
14153
14154 * src/files.c:
14155 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
14156
14157 1996-12-18 Paul Eggert <eggert@gnu.org>
14158
14159 * src/bison.s1 (yyparse):
14160 If __GNUC__ and YYPARSE_PARAM are both defined,
14161 declare yyparse to have a void * argument.
14162
14163 1996-12-18 Paul Eggert <eggert@gnu.org>
14164
14165 * bison.simple (yyparse):
14166 If __GNUC__ and YYPARSE_PARAM are both defined,
14167 declare yyparse to have a void * argument.
14168
14169 1996-12-17 Richard Stallman <rms@gnu.org>
14170
14171 * src/reduce.c (nbits): Add some casts.
14172
14173 1996-08-12 Richard Stallman <rms@gnu.org>
14174
14175 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
14176
14177 1996-08-12 Richard Stallman <rms@gnu.org>
14178
14179 * bison.simple: Test _MSDOS as well as _MSDOS_.
14180
14181 1996-07-31 Richard Stallman <rms@gnu.org>
14182
14183 * src/bison.s1:
14184 [__sun && __i386]: Include alloca.h.
14185
14186 1996-07-31 Richard Stallman <rms@gnu.org>
14187
14188 * bison.simple:
14189 [__sun && __i386]: Include alloca.h.
14190
14191 1996-07-30 Richard Stallman <rms@gnu.org>
14192
14193 * src/bison.s1: Comment change.
14194
14195 * src/bison.s1: Test _MSDOS_, not MSDOS.
14196
14197 1996-07-30 Richard Stallman <rms@gnu.org>
14198
14199 * bison.simple: Comment change.
14200
14201 * bison.simple: Test _MSDOS_, not MSDOS.
14202
14203 1996-06-01 Richard Stallman <rms@gnu.org>
14204
14205 * 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:
14206 Insert `_' macro around many string constants.
14207
14208 * src/main.c:
14209 Insert `_' macro around many string constants.
14210
14211 (main): Call setlocale, bindtextdomain and textdomain.
14212
14213 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
14214 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
14215 [ENABLE_NLS]: Include libintl.h.
14216 [ENABLE_NLS] (gettext): Define.
14217 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
14218 (N_, PACKAGE, LOCALEDIR): New macros.
14219
14220 1996-06-01 Richard Stallman <rms@gnu.org>
14221
14222 * POTFILES.in: New file.
14223
14224 * Makefile.in (allocate.o):
14225 Define target explicitly.
14226
14227 * Makefile.in (CFLAGS): Set to @CFLAGS@.
14228 (LDFLAGS): Set to @LDFLAGS@.
14229 (configure): Run autoconf only if preceding `cd' succeeds.
14230 (bison.s1): Redirect output to temporary file then move the
14231 temporary to the target, rather than redirecting directly to bison.s1.
14232 (clean): Remove config.status and config.log.
14233 (distclean): Don't remove config.status here.
14234
14235 1996-05-12 Richard Stallman <rms@gnu.org>
14236
14237 * src/bison.s1:
14238 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
14239
14240 1996-05-12 Richard Stallman <rms@gnu.org>
14241
14242 * bison.simple:
14243 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
14244
14245 1996-05-11 Richard Stallman <rms@gnu.org>
14246
14247 * src/bison.s1 (__yy_memcpy):
14248 Really reorder the args, as was supposedly done on Feb 14 1995.
14249 (yyparse): Calls changed accordingly.
14250
14251 1996-05-11 Richard Stallman <rms@gnu.org>
14252
14253 * Makefile.in (dist): Don't use $(srcdir).
14254
14255 * bison.simple (__yy_memcpy):
14256 Really reorder the args, as was supposedly done on Feb 14 1995.
14257 (yyparse): Calls changed accordingly.
14258
14259 1996-01-27 Richard Stallman <rms@gnu.org>
14260
14261 * src/output.c (output_rule_data):
14262 Test YYERROR_VERBOSE in the conditional
14263 around the definition of ttyname.
14264
14265 1995-12-29 Richard Stallman <rms@gnu.org>
14266
14267 * src/bison.s1:
14268 Fix line numbers in #line commands.
14269
14270 1995-12-29 Richard Stallman <rms@gnu.org>
14271
14272 * bison.simple:
14273 Fix line numbers in #line commands.
14274
14275 1995-12-27 Richard Stallman <rms@gnu.org>
14276
14277 * src/bison.s1 (YYPARSE_PARAM_DECL):
14278 In C++, make it always null.
14279 (YYPARSE_PARAM_ARG): New macro.
14280 (yyparse): Use YYPARSE_PARAM_ARG.
14281
14282 1995-12-27 Richard Stallman <rms@gnu.org>
14283
14284 * bison.simple (YYPARSE_PARAM_DECL):
14285 In C++, make it always null.
14286 (YYPARSE_PARAM_ARG): New macro.
14287 (yyparse): Use YYPARSE_PARAM_ARG.
14288
14289 1995-11-29 Richard Stallman <rms@gnu.org>
14290
14291 * doc/bison.texinfo:
14292 Describe literal string tokens, %raw, %no_lines, %token_table.
14293
14294 1995-11-29 Daniel Hagerty <hag@gnu.org>
14295
14296 * doc/bison.texinfo: Fixed update date
14297
14298 1995-10-16 Richard Stallman <rms@gnu.org>
14299
14300 * src/version.c: Version 1.25.
14301
14302 1995-10-16 Richard Stallman <rms@gnu.org>
14303
14304 * NEWS: *** empty log message ***
14305
14306 1995-10-16 Richard Stallman <rms@gnu.org>
14307
14308 * doc/bison.1, doc/bison.rnh:
14309 Add new options.
14310
14311 1995-10-15 Richard Stallman <rms@gnu.org>
14312
14313 * src/vmsgetargs.c, src/getargs.c:
14314 Added -n, -k, and -raw switches.
14315 (noparserflag, toknumflag, rawtoknumflag): New variables.
14316
14317 * src/symtab.h (SALIAS):
14318 New #define for adding aliases to %token.
14319 (struct bucket): Added `alias' field.
14320
14321 * src/reduce.c (reduce_grammar):
14322 Revise error message.
14323 (print_notices): Remove final `.' from error message.
14324
14325 * src/reader.c (reader_output_yylsp):
14326 New function.
14327 (readgram): Use `#if 0' around code that accepted %command
14328 inside grammar rules: The documentation doesn't allow it,
14329 and it will fail since the %command processors scan for the next %.
14330 (parse_token_decl): Extended the %token
14331 declaration to allow a multi-character symbol as an alias.
14332 (parse_thong_decl): New function.
14333 (read_declarations): Added %thong declarations.
14334 (read_declarations): Handle NOOP to deal with allowing
14335 % declarations as another means to specify the flags.
14336 (readgram): Allow %prec prior to semantics embedded in a rule.
14337 (skip_to_char, read_declarations, copy_definition)
14338 (parse_token_decl, parse_start_decl, parse_type_decl)
14339 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
14340 (get_type_name, copy_guard, copy_action, readgram)
14341 (get_type, packsymbols): Revised most error messages.
14342 Changed `fatal' to `warnxxx' to avoid aborting for error.
14343 Revised and use multiple warnxxx functions to avoid using VARARGS1.
14344 (read_declarations): Improve the error message for
14345 an invalid character. Do not abort.
14346 (read_declarations, copy_guard, copy_action): Use
14347 printable_version to avoid unprintable characters in printed output.
14348 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
14349 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
14350 Allow the type of a non-terminal can be given
14351 more than once, as long as all specifications give the same type.
14352
14353 * src/output.c:
14354 (output_headers, output_trailers, output, output_gram)
14355 (output_rule_data): Implement noparserflag variable.
14356 Implement toknumflag variable.
14357 (output): Call reader_output_yylsp to output LTYPESTR.
14358
14359 * src/main.c (main):
14360 If reader sees an error, don't process the grammar.
14361 (fatals): Updated to not use VARARGS1.
14362 (printable_version, int_to_string, warn, warni, warns, warnss)
14363 (warnsss): New error reporting functions. Avoid abort for error.
14364
14365 * src/lex.h:
14366 Added THONG and NOOP for alias processing.
14367 Added SETOPT for the new code that allows setting options with %flags.
14368
14369 * src/lex.c:
14370 Include getopt.h. Add some extern decls.
14371 (safegetc): New function to deal with EOF gracefully.
14372 (literalchar); new function to deal with reading \ escapes.
14373 (lex): Use literalchar.
14374 (lex): Implemented "..." tokens.
14375 (literalchar, lex, parse_percent_token): Made tokenbuffer
14376 always contain the token. This includes growing the token
14377 buffer while reading an integer.
14378 (parse_percent_token): Replaced if-else statement with percent_table.
14379 (parse_percent_token): Added % declarations as another
14380 way to specify the flags -n, -l, and -r. Also added hooks for
14381 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
14382 major changes to files.c.
14383 (lex) Retain in the incoming stream a character following
14384 an incorrect '/'.
14385 (skip_white_space, lex): Revised most error messages
14386 and changed fatal to warn to avoid aborting.
14387 (percent_table): Added %thong declarations.
14388
14389 * src/gram.h: Comment changes.
14390
14391 * src/files.c (openfiles, open_extra_files, done):
14392 Add faction flag
14393 and actfile file. Handle noparserflag. Both for -n switch.
14394
14395 * src/conflicts.c (resolve_sr_conflict):
14396 Remove use of alloca.
14397
14398 1995-06-01 Jim Meyering <meyering@gnu.org>
14399
14400 * doc/bison.texinfo: *** empty log message ***
14401
14402 1995-05-06 Richard Stallman <rms@gnu.org>
14403
14404 * src/bison.s1: Comment change.
14405
14406 1995-05-06 Richard Stallman <rms@gnu.org>
14407
14408 * bison.simple: Comment change.
14409
14410 1995-05-03 Richard Stallman <rms@gnu.org>
14411
14412 * src/version.c: Version now 1.24.
14413
14414 * src/bison.s1: Change distribution terms.
14415
14416 * src/version.c: Version now 1.23.
14417
14418 1995-05-03 Richard Stallman <rms@gnu.org>
14419
14420 * doc/bison.texinfo:
14421 Rewrite "Conditions for Using Bison".
14422 Update version to 1.24.
14423
14424 1995-05-03 Richard Stallman <rms@gnu.org>
14425
14426 * bison.simple: Change distribution terms.
14427
14428 1995-02-23 Richard Stallman <rms@gnu.org>
14429
14430 * src/files.c: Test __VMS_POSIX as well as VMS.
14431
14432 1995-02-14 Jim Meyering <meyering@gnu.org>
14433
14434 * src/bison.s1 (__yy_memcpy):
14435 Renamed from __yy_bcopy to avoid
14436 confusion. Reverse FROM and TO arguments to be consistent with
14437 those of memcpy.
14438
14439 1995-02-14 Jim Meyering <meyering@gnu.org>
14440
14441 * bison.simple (__yy_memcpy):
14442 Renamed from __yy_bcopy to avoid
14443 confusion. Reverse FROM and TO arguments to be consistent with
14444 those of memcpy.
14445
14446 1994-11-10 David J. MacKenzie <djm@gnu.org>
14447
14448 * NEWS: reformat
14449
14450 * NEWS: New file.
14451
14452 * Makefile.in (DISTFILES): Include NEWS.
14453
14454 * Makefile.in (DISTFILES):
14455 Include install-sh, not install.sh.
14456
14457 * configure.in: Update to Autoconf v2 macro names.
14458
14459 1994-10-05 David J. MacKenzie <djm@gnu.org>
14460
14461 * Makefile.in: fix typo
14462
14463 * Makefile.in (prefix, exec_prefix):
14464 Let configure set them.
14465
14466 1994-09-28 David J. MacKenzie <djm@gnu.org>
14467
14468 * Makefile.in: Set datadir to $(prefix)/share.
14469
14470 1994-09-15 Richard Stallman <rms@gnu.org>
14471
14472 * src/bison.s1:
14473 Update copyright notice and GPL version.
14474
14475 1994-09-15 Richard Stallman <rms@gnu.org>
14476
14477 * bison.simple:
14478 Update copyright notice and GPL version.
14479
14480 1994-07-12 Richard Stallman <rms@gnu.org>
14481
14482 * src/reduce.c, src/reader.c:
14483 entered into RCS
14484
14485 1994-05-05 David J. MacKenzie <djm@gnu.org>
14486
14487 * Makefile.in: entered into RCS
14488
14489 1994-03-26 Richard Stallman <rms@gnu.org>
14490
14491 * src/bison.s1: entered into RCS
14492
14493 1994-03-26 Richard Stallman <rms@gnu.org>
14494
14495 * bison.simple: entered into RCS
14496
14497 1994-03-25 Richard Stallman <rms@gnu.org>
14498
14499 * src/main.c: entered into RCS
14500
14501 1994-03-24 Richard Stallman <rms@gnu.org>
14502
14503 * src/conflicts.c: entered into RCS
14504
14505 1994-01-02 Richard Stallman <rms@gnu.org>
14506
14507 * Makefile.in: *** empty log message ***
14508
14509 1993-11-21 Richard Stallman <rms@gnu.org>
14510
14511 * src/bison.s1: *** empty log message ***
14512
14513 1993-11-21 Richard Stallman <rms@gnu.org>
14514
14515 * doc/bison.texinfo: entered into RCS
14516
14517 * doc/bison.texinfo: *** empty log message ***
14518
14519 1993-11-21 Richard Stallman <rms@gnu.org>
14520
14521 * bison.simple: *** empty log message ***
14522
14523 1993-10-25 David J. MacKenzie <djm@gnu.org>
14524
14525 * doc/bison.texinfo: *** empty log message ***
14526
14527 1993-10-19 Richard Stallman <rms@gnu.org>
14528
14529 * src/bison.s1: *** empty log message ***
14530
14531 1993-10-19 Richard Stallman <rms@gnu.org>
14532
14533 * bison.simple: *** empty log message ***
14534
14535 1993-10-14 Richard Stallman <rms@gnu.org>
14536
14537 * src/bison.s1: *** empty log message ***
14538
14539 1993-10-14 Richard Stallman <rms@gnu.org>
14540
14541 * bison.simple: *** empty log message ***
14542
14543 1993-09-14 David J. MacKenzie <djm@gnu.org>
14544
14545 * doc/bison.texinfo: *** empty log message ***
14546
14547 1993-09-13 Noah Friedman <friedman@gnu.org>
14548
14549 * Makefile.in: *** empty log message ***
14550
14551 1993-09-10 Richard Stallman <rms@gnu.org>
14552
14553 * src/conflicts.c: *** empty log message ***
14554
14555 * src/system.h: entered into RCS
14556
14557 1993-09-10 Richard Stallman <rms@gnu.org>
14558
14559 * doc/bison.1: entered into RCS
14560
14561 1993-09-06 Noah Friedman <friedman@gnu.org>
14562
14563 * src/version.c: entered into RCS
14564
14565 1993-09-06 Noah Friedman <friedman@gnu.org>
14566
14567 * Makefile.in: *** empty log message ***
14568
14569 1993-07-30 David J. MacKenzie <djm@gnu.org>
14570
14571 * Makefile.in: *** empty log message ***
14572
14573 1993-07-24 Richard Stallman <rms@gnu.org>
14574
14575 * src/bison.s1: *** empty log message ***
14576
14577 1993-07-24 Richard Stallman <rms@gnu.org>
14578
14579 * bison.simple: *** empty log message ***
14580
14581 1993-07-08 David J. MacKenzie <djm@gnu.org>
14582
14583 * Makefile.in: *** empty log message ***
14584
14585 1993-07-04 Richard Stallman <rms@gnu.org>
14586
14587 * src/bison.s1: *** empty log message ***
14588
14589 1993-07-04 Richard Stallman <rms@gnu.org>
14590
14591 * bison.simple: *** empty log message ***
14592
14593 1993-06-26 David J. MacKenzie <djm@gnu.org>
14594
14595 * src/getargs.c: entered into RCS
14596
14597 1993-06-26 David J. MacKenzie <djm@gnu.org>
14598
14599 * doc/bison.texinfo: *** empty log message ***
14600
14601 * doc/bison.1: New file.
14602
14603 1993-06-25 Richard Stallman <rms@gnu.org>
14604
14605 * src/getargs.c: New file.
14606
14607 1993-06-16 Richard Stallman <rms@gnu.org>
14608
14609 * src/bison.s1: *** empty log message ***
14610
14611 1993-06-16 Richard Stallman <rms@gnu.org>
14612
14613 * bison.simple: *** empty log message ***
14614
14615 1993-06-03 Richard Stallman <rms@gnu.org>
14616
14617 * src/bison.s1: New file.
14618
14619 1993-06-03 Richard Stallman <rms@gnu.org>
14620
14621 * doc/bison.texinfo: *** empty log message ***
14622
14623 1993-06-03 Richard Stallman <rms@gnu.org>
14624
14625 * bison.simple: New file.
14626
14627 1993-05-19 Richard Stallman <rms@gnu.org>
14628
14629 * doc/bison.texinfo: New file.
14630
14631 1993-05-07 Noah Friedman <friedman@gnu.org>
14632
14633 * Makefile.in: *** empty log message ***
14634
14635 1993-04-28 Noah Friedman <friedman@gnu.org>
14636
14637 * src/reader.c: *** empty log message ***
14638
14639 1993-04-23 Noah Friedman <friedman@gnu.org>
14640
14641 * src/alloc.h: entered into RCS
14642
14643 1993-04-20 David J. MacKenzie <djm@gnu.org>
14644
14645 * src/version.c: *** empty log message ***
14646
14647 * src/files.c, src/allocate.c:
14648 entered into RCS
14649
14650 * src/reader.c: *** empty log message ***
14651
14652 * src/lex.c: entered into RCS
14653
14654 * src/conflicts.c: New file.
14655
14656 * src/symtab.c: entered into RCS
14657
14658 * src/alloc.h: New file.
14659
14660 * src/LR0.c: entered into RCS
14661
14662 1993-04-18 Noah Friedman <friedman@gnu.org>
14663
14664 * src/reader.c: New file.
14665
14666 * src/version.c: *** empty log message ***
14667
14668 1993-04-18 Noah Friedman <friedman@gnu.org>
14669
14670 * Makefile.in: *** empty log message ***
14671
14672 1993-04-17 Noah Friedman <friedman@gnu.org>
14673
14674 * Makefile.in: *** empty log message ***
14675
14676 1993-04-15 Richard Stallman <rms@gnu.org>
14677
14678 * src/main.c, src/files.c:
14679 New file.
14680
14681 1993-04-15 Noah Friedman <friedman@gnu.org>
14682
14683 * configure.in: entered into RCS
14684
14685 * configure.in: *** empty log message ***
14686
14687 * configure.in: New file.
14688
14689 1993-04-14 Richard Stallman <rms@gnu.org>
14690
14691 * Makefile.in: New file.
14692
14693 1993-04-13 Richard Stallman <rms@gnu.org>
14694
14695 * src/version.c: New file.
14696
14697 1993-03-25 Richard Stallman <rms@gnu.org>
14698
14699 * src/output.c: entered into RCS
14700
14701 1992-09-25 Richard Stallman <rms@gnu.org>
14702
14703 * configure.bat: entered into RCS
14704
14705 1992-06-22 Richard Stallman <rms@gnu.org>
14706
14707 * src/vmsgetargs.c: entered into RCS
14708
14709 1992-06-22 Richard Stallman <rms@gnu.org>
14710
14711 * doc/bison.rnh: entered into RCS
14712
14713 1992-04-20 David J. MacKenzie <djm@gnu.org>
14714
14715 * README: entered into RCS
14716
14717 1992-01-22 Richard Stallman <rms@gnu.org>
14718
14719 * src/machine.h: entered into RCS
14720
14721 1991-12-21 Richard Stallman <rms@gnu.org>
14722
14723 * src/lalr.c, src/closure.c:
14724 entered into RCS
14725
14726 1991-12-20 Richard Stallman <rms@gnu.org>
14727
14728 * src/state.h: entered into RCS
14729
14730 1991-12-18 Richard Stallman <rms@gnu.org>
14731
14732 * src/print.c, src/nullable.c, src/derives.c:
14733 entered into RCS
14734
14735 1991-11-03 David J. MacKenzie <djm@gnu.org>
14736
14737 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
14738 entered into RCS
14739
14740 1988-09-09 Richard Stallman <rms@gnu.org>
14741
14742 * src/bison.hairy: entered into RCS
14743
14744 1987-12-16 Richard Stallman <rms@gnu.org>
14745
14746 * REFERENCES: entered into RCS
14747
14748
14749 -----
14750
14751 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
14752 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software
14753 Foundation, Inc.
14754
14755 Copying and distribution of this file, with or without
14756 modification, are permitted provided the copyright notice and this
14757 notice are preserved.