]> git.saurik.com Git - bison.git/blame - ChangeLog
* data/lalr1.cc: Move the body of the ctor and dtor into the
[bison.git] / ChangeLog
CommitLineData
98ae9643
AD
12005-11-12 Akim <akim@epita.fr>
2
3 * data/lalr1.cc: Move the body of the ctor and dtor into the
4 parser file (instead of the header).
5 Wrap the implementations in a "namespace yy".
6
72005-11-12 Akim Demaille <akim@epita.fr>
8
9 Have glr.c include its header file when created.
10 * data/glr.c (b4_shared_declarations): New.
11 Output them verbatim in the parser if !%defines, otherwise
12 output then in the header file, and include it instead.
13
1989d947
AD
142005-11-11 Akim Demaille <akim@epita.fr>
15
16 * data/glr.c: Comment changes.
17
182005-11-11 Akim Demaille <akim@epita.fr>
62b08cfc
AD
19
20 When yydebug, report semantic and location values for reductions.
21 * data/glr.c (yy_reduce_print): Report the semantic values and the
22 locations.
23 (YY_REDUCE_PRINT): Adjust.
24 (yyglrReduce): Use them.
25 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
26 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
27 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
28 traces.
29
02998094
AD
302005-11-10 Akim Demaille <akim@epita.fr>
31
32 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
33 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
34 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
35
5210672f
PE
362005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
37
38 * m4/cxx.m4, examples/Makefile.am: Don't build
39 examples/calc++ if no C++ compiler is available. (trivial change)
40
a8991a1d
AD
412005-11-09 Akim Demaille <akim@epita.fr>
42
43 * src/scan-skel.l: Use a couple of asserts.
44
36b5e963
AD
452005-11-03 Akim Demaille <akim@epita.fr>
46
47 In some (weird) cases, the final state number is incorrect.
48 Reported by Alexandre Duret-Lutz.
49 * src/LR0.c (state_list_append): Remove the computation of
50 final_state.
51 (save_reductions): Do it here.
52 (get_state): Alpha conversion.
53 (generate_states): Use a for loop.
54 * src/gram.h (item_number_is_rule_number)
55 (item_number_is_symbol_number): New.
56 * src/state.c: Use assert.
57 * src/system.h: Include assert.h.
58 * tests/sets.at (Accept): New.
59
44e7ead1
PH
602005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
61
62 * data/glr.c (yyfill): Adjust comment.
36b5e963 63 (yyresolveAction): Initialize default location properly
44e7ead1
PH
64 for empty right-hand sides.
65 (yydoAction): Ditto.
66 Add comment explaining apparently dead code.
36b5e963
AD
67 * tests/glr-regression.at
68 (Incorrectly initialized location for empty right-hand side in GLR):
44e7ead1 69 New test.
36b5e963 70
e10a80ee
PE
712005-10-30 Paul Eggert <eggert@cs.ucla.edu>
72
73 * bootstrap (cleanup_gnulib): New function. Use it to clean up
74 gnulib when interrupted. This fixes some race conditions and
75 works around some portability problems (one noted by Paul
76 Hilfinger).
77
067b32ee
AD
782005-10-22 Akim <akim@epita.fr>
79
80 * Makefile.cfg: Adjust to config -> build-aux.
81 Reported by twledo.
82
4b367315
AD
832005-10-21 Akim Demaille <akim@epita.fr>
84
85 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
86 the %parse-params.
87 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
88 * data/yacc.c (b4_Pure_if): Rename as...
89 (b4_yacc_pure_if): this.
90 (YY_SYMBOL_PRINT, yyparse): Adjust.
91 * doc/bison.texinfo: Formatting changes.
92
24cc23d9
AD
932005-10-21 Akim Demaille <akim@epita.fr>
94
95 Finish the transition config -> build-aux.
96 * configure.ac, Makefile.am: Use build-aux.
97 * config/prev-version, config/announce-gen, config/Makefile.am:
98 Move to...
99 * build-aux/prev-version, build-aux/announce-gen,
100 * build-aux/Makefile.am: here.
101
d4476375
AD
1022005-10-14 Akim Demaille <akim@epita.fr>
103
104 * examples/calc++/test: Use set -x only when VERBOSE.
105
302c0aee
PE
1062005-10-13 Paul Eggert <eggert@cs.ucla.edu>
107
108 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
109 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
110
7625ec2c
AD
1112005-10-13 Akim Demaille <akim@epita.fr>
112
113 * src/scan-skel.l: Output the base name parts of the parser and
114 header file names.
302c0aee 115 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
7625ec2c
AD
116 additional checks.
117 Use this to exercise C++ outputs in subdirs.
118 Reported by Oleg Smolsky.
119
ba0fe3c7
PE
1202005-10-12 Paul Eggert <eggert@cs.ucla.edu>
121
122 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
123 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
124 Problem reported by John P. Hartmann.
125 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
126 already defined it.
127
9b8a5ce0
AD
1282005-10-12 Akim Demaille <akim@epita.fr>
129
130 * src/parse-gram.y (version_check): Exit 63 to please missing
131 (stands for "version mismatch).
132 * tests/input.at, doc/bison.texinfo: Adjust.
133
4f6e011e
PE
1342005-10-10 Paul Eggert <eggert@cs.ucla.edu>
135
136 Work around portability problems with Visual Age C compiler
137 (xlc and xlC_r) reported by John P. Hartmann.
138 * data/location.cc (initial_column, initial_line): Remove.
139 All uses replaced by 0 and 1.
140 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
141 that xlc complains about.
142 * src/scan-skel.l (skel_wrap): Likewise.
4d7aa45e 143 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
ba0fe3c7 144 as __STDC__.
4d7aa45e
PE
145 * data/yacc.c (YYMODERN_C): New macro, which also looks at
146 __STDC_VERSION__. Use it everywhere instead of looking at
147 __STDC__ and __cplusplus.
4f6e011e 148
a1b3bf8c
AD
1492005-10-10 Akim Demaille <akim@epita.fr>
150
151 * examples/calc++/test: Be quiet unless VERBOSE.
152
412e44aa
PE
1532005-10-05 Paul Eggert <eggert@cs.ucla.edu>
154
2a4647a3
PE
155 * data/c.m4 (yydestruct, yysymprint):
156 Use YYUSE instead of casting to void.
157 * data/glr.c (YYUSE): New macro.
158 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
159 Use it instead of rolling our own.
160 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
161 (YYCHK1):
162 Use /*CONSTCOND*/ to suppress lint warnings.
163 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
164 (YY_STACK_PRINT): Use 'false' not '0'.
165 (YYUSE): New macro.
166 (yysymprint_, yydestruct_): Use it instead of rolling our own.
167 * data/yacc.c (YYUSE): New macro.
168 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
169 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
170 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
171
172
412e44aa
PE
173 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
174 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
175
88c6637f
PE
1762005-10-04 Paul Eggert <eggert@cs.ucla.edu>
177
2f4f028d
PE
178 Undo the parts of the unlocked-I/O change that substituted
179 putc or puts for printf. This might hurt performance a bit,
180 but some people prefer the printf style.
181 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
182 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
183 All uses replaced by YYFPRINTF and YYDPRINTF.
184 * data/yacc.c: Likewise.
185 * lib/bitset.c (bitset_print): Likewise.
186 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
187 putc and puts.
188 * lib/lbitset.c (debug_lbitset): Likewise.
189 * src/closure.c (print_firsts, print_fderives): Likewise.
190 * src/gram.c (grammar_dump): Likewise.
191 * src/lalr.c (look_ahead_tokens_print): Likewise.
192 * src/output.c (escaped_output): Likewise.
193 (user_actions_output): Break apart two printfs.
194 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
195 * src/reduce.c (reduce_print): Likewise.
196 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
197 * src/system.h: Include unlocked-io.h rathe than stdio.h.
198
88c6637f
PE
199 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
200 Use assignments rather than casts-to-void to suppress
201 unused-variable warnings. This pacifies 'lint'.
202 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
203 unused-variable warnings.
204
fb32e373
JMG
2052005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
206
207 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
208
edb8f44f
PE
2092005-10-02 Paul Eggert <eggert@cs.ucla.edu>
210
fb9c0b33
PE
211 Use unlocked I/O for a minor performance improvement on hosts like
212 GNU/Linux and Solaris that support unlocked I/O. The basic idea
213 is to use the gnlib unlocked-io module, and to prefer putc and
214 puts to printf when either will work (since the latter doesn't
215 come in an unlocked flavor).
216 * bootstrap (gnulib_modules): Add unlocked-io.
217 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
218 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
219 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
220 and similarly for puts and putc and printf.
221 * data/yacc.c: Likewise.
222 * lib/bitset.c (bitset_print): Likewise.
223 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
224 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
225 to printf.
226 * lib/lbitset.c (debug_lbitset): Likewise.
227 * src/closure.c (print_firsts, print_fderives): Likewise.
228 * src/gram.c (grammar_dump): Likewise.
229 * src/lalr.c (look_ahead_tokens_print): Likewise.
230 * src/output.c (escaped_output): Likewise.
231 (user_actions_output): Coalesce two printfs.
2f4f028d 232 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
fb9c0b33
PE
233 * src/reduce.c (reduce_print): Likewise.
234 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
2f4f028d 235 * src/system.h: Include unlocked-io.h rather than stdio.h.
fb9c0b33 236
edb8f44f
PE
237 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
238 this confuses xgettext.
239
b50d2359
AD
2402005-10-02 Akim Demaille <akim@epita.fr>
241
242 * bootstrap (gnulib_modules): Add strverscmp.
243 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
244 * m4/.cvsignore: Add strverscmp.m4.
245 * src/parse-gram.y (%require): New token, new rule.
246 (version_check): New.
247 * src/scan-gram.l (%require): Adjust.
248 * tests/input.at (AT_REQUIRE): New.
249 Use it.
250 * doc/bison.texinfo (Require Decl): New.
251 (Calc++ Parser): Use %require.
252
21667f64
AD
2532005-10-02 Akim Demaille <akim@epita.fr>
254
255 * data/location.cc: New.
256
2b81e969
AD
2572005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
258 Akim Demaille <akim@epita.fr>
259
260 Make sure -odir/foo.cc creates dir/location.hh etc.
261 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
262 (spec_file_prefix, spec_verbose_file, spec_graph_file)
263 (spec_defines_file): Now const.
264 (dir_prefix): New.
265 (short_base_name): Remove.
266 * src/files.c: Adjust.
267 (dirname.h): Include.
268 (base_name): Don't prototype it.
269 (finput): Remove, duplicates gram_in.
270 (full_base_name, short_base_name): Replace by...
271 (all_but_ext, all_but_tab_ext): these.
272 (compute_base_names): Rename as...
273 (compute_file_name_parts): this.
274 Update to compute the new variables, including dir_prefix.
275 Adjust dependencies.
276 * src/output.c (prepare): Output them.
277 * src/reader.c: Adjust to use gram_in, not finput.
278 * src/scan-skel.l (@dir_prefix@): New.
279
ad6a9b97
JMG
2802005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
281
282 * lib/subpipe.c: New function end_of_output_subpipe() added
283 to allow support for non-posix systems. This is a no-op function
284 for posix systems.
285
286 * lib/subpipe.h: New function end_of_output_subpipe() added
287 to allow support for non-posix systems. This is a no-op function
288 for posix systems.
289
290 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
291 handle the lack of pipe/fork functionality on non-posix systems.
292
293 * djgpp/Makefile.maint: DJGPP specific file.
294
295 * djgpp/README.in: DJGPP specific file.
296
297 * djgpp/config.bat: DJGPP specific configuration file.
298
299 * djgpp/config.sed: DJGPP specific configuration file.
300
301 * djgpp/config.site: DJGPP specific configuration file.
302
303 * djgpp/config_h.sed: DJGPP specific configuration file.
304
305 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
306
307 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
308
fc695704
AD
3092005-10-02 Akim Demaille <akim@epita.fr>
310
311 * data/location.cc: New, extract from...
312 * data/lalr1.cc: here.
313 (location.hh): Include it after the user prologue, in case the
314 filename type is defined by the user.
315 Forward declation location and position before the pre-prologue.
316 (yyresult_): Rename as...
317 (yyresult): this, it's a local variable, not an attribute.
318 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
319
3202005-10-01 Akim Demaille <akim@epita.fr>
5215c87f
AD
321
322 * examples/extexi: Restore the #line generation.
323
fb9712a9
AD
3242005-09-30 Akim Demaille <akim@epita.fr>,
325 Alexandre Duret-Lutz <adl@gnu.org>
326
327 Move the token type and YYSTYPE in the parser class.
328 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
329 (parser::token): New, from the moved free definition of tokens.
330 (parser::semantic_value): Now a full definition instead of an
331 indirection to YYSTYPE.
332 (b4_post_prologue): No longer included in the header file, but
333 in the implementation file.
334 * doc/bison.texi (C+ Language Interface): Update.
335 * src/parse-gram.y: Support unary %define.
336 * tests/actions.at: Define global_tokens_and_yystype for backward
337 compatibility until we update the tests.
338 * tests/calc.at: Idem.
339 (first_line, first_column, last_line, last_column): Define for lalr1.cc
340 to simplify the code.
341
55f0c7b1
PE
3422005-09-29 Paul Eggert <eggert@cs.ucla.edu>
343
344 Port to SunOS 4.1.4, which lacks strtoul and strerror.
345 Ah, the good old days! Problem reported by Peter Klein.
346 * bootstrap (gnulib_modules): Add strerror, strtoul.
347 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
348 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
349
fb9712a9 3502005-09-29 Akim Demaille <akim@epita.fr>
d4fb5e3c
AD
351
352 * data/c.m4 (b4_error_verbose_if): New.
353 * data/lalr1.cc: Use it.
354 (YYERROR_VERBOSE_IF): Remove.
355 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
356 parser members, replaced by...
357 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
358 local variables.
359 (yysyntax_error_): Takes the state number as argument.
360 (yyreduce_print_): Use the argument yyrule, not the former
361 attribute yyn_.
362
8a6f72f3
PE
3632005-09-26 Paul Eggert <eggert@cs.ucla.edu>
364
365 * bootstrap (gnulib_modules): Add verify.
366 * lib/.cvsignore: Add verify.h.
367 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
368 * src/system.h (verify): Remove.
369 Include verify.h instead.
370 * src/tables.c (tables_generate): Use new API for 'verify'.
371
0d50976f
PE
3722005-09-21 Paul Eggert <eggert@cs.ucla.edu>
373
ebc3737e
PE
374 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
375 local variables whose names begin with 'yy'.
376 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
377 Trivial changes from Joel E. Denny.
378
0d50976f
PE
379 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
380 it itself.
381 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
382 don't use alloca any more.
383
384 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
385 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
62c4328e 386 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
0d50976f
PE
387 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
388 to match yacc.c, to test more hosts.
389
a05b79df
PE
3902005-09-20 Paul Eggert <eggert@cs.ucla.edu>
391
55289366
PE
392 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
393 doesn't affect behavior.
394 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
395 Solaris, AIX, MSC.
396 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
397 This works a bit better with glibc, if user code has already included
398 stdlib.h.
399 * doc/bison.texinfo (Bison Parser): Document that users can't
400 arbitrarily use malloc and free for other purposes. Document
401 that <alloca.h> and <malloc.h> might be included.
402 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
403 user must declare alloca.
404
a05b79df
PE
405 * HACKING (release): Forwarn the Translation Project about
406 stable releses.
407
3ab2ca22
AD
4082005-09-20 Akim Demaille <akim@epita.fr>
409
410 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
411
a9739e7c
PE
4122005-09-19 Paul Eggert <eggert@cs.ucla.edu>
413
a702593e
PE
414 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
415 (YYSTACK_ALLOC_MAXIMUM): Use it.
416 (yysyntax_error): New function.
417 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
418 multiple syntax errors are reported, and alloca is being used.
419 Instead, reallocate buffers twice as big each time, so that
420 we waste at most half the allocated memory. Start with a small
421 (128-byte) buffer that will suffice in most cases anyway.
422 Use yysyntax_error to do most of the work.
423
424 * doc/bison.texinfo (Error Reporting, Table of Symbols):
425 yynerrs is the number of errors reported, not the number of
426 errors encountered.
427
a9739e7c
PE
428 * tests/glr-regression.at (Duplicated user destructor for lookahead):
429 Mark it as expected to fail.
430 Cast result of malloc; problem reported by twlevo@xs4all.nl.
431 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
432 Don't start user-code symbols with "yy", to avoid name space problems.
433
f479c6c6
AD
4342005-09-19 Akim Demaille <akim@epita.fr>
435
436 Remove the traits, failed experiment.
437 It never proved useful, and anyway because of the current
438 definition, it was not possible to have several specialization of
439 this traits, making it useless.
440 * data/lalr1.cc (yy:traits): Remove.
441 Inline its definitions in the parser class.
442
e2586f82
AD
4432005-09-19 Akim Demaille <akim@epita.fr>
444
445 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
446 least Mac OSX with a /usr/local install of gettext.
447
2e8cf949
AD
4482005-09-19 Akim Demaille <akim@epita.fr>
449
450 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
451 and yytoken for similarity with the other skeletons.
452
c7fb0b90
AD
4532005-09-19 Akim Demaille <akim@epita.fr>
454
455 * NEWS, configure.ac: Bump to 2.1a.
456
1bd0deda
PE
4572005-09-16 Paul Eggert <eggert@cs.ucla.edu>
458
459 * NEWS: Version 2.1.
460
461 * NEWS: Remove notice of yytname change, since it was never in an
462 official release.
463 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
464 diagnostic.
465 * src/output.c (prepare): Likewise.
466 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
467 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
468 is not defined. This is an awful hack, but it's enough for now.
469 All callers changed.
470 * tests/glr-regression-at (make_value): Args are const pointers now,
471 to avoid GCC warning.
472 (Duplicated user destructor for lookahead): New test. Currently
473 skipped. It fails on my host but I'm not sure it'll always fail.
474
4752005-09-16 Akim Demaille <akim@epita.fr>
c1432f65
AD
476
477 * src/symtab.h (struct symbol): Declare the printer and destructor
478 as const, to avoid accidental calls to free.
479 (symbol_destructor_set, symbol_printer_set): Adjust.
480 * src/symtab.c: Adjust.
481
1bd0deda 4822005-09-16 Akim Demaille <akim@epita.fr>
cf147260
AD
483
484 * data/c.m4 (b4_token_enums): New.
485 (b4_token_defines): Rename as...
486 (b4_token_enums_defines): this.
487 (b4_token_defines): New, output only the #defines.
488 * data/yacc.c, data/glr.c: Adjust.
489 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
490 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
491 as default values.
492
dbcdae2d
AD
4932005-09-16 Akim Demaille <akim@epita.fr>
494
495 * data/lalr1.cc (yylex_): Remove, inline its code.
496 (yyreport_syntax_error_): Remove, replaced by...
497 (yysyntax_error_): this which returns a string and leaves to the
498 caller the call to the users' error function.
499 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
500 Move from members of the parser object...
501 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
502 to local variables of the parse function.
503
70d8f291
AD
5042005-09-16 Akim Demaille <akim@epita.fr>
505
506 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
507 since it's in Bison's name space.
508
b47dbebe
PE
5092005-09-15 Paul Eggert <eggert@cs.ucla.edu>
510
ae199bf1
PE
511 * data/glr.c (yyresolveValue): Add default case to pacify
512 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
513
b47dbebe
PE
514 * NEWS: Document when yyparse started to return 2.
515 * doc/bison.texinfo (Parser Function): Document when yyparse
516 returns 2.
517
518 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
519 (b4_filename_type): Renamed back from b4_file_name_type. All uses
520 changed.
521 (class position): file_name -> filename (reverting). All uses changed.
522
5232005-09-14 Paul Eggert <eggert@cs.ucla.edu>
524
525 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
526 do anything if $@ exists. This reverts part of the 2005-07-07
527 patch.
528
00292f66
PE
5292005-09-11 Paul Eggert <eggert@cs.ucla.edu>
530
531 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
532 contains obsolete information and isn't worth distributing as a
533 separate file anyway.
534 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
535 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
536 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
537 (yyparse): Abort if user code uses longjmp to throw an unexpected
538 value.
539
a420f962
PE
5402005-09-09 Paul Eggert <eggert@cs.ucla.edu>
541
00292f66
PE
542 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
543 Suggested by twlevo@xs4all.nl.
544
127287e9
PE
545 * data/glr.c (YYCHK1): Do not assume YYE is in range.
546 This avoids a diagnostic from gcc -Wswitch-enum.
547 Problem reported by twlevo@xs4all.nl.
548
a420f962
PE
549 * doc/bison.texinfo: Don't use "filename", as per GNU coding
550 standards. Use "file name" or "file" or "name", depending on
551 the context.
552 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
553 not to hack/foo.tab.c.
554 (Calc++ Top Level): 2nd arg of main is not const.
48b16bbc
PE
555 * data/glr.c: b4_filename -> b4_file_name.
556 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
557 All uses changed.
558 (class position): filename -> file_name. All uses changed.
559 * data/yacc.c: b4_filename -> b4_file_name.
560 * lib/bitset.h: filename -> file_name in local vars.
561 * lib/bitset_stats.c: Likewise.
562 * src/files.c: Likewise.
563 * src/scan-skel.l ("@output ".*\n): Likewise.
564 * src/files.c (file_name_split): Renamed from filename_split.
565 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
a420f962
PE
566
5672005-09-08 Paul Eggert <eggert@cs.ucla.edu>
568
569 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
570 to accommodate latest gnulib.
571
572 * tests/glr-regression.at (Duplicate representation of merged trees):
573 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
574
575 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
576 needed.
577
42a6501d
PE
5782005-08-26 Paul Eggert <eggert@cs.ucla.edu>
579
580 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
581 All uses changed. Invoke user destructor after an error during a
582 split parse (trivial change from Joel E. Denny).
583
584 * tests/glr-regression.at
585 (User destructor after an error during a split parse): New test case.
586 Problem reported by Joel E. Denny in:
587 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
588
ef9a1faf
PE
5892005-08-25 Paul Eggert <eggert@cs.ucla.edu>
590
5b4aaf78
PE
591 * README-cvs: Give URLs for recommended tools.
592 Mention Gzip version problem, and bootstrapping issues.
593 Remove troubleshooting section, as it's somewhat obsolete.
594
b5240ba5
PE
595 * bootstrap (no_cache): New var, to accommodate different wget
596 variants. Use it instead of '-C off'. Problem reported by
597 twlevo@xs4all.nl.
598
ef9a1faf
PE
599 * data/glr.c (yydestroyStackItem): New function.
600 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
601 debugging information. Problem reported by Joel E. Denny.
602
e6efa9da
AD
6032005-08-25 Akim Demaille <akim@epita.fr>
604
605 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
606
adc90f13
PE
6072005-08-24 Paul Eggert <eggert@cs.ucla.edu>
608
609 * data/glr.c (yyrecoverSyntaxError, yyreturn):
610 Don't invoke destructor on unresolved entries.
611 * tests/glr-regression.at
612 (User destructor for unresolved GLR semantic value): New test case.
613 Problem reported by Joel E. Denny in:
614 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
615
f9315de5
PE
6162005-08-21 Paul Eggert <eggert@cs.ucla.edu>
617
15d29c1f
PE
618 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
619 Add strnlen.c.
620 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
621 lib-prefix.m4, po.m4.
622
dd5f2af2
PE
623 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
624 in yydestruct diagnostic, since it might not be an error.
625 Problem reported by Joel Denny near end of
626 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
6250acbd 627 * data/lalr1.cc (yyerturn): Likewise.
dd5f2af2
PE
628 * data/yacc.c (yyreturn): Likewise.
629 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
630
631 * src/files.c: Remove obsolete FIXME comment.
632
633 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
634 with the other templates, and to fix bogus run-on messages such
635 as the one reported at the end of
636 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
637 All callers changed to avoid the newline.
638 (yyprocessOneStack): Output two lines rather than one, to accommodate
639 the above change. This changes the debug output format slightly.
640
f9315de5
PE
641 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
642 reported by Joel E. Denny in
643 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
644 (trivial change).
645 * tests/glr-regression.at (Duplicate representation of merged trees):
646 New test, from Joel E. Denny in:
647 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
648 * THANKS: Add Joel E. Denny.
649
650 * configure.ac (AC_INIT): Bump to 2.0c.
651
04098407
PE
6522005-07-24 Paul Eggert <eggert@cs.ucla.edu>
653
654 * NEWS: Version 2.0b.
655
ca5d2013
PE
656 * Makefile.am (SUBDIRS): Put examples before tests, so that
657 "make check" doesn't finish with "All 1 tests passed".
658
3d54b576
PE
659 * tests/regression.at (Token definitions): Don't rely on
660 AT_PARSER_CHECK for data that contains backslashes. It currently
661 uses 'echo', and 'echo' isn't portable if its argument contains
662 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
663 that the byte '\0xff' is not printable in the C locale; it is,
664 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
665 not printable, so use '\0x81' to test.
666
d53ae497
PE
667 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
668 version of GCC, since the macro is used with non-GCC compilers.
669
fc01665e
PE
670 Fix core dump reported by Pablo De Napoli in
671 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
672 * tests/regression.at (Invalid inputs with {}): New test.
673 * src/parse-gram.y (token_name): Translate type before using
674 it as an index.
675
04098407
PE
676 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
677 the user's name space. All uses changed to __attribute__
678 ((__unused__)).
679 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
680 Add __attribute__ ((__noreturn__)).
681
682 * etc/clcommit: Remove. We weren't using it, and it failed
683 "make maintainer-distcheck".
684 * Makefile.maint: Merge from coreutils.
685 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
686 (syntax-check-rules): Change list of rules as described below.
687 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
688 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
689 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
690 (sc_trailing_space): New rules.
691 (sc_xalloc_h_in_src): Remove.
692 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
693 (sc_space_tab, sc_error_exit_success, sc_changelog):
694 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
695 (makefile-check, po-check, author_mark_check):
696 (makefile_path_separator_check, copyright-check):
697 Use grep -n, to make it easier to find violations.
698 Use CVS_LIST and CVS_LIST_EXCEPT.
699 (header_regexp, h_re): Remove.
700 (dd_c): New macro.
701 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
702 (my-distcheck): Use more-modern GCC flags.
703 (signatures, %.asc): Remove.
704 (rel-files, announcement): Remove signatures.
705 Restore old updating code, even though we don't use it, so
706 that we're the same as coreutils.
707 (alpha, beta, major): Depend on news-date-check.
708 Make the upload commands.
709
710 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
711 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
712 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
713 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
714 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
715 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
716 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
717 * tests/sets.at: Likewise.
718
719 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
720 we comment out the Autoconf version number.
721 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
722 it's error-prone and "make maintainer-distcheck" rejects it.
723
724 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
725 Indent calls to "error" to pacify "make maintainer-distcheck",
726 when the calls are not intended to be translated.
727 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
728
729 * src/Makefile.am (DEFS): Use +=, to pacify
730 "make maintainer-distcheck".
731 (bison_SOURCES): Add scan-skel.h.
732 (sc_tight_scope): New rule, from coreutils.
733
734 * src/files.c (src_extension, header_extension):
735 Now static, not extern.
736 * src/getargs.c (short_options): Likewise.
737 * src/muscle_tab.c (muscle_table): Likewise.
738 * src/parse-gram.y (current_class, current_type, current_prec):
739 Likewise.
740 * src/reader.c (grammar_end, previous_rule_end): Likewise.
741 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
742 * src/main.c (main): Cast bindtextdomain and textdomain calls to
743 void, to avoid warning when NLS is disabled.
744 * src/output.c: Include scan-skel.h.
745 (scan_skel): Remove decl, since scan-skel.h does this.
746 (output_skeleton):
747 Indent calls to "error" to pacify "make maintainer-distcheck".
748 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
749 * src/reader.h (gram_end, gram_lineno): New decls to pacify
750 "make maintainer-distcheck".
751 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
752 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
753 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
754 (skel_lex_destroy, scan_skel): Move these decls to...
755 * src/scan-skel.h: New file.
756 * src/uniqstr.c (uniqstr_assert):
757 Indent calls to "error" to pacify "make maintainer-distcheck".
758
759 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
760 not @VAR@.
761
762 * tests/torture.at: Revamp to avoid misuse of atoi that
763 "make maintainer-distcheck" complained about.
764
765 * examples/extexi (message): Don't print a message more than once,
766 and omit line-number decoration that makes Emacs compile think
767 that informative messages are worth worrying about.
768
7692005-07-22 Paul Eggert <eggert@cs.ucla.edu>
770
771 * configure.ac: Update version number.
772
773 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
774 accidentally.
775 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
776 autogenerated by the maintainer.
777 * examples/calc++/.cvsignore: Add *.yy.
778
779 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
780 * lib/bitset_stats.c (bitset_stats_init): Likewise.
781 * lib/bitsetv.c (bitsetv_alloc): Likewise.
782
783 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
784
785 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
786 from maintainer-distcheck about casting the argument of 'free'.
787
788 * NEWS: Mention recent yytname changes.
789 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
790
791 * bootstrap: For translations that have not yet been upgraded to
792 the new runtime-po domain, prime the pump by extracting the
793 relevant strings from the obsolete translations. This code can be
794 removed once the bison-runtime domain has been translated by each
795 team.
796
797 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
798 now that token names are already quoted.
799
800 Fix problem reported by Anthony Heading.
801 * data/glr.c (YYTOKEN_TABLE): New macro.
802 (yytname): Define if YYTOKEN_TABLE.
803 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
804 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
805 (YYERROR_VERBOSE): Define the same way the other skeletons do.
806 * src/output.c (prepare_symbols): Output token_table_flag.
807
0ffda363
PE
8082005-07-21 Paul Eggert <eggert@cs.ucla.edu>
809
810 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
811 again if the first call fails.
812
813 * data/glr.c (yytnamerr): New function.
814 (yyreportSyntaxError): Use it to dequote most string literals.
815 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
816 with other skeletons. All uses changed.
817 (yytnameerr_): New function.
818 (yyreport_syntax_error): Use it to dequote most string literals.
819 * data/yacc.c (yytnamerr): New function.
820 (yyerrlab): Use it to decode most string literals.
821 * doc/bison.texinfo (Decl Summary, Calling Convention):
822 Clarify quoting convention of yytname.
823 * src/output.c (prepare_symbols): Quote all names. This undoes
824 the 2005-04-17 change, which is now accomplished (mostly) via
825 changes in the parsers as described above.
826 * tests/regression.at (Token definitions, Web2c Actions):
827 Undo most 2005-04-17 change here, too.
828
8292005-07-20 Paul Eggert <eggert@cs.ucla.edu>
830
831 Fix more problems reported by twlevo@xs4all.nl.
832 * tests/cxx-type.at: Don't pipe output of ./types through sed to
833 remove trailing spaces. This loses the exit status of ./types,
834 and isn't needed since ./types shouldn't be emitting trailing
835 spaces.
836 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
837 as the stack isn't valid in that case.
838
839 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
840 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
841 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
842 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
843 is used.
844 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
845 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
846 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
847 Likewise.
848
849 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
850 overly-picky compilers that reject 'char *foo = "bar";'.
851
852 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
853 to FILE * parameter, not to stderr. This fixes a typo introduced
854 in the 2005-07-12 change.
855
856 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
857 warnings from GCC 4.
858
859 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
860 (yyglrShiftDefer, yysplitStack):
861 Remove unused parameters b4_pure_formals. All uses changed.
862 (yyglrShift): Remove unused parameters b4_user_formals.
863 All uses changed.
864 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
865
6100a9aa
PE
8662005-07-18 Paul Eggert <eggert@cs.ucla.edu>
867
258b75ca
PE
868 Destructor cleanups and regularization among the three skeletons.
869 * NEWS: Document the behavior changes.
870 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
871 stack before failing, as the cleanup code will do it for us now.
872 * data/lalr1.cc (yyerrlab): Likewise.
873 * data/glr.c (yyparse): Pop everything off the stack before
874 freeing it, so that destructors get called properly.
875 * data/lalr1.cc (yyreturn): Likewise.
876 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
877 This is more consistent.
878 * doc/bison.texinfo (Destructor Decl): Mention more reasons
879 why destructors might be called. 1.875 -> 2.1.
880 (Destructor Decl, Decl Summary, Table of Symbols):
881 Some English-language cleanups for %destructor.
882 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
883 Add output line for destructor of start symbol.
884 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
885 because of that same extra output line.
886
1a059451
PE
887 * NEWS: Document minor wording changes in diagnostics of
888 Bison-generated parsers.
889 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
890 Remove unused formals. All uses changed.
891 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
892 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
893 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
894 Rename yyoverflowab to yyexhaustedlab.
895 When memory exhaustion occurs during syntax-error reporting,
896 report it separately rather than in a single diagnostic; this
897 eases translation.
898 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
899 (Memory Exhausted): Renamed from Parser Stack Overflow.
900 Revamp wording slightly to prefer "memory exhaustion".
901 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
902
97460c78
PE
903 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
904
30757c8c
PE
905 Add i18n support to the GLR skeleton. Partially fix the C++
906 skeleton; a C++ expert needs to finish this. Remove debugging
907 msgids; there's little point to having them translated, since they
908 can be understood only by someone who can read the
909 (English-language) source code.
910
911 Generate runtime-po/bison-runtime.pot automatically, so that we
912 don't have to worry about garbage getting in that file. We'll
913 make sure after the next official release that old msgids don't
914 get lost. See
915 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
916
917 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
918 Now auto-generated.
919 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
920 Fix typos in explanations of the runtime file.
921 * bootstrap: Change gettext keyword from YYI18N to YY_.
922 Use standard Makefile.in.in in runtime-po, since we'll arrange
923 for backward-compatible bison-runtime.po files in a different way.
924 * data/glr.c (YY_): New macro, from yacc.c.
925 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
926 Translate messages intended for users.
927 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
928 the wording in the other skeletons. We don't know that the memory
929 is virtual.
930 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
931 Use same method that yacc.c uses.
932 Don't translate debugging messages.
933 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
934 it doesn't work (yet), and requires C++ expertise to fix.
935 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
936 Move defn to a more logical place, to be consistent with other
937 skeletons.
938 Don't translate debugging messages.
939 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
940 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
941 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
942 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
943
ac8c5689
PE
944 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
945 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
946 void, not int.
947 * tests/glr-regression.at (Badly Collapsed GLR States):
948 Likewise.
949 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
950 yylex should return 0 at EOF rather than aborting.
951
6100a9aa
PE
952 Improve tests for stack overflow in GLR parser.
953 Problem reported by twlevo@xs4all.nl.
954 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
955 All uses removed.
956 (yyStackOverflow): Just longjmp, but with value 2 so that caller
957 can handle the problem.
958 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
959 (yyparse): New local variable yyresult to record the result.
960 Use result of setjmp to set it, rather than storing itinto
961 struct.
962 (yyDone): Remove label.
963 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
964 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
965 if YYABORT is used).
966 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
967 yyparse status; put status > 1 into diagnostic.
968 Check that status==2 works.
969 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
970 Use exit status 3 for failure to open (which shouldn't happen).
971
15f40952
PE
9722005-07-17 Paul Eggert <eggert@cs.ucla.edu>
973
67fd79c4
PE
974 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
975 1 on syntax error; just let yyparse do its thing.
976 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
977 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
978 (Exploding the Stack Size with Alloca):
979 (Exploding the Stack Size with Malloc):
980 Expect exit status 2, not 1, since the parser is supposed to blow
981 its stack. Problem reported by twlevo@xs4all.nl.
982
15f40952
PE
983 * data/glr.c (yyparse): Don't assume that the initial calls
984 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
985 Print a stack-overflow message and fail instead.
986 Initialize the line-number information before creating the stack,
987 so that the stack-overflow message can report line zero safely.
988
f32c66b5
PE
9892005-07-14 Paul Eggert <eggert@cs.ucla.edu>
990
a22ff96f 991 Fix problems reported by twlevo@xs4all.nl.
e2688cd9
PE
992 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
993 (yyuserMerge): Provide a default case if b4_mergers is empty.
994 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
995 * tests/glr-regression.at
996 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
c70fdfcd 997 Add casts to pacify C++ compilers.
1beb0b24
PE
998 * tests/glr-regression.at (Improper merging of GLR delayed action
999 sets): Declare yylex before using it.
f32c66b5 1000 * tests/Makefile.am (maintainer-check-g++): Fix a stray
a22ff96f
PE
1001 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
1002 test for valgrind; valgrind is independent of g++.
1003 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
1004 for compatibility with POSIX 1003.1-2001 (if running coreutils).
1005 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
1006 Use a destructor, so that we can expand the stack. Change
1007 YYSTYPE to char * so that we can free it. Cast result of malloc.
f32c66b5 1008
d741bd1b
PE
10092005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
1010
1011 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
1012 a valgrind failure. Problem reported by twlevo@xs4all.nl.
1013
0410a6e0
PE
10142005-07-13 Paul Eggert <eggert@cs.ucla.edu>
1015
1016 * PACKAGING: New file, suggested by Bruno Haible and taken from
1017 similar wording in gettext's PACKAGING file.
1018 * NEWS: Mention PACKAGING.
1019 * Makefile.am (EXTRA_DIST): Add PACKAGING.
1020
f7ab6a50
PE
10212005-07-12 Paul Eggert <eggert@cs.ucla.edu>
1022
baf785db 1023 * NEWS: Document recent i18n improvements.
f7ab6a50
PE
1024 * bootstrap: Get runtime translations into runtime-po.
1025 Create runtime-po files automatically, if possible.
1026 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
1027 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
1028 does not infringe on the user's name space.
1029 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
1030 * doc/bison.texinfo (Internationalization): Revamp the English
1031 and Texinfo syntax a bit, to try to make it clearer.
1032 (Bison Options, Option Cross Key): Mention --print-localedir.
1033 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
1034 YYENABLE_NLS. Quote a bit more.
1035 * runtime-po/.cvsignore: New file.
1036 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
1037 * runtime-po/Rules-quot: Remove; now created by bootstrap.
1038 * runtime-po/quot.sed: Likewise.
1039 * runtime-po/boldquot.sed: Likewise.
1040 * runtime-po/en@quot.header: Likewise.
1041 * runtime-po/en@boldquot.header: Likewise.
1042 * runtime-po/insert-header.sin: Likewise.
1043 * runtime-po/remove-potcdate.sin: Likewise.
1044 * runtime-po/Makevars: Likewise.
1045 * runtime-po/LINGUAS: Likewise.
1046 * runtime-po/de.po: Likewise; we will rely on the translation project
1047 to maintain this, so "bootstrap" should get it.
0410a6e0 1048 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
f7ab6a50
PE
1049 its value.
1050 * src/main.c (main): Bind the bison-runtime domain, too.
1051
10522005-07-12 Bruno Haible <bruno@clisp.org>
1053
1054 * data/yacc.c: Include <libintl.h> when NLS is enabled.
1055 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
1056 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
1057 * runtime-po: New directory.
1058 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
1059 $(DOMAIN).pot-update rule, so that old messages are never dropped.
1060 * runtime-po/Rules-quot: New file, copied from po/.
1061 * runtime-po/quot.sed: Likewise.
1062 * runtime-po/boldquot.sed: Likewise.
1063 * runtime-po/en@quot.header: Likewise.
1064 * runtime-po/en@boldquot.header: Likewise.
1065 * runtime-po/insert-header.sin: Likewise.
1066 * runtime-po/remove-potcdate.sin: Likewise.
1067 * runtime-po/Makevars: New file.
1068 * runtime-po/POTFILES.in: New file.
1069 * runtime-po/LINGUAS: New file.
1070 * runtime-po/bison-runtime.pot: New file.
1071 * runtime-po/de.po: New file.
1072 * m4/bison.m4: New file.
1073 * Makefile.am (SUBDIRS): Add runtime-po.
1074 (aclocaldir, aclocal_DATA): New variables.
1075 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
1076 Define aclocaldir.
1077 * src/getargs.c (usage): Document --print-localedir option.
1078 (PRINT_LOCALEDIR_OPTION): New enum item.
1079 (long_options): Add --print-localedir option.
1080 (getargs): Handle --print-localedir option.
1081 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
1082 (Internationalization): New section.
1083
22dda0f0
AD
10842005-07-12 Akim Demaille <akim@epita.fr>
1085
1086 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
1087 for consistency with the rest of the code.
1088 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
1089 Add separators.
1090
82b248ad
AD
10912005-07-12 Akim Demaille <akim@epita.fr>
1092
1093 * src/parse-gram.y: Use %printer instead of YYPRINT.
1094
fa0e9314
AD
10952005-07-12 Akim Demaille <akim@epita.fr>
1096
867a3e00
AD
1097 * src/symtab.h, src/symtab.c (symbol_print): New.
1098 * src/symlist.h, src/symlist.c (symbol_list_print): New.
1099 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
1100
11012005-07-12 Akim Demaille <akim@epita.fr>
1102
1103 * data/glr.c (b4_syncline): Fix (swap) the definitions of
fa0e9314
AD
1104 b4_at_dollar and b4_dollar_dollar.
1105
e054b190
PE
11062005-07-11 Paul Eggert <eggert@cs.ucla.edu>
1107
1108 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
1109 and Pennello's paper.
1110
34160ec4
PE
11112005-07-09 Paul Eggert <eggert@cs.ucla.edu>
1112
407d4a75
PE
1113 * data/yacc.c (yyparse): Undo previous patch. Instead,
1114 set yylsp[0] and yyvsp[0] only if the initial action
1115 sets yylloc and yylval, respectively.
1116
34160ec4
PE
1117 * data/yacc.c (yyparse): In the initial action, set
1118 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
1119 This avoids the use of undefined variables if the initial
1120 action does not set yylloc and/or yylval.
1121
c3d5a4a7
PE
11222005-07-07 Paul Eggert <eggert@cs.ucla.edu>
1123
b34d96c1
PE
1124 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
1125 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
1126 Remove from CVS. These files are automatically generated.
1127 * examples/extexi: Clarify that this file is now part of Bison,
1128 not GNU M4, and that it works with any POSIX-compatible Awk.
1129 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
1130 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
1131 so that we also get calc++-parser.yy. Geneate it.
1132 Use $(AWK), not gawk, since any conforming Awk will do.
1133 Put comment before action, since older 'make' can't handle comment
1134 in action.
1135 $(BUILT_SOURCES): List all built sources, not just some of them.
1136 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
1137 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
1138 $($(calc_sources_generated)): Remove unnecessary test for existence
1139 of target. (This had a shell syntax error anyway; a stray "x".)
1140 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
1141 calc++-parser.yy.
1142 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
1143
c3d5a4a7
PE
1144 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
1145 implied by the other modules.
1146
828c373b
AD
11472005-07-06 Akim Demaille <akim@epita.fr>
1148
1149 Bind examples/calc++ to the package.
1150 * examples/calc++/Makefile: Remove, replaced by...
1151 * examples/calc++/Makefile.am: ... this new file.
1152 * examples/calc++/test: Remove input.
1153 * examples/calc++/compile: Remove.
1154 * examples/Makefile.am: New.
1155 * configure.ac, Makefile.am: Adjust.
1156 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
1157
63cb01d6
PE
11582005-07-05 Paul Eggert <eggert@cs.ucla.edu>
1159
fd2df2ed
PE
1160 * data/glr.c (yyFail): Drastically simplify; since the format argument
1161 never had any % directives, we can simply pass it to yyerror.
1162 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
1163 be modified later, as that is the usual style in glr.c.
1164 Problems reported by Paul Hilfinger.
1165
63cb01d6
PE
1166 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
1167 and size overflow errors.
1168 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
1169 in case the user prolog sets feature-test macros like _GNU_SOURCE.
1170 (YYSIZEMAX): New macro.
1171 (yystpcpy): New function, taken from yacc.c.
1172 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
1173 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
1174 so that we don't have to maintain their signatures.
1175 (yyFail): Check for buffer overflow, by using vsnprintf rather
1176 than vsprintf. Allocate a bigger buffer if possible.
1177 Report an error if buffer allocation fails.
1178 (yyStackOverflow): New function.
1179 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
1180 the initialization was successful. It might fail if storage was
1181 exhausted.
1182 (yyexpandGLRStack): Add more checks for storage allocation failure.
1183 Use yyStackOverflow to report failures.
1184 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
1185 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
1186 Don't assume stack number fits in int.
1187 (yysplitStack): Check for storage allocation failure.
1188 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
1189 can print diagnostics on storage allocation failure. All callers
1190 changed.
1191 (yyresolveValue): Use yybool for boolean.
1192 (yyreportSyntaxError): Check for size-calculation overflow.
1193 This code is taken from yacc.c.
1194 (yyparse): Check for storage allocation errors when allocating
1195 the initial stack.
1196
1c59e0a1
AD
11972005-07-05 Akim Demaille <akim@epita.fr>
1198
1199 Extract calc++ from the documentation.
1200 * doc/bison.texinfo (Calc++): Add the extraction marks.
1201 * examples/extexi: New, from the aborted GNU Programming 2E.
1202 Separate the different paragraph of a file with empty lines.
1203 * examples/Makefile: Use it to extract the whole calc++ example.
1204
8a0adb01
AD
12052005-06-24 Akim Demaille <akim@epita.fr>
1206
1207 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
1208 class typedefs.
1209
12545799
AD
12102005-06-22 Akim Demaille <akim@epita.fr>
1211
1212 * doc/bison.texinfo (C++ Language Interface): First stab.
1213 (C++ Parsers): Remove.
1214
99be0235
AD
12152005-06-22 Akim Demaille <akim@epita.fr>
1216
1217 * data/lalr1.cc (yylex_): Honor %lex-param.
1218
0ffd4fd1
AD
12192005-06-22 Akim Demaille <akim@epita.fr>
1220
1221 Start a set of simple examples.
1222 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
1223 * examples/calc++/calc++-driver.hh,
1224 * examples/calc++/calc++-parser.yy,
1225 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
1226 * examples/calc++/compile, examples/calc++/test: New.
1227
0925ebb4
PE
12282005-06-09 Paul Eggert <eggert@cs.ucla.edu>
1229
1230 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
1231 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
1232 which stems from the 2005-05-27 patch.
1233
43d3b664
PH
12342005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
1235
1236 * data/glr.c: Modify treatment of unused parameters to permit use
1237 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
1238
3062864d
PE
12392005-05-30 Paul Eggert <eggert@cs.ucla.edu>
1240
1241 Fix infringement on user name space reported by Janos Zoltan Szabo.
1242 * data/yacc.c (yyparse): strlen -> yystrlen.
1243
989b5b8e
AD
12442005-05-30 Akim Demaille <akim@epita.fr>
1245
1246 * data/lalr1.cc (_): New.
1247 Translate the various messages.
1248
bedf57f5
PE
12492005-05-27 Paul Eggert <eggert@cs.ucla.edu>
1250
1251 Fix infringement on user name space reported by Bruno Haible.
1252 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
1253 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
1254 the user's name space.
1255 (alloca): Include <stdlib.h> to get it, if it's not built in.
1256 (YYMALLOC, YYFREE): Define only if needed.
1257 (malloc, free): Declare, but only if needed, as this infringes on
1258 the user name space.
1259
4d1801f1
PE
12602005-05-25 Paul Eggert <eggert@cs.ucla.edu>
1261
1262 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
1263 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
1264 with %d format.
1265 * lib/ebitset.c (min, max): Undef before defining.
1266 * lib/vbitset.c (min, max): Likewise.
1267 * lib/subpipe.c (create_subpipe): Save local variables in case
1268 vfork clobbers them.
1269
12702005-05-24 Bruno Haible <bruno@clisp.org>
1271
1272 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
1273 error message syntax used by gcc-4.0.
1274
b94a9e1e
PE
12752005-05-23 Paul Eggert <eggert@cs.ucla.edu>
1276
85ac3861
PE
1277 * README: Mention m4 1.4.3. Remove obsolete advice about
1278 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
1279
b94a9e1e
PE
1280 * bootstrap: Remove workaround for problem I encountered with
1281 gettext 0.14.1; it seems to be fixed now.
1282
51c30d21
PE
12832005-05-22 Paul Eggert <eggert@cs.ucla.edu>
1284
009ce67d
PE
1285 * NEWS: Version 2.0a.
1286
f2a97c62
PE
1287 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
1288 the previous change.
1289
c8775f93
PE
1290 Various maintainer cleanups.
1291 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
1292 conftest*, for benefit of CVS commands run at the same time as
1293 "configure". Add build-aux, since "bootstrap" now creates it and
1294 its subfiles.
1295 * Makefile.cfg (move_if_change): Remove.
1296 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
1297 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
1298 (po_repo, do-po-update, po-update, wget_files, get-targets):
1299 (config.guess-url_prefix, config.sub-url_prefix):
1300 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
1301 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
1302 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
1303 Remove.
1304 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
1305 this is now the recommended name.
1306 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
1307 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
1308 ylwrap. These files now go into build-aux.
1309 * config/move-if-change: Remove.
1310 * config/prev-version.txt: Bump from 1.75 to 2.0.
1311
3ea5f0ec
PE
1312 * bootstrap: Add stdio-safer, unistd-safer modules.
1313 Remove m4/glibc2.m4 (introduced by latest gnulib, but
1314 we don't need it).
1315 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
1316 fopen-safer.c, stdio-safer.h, unistd-safer.h.
1317 * lib/subpipe.c: Include "unistd-safer.h".
1318 (create_subpipe): Make sure all the newly-created
1319 file descriptors are > 2, so that diagnostics don't
1320 get sent down them (which might cause Bison to hang, in theory).
1321 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
1322 * src/files.c (xfopen): Use fopen_safer, not fopen.
1323
51c30d21
PE
1324 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
1325 yesterday's yacc.c fix.
1326
cea1469d
PE
13272005-05-21 Paul Eggert <eggert@cs.ucla.edu>
1328
3ea5f0ec
PE
1329 * data/glr.c, data/lalr1.cc: Update copyright date.
1330
cea1469d
PE
1331 Fix a destructor bug reported by Wolfgang Spraul in
1332 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
1333 * data/yacc.c (yyabortlab): Don't call destructor, and
1334 don't set yychar to EMPTY.
1335 (yyoverflowlab): Don't call destructor.
1336 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
1337 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
1338 since we no longer output the message "discarding lookahead token
1339 end of input ()".
1340
5e6f62f2
PH
13412005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
1342
1343 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
1344 fix a small glitch in debugging output.
1345 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
1346 after YY_SYMBOL_PRINT where needed.
1347
1348 (struct yyGLRState): Add some comments.
1349 (struct yySemanticOption): Add some comments.
1350 (union yyGLRStackItem): Add comment.
1351
1352 (yymergeOptionSets): Correct this to properly perform the union,
1353 avoiding infinite reported by Michael Rosien.
1354 Update comment.
1355
1356 * tests/glr-regression.at: Add test for GLR merging error reported
1357 by M. Rosien.
cea1469d 1358
0fb669f9
PE
13592005-05-13 Paul Eggert <eggert@cs.ucla.edu>
1360
1361 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
1362 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
1363 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
1364 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
1365 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
1366 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
1367 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
1368 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
1369 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
1370 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
1371 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
1372 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
1373 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
1374 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
1375 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
1376 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
1377 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
1378 src/derives.h, src/files.c, src/files.h, src/getargs.c,
1379 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
1380 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
1381 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
1382 src/output.h, src/parse-gram.c, src/parse-gram.h,
1383 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
1384 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
1385 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
1386 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
1387 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
1388 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
1389 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
1390 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
1391 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
1392 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
1393 tests/reduce.at, tests/regression.at, tests/sets.at,
1394 tests/synclines.at, tests/testsuite.at, tests/torture.at:
1395 Update FSF postal mail address.
1396
51f4735e
PE
13972005-05-11 Paul Eggert <eggert@cs.ucla.edu>
1398
1399 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
1400 Problem reported by Ralf Menzel.
1401
80ce3401
PE
14022005-05-01 Paul Eggert <eggert@cs.ucla.edu>
1403
1404 * tests/actions.at: Test that stack overflow invokes destructors.
1405 From Marcus Holland-Moritz.
1406 * data/yacc.c (yyerrlab): Move the code that destroys the stack
1407 from here....
1408 (yyreturn): to here. That way, destructors are called properly
1409 even if the stack overflows, or the user calls YYACCEPT or
1410 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
1411 (yyoverflowlab): Destroy the lookahead.
1412
14132005-04-24 Paul Eggert <eggert@cs.ucla.edu>
1414
1415 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
1416
72f000b0
PE
14172005-04-17 Paul Eggert <eggert@cs.ucla.edu>
1418
1419 * NEWS: Bison-generated C parsers no longer quote literal strings
1420 associated with tokens.
1421 * src/output.c (prepare_symbols): Don't escape strings,
1422 since users don't want to see C escapes.
1423 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
1424 in diagnostics.
c19683bb 1425 * tests/input.at (Torturing the Scanner): Likewise.
72f000b0
PE
1426 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
1427
1094323f
PE
14282005-04-16 Paul Eggert <eggert@cs.ucla.edu>
1429
1430 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
1431 the data size is known to be too small and we can't increase it.
1432 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
1433
ca407bdf
PE
14342005-04-15 Paul Eggert <eggert@cs.ucla.edu>
1435
1436 * src/parse-gram.y: Include quotearg.h.
1437 (string_as_id): Quote $1 before using it as a key, since the
1438 lexer no longer quotes it for us.
1439 (string_content): Don't strip quotes, since lexer no longer
1440 quotes it for us.
1441 * src/scan-gram.l: Include quotearg.h.
1442 ("\""): Omit quote.
1443 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
1444 a key, since the rest of the lexer doesn't quote it.
1445 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
1446 * tests/regression.at (Token definitions): Check for backslashes
1447 in token strings.
1448
1449 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
1450 (YYSIZE_T): Define to unsigned long int when using an older compiler.
1451 (yyparse): Revamp code to generate long syntax error message, to
1452 make it easier to translate, and to avoid problems with arithmetic
1453 overflow. Change "virtual memory" to "memory" in diagnostic, since
1454 we don't know whether the memory is virtual.
1455
1ce59070
PE
14562005-04-13 Paul Eggert <eggert@cs.ucla.edu>
1457
1458 * NEWS: Bison-generated C parsers now use the _ macro to
1459 translate strings.
1460 * data/yacc.c (_) [!defined _]: New macro.
1461 All English strings wrapped inside this macro.
1462 * doc/bison.texinfo (Bison Parser): Document _.
1463 * po/POTFILES.in: Include src/parse-gram.c, since it now
1464 includes translateable strings that parse-gram.y doesn't.
1465
a749a695
PE
14662005-04-12 Paul Eggert <eggert@cs.ucla.edu>
1467
1468 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
1469 reverting the 2004-10-11 change to this function.
1470 (symbol_check_alias_consistency): Don't call symbol_type_set
1471 if the type name is already correct.
1472 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
1473
8fb1053b
PE
14742005-03-25 Paul Eggert <eggert@cs.ucla.edu>
1475
1476 * tests/regression.at (Token definitions): Don't use a token named
1477 c, as that generates a "#define c ..." that runs afoul of buggy
1478 stdlib.h that uses the identifier c as a member of struct
1479 drand48_data. Problem reported by Horst Wente.
1480
ff498c4a
PE
14812005-03-21 Paul Eggert <eggert@cs.ucla.edu>
1482
1483 * bootstrap: Change translation URL from
1484 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
1485 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
1486 redirection glitches. Problem reported by twlevo@xs4all.nl.
1487
65211d70
PE
14882005-03-20 Paul Eggert <eggert@cs.ucla.edu>
1489
1490 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
1491 after operands; POSIX says this isn't portable for the c99 command.
1492
9577fb1f
PE
14932005-03-18 Paul Eggert <eggert@cs.ucla.edu>
1494
1495 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
1496 immediately if a data overrun has occurred; this may help us track
1497 down what may be a spurious failure on MacOS.
1498
78b178f7
PE
14992005-03-17 Paul Eggert <eggert@cs.ucla.edu>
1500
a2599d0f
PE
1501 Respond to problems reported by twlevo@xs4all.nl.
1502
1503 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
1504
78b178f7
PE
1505 * src/vcg.h: Comment fix.
1506 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
1507 (G_CMAX): Change to -1 instead of INT_MAX.
1508
1509 * data/yacc.c (yyparse): Omit spaces before #line.
78b178f7 1510
7296e729
PE
15112005-03-15 Paul Eggert <eggert@cs.ucla.edu>
1512
1513 * src/tables.c (state_number_to_vector_number): Put it inside an
1514 "#if 0", since it's not currently used. Problem reported by
1515 Roland McGrath.
1516
05ac60f3
PE
15172005-03-06 Paul Eggert <eggert@cs.ucla.edu>
1518
1519 * src/output.c (escaped_output): Renamed from
1520 escaped_file_name_output, since we now use it for symbol tags as
1521 well. All uses changed.
1522 (symbol_destructors_output, symbol_printers_output):
1523 Escape symbol tags too.
1524 Problem reported by Matyas Forstner in
1525 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
1526
1527 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
1528 not needed.
1529 * src/output.c (user_actions_output, token_definitions_output,
1530 symbol_destructors_output, symbol_printers_output): Likewise.
1531 * src/reader.c (prologue_augment): Likewise.
1532 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
1533
1534 * src/vcg.c (output_edge): Don't quote linestyle arg.
1535 Problem reported by twlevo@xs4all.nl.
1536
7eb453ac
PE
15372005-02-28 Paul Eggert <eggert@cs.ucla.edu>
1538
1539 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
1540 example, reported by Derek M Jones. Also, make the example even
1541 more outrageous, to better illustrate how bad the problem is.
1542
4c04c52a
PE
15432005-02-24 Paul Eggert <eggert@cs.ucla.edu>
1544
1545 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
1546 putsym. Typo reported by Sebastian Piping.
1547
a61e1620
PE
15482005-02-23 Paul Eggert <eggert@cs.ucla.edu>
1549
1550 * doc/bison.texinfo (Language and Grammar): some -> same
1551 (Epilogue): int he -> in the
1552 Typos reported by Sebastian Piping via Justin Pence.
1553
9ec93868
PE
15542005-02-07 Paul Eggert <eggert@cs.ucla.edu>
1555
1556 * tests/glr-regression.at (Improper handling of embedded actions
1557 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
1558 embedded actions and $-N in GLR parsers", work around an Autoconf bug
1559 with dollar signs in test names.
1560 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
1561 for a similar reason.
1562
73ce7e7e
PE
15632005-01-28 Paul Eggert <eggert@cs.ucla.edu>
1564
1565 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
1566 wants to redefine G_VIEW.
1567
2e72b98e
PE
15682005-01-27 Paul Eggert <eggert@cs.ucla.edu>
1569
1570 * src/vcg.c (get_view_str): Remove case for normal_view.
1571 Problem reported by twlevo@xs4all.nl.
1572
e0d634e5
PE
15732005-01-24 Paul Eggert <eggert@cs.ucla.edu>
1574
ccf830a4
PE
1575 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
1576 Problem reported by twlevo@xs4all.nl.
1577
e0d634e5
PE
1578 * doc/bison.texinfo: Change @dircategory from "GNU programming
1579 tools" to "Software development". Requested by Richard Stallman
1580 via Karl Berry.
1581
7bbc8cb0
PE
15822005-01-23 Paul Eggert <eggert@cs.ucla.edu>
1583
1584 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
1585 Problem reported by twlevo@xs4all.nl.
1586
08b770bc
PE
15872005-01-21 Paul Eggert <eggert@cs.ucla.edu>
1588
1589 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
1590 keyword; it's not needed with modern compilers, and it doesn't
1591 affect correctness with older compilers. Suggested by
1592 twlevo@xs4all.nl.
1593
95f22ad2
PE
15942005-01-17 Paul Eggert <eggert@cs.ucla.edu>
1595
1596 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
1597 gcc -Wswitch-default.
1598 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
1599 * data/yacc.c (yyparse): Likewise.
1600
d229d15c
PE
16012005-01-12 Paul Eggert <eggert@cs.ucla.edu>
1602
1603 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
1604 already. Let config.h define any nonstandard values.
1605
ecadd90f
PE
16062005-01-10 Paul Eggert <eggert@cs.ucla.edu>
1607
1608 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
1609 for the benefit of slower hosts. Problem reported by
1610 Nelson H. F. Beebe.
1611
213744b5
PE
16122005-01-07 Paul Eggert <eggert@cs.ucla.edu>
1613
1614 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
1615 being defined and not used.
1616 * data/lalr1.cc (yyparse): Likewise.
1617 Use "if (false)" rather than "if (0)".
1618
249d3236
PE
16192005-01-05 Paul Eggert <eggert@cs.ucla.edu>
1620
1621 * TODO: Mention that we should allow NUL bytes in tokens.
1622
987cc1fb
PE
16232005-01-02 Paul Eggert <eggert@cs.ucla.edu>
1624
1625 * src/scan-skel.l (<<EOF>>): Don't close standard output.
1626 Problem reported by Hans Aberg.
1627
08fe02d9
PE
16282005-01-01 Paul Eggert <eggert@cs.ucla.edu>
1629
1630 * src/getargs.c (version): Happy new year; update overall
1631 program copyright date from 2004 to 2005.
1632
1633 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
1634 Problem reported by Hans Aberg.
1635 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
1636 (Output file names.): Add a test for the case when standard output
1637 is closed.
1638
010c0266
PE
16392004-12-26 Paul Eggert <eggert@cs.ucla.edu>
1640
1641 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
1642 to fix an oversight in the Bison 2.0 manual.
1643
da12206a
PE
16442004-12-25 Paul Eggert <eggert@cs.ucla.edu>
1645
1646 * NEWS: Version 2.0. Reformat the existing news items since
1647 1.875, so that related items are grouped together.
3a4734aa 1648 * configure.ac (AC_INIT): Bump version to 2.0.
da12206a
PE
1649 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
1650
c935d934
PE
1651 * tests/torture.at (Exploding the Stack Size with Alloca): Set
1652 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
1653 otherwise, we're not testing alloca. Unfortunately there's no
1654 simple way to consult HAVE_ALLOCA here.
1655
da12206a
PE
1656 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
1657 for yymsg, too.
1658
1659 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
1660 hand. This avoids a warning about comparing int to size_t when
1661 GCC warnings are enabled.
1662
0a2c5137
PE
16632004-12-22 Paul Eggert <eggert@cs.ucla.edu>
1664
d7e14fc0
PE
1665 * NEWS: Bison-generated parsers no longer default to using the
1666 alloca function (when available) to extend the parser stack, due
1667 to widespread problems in unchecked stack-overflow detection.
1668 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
1669 responsibility to set it to a positive value. This lets the user
1670 specify a value that is not a preprocessor constant.
1671 * data/yacc.c (YYMAXDEPTH): Likewise.
1672 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
1673 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
1674 to be a compile-time constant. However, explain the constraints on it.
1675 Also, explain the constraints on YYINITDEPTH.
1676 (Table of Symbols): Explain that alloca is no longer the default.
1677 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
1678 to 1.
1679
0a2c5137
PE
1680 * doc/bison.texinfo (Location Default Action): Mention that n must
1681 be zero when k is zero. Suggested by Frank Heckenbach.
1682
e019c247
AD
16832004-12-22 Akim Demaille <akim@epita.fr>
1684
1685 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
1686 (parser::state_type, parser::semantic_type, parser::location_type):
1687 Private, not public.
1688 (parser::parse): Return ints, not bool.
1689 Returning a bool introduces a problem: 0 corresponds to false, and
1690 it seems weird to return false on success. Returning true changes
1691 the conventions for yyparse.
1692 Alternatively we could return void and send an exception.
1693 There is no clear consensus (yet?).
1694 (state_stack, semantic_stack, location_stack): Rename as...
1695 (state_stack_type, semantic_stack_type, location_stack_type): these.
1696 Private, not public.
1697 * tests/c++.at: New.
1698 * tests/testsuite.at, tests/Makefile.am: Adjust.
1699
72731bb7
AD
17002004-12-21 Akim Demaille <akim@epita.fr>
1701
1702 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
1703
9a0d8bec
AD
17042004-12-21 Akim Demaille <akim@epita.fr>
1705
1706 Don't impose std::string for filenames.
1707
1708 * data/lalr1.cc (b4_filename_type): New.
1709 (position::filename): Use it.
1710 (parser.hh): Move the inclusion of stack.hh and location.hh below
1711 the user code, so that needed headers for the filename type can be
1712 included first.
72731bb7
AD
1713 Forward declare them before the user code.
1714 * tests/Makefile.am (check-local, installcheck-local): Pass
1715 TESTSUITEFLAGS to the TESTSUITE.
9a0d8bec 1716
99880de5
AD
17172004-12-20 Akim Demaille <akim@epita.fr>
1718
1719 Use more STL like names: my_class instead of MyClass.
1720
1721 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
1722 (SemanticStack, SemanticType, StateStack, StateType)
1723 (TokenNumberType, Stack, Slice, Traits, Parser::location)
1724 (Parser::value): Rename as...
1725 (location_stack, location_type, rhs_number_type, semantic_stack)
1726 (semantic_type, state_stack, state_type, token_number_type, stack)
1727 (slice, traits, parser::yylloc, parser::yylval): these.
1728
1729 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
1730
9bec482e
PE
17312004-12-19 Paul Eggert <eggert@cs.ucla.edu>
1732
1733 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
1734 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
1735
f6fbd3da
PE
17362004-12-17 Paul Eggert <eggert@cs.ucla.edu>
1737
1738 Remove uses of 'short int' and 'unsigned short int'. This raises
1739 some arbitrary limits. It uses more memory but nowadays that's
1740 not much of an issue.
1741
1742 This change does not affect the generated parsers; that's a different
1743 task, as some users will want to conserve memory there.
1744
1745 Ideally we should use size_t to represent all object counts, and
1746 something like ptrdiff_t to represent signed differences of object
1747 counts; but that will require more code-cleanup than I have the
1748 time to do right now.
1749
1750 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
1751 Use size_t, not int or short int, to count objects.
1752 * src/closure.c (nritemset, closure): Likewise.
1753 * src/closure.h (nritemset, closure): Likewise.
1754 * src/nullable.c (nullable_compute): Likewise.
1755 * src/print.c (print_core): Likewise.
1756 * src/print_graph.c (print_core): Likewise.
1757 * src/state.c (state_compare, state_hash): Likewise.
1758 * src/state.h (struct state): Likewise.
1759 * src/tables.c (default_goto, goto_actions): Likewise.
1760
1761 * src/gram.h (rule_number, rule): Use int, not short int.
1762 * src/output.c (prepare_rules): Likewise.
1763 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
1764 errs, reductions): Likewise.
1765 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
1766 Likewise.
1767 * src/tables.c (vector_number, tally, action_number,
1768 ACTION_NUMBER_MINIMUM): Likewise.
1769 * src/output.c (muscle_insert_short_int_table): Remove.
1770
efeed023
AD
17712004-12-17 Akim Demaille <akim@epita.fr>
1772
1773 * data/lalr1.cc: Extensive Doxygenation.
1774 (error_): Rename as...
1775 (error): this, since it is visible to the user.
1776 Adjust callers.
1777 (Parser::message): Now an automatic variable from...
1778 (Parser::yyreport_syntax_error_): here.
1779 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
1780 Parser::error.
1781 * tests/input.at: Escape $.
1782
bc82c5a5
PE
17832004-12-16 Paul Eggert <eggert@cs.ucla.edu>
1784
1785 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
1786 Parenthesize rhs to avoid obscure problems with mistakes like
1787 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
1788 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
1789 b4_rhs_location): Likewise.
1790 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
1791 b4_rhs_location): Likewise.
1792
fd19f271
AD
17932004-12-16 Akim Demaille <akim@epita.fr>
1794
1795 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
1796 yacc.c: be sure to stay within yycheck_.
1797 * tests/actions.at: Re-enable C++ tests.
1798
10454ea4
AD
17992004-12-16 Akim Demaille <akim@epita.fr>
1800
1801 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
1802 real.
1803
c5b95ccf
AD
18042004-12-16 Akim Demaille <akim@epita.fr>
1805
1806 Use #define to handle the %name-prefix.
1807
1808 * data/glr.c, data/yacc.c: Comment changes.
1809 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
1810 so that one can refer to yylex in the parser file, and have it
1811 renamed, as is the case with other skeletons.
1812
617a8f12
AD
18132004-12-16 Akim Demaille <akim@epita.fr>
1814
1815 Move lalr1.cc internals into yy*.
1816
1817 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
1818 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
1819 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
1820 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
1821 (empty_, final_, terror_, errcode_, ntokens_)
1822 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
1823 (looka_, ilooka_, error_range_, nerrs_):
1824 Rename as...
1825 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
1826 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
1827 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
1828 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
1829 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
1830 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
1831 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
1832 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
1833 these.
1834
1e547e6e
PE
18352004-12-15 Paul Eggert <eggert@cs.ucla.edu>
1836
1837 Fix some problems reported by twlevo at xs4all.
1838 * src/symtab.c (symbol_new): Report an error if the input grammar
1839 contains too many symbols. This is better than calling abort() later.
1840 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
1841 (struct node, struct graph):
1842 Rename member expand to stretch. All uses changed.
1843 (struct graph): Remove member layoutalgorithm. All uses removed.
1844 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
1845 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
1846 All uses changed.
1847 (N_STRETCH): Rename from N_EXPAND. All uses changed.
1848
735d6bd4
AD
18492004-12-15 Akim Demaille <akim@epita.fr>
1850
1851 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
1852 Add more Doxygen comments.
1853 (symprint_, stack_print_, reduce_print_, destruct_, pop)
1854 (report_syntax_error_, translate_): Rename as...
1855 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
1856 (yypop_, yyreport_syntax_error_, yytranslate_): this.
1857
2e1f5829
AD
18582004-12-15 Akim Demaille <akim@epita.fr>
1859
1860 * data/lalr1.cc (lex_): Rename as...
1861 (yylex_): this.
1862 Move the trace here.
1863 Take the %name-prefix into account.
1864 Reported by Alexandre Duret-Lutz.
1865
a3cb6248
AD
18662004-12-15 Akim Demaille <akim@epita.fr>
1867
1868 Simplify the C++ parser constructor.
1869
1870 * data/lalr1.cc (debug_): Rename as...
1871 (yydebug_): so that the parser's internals are always in the yy*
1872 pseudo namespace.
1873 Adjust uses.
1874 (b4_parse_param_decl): Remove the leading comma as it is now only
1875 called as unique argument list.
1876 (Parser::Parser): Remove the constructor accepting a location and
1877 an initial debugging level.
1878 Remove from the other ctor the argument for the debugging level.
1879 (debug_level_type, debug_level, set_debug_level): New.
1880
1881 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
1882 constructor calls.
1883
07fed891
AD
18842004-12-15 Akim Demaille <akim@epita.fr>
1885
1886 Remove b4_root related material: failure experiment
a3cb6248 1887 (which goal was to allow to derive from a class).
07fed891
AD
1888
1889 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
1890 definitions and uses.
1891
e603eaa5
PE
18922004-12-14 Paul Eggert <eggert@cs.ucla.edu>
1893
1894 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
1895 not 2, since it's not portable to subtract 1 from the start of an
1896 array. The new item 0 is never set or used. All uses changed.
1897
1898 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
1899 the default definition of YYLLOC_DEFAULT. Problem reported
1900 by Frank Heckenbach.
1901
fafb007d
PE
19022004-12-12 Paul Eggert <eggert@cs.ucla.edu>
1903
1904 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
1905 the normal case and one for the error case. Just use the
1906 first one uniformly. Problem reported by Frank Heckenbach.
1907 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
1908 use exactly the same macro in both places.
1909 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
1910 so that the normal-case YYRHSLOC works for the error case too.
1911 All uses changed.
1912 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
1913 (YYLLOC_DEFAULT): Use the same macro as glr.c.
1914 * doc/bison.texinfo (Location Default Action): Don't claim that
1915 we have an array of locations. Use the same macro for both glr
1916 and lalr parsers. Mention YYRHSLOC. Mention what happens when
1917 the index is 0.
1918
48814dcd
PE
19192004-12-10 Paul Eggert <eggert@cs.ucla.edu>
1920
a4e1a53b
PE
1921 * HACKING: Update email addresses to send announcements to.
1922
48814dcd
PE
1923 * configure.ac (AC_INIT): Bump version to 1.875f.
1924
337116ba
PE
19252004-12-10 Paul Eggert <eggert@cs.ucla.edu>
1926
1927 * NEWS: Version 1.875e.
1928 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
1929
1930 * src/scan-skel.l: Include "complain.h", for "fatal".
1931
1932 * src/relation.h (relation_print, relation_digraph):
1933 Relation sizes are of type relation_node, not size_t (this is
1934 merely a doc fix, since the two types are equivalent).
1935 (relation_transpose): Relation sizes are of type relation_node,
1936 not int.
1937 * src/relation.c: Likewise.
1938 (top, infinity): Now of type relation_node, not int.
1939 (traverse, relation_transpose): Use relation_node, not int.
1940
1941 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
1942 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
1943 (yyparse): Remove unused local introduced in 2004-10-25 patch.
1944
1945 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
68b082af 1946 specifying whether the test should be skipped. Use it tp
337116ba 1947 specify that the [%defines %skeleton "lalr1.cc"] tests currently
68b082af 1948 fail on some hosts, and should be skipped.
337116ba 1949
da2a7671
PE
19502004-12-08 Paul Eggert <eggert@cs.ucla.edu>
1951
1952 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
1953 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
1954 unless otherwise specified below.
1955
1956 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
1957 to allocate kernel_base, kernel_items, kernel_size, since
1958 they needn't be initialized to 0.
1959 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
1960 * src/closure.c (new_closure): Likewise, for itemset.
1961 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
1962 * src/lalr.c (set_goto_map): Likewise, for temp_map.
1963 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
1964 (build_relations): Likewise for edge, states1, includes.
1965 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
1966 * src/reader.c (packgram): Likewise, for ritem, rules.
1967 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
1968 * src/relation.c (relation_digraph): Likewise for VERTICES.
1969 (relation_transpose): Likewise for new_R, end_R.
1970 * src/symtab.c (symbols_token_translations_init): Likewise for
1971 token_translations.
1972 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
1973 (token_actions): Likewise for yydefact, actrow, conflrow,
1974 conflict_list.
1975 (save_column): Likewise for froms[symno], tos[symno].
1976 (goto_actions): Likewise for state_count.
1977 (pack_table): Likewise for base, pos, check.
1978 (tables_generate): Likewise for width.
1979
1980 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
1981 for initial core. Just have a separate core, so we needn't worry
1982 about whether kernel_size and kernel_base are initialized.
1983
1984 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
1985 kernel_size, kernel_items): Remove unnecessary initialization.
1986 * src/conflicts.c (conflicts): Likewise.
1987 * src/derives.c (derives): Likewise.
1988 * src/muscle_tablc (muscle_insert): Likewise.
1989 * src/relation.c (relation_digraph): Likewise.
1990 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
1991 conflrow, conflict_table, conflict_list, table, check):
1992 Likewise.
1993
1994 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
1995 This is because all callers pass unsigned int.
1996 * src/closure.h (new_closure): Likewise.
1997
1998 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
1999 (build_relations): Initialize includes[i] in all cases.
2000 * src/reader.c (packgram): Always initialize rules[ruleno].prec
2001 and rules[ruleno].precsym. Initialize members in order.
2002 * src/relation.c (relation_transpose): Always initialize new_R[i]
2003 and end_R[i].
2004 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
2005
2006 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
2007 conflict_list[0] was always 0, but now it isn't initialized.
2008
2009 * src/table.c (table_grow): When conflict_table grew, the grown
2010 area wasn't cleared. Fix this.
2011
2012 * lib/.cvsignore: Add strdup.c, strdup.h.
2013 * m4/.cvsignore: Add strdup.m4.
2014
00baeeac
PE
20152004-12-07 Paul Eggert <eggert@cs.ucla.edu>
2016
2017 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
2018 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
2019 GOTO_NUMBER_MAXIMUM, since we occasionally compute
2020 ngotos + 1 without checking for overflow.
2021 (build_relations): Use END_NODE, not -1, to denote end of edges.
2022 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
2023 build_relations): Use goto_number, not int, for goto numbers.
2024 * src/tables.c (save_column, default_goto): Likewise.
2025
be3d9d42
AD
20262004-11-23 Akim Demaille <akim@epita.fr>
2027
2028 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
2029 of #defining from yystype.
2030 Don't typedef yystype, C++ does not need it.
2031 This lets it possible to forward declare it as union.
2032
78e526d5
PE
20332004-11-23 Paul Eggert <eggert@cs.ucla.edu>
2034
2035 * bootstrap (gnulib_modules): Add extensions.
2036 Problem reported by Jim Meyering.
2037
afbb696d
PE
20382004-11-22 Paul Eggert <eggert@cs.ucla.edu>
2039
2040 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
2041 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
2042 src/system.h, src/tables.c: XFREE -> free, to accommodate
2043 recent change to gnulib xalloc.h.
78e526d5 2044 Problem reported by Jim Meyering.
afbb696d 2045
c1f8f16a
AD
20462004-11-17 Akim Demaille <akim@epita.fr>
2047
2048 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
2049
20502004-10-28 Akim Demaille <akim@epita.fr>,
9a1e9989
AD
2051 Alexandre Duret-Lutz <adl@gnu.org>
2052
2053 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
2054 changes.
2055 (YYCDEBUG): Adjust.
2056 Use it instead of cdebug_.
2057 (Parser::debug_stream, Parser::set_debug_stream): New.
2058 (Parser::symprint_): Define cdebug_ for temporary backward
2059 compatibility.
2060 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
2061 debug_stream ().
2062
68e11668
AD
20632004-11-17 Akim Demaille <akim@epita.fr>
2064
2065 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
2066 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
2067 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
2068 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
2069
97cbc73e
PE
20702004-10-27 Paul Eggert <eggert@cs.ucla.edu>
2071
2072 * data/glr.c (yyloc_default): Remove; not used.
2073 Problem reported by Frank Heckenbach.
2074
e342c3be
AD
20752004-10-25 Akim Demaille <akim@epita.fr>
2076
2077 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
2078 Introduce another definition to address simple location arrays.
2079 (yyGLRStack): New member: yyerror_range.
2080 (yyrecoverSyntaxError, yyparse): Update it.
2081 (yyrecoverSyntaxError): Use it when shifting the error token to
2082 have an accurate range, equivalent to the one computed by both
2083 yacc.c and lalr1.cc.
2084 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
2085 that column numbers start at column 0, as per GNU Coding
2086 Standards, the others tests, and the doc.
2087 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
2088 Adjust to the above change (first column is 0).
2089 And adjust the location of the "<error>", now covering the whole
2090 line.
2091
93602feb 20922004-10-22 Akim Demaille <akim@epita.fr>
04098407 2093 and Paul Eggert <eggert@cs.ucla.edu>
93602feb
PE
2094
2095 Remove some arbitrary limits on goto numbers and relations.
2096 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
2097 initial values, since they're never used.
2098 (set_goto_map): ngotos is now unsigned, so test for overflow
2099 by seeing whether it wraps around to zero.
2100 * src/lalr.h (goto_number): Now size_t, not short int.
2101 (GOTO_NUMBER_MAXIMUM): Remove.
2102 * src/relation.c (relation_print, traverse, relation_transpose):
2103 Check for END_NODE rather than looking at sign.
2104 * src/relation.h (END_NODE): New macro.
2105 (relation_node): Now size_t, not short int.
2106
dba08b04
PE
21072004-10-22 Paul Eggert <eggert@cs.ucla.edu>
2108
2109 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
2110 keyword, not an identifier. Problem reported by Baron Schwartz in
2111 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
2112
df09ef2e
AD
21132004-10-11 Akim Demaille <akim@epita.fr>
2114
2115 * src/symtab.c (symbol_check_alias_consistency): Also check
2116 type names, destructors, and printers.
2117 Reported by Alexandre Duret-Lutz.
2118 Recode the handling of associativity and precedence in terms
2119 of symbol_precedence_set.
2120 Accept no redeclaration at all, not even equal to the previous
2121 value.
2122 (redeclaration): New.
2123 Use it to factor redeclaration complaints.
2124 (symbol_make_alias): Don't set the type of the alias, let
2125 symbol_check_alias_consistency do it as for other features.
2126 * src/symtab.h (symbol): Add new member prec_location, and
2127 type_location.
2128 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
2129 * tests/input.at (Incompatible Aliases): New.
2130
146bc99d
PE
21312004-10-09 Paul Eggert <eggert@cs.ucla.edu>
2132
2133 .cvsignore fixes to accommodate gnulib changes,
2134 and the practice of naming build directories "_build".
2135 * .cvsignore: Add "_*". Sort.
2136 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
2137 * m4/.cvsignore: Add "*_gl.m4".
2138
e503aa60
AD
21392004-10-06 Akim Demaille <akim@epita.fr>
2140
2141 * src/parse-gram.y (add_param): Fix the truncation of trailing
2142 spaces.
2143
b4a20338
AD
21442004-10-05 Akim Demaille <akim@epita.fr>
2145
2146 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
2147 whether the reducion was empty or not. This leaves room to
2148 improve the use of YYLLOC_DEFAULT in such a case.
2149 lalr1.cc is still experimental, so changing this is acceptable.
2150 And finally, there are probably not many users who changed the
2151 handling of locations in GLR, so changing is admissible too.
2152
2153 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
2154 empty reduction, set @$ to an empty location ending the previously
2155 stacked symbol.
2156 Adjust uses to make sure the code is triggered on empty
2157 reductions.
2158 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
2159 expected output: empty reductions have empty locations.
2160
f85a5e6f
AD
21612004-09-29 Akim Demaille <akim@epita.fr>
2162
2163 * data/lalr1.cc: Move towards a more standard C++ coding style
2164 for templates: Class < T > -> Class<T>.
2165
b203fc2c
AD
21662004-09-29 Akim Demaille <akim@epita.fr>
2167
2168 * data/lalr1.cc: Reinstall the former ctor, for sake of
2169 compatibility, but warn it will be removed.
2170 Move towards a more standard C++ coding style (i.e., type *var ->
2171 type* var).
2172
5b7e1e73
PE
21732004-09-27 Paul Eggert <eggert@cs.ucla.edu>
2174
3fee967f
PE
2175 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
2176 since it's less likely to work if NULs are involved in the future.
5b7e1e73 2177
0dcca5c2
AD
21782004-09-27 Akim Demaille <akim@epita.fr>
2179
2180 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
2181
6dde1c82
AD
21822004-09-27 Akim Demaille <akim@epita.fr>
2183
2184 * data/lalr1.cc (b4_parse_param_decl_1): New.
b203fc2c 2185 (b4_parse_param_decl): Use it to have different names between attribute
6dde1c82
AD
2186 and argument names.
2187 (b4_cc_constructor_call): Likewise.
2188
b233d555
AD
21892004-09-24 Akim Demaille <akim@epita.fr>
2190
2191 * src/parse-gram.y (add_param): Strip the leading and trailing
2192 blanks from a formal argument declaration.
2193 (YY_LOCATION_PRINT): New.
2194
619404e3
AD
21952004-09-24 Akim Demaille <akim@epita.fr>
2196
2197 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
2198 after the location.
2199
dd8d9022
AD
22002004-09-24 Akim Demaille <akim@epita.fr>
2201
2202 * doc/bison.texinfo (Table of Symbols): Sort.
2203
0092f063
AD
22042004-09-21 Akim Demaille <akim@epita.fr>
2205
2206 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
2207 the useless parentheses.
2208 Suggested by Paul Eggert.
2209
451364ed
AD
22102004-09-20 Akim Demaille <akim@epita.fr>
2211
2212 Let the initial-action act on the look-ahead, and use it for the
2213 "initial push" (corresponding to an hypothetical beginning-of-file).
2214 And let lalr1.cc honor %initial-action.
2215
2216 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
2217 example.
2218 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
2219 (Parser::Parser): Remove the ctor that used to initialize it.
2220 (Parser::parse): Like in the other skeletons, issue the "starting
2221 parse" message before any action.
2222 Honor %initial-action.
2223 Initialize the stacks with the lookahead.
2224 * data/yacc.c: Let $$ and @$ in %initial-action designate the
2225 look-ahead.
2226 Push them in the stacks.
2227 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
2228
18d192f0
AD
22292004-09-20 Akim Demaille <akim@epita.fr>
2230
2231 * doc/bison.texinfo (Initial Action Decl): New.
2232
b8458aa5
AD
22332004-09-20 Akim Demaille <akim@epita.fr>
2234
2235 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
2236 clearer criterion to define it.
2237 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
2238 When reducing on an empty RHS, use the latest stacked location as
2239 location.
2240 yylloc is not always available.
2241 * data/glr.c: Likewise.
2242 Also, honor initial-actions.
2243
3fc16193
AD
22442004-09-20 Akim Demaille <akim@epita.fr>
2245
2246 * data/yacc.c (YY_LOCATION_PRINT): New.
2247 Define when we know YYLTYPE's structure, i.e., when the default
2248 YYLLOC_DEFAULT is used.
2249 * data/c.m4 (b4_yysymprint_generate): Use it.
2250 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
2251 value of the result.
2252 (error_start_): Replace with...
2253 (error_range_): this location array.
2254 This allows to replace code relying on the implementation of
2255 locations by portable code.
2256 * data/yacc.c (yylerrsp): Replace with...
2257 (yyerror_range): this.
2258 Every time a token is popped, update yyerror_range[0], to have an
2259 accurate location for the error token.
2260 * data/glr.c (YY_LOCATION_PRINT): New.
2261 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
2262 deference a pointer.
2263 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
2264 report the location in %printers.
2265
2266 * src/scan-skel.l: Instead of abort, report error messages to ease
2267 understanding skeleton scanning failures.
2268
ecfe33e7
AD
22692004-09-16 Akim Demaille <akim@epita.fr>
2270
2271 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
2272 (iterator, const_iterator): these, to be more in the C++ spirit.
2273 Also, return reverse iterators so that when displaying the stack
2274 we display its bottom first.
2275 (Parser::stack_print_, Parser::reduce_print_): Match the messages
2276 from yacc.c.
2277 We should probably use vector here though.
2278
1576d44d
AD
22792004-09-16 Akim Demaille <akim@epita.fr>
2280
2281 Have more complete shift traces.
2282
2283 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
2284 to report Shifts instead of ad hoc YYDPRINTF invocations,
2285 including for the error token.
2286 * data/lalr1.cc (symprint_): Output the location.
2287 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
2288 output the location within the %printer.
2289 Activate GLR tests, at least to make sure they compile properly.
2290 They still don't pass though.
2291 * tests/calc.at: Adjust expect verbose output, since now "Entering
2292 state..." is on a different line than the "Shifting" message.
2293
9c66f418
AD
22942004-09-08 Akim Demaille <akim@epita.fr>
2295
2296 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
2297 Bison directive from the Bison file to the invocation of this
2298 macro, so that these directives are passed to
2299 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
2300 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
2301 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
2302 the extra Bison directives instead of the whole series.
2303 Change the grammar so that there are recoverable errors, and
2304 unrecoverable errors. Now we can have the parser give up before
2305 consuming the whole input. As a result we now can observe that
2306 the lookahead is freed when needed.
2307 Change the parser source to parse argv[1] instead of a hard coded
2308 string.
2309 Simplify yylex, and give a value and location to EOF.
2310 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
2311 passed directives already coded in the file.
2312 Add some tests to check the location of "error".
2313 For some tests, the C++ parser is correct, and not yacc.c.
2314 For other tests, they provide different, but unsatisfying, values,
2315 so keep the C++ value so that at least one parser is "correct"
2316 according to the test suite.
2317 (Actions after errors): Remove, this is subsumed by the
2318 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
2319
52d5733f
AD
23202004-09-06 Akim Demaille <akim@epita.fr>
2321
2322 * data/lalr1.cc: Adjust the indentation of the labels.
04098407 2323 (Parser::pop): New.
52d5733f
AD
2324 Use it.
2325
a0e68930
AD
23262004-09-06 Akim Demaille <akim@epita.fr>
2327
2328 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
2329 argument, an informative message.
2330 Call YY_SYMBOL_PRINT.
2331 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
2332 * data/lalr1.cc (destruct_): Likewise.
2333 In addition, no longer depend on b4_yysymprint_generate and
2334 b4_yydestruct_generate to generate these functions, do it "by
2335 hand".
2336
e757bb10
AD
23372004-09-03 Akim Demaille <akim@epita.fr>
2338
2339 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
2340 invoked, yydestruct the lookahead.
2341 * tests/calc.at (Calculator $1): Update the expected lengths of
2342 traces: there is an added line for the discarded lookahead.
2343 * doc/bison.texinfo (Destructor Decl): Some rewording.
2344 Define "discarded" symbols.
2345
0fe1f06d
AD
23462004-09-02 Akim Demaille <akim@epita.fr>
2347
2348 * data/lalr1.cc (translate_, destruct_): No reason to be static.
2349
284acc8b
AD
23502004-09-02 Akim Demaille <akim@epita.fr>
2351
2352 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
2353 (YYDSYMPRINTF): Rename as...
2354 (YY_SYMBOL_PRINT): this.
2355 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
2356 two.
2357 Use it instead of direct symprint_ calls.
2358 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
2359 one.
2360
a5eb1ed2
AD
23612004-09-02 Akim Demaille <akim@epita.fr>
2362
b7c72fe1
AD
2363 * data/lalr1.cc (b4_yysymprint_generate): New.
2364 (symprint_): New member function, defined when YYDEBUG.
2365 Use it consistently instead of token/nterm debugging output by
2366 hand.
a5eb1ed2
AD
2367 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
2368 %printer calls to use cdebug_ when using lalr1.cc.
2369
417141dd
AD
23702004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
2371
2372 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
2373 with #ifdef YYDEBUG.
2374
2fa09258
AD
23752004-08-26 Akim Demaille <akim@epita.fr>
2376
2377 * doc/bison.texinfo (Implementing Loops): Rename as...
2378 (Implementing Gotos/Loops): this.
2379
9378b508
PE
23802004-08-13 Paul Eggert <eggert@cs.ucla.edu>
2381
2382 Adjust to latest gnulib.
2383 * bootstrap (gnulib_modules): Add xalloc-die.
2384 Set LC_ALL=C so that file names sort consistently.
2385 Prefer the gnulib copies of gettext.m4, glibc21.m4,
2386 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
2387 uintmax_t.m4, ulonglong.m4.
2388 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
2389 po.m4 since we are now using _gl.m4 instead.
2390
87a8ad5c
PE
23912004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
2392
2393 * src/scan-action.l: Remove. Scanning of semantic actions is
2394 handled in scan-gram.l.
2395
dca81a78
PE
23962004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
2397
2398 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
2399
2400 * src/location.h (struct): The file member is a uniqstr.
2401 (equal_boundaries): Use UNIQSTR_EQ for comparison.
2402
c9cbf7c5
PE
24032004-07-22 Paul Eggert <eggert@cs.ucla.edu>
2404
2405 Fix bug with non-%union parsers that have printers or destructors,
2406 which led to a Bison core dump. Reported by Peter Fales in
2407 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
2fa09258 2408
c9cbf7c5
PE
2409 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
2410 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
2411 not to our own type.
2412 * src/output.c (symbol_destructors_output, symbol_printers_output):
2413 Don't assume %union.
2414 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
2415 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
2416 UNION-FLAG. All callers changed.
2417 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
2418 Use type char, not unsigned int, when declaring an array of char;
2419 this lets us remove a cast.
2420 (Printers and Destructors): Add non-%union test cases.
2421
fa7e68c3
PE
24222004-06-21 Paul Eggert <eggert@cs.ucla.edu>
2423
2424 * doc/bison.texinfo: Minor editorial changes, mostly to the new
2425 GLR writeups. E.g., avoid frenchspacing and the future tense,
2426 change "lookahead" to "look-ahead", and change "wrt" to "with
2427 respect to".
2fa09258 2428
fa7e68c3
PE
24292004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
2430
2431 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
2432 New sections, split off from the GLR Parsers section. Put the new
2433 Simple GLR Parser near the start of the GLR section, for clarity.
2434 Rewrite connective text.
2435
99a9344e
PE
24362004-06-21 Frank Heckenbach <frank@g-n-u.de>
2437
2438 * doc/bison.texinfo (Simple GLR Parsers): New section.
2439
8dd162d3
PE
24402004-06-21 Paul Eggert <eggert@cs.ucla.edu>
2441
2442 * NEWS, TODO, doc/bison.texinfo:
2443 Use "look-ahead" instead of "lookahead", to be consistent.
2444 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
2445 while we're fixing "look-ahead".
2446 * src/conflicts.c (shift_set): Renamed from shiftset.
2447 (look_ahead_set): Renamed from lookaheadset.
2448 * src/print.c: Likewise.
2449 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
2450 name for "lookahead".
2451 (report_types, usage): Likewise.
2452 * src/getargs.h (report_look_ahead_tokens): Renamed from
2453 report_lookaheads.
2454 * src/lalr.c (compute_look_ahead_tokens): Renamed from
2455 compute_lookaheads.
2456 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
2457 (look_ahead_tokens_print): Renamed from lookaheads_print.
2458 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
2459 state_rule_lookaheads_print.
2460 * src/state.h: Likewise.
2461 (reductions.look_ahead_tokens): Renamed from lookaheads.
2462 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
2463 AT_DATA_LOOKAHEADS_GRAMMAR.
2464
57a90331
PE
24652004-06-03 Paul Eggert <eggert@cs.ucla.edu>
2466
2467 * README: Update location of patched M4 distribution.
2468
8ed3234a
PE
24692004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
2470
2471 Don't assume the C++ compiler takes the same arguments as the C compiler
2472 (trivial change).
2473 * configure.ac (O0CXXFLAGS): New var.
2474 * tests/atlocal.in (CXXFLAGS): Use it.
2475
07971983
PE
24762004-05-29 Paul Eggert <eggert@cs.ucla.edu>
2477
2478 Fix some "make check" problems with C++ reported by
2479 Albert Chin-A-Young for Tru64 C++ in this thread:
2480 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
2481
2482 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
2483 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
2484 Output to a .cc file for C++, not to a .c file.
2485 * tests/calc.at (AT_CHECK_CALC): Likewise.
2486 * tests/regression.at (AT_CHECK_DANCER): Likewise.
2487 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
2488
29058652
PE
24892004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
2490
2491 * tests/calc.at, tests/actions.at: Workaround for SGI
2492 C++ compiler. (trivial change)
2493
62cb8a99
PE
24942004-05-27 Paul Eggert <eggert@cs.ucla.edu>
2495
fd418816
PE
2496 Spent a few hours checking out which prerequisite versions the
2497 current sources actually require. I went all the way back to
2498 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
2499 a seemingly endless set of combinations of versions more recent
2500 than that. The bottom line is that the current sources require
2501 fairly recent versions of the build tools, and it'll be some work
2502 to change this.
2503 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
2504 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
2505 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
2506 Add comments explaining why those particular versions are
2507 currently needed.
2fa09258 2508
62cb8a99
PE
2509 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
2510 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
161a71f3 2511 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
62cb8a99
PE
2512
2513 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
2514 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
2515
caa52c10
PE
25162004-05-26 Paul Eggert <eggert@cs.ucla.edu>
2517
2518 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
2519 0.11.5. Suggested by Bruno Haible.
2520 * bootstrap: Remove gettext version checking.
2521
2522 * doc/bison.texinfo (Decl Summary): Also mention that %union
2523 can depend on prerequisite types. Problem reported by Tim
2524 Van Holder.
2525
4bfd5e4e
PE
25262004-05-25 Paul Eggert <eggert@cs.ucla.edu>
2527
2cef3017
PE
2528 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
2529 * README-alpha: Don't tell people not to package this.
2530
b9c85d5c
PE
2531 * bootstrap: Don't assume $(...) works; use `...` instead.
2532 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
2533 gettext better.
2534
4bfd5e4e
PE
2535 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
2536 put into the -d output file, and mention what to do if YYSTYPE is
2537 defined as a macro.
2538
6a36ff94
PE
25392004-05-24 Paul Eggert <eggert@cs.ucla.edu>
2540
6712933e
PE
2541 Undo change made earlier today: it caused autopoint to not bring
2542 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
2543 autopoint's.
2544
2545 * bootstrap: Check that gettext version matches what's in
2546 configure.ac. Warn users to ignore robots.txt ERROR 404.
2547 * bootstrap: Undo today's earlier change (logged below).
2548 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
b9c85d5c 2549
6a36ff94
PE
2550 The gettext version checking is causing more trouble than it's
2551 curing; remove it. Problem reported by Paul Hilfinger.
2552
2553 * bootstrap: Issue a warning that one can expect a message
2554 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
2555 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
2556
209ea708
PE
25572004-05-23 Paul Eggert <eggert@cs.ucla.edu>
2558
2559 Ensure that the C++ compiler used for testing actually works on a
2560 simple test program; if not, skip the C++-related tests. Problem
2561 reported by Vin Shelton in:
161a71f3 2562 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
209ea708
PE
2563
2564 * m4/cxx.m4: New file.
2565 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
2566 * tests/atlocal.in (BISON_CXX_WORKS): Add.
2567 * tests/local.at (AT_COMPILE_CXX): Use it.
2568
41ca2549
PE
25692004-05-21 Paul Eggert <eggert@cs.ucla.edu>
2570
383e69dc
PE
2571 * data/glr.c (yylloc): Output this macro even if locations are not
2572 being generated, as the GLR parser needs it even in that case.
2573 Problem reported by Troy A. Johnson
2574 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
2575
41ca2549
PE
2576 * configure.ac (AC_INIT): Update to 1.875e.
2577
e476c87d
PE
25782004-05-21 Paul Eggert <eggert@cs.ucla.edu>
2579
2580 * NEWS: Version 1.875d.
2581 * configure.ac (AC_INIT): Likewise.
2582 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
2583
2584 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
2585 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
2586 lalr1.cc runs afoul of the first, and the last two are no longer
2587 supported by GCC 3.4.0.
2588 * README: Mention GNU m4 1.4 or later; mention m4 patches.
2589 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
2590
233a88ad
PE
25912004-05-06 Paul Eggert <eggert@cs.ucla.edu>
2592
2593 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
2594 unsigned int, for compatibility with latest gnulib hash module.
2595 * src/state.c (state_hash, state_hasher): Likewise.
2596 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
2597 * src/uniqstr.c (hash_uniqstr): Likewise.
e476c87d 2598
12ffdd28
PE
25992004-05-03 Paul Eggert <eggert@cs.ucla.edu>
2600
2601 * NEWS: Unescaped newlines are no longer allowed in char & strings.
2602
2603 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
2604 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
2605 character and string literals.
2606 (unexpected_end): New function.
2607 (unexpected_eof): Use it.
2608 (unexpected_newline): New function.
2609 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
2610 actions.
e476c87d 2611
12ffdd28
PE
2612 * NEWS: Document %expect-rr.
2613
2614 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
2615 Fix typo by replacing $1 with $option.
2616 Remove more 'intl'-related files.
9668e2be 2617 Don't DEFUN AM_INTL_SUBDIR twice.
12ffdd28
PE
2618
2619 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
2620 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
2621 strtoul.c.
2622 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
2623 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
2624 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
2625 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
2626 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
2627 * src/.cvsignore: Add *.output.
2628
2629 * src/parse-gram.y: Put copyright notice inside %{ %} so it
2630 gets copied to the output file.
e476c87d 2631
1f65350a
PE
26322004-04-28 Paul Eggert <eggert@twinsun.com>
2633
2634 Get files from the gnulib and po repositories, instead of relying
2635 on them being in our CVS. Upgrade to latest versions of gnulib
2636 and Automake.
2637
2638 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
2639 * bootstrap: Bootstrap from gnulib and po repositories.
2640 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
2641 * README-cvs: Document these changes. Remove version numbers from
2642 mentions of build tools, since they change so often. Mention Flex.
2643
2644 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
2645 (gl_USE_SYSTEM_EXTENSIONS): Add.
12ffdd28
PE
2646 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
2647 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
1f65350a 2648 does this for us.
12ffdd28
PE
2649 (AC_ISC_POSIX): Remove; we no longer support this
2650 ancient OS, as it gets in the way of latest Autoconf & gnulib.
1f65350a
PE
2651 (AC_HEADER_STDC): Remove: we now assume C89 or better.
2652 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
2653 Do not check for C89 headers, except for locale.h which is used
2654 by the Yacc library and must port to K&R hosts.
2655 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
2656 Do not check for C89 functions, except for setlocale which is
2657 used by the Yacc library.
2658 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
2659 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
2660 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
2661 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
2662 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
2663 AM_GNU_GETTEXT): Remove; now done by:
2664 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
2665 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
2666 for us.
2667
2668 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
2669 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
2670 Define to empty, as gnulib.mk will do the rest for us.
2671 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
2672 for us.
2673 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
2674 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
2675
2676 * src/files.c: Include gnulib's xstrndup.h.
2677
2678 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
2679 (REALLOC): Use xnrealloc, for likewise.
2680 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
2681 (strnlen, memrchr): Remove decls; functions no longer used.
2682 Include <stpcpy.h>.
2683
2684 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
2685 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
2686 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
2687 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
2688 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
2689 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
2690 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
2691 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
2692 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
2693 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
2694 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
2695 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
2696 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
2697 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
2698 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
2699 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
2700 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
2701 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
2702 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
2703 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
2704 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
2705 Remove, as these files are now generated automatically
2706 by bootstrap or automake.
2707
2708 * po/ChangeLog: Remove: all but one entry was a duplicate
2709 of this file, and I moved that 2000-11-02 entry here.
2710
2711 * config/.cvsignore: Add Makefile, depcomp, install-sh.
2712 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
2713 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
2714 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
2715 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
2716 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
2717 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
2718 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
2719 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
2720 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
2721 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
2722 xstrndup.h.
2723 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
2724 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
2725 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
2726 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
2727 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
2728 * src/.cvsignore: Remove *_.c.
2729
2730
2731 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
2732 support it. (The latest stable gzip doesn't.)
2733
27342004-04-27 Paul Eggert <eggert@twinsun.com>
2735
2736 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
2737 case, as stos_ is now used by destructors due to the 2004-02-09
2738 change.
2739
2740 Remove more K&R C support.
2741 * lib/libiberty.y (PARAMS): Remove. All uses removed.
2742 * lib/subpipe.c (errno): Remove decl.
2743 Include <stdlib.h> unconditionally.
2744 (EXIT_FAILURE): Remove macro.
2745 * src/complain.c (vfprintf, strerror): Remove.
2746 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
2747 unconditionally.
2748 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
2749 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
2750 (strchr, strspn, memchr): Remove decls.
2751 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
2752 unconditionally. Do not declare perror.
2753 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
2754 unconditionally.
2755
2756 * src/complain.c (_): Remove useless defn, as system.h defines this.
2757
2758 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
2759 with latest obstack.h.
2760 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
2761 to procedure types, as obstack.h now does that for us.
2762 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
2763
2764 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
2765 so that this include file can stand alone.
2766 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
2767 does this now. Include subpipe.h first after config.h, to
2768 test whether it can stand alone.
2769
2770 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
2771 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
2772 unused declaration.
2773
2774 * tests/synclines.at (%union synch line): Put a dummy member in
2775 the union, because empty unions aren't allowed in C. Caught
2776 by GCC 3.4.0.
2777
4f16766c
PE
27782004-04-13 Jim Meyering <jim@meyering.net>
2779
2780 * src/conflicts.c (conflicts_print): Correct format string typo:
2781 use `%%' to produce literal `%'. (trivial change)
2782
779e7ceb
PE
27832004-03-30 Paul Eggert <eggert@twinsun.com>
2784
2785 * src/getargs.c (version): Update copyright year to 2004.
2786
2787 * data/c.m4 (b4_int_type): Use 'short int' rather than
2788 'short', and similarly for 'long', 'unsigned', etc.
2789 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
2790 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
2791 yy_yypstack, yydumpstack): Likewise.
2792 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
2793 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
2794 Likewise.
2795 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
2796 yy_stack_print, yyparse): Likewise.
2797 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
2798 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
2799 * lib/bitset.c (bitset_print): Likewise.
2800 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
2801 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
2802 * lib/bitsetv.c (bitsetv_dump): Likewise.
2803 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
2804 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
2805 Likewise.
2806 * src/LR0.c (allocate_itemsets): Likewise.
2807 * src/gram.h (rule_number, rule): Likewise.
2808 * src/lalr.h (goto_number): Likewise.
2809 * src/nullable.c (nullable_compute): Likewise.
2810 * src/output.c (prepare_rules): Likewise.
2811 * src/relation.c (relation_print, relation_digraph): Likewise.
2812 * src/relation.h (relation_node): Likewise.
2813 * src/state.h (state_number, transitions, errs, reductions,
2814 struct state): Likewise.
2815 * src/symtab.h (symbol_number, struct symbol): Likewise.
2816 * src/tables.c (vector_number, tally, action_number,
2817 default_goto, goto_actions): Likewise.
2818 * tests/existing.at (GNU Cim Grammar): Likewise.
2819 * tests/regression.at (Web2c Actions): Likewise.
2820
2821 * src/output.c (muscle_insert_short_int_table): Renamed from
2822 muscle_insert_short_table. All uses changed.
2823
d6328241
PH
28242004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
2825
2826 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
2827 (declaration): Replace expected_conflicts with expected_sr_conflicts.
2828 Add %expect-rr rule.
4f16766c 2829
d6328241
PH
2830 * src/scan-gram.l: Recognize %expect-rr.
2831
4f16766c 2832 * src/conflicts.h (expected_sr_conflicts): Rename from
d6328241 2833 expected_conflicts.
4f16766c 2834 (expected_rr_conflicts): Declare.
d6328241
PH
2835
2836 * src/conflicts.c (expected_sr_conflicts): Rename from
2837 expected_conflicts.
2838 (expected_rr_conflicts): Define.
2839 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
2840 for GLR parsers.
2841 Use expected_sr_conflicts in place of expected_conflicts.
2842 Warn if expected_rr_conflicts used in non-GLR parser.
4f16766c 2843
d6328241 2844 * doc/bison.texinfo: Add documentation for %expect-rr.
4f16766c 2845
1452af69
PE
28462004-03-08 Paul Eggert <eggert@gnu.org>
2847
2848 Add support for hex token numbers. Suggested by Odd Arild Olsen in
161a71f3 2849 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
1452af69
PE
2850
2851 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
2852 in lalr1.cc.
2853 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
2854 * src/scan-gram.l (scan_integer): New function.
2855 ({int}): Use it.
2856 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
2857 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
2858 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
2859 Say "long int", not "long", for uniformity with GNU style.
2860
006d217d
PE
28612004-02-25 Paul Eggert <eggert@twinsun.com>
2862
2863 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
2864 compilers. This fixes a problem with Intel's C++ compiler being
2865 chatty, reported by Guido Trentalancia in
161a71f3 2866 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
006d217d 2867
c2729758
ADL
28682004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
2869
2870 Support %destructor and merge error locations in lalr1.cc.
2871
2872 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
2873 (Parser::stos_): Define unconditionally.
2874 (Parser::destruct_): New method. Generate its body with
2875 b4_yydestruct_generate.
2876 (Parser::error_start_): New attribute.
2877 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
2878 token which are discarded.
2879 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
2880 error_start_ when erroneous token are discarded.
2881 (Parser::parse) <yyerrlab1>: Compute the location of the error
2882 token so that it covers all the discarded tokens.
2883 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
2884 it can be called with `%skeleton "lalr1.cc"', and do that.
2885
dd0e0635
PE
28862004-02-02 Paul Eggert <eggert@twinsun.com>
2887
2888 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
2889 $(top_srcdir)/lib and ../lib. This fixes a bug reported
2890 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
2891 There's no need to mention top_builddir since Automake does that
2892 for us.
2893 (INCLUDES): Remove, as Automake says it's obsolescent.
2894 Contents migrated into AM_CPPFLAGS as described above.
2895 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
2896
28972004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
2898
2899 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
2900 (yyreportSyntaxError): Handle case where lookahead token is
2901 YYEMPTY.
2902
be16239b
PH
29032004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2904
2905 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
2906 resulting parsers are compilable with C++.
2907
5fa90832
PE
29082003-12-23 Paul Eggert <eggert@twinsun.com>
2909
2910 * config/depcomp, config/install-sh: Sync with Automake 1.8.
2911 * src/output.c (output_skeleton): Rename local var.
2912 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
2913 Bison tokens, as this runs afoul of the 2003-10-07 change that
2914 disallowed NUL bytes in character constants or string literals.
2915
2916 * tests/local.at: Require Autoconf 2.59's Autotest.
2917 * tests/testsuite.at: Don't include local.at, since we now assume
2918 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
2919 including it.
2920 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
2921 multiple inclusion warnings.
dd0e0635 2922
b165c324
AD
29232003-12-02 Akim Demaille <akim@epita.fr>
2924
2925 * doc/bison.texinfo (How Can I Reset the Parser): More about start
2926 conditions.
2927 From Bruno Haible.
2928
26e06a21
ADL
29292003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
2930
2931 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
2932
92ac3705
PE
29332003-10-07 Paul Eggert <eggert@twinsun.com>
2934
6a5ecb38
PE
2935 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
2936 if testsuite doesn't exist.
2937
92ac3705
PE
2938 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
2939 literals, unfortunately.
2940 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
2941 Complain about NUL bytes in character constants or string literals.
2942
91d2c560
PE
29432003-10-05 Paul Eggert <eggert@twinsun.com>
2944
2945 * NEWS: Don't document %no-default-prec, as it's still
2946 too experimental.
2947 * doc/bison.texinfo: Document %no-default-prec only if
2948 the defaultprec flag is set. Normally it's not.
2949
0cc3da3a
PE
29502003-10-04 Paul Eggert <eggert@twinsun.com>
2951
2952 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
2953 non-modifiable lvalue, instead of a modifiable one.
2954 * doc/bison.texinfo (Actions): Document that $$ can
2955 be assigned to. Do not claim that $$ and $N are
2956 array element references: user code should not rely on this.
2957
22fccf95
PE
29582003-10-01 Paul Eggert <eggert@twinsun.com>
2959
2960 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
2961 (grammar_declaration): Use it.
2962 * src/scan-gram.l: New token %no-default-prec.
2963 * tests/conflicts.at: Revamp tests to use %no-default-prec.
2964 * NEWS, doc/bison.texinfo: Document the above.
2965
fc8f2965
AD
29662003-10-01 Akim Demaille <akim@epita.fr>
2967
2968 VCG no longer supports long_straight_phase.
2969
2970 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
2971 * src/print_graph.c (print_graph): Adjust.
2972
39a06c25
PE
29732003-09-30 Frank Heckenbach <frank@g-n-u.de>
2974 and Paul Eggert <eggert@twinsun.com>
2975
2976 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
2977 Table of Symbols): Document %default-prec.
2978 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
2979 (grammar_declaration): Set default_prec on %default-prec.
2980 * src/scan-gram.l (%default-prec): New token.
2981 * src/reader.h (default_prec): New flag.
2982 * src/reader.c: Likewise.
2983 (packgram): Handle it.
2984 * tests/conflicts.at (%default-prec without %prec,
2985 %default-prec with %prec, %default-prec 1): New tests.
fc8f2965 2986
39a06c25
PE
29872003-09-30 Paul Eggert <eggert@twinsun.com>
2988
2989 * tests/testsuite.at: Include local.at, not input.at, fixing
2990 a typo in the 2003-08-25 patch.
2991
62b6aef9
AD
29922003-08-27 Akim Demaille <akim@epita.fr>
2993
2994 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
2995 GCC warnings.
2996
89e1cc61
AD
29972003-08-26 Akim Demaille <akim@epita.fr>
2998
2999 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
3000 "<\#" to avoid magic from Gnus when posting parts of this script.
3001
a08460b0
AD
30022003-08-26 Akim Demaille <akim@epita.fr>
3003
3004 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
3005 (Parser::parse): here.
3006 Adjust: nerrs and errstatus is now replaced by...
3007 (Parser::nerrs_, Parser::errstatus_): New.
3008
603f1cfd
AD
30092003-08-25 Akim Demaille <akim@epita.fr>
3010
3011 * config/announce-gen, Makefile.cfg: New.
3012 * Makefile.am: Adjust.
3013 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
3014 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
3015
cd3684cf
AD
30162003-08-25 Akim Demaille <akim@epita.fr>
3017
3018 When reducing initial empty rules, Bison parser read an initial
3019 location that is not defined. This results in garbage, and that
3020 affects Bison's own parser. Therefore we need (i) to extend Bison
3021 to support a means to initialize this location, and (ii) to use
3022 this CVS Bison to fix CVS Bison's parser.
3023
3024 * src/reader.h, reader.c (epilogue_augment): Remove, replace
3025 with...
3026 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
3027 * src/parse-gram.y: Adjust.
3028 (%initial-action): New.
3029 (%error-verbose): Since we require CVS Bison, there is no reason
3030 not to use it.
3031 * src/scan-gram.l: Adjust.
3032 * src/Makefile.am (YACC): New, to make sure we use our own parser.
3033 * data/yacc.c (yyparse): Use b4_initial_action.
3034
4e03e201
AD
30352003-08-25 Akim Demaille <akim@epita.fr>
3036
3037 * doc/bison.texinfo: Don't promote stdout for error messages.
3038
8c182d05
AD
30392003-08-25 Akim Demaille <akim@epita.fr>
3040
3041 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
3042 From Alexandre Duret-Lutz.
3043
6a60c4cf
PE
30442003-08-25 Akim Demaille <akim@epita.fr>
3045
3046 Version 1.875c.
3047
25f66e1a
AD
30482003-08-25 Akim Demaille <akim@epita.fr>
3049
3050 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
3051 Use them.
3052
5348bfbe
AD
30532003-08-25 Akim Demaille <akim@epita.fr>
3054
3055 * data/lalr1.cc (Parser::reduce_print_): New.
3056 Use it.
3057
47301314
AD
30582003-08-25 Akim Demaille <akim@epita.fr>
3059
3060 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
3061 error recovery loops. This patch is based on
161a71f3 3062 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
47301314
AD
3063 Also, augment the similarity between lalr1.cc and yacc.c.
3064 Note: the locations of error recovery rules are not correct yet.
3065
3066 * data/lalr1.cc: Comment changes to augment the similarity between
3067 lalr1.cc and yacc.c.
3068 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
3069 (yyerrlab1): Remove, but where it used to be (now the bottom part of
3070 yyerrlab), when hitting EOF, pop the whole stack here instead of
3071 merely falling thru the default error handling mechanism.
3072 (yyerrorlab): New label, with the old contents of YYERROR,
3073 plus the following change: pop the stack of rhs corresponding
3074 to the production that invoked YYERROR. That is how Yacc
3075 behaves (required by POSIX).
3076 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
3077 fail.
3078
1f7a61ff
AD
30792003-08-25 Akim Demaille <akim@epita.fr>
3080
3081 Tune local.at so that people can "autom4te -l autotest calc.at -o
3082 calc" for instance, to extract a sub test suite.
3083
3084 * tests/testsuite.at: Move the initialization, Autotest version
3085 requirement, and AT_TESTED invocation into...
3086 * tests/local.at: here.
3087 * tests/testsuite.at: Include it for compatibility with Autoconf
3088 2.57.
3089 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
3090 be ignore.
3091
327b5b56
PE
30922003-08-04 Paul Eggert <eggert@twinsun.com>
3093
3094 Rework code slightly to avoid gcc -Wtraditional warnings.
3095 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
3096 The returned value is now stored in *YY0. All callers changed.
3097 * src/output.c (merge_output): Adjust to the above change.
3098
0051e3ed
PE
30992003-07-26 Paul Eggert <eggert@twinsun.com>
3100
3101 * data/glr.c (YYASSERT): New macro.
3102 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
3103 yyresolveStates, yyprocessOneStack):
3104 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
3105 Derived from a suggestion by Frank Heckenbach.
1f7a61ff 3106
137437c6
PE
31072003-07-25 Paul Eggert <eggert@twinsun.com>
3108
5b620e06
PE
3109 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
3110 for portability to K&R C (after ansi2knr, presumably). See
161a71f3 3111 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
5b620e06
PE
3112 by Frank Heckenbach, though I have omitted the structure-initialization
3113 part of his glr-knr.diff patch since I recall that the Portable
3114 C Compiler didn't require that change.
3115
137437c6
PE
3116 Let the user specify how to allocate and free memory.
3117 Derived from a suggestion by Frank Heckenbach in
161a71f3 3118 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
137437c6
PE
3119 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
3120 All uses of free, malloc, realloc changed to use these macros,
3121 and unnecessary casts removed.
3122 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
3123
ddb85ca5
PE
31242003-07-06 Matthias Mann <MatthiasMann@gmx.de>
3125
3126 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
3127 use s.empty() rather than s == "" to test for empty string; see
161a71f3 3128 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
ddb85ca5
PE
3129 (trivial change)
3130
39910e09
AD
31312003-06-25 Akim Demaille <akim@epita.fr>
3132
3133 * config/depcomp, config/install-sh: Update from masters.
3134
0ae99356
PE
31352003-06-20 Paul Eggert <eggert@twinsun.com>
3136
3137 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
3138 and return properly parenthesized result.
3139 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
3140 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
3141 Remove unnecessary parentheses from uses.
3142 * doc/bison.texinfo (Location Default Action): Describe the
3143 conventions for parentheses.
3144
cd05d13c
PE
31452003-06-19 Paul Eggert <eggert@twinsun.com>
3146
81fd08ca
PE
3147 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
3148 yyreportTree): Do not assume that size_t is the same width as int,
3149 when printing sizes. Print sizes using an unsigned format.
3150 Problem reported by Frank Heckenbach in
161a71f3 3151 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
4dcf140b 3152
cd05d13c
PE
3153 Port to Forte Developer 7 C compiler.
3154 * data/glr.c (struct YYLTYPE): If locations are not being used,
3155 declare a single dummy member, as empty structs do not conform
3156 to the C standard.
3157 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
3158 the Forte Developer 7 C compiler complains that end-of-loop
3159 code is not reached.
3160
4dcf140b
PE
31612003-06-17 Paul Eggert <eggert@twinsun.com>
3162
3163 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
3164 avoid warnings from picky compilers about redefinition of PARAMS.
3165
8dd76bee
PE
31662003-06-17 Paul Eggert <eggert@twinsun.com>
3167
3168 Version 1.875b.
3169
3170 * NEWS: Document 1.875b.
3171
3172 * lib/bbitset.h: Do not include config.h; that's the includer's job.
3173 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
3174 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
3175 Don't use 'index' in comments, as it's a builtin fn on some hosts.
3176 * lib/bitset_stats.c: Include gettext.h unconditionally, as
3177 per recent gettext manual's suggestion.
3178 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
3179 Use prototypes, not old-style definitions.
3180 * lib/lbitset.c (lbitset_unused_clear): Likewise.
3181 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
3182 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
3183 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
3184 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
3185 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
3186 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
3187 vbitset_or_and_cmp, vbitset_copy): Likewise.
3188
3189 * lib/libiberty.h: Do not include config.h; that's the includer's job.
3190 Do not include <stdlib.h>.
3191 (PARAMS): Define unconditionally for C89.
3192 (ATTRIBUTE_NORETURN): Remove.
3193 (ATTRIBUTE_UNUSED): Define unconditionally.
3194
3195 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
161a71f3 3196 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
8dd76bee
PE
3197 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
3198 * lib/vbitset.c, lib/vbitset.h: New files.
3199 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
3200 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
3201 from libbitset.
3202
3203 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
3204 `How Can I Reset @code{yyparse}', since texinfo does not allow
3205 arbitrary @ in node names.
3206
3207 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
3208 shouldn't be needed according to the gettext 0.12.1 documentation
3209 but which seem to be needed anyway: codeset.m4 glibc21.m4
f8e8262e 3210 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
8dd76bee 3211 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
f8e8262e 3212 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
cd05d13c 3213
8dd76bee
PE
3214 * lib/.cvsignore: Add stdbool.h.
3215 * m4/.cvsignore: Add nls.m4, po.m4.
3216
3217 Upgrade to CVS gnulib.
3218 * stdbool_.h: File renamed from stdbool.h.in.
3219 * configure.ac (AM_STDBOOL_H): Invoke this instead of
3220 AC_HEADER_STDBOOL.
3221 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
3222 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
3223 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
3224 (MOSTLYCLEANFILES): New var.
3225 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
3226 (stdbool.h): New rule.
3227 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
3228 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
3229 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
3230 m4/quote.m4: Upgrade to today's gnulib.
3231
3232 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
3233 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
3234 the tests right now.
3235 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
3236 yyerror are declared before use; C99 requires this.
3237
25005f6a
PH
32382003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3239
3240 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
3241 first.
3242 (yyrecoverSyntaxError): Correct the logic for setting and testing
3243 yyerrState.
3244 Correct comment on handling EOF.
3245 Allow states with only a default reduction, rather than failing
8dd76bee 3246 (I can't quite reconstruct why these were not allowed before).
25005f6a 3247
137437c6 3248 Fixes to avoid problem that $-N rules in GLR parsers can cause
25005f6a 3249 buffer overruns, corrupting state.
8dd76bee
PE
3250
3251 * src/output.c (prepare_rules): Output max_left_semantic_context
25005f6a
PH
3252 definition.
3253 * src/reader.h (max_left_semantic_context): New variable declaration.
3254 * src/scan-gram.l (max_left_semantic_context): Define.
3255 (handle_action_dollar): Update max_left_semantic_context.
3256 * data/glr.c (YYMAXLEFT): New definition.
3257 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
3258 (yyresolveAction): Ditto.
3259
3260 Fixes to problems with location handling in GLR parsers reported by
3261 Frank Heckenbach (2003/06/05).
3262
3263 * data/glr.c (YYLTYPE): Make trivial if locations not used.
3264 (YYRHSLOC): Add parentheses, and define only if locations used.
3265 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
3266 locations not used.
3267 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
3268 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
8dd76bee 3269
25005f6a
PH
3270 * tests/cxx-type.at: Exercise location information; update tests
3271 to differentiate output with and without locations.
8dd76bee 3272 Remove forward declarations of yylex and yyerror---caused errors
25005f6a
PH
3273 because default YYLTYPE not yet defined.
3274 Change semantic actions to compute strings, rather than printing
3275 them directly (to test proper passing of semantics values). Change
3276 output to prefix notation and update test data and expected results.
3277 (yylex): Track locations.
3278 (stmtMerge): Return value rather than printing, and include arguments
3279 in value.
8dd76bee 3280
711f40b7
PE
32812003-06-03 Paul Eggert <eggert@twinsun.com>
3282
3283 Avoid warnings generated by GCC 2.95.4 when Bison is
3284 configured with --enable-gcc-warnings.
3285 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
3286 yy::]b4_parser_class_name[::translate_,
3287 yy::Stack::operator[] (unsigned),
3288 yy::Stack::operator[] (unsigned) const,
3289 yy::Slice::operator[] (unsigned),
3290 yy::Slice::operator[] (unsigned) const):
3291 Rename local vars to avoid warnings.
3292 * tests/glr-regression.at (Improper handling of embedded actions
3293 and $-N in GLR parsers): Remove unused local variable from yylex.
3294 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
3295 (void) as arg when not pure, since we now assume C89 when building
3296 Bison. Pacify GCC by using parameter.
3297
ac695f7d
PE
32982003-06-02 Paul Eggert <eggert@twinsun.com>
3299
3300 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
3301 yy::Location::lines, yy::Location::columns): Rename arguments
3302 to avoid shadowing; this removes a warning generated by GCC 3.3.
3303
26ec81e0
PE
33042003-06-01 Paul Eggert <eggert@twinsun.com>
3305
3306 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
3307 to g++, as GCC 3.3 complains if you do it.
3308 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
3309 everything that WARNING_CFLAGS has, except omit warnings
3310 not suitable for C++.
3311 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
3312 * tests/atlocal.in (CXXFLAGS): New var.
3313 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
3314
3315 Fix a GLR parser bug I reported in February; see
161a71f3 3316 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
26ec81e0
PE
3317 The problem was that GLR parsers did not conform to the C standard,
3318 because actions like { $1 = $2 + $3; } expanded to expressions
3319 that invoked YYFILL in separate subexpressions, and YYFILL assigned
3320 to a local variable. The C standard says that expressions
3321 like (var = f ()) + (var = f ()) have undefined behavior.
3322 Another problem was that GCC sometimes issues warnings that
3323 yyfill and its parameters are unused.
3324
3325 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
3326 as possibly unused.
3327 (yyfill): New function.
3328 (YYFILL): Use it.
3329 (yyuserAction): Change type of yynormal to bool, so that it matches
3330 the new yyfill signature. Mark it as possibly unused.
3331
3332
3333 Follow up on a bug I reported in February, where a Bison-generated
3334 parser can loop. Provide a test case and a fix for yacc.c. I
3335 don't have a fix for lalr1.cc or for glr.c, unfortunately.
3336 The original bug report is in:
161a71f3 3337 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
26ec81e0
PE
3338
3339 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
3340 macro's size was becoming unwieldy.
3341 (yyerrlab): Do not discard an empty lookahead symbol, as this
3342 might destroy garbage.
3343 (yyerrorlab): New label, with the old contents of YYERROR,
3344 plus the following change: pop the stack of rhs corresponding
3345 to the production that invoked YYERROR. That is how Yacc
3346 behaves, and POSIX requires this behavior.
3347 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
3348 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
3349 Define 'alarm' to do nothing if unistd.h is not available.
3350 Add a new rule "exp: '-' error;" to test the above change to
3351 data/yacc.c. Use 'alarm' to abort any test taking longer than
3352 10 seconds, as it's probably looping.
3353 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
3354 Also, the new yacc.c generates two fewer diagnostics for an
3355 existing test.
3356
d0829076
PE
33572003-05-24 Paul Eggert <eggert@twinsun.com>
3358
c6ae27df
PE
3359 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
3360 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
3361 This fixes a problem reported by John Bowman when the Compaq/HP
3362 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
3363 -ansi -Wall -gall).
3364 * data/yacc.c (union yyalloc): Likewise.
3365 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
26ec81e0 3366
d0829076
PE
3367 Switch from 'int' to 'bool' where that makes sense.
3368
3369 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
3370 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
3371 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
3372 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
3373 Return or accept bool, not int. All callers changed.
3374 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
3375 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
3376 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
3377 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
3378 bitset_or_and_cmp_): Likewise.
3379 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
3380 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
3381 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
3382 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
3383 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
3384 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
3385 bitset_stats_or_and_cmp): Likewise.
3386 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
3387 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
3388 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
3389 ebitset_xor_cmp): Likewise.
3390 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
3391 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
3392 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
3393 lbitset_xor_cmp): Likewise.
3394 * lib/bbitset.h: Include <stdbool.h>.
3395 (struct bitset_vtable): The following members now return bool, not
3396 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
3397 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
3398 or_and_cmp).
3399 * src/conflicts.c (count_rr_conflicts): Likewise.
3400 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
3401 All uses changed.
3402 * lib/ebitset.c (ebitset_obstack_init): Likewise.
3403 * lib/lbitset.c (lbitset_obstack_init): Likewise.
3404 * src/getargs.c (debug_flag, defines_flag, locations_flag,
3405 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
3406 graph_flag): Likewise.
3407 * src/getargs.h (debug_flag, defines_flag, locations_flag,
3408 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
3409 graph_flag): Likewise.
3410 * src/output.c (error_verbose): Likewise.
3411 * src/output.h (error_verbose): Likewise.
3412 * src/reader.c (start_flag, typed): Likewise.
3413 * src/reader.h (typed): Likewise.
3414 * src/getargs.c (LOCATIONS_OPTION): New constant.
3415 (long_options, getargs): Use it.
3416 * src/lalr.c (build_relations): Use bool, not int.
3417 * src/nullable.c (nullable_compute): Likewise.
3418 * src/print.c (print_reductions): Likewise.
3419 * src/tables.c (action_row, pack_vector): Likewise.
3420 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
3421 * src/output.c (prepare): Use it.
3422 * src/output.c (token_definitions_output,
3423 symbol_destructors_output, symbol_destructors_output): Use string,
3424 not boolean integer, to keep track of whether to output separator.
3425 * src/print_graph.c (print_core): Likewise.
3426 * src/state.c (state_rule_lookaheads_print): Likewise.
3427
3428 * config/install-sh: Sync from automake 1.7.5.
3429
6b2584b7
PE
34302003-05-14 Paul Eggert <eggert@twinsun.com>
3431
3432 * src/parse-gram.y (rules_or_grammar_declaration): Require a
3433 semicolon after a grammar declaration, in the interest of possible
3434 future changes to the Bison input language.
3435 Do not allow a stray semicolon at the start of the grammar.
3436 (rhses.1): Allow one or more semicolons after any rule, including
3437 just before "|" as required by POSIX.
3438 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
3439 grammar.
3440
caf37a36
ADL
34412003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
3442
3443 %parse-param support for lalr1.cc.
3444
3445 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
3446 b4_cc_constructor_calls, b4_cc_constructor_call,
3447 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
3448 definitions.
3449 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
3450 parse-param arguments.
3451 (yy::b4_parser_class_name): Declare instance variables to
3452 hold parse-param arguments.
3453 * tests/calc.at: s/value/semantic_value/ because value clashes
3454 with a member of yy::b4_parser_class_name. Adjust C++ code
3455 to handle %parse-param. Enable %parse-param test in C++.
3456
3ab37077
PE
34572003-05-12 Paul Eggert <eggert@twinsun.com>
3458
3459 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
3460 English a bit. Fix fclose typo. Change "const char" to "char
3461 const", and use ANSI C rather than K&R for "main". Suggest
3462 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
3463 and suggest yy_switch_to_buffer.
3464
34652003-05-05 Paul Eggert <eggert@twinsun.com>
163ab321
PE
3466
3467 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
3468 C89. This avoids a diagnostic on compilers that define __STDC__
3469 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
161a71f3 3470 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
163ab321 3471
e743727f
PE
34722003-05-03 Paul Eggert <eggert@twinsun.com>
3473
3474 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
3475 Do not overrun array bounds.
3476 This should fix a bug reported today by Olatunji Oluwabukunmi in
161a71f3 3477 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
e743727f 3478
916708d5
AD
34792003-04-29 Akim Demaille <akim@epita.fr>
3480
3481 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
3482 * src/getargs.c, src/getargs.h: here, as bool, not int.
3483 (nondeterministic_parser): New.
3484 * src/parse-gram.y, src/scan-gram.l: Support
3485 %nondeterministic-parser.
3486 * src/output.c (prepare): Use nondeterministic_parser instead
3487 of glr_parser where appropriate.
3488 * src/tables.c (conflict_row, action_row, save_row)
3489 (token_actions, token_actions, pack_vector): Ditto.
3490
a06ea4aa
AD
34912003-04-29 Akim Demaille <akim@epita.fr>
3492
3493 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
3494
211074ca
AD
34952003-04-29 Akim Demaille <akim@epita.fr>
3496
3497 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
3498 with %pure-parser and %locations to exercise the patch from Yakov
3499 Markovitch below.
3500
6175ffe3
PE
35012003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
3502
3503 * data/yacc.c: (b4_lex_param): Corrected for the case where
3504 %lex-param is provided and %pure-parser isn't.
3505
b1e95857
PE
35062003-04-27 Paul Eggert <eggert@twinsun.com>
3507
3508 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
161a71f3 3509 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
b1e95857
PE
3510 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
3511 if it is not defined.
3512 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
3513
acda9df6
PE
35142003-04-26 Paul Eggert <eggert@twinsun.com>
3515
3470c57b
PE
3516 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
3517 Declare to be of type suitable for the ninf value itself, not of
3518 type suitable for the corresponding table, since the latter might
3519 be unsigned but the ninf value might be negative. This fixes a
3520 bug reported by Alexandre Duret-Lutz in
161a71f3 3521 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
3470c57b 3522
acda9df6
PE
3523 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
3524 invokes it. We shouldn't invoke it twice because it will attempt
3525 to put error.o in the archive twice. This fixes a glitch reported
3526 by Martin Mokrejs in
161a71f3 3527 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
acda9df6 3528
b5250f26
PE
35292003-04-21 Paul Eggert <eggert@twinsun.com>
3530
3531 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
3532 to gnulib.
3533
089ac0f1
PE
35342003-04-21 Yakov Markovitch <Markovitch@iso.ru>
3535
3536 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
3537 Fix obvious typo that results in uncompilable GLR parsers
3538 when both %pure-parser and %locations are used. (trivial change)
3539
5ededac6
PE
35402003-04-17 Paul Eggert <eggert@twinsun.com>
3541
1b8f2fff
PE
3542 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
3543 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
3544 Do not insert the expected token via unput, as this runs afoul
3545 of a POSIX-compatibility bug in flex 2.5.31.
3546 All uses changed to BEGIN the parent state,
3547 since we no longer insert the expected token via unput.
3548 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
3549 that is no longer emitted after the above change.
3550
5ededac6
PE
3551 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
3552 the first one. This change is from Paul Hilfinger, and it fixes
3553 regression reported by Werner Lemberg in
161a71f3 3554 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
5ededac6
PE
3555
3556 (resolve_sr_conflict): Don't invoke state_errs_set
3557 unless one or more tokens have been explicitly made errors.
3558 Otherwise, the above change causes Bison to abort.
3559
3560 * tests/existing.at (GNU pic Grammar): New test case, taken from
3561 Lemberg's email.
3562
b8be9132
AD
35632003-03-31 Akim Demaille <akim@epita.fr>
3564
3565 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
3566
d423d460
AD
35672003-03-31 Akim Demaille <akim@epita.fr>
3568
3569 * src/output.c (prepare_symbols): Avoid trailing spaces in the
3570 output.
3571
c7e441b4
AD
35722003-03-31 Akim Demaille <akim@epita.fr>
3573
3574 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
3575 From Paul Hilfinger.
3576
231897ad
AD
35772003-03-29 Akim Demaille <akim@epita.fr>
3578
3579 * m4/error.m4: Do not put under dynamic conditions some code which
3580 expansion is under static control.
3581
5b066063
AD
35822003-03-29 Akim Demaille <akim@epita.fr>
3583
3584 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
3585
22a74fec
AD
35862003-03-29 Akim Demaille <akim@epita.fr>
3587
3588 * doc/bison.texinfo (Strings are Destroyed): New.
3589
0eee27e7
PE
35902003-03-13 Paul Eggert <eggert@twinsun.com>
3591
3592 * .cvsignore: Add configure.lineno.
3593 * src/.cvsignore: Add yacc.
3594 * tests/.cvsignore: Add testsuite.log.
3595 * doc/fdl.texi: Sync with latest FSF version.
3596
f61aad93
PE
35972003-03-12 Paul Eggert <eggert@twinsun.com>
3598
537636c7
PE
3599 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
3600 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
3601 cursor, instead of leaving it undefined. This fixes a bug
3602 reported by Tim Van Holder in
161a71f3 3603 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
537636c7
PE
3604 * tests/input.at (Torturing the Scanner): Test the scanner on
3605 an empty input file, which was Tim Van Holder's test case.
3606
3607 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
3608 <sys/resource.h> can be included, include sys/time.h and
3609 sys/times.h first, if available. This works around the SunOS
3610 4.1.4 porting bug reported by Bruce Becker in
161a71f3 3611 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
537636c7
PE
3612
3613 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
3614 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
3615 AC_HEADER_SYS_WAIT.
3616
f61aad93
PE
3617 Merge changes from gnulib. This was prompted because the CVS
3618 snapshot didn't build on Solaris 7 due to strnlen problems.
3619
3620 These changes need to be merged back into gnulib:
3621 * lib/hash.c: Include <stdbool.h> unconditionally.
3622 * m4/onceonly.m4 (m4_quote): New macro.
3623 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
3624 Quote AC_FOREACH variable-expansions properly.
3625 The 2003-01-03 obstack.h change also needs merging.
3626 {end of changes requiring merging}
5b066063 3627
f61aad93
PE
3628 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
3629 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
3630 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
3631 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
3632 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
3633 New files, imported from gnulib.
3634 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
3635 above.
3636
3637 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
3638 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
3639 gnulib sources.
3640
3641 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
3642 Add.
3643 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
3644 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
3645 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
3646 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
3647 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
3648 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
3649 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
3650 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
3651 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
3652 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
3653 (jm_PREREQ_ARGMATCH): Remove.
3654 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
3655 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
3656
3657 * src/system.h: Include <stdbool.h> unconditionally.
3658
3659 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
3660 assuming at least C89 in the bitset code for some time now.
3661
d2ffe116
AD
36622003-03-03 Akim Demaille <akim@epita.fr>
3663
3664 * ro.po: New.
3665
052826fd
AD
36662003-03-02 Akim Demaille <akim@epita.fr>
3667
3668 * doc/bison.texinfo (Table of Symbols): Reactivate the
3669 documentation for %lex-param, and %parse-param.
3670
c4749565
AD
36712003-03-02 Akim Demaille <akim@epita.fr>
3672
3673 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
3674 generate verbose error messages.
3675 Use the number of tokens as an upper bound in yytname, as it
3676 cannot be a non terminal.
3677
d5286af1
AD
36782003-03-02 Akim Demaille <akim@epita.fr>
3679
3680 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
3681 message.
3682
22e304a6
AD
36832003-03-02 Akim Demaille <akim@epita.fr>
3684
22e304a6
AD
3685 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
3686 Use them to exercise yycheck overrun.
3687 Based on Andrew Suffield's grammar.
3688
67a25fed
AD
36892003-03-02 Akim Demaille <akim@epita.fr>
3690
3691 Create tests/local.at for Bison generic testing macros.
3692
3693 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
3694 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
3695 This new file.
3696 * tests/calc.at (AT_CHECK_CALC): Adjust.
3697 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
3698 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
3699 * tests/local.at: here.
3700 (AT_COMPILE_CXX): Tags the tests using it as c++.
3701 Ignore the test if CXX is not functional.
3702
9c2b381f
PE
37032003-03-01 Paul Eggert <eggert@twinsun.com>
3704
3705 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
3706 not loc->end, since loc->end might contain garbage and this leads
3707 to undefined behavior on some platforms.
3708 (id_loc, token_start): Use (IF_LINTed) initial values that do not
3709 depend on *loc, so that the reader doesn't give the the false
3710 impression that *loc is initialized.
3711 (<INITIAL>"%%"): Do not bother setting code_start, since its value
3712 does not survive the return.
3713
0433ba88
AD
37142003-03-01 Akim Demaille <akim@epita.fr>
3715
3716 * src/scan-gram.l (code_start): Always initialize it when entering
3717 into yylex, as SC_EPILOGUE is activated *before* the corresponding
3718 yylex invocation. An alternative would be making it static, but
3719 then it starts with the second %%'s beginning, instead of its end.
3720
b305ea69
PE
37212003-02-28 Paul Eggert <eggert@twinsun.com>
3722
3723 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
3724 around a UnixWare 7.1.1 porting bug reported by John Hughes in
161a71f3 3725 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
b305ea69 3726
c3d25e01
PE
37272003-02-26 Paul Eggert <eggert@twinsun.com>
3728
3729 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
3730 Remove Sequent/Pyramid discussion (nobody uses them any more).
3731 Merge VMS and MS-DOS discussion; these ports may well be dead
3732 but let's keep mentioning them for now. Put <> around email
3733 addresses. Add copyright notice.
3734
c267ffbc
PE
37352003-02-24 Paul Eggert <eggert@twinsun.com>
3736
3737 * data/glr.c (yy_reduce_print): yylineno -> yylno,
3738 to avoid collision with flex use of yylineno.
3739 Problem reported by Bruce Lilly in
161a71f3 3740 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
c267ffbc
PE
3741 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
3742 * data/yacc.c (yy_reduce_print): Likewise.
3743
3744 * config/depcomp: Sync with Automake 1.7.3.
3745
f939fc12
AD
37462003-02-21 Akim Demaille <akim@epita.fr>
3747
3748 * data/lalr1.cc: Use temporary variables instead of casts to
3749 change integer types.
3750 Suggested by Paul Eggert.
3751
95923bd6
AD
37522003-02-21 Akim Demaille <akim@epita.fr>
3753
3754 * doc/bison.texinfo: Use "location" consistently to refer to @n,
3755 to avoid confusions with lalr1.cc's notion of Position.
3756 Suggested by Paul Eggert.
3757
2cdc240e
AD
37582003-02-20 Akim Demaille <akim@epita.fr>
3759
3760 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
3761 before initial_columns.
3762 (location.hh): Use consistent variable names when defining the
3763 operator<<.
3764 Use "last" so that we subtract from Positions, not from unsigned.
3765
5d003116
AD
37662003-02-20 Akim Demaille <akim@epita.fr>
3767
3768 * data/lalr1.cc (position.hh): New subfile, including the extended
3769 and Doxygen'ed documentation of class Position.
3770 (location.hh): Use it.
3771 Document a` la Doxygen.
ba1ecc07 3772 With the help of Benoit Perrot.
5d003116 3773
d02b25f9
AD
37742003-02-20 Akim Demaille <akim@epita.fr>
3775
3776 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
3777 AT_YACC_IF.
3778 Redefine AT_YYERROR_SEES_LOC_IF using it.
3779 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
3780 not defined.
3781 Don't use the location in yy::Parser::error_ and
3782 yy::Parser::print_ when not %locations.
3783 Activate more lalr1.cc tests.
3784
0d1c3a04
AD
37852003-02-19 Akim Demaille <akim@epita.fr>
3786
3787 * data/lalr1.cc: When displaying a line number, be sure to make it
3788 an int.
3789
60a777aa
AD
37902003-02-19 Akim Demaille <akim@epita.fr>
3791
3792 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
3793 Remove, useless.
3794 (YYABORT, YYACCEPT, YYERROR): New.
3795 * tests/calc.at: Renable the lalr1.cc test.
3796
0b86fc41
AD
37972003-02-19 Akim Demaille <akim@epita.fr>
3798
3799 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
3800 error recovery, mixing with/without pops and discarding of the
3801 lookahead.
3802 Exercise YYERROR.
3803 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
3804
da99a5dc
PE
38052003-02-17 Paul Eggert <eggert@twinsun.com>
3806
3807 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
3808 * tests/testsuite.at (AT_COMPILE): Use them.
3809 This fixes the testsuite problem reported by Robert Lentz in
161a71f3 3810 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
da99a5dc 3811
93b8c255
PE
38122003-02-12 Paul Eggert <eggert@twinsun.com>
3813
3814 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
3815 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
161a71f3 3816 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
93b8c255
PE
3817 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
3818 Check for malloc failure, for consistency with yacc.c.
3819 (yytname_size): Remove, for consistency with yacc.c.
3820
3821 The bug still remains in data/lalr1.cc, as I didn't have time
3822 to fix it there.
3823
7548fed2
AD
38242003-02-06 Akim Demaille <akim@epita.fr>
3825
3826 * configure.ac (GXX): Rename as...
3827 (CXX): this, to keep the original Autoconf semantics.
3828 Require 2.57.
3829 * data/lalr1.cc: Fix b4_copyright invocations.
3830 If YYDEBUG is not defined, don't depend upon name_ being defined.
3831 (location.hh): Include string and iostream.
3832 (Position::filename): New member.
3833 (Position::Position ()): New.
3834 (operator<< (Position)): New.
3835 (operator- (Position, int)): New.
3836 (Location::first, Location::last): Rename as...
3837 (Location::begin, Location::end): these, to mock the conventional
3838 iterator names.
3839 (operator<< (Location)): New.
3840 * tests/atlocal.in (CXX): New.
3841 * tests/testsuite.at (AT_COMPILE_CXX): New.
3842 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
3843 locations in a more synthetic way.
3844 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
3845 lalr1.cc is used.
3846 Adjust the C locations to match those from Emacs: first column is
3847 column 0.
3848 Change all the expected results.
3849 Conform to the GCS: simplify the locations when applicable.
3850 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
3851 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
3852 these CPP macros with the m4 macros new defined by...
3853 (AT_CHECK_PUSHDEFS): this, i.e.:
3854 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
d02b25f9 3855 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
7548fed2
AD
3856 New macros.
3857 (AT_CHECK_POPDEFS): Undefine them.
3858 (AT_CHECK_CALC_LALR1_CC): New.
3859 Use it for the first lalr1.cc test.
3860
43a176ef
AD
38612003-02-04 Akim Demaille <akim@epita.fr>
3862
3863 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
3864 Location as is defined.
3865
fc049e9c
AD
38662003-02-04 Akim Demaille <akim@epita.fr>
3867
3868 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
3869 name_ being defined.
3870
a737b216
PE
38712003-02-03 Paul Eggert <eggert@twinsun.com>
3872
3873 * src/gram.h (start_symbol): Remove unused decl.
3874
3875 Use more-consistent naming conventions for local vars.
3876
3877 * src/derives.c (derives_compute): Change type of local var from
3878 int to rule_number.
3879 * src/gram.c (grammar_rules_partial_print): Likewise.
3880 * src/print.c (print_core): Likewise.
3881 * src/reduce.c (reduce_grammar_tables): Likewise.
3882
3883 * src/gram.c (grammar_dump): Change name of item_number *
3884 local var from r to rp.
3885 * src/nullable.c (nullable_compute): Likewise.
3886
3887 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
3888
3889 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
3890 for symbol or symbol_number var.
3891 * src/reader.c (grammar_start_symbol_set): Likewise.
3892 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
3893 Likewise.
3894 * src/state.c (transitions_to): Likewise.
3895 * src/state.h: Likewise.
3896 * src/tables.c (symbol_number_to_vector_number): Likewise.
3897
3898 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
3899 char * var.
3900
3901 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
3902 var.
3903
3904 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
3905 var.
3906
3907 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
3908 Use str, not s, for char * var. Use ch, not c, for character var.
3909 Use size for size var.
3910
3911 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
3912 char * var.
3913 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
3914 uniqstr var.
3915 * src/uniqstr.h: Likewise.
3916
3917 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
3918 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
3919 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
3920 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
3921 param to have same name as that of enum, so that we don't use
3922 "s" to stand for a non-state.
3923
68e93ad5
AD
39242003-02-02 Akim Demaille <akim@epita.fr>
3925
3926 * src/scan-skel.l: Scan more than one inert character per yylex
3927 invocation.
3928
92898986
PE
39292003-02-01 Paul Eggert <eggert@twinsun.com>
3930
3931 Version 1.875a.
3932
1d9d5d71
PE
3933 * po/LINGUAS: Add ms.
3934
0435d061
AD
39352003-01-30 Akim Demaille <akim@epita.fr>
3936
3937 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
3938
6029a57f
PH
39392003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3940
3941 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
3942 of $1.
0435d061
AD
3943
3944 Changes in response to error report by S. Eken: GLR mode does not
6029a57f 3945 handle negative $ indices or $ indices in embedded rules correctly.
161a71f3 3946 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
0435d061 3947
6029a57f
PH
3948 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
3949 (b4_rhs_location): Ditto.
0435d061 3950 (yyfill): New function to copy from stack tree into array
6029a57f 3951 incrementally.
0435d061
AD
3952 (yyuserAction): Modify to allow incremental move of semantic values
3953 to rhs array when in GLR mode.
3954 Define YYFILL to use in user-defined actions to fill semantic array
6029a57f
PH
3955 as needed.
3956 Remove dummy use of yystack, as there is now a guaranteed use.
3957 (yydoAction): Modify to allow incremental move of semantic values
3958 to rhs array when in GLR mode.
3959 (yyresolveAction): Ditto.
3960 (yyglrShiftDefer): Update comment.
0435d061 3961 (yyresolveStates): Use X == NULL for pointers, not !X.
6029a57f
PH
3962 (yyglrReduce): Ditto.
3963 (yydoAction): Ditto
0435d061 3964
6029a57f
PH
3965 * tests/glr-regr1.at: Rename to ...
3966 * tests/glr-regression.at: Add new regression test for the problems
3967 described above (adapted from S. Eken).
3968 Update copyright notice.
3969 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
3970 * tests/Makefile.am: Ditto.
3971
6cee6297
PE
39722003-01-28 Paul Eggert <eggert@twinsun.com>
3973
3974 * data/lalr1.cc: Do not use @output_header_name@ unless
3975 b4_defines_flag is set. This fixes two bugs reported by
3976 Tim Van Holder in
161a71f3
PE
3977 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
3978 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
6cee6297 3979
b2a836b5
PE
39802003-01-21 Paul Eggert <eggert@twinsun.com>
3981
3982 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
3983 we don't need to worry about yyerrlab1 being reported as an
3984 "unused label" by non-GCC C compilers. The downside is that if
3985 locations are used then a couple of statements are duplicated each
3986 time YYERROR is invoked, but the upside is that the warnings
3987 should vanish.
3988 (yyerrlab1): Move code to YERROR.
3989 (yyerrlab2): Remove. Change uses back to yyerrlab1.
3990 This reverts some of the 2002-12-27 change.
3991
4196b931
PE
39922003-01-17 Paul Eggert <eggert@twinsun.com>
3993
3994 * src/output.c (symbol_printers_output): Fix typo that led
3995 to core dump. Problem reported by Antonio Rus in
161a71f3 3996 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
4196b931 3997
3ae831b4
AD
39982003-01-13 Akim Demaille <akim@epita.fr>,
3999 Quoc Peyrot <chojin@lrde.epita.fr>,
4000 Robert Anisko <anisko_r@lrde.epita.fr>
4001
4002 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
4003 when the stacks contain one element, as the loop would otherwise
4004 free the last state, and then use the top state (the one we just
4005 popped). This means that the initial elements will not be freed
4006 explicitly, as is the case in yacc.c; it is not a problem, as
4007 these elements have fake values.
4008
e3aa65c5
PE
40092003-01-11 Paul Eggert <eggert@twinsun.com>
4010
4011 * NEWS: %expect-violations are now just warnings, reverting
4012 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
4013 bootstrapping problem reported by Matthias Klose; see
161a71f3 4014 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
e3aa65c5
PE
4015 * src/conflicts.c (conflicts_print): Likewise.
4016 * tests/conflicts.at (%expect not enough, %expect too much,
4017 %expect with reduce conflicts): Likewise.
4018 * doc/bison.texinfo (Expect Decl): Document this. Also mention
4019 that the warning is enabled if the number of conflicts changes
4020 (not necessarily increases).
4021
4022 * src/getargs.c (version): Update copyright year.
4023
f0057011
AD
40242003-01-09 Akim Demaille <akim@epita.fr>
4025
4026 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
4027
1ee6d2a0
PE
40282003-01-08 Paul Eggert <eggert@twinsun.com>
4029
4030 * Makefile.maint (WGETFLAGS):
4031 New macro, containing "-C off" to disable proxy caches.
4032 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
4033 (rel-check): Use $(WGET) instead of wget.
4034
d4fd77c4
PE
40352003-01-06 Paul Eggert <eggert@twinsun.com>
4036
4037 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
4038 the GLR paper of Scott, Johnstone and Hussain.
4039
464c6927
PE
40402003-01-04 Paul Eggert <eggert@twinsun.com>
4041
d600ee67
PE
4042 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
4043 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
4044 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
4045 (EXTRA_LIBRARIES): New var, for liby.a.
4046 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
4047 (EXTRA_SCRIPTS): New var, for yacc.
4048
464c6927
PE
4049 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
4050 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
4051 Problem reported by Nelson H. F. Beebe.
4052
40532003-01-03 Paul Eggert <eggert@twinsun.com>
4054
4055 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
4056 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
4057 when compiling Bison 1.875's `bitset bset = obstack_alloc
4058 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
4059
4060 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
4061 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
4062 grow to a huge size with typical invocation.
d600ee67 4063
464c6927
PE
4064 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
4065 Use the pattern recommended by Autoconf 2.57, except also protect
4066 against double-definition.
4067 * src/system.h: Likewise.
4068 Portability issues reported by Nelson H. F. Beebe.
d600ee67 4069
464c6927
PE
4070 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
4071 All uses changed. Provide a definition in both C and C++.
4072 (yytrue, yyfalse): Define even if defined (__cplusplus).
4073
4074 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
4075 Reported by Nelson H. F. Beebe.
d600ee67 4076
464c6927
PE
4077 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
4078
0f42c7d5
PE
40792003-01-02 Paul Eggert <eggert@twinsun.com>
4080
4081 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
4082 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
4083 Bug reported by Nelson H. F. Beebe.
4084
dc546b0f
PE
40852003-01-01 Paul Eggert <eggert@twinsun.com>
4086
4087 * Version 1.875.
4088
2c09b6a7
PE
40892002-12-30 Paul Eggert <eggert@twinsun.com>
4090
4091 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
4092 Moved here from...
4093 (<INITIAL>","): Here. This causes stray "," to be treated
4094 more uniformly.
4095
dc546b0f 4096 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
2c09b6a7
PE
4097 last brace in braced code when not in Yacc mode, for compatibility
4098 with Bison 1.35. This resurrects the 2001-12-15 patch to
4099 src/reader.c.
4100
4101 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
4102 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
4103
535c0f63
PE
41042002-12-28 Paul Eggert <eggert@twinsun.com>
4105
4106 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
4107 that of SYM's type. This fixes Debian bug 168069, reported by
4108 Thomas Olsson.
d600ee67 4109
963fcc17
PE
41102002-12-28 Paul Eggert <eggert@twinsun.com>
4111
4112 Version 1.75f.
4113
4114 Switch back to the Yacc style of conflict reports, undoing some
4115 of the 2002-07-30 change.
4116 * doc/bison.texinfo (Understanding): Use Yacc style for
4117 conflict reports. Also, use new way of locating rules.
4118 * src/conflicts.c (conflict_report):
4119 Renamed from conflict_report_yacc, removing the old
4120 'conflict_report'. Translate the entire conflict report at once,
4121 so that we don't assume that "," has the same interpretation in
4122 all languages.
4123 (conflicts_output): Use Yacc-style conflict report for each state,
4124 instead of our more-complicated style.
4125 (conflicts_print): Use Yacc-style conflict report, except print
4126 the input file name when not emulating Yacc.
4127 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
4128 Conflicted Reduction, %expect not enough, %expect too much,
4129 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
4130 * tests/existing.at (GNU Cim Grammar): Likewise.
4131 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
4132
4133 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
4134 fatal): Don't invoke fflush; it's not needed and it might even be
4135 harmful for stdout, as stdout might not be open.
4136 * src/reduce.c (reduce_print): Likewise.
4137
b1efe548
PE
41382002-12-27 Paul Eggert <eggert@twinsun.com>
4139
4140 Fix a bug where error locations were not being recorded correctly.
4141 This problem was originally reported by Paul Hilfinger in
161a71f3 4142 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
b1efe548
PE
4143
4144 * data/yacc.c (yyparse): New local var yylerrsp, to record the
4145 top of the location stack's error locations.
4146 (yyerrlab): Set it. When discarding a token, push its location
4147 onto yylerrsp so that we don't lose track of the error's end.
4148 (yyerrlab1): Now is only the target of YYERROR, so that we can
4149 properly record the location of the action that failed. For GCC
4150 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
4151 GCC warning about yyerrlab1 being unused if YYERROR is unused.
4152 (yyerrlab2): New label, which yyerrlab now falls through to.
4153 Compute the error's location by applying YYLLOC_DEFAULT to
4154 the locations of all the symbols that went into the error.
4155 * doc/bison.texinfo (Location Default Action): Mention that
4156 YYLLOC_DEFAULT is also invoked for syntax errors.
4157 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
4158 Error locations include the locations of all the tokens that were
4159 discarded, not just the last token.
d600ee67 4160
983c5c2c
PE
41612002-12-26 Paul Eggert <eggert@twinsun.com>
4162
b1efe548
PE
4163 * src/files.c: Include quote.h.
4164 (compute_output_file_names): Warn if we detect conflicting
4165 outputs to the same file. This should catch the misunderstanding
4166 exemplified by Debian Bug 165349, reported by Bruce Stephens..
4167
4168 * src/conflicts.c (conflicts_print): If the user specifies
4169 "%expect N", report an error if there are any reduce/reduce
4170 conflicts. This is what the manual says should happen.
4171 This fixes Debian bug 130890, reported by Anthony DeRobertis.
4172 * tests/conflicts.at (%expect with reduce conflicts): New test.
4173
983c5c2c
PE
4174 Don't use m4_include on relative file names, as it doesn't work as
4175 desired if there happens to be a file with that name under ".".
d600ee67 4176
983c5c2c
PE
4177 * m4sugar/version.m4: Remove; it was included but it wasn't used.
4178 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
4179 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
4180 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
4181 * src/output.c (output_skeleton): Use full path names when
4182 specifying a file to include; don't rely on include path, as
4183 it's unreliable when the working file contains a file with
4184 that name.
d600ee67 4185
983c5c2c
PE
41862002-12-25 Paul Eggert <eggert@twinsun.com>
4187
4188 Remove obsolete references to bison.simple and bison.hairy.
4189 Problem mentioned by Aubin Mahe in
161a71f3 4190 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
983c5c2c
PE
4191 * data/glr.c: Comment fix.
4192 * doc/bison.1: Remove references. Also, mention "yacc".
4193
4194 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
4195 with -g option.
4196
4197 * src/parse-gram.y (declaration): Use enum "report_states" rather
4198 than its numeric value 1.
4199
4200 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
4201 opening a new one. This fixes Debian bug 165349, reported by
4202 Bruce Stephens.
4203
23f2d9dc
PE
42042002-12-24 Paul Eggert <eggert@twinsun.com>
4205
4206 Version 1.75e.
4207
4208 * Makefile.maint (cvs-update): Don't assume that the shell
4209 supports $(...), as Solaris sh doesn't.
4210
4211 * src/parse-gram.y (lloc_default): Remove test for empty
4212 nonterminals at the end, since it didn't change the result.
4213
42142002-12-24 Paul Eggert <eggert@twinsun.com>
33167b8b
PE
4215
4216 If the user does not define YYSTYPE as a macro, Bison now declares it
4217 using typedef instead of defining it as a macro. POSIX requires this.
4218 For consistency, YYLTYPE is also declared instead of defined.
4219
4220 %union directives can now have a tag before the `{', e.g., the
4221 directive `%union foo {...}' now generates the C code
4222 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
4223 The default union tag is `YYSTYPE', for compatibility with Solaris 9
4224 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
4225 instead of `yyltype'.
4226
4227 `yystype' and `yyltype' are now obsolescent macros instead of being
4228 typedefs or tags; they are no longer documented and will be
4229 withdrawn in a future release.
4230
4231 * data/glr.c (b4_location_type): Remove.
4232 (YYSTYPE): Renamed from yystype.
4233 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
4234 (struct YYLTYPE): Renamed from struct yyltype.
4235 (YYLTYPE): Renamed from yyltype.
4236 (yyltype, yystype): New (and obsolescent) macros,
4237 for backward compatibility.
4238 * data/yacc.c: Likewise.
4239
4240 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
4241 does not specify a union tag. This is for compatibility with
4242 Solaris 9 yacc.
4243
4244 * src/parse-gram.y (add_param): 2nd arg is now char * not char
4245 const *, since it is now modified by stripping surrounding { }.
4246 (current_braced_code): Remove.
4247 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
4248 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
4249 trailing " {...}". Now of type <chars>.
4250 (grammar_declaration): Adjust to bundled tokens.
4251 (code_content): Remove; stripping is now done by add_param.
4252 (print_token_value): Print contents of bundled tokens.
4253 (token_name): New function.
4254
4255 * src/reader.h (braced_code, current_braced_code): Remove.
4256 (token_name): New decl.
4257
4258 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
4259 token_type, not braced_code code_kind. All uses changed.
4260 (SC_PRE_CODE): New state, for scanning after a keyword that
4261 has (or usually has) an immediately-following braced code.
4262 (token_type): New local var, to keep track of which token type
4263 to return when scanning braced code.
4264 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
dc546b0f 4265 <INITIAL>"%parse-param", <INITIAL>"%printer",
33167b8b
PE
4266 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
4267 instead of returning a token type immediately.
4268 (<INITIAL>"{"): Set token type.
4269 (<SC_BRACED_CODE>"}"): Use it.
4270 (handle_action_dollar, handle_action_at): Now returns bool
4271 indicating success. Fail if ! current_rule; this prevents a core dump.
4272 (handle_symbol_code_dollar, handle_symbol_code_at):
4273 Remove; merge body into caller.
4274 (handle_dollar, handle_at): Complain in invalid contexts.
4275
4276 * NEWS, doc/bison.texinfo: Document the above.
4277 * NEWS: Fix years and program names in copyright notice.
4278
879ca4f8
PE
42792002-12-17 Paul Eggert <eggert@twinsun.com>
4280
4281 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
4282 Reporting, Table of Symbols): Omit mentions of %lex-param and
4283 %parse-param from the documentation for now.
4284
1c5fe69d
PE
42852002-12-15 Paul Eggert <eggert@twinsun.com>
4286
4287 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
4288 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
4289 lookahead symbol, and which sets yychar in parser actions) and it
7ea9026a
PE
4290 disagreed with the Bison documentation. Bug
4291 reported by Andrew Walrond.
d600ee67 4292
1c5fe69d
PE
4293 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
4294 as the caller now does that.
4295 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
4296 (YYEMPTY): Parenthesize right hand side, since others use it.
4297 (yyparse): Don't assume that our generated code is the only code
4298 that sets yychar.
4299
d1de5372
PE
43002002-12-13 Paul Eggert <eggert@twinsun.com>
4301
4302 Version 1.75d.
4303
4304 POSIX requires a "yacc" command.
4305 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
4306 (MOSTLYCLEANFILES): Add yacc.
4307 (yacc): New rule.
1c5fe69d 4308 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
d1de5372
PE
4309 as an alias for bison y.
4310
4311 * po/LINGUAS: Add da.
d600ee67 4312
d1de5372
PE
4313 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
4314 problem with latest <getopt.h>.
4315 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
4316
4317 * doc/fdl.texi: Upgrade to 1.2.
4318 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
4319 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
4320 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
4321 gnulib.
4322 * config/install-sh: Sync with autotools.
4323
4324 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
161a71f3 4325 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
d1de5372
PE
4326 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
4327 locations are requested.
4328 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
4329 locations are requested.
4330
d0f3fe23
PE
43312002-12-12 Paul Eggert <eggert@twinsun.com>
4332
4333 Remove unportable casts and storage allocation tricks.
4334 While we're at it, remove almost all casts, since they
4335 usually aren't needed and are a sign of trouble.
4336
4337 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
4338
4339 * src/derives.c (derives_compute): Do not subtract NTOKENS from
4340 the pointer DSET returned by malloc; this isn't portable.
4341 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
4342 Similarly for DERIVES.
4343 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
4344 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
4345 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
4346
4347 * src/derives.c (derives_compute): Do not bother invoking
4348 int_of_rule_number, since rule numbers are integers.
4349
4350 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
4351 rather than XMALLOC (char, N).
4352
4353 * src/files.c (filename_split): Rewrite to avoid cast.
4354
4355 * src/gram.h (symbol_number_as_item_number,
4356 item_number_as_symbol_number, rule_number_as_item_number,
4357 item_number_as_rule_number):
4358 Now inline functions rather than macros, to avoid casts.
4359 * src/state.h (state_number_as_int): Likewise.
4360 * src/tables.c (state_number_to_vector_number,
4361 symbol_number_to_vector_number): Likewise.
4362
4363 * src/gram.h (int_of_rule_number): Remove; no longer used.
4364
4365 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
4366 since the resulting storage is always stored into.
4367
4368 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
4369 where it's needed.
4370
4371 * src/muscle_tab.c (muscle_m4_output):
4372 Now inline. Return bool, not int.
4373 * src/state.c (state_compare): Likewise.
4374 * src/symtab.c (symbol_check_defined,
4375 symbol_check_alias_consistency, symbol_pack, symbol_translation,
4376 hash_compare_symbol, hash_symbol):
4377 Likewise.
4378 * src/uniqstr.c (uniqstr_print): Likewise.
4379 * src/muscle_tab.c (muscle_m4_output_processor):
4380 New function, to avoid casts.
4381 * src/state.c (state_comparator, stage_hasher): Likewise.
4382 * src/symtab.c (symbol_check_defined_processor,
4383 symbol_check_alias_consistency_processor, symbol_pack_processor,
4384 symbol_translation_processor, hash_symbol_comparator,
4385 hash_symbol_hasher): Likewise.
4386 * src/uniqstr.c (uniqstr_print_processor): Likewise.
4387 * src/muscle_tab.c (muscles_m4_output):
4388 Use new functions instead of casting old functions unportably.
4389 * src/state.c (state_hash_new): Likewise.
4390 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
4391 symbols_token_translations_init):
4392 Likewise.
4393 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
4394
4395 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
4396 var instead of casting to long, to avoid casts.
4397 (prepare_states): Use MALLOC rather than alloca, so that we don't
4398 have to worry about alloca.
4399 * src/state.c (state_hash_lookup): Likewise.
4400
4401 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
4402 local var instead of casting to unsigned char, to avoid casts.
4403
4404 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
4405 STATE_ALLOC): Remove.
4406 (transitions_new, errs_new, reductions_new, state_new): Use malloc
4407 rather than calloc, and use offsetof to avoid allocating slightly
4408 too much storage.
4409 (state_new): Initialize all members.
4410
4411 * src/state.c (state_hash): Use unsigned accumulator, not signed.
4412
4413 * src/symtab.c (symbol_free): Remove; unused.
4414 (symbol_get): Remove cast in lhs of assignment.
4415 (symbols_do): Now static. Accept generic arguments, not
4416 hashing-related ones.
4417
4418 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
4419 (symbol_processor): Remove.
4420 (symbols_do): Remove decl; now static.
4421
4422 * src/system.h (alloca): Remove; decl no longer needed.
4423 (<stddef.h>): Include, for offsetof.
4424 (<inttypes.>, <stdint.h>): Include if available.
4425 (uintptr_t): New type, if system lacks it.
4426 (CALLOC, MALLOC, REALLOC): New macros.
4427 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
4428 new macros.
4429
4430 * src/tables.c (table_size): Now int, to pacify GCC.
4431 (table_grow, table_ninf_remap): Use signed table size.
4432 (save_row): Don't bother initializing locals when not needed.
4433 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
4434 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
4435
4436 * src/vcg.h: Correct misspellings.
4437
4438 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
4439
4440
4441 * src/getargs.c (getargs): Don't assume EOF == -1.
4442
26b4a969
PE
44432002-12-09 Paul Eggert <eggert@twinsun.com>
4444
4445 Change identifier spellings to avoid collisions with names
4446 that are reserved by POSIX.
4447
4448 Don't use names ending in _t, since POSIX reserves them.
4449 For consistency, remove _e and _s endings -- they're weren't
4450 needed to remove ambiguity. All uses changed.
4451 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
4452 turn was just renamed from struniq_t.
4453 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
4454 which in turn was just renamed from struniq_processor_t.
4455 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
4456 in turn was renamed from hash_compare_struniq_t.
4457 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
4458 (state_list): Renamed from state_list_t.
4459 * src/assoc.h (assoc): Renamed from assoc_t.
4460 * src/conflicts.c (enum conflict_resolution): Renamed from
4461 enum conflict_resolution_e.
4462 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
4463 (rule_list): Renamed from rule_list_t.
4464 * src/getargs.h (enum trace): Renamed from enum trace_e.
4465 (enum report): Renamed from enum report_e.
4466 * src/gram.h (item_number): Renamed from item_number_t.
4467 (rule_number): Renamed from rule_number_t.
4468 (struct rule_s): Remove the "rule_s" part; not used.
4469 (rule): Renamed from rule_t.
4470 (rule_filter): Renamed from rule_filter_t.
4471 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
4472 (goto_list): Renamed from goto_list_t.
4473 * src/lalr.h (goto_number): Renamed from goto_number_t.
4474 * src/location.h (location): Renamed from location_t.
4475 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
4476 and moved here from:
4477 * src/muscle_tab.h (muscle_entry_t): here.
4478 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
4479 (rule_list): Renamed from rule_list_t.
4480 * src/print_graph.c (static_graph): Renamed from graph.
4481 * src/reader.h (braced_code): Renamed from braced_code_t.
4482 Remove brace_code_e tag.
4483 * src/relation.h (relation_node): Renamed from relation_node_t.
4484 (relation_nodes): Renamed from relation_nodes_t.
4485 (relation): Renamed from relation_t.
4486 * src/state.h (state_number): Renamed from state_number_t.
4487 (struct state): Renamed from struct state_s.
4488 (state): Renamed from state_t.
4489 (transitions): Renamed from transitions_t. Unused (and
4490 misspelled) transtion_s tag removed.
4491 (errs): Renamed from errs_t. Unused errs_s tag removed.
4492 (reductions): Renamed from reductions_t. Unused tag
4493 reductions_s removed.
4494 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
4495 (struct symbol_list): Renamed from struct symbol_list_s.
4496 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
4497 (struct symbol): Renamed from struct symbol_s.
4498 (symbol): Renamed from symbol_t.
4499 * src/tables.c (vector_number): Renamed from vector_number_t.
4500 (action_number): Renamed from action_t.
4501 * src/tables.h (base_number): Renamed from base_t.
4502 * src/vcg.h (enum color): Renamed from enum color_e.
4503 (enum textmode): Renamed from enum textmode_e.
4504 (enum shape): Renamed from enum shape_e.
4505 (struct colorentry): Renamed from struct colorentry_s.
4506 (struct classname): Renamed from struct classname_s.
4507 (struct infoname): Renamed from struct infoname_s.
4508 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
4509 (enum decision): Renamed from enum decision_e.
4510 (enum orientation): Renamed from enum orientation_e.
4511 (enum alignment): Renamed from enum alignment_e.
4512 (enum arrow_mode): Renamed from enum arrow_mode_e.
4513 (enum crossing_type): Renamed from enum crossing_type_e.
4514 (enum view): Renamed from enum view_e.
4515 (struct node): Renamed from struct node_s.
4516 (node): Renamed from node_t.
4517 (enum linestyle): Renamed from enum linestyle_e.
4518 (enum arrowstyle): Renamed from enum arrowstyle_e.
4519 (struct edge): Renamed from struct edge.
4520 (edge): Renamed from edge_t.
4521 (struct graph): Renamed from struct graph_s.
4522 (graph): Renamed from graph_t.
4523 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
4524 Rename value_t -> value.
4525 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
4526 value_t_as_yystype -> value_as_yystype.
4527
4528 Don't include <errno.h> in the mainstream code, since it
4529 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
4530 * lib/get-errno.c, lib/get-errno.h: New files.
4531 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
4532 get-errno.c.
4533 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
4534 * src/output.c (output_skeleton): Likewise.
4535 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
4536 instead of errno.
4537 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
4538 Likewise.
4539 (handle_action_dollar, handle_action_at): Likewise.
4540 * src/system.h: Do not include <errno.h>.
4541 (TAB_EXT): Renamed from EXT_TAB.
4542 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
4543
4544 Avoid str[a-z]*, since <string.h> reserves that name space.
4545 Change all instances of "struniq" in names to "uniqstr", and
4546 likewise for "STRUNIQ" and "UNIQSTR".
4547 * src/uniqstr.c: Renamed from src/struniq.c.
4548 * src/uniqstr.h: Renamed from src/struniq.h.
4549 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
4550 * src/files.c (strsuffix): Remove; unused.
4551 (concat2): Renamed from stringappend. Now static.
4552 * src/files.h (strsuffix, stringappend): Remove; unused.
4553 * src/parse-gram.y (<chars>): Renamed from <string>.
4554 (<uniqstr>): Renamed from <struniq>.
4555 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
4556 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
4557 (struct graph_s.expand): Renamed from struct graph_s.stretch.
4558 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
4559 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
4560 (N_EXPAND): Renamed from N_STRETCH.
4561
4562 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
4563 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
4564 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
4565 Remove; unused.
4566 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
4567 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
4568 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
4569 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
4570 (BASE_MAXIMUM): Renamed from BASE_MAX.
4571 (BASE_MINIMUM): Renamed from BASE_MIN.
4572 (ACTION_MAX): Remove; unused.
4573 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
4574 Unnecessary casts removed from above defines.
4575
4576
4577 Fix misspelling in names.
4578 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
4579 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
4580 G_NODE_ALIGNEMENT.
4581
4582
4583 * lib/timevar.c (timevar_report): Renamed from time_report,
4584 for consistency with other names.
4585 * lib/timevar.h (timevar_report): New decl.
4586 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
4587
4588
4589 Sort include-file uses.
4590
4591 Reorder all include files under src to be in the order "system.h".
4592 then the ../lib include files in angle brackets (alphabetized),
4593 then the . include files in double-quotes (alphabetized). Fix
4594 dependency breakages encountered in this process, as follows:
4595 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
4596 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
4597 * src/state.h: Include "symtab.h".
4598
996b1c7e
PE
45992002-12-08 Paul Eggert <eggert@twinsun.com>
4600
4601 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
4602 since this causes problems when __file__ contains character
4603 sequences like "@" that are treated specially by src/scan-skel.l.
4604 Instead, just use the file's basename. This fixes the bug
4605 reported by Martin Mokrejs in
161a71f3 4606 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
996b1c7e 4607
e19c4e5d
PE
46082002-12-06 Paul Eggert <eggert@twinsun.com>
4609
4610 Add support for rules that do not have trailing semicolons, as
4611 POSIX requires. Improve the quality of locations in Bison
4612 diagnostics.
26b4a969 4613
e19c4e5d
PE
4614 * src/location.c: Include <quotearg.h>.
4615 (empty_location): Now const.
4616 (location_print): New function. Follow the recommendation of the
4617 GNU Coding Standards for locations that span file boundaries.
4618 * src/location.h: Do not include <quotearg.h>; no longer needed.
4619 (boundary): New type.
4620 (location_t): Use it. This allows locations to span file boundaries.
4621 All member uses changed: file -> start.file or end.file (as needed),
4622 first_line -> start.line, first_column -> start.column,
4623 last_line -> end.line, last_column -> end.column.
4624 (equal_boundaries): New function.
4625 (LOCATION_RESET, LOCATION_STEP): Remove.
4626 (LOCATION_PRINT): Remove. All callers changed to use location_print.
4627 (empty_location): Now const.
4628 (location_print): New decl.
4629 * src/parse-gram.y (lloc_default): New function, which handles
4630 empty locations more accurately.
4631 (YYLLOC_DEFAULT): Use it.
4632 (%token COLON): Remove.
4633 (%token ID_COLON): New token.
26b4a969 4634 (rules): Use it.
e19c4e5d
PE
4635 (declarations, rules): Remove trailing semicolon.
4636 (declaration, rules_or_grammar_declaration):
4637 Allow empty (";") declaration.
4638 (symbol_def): Remove empty actions; no longer needed.
4639 (rules_or_grammar_declaration): Remove trailing semicolon.
4640 (semi_colon.opt): Remove.
4641 * src/reader.h: Include location.h.
4642 (scanner_cursor): New decl.
4643 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
4644 rolling our own.
4645 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
4646 of *loc.
4647 (STEP): Remove. No longer needed, now that adjust_location does
4648 the work. All uses removed.
4649 (scanner_cursor): New var.
4650 (adjust_location): Renamed from extend_location. It now sets
4651 *loc and adjusts the scanner cursor. All uses changed.
4652 Don't bother testing for CR.
4653 (handle_syncline): Remove location arg; now updates scanner cursor.
4654 All callers changed.
4655 (unexpected_end_of_file): Now accepts start boundary of token or
4656 comment, not location. All callers changed. Update scanner cursor,
4657 not the location.
4658 (SC_AFTER_IDENTIFIER): New state.
4659 (context_state): Renamed from c_context. All uses changed.
4660 (id_loc, code_start, token_start): New local vars.
4661 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
4662 processing of Yacc white space and equivalents here.
4663 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
4664 instead of returning ID immediately, since we need to search for
4665 a subsequent colon.
4666 (<INITIAL>"'", "\""): Save token_start.
4667 (<INITIAL>"%{", "{", "%%"): Save code_start.
4668 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
4669 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
4670 BEGIN context_state at end, not INITIAL.
4671 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
4672 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
4673 Return correct token start.
4674 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
4675 the start of a character, string or multiline comment is found.
4676 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
4677 Reduction): Adjust reported locations to match the more-precise
4678 results now expected.
4679 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
4680 * tests/reduce.at (Useless Rules, Reduced Automaton,
4681 Underivable Rules): Likewise.
4682 * tests/regression.at (Invalid inputs): No longer `expecting ";"
4683 or "|"' now that so many other tokens are allowed by the new grammar.
4684
4685 * src/complain.h (current_file): Remove duplicate decl;
4686 current_file is now owned by files.h.
4687 * src/complain.c, src/scan-gram.l: Include files.h.
4688
46892002-12-06 Paul Eggert <eggert@twinsun.com>
26b4a969 4690
e19c4e5d
PE
4691 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
4692 promotes to int; it might be unsigned int.
4693 * data/yacc.c (yy_reduce_print): Likewise.
4694
4695 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
4696 be #defined in the prologue, not in the Bison declarations.
4697 This fixes Debian Bug 102878, reported by Shaul Karl.
26b4a969 4698
b64755e3
PE
46992002-12-02 Paul Eggert <eggert@twinsun.com>
4700
4701 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
4702 * lib/strtoul.c: New file, from gnulib.
4703 This fixes a porting bug reported by Peter Klein in
161a71f3 4704 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
b64755e3 4705
6e746484
PE
47062002-11-30 Paul Eggert <eggert@twinsun.com>
4707
b64755e3
PE
4708 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
4709 and put only a forward declaration in the prologue. This is for
4710 consistency with the other scanner helper functions.
4711
6ba55592
PE
4712 Type clashes now generate warnings, not errors, since it
4713 appears that POSIX may allow some grammars with type clashes.
4714 * src/reader.c (grammar_current_rule_check): Warn about
4715 type clashes instead of complaining.
4716 * tests/input.at (Type Clashes): Expect warnings, not complaints.
4717
6e746484
PE
4718 Add Yacc library, since POSIX requires it.
4719 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
4720 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
4721 * lib/main.c, lib/yyerror.c: New files.
4722
4723 gram_error can be static; it need not be extern.
4724 * src/reader.h (gram_error): Remove decl.
4725 * src/parse-gram.y (gram_error): Now static. Add static decl.
4726 (print_token_value): Omit parameter names from forward decl,
4727 for consistency.
4728
88510f9c
PE
47292002-11-29 Paul Eggert <eggert@twinsun.com>
4730
6e746484
PE
4731 * doc/bison.texinfo: Emphasize that yylex and yyerror must
4732 be declared before being used. E.g., one should typically
4733 declare them in the prologue. Use GNU coding style in examples.
4734 Put "const" consistently after the type it modifies. Mention
4735 that C99 supports "inline". Mention that yyerror traditionally
4736 returns "int".
4737
88510f9c
PE
4738 %parse-param and %lex-param now take just one argument, the
4739 declaration; the argument name is deduced from the declaration.
4740
4741 * doc/bison.texinfo (Parser Function, Pure Calling, Error
4742 Reporting, Table of Symbols): Document this.
4743 * src/parse-gram.y (add_param): New function.
4744 (COMMA): Remove.
4745 (declaration): Implement new rule for %parse-param and %lex-param.
4746 * src/scan-gram.l: "," now elicits a warning, rather than being
4747 a token; this is more compatible with byacc.
4748 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
4749
bb92250c
PE
47502002-11-27 Paul Eggert <eggert@twinsun.com>
4751
4752 Rename identifiers to avoid real and potential collisions.
4753
4754 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
4755 to avoid collision with lex macro described by Bruce Lilly in
161a71f3 4756 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
bb92250c
PE
4757 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
4758 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
4759 * src/parse-gram.y (print_token_value): Renamed from yyprint.
4760 All uses changed.
4761 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
4762 The name "yycontrol" violates the name space rules, and this stuff
4763 wasn't being used anyway.
4764 (input): Remove action; this stuff wasn't being used.
4765 (gram_error): Rename local variable yylloc -> loc.
4766 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
4767 (YY_DECL): Don't use "yy" at start of local variables.
4768 All uses changed, e.g., yylloc -> loc.
4769 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
4770 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
4771 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
4772 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
4773
4774 * src/parse-gram.y (gram_error): loc is now const *.
4775 * src/reader.h (gram_error): Likewise.
4776
3af4feb2
PE
47772002-11-24 Paul Eggert <eggert@twinsun.com>
4778
4779 Version 1.75c.
4780
4781 * tests/actions.at (Actions after errors): Use an output format
4782 more similar to that of the Printers and Destructors test.
4783 Test the position of the ';' token too.
4784 (Printers and Destructors): Likewise.
4785 (Printers and Destructors: %glr-parser): Remove for now, to avoid
4786 unnecessarily alarming people when the test fails.
4787
4788 * data/yacc.c (yyerrlab1): Move this label down, so that the
4789 parser does not discard the lookahead token if the user code
4790 invokes YYERROR. This change is required for POSIX conformance.
4791
4792 * lib/error.c: Sync with gnulib.
4793
47942002-11-22 Paul Eggert <eggert@twinsun.com>
4795
4796 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
4797 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
4798 * lib/xmalloc.c: Likewise.
26b4a969 4799
58004308
PE
48002002-11-20 Paul Eggert <eggert@twinsun.com>
4801
4802 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
4803
48042002-11-20 Paul Eggert <eggert@twinsun.com>
26b4a969 4805
58004308
PE
4806 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
4807 should use `if (! x) abort ();' rather than `assert (x);', and
4808 anyway it's one less thing to worry about configuring.
4809
4810 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
4811 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
4812 and replace all instances of assert with abort.
4813 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
4814 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
4815
4816 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
4817 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
4818 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
4819 hash_find_entry, hash_rehash, hash_insert): Likewise.
4820 * src/conflicts.c (resolve_sr_conflict): Likewise.
4821 * src/lalr.c (set_goto_map, map_goto): Likewise.
4822 * src/nullable.c (nullable_compute): Likewise.
4823 * src/output.c (prepare_rules, token_definitions_output): Likewise.
4824 * src/reader.c (packgram, reader): Likewise.
4825 * src/state.c (state_new, state_free, state_transitions_set,
4826 state_reduction_find): Likewise.
4827 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
4828 symbol_pack): Likewise.
4829 * src/tables.c (conflict_row, pack_vector): Likewise.
4830 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
4831 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
4832 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
4833 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
4834
4835 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
4836 (ARGMATCH_CONSTRAINT): New macro.
4837 (ARGMATCH_ASSERT): Use it.
4838
4839 * src/system.h (verify): New macro.
4840 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
4841 rather than assert.
4842 * src/tables.c (tables_generate): Likewise.
4843
4844 * src/struniq.c (struniq_assert): Now returns void, and aborts
4845 if the assertion is false.
4846 (struniq_assert_p): Remove.
4847 * src/struniq.h: Likewise.
4848
76ae8198
PE
48492002-11-18 Paul Eggert <eggert@twinsun.com>
4850
4851 * data/glr.c (yygetLRActions): Replace `yyindex' with
4852 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
4853 This fixes the regression with Sun ONE Studio 7 cc that I reported in
161a71f3 4854 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
76ae8198 4855
d3c4e709
AD
48562002-11-18 Akim Demaille <akim@epita.fr>
4857
4858 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
4859 space.
4860 From Tim Van Holder.
4861
8d8a7238
PE
48622002-11-17 Paul Eggert <eggert@twinsun.com>
4863
4864 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
4865 to "SyntaxError" for consistency with my 2002-11-15 change.
4866
4867 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
4868 not define to {}, since this breaks the common use of `YYDPRINTF
4869 ((...));' if a single statement is desired (e.g. before `else').
4870 Work around GCC warnings by surrounding corresponding calls with
4871 {} if needed.
4872 (yyhasResolvedValue): Remove unused function.
4873 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
4874 loop body.
4875 (yyreportSyntaxError): Renamed from yyreportParseError.
4876 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
4877 All uses changed.
4878 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
4879 extern when possible. Remove unused initializations.
4880
b0937b22
AD
48812002-11-16 Akim Demaille <akim@epita.fr>
4882
4883 Augment the similarity between GLR and LALR traces.
4884
4885 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
4886 (YY_REDUCE_PRINT): New.
4887 (yyparse): Use them.
4888 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
4889 YYDPRINT here.
4890 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
4891 state reached after the reduction/recovery, since...
4892 (yyparse, yyprocessOneStack): Report the state we are entering in.
4893
c5e3e510
AD
48942002-11-16 Akim Demaille <akim@epita.fr>
4895
4896 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
4897 Add support for --trace=skeleton.
4898 * src/scan-skel.l: %option debug.
4899 Scan strings of non-@ or \n instead of character by character.
4900 (scan_skel): Handle trace_skeleton.
4901 (QPUTS): New.
4902 (@output_parser_name@, @output_header_name@): ``Restore'' their
4903 support (used to be M4 macros).
4904 * data/yacc.c: Quote larger chunks, a la glr.c.
4905 * data/lalr1.cc: Likewise.
4906 The header guards are no longer available, so use some other
4907 string than `YYLSP_NEEDED'.
4908
4c6cc1db
AD
49092002-11-16 Akim Demaille <akim@epita.fr>
4910
4911 Make the ``Printers and Destructors'' test more verbose, taking
4912 `yacc.c''s behavior as (possibly wrong) reference.
4913
4914 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
4915 instead of fprint on stdout.
4916 Set and report the last_line of the symbols.
4917 Consistently display values and locations.
4918
6d9e8019
PE
49192002-11-16 Paul Eggert <eggert@twinsun.com>
4920
4921 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
4922
6e649e65
PE
49232002-11-15 Paul Eggert <eggert@twinsun.com>
4924
b25d88f6
PE
4925 * tests/actions.at (Actions after errors): New test case.
4926
6e649e65
PE
4927 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
4928 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
4929 tests/action.at, tests/calc.at, tests/conflicts.at,
4930 tests/cxx-type.at, tests/regression.at:
4931 "parse error" -> "syntax error" for POSIX compatibility.
4932 "parsing stack overflow..." -> "parser stack overflow" so
4933 that code matches Bison documentation.
4934
0f39aab9
AD
49352002-11-15 Akim Demaille <akim@epita.fr>
4936
4937 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
4938 take two BRACED_CODE, not two string_content.
4939 Free the scanner's obstack when we are done.
4940 (code_content): New.
4941 * tests/calc.at: Adjust.
4942 * doc/bison.texinfo: Adjust.
4943 Also, make sure to include the `,' for these declarations.
4944
761c1926
AD
49452002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
4946
4947 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
4948 definition; avoids potential autoreconf problems.
4949
b0f98b10
AD
49502002-11-15 Akim Demaille <akim@epita.fr>
4951
4952 Always check the value returned by yyparse.
4953
4954 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
4955 returned by yyparse.
4956 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
4957 Adjust calls.
4958 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
4959 returned by yyparse.
4960
970785f1
PH
49612002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4962
4963 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
4964 on input.at test.
4965
8fcc7db1
PE
49662002-11-14 Paul Eggert <eggert@twinsun.com>
4967
7ec1b48e
PE
4968 * src/output.c (output_skeleton): Call xfopen instead of
4969 duplicating xfopen's body.
4970
cfff7583 4971 Fix bugs reported by Nelson H. F. Beebe in
161a71f3 4972 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
cfff7583 4973
8fcc7db1
PE
4974 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
4975 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
4976 Group compiler. Instead, use "$CC -E bar.c". Include the .h
4977 file twice in the grammar, as an extra check.
4978
4979 * tests/input.at (Torturing the Scanner): Surround the
4980 backslash-newline tests with "#if 0", to make it less likely that
4981 we'll run into compiler bugs. Bring back solitary \ inside
4982 comment, but add a closing comment to work around HP C bug. Don't
e3aa65c5 4983 test backslash-newline in C character constant.
8fcc7db1 4984
4e8d992c
AD
49852002-11-14 Akim Demaille <akim@epita.fr>
4986
4987 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
4988 status of the compiler.
f32b346d 4989 Calling `exit 1' is no longer needed.
4e8d992c
AD
4990 Reported by Nelson H. F. Beebe.
4991
9501dc6e
AD
49922002-11-14 Akim Demaille <akim@epita.fr>
4993
4994 * tests/atlocal.in (CPPFLAGS): We have config.h.
4995 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
4996 New.
4997 * tests/actions.at, tests/calc.at, tests/conflicts.at,
4998 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
4999 * tests/regression.at, tests/torture.at: Use them for all the
5000 grammars that are to be compiled.
5001 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
5002 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
5003 * doc/bison.texinfo (GLR Parsers): Document `inline'.
5004
18b519c0
AD
50052002-11-14 Akim Demaille <akim@epita.fr>
5006
5007 * doc/bison.texinfo: Various formatting changes (alignments in
5008 samples, additional @group/@end group, GCS in samples.
5009 Use @deffn instead of simple @table to define the directives,
5010 macros, variables etc.
5011
9a86cdb9
PE
50122002-11-13 Paul Eggert <eggert@twinsun.com>
5013
daa33def 5014 Fix some bugs reported by Albert Chin-A-Young in
161a71f3 5015 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
18b519c0 5016
daa33def 5017 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
8fcc7db1 5018 -o c"; the HP C compiler chatters during compilation.
daa33def
PE
5019 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
5020 * tests/headers.at (export YYLTYPE): Likewise.
5021
5022 * tests/input.at (Torturing the Scanner): Remove lines containing
8fcc7db1 5023 solitary backslashes, as they tickle a bug in the HP C compiler.
daa33def 5024
9a86cdb9
PE
5025 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
5026 comments, since they're not portable. Use GNU coding style.
5027
9c1e26bd
AD
50282002-11-13 Akim Demaille <akim@epita.fr>
5029
5030 * data/yacc.c: Leave bigger chunks of quoted text.
5031 (YYDSYMPRINTF): New.
5032 Use it to report symbol activities.
5033 * data/glr.c (YYDSYMPRINTF): New.
5034 Use it.
5035
87f721cc
PE
50362002-11-12 Paul Eggert <eggert@twinsun.com>
5037
5038 Version 1.75b.
5039
5040 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
5041 (yyglrReduce): Return yyok, not 0.
5042 This should avoid the enumerated-type warnings reported
464c6927 5043 by Nelson H. F. Beebe in
161a71f3 5044 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
87f721cc
PE
5045
5046 * lib/bbitset.h (BITSET_INLINE): Remove.
5047 * lib/bitset.h [! BITSET_INLINE]: Remove.
5048 (bitset_set, bitset_reset, bitset_test): Rename local vars
5049 to avoid shadowing warnings by GCC.
5050
5051 * data/glr.c (inline): Remove #define. It's the user's
5052 responsibility to #define it away, just like 'const'.
464c6927 5053 This fixes one of the bugs reported by Nelson H. F. Beebe in
161a71f3 5054 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
18b519c0 5055
87f721cc
PE
5056 * Makefile.maint (po-check): Scan .l and .y files instead of the
5057 .c and the .h files that they generate. This fixes the bug
5058 reported by Tim Van Holder in:
161a71f3 5059 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
87f721cc
PE
5060 Look for N_ as well as for _. Try to avoid matching #define for
5061 N_ and _.
5062 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
5063 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
5064 * src/scan-gram.l: Revamp regular expressions so that " and '
5065 do not confuse xgettext.
5066
5067 * src/struniq.h (struniq_new): Do not declare the return type
5068 to be 'const'; this violates the C standard.
5069 * src/struniq.c (struniq_new): Likewise.
5070
be14ade5
AD
50712002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
5072
5073 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
5074 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
5075 linker.
5076
05291fbc
AD
50772002-11-12 Akim Demaille <akim@epita.fr>
5078
5079 * Makefile.maint: Sync with Autoconf:
5080 (local_updates): New.
5081
1f5fd52e
AD
50822002-11-12 Akim Demaille <akim@epita.fr>
5083
5084 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
5085
283f1e64
AD
50862002-11-12 Akim Demaille <akim@epita.fr>
5087
5088 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
5089 locations.
5090
886b69d1
AD
50912002-11-12 Akim Demaille <akim@epita.fr>
5092
5093 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
5094 not yyvalue.
5095
3df37415
AD
50962002-11-12 Akim Demaille <akim@epita.fr>
5097
5098 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
5099 Use it to test the GLR parser.
5100
7bd6c77e
AD
51012002-11-12 Akim Demaille <akim@epita.fr>
5102
5103 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
5104 defines it.
5105 * data/glr.c (yystos): New.
5106 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
5107 (YYDSYMPRINT): New.
5108 (yyval): Don't define it, it is handled via M4.
5109 (yyrecoverParseError): Free verbosely the discarded symbols.
5110 * data/yacc.c (yysymprint): Remove, rather...
5111 (b4_yysymprint_generate): invoke.
5112 * data/c.m4 (b4_yysymprint_generate): New.
5113 Accept pointers as arguments, as opposed to the version from
5114 yacc.c.
5115 (b4_yydestruct_generate): Likewise.
5116 * tests/cations.at (Printers and Destructors): Use Bison directives
5117 instead of CPP macros.
5118 Don't rely on internal details.
5119
b0400cc6
AD
51202002-11-12 Akim Demaille <akim@epita.fr>
5121
5122 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
5123 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
5124 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
5125 it against YYEMPTY and so forth), work on yytoken (i.e., set
5126 it to YYEMPTY etc.).
5127 (yydestruct): Replace with a b4_yydestruct_generate invocation.
5128 (b4_symbol_actions): Remove.
5129 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
5130 for 0, end-of-input.
5131
72f889cc
AD
51322002-11-12 Akim Demaille <akim@epita.fr>
5133
5134 * doc/bison.texinfo (Destructor Decl): New.
5135
b1ae9233
AD
51362002-11-12 Akim Demaille <akim@epita.fr>
5137
5138 * src/tables.c (tables_generate): Use free for pointers that
5139 cannot be NULL, not XFREE.
5140 (pack_vector): Use assert, not fatal, for bound violations.
5141 * src/state.c (state_new): Likewise.
5142 * src/reader.c (reader): Likewise.
5143 * src/lalr.c (set_goto_map): Likewise.
72f889cc 5144 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
b1ae9233
AD
5145 the file name.
5146
7ec2d4cd
AD
51472002-11-12 Akim Demaille <akim@epita.fr>
5148
5149 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
5150 Restore.
5151 * src/scan-gram.l (last_string): Is global to the file, not to
5152 yylex.
5153 * src/parse-gram.y (input): Don't append the epilogue here,
5154 (epilogue.opt): do it here, and free the scanner's obstack.
5155 * src/reader.c (epilogue_set): Rename as...
5156 (epilogue_augment): this.
5157 * data/c.m4 (b4_epilogue): Defaults to empty.
5158
573a6cd3
AD
51592002-11-12 Akim Demaille <akim@epita.fr>
5160
5161 * src/getargs.c (long_options): Remove duplicates.
5162 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
5163 Remove.
5164 * doc/bison.rnh: Remove.
5165 * doc/bison.texinfo (VMS Invocation): Remove.
5166
95612cfa
AD
51672002-11-12 Akim Demaille <akim@epita.fr>
5168
5169 * src/struniq.h, src/struniq.c (struniq_t): Is const.
5170 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
5171
5172 Use struniq for symbols.
5173
5174 * src/symtab.h (symbol_t): The tag member is a struniq.
5175 (symbol_type_set): Adjust.
5176 * src/symtab.c (symbol_new): Takes a struniq.
5177 (symbol_free): Don't free the tag member.
5178 (hash_compare_symbol_t, hash_symbol_t): Rename as...
5179 (hash_compare_symbol, hash_symbol): these.
5180 Use the fact that tags as struniqs.
5181 (symbol_get): Use struniq_new.
5182 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
5183 Returns a strniq.
5184 * src/reader.h (merger_list, grammar_currentmerge_set): The name
5185 and type members are struniqs.
5186 * src/reader.c (get_merge_function)
5187 (grammar_current_rule_merge_set): Adjust.
5188 (TYPE, current_type): Are struniq.
5189
5190 Use struniq for file names.
5191
5192 * src/files.h, src/files.c (infile): Split into...
5193 (grammar_file, current_file): these.
5194 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
5195 * src/reduce.c (reduce_print): Likewise.
5196 * src/getargs.c (getargs): Likewise.
5197 * src/complain.h, src/complain.c: Likewise.
5198 * src/main.c (main): Call struniqs_new early enough to use it for
5199 file names.
5200 Don't free the input file name.
5201
3e6656f9
AD
52022002-11-12 Akim Demaille <akim@epita.fr>
5203
5204 * src/symtab.c (symbol_free): Remove dead deactivated code:
5205 type_name are properly removed.
5206 Don't use XFREE to free items that cannot be NULL.
5207 * src/struniq.h, src/struniq.c: New.
5208 * src/main.c (main): Initialize/free struniqs.
5209 * src/parse-gram.y (%union): Add astruniq member.
5210 (yyprint): Adjust.
5211 * src/scan-gram.l (<{tag}>): Return a struniq.
5212 Free the obstack bit that used to store it.
5213 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
5214
7672019c
PE
52152002-11-11 Paul Eggert <eggert@twinsun.com>
5216
5217 Revamp to fix many (but not all) of the C- and M4-related quoting
5218 problems. Among other things, this fixes the Bison bug reported
5219 by Jan Hubicka when processing the Bash grammar; see:
161a71f3 5220 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
7672019c
PE
5221
5222 Use new @ escapes consistently. Represent brackets with @{ and @}
5223 rather than @<:@ and @:>@, since this works a bit better with dumb
5224 editors like vi. Represent @ with @@, since @ is now consistently
5225 an escape. Use @oline@ and @ofile@ rather than __oline__ and
5226 __ofile__, to avoid unexpected expansions. Similarly, use @output
5227 rather than #output.
5228
5229 * data/c.m4 (b4_copyright): Omit file name from comment, since
5230 the file name could contain "*/".
5231 (b4_synclines_flag): Don't quote the 2nd argument; it should already
5232 be quoted. All uses changed.
5233
5234 * data/glr.c: Use new @ escapes consistently.
5235 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
5236 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
5237 Remove, since they couldn't handle arbitrary characters in file
5238 names.
5239 * data/lalr1.cc: Likewise.
5240 * data/yacc.c: Likewise.
5241
5242 * src/files.c (output_infix): Remove; all uses removed.
5243 * src/files.h: Likewise.
5244
5245 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
5246 mishandled funny characters in file names, and anyway it isn't
5247 needed any more.
5248 * data/yacc.c: Likewise.
5249 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
5250
5251 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
5252 * data/yacc.c: Likewise.
5253
5254 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
5255 strings now.
5256 (muscle_init): Quote filename as a C string.
5257 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
5258 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
5259 * src/output.c (escaped_file_name_output): New function.
5260 (prepare_symbols): Quote tokens for M4.
5261 (prepare): Don't insert output_infix, output_prefix,
5262 output_parser_name, output_header_name; this is now down by scan-skel.
5263 Insert skeleton as a C string.
5264
5265 * src/output.c (user_actions_output, symbol_destructors_output,
5266 symbol_printers_output): Quote filenames for C and M4.
5267 * src/reader.c (prologue_augment, epilogue_set): Likewise.
5268
5269 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
5270 escapes other than \\ and \'; this simplifies the code.
5271 (<SC_STRING>): Likewise, for \\ and \".
5272 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
5273 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
5274 Use new escapes @{ and @} for [ and ].
5275
5276 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
5277 them with auto vars.
5278 Switch to new escape scheme, where @ is the escape character uniformly.
5279 Abort if a stray escape character is found. Avoid unbounded input
5280 buffer when parsing non-escaped text.
5281
5282 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
5283 __oline__, #output, $@, and @{ do not have unintended meanings.
5284
acea4f3b
PE
52852002-11-09 Paul Eggert <eggert@twinsun.com>
5286
5287 Fix the test failure due to GCC warnings described in
161a71f3 5288 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
acea4f3b
PE
5289 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
5290 evaluate to 0 if it's impossible for NINF to be in the respective
5291 table.
5292 (yygetLRActions, yyrecoverParseError): Use them.
5293
5294 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
5295 counted in the token inserted at end of file. Now takes
5296 location_t *, not location_t, so that the location can be
5297 adjusted. All uses changed.
5298
5299 * tests/regression.at (Invalid inputs): Adjust wording in
5300 diagnostic to match the new behavior.
5301
5302 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
5303 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
5304 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
5305 abort ();'. This reduces the runtime of the "Many lookaheads"
5306 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
5307 GCC 3.2.
5308
20ef1ad5
PE
53092002-11-07 Paul Eggert <eggert@twinsun.com>
5310
5311 * src/parse-gram.y (CHARACTER): Remove unused token.
5312 All uses removed.
5313
5314 * src/scan-gram.l: Remove stack option. We no longer use the
5315 stack, since the stack was never deeper than 1; instead, use the
5316 new auto var c_context to record the stacked value.
5317
5318 Remove nounput option. At an unexpected end of file, we now unput
5319 the minimal input necessary to end cleanly; this simplifies the
5320 code.
5321
5322 Avoid unbounded token sizes where this is easy.
5323
5324 (unexpected_end_of_file): New function.
5325 Use it to systematize the error message on unexpected EOF.
5326 (last-string): Now auto, not static.
5327 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
5328 (scanner_last_string_free): Remove; not used.
5329 (percent_percent_count): Move decl to just before use.
5330 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
5331 not the (never otherwised-used) CHARACTER.
5332
93724f13
AD
53332002-11-07 Akim Demaille <akim@epita.fr>
5334
5335 Let yyerror always receive the msg as last argument, so that
5336 yyerror can be variadic.
5337
5338 * data/yacc.c (b4_yyerror_args): New.
5339 Use it when calling yyerror.
5340 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
5341 Use it when calling yyerror.
5342 * doc/bison.texinfo (Error Reporting): Adjust.
5343 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
5344 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
5345
6e40b4eb
AD
53462002-11-06 Akim Demaille <akim@epita.fr>
5347
5348 #line should have quoted strings.
5349 Ideally, this should be done by m4_quotearg.
5350
5351 * src/scan-skel.l: Include quotearg.h.
5352 Quote __ofile__.
5353 * src/output.c (symbol_printers_output)
5354 (symbol_destructors_output): Quote the file name.
5355
2dfbfc12
AD
53562002-11-06 Akim Demaille <akim@epita.fr>
5357
5358 * tests/regression.at (Invalid inputs): Adjust to the recent
5359 messages.
5360
437c2d80
AD
53612002-11-06 Akim Demaille <akim@epita.fr>
5362
5363 Restore --no-lines.
5364 Reported by Jim Kent.
5365
5366 * data/c.m4 (b4_syncline): New.
5367 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
5368 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
5369 * src/output.c (user_actions_output): Likewise.
5370 (prepare): Define 'b4_synclines_flag'.
2dfbfc12 5371 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
437c2d80 5372
900c5db5
AD
53732002-11-06 Akim Demaille <akim@epita.fr>
5374
5375 * src/main.c (main): Free `infile'.
5376 * src/scan-gram.l (handle_syncline): New.
5377 Recognize `#line'.
5378 * src/output.c (user_actions_output, symbol_destructors_output)
5379 (symbol_printers_output): Use the location's file name, not
5380 infile.
5381 * src/reader.c (prologue_augment, epilogue_set): Likewise.
5382
e183b123 53832002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
51b4a04c 5384
e183b123 5385 * src/tables.c (matching_state): Don't allow states to match if
51b4a04c 5386 either has GLR conflict entries.
e183b123 5387
193eb6b7
PE
53882002-11-05 Paul Eggert <eggert@twinsun.com>
5389
e183b123
PE
5390 * src/scan-gram.l: Use more accurate diagnostics, e.g.
5391 "integer out of range" rather than "invalid value".
5392 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
5393 accordingly.
5394
193eb6b7
PE
5395 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
5396 Also, remove one static variable in the scanner.
5397
5398 * src/scan-gram.l (braces_level): Now auto, not static.
5399 Initialize to zero if the compiler is being picky.
5400 (INITIAL): Clear braces_level instead of incrementing it.
5401 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
5402 as POSIX 1003.1-2001 requires.
5403 * src/system.h (IF_LINT): New macro, taken from coreutils.
5404 * configure.ac: Define "lint" if --enable-gcc-warnings.
5405
29c01725
AD
54062002-11-05 Akim Demaille <akim@epita.fr>
5407
5408 * src/scan-gram.l: When it starts with `%', complain about the
5409 whole directive, not just that `invalid character: %'.
5410
8aeac3ca
AD
54112002-11-04 Akim Demaille <akim@epita.fr>
5412
5413 * Makefile.maint: Update from Autoconf.
5414 (update, cvs-update, po-update, do-po-update): New.
5415
793a58bb
AD
54162002-11-04 Akim Demaille <akim@epita.fr>
5417
5418 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
5419 and yyerror.
5420 Have yyerror `use' its arguments.
5421 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
5422 returns true when location & yacc & pure & parse-param.
5423 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
5424
c4d720cd
AD
54252002-11-04 Akim Demaille <akim@epita.fr>
5426
5427 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
5428 clashes.
5429 * src/scan-gram.l: Use [\'] instead of ['] to pacify
5430 font-lock-mode.
5431 Use complain_at.
5432 Use quote, not quote_n since LOCATION_PRINT no longer uses the
5433 slot 0.
5434
613a0dc5
PE
54352002-11-03 Paul Eggert <eggert@twinsun.com>
5436
5437 * src/reader.c (get_merge_function, grammar_current_rule_check):
5438 Use consistent diagnostics for reporting type name clashes.
5439 Quote the types with <>, for consistency with Yacc.
5440 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
5441
2a8d363a
AD
54422002-11-03 Akim Demaille <akim@epita.fr>
5443
5444 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
5445 New.
5446 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
5447 (b4_parse_param): Remove.
5448 Use b4_identification.
5449 Propagate b4_pure_args where needed to pass them to yyerror.
5450 * data/glr.m4 (b4_parse_param): Remove.
5451 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
5452 (b4_lpure_formals): New.
5453 Use b4_identification.
5454 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
5455 b4_user_formals and b4_user_args.
5456 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
5457 (yyreportAmbiguity): When using a pure parser, also need
5458 the location, and the parse-params.
5459 Adjust callers.
5460 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
5461 When using a pure parser, also need the parse-params.
5462 Adjust callers.
5463 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
5464 (%pure-parser + %parse-param) LALR and GLR parsers.
5465 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
5466 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
5467 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
5468 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
5469 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
5470 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
5471 * doc/bison.texinfo: Untabify the whole file.
5472 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
5473 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
5474 (Error Reporting): Adjust to these new directives.
5475 Document %error-verbose, deprecate YYERROR_VERBOSE.
5476
9e32add8
AD
54772002-11-03 Akim Demaille <akim@epita.fr>
5478
5479 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
5480 AT_CHECK_CALC_GLR invocations to use % directives, instead of
5481 command line options.
5482 * tests/cxx-type.at: Formatting changes.
5483
b02d90a5
PE
54842002-11-03 Paul Eggert <eggert@twinsun.com>
5485
5486 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
5487 to count columns correctly, and to check for invalid inputs.
9e32add8 5488
b02d90a5
PE
5489 Use mbsnwidth to count columns correctly. Account for tabs, too.
5490 Include mbswidth.h.
5491 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
5492 (extend_location): New function.
5493 (YY_LINES): Remove.
5494
5495 Handle CRLF in C code rather than in Lex code.
5496 (YY_INPUT): New macro.
5497 (no_cr_read): New function.
5498
5499 Scan UCNs, even though we don't fully handle them yet.
5500 (convert_ucn_to_byte): New function.
5501
5502 Handle backslash-newline correctly in C code.
5503 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
5504 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
5505 all uses changed.
5506 (tag, splice): New EREs. Do not allow NUL or newline in tags.
5507 Use {splice} wherever C allows backslash-newline.
5508 YY_STEP after space, newline, vertical-tab.
5509 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
9e32add8 5510
b02d90a5
PE
5511 (letter, id): Don't assume ASCII; e.g., spell out a-z.
5512
5513 ({int}, handle_action_dollar, handle_action_at): Check for integer
5514 overflow.
9e32add8 5515
b02d90a5
PE
5516 (YY_STEP): Omit trailing semicolon, so that it's more like C.
5517
5518 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
5519 as well as \000. Check for UCHAR_MAX, not 255.
5520 Allow \x with an arbitrary positive number of digits, as in C.
5521 Check for overflow here.
5522 Allow \? and UCNs, for compatibility with C.
5523
5524 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
5525 with quote slot used by complain_at.
5526
5527 * tests/input.at: Add tests for backslash-newline, m4 quotes
5528 in symbols, long literals, and funny escapes in strings.
5529
5530 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
5531 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
5532 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
5533 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
5534 * m4/mbswidth.m4: New file, from GNU coreutils.
5535
5536 * doc/bison.texinfo (Grammar Outline): Document // comments.
5537 (Symbols): Document that trigraphs have no special meaning in Bison,
5538 nor is backslash-newline allowed.
5539 (Actions): Document that trigraphs have no special meaning.
5540
5541 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
5542 no longer used.
5543
55442002-11-02 Paul Eggert <eggert@twinsun.com>
5545
5546 * src/reader.c: Don't include quote.h; not needed.
5547 (get_merge_function): Reword warning to be consistent with
5548 type clash diagnostic in grammar_current_rule_check.
5549
5550 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
5551 bug in trigraph handling.
5552
5553 * src/output.c (prepare_symbols): When printing token names,
5554 escape "[" as "@<:@" and likewise for "]".
5555
5556 * src/system.h (errno): Remove declaration, as we are now
5557 assuming C89 or better, and C89 guarantees errno.
5558
762b212b
PE
55592002-10-30 Paul Eggert <eggert@twinsun.com>
5560
5561 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
5562 Check for close failures.
5563 * src/files.h (xfclose): Return void, not int, since it always
5564 returned zero.
5565 * src/files.c (xfclose): Likewise. Report I/O error if ferror
5566 indicates one.
5567 * src/output.c (output_skeleton): Use xfclose rather than fclose
5568 and ferror. xfclose now checks ferror.
5569
5570 * data/glr.c (YYLEFTMOST_STATE): Remove.
5571 (yyreportTree): Use a stack-based leftmost state. This avoids
5572 our continuing battles with bogus warnings about initializers.
5573
56100c60
AD
55742002-10-30 Akim Demaille <akim@epita.fr>
5575
5576 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
5577 #if.
5578
51b4a04c
PH
55792002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5580
5581 * tests/glr-regr1.at: New test for reported regressions.
5582 * tests/testsuite.at: Add glr-regr1.at test.
5583 * tests/Makefile.am: Add glr-regr1.at test.
e183b123 5584
bf1ebda2
PE
55852002-10-24 Paul Eggert <eggert@twinsun.com>
5586
5c16c6b1
PE
5587 Version 1.75a.
5588
bf1ebda2
PE
5589 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
5590 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
5591 we use malloc. Don't assume 'A' through 'Z' are contiguous.
5592 Don't assume strdup exists; POSIX says its an XSI extension.
5593 Check for buffer overflow on input.
5594
b526ee61
AD
55952002-10-24 Akim Demaille <akim@epita.fr>
5596
5597 * src/output.c (output_skeleton): Don't disable M4sugar comments
5598 too soon: it results in comments being expanded.
5599 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
5600 first output.
5601
f1886bb2
AD
56022002-10-24 Akim Demaille <akim@epita.fr>
5603
5604 * data/yacc.c (m4_int_type): New.
5605 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
5606 char' as only yacc.c wants K&R portability.
5607 * data/glr.c (yysigned_char): Remove.
5608 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
5609 Reported by Quoc Peyrot.
5610
c5576256
PE
56112002-10-23 Paul Eggert <eggert@twinsun.com>
5612
5613 * src/main.c (main): With --trace=time, report times even if a
5614 non-fatal error occurs. Formerly, the times were reported in some
5615 such cases but not in others.
5616 * src/reader.c (reader): Just return if a complaint has been issued,
5617 instead of exiting, so that 'main' can report times.
5618
27b0ffea
AD
56192002-10-22 Akim Demaille <akim@epita.fr>
5620
5621 * src/system.h: Include sys/types.
5622 Reported by Bert Deknuydt.
5623
223a7883
PE
56242002-10-23 Paul Eggert <eggert@twinsun.com>
5625
5626 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
5627 Suggested by Art Haas.
5628
56292002-10-22 Paul Eggert <eggert@twinsun.com>
5630
5631 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
5632 decl; not needed any more.
5633 * src/main.c (main): Use return to exit, undoing yesterday's change.
5634 The last OS that we could find where this wouldn't work is
5635 SunOS 3.5, and that's too old to worry about now.
5636
5637 * data/glr.c (struct yyltype): Define members even when not
5638 doing locations. This is more consistent with yacc.c, and it
5639 works around the following bug reports:
161a71f3
PE
5640 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
5641 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
27b0ffea 5642
223a7883
PE
5643 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
5644 @acronym consistently. Standardize on "Yacc" instead of "YACC",
5645 "Algol" instead of "ALGOL". Give a bit more history about BNF.
5646
8b76775a
AD
56472002-10-22 Akim Demaille <akim@epita.fr>
5648
5649 * data/README: New.
5650
6db10d14
PE
56512002-10-21 Paul Eggert <eggert@twinsun.com>
5652
5653 Be consistent about 'bool'; the old code used an enum in one
5654 module and an int in another, and this violates the C standard.
5655 * m4/stdbool.m4: New file, from coreutils 4.5.3.
5656 * configure.ac (AC_HEADER_STDBOOL): Add.
5657 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
5658 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
5659 * src/symtab.c (hash_compare_symbol_t): Likewise.
5660 * src/system.h (bool, false, true): Use a definition consistent
5661 with ../lib/hash.c. All uses changed.
5662
5663 * src/complain.c (warning_issued): Renamed from warn_message_count,
5664 so that we needn't worry about integer overflow (!).
5665 Now of type bool. All uses changed.
5666 (complaint_issued): Renamed from complain_message_count; likewise.
5667
5668 * src/main.c (main): Use exit to exit with failure.
27b0ffea 5669
6db10d14
PE
5670 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
5671 rather than 1 and 0.
5672 * src/main.c (main): Likewise.
5673 * src/getargs.c (getargs): Likewise.
5674 * src/reader.c (reader): Likewise.
5675
5676 * src/getarg.c (getargs): Remove duplicate code for
5677 "Try `bison --help'".
5678
5679 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
5680 What was that "2" for?
5681
5682 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
5683 * src/getargs.c (usage): Likewise.
5684
5685 * src/getargs.c (getargs): When there are too few operands, report
5686 the last one. When there are too many, report the first extra
5687 one. This is how diffutils does it.
5688
92a060fd
PE
56892002-10-20 Paul Eggert <eggert@twinsun.com>
5690
5691 Remove K&R vestiges.
5692 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
5693 * src/complain.c (VA_START): Remove. Assume prototypes.
5694 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
5695 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
5696 fatal): Assume prototypes.
5697 * src/complain.h: Assume prototypes.
5698 * src/system.h (PARAMS): Remove.
5699 Include <limits.h> unconditionally, since it's guaranteeed even
5700 for a freestanding C89 compiler.
5701 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
5702 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
8b76775a 5703
e7cb57c0
AD
57042002-10-20 Akim Demaille <akim@epita.fr>
5705
5706 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
5707 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
5708 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
5709 (yyresolveStates, yyresolveAction, yyresolveStack)
5710 (yyprocessOneStack): Use them.
5711 (yy_reduce_print): New.
5712 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
5713
0245f82d
AD
57142002-10-20 Akim Demaille <akim@epita.fr>
5715
5716 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
5717 arguments and output `void'.
5718 (b4_c_function): Rename as...
5719 (b4_c_function_def): this.
5720 (b4_c_function_decl, b4_c_ansi_function_def)
5721 (b4_c_ansi_function_decl): New.
5722 Change the interpretation of the arguments: before `int, foo', now
5723 `int foo, foo'.
5724 * data/yacc.c (yyparse): Prototype and define thanks to these.
5725 Adjust b4_c_function_def uses.
5726 * data/glr.c (yyparse): Likewise, but ANSI only.
5727
39912f52
AD
57282002-10-20 Akim Demaille <akim@epita.fr>
5729
5730 * src/output.c (prepare): Move the definition of `tokens_number',
5731 `nterms_number', `undef_token_number', `user_token_number_max'
5732 to...
5733 (prepare_tokens): Here.
5734 (prepare_tokens): Rename as...
5735 (prepare_symbols): this.
5736 (prepare): Move the definition of `rules_number' to...
5737 (prepare_rules): here.
5738 (prepare): Move the definition of `last', `final_state_number',
5739 `states_number' to...
5740 (prepare_states): here.
5741 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
5742
20c1e2ad
AD
57432002-10-20 Akim Demaille <akim@epita.fr>
5744
5745 * src/tables.h, src/tables.c, src/output.c: Comment changes.
5746
21964f43
AD
57472002-10-20 Akim Demaille <akim@epita.fr>
5748
5749 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
5750 * data/c.m4: here.
5751
66d30cd4
AD
57522002-10-20 Akim Demaille <akim@epita.fr>
5753
5754 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
5755 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
5756 `pair'.
5757 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
5758 `name' to...
5759 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
5760 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
5761 These.
5762
95f2c9fe
PE
57632002-10-19 Paul Eggert <eggert@twinsun.com>
5764
5765 Do not create a temporary file, as that involves security and
5766 cleanup headaches. Instead, use a pair of pipes.
5767 Derived from a suggestion by Florian Krohm.
5768 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
5769 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
5770 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
5771 (BISON_PREREQ_SUBPIPE): Add.
5772 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
5773 Add subpipe.h, subpipe.c.
5774 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
5775 * po/POTFILES.in: Add lib/subpipe.c.
5776 * src/output.c: Include "subpipe.h".
5777 (m4_invoke): Remove decl.
5778 (scan_skel): New decl.
5779 (output_skeleton): Use pipe rather than temporary file for m4 input.
5780 Check that m4sugar.m4 is readable, to avoid deadlock.
5781 Check for pipe I/O error.
5782 * src/scan-skel.l (readpipe): Remove decl.
5783 (scan_skel): New function, to be used in place of m4_invoke.
5784 Read from stream rather than file.
66d30cd4 5785
95f2c9fe
PE
5786 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
5787 float, as this generates a warning on Solaris 8 + GCC 3.2 with
5788 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
5789 this generates a more-accurate value anyway.
5790
5791 * lib/timevar.c (timervar_accumulate): Rename locals to
5792 avoid confusion with similarly-named more-global.
5793 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
5794
5795 * src/output.c (prepare): Use xstrdup to convert char const *
5796 to char *, to avoid GCC warning.
5797
c19988b7
AD
57982002-10-19 Akim Demaille <akim@epita.fr>
5799
5800 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
5801 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
5802 Use them to have `calc.y' ready for %pure-parser.
5803 * data/yacc.c (YYLEX): Pass a yylex return type to
5804 b4_c_function_call.
5805
ae7453f2
AD
58062002-10-19 Akim Demaille <akim@epita.fr>
5807
5808 Prototype support of %lex-param and %parse-param.
5809
5810 * src/parse-gram.y: Add the definition of the %lex-param and
5811 %parse-param tokens, plus their rules.
5812 Drop the `_' version of %glr-parser.
5813 Add the "," token.
5814 * src/scan-gram.l (INITIAL): Scan them.
5815 * src/muscle_tab.c: Comment changes.
5816 (muscle_insert, muscle_find): Rename `pair' as `probe'.
5817 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
5818 (muscle_entry_s): The `value' member is no longer const.
5819 Adjust all dependencies.
5820 * src/muscle_tab.c (muscle_init): Adjust: use
5821 MUSCLE_INSERT_STRING.
5822 Initialize the obstack earlier.
5823 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
5824 (muscle_pair_list_grow): New.
5825 * data/c.m4 (b4_c_function_call, b4_c_args): New.
5826 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
5827 * tests/calc.at: Use %locations, not --locations.
5828 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
5829
0e575721
AD
58302002-10-19 Akim Demaille <akim@epita.fr>
5831
5832 * src/getargs.c (usage): Take status as argument and exit
5833 accordingly.
5834 Report the traditional `Try ... --help' message when status != 0.
5835 (usage, version): Don't take a FILE * as arg, it is pointless.
5836 (getargs): When there is an incorrect number of arguments, make it
5837 an error, and report it GNUlically thanks to `usage ()'.
5838
724ce7f5
PE
58392002-10-18 Paul Eggert <eggert@twinsun.com>
5840
3a781eb2
PE
5841 * data/glr.c (yyreportParseError): Don't assume that sprintf
5842 yields the length of the printed string, as this is not true
5843 on SunOS 4.1.4. Reported by Peter Klein.
5844
724ce7f5
PE
5845 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
5846 * tests/conflicts.at (%nonassoc and eof): Likewise.
5847 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
5848
473d0a75
AD
58492002-10-17 Akim Demaille <akim@epita.fr>
5850
5851 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
5852 * src/getargs.c (trace_types, trace_args): Adjust.
5853 * src/reader.c (grammar_current_rule_prec_set)
5854 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
5855 Standardize error messages.
5856 And s/@prec/%prec/!
5857 (reader): Use trace_flag to enable scanner/parser debugging,
5858 instead of an adhoc scheme.
5859 * src/scan-gram.l: Remove trailing debugging code.
5860
e76d2469
PE
58612002-10-16 Paul Eggert <eggert@twinsun.com>
5862
93e2236a
PE
5863 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
5864 MUSCLE_TAB_H.
5865
e76d2469
PE
5866 * NEWS: Officially drop support for building Bison with K&R C,
5867 since it didn't work anyway and it's not worth worrying about.
5868 * Makefile.maint (wget_files): Remove ansi2knr.c.
5869 (ansi2knr.c-url_prefix): Remove.
5870 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
5871 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
5872 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
5873
5bd1c419
PE
58742002-10-15 Paul Eggert <eggert@twinsun.com>
5875
5876 Stop using the "enum_" trick for K&R-style function definitions;
5877 it confused me, and I was the author! Instead, assume that people
5878 who want to use K&R C compilers (when using these modules in GCC,
5879 perhaps?) will run ansi2knr.
5880
5881 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
5882 All uses of "enum_" changed to "enum ".
5883 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
5884 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
e76d2469 5885
5bd1c419
PE
5886 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
5887 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
5888 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
5889 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
5890 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
5891 abitset_not, abitset_ones, abitset_or, abitset_or_and,
5892 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
5893 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
5894 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
5895 Use function prototypes; this removes the need for declaring
5896 static functions simply to provide their prototypes.
5897 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
5898 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
5899 bitset_count_, bitset_create, bitset_dump, bitset_first,
5900 bitset_free, bitset_init, bitset_last, bitset_next,
5901 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
5902 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
5903 bitset_print, bitset_release_memory, bitset_toggle_,
5904 bitset_type_choose, bitset_type_get, bitset_type_name_get,
5905 debug_bitset): Likewise.
5906 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
5907 * lib/bitset_stats.c (bitset_log_histogram_print,
5908 bitset_percent_histogram_print, bitset_stats_and,
5909 bitset_stats_and_cmp, bitset_stats_and_or,
5910 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
5911 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
5912 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
5913 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
5914 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
5915 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
5916 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
5917 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
5918 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
5919 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
5920 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
5921 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
5922 bitset_stats_zero): Likewise.
5923 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
5924 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
5925 bitsetv_dump, debug_bitsetv): Likewise.
5926 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
5927 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
5928 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
5929 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
5930 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
5931 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
5932 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
5933 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
5934 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
5935 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
5936 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
5937 Likewise.
5938 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
5939 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
5940 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
5941 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
5942 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
5943 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
5944 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
5945 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
5946 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
5947 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
5948 lbitset_xor_cmp, lbitset_zero): Likewise.
e76d2469 5949
ae26e1f0
AD
59502002-10-14 Akim Demaille <akim@epita.fr>
5951
5952 Version 1.75.
5953
d43baf71
AD
59542002-10-14 Akim Demaille <akim@epita.fr>
5955
5956 * tests/Makefile.am (maintainer-check-posix): New.
5957
7ebc83e3
AD
59582002-10-14 Akim Demaille <akim@epita.fr>
5959
5960 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
5961 member.
5962
05846dae
AD
59632002-10-14 Akim Demaille <akim@epita.fr>
5964
5965 * src/tables.c (table_ninf_remap): base -> tab.
5966 Reported by Matt Rosing.
5967
1318e37d
PE
59682002-10-14 Paul Eggert <eggert@twinsun.com>
5969
447fbb17
PE
5970 * tests/action.at, tests/calc.at, tests/conflicts.at,
5971 tests/cxx-type.at, tests/headers.at, tests/input.at,
5972 tests/regression.at, tests/synclines.at, tests/torture.at:
5973 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
5974 so that the tests still work even if POSIXLY_CORRECT is set.
5975 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
05846dae 5976
1318e37d
PE
5977 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
5978 for portability to K&R hosts. Fix typo: signed char is guaranteed
5979 only to 127, not to 128.
5980 * data/glr.c (yysigned_char): New type.
5981 * data/yacc.c (yysigned_char): Likewise.
5982 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
5983
cc0f0794
PE
59842002-10-13 Paul Eggert <eggert@twinsun.com>
5985
5038f418
PE
5986 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
5987 true due to limited range of data type" warning from GCC.
5988
cc0f0794
PE
5989 * data/c.m4 (b4_token_defines): Protect against double-inclusion
5990 by wrapping enum yytokentype's definition inside #ifndef
5991 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
5992
6fed0802
AD
59932002-10-13 Akim Demaille <akim@epita.fr>
5994
5995 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
5996 Un yy- yyrhs to avoid the name clash with the global YYRHS.
5997
32f0598d
AD
59982002-10-13 Akim Demaille <akim@epita.fr>
5999
6000 * Makefile.maint: Update from Autoconf 2.54.
6001 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
6002
7ea9a33f
AD
60032002-10-13 Akim Demaille <akim@epita.fr>
6004
6005 * src/print.c (print_state): Separate the list of solved conflicts
6006 from the other items.
6007 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
6008
ea99527d
AD
60092002-10-13 Akim Demaille <akim@epita.fr>
6010
6011 Let nondeterministic skeletons be usable with deterministic
6012 tables.
6013
6014 With the patch, GAWK compiled by GCC without -O2 passes its test
6015 suite using a GLR parser driven by LALR tables. It fails with -O2
6016 because `struct stat' gives two different answers on my machine:
6017 88 (definition of an auto var) and later 96 (memset on this var).
6018 Hence the stack is badly corrumpted. The headers inclusion is to
6019 blame: if I move the awk.h inclusion before GLR's system header
6020 inclusion, the two struct stat have the same size.
6021
6022 * src/tables.c (pack_table): Always create conflict_table.
6023 (token_actions): Always create conflict_list.
6024 * data/glr.c (YYFLAG): Remove, unused.
6025
f377f69f
AD
60262002-10-13 Akim Demaille <akim@epita.fr>
6027
6028 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
6029 (O0FLAGS): New.
6030 (VALGRIND, GXX): New.
6031 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
6032 * tests/bison.in: Run $PREBISON a pre-command.
6033 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
6034 (maintainer-check-g++): New.
6035 * Makefile.am (maintainer-check): New.
6036
2a1fe6ed
AD
60372002-10-13 Akim Demaille <akim@epita.fr>
6038
6039 * data/glr.c: Formatting changes.
6040 Tweak some trace messages to match yacc.c's.
6041
f50adbbd
AD
60422002-10-13 Akim Demaille <akim@epita.fr>
6043
6044 GLR parsers sometimes raise parse errors instead of performing the
6045 default reduction.
6046 Reported by Charles-Henry de Boysson.
6047
6048 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
ba0fe3c7 6049 check the length of the traces when %glr.
f50adbbd
AD
6050 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
6051 GLR's traces.
6052 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
6053 Test GLR parsers.
6054 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
6055 (yyltype): Remove the yy prefix from the member names.
6056 (yytable): Complete its comment.
6057 (yygetLRActions): Map error action number from YYTABLE from
6058 YYTABLE_NINF to 0.
6059 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
6060 (which was a bug: it should have been YYTABEL_NINF, and yet it was
6061 not satisfying as we could compare an YYACTION computed from
6062 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
6063 only value for error actions.
6064 (yyreportParseError): In verbose parse error messages, don't issue
6065 `error' in the list of expected tokens.
6066 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
6067 next action to perform to match glr.c's decoding.
6068 (yytable): Complete its comment.
6069
bcbad5b9
PE
60702002-10-13 Paul Eggert <eggert@twinsun.com>
6071
6072 Fix problem reported by Henrik Grubbstroem in
161a71f3 6073 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
bcbad5b9
PE
6074 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
6075 because the Bison parser reads the second action before reducing
6076 the first one.
6077 * src/scan-gram.l (rule_length): New static var.
6078 Use it to keep track of the rule length in the scanner, since
6079 we can't expect the parser to be in lock-step sync with the scanner.
6080 (handle_action_dollar, handle_action_at): Use this var.
6081 * tests/actions.at (Exotic Dollars): Test for the problem.
05846dae 6082
14904b89
PE
60832002-10-12 Paul Eggert <eggert@twinsun.com>
6084
1fe611e5
PE
6085 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
6086 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
6087 Include <sys/time.h> when checking for clock_t and struct tms.
6088 Use same include order as source.
6089 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
161a71f3 6090 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
05846dae 6091
1fe611e5
PE
6092 * lib/timevar.c: Update copyright date and clarify comments.
6093 (get_time) [IN_GCC]: Keep the GCC version for reference.
05846dae 6094
1fe611e5
PE
6095 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
6096 GCC version as of today, then merge Bison's changes.
6097 Change "GCC" to "Bison" in copyright notice. timevar.def's
6098 author is Akim, so change that too.
6099
98194095
PE
6100 * src/reader.c (grammar_current_rule_check):
6101 Don't worry about the default action if $$ is untyped.
6102 Prevents bogus warnings reported by Jim Gifford in
161a71f3 6103 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
98194095 6104
14904b89
PE
6105 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
6106 * data/glr.c, data/lalr1.cc, data/yacc.c:
6107 Output token definitions before the first part of user declarations.
6108 Fixes compatibility problem reported by Jim Gifford for kbd in
161a71f3 6109 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14904b89 6110
ff6dca18
PE
61112002-10-11 Paul Eggert <eggert@twinsun.com>
6112
6113 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
6114 (yyparse): here. This undoes some of the 2002-07-25 change.
6115 Compatibility problem reported by Ralf S. Engelschall with
6116 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
6117
eb714592
AD
61182002-10-11 Akim Demaille <akim@epita.fr>
6119
6120 * tests/regression.at Characters Escapes): New.
6121 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
6122 characters.
6123 Reported by Jan Nieuwenhuizen.
6124
b7195100
AD
61252002-10-11 Akim Demaille <akim@epita.fr>
6126
6127 * po/id.po: New.
6128
f28a0f2d
PE
61292002-10-10 Paul Eggert <eggert@twinsun.com>
6130
6131 Portability fixes for bitsets; this also avoids several GCC
6132 warnings.
6133
6134 * lib/abitset.c: Include <stddef.h>, for offsetof.
6135 * lib/lbitset.c: Likewise.
6136
6137 * lib/abitset.c (abitset_bytes): Return a size that is aligned
6138 properly for vectors of objects. Do not assume that adding a
6139 header size to a multiple of a word size yields a value that is
6140 properly aligned for the whole union.
6141 * lib/bitsetv.c (bitsetv_alloc): Likewise.
6142
6143 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
6144 unique names for structures.
6145 * lib/ebitset.c (ebitset_bytes): Likewise.
6146 * lib/lbitset.c (lbitset_bytes): Likewise.
6147
6148 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
6149 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
6150 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
6151 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
6152 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
6153 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
6154 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
6155 to improve the type-checking that GCC can do.
6156 * lib/bitset.c (bitset_op4_cmp): Likewise.
6157 * lib/bitset_stats.c (bitset_stats_count,
6158 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
6159 bitset_stats_copy, bitset_stats_disjoint_p,
6160 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
6161 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
6162 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
6163 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
6164 bitset_stats_and_or_cmp, bitset_stats_andn_or,
6165 bitset_stats_andn_or_cmp, bitset_stats_or_and,
6166 bitset_stats_or_and_cmp): Likewise.
6167 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
6168 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
6169 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
6170 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
6171
6172 * lib/abitset.h: Include bitset.h, not bbitset.h.
6173 * lib/ebitset.h: Likewise.
6174 * lib/lbitset.h: Likewise.
6175
6176 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
6177 All instances of parameters of type enum bitset_opts are now of
6178 type enum_bitset_opts, to conform to the C Standard, and similarly
6179 for enum_bitset_type.
6180 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
6181 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
6182
6183 Do not use "struct bitset_struct" to mean different things in
6184 different modules. Not only is this confusing, it violates
6185 the C Standard, which requires that structure types in different
6186 modules must be compatible if one is to be passed to the other.
6187 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
6188 All instances of "struct bitset_struct *" replaced with "bitset".
6189 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
6190 (union bitset_union, struct abitset_struct, struct ebitset_struct,
6191 struct lbitset_struct, struct bitset_stats_struct): New types.
6192 All uses of struct bitset_struct changed to union bitset_union,
6193 etc.
ba0fe3c7 6194 * lib/abitset.c (struct abitset_struct, abitset,
f28a0f2d
PE
6195 struct bitset_struct): Remove.
6196 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
6197 struct bitset_struct): Remove.
6198 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
6199 bitset_struct): Remove.
6200 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
6201 Likewise.
6202
6203 Do not call a function of type T using a call that assumes the
6204 function is of a different type U. Standard C requires that a
6205 function must be called with a type that is compatible with its
6206 definition.
6207 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
6208 New decls.
6209 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
6210 New functions.
6211 * lib/ebitset.c (PFV): Remove.
6212 * lib/lbitset.c (PFV): Likewise.
6213 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
6214 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
6215 decls.
6216 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
6217 (ebitset_vtable): Use them.
6218 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
6219 lbitset_xor): New functions.
6220 (lbitset_vtable): Use them.
6221
6222 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
6223 Declare.
6224
6225 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
6226 GCC warning.
6227 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
6228 Use offsetof, for simplicity.
6229
6fbe4984
PE
62302002-10-06 Paul Eggert <eggert@twinsun.com>
6231
6232 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
6233 the same width as int. This reapplies a hunk of the 2002-08-12 patch
161a71f3 6234 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
6fbe4984
PE
6235 which was inadvertently undone by the 2002-09-30 patch.
6236 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
6237 the same width as int.
6238
420f93c8
PE
62392002-10-04 Paul Eggert <eggert@twinsun.com>
6240
6241 Version 1.50.
6242
6243 * configure.ac (AC_INIT), NEWS: Increment version number.
6244
6245 * doc/bison.texinfo: Minor spelling, grammar, and white space
6246 fixes.
6247 (Symbols): Mention that any negative value returned from yylex
6248 signifies end-of-input. Warn about negative chars. Mention
6249 the portable Standard C character set.
6250
6251 The GNU coding standard says CFLAGS and YFLAGS are reserved
6252 for the installer to set.
6253 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
6254 * src/Makefile.am (AM_CFLAGS): Likewise.
6255 (AM_YFLAGS): Renamed from YFLAGS.
6256
6257 Fix some MAX and MIN problems.
6258 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
6259 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
6260 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
6261 * src/reader.c (reader): Use it.
6262
6263 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
6264 POSIX 1003.1-2001 has removed fgrep.
6265
62662002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
6267
6268 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
6269 interpreted as signed.
6270 * lib/ebitset.c (ebitset_list): Fix bug.
6271
ff68026d
PE
62722002-10-01 Paul Eggert <eggert@twinsun.com>
6273
6274 More fixes for 64-bit hosts and large bitsets.
6275
6276 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
6277 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
6278 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
6279 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
6280 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
6281 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
6282 bitset_count_): Likewise.
6283 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
6284 bitset_first, bitset_last): Likewise.
6285 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
6286 bitset_stats_list_reverse, bitset_stats_size,
6287 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
6288 Likewise.
6289 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
6290 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
6291 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
6292 bitsetv_reflexive_transitive_closure): Likewise.
6293 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
6294 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
6295 Likewise.
6296 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
6297 Likewise.
420f93c8 6298
ff68026d
PE
6299 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
6300 Use size_t, not unsigned int, to count bytes.
6301 * lib/abitset.h (abitset_bytes): Likewise.
6302 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
6303 Likewise.
6304 * lib/bitset.h (bitset_bytes): Likewise.
6305 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
6306 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
6307 * lib/bitsetv.c (bitsetv_alloc): Likewise.
6308 * lib/ebitset.c (ebitset_bytes): Likewise.
6309 * lib/ebitset.h (ebitset_bytes): Likewise.
6310 * lib/lbitset.c (lbitset_bytes): Likewise.
6311 * lib/lbitset.h (lbitset_bytes): Likewise.
420f93c8 6312
ff68026d
PE
6313 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
6314 abitset_subset_p, abitset_disjoint_p, abitset_and,
6315 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
6316 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
6317 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
6318 abitset_or_and, abitset_or_and_cmp):
6319 Use bitset_windex instead of unsigned int.
6320 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
6321 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
6322 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
6323 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
6324 Likewise.
6325 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
420f93c8 6326
ff68026d
PE
6327 * lib/bitset.c (bitset_print):
6328 Use proper printf formats for widths of integer types.
6329 * lib/bitset_stats.c (bitset_percent_histogram_print,
6330 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
6331 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
6332 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
6333 * lib/lbitset.c (lbitset_bytes): Likewise.
420f93c8 6334
ff68026d
PE
6335 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
6336 BITSET_SIZE_MAX): New macros.
6337 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
6338 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
6339 to BITSET_WINDEX_MAX.
6340
6341 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
6342 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
6343 since we now return the bitset_bindex type (not int).
6344
6345 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
6346 when computing sizes.
6347 * lib/ebitset.c (ebitset_elts_grow): Likewise.
6348
6349 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
6350 and avoid cast to unsigned.
6351
6aa452a6
AD
63522002-09-30 Akim Demaille <akim@epita.fr>
6353
6354 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
6355 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
6356 Updates from Michael Hayes.
6357
927f7817
AD
63582002-09-30 Art Haas <ahaas@neosoft.com>
6359
6360 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
6361 invocations.
6362 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
6363 defined.
6364
9738f41e
AD
63652002-09-27 Akim Demaille <akim@epita.fr>
6366
6367 Version 1.49c.
6368
a5c75d7f
AD
63692002-09-27 Akim Demaille <akim@epita.fr>
6370
6371 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
6372 (Because of AC_LIBSOURCE).
6373
8280e179
AD
63742002-09-27 Akim Demaille <akim@epita.fr>
6375
6376 Playing with Autoscan.
6377
6378 * configure.ac: Remove the old LIBOBJ tweaks.
6379 (AC_REPLACE_FUNCS): Add strrchr and strtol.
6380 * lib/strrchr.c: New.
6381 * lib/strtol.c: New, from the Coreutils 4.5.1.
6382
ae64af35
AD
63832002-09-27 Akim Demaille <akim@epita.fr>
6384
6385 Playing with Autoscan.
6386
6387 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
6388 * lib/Makefile.am (libbison_a_SOURCES): No longer include
6389 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
6390 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
6391 Coreutils 4.5.1.
6392
d1a1114f
AD
63932002-09-24 Akim Demaille <akim@epita.fr>
6394
6395 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
6396 (Frequently Asked Questions, Parser Stack Overflow): New.
6397
b906441c
AD
63982002-09-13 Akim Demaille <akim@epita.fr>
6399
6400 Playing with autoscan.
6401
6402 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
6403 * src/files.c (skeleton_find): Remove, unused.
6404 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
6405 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
6406
bd701811
AD
64072002-09-13 Akim Demaille <akim@epita.fr>
6408
6409 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
6410 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
6411
e0a13e7b
AD
64122002-09-13 Akim Demaille <akim@epita.fr>
6413
6414 * configure.ac: Require 2.54.
6415 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
6416 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
6417 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
6418 Remove, provided by Autoconf macros.
6419
c97011bf
AD
64202002-09-12 Akim Demaille <akim@epita.fr>
6421
6422 * m4/prereq.m4: Update, from Coreutils 4.5.1.
6423
d862b1be
AD
64242002-09-12 Akim Demaille <akim@epita.fr>
6425
6426 * m4/prereq.m4: Update, from Fileutils 4.1.5.
6427 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
6428 Reported by Martin Mokrejs.
6429
3d38c03a
AD
64302002-09-10 Akim Demaille <akim@epita.fr>
6431
6432 * src/parse-gram.y: Associate a human readable string to each
6433 token type.
6434 * tests/regression.at (Invalid inputs): Adjust.
6435
b6347355
AD
64362002-09-10 Gary V. Vaughan <gary@gnu.org>
6437
6438 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
6439 with an Autoconf-2.5x style configure.ac.
6440
09ba4ab2
PE
64412002-09-06 Paul Eggert <eggert@twinsun.com>
6442
6443 * doc/bison.texinfo (Conditions): Make explicit that the GPL
6444 exception applies only to yacc.c. This is a modification of a
6445 patch originally suggested by Akim Demaille.
6446
21846f69
AD
64472002-09-06 Akim Demaille <akim@epita.fr>
6448
09ba4ab2
PE
6449 * data/c.m4 (b4_copyright): Move the GPL exception comment from
6450 here to...
6451 * data/yacc.c: here.
6452
21846f69
AD
6453 * data/lalr1.cc (struct yyltype): Don't define it, since we use
6454 LocationType.
6455 (b4_ltype): Default to yy::Location from location.hh.
6456
c0ad8bf3
AD
64572002-09-04 Jim Meyering <jim@meyering.net>
6458
6459 * data/yacc.c: Guard the declaration of yytoknum also with
6460 `#ifdef YYPRINT', so it is declared only when used.
6461
3a93251e
AD
64622002-09-04 Akim Demaille <akim@epita.fr>
6463
6464 * configure.in: Rename as...
6465 * configure.ac: this.
6466 Bump to 1.49c.
6467
427c0dda
AD
64682002-09-04 Akim Demaille <akim@epita.fr>
6469
6470 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
6471 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
6472 translate maintainer only messages.
6473
6a254321
PE
64742002-08-12 Paul Eggert <eggert@twinsun.com>
6475
645e30d1
PE
6476 Version 1.49b.
6477
6a254321
PE
6478 * Makefile.am (SUBDIRS): Remove intl.
6479 (DISTCLEANFILES): Remove.
6480 * NEWS: Mention that GNU M4 is now required. Clarify what is
6481 meant by "larger grammars". Mention the pt_BR translation.
6482 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
6483 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
6484 Bump version from 0.11.2 to 0.11.5.
6485 (BISON_PREREQ_STAGE): Remove.
6486 (AM_GNU_GETTEXT): Use external gettext.
6487 (AC_OUTPUT): Remove intl/Makefile.
6488
6489 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
6490
6491 * data/glr.c: Include string.h, for strlen.
6492 (yyreportParseError): Use size_t for yysize.
6493 (yy_yypstack): No longer nested inside yypstates, as nested
6494 functions are not portable. Do not assume size_t is the
6495 same width as int.
6496 (yypstates): Do not assume that ptrdiff_t is the same width
6497 as int, and similarly for yyposn and YYINDEX.
6498
6499 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
6500
6501 * lib/Makefile.am (INCLUDES): Do not include from the intl
6502 directory, which has been removed.
6503 * src/Makefile.am (INCLUDES): Likewise.
6504
6505 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
6506 (bitsets_sources, additional_bitsets_sources, timevars_sources):
6507 New vars.
6508
6509 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
6510 * tests/Makefile.am (EXTRA_DIST): Likewise.
6511
6512 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
6513 Do not assume that bitset_windex is the same width as unsigned.
6514
6515 * lib/abitset.c (abitset_unused_clear): Do not assume that
6516 bitset_word is the same width as int.
6517 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
6518 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
6519 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
6520 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
6521 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
6522
6523 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
6524 portability to one's complement hosts!).
6525 * lib/ebitset.c (ebitset_op1): Likewise.
6526 * lib/lbitset.c (lbitset_op1): Likewise.
6527
6528 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
6529 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
6530 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
6531 Sync with fileutils.
6532 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
6533 lib/gettext.h: Sync with diffutils.
6534
6535 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
6536 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
6537
6538 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
6539 PROTOTYPES to check for prototypes, and "defined __STDC__" to
6540 check for void *.
6541
6542 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
6543 size_t; the old version tried to do this but casted improperly.
6544 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
6545 (bitset_test): Now returns int, not unsigned long.
6546
6547 * lib/bitset_stats.c: Include "gettext.h".
6548 (_): New macro.
6549 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
6550 name locals "index", as it generates unnecessary warnings on some
6551 hosts that have an "index" function.
6552
6553 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
6554 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
6555 they need translation.
6556 * src/LR0.c (state_list_append, new_itemsets, get_state,
6557 append_states, generate_states): Likewise.
6558 * src/assoc.c (assoc_to_string): Likewise.
6559 * src/closure.c (print_closure, set_firsts, closure): Likewise.
6560 * src/gram.c (grammar_dump): Likewise.
6561 * src/injections.c (injections_compute): Likewise.
6562 * src/lalr.c (lookaheads_print): Likewise.
6563 * src/relation.c (relation_transpose): Likewise.
6564 * src/scan-gram.l: Likewise.
6565 * src/tables.c (table_grow, pack_vector): Likewise.
6566
6567 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
6568 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
6569 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
6570 * m4/mbstate_t.m4: Sync with fileutils.
6571 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
6572
6573 * po/LINGUAS: Add pt_BR.
6574 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
6575 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
6576 lib/timevar.c.
6577 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
6578 manual recommends.
6579 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
6580
6581 * src/complain.c (strerror_r): Remove decl; not needed.
6582 (strerror): Use same pattern as ../lib/error.c.
6583
6584 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
6585
6586 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
6587
6588 * src/main.c (main): Cast result of bindtextdomain and textdomain
6589 to void, to avoid a GCC warning when --disable-nls is in effect.
6590
6591 * src/scan-gram.l: Use strings rather than escapes when possible,
6592 to minimize the number of warnings from xgettext.
6593 (handle_action_dollar, handle_action_at): Don't use isdigit,
6594 as it mishandles negative chars and it may not work as expected
6595 outside the C locale.
6596
6597 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
6598 this is a GCC extension and is not portable to other compilers.
6599
6600 * src/system.h (alloca): Use same pattern as ../lib/error.c.
6601 Do not include <ctype.h>; no longer needed.
6602 Do not include <malloc.h>; no longer needed (and generates
6603 warnings on OpenBSD 3.0).
6604
6605 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
6606 it's not portable.
6607
6608 * tests/regression.at: Do not use 'cc -c input.c -o input';
6609 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
6610
6611 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
6612 exit status as failure, not just exit status 1. Sun C exits
6613 with status 2 sometimes.
6614
6615 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
6616 Use it for the two large tests.
6617
c8f002c7
AD
66182002-08-02 Akim Demaille <akim@epita.fr>
6619
6620 * src/conflicts.c (conflicts_output): Don't output rules never
6621 reduced here, since anyway that computation doesn't work.
6622 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
6623 (rule_useless_p, rule_never_reduced_p): New.
6624 (grammar_rules_partial_print): Use a filter instead of a range.
6625 Display the title only if needed.
6626 (grammar_rules_print): Adjust.
6627 (grammar_rules_never_reduced_report): New.
6628 * src/tables.c (action_row): Move the computation of rules never
6629 reduced to...
6630 (token_actions): here.
6631 * src/main.c (main): Make the parser before making the report, so
6632 that rules never reduced are computed.
6633 Call grammar_rules_never_reduced_report.
6634 * src/print.c (print_results): Report rules never reduced.
6635 * tests/conflicts.at, tests/reduce.at: Adjust.
6636
cd08e51e
AD
66372002-08-01 Akim Demaille <akim@epita.fr>
6638
6639 Instead of attaching lookaheads and duplicating the rules being
6640 reduced by a state, attach the lookaheads to the reductions.
6641
6642 * src/state.h (state_t): Remove the `lookaheads',
6643 `lookaheads_rule' member.
6644 (reductions_t): Add a `lookaheads' member.
6645 Use a regular array for the `rules'.
6646 * src/state.c (reductions_new): Initialize the lookaheads member
6647 to 0.
6648 (state_rule_lookaheads_print): Adjust.
6649 * src/state.h, src/state.c (state_reductions_find): New.
6650 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
6651 (count_rr_conflicts): Adjust.
6652 * src/lalr.c (LArule): Remove.
6653 (add_lookback_edge): Adjust.
6654 (state_lookaheads_count): New.
6655 (states_lookaheads_initialize): Merge into...
6656 (initialize_LA): this.
6657 (lalr_free): Adjust.
6658 * src/main.c (main): Don't free nullable and derives too early: it
6659 is used by --verbose.
6660 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
6661
bb0027a9
AD
66622002-08-01 Akim Demaille <akim@epita.fr>
6663
6664 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
6665 `rule_number_t**'.
6666 (set_derives, free_derives): Rename as...
6667 (derives_compute, derives_free): this.
6668 Adjust all dependencies.
6669 * src/nullable.c (set_nullable, free_nullable): Rename as...
6670 (nullable_compute, nullable_free): these.
6671 (rule_list_t): Store rule_t *, not rule_number_t.
6672 * src/state.c (state_rule_lookaheads_print): Directly compare rule
6673 pointers, instead of their numbers.
6674 * src/main.c (main): Call nullable_free, and derives_free earlier,
6675 as they were lo longer used.
6676
3325ddc4
AD
66772002-08-01 Akim Demaille <akim@epita.fr>
6678
6679 * lib/timevar.c (get_time): Include children time.
6680 * src/lalr.h (LA, LArule): Don't export them: used with the
6681 state_t.
6682 * src/lalr.c (LA, LArule): Static.
6683 * src/lalr.h, src/lalr.c (lalr_free): New.
6684 * src/main.c (main): Call it.
6685 * src/tables.c (pack_vector): Check whether loc is >= to the
6686 table_size, not >.
6687 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
6688 (tables_generate): do it, since that's also it which allocates
6689 them.
6690 Don't free LA and LArule, main does.
6691
c6f1a33c
AD
66922002-07-31 Akim Demaille <akim@epita.fr>
6693
6694 Separate parser tables computation and output.
6695
6696 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
6697 (conflict_list, conflict_list_cnt, table, check, table_ninf)
6698 (yydefgoto, yydefact, high): Move to...
6699 * src/tables.h, src/tables.c: here.
6700 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
6701 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
6702 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
6703 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
6704 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
6705 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
6706 (action_row, save_row, token_actions, save_column, default_goto)
6707 (goto_actions, sort_actions, matching_state, pack_vector)
6708 (table_ninf_remap, pack_table, prepare_actions): Move to...
6709 * src/tables.c: here.
6710 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
6711 * src/output.c (token_actions, output_base, output_conflicts)
6712 (output_check): Merge into...
6713 (prepare_actions): this.
6714 (actions_output): Rename as...
6715 (user_actions_output): this.
6716 * src/main.c (main): Call tables_generate and tables_free.
6717
1509d42f
AD
67182002-07-31 Akim Demaille <akim@epita.fr>
6719
6720 Steal GCC's --time-report support.
6721
6722 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
6723 stolen/adjusted from GCC.
6724 * m4/stage.m4: Remove time related checks.
6725 * m4/timevar.m4: New.
6726 * configure.in: Adjust.
6727 * src/system.h: Adjust to using timevar.h.
6728 * src/getargs.h, src/getargs.c: Support trace_time for
6729 --trace=time.
6730 * src/main.c (stage): Remove.
6731 (main): Replace `stage' invocations with timevar calls.
6732 * src/output.c: Insert pertinent timevar calls.
6733
273a74fa
AD
67342002-07-31 Akim Demaille <akim@epita.fr>
6735
6736 Let --trace have arguments.
6737
6738 * src/getargs.h (enum trace_e): New.
6739 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
6740 (long_options, short_options): --trace/-T takes an optional
6741 argument.
6742 Change all the uses of trace_flag to reflect the new flags.
6743 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
6744
6745 Strengthen `stage' portability.
6746
6747 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
6748 * configure.in: Use it.
6749 Don't check for malloc.h and sys/times.h.
6750 * src/system.h: Include them when appropriate.
6751 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
6752 times and struct tms are available.
6753
217598da
AD
67542002-07-30 Akim Demaille <akim@epita.fr>
6755
6756 In verbose parse error message, don't report `error' as an
6757 expected token.
6758 * tests/actions.at (Printers and Destructors): Adjust.
6759 * tests/calc.at (Calculator $1): Adjust.
6760 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
6761 error message, do not report the parser accepts the error token in
6762 that state.
6763
52489d44
AD
67642002-07-30 Akim Demaille <akim@epita.fr>
6765
6766 Normalize conflict related messages.
6767
6768 * src/complain.h, src/complain.c (warn, complain): New.
6769 * src/conflicts.c (conflicts_print): Use them.
6770 (conflict_report_yacc): New, extracted from...
6771 (conflicts_print): here.
6772 * tests/conflicts.at, tests/existing.at: Adjust.
6773
e8832397
AD
67742002-07-30 Akim Demaille <akim@epita.fr>
6775
6776 Report rules which are never reduced by the parser: those hidden
6777 by conflicts.
6778
6779 * src/LR0.c (save_reductions): Don't make the final state too
6780 different: save its reduction (accept) instead of having a state
6781 without any action (no shift or goto, no reduce).
6782 Note: the final state is now a ``regular'' state, i.e., the
6783 parsers now contain `reduce 0' as default reduction.
6784 Nevertheless, since they decide to `accept' when yystate =
6785 final_state, they still will not reduce rule 0.
6786 * src/print.c (print_actions, print_reduction): Adjust.
6787 * src/output.c (action_row): Track reduced rules.
6788 (token_actions): Report rules never reduced.
6789 * tests/conflicts.at, tests/regression.at: Adjust.
6790
caf23d24
AD
67912002-07-30 Akim Demaille <akim@epita.fr>
6792
6793 `stage' was accidently included in a previous patch.
6794 Initiate its autoconfiscation.
6795
6796 * configure.in: Look for malloc.h and sys/times.h.
6797 * src/main.c (stage): Adjust.
6798 Report only when trace_flag.
6799
640748ee
AD
68002002-07-29 Akim Demaille <akim@epita.fr>
6801
6802 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
6803 state_number_t.
6804 (errs_t): symbol_t*, not symbol_number_t.
6805 (reductions_t): rule_t*, not rule_number_t.
6806 (FOR_EACH_SHIFT): New.
6807 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
6808 * src/print.c, src/print_graph.c: Adjust.
6809
88bce5a2
AD
68102002-07-29 Akim Demaille <akim@epita.fr>
6811
6812 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
6813
6814 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
6815 (endtoken, accept): these.
6816 * src/reader.c (reader): Set endtoken's default tag to "$end".
6817 Set undeftoken's tag to "$undefined" instead of "$undefined.".
6818 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
6819 Adjust.
6820
1bfb97db
AD
68212002-07-29 Akim Demaille <akim@epita.fr>
6822
6823 * src/reduce.c (reduce_grammar): When the language is empty,
6824 complain about the start symbol, not the axiom.
6825 Use its location.
6826 * tests/reduce.at (Empty Language): New.
6827
fc5734fe
AD
68282002-07-26 Akim Demaille <akim@epita.fr>
6829
6830 * src/reader.h, src/reader.c (gram_error): ... can't get
6831 yycontrol without making too strong assumptions on the parser
6832 itself.
6833 * src/output.c (prepare_tokens): Use the real 0th value of
6834 token_translations instead of `0'.
6835 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
6836 visible here.
6837 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
6838 for the time being: %locations ought to provide it to yyerror.
6839
3650b4b8
AD
68402002-07-25 Akim Demaille <akim@epita.fr>
6841
6842 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
6843 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
6844 * tests/regression.at (Web2c Actions): Adjust.
6845
4b3d3a8e
AD
68462002-07-25 Akim Demaille <akim@epita.fr>
6847
6848 Stop storing rules from 1 to nrules + 1.
6849
6850 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
6851 * src/nullable.c, src/output.c, src/print.c, src/reader.c
6852 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
6853 Iterate from 0 to nrules.
6854 Use rule_number_as_item_number and item_number_as_rule_number.
6855 Adjust to `derive' now containing possibly 0.
6856 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
6857 Handle the `- 1' part in rule numbers from/to item numbers.
6858 * src/conflicts.c (log_resolution): Fix the message which reversed
6859 shift and reduce.
6860 * src/output.c (action_row): Initialize default_rule to -1.
6861 (token_actions): Adjust.
6862 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
6863 expected output.
6864 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
6865
4a2a22f4
AD
68662002-07-25 Akim Demaille <akim@epita.fr>
6867
6868 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
6869 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
6870 (b4_c_knr_arg_decl): New.
6871 * data/yacc.c: Use it to define yysymprint, yydestruct, and
6872 yyreport_parse_error.
6873
b8df3223
AD
68742002-07-25 Akim Demaille <akim@epita.fr>
6875
6876 * data/yacc.c (yyreport_parse_error): New, extracted from...
6877 (yyparse): here.
6878 (yydestruct, yysymprint): Move above yyparse.
6879 Be K&R compliant.
6880
a762e609
AD
68812002-07-25 Akim Demaille <akim@epita.fr>
6882
6883 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
6884 replace...
6885 (b4_sint_type, b4_uint_type): these.
6886 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
6887 * tests/regression.at (Web2c Actions): Adjust.
6888
12b0043a
AD
68892002-07-25 Akim Demaille <akim@epita.fr>
6890
6891 * src/gram.h (TIEM_NUMBER_MAX): New.
6892 (item_number_of_rule_number, rule_number_of_item_number): Rename
6893 as...
6894 (rule_number_as_item_number, item_number_as_rule_number): these.
6895 Adjust dependencies.
6896 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
6897 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
6898 (symbol_number_to_vector_number): New.
6899 (order): Of vector_number_t* type.
6900 (base_t, BASE_MAX, BASE_MIN): New.
6901 (froms, tos, width, pos, check): Of base_t type.
6902 (action_number_t, ACTION_MIN, ACTION_MAX): New.
6903 (actrow): Of action_number_t type.
6904 (conflrow): Of unsigned int type.
6905 (table_ninf, base_ninf): New.
6906 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
6907 (muscle_insert_int_table, muscle_insert_base_table)
6908 (muscle_insert_rule_number_table): New.
6909 (prepare_tokens): Output `toknum' as int_table.
6910 (action_row): Returns a rule_number_t.
6911 Use ACTION_MIN, not SHRT_MIN.
6912 (token_actions): yydefact is rule_number_t*.
6913 (table_ninf_remap): New.
6914 (pack_table): Use it for `base' and `table'.
6915 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
6916 replaced with...
6917 (YYPACT_NINF, YYTABLE_NINF): these.
6918 (yypact, yytable): Compute their types instead of hard-coded
6919 `short'.
6920 * tests/regression.at (Web2c Actions): Adjust.
6921
5dde258a
AD
69222002-07-19 Akim Demaille <akim@epita.fr>
6923
6924 * src/scan-gram.l (id): Can start with an underscore.
6925
a945ec39
AD
69262002-07-16 Akim Demaille <akim@epita.fr>
6927
6928 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
6929 Adjust all former `associativity' dependencies.
6930 * src/symtab.c (symbol_new): Default associativity is `undef', not
6931 `right'.
6932 (symbol_check_alias_consistence): Adjust.
6933
fae437e8
AD
69342002-07-09 Akim Demaille <akim@epita.fr>
6935
6936 * doc/bison.texinfo: Properly set the ``header'' part.
6937 Use @dircategory ``GNU programming tools'' as per Texinfo's
6938 documentation.
6939 Use @copying.
6940
1a715ef2
AD
69412002-07-09 Akim Demaille <akim@epita.fr>
6942
6943 * lib/quotearg.h: Protect against multiple inclusions.
6944 * src/location.h (location_t): Add a `file' member.
6945 (LOCATION_RESET, LOCATION_PRINT): Adjust.
6946 * src/complain.c (warn_at, complain_at, fatal_at): Drop
6947 `error_one_per_line' support.
6948
a5d50994
AD
69492002-07-09 Akim Demaille <akim@epita.fr>
6950
6951 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
6952 * src/reader.c (lineno): Remove.
6953 Adjust all dependencies.
6954 (get_merge_function): Take a location and use complain_at.
6955 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
6956 * tests/regression.at (Invalid inputs, Mixing %token styles):
6957 Adjust.
6958
b275314e
AD
69592002-07-09 Akim Demaille <akim@epita.fr>
6960
6961 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
6962 recovery rule, and forbid extensions when --yacc.
6963 (gram_error): Use complain_at.
6964 * src/reader.c (reader): Exit if there were parse errors.
6965
865b9df1
AD
69662002-07-09 Akim Demaille <akim@epita.fr>
6967
6968 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
6969 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
6970 Reported by R Blake <blakers@mac.com>.
6971
c76e14da
AD
69722002-07-09 Akim Demaille <akim@epita.fr>
6973
6974 * data/yacc.c: Output the copyright notive in the header.
6975
7db2ed2d
AD
69762002-07-03 Akim Demaille <akim@epita.fr>
6977
6978 * src/output.c (froms, tos): Are state_number_t.
6979 (save_column): sp, sp1, and sp2 are state_number_t.
6980 (prepare): Rename `final' as `final_state_number', `nnts' as
6981 `nterms_number', `nrules' as `rules_number', `nstates' as
6982 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
6983 unused.
6984 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
6985 * data/lalr1.cc (nsym_): Remove, unused.
6986
e68e0410
AD
69872002-07-03 Akim Demaille <akim@epita.fr>
6988
6989 * src/lalr.h, src/lalr.c (goto_number_t): New.
6990 * src/lalr.c (goto_list_t): New.
6991 Propagate them.
6992 * src/nullable.c (rule_list_t): New.
6993 Propagate.
6994 * src/types.h: Remove.
6995
e1a4f3a4
AD
69962002-07-03 Akim Demaille <akim@epita.fr>
6997
6998 * src/closure.c (print_fderives): Use rule_rhs_print.
6999 * src/derives.c (print_derives): Use rule_rhs_print.
7000 (rule_list_t): New, replaces `shorts'.
7001 (set_derives): Add comments.
7002 * tests/sets.at (Nullable, Firsts): Adjust.
7003
536545f3
AD
70042002-07-03 Akim Demaille <akim@epita.fr>
7005
7006 * src/output.c (prepare_actions): Free `tally' and `width'.
7007 (prepare_actions): Allocate and free `order'.
7008 * src/symtab.c (symbols_free): Free `symbols'.
7009 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
7010 * src/output.c (m4_invoke): Move to...
7011 * src/scan-skel.l: here.
7012 (<<EOF>>): Close yyout, and free its name.
7013
8b752b00
AD
70142002-07-03 Akim Demaille <akim@epita.fr>
7015
7016 Fix some memory leaks, and fix a bug: state 0 was examined twice.
7017
7018 * src/LR0.c (new_state): Merge into...
7019 (state_list_append): this.
7020 (new_states): Merge into...
7021 (generate_states): here.
7022 (set_states): Don't ensure a proper `errs' state member here, do it...
7023 * src/conflicts.c (conflicts_solve): here.
7024 * src/state.h, src/state.c: Comment changes.
7025 (state_t): Rename member `shifts' as `transitions'.
7026 Adjust all dependencies.
7027 (errs_new): For consistency, also take the values as argument.
7028 (errs_dup): Remove.
7029 (state_errs_set): New.
7030 (state_reductions_set, state_transitions_set): Assert that no
7031 previous value was assigned.
7032 (state_free): New.
7033 (states_free): Use it.
7034 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
7035 temporary storage: use `errs' and `nerrs' as elsewhere.
7036 (set_conflicts): Allocate and free this `errs'.
7037
613f5e1a
AD
70382002-07-02 Akim Demaille <akim@epita.fr>
7039
7040 * lib/libiberty.h: New.
7041 * lib: Update the bitset implementation from upstream.
7042 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
7043 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
7044 * src/main.c: Adjust bitset stats calls.
7045
26e0cadc
PE
70462002-07-01 Paul Eggert <eggert@twinsun.com>
7047
7048 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
7049 char, so that negative chars don't collide with $.
7050
1154cced
AD
70512002-06-30 Akim Demaille <akim@epita.fr>
7052
7053 Have the GLR tests be `warning' checked, and fix the warnings.
7054
7055 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
7056 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
7057 (yyremoveDeletes): `yyi' and `yyj' are size_t.
7058 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
7059 (yyaddDeferredAction): static.
7060 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
7061 (yyreportParseError): yyprefix is const.
7062 yytokenp is used only when verbose.
7063 (yy__GNUC__): Replace with __GNUC__.
7064 (yypdumpstack): yyi is size_t.
7065 (yypreference): Un-yy local variables and arguments, to avoid
7066 clashes with `yyr1'. Anyway, we are not in the user name space.
7067 (yytname_size): be an int, as is compared with ints.
7068 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
7069 Use them.
7070 * tests/cxx-gram.at: Use quotation to protect $1.
7071 Use AT_COMPILE to enable warnings hunts.
7072 Prototype yylex and yyerror.
7073 `Use' argc.
7074 Include `string.h', not `strings.h'.
7075 Produce and prototype stmtMerge only when used.
7076 yylex takes a location.
7077
97650f4e
AD
70782002-06-30 Akim Demaille <akim@epita.fr>
7079
7080 We spend a lot of time in quotearg, in particular when --verbose.
7081
7082 * src/symtab.c (symbol_get): Store a quoted version of the key.
7083 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
7084 Adjust all callers.
7085
d2576365
AD
70862002-06-30 Akim Demaille <akim@epita.fr>
7087
7088 * src/state.h (reductions_t): Rename member `nreds' as num.
7089 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
7090 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
7091
ccaf65bc
AD
70922002-06-30 Akim Demaille <akim@epita.fr>
7093
7094 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
7095 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
7096 (shifts_to): Rename as...
7097 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
7098 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
7099 (TRANSITION_IS_DISABLED, transitions_to): these.
7100
87675353
AD
71012002-06-30 Akim Demaille <akim@epita.fr>
7102
7103 * src/print.c (print_shifts, print_gotos): Merge into...
7104 (print_transitions): this.
7105 (print_transitions, print_errs, print_reductions): Align the
7106 lookaheads columns.
7107 (print_core, print_transitions, print_errs, print_state,
7108 print_grammar): Output empty lines separator before, not after.
7109 (state_default_rule_compute): Rename as...
7110 (state_default_rule): this.
7111 * tests/conflicts.at (Defaulted Conflicted Reduction),
7112 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
7113 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
7114
ce4ccb4b
AD
71152002-06-30 Akim Demaille <akim@epita.fr>
7116
7117 Display items as we display rules.
7118
7119 * src/gram.h, src/gram.c (rule_lhs_print): New.
7120 * src/gram.c (grammar_rules_partial_print): Use it.
7121 * src/print.c (print_core): Likewise.
7122 * tests/conflicts.at (Defaulted Conflicted Reduction),
7123 (Unresolved SR Conflicts): Adjust.
7124 (Unresolved SR Conflicts): Adjust and rename as...
7125 (Resolved SR Conflicts): this, as was meant.
7126 * tests/regression.at (Web2c Report): Adjust.
7127
bc933ef1
AD
71282002-06-30 Akim Demaille <akim@epita.fr>
7129
7130 * src/print.c (state_default_rule_compute): New, extracted from...
7131 (print_reductions): here.
7132 Pessimize, but clarify the code.
7133 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
7134
53d4308d
AD
71352002-06-30 Akim Demaille <akim@epita.fr>
7136
7137 * src/output.c (action_row): Let default_rule be always a rule
7138 number.
7139
574fb2d5
AD
71402002-06-30 Akim Demaille <akim@epita.fr>
7141
7142 * src/closure.c (print_firsts, print_fderives, closure):
7143 Use BITSET_EXECUTE.
7144 * src/lalr.c (lookaheads_print): Likewise.
7145 * src/state.c (state_rule_lookaheads_print): Likewise.
7146 * src/print_graph.c (print_core): Likewise.
7147 * src/print.c (print_reductions): Likewise.
7148 * src/output.c (action_row): Likewise.
7149 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
7150
05811fd7
AD
71512002-06-30 Akim Demaille <akim@epita.fr>
7152
7153 * src/print_graph.c: Use report_flag.
7154
0e4d5753
AD
71552002-06-30 Akim Demaille <akim@epita.fr>
7156
7157 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
7158 to...
7159 * src/relation.h, src/relation.c (traverse, relation_digraph)
7160 (relation_print, relation_transpose): New.
7161
24c7d800
AD
71622002-06-30 Akim Demaille <akim@epita.fr>
7163
7164 * src/state.h, src/state.c (shifts_to): New.
7165 * src/lalr.c (build_relations): Use it.
7166
9222837b
AD
71672002-06-30 Akim Demaille <akim@epita.fr>
7168
7169 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
7170 (item_number_of_rule_number, rule_number_of_item_number): New.
7171 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
7172 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
7173 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
7174 Propagate their use.
7175 Much remains to be done, in particular wrt `shorts' from types.h.
7176
260008e5
AD
71772002-06-30 Akim Demaille <akim@epita.fr>
7178
7179 * src/symtab.c (symbol_new): Initialize the `printer' member.
7180
8a731ca8
AD
71812002-06-30 Akim Demaille <akim@epita.fr>
7182
7183 * src/LR0.c (save_reductions): Remove, replaced by...
7184 * src/state.h, src/state.c (state_reductions_set): New.
7185 (reductions, errs): Rename as...
7186 (reductions_t, errs_t): these.
7187 Adjust all dependencies.
7188
32e1e0a4
AD
71892002-06-30 Akim Demaille <akim@epita.fr>
7190
7191 * src/LR0.c (state_list_t, state_list_append): New.
7192 (first_state, last_state): Now symbol_list_t.
7193 (this_state): Remove.
7194 (new_itemsets, append_states, save_reductions): Take a state_t as
7195 argument.
7196 (set_states, generate_states): Adjust.
7197 (save_shifts): Remove, replaced by...
7198 * src/state.h, src/state.c (state_shifts_set): New.
7199 (shifts): Rename as...
7200 (shifts_t): this.
7201 Adjust all dependencies.
7202 * src/state.h (state_t): Remove the `next' member.
7203
e5fb6710
AD
72042002-06-30 Akim Demaille <akim@epita.fr>
7205
7206 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
7207 escaped in slot 0.
7208
c7ca99d4
AD
72092002-06-30 Akim Demaille <akim@epita.fr>
7210
7211 Use hash.h for the state hash table.
7212
7213 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
7214 (allocate_storage): Use state_hash_new.
7215 (free_storage): Use state_hash_free.
7216 (new_state, get_state): Adjust.
7217 * src/lalr.h, src/lalr.c (states): Move to...
7218 * src/states.h (state_t): Remove the `link' member, no longer
7219 used.
7220 * src/states.h, src/states.c: here.
7221 (state_hash_new, state_hash_free, state_hash_lookup)
7222 (state_hash_insert, states_free): New.
7223 * src/states.c (state_table, state_compare, state_hash): New.
7224 * src/output.c (output_actions): Do not free states now, since we
7225 still need to know the final_state number in `prepare', called
7226 afterwards. Do it...
7227 * src/main.c (main): here: call states_free after `output'.
7228
df0e7316
AD
72292002-06-30 Akim Demaille <akim@epita.fr>
7230
7231 * src/state.h, src/state.c (state_new): New, extracted from...
7232 * src/LR0.c (new_state): here.
7233 * src/state.h (STATE_ALLOC): Move to...
7234 * src/state.c: here.
7235 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
7236 * src/state.h, src/state.c: here.
7237
39f41916
AD
72382002-06-30 Akim Demaille <akim@epita.fr>
7239
7240 * src/reader.c (gensym): Rename as...
7241 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
7242 (getsym): Rename as...
7243 (symbol_get): this.
7244
d57650a5
AD
72452002-06-30 Akim Demaille <akim@epita.fr>
7246
7247 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
7248 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
7249 * src/output.c, src/print.c, src/print_graph.c: Propagate.
7250 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
7251
5a08f1ce
AD
72522002-06-30 Akim Demaille <akim@epita.fr>
7253
7254 Make the test suite pass with warnings checked.
7255
7256 * tests/actions.at (Printers and Destructors): Improve.
7257 Avoid unsigned vs. signed issues.
7258 * tests/calc.at: Don't exercise the scanner here, do it...
7259 * tests/input.at (Torturing the Scanner): here.
7260
720623af
PH
72612002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7262
88e7e941 7263 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
720623af
PH
7264 reorganize first lines parallel to yacc.c.
7265
fb8135fa
AD
72662002-06-28 Akim Demaille <akim@epita.fr>
7267
7268 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
7269 (b4_token_enum, b4_token_defines): New, factored from...
7270 * data/lalr1.cc, data/yacc.c, glr.c: here.
7271
41442480
AD
72722002-06-28 Akim Demaille <akim@epita.fr>
7273
7274 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
7275 unused variables.
7276 * src/output.c (merger_output): static.
7277
e0e5bf84
AD
72782002-06-28 Akim Demaille <akim@epita.fr>
7279
ba0fe3c7 7280 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
e0e5bf84
AD
7281 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
7282 pacify GCC.
7283 * src/output.c (save_row): Initialize all the variables to pacify GCC.
e0e5bf84 7284
676385e2
PH
72852002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7286
7287 Accumulated changelog for new GLR parsing features.
7288
6a254321 7289 * src/conflicts.c (count_total_conflicts): Change name to
676385e2
PH
7290 conflicts_total_count.
7291 * src/conflicts.h: Ditto.
7292 * src/output.c (token_actions): Use the new name.
7293 (output_conflicts): Change conflp => conflict_list_heads, and
7294 confl => conflict_list for better readability.
7295 * data/glr.c: Use the new names.
7296 * NEWS: Add self to GLR announcement.
e0e5bf84 7297
676385e2
PH
7298 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
7299
7300 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
7301 Akim Demaille.
7302
7303 * data/bison.glr: Change name to glr.c
7304 * data/glr.c: Renamed from bison.glr.
7305 * data/Makefile.am: Add glr.c
e0e5bf84
AD
7306
7307 * src/getargs.c:
7308
676385e2 7309 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
ba0fe3c7 7310 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
e0e5bf84 7311
676385e2
PH
7312 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7313
7314 * data/bison.glr: Be sure to restore the
7315 current #line when returning to the skeleton contents after having
7316 exposed the input file's #line.
7317
7318 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7319
7320 * data/bison.glr: Bring up to date with changes to bison.simple.
7321
7322 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7323
7324 * data/bison.glr: Correct definitions that use b4_prefix.
7325 Various reformatting.
7326 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
7327 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
7328 yytokenp argument; now part of stack.
7329 (yychar): Define to behave as documented.
7330 (yyclearin): Ditto.
e0e5bf84 7331
676385e2
PH
7332 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7333
7334 * src/reader.h: Add declaration for free_merger_functions.
7335
7336 * src/reader.c (merge_functions): New variable.
7337 (get_merge_function): New function.
7338 (free_merger_functions): New function.
7339 (readgram): Check for %prec that is not followed by a symbol.
7340 Handle %dprec and %merge declarations.
7341 (packgram): Initialize dprec and merger fields in rules array.
7342
7343 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
7344 conflict_list_cnt, conflict_list_free): New variables.
7345 (table_grow): Also grow conflict_table.
e0e5bf84 7346 (prepare_rules): Output dprec and merger tables.
676385e2 7347 (conflict_row): New function.
e0e5bf84 7348 (action_row): Output conflict lists for GLR parser. Don't use
676385e2
PH
7349 default reduction in conflicted states for GLR parser so that there
7350 are spaces for the conflict lists.
7351 (save_row): Also save conflict information.
7352 (token_actions): Allocate conflict list.
7353 (merger_output): New function.
7354 (pack_vector): Pack conflict table, too.
7355 (output_conflicts): New function to output yyconflp and yyconfl.
7356 (output_check): Allocate conflict_tos.
7357 (output_actions): Output conflict tables, also.
7358 (output_skeleton): Output b4_mergers definition.
7359 (prepare): Output b4_max_rhs_length definition.
7360 Use 'bison.glr' as default skeleton for GLR parsers.
7361
7362 * src/gram.c (glr_parser): New flag.
7363 (grammar_free): Call free_merger_functions.
7364
7365 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
7366 all pairs of conflicting reductions, rather than just all tokens
7367 causing conflicts. Needed to size conflict tables.
e0e5bf84 7368 (conflicts_output): Modify call to count_rr_conflicts for new
676385e2
PH
7369 interface.
7370 (conflicts_print): Ditto.
7371 (count_total_conflicts): New function.
7372
7373 * src/reader.h (merger_list): New type.
7374 (merge_functions): New variable.
7375
7376 * src/lex.h (tok_dprec, tok_merge): New token types.
7377
7378 * src/gram.h (rule_s): Add dprec and merger fields.
7379 (glr_parser): New flag.
7380
7381 * src/conflicts.h (count_total_conflicts): New function.
7382
7383 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
7384
7385 * doc/bison.texinfo (Generalized LR Parsing): New section.
7386 (GLR Parsers): New section.
7387 (Language and Grammar): Mention GLR parsing.
7388 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
7389 Correct typo ("tge" -> "the").
7390
7391 * data/bison.glr: New skeleton for GLR parsing.
7392
7393 * tests/cxx-gram.at: New tests for GLR parsing.
7394
7395 * tests/testsuite.at: Include cxx-gram.at.
7396
7397 * tests/Makefile.am: Add cxx-gram.at.
e0e5bf84 7398
676385e2
PH
7399 * src/parse-gram.y:
7400
7401 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
7402
7403 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
e0e5bf84 7404
b5480d74 74052002-06-27 Akim Demaille <akim@epita.fr>
e2aaf4c4
AD
7406
7407 * src/options.h, src/options.c: Remove.
7408 * src/getargs.c (short_options, long_options): New.
7409
60491a94
AD
74102002-06-27 Akim Demaille <akim@epita.fr>
7411
7412 * data/bison.simple, data/bison.c++: Rename as...
7413 * data/yacc.c, data/lalr1.cc: these.
7414 * doc/bison.texinfo (Environment Variables): Remove.
7415
9be0c25b
AD
74162002-06-25 Raja R Harinath <harinath@cs.umn.edu>
7417
7418 * src/getargs.c (report_argmatch): Initialize strtok().
7419
1ae72863
AD
74202002-06-20 Akim Demaille <akim@epita.fr>
7421
7422 * data/bison.simple (b4_symbol_actions): New, replaces...
7423 (b4_symbol_destructor, b4_symbol_printer): these.
7424 (yysymprint): Be sure to call YYPRINT only for tokens, and using
7425 user token numbers.
7426
87542d29
AD
74272002-06-20 Akim Demaille <akim@epita.fr>
7428
7429 * data/bison.simple (yydestructor): Rename as...
7430 (yydestruct): this.
7431
1a31ed21
AD
74322002-06-20 Akim Demaille <akim@epita.fr>
7433
7434 * src/symtab.h, src/symtab.c (symbol_type_set)
7435 (symbol_destructor_set, symbol_precedence_set): The location is
7436 the last argument.
7437 Adjust all callers.
7438
e776192e
AD
74392002-06-20 Akim Demaille <akim@epita.fr>
7440
7441 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
7442 internals.
7443 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
7444 Takes a location.
7445 * src/symtab.h, src/symtab.c (symbol_class_set)
7446 (symbol_user_token_number_set): Likewise.
7447 Adjust all callers.
7448 Promote complain_at.
7449 * tests/input.at (Type Clashes): Adjust.
7450
5c1180b3
AD
74512002-06-20 Akim Demaille <akim@epita.fr>
7452
7453 * data/bison.simple (YYLEX): Fix the declaration when
7454 %pure-parser.
7455
e3170060
AD
74562002-06-20 Akim Demaille <akim@epita.fr>
7457
7458 * data/bison.simple (yysymprint): Don't print the token number,
7459 just its name.
7460 * tests/actions.at (Destructors): Rename as...
7461 (Printers and Destructors): this.
7462 Also exercise %printer.
7463
253862fd
AD
74642002-06-20 Akim Demaille <akim@epita.fr>
7465
7466 * data/bison.simple (YYDSYMPRINT): New.
7467 Use it to remove many of the #if YYDEBUG/if (yydebug).
7468
366eea36
AD
74692002-06-20 Akim Demaille <akim@epita.fr>
7470
7471 * src/symtab.h, src/symtab.c (symbol_t): printer and
7472 printer_location are new members.
7473 (symbol_printer_set): New.
7474 * src/parse-gram.y (PERCENT_PRINTER): New token.
7475 Handle its associated rule.
7476 * src/scan-gram.l: Adjust.
7477 (handle_destructor_at, handle_destructor_dollar): Rename as...
7478 (handle_symbol_code_at, handle_symbol_code_dollar): these.
7479 * src/output.c (symbol_printers_output): New.
7480 (output_skeleton): Call it.
7481 * data/bison.simple (yysymprint): New. Cannot be named yyprint
7482 since there are already many grammar files with a user `yyprint'.
7483 Replace the calls to YYPRINT to calls to yysymprint.
7484 * tests/calc.at: Adjust.
7485 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
7486 taking advantage of parser very internal details (stack size!).
7487
4f25ebb0
AD
74882002-06-20 Akim Demaille <akim@epita.fr>
7489
7490 * src/scan-gram.l: Complete the scanner with the missing patterns
7491 to pacify Flex.
7492 Use `quote' and `symbol_tag_get' where appropriate.
7493
93b68a0e
AD
74942002-06-19 Akim Demaille <akim@epita.fr>
7495
7496 * tests/actions.at (Destructors): Augment to test locations.
7497 * data/bison.simple (yydestructor): Pass it the current location
7498 if locations are enabled.
7499 Prototype only when __STDC__ or C++.
7500 Change the argument names to move into the yy name space: there is
7501 user code here.
7502
58612f1d
AD
75032002-06-19 Akim Demaille <akim@epita.fr>
7504
74310291
AD
7505 * data/bison.simple (b4_pure_if): New.
7506 Use it instead of #ifdef YYPURE.
7507
75082002-06-19 Akim Demaille <akim@epita.fr>
7509
7510 * data/bison.simple (b4_location_if): New.
58612f1d
AD
7511 Use it instead of #ifdef YYLSP_NEEDED.
7512
f25bfb75
AD
75132002-06-19 Akim Demaille <akim@epita.fr>
7514
7515 Prepare @$ in %destructor, but currently don't bind it in the
7516 skeleton, as %location use is not cleaned up yet.
7517
7518 * src/scan-gram.l (handle_dollar, handle_destructor_at)
7519 (handle_action_at): New.
7520 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
7521 a braced_code_t and a location as additional arguments.
7522 (handle_destructor_dollar): Instead of requiring `b4_eval', just
7523 unquote one when outputting `b4_dollar_dollar'.
7524 Adjust callers.
7525 * data/bison.simple (b4_eval): Remove.
7526 (b4_symbol_destructor): Adjust.
7527 * tests/input.at (Invalid @n): Adjust.
7528
c732d2c6
AD
75292002-06-19 Zack Weinberg <zack@codesourcery.com>
7530
7531 * doc/bison.texinfo: Document ability to have multiple
7532 prologue sections.
7533
8c165d89
AD
75342002-06-18 Akim Demaille <akim@epita.fr>
7535
7536 * src/files.c (compute_base_names): When computing the output file
7537 names from the input file name, strip the directory part.
7538
ca98bf57
AD
75392002-06-18 Akim Demaille <akim@epita.fr>
7540
7541 * data/bison.simple.new: Comment changes.
7542 Reported by Andreas Schwab.
7543
0bfb02ff
AD
75442002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
7545
7546 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
7547 there are no `label `yyoverflowlab' defined but not used' warnings
7548 when yyoverflow is defined.
7549
24c0aad7
AD
75502002-06-18 Akim Demaille <akim@epita.fr>
7551
7552 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
7553 new member.
7554 (symbol_destructor_set): Adjust.
7555 * src/output.c (symbol_destructors_output): Output the destructor
7556 locations.
7557 Output the symbol name.
7558 * data/bison.simple (b4_symbol_destructor): Adjust.
7559
5719c109
AD
75602002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
7561 and Akim Demaille <akim@epita.fr>
7562
7563 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
7564 what's left on the stack when the error recovery hits EOF.
7565 * tests/actions.at (Destructors): Complete to exercise this case.
7566
9280d3ef
AD
75672002-06-17 Akim Demaille <akim@epita.fr>
7568
7569 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
7570 arguments is really empty, not only equal to `[]'.
7571 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
7572 member.
7573 (symbol_destructor_set): New.
7574 * src/output.c (symbol_destructors_output): New.
7575 * src/reader.h (brace_code_t, current_braced_code): New.
7576 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
7577 (handle_dollar): Rename as...
7578 (handle_action_dollar): this.
7579 (handle_destructor_dollar): New.
7580 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
7581 (grammar_declaration): Use it.
7582 * data/bison.simple (yystos): Is always defined.
7583 (yydestructor): New.
7584 * tests/actions.at (Destructors): New.
7585 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
7586
dafdc66f
AD
75872002-06-17 Akim Demaille <akim@epita.fr>
7588
7589 * src/symlist.h, src/symlist.c (symbol_list_length): New.
7590 * src/scan-gram.l (handle_dollar, handle_at): Compute the
7591 rule_length only when needed.
7592 * src/output.c (actions_output, token_definitions_output): Output
7593 the full M4 block.
7594 * src/symtab.c: Don't access directly to the symbol tag, use
7595 symbol_tag_get.
7596 * src/parse-gram.y: Use symbol_list_free.
7597
56c47203
AD
75982002-06-17 Akim Demaille <akim@epita.fr>
7599
7600 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
7601 (symbol_list_prepend, get_type_name): Move to...
7602 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
7603 (symbol_list_prepend, symbol_list_n_type_name_get): here.
7604 Adjust all callers.
7605 (symbol_list_free): New.
7606 * src/scan-gram.l (handle_dollar): Takes a location.
7607 * tests/input.at (Invalid $n): Adjust.
7608
1e0bab92
AD
76092002-06-17 Akim Demaille <akim@epita.fr>
7610
7611 * src/reader.h, src/reader.c (symbol_list_new): Export it.
7612 (symbol_list_prepend): New.
7613 * src/parse-gram.y (%union): `list' is a new member.
7614 (symbols.1): New, replaces...
7615 (terms_to_prec.1, nterms_to_type.1): these.
7616 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
7617 Take a location as additional argument.
7618 Adjust all callers.
7619
04e60654
AD
76202002-06-15 Akim Demaille <akim@epita.fr>
7621
7622 * src/parse-gram.y: Move %token in the declaration section so that
7623 we don't depend upon CVS Bison.
7624
10e5b8bd
AD
76252002-06-15 Akim Demaille <akim@epita.fr>
7626
7627 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
7628 * src/print.c (print_core): Use it.
7629
9801d40c
AD
76302002-06-15 Akim Demaille <akim@epita.fr>
7631
7632 * src/conflicts.c (log_resolution): Accept the rule involved in
7633 the sr conflicts instead of the lookahead number that points to
7634 that rule.
7635 (flush_reduce): Accept the current lookahead vector as argument,
7636 instead of the index in LA.
7637 (resolve_sr_conflict): Accept the current number of lookahead
7638 bitset to consider for the STATE, instead of the index in LA.
7639 (set_conflicts): Adjust.
7640 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
7641
c0263492
AD
76422002-06-15 Akim Demaille <akim@epita.fr>
7643
7644 * src/state.h (state_t): Replace the `lookaheadsp' member, a
7645 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
7646 Adjust all dependencies.
7647 * src/lalr.c (initialize_lookaheads): Split into...
7648 (states_lookaheads_count, states_lookaheads_initialize): these.
7649 (lalr): Adjust.
7650
9757c359
AD
76512002-06-15 Akim Demaille <akim@epita.fr>
7652
7653 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
7654 out of...
7655 (grammar_rules_print): here.
7656 * src/reduce.c (reduce_output): Use it.
7657 * tests/reduce.at (Useless Rules, Reduced Automaton)
7658 (Underivable Rules): Adjust.
7659
6b98e4b5
AD
76602002-06-15 Akim Demaille <akim@epita.fr>
7661
7662 Copy BYacc's nice way to report the grammar.
7663
7664 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
7665 New.
7666 Don't print the rules' location, it is confusing and useless.
7667 (rule_print): Use grammar_rhs_print.
7668 * src/print.c (print_grammar): Use grammar_rules_print.
7669
6b98e4b5
AD
76702002-06-15 Akim Demaille <akim@epita.fr>
7671
7672 Complete and rationalize `useless thing' warnings.
7673
7674 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
7675 (symbol_tag_print): New.
7676 Use them everywhere in place of accessing directly the tag member.
7677 * src/gram.h, src/gram.c (rule_print): New.
7678 Use it where a rule used to be printed `by hand'.
7679 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
7680 (reduce_grammar_tables): Report the useless rules.
7681 (reduce_print): Useless things are a warning, not an error.
7682 Report it as such.
7683 * tests/reduce.at (Useless Nonterminals, Useless Rules):
7684 (Reduced Automaton, Underivable Rules): Adjust.
7685 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
7686 * tests/conflicts.at (Unresolved SR Conflicts)
7687 (Solved SR Conflicts): Adjust.
7688
ee000ba4
AD
76892002-06-15 Akim Demaille <akim@epita.fr>
7690
7691 Let symbols have a location.
7692
7693 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
7694 (getsym): Adjust.
7695 Adjust all callers.
7696 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
7697 Use location_t, not int.
7698 * src/symtab.c (symbol_check_defined): Take advantage of the
7699 location.
7700 * tests/regression.at (Invalid inputs): Adjust.
7701
8efe435c
AD
77022002-06-15 Akim Demaille <akim@epita.fr>
7703
7704 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
7705 (input): Don't try to initialize yylloc here, do it in the
7706 scanner.
7707 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
7708 * src/gram.h (rule_t): Change line and action_line into location
7709 and action_location, of location_t type.
7710 Adjust all dependencies.
7711 * src/location.h, src/location.c (empty_location): New.
7712 * src/reader.h, src/reader.c (grammar_start_symbol_set)
7713 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
7714 (grammar_current_rule_symbol_append)
7715 (grammar_current_rule_action_append): Expect a location as argument.
7716 * src/reader.c (grammar_midrule_action): Adjust to attach an
7717 action's location as dummy symbol location.
7718 * src/symtab.h, src/symtab.c (startsymbol_location): New.
7719 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
7720 the line numbers.
7721
1921f1d7
AD
77222002-06-14 Akim Demaille <akim@epita.fr>
7723
7724 Grammar declarations may be found in the grammar section.
7725
7726 * src/parse-gram.y (rules_or_grammar_declaration): New.
7727 (declarations): Each declaration may end with a semicolon, not
7728 just...
7729 (grammar_declaration): `"%union"'.
7730 (grammar): Branch to rules_or_grammar_declaration.
7731
4515534c
AD
77322002-06-14 Akim Demaille <akim@epita.fr>
7733
7734 * src/main.c (main): Invoke scanner_free.
7735
f958596b
AD
77362002-06-14 Akim Demaille <akim@epita.fr>
7737
7738 * src/output.c (m4_invoke): Extracted from...
7739 (output_skeleton): here.
7740 Free tempfile.
7741
2c569025
AD
77422002-06-14 Akim Demaille <akim@epita.fr>
7743
7744 * src/parse-gram.y (directives, directive, gram)
7745 (grammar_directives, precedence_directives, precedence_directive):
7746 Rename as...
7747 (declarations, declaration, grammar, grammar_declaration)
7748 (precedence_declaration, precedence_declarator): these.
7749 (symbol_declaration): New.
7750
592e8d4d
AD
77512002-06-14 Akim Demaille <akim@epita.fr>
7752
7753 * src/files.c (action_obstack): Remove, unused.
7754 (output_obstack): Remove it, and all its dependencies, as it is no
7755 longer needed.
7756 * src/reader.c (epilogue_set): Build the epilogue in the
7757 muscle_obstack.
7758 * src/output.h, src/output.c (muscle_obstack): Move to...
7759 * src/muscle_tab.h, src/muscle_tab.h: here.
7760 (muscle_init): Initialize muscle_obstack.
7761 (muscle_free): New.
7762 * src/main.c (main): Call it.
7763
0c15323d
AD
77642002-06-14 Akim Demaille <akim@epita.fr>
7765
7766 * src/location.h: New, extracted from...
7767 * src/reader.h: here.
7768 * src/Makefile.am (noinst_HEADERS): Merge into
7769 (bison_SOURCES): this.
7770 Add location.h.
7771 * src/parse-gram.y: Use location_t instead of Bison's.
7772 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
7773 Use location_t instead of ints.
7774
e96c9728
AD
77752002-06-14 Akim Demaille <akim@epita.fr>
7776
7777 * data/bison.simple, data/bison.c++: Be sure to restore the
7778 current #line when returning to the skeleton contents after having
7779 exposed the input file's #line.
7780
75d1fe16
AD
77812002-06-12 Akim Demaille <akim@epita.fr>
7782
7783 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
7784 eager.
7785 * tests/actions.at (Exotic Dollars): New.
7786
6c35d22c
AD
77872002-06-12 Akim Demaille <akim@epita.fr>
7788
7789 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
7790 ['"/] too eagerly.
7791 * tests/input.at (Torturing the Scanner): New.
7792
1d6412ad
AD
77932002-06-11 Akim Demaille <akim@epita.fr>
7794
7795 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
7796 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
7797 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
7798 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
7799 * src/reader.c (reader): Use it.
7800
4cdb01db
AD
78012002-06-11 Akim Demaille <akim@epita.fr>
7802
7803 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
7804 Adjust all callers.
7805 (scanner_last_string_free): New.
7806
44995b2e
AD
78072002-06-11 Akim Demaille <akim@epita.fr>
7808
7809 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
7810 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
7811 (last_string, YY_OBS_FREE): New.
7812 Use them when returning an ID.
7813
e9955c83
AD
78142002-06-11 Akim Demaille <akim@epita.fr>
7815
7816 Have Bison grammars parsed by a Bison grammar.
7817
7818 * src/reader.c, src/reader.h (prologue_augment): New.
7819 * src/reader.c (copy_definition): Remove.
7820
7821 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
7822 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
7823 (grammar_current_rule_prec_set, grammar_current_rule_check)
7824 (grammar_current_rule_symbol_append)
7825 (grammar_current_rule_action_append): Export.
7826 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
7827 (symbol_list_action_append): Remove.
7828 Hook the routines from reader.
7829 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
7830 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
7831
7832 * src/reader.c (read_declarations): Remove, unused.
7833
7834 * src/parse-gram.y: Handle the epilogue.
7835 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
7836 (grammar_start_symbol_set): this.
7837 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
7838 * src/reader.c (readgram): Remove, unused.
7839 (reader): Adjust to insert eoftoken and axiom where appropriate.
7840
7841 * src/reader.c (copy_dollar): Replace with...
7842 * src/scan-gram.h (handle_dollar): this.
7843 * src/parse-gram.y: Remove `%thong'.
7844
7845 * src/reader.c (copy_at): Replace with...
7846 * src/scan-gram.h (handle_at): this.
7847
7848 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
7849 New.
7850
7851 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
7852 time being.
7853
7854 * src/reader.h, src/reader.c (grammar_rule_end): New.
7855
7856 * src/parse.y (current_type, current_class): New.
7857 Implement `%nterm', `%token' support.
7858 Merge `%term' into `%token'.
7859 (string_as_id): New.
7860 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
7861 type name.
7862
7863 * src/parse-gram.y: Be sure to handle properly the beginning of
7864 rules.
7865
7866 * src/parse-gram.y: Handle %type.
7867 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
7868
7869 * src/parse-gram.y: More directives support.
7870 * src/options.c: No longer handle source directives.
7871
7872 * src/parse-gram.y: Fix %output.
7873
7874 * src/parse-gram.y: Handle %union.
7875 Use the prologue locations.
7876 * src/reader.c (parse_union_decl): Remove.
7877
7878 * src/reader.h, src/reader.c (epilogue_set): New.
7879 * src/parse-gram.y: Use it.
7880
7881 * data/bison.simple, data/bison.c++: b4_stype is now either not
7882 defined, then default to int, or to the contents of %union,
7883 without `union' itself.
7884 Adjust.
7885 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
7886
7887 * src/output.c (actions_output): Don't output braces, as they are
7888 already handled by the scanner.
7889
7890 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
7891 characters to themselves.
7892
7893 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
7894 that the epilogue has a proper #line.
7895
7896 * src/parse-gram.y: Handle precedence/associativity.
7897
7898 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
7899 a terminal.
7900 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
7901 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
7902 at all to define terminals that cannot be emitted.
7903
7904 * src/scan-gram.l: Escape M4 characters.
7905
7906 * src/scan-gram.l: Working properly with escapes in user
7907 strings/characters.
7908
7909 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
7910 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
7911 grammar.
7912 Use more modest sizes, as for the time being the parser does not
7913 release memory, and therefore the process swallows a huge amount
7914 of memory.
7915
7916 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
7917 stricter %token grammar.
7918
7919 * src/symtab.h (associativity): Add `undef_assoc'.
7920 (symbol_precedence_set): Do nothing when passed an undef_assoc.
7921 * src/symtab.c (symbol_check_alias_consistence): Adjust.
7922
7923 * tests/regression.at (Invalid %directive): Remove, as it is now
7924 meaningless.
7925 (Invalid inputs): Adjust to the new error messages.
7926 (Token definitions): The new grammar doesn't allow too many
7927 eccentricities.
7928
7929 * src/lex.h, src/lex.c: Remove.
7930 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
7931 (copy_character, copy_string2, copy_string, copy_identifier)
7932 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
7933 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
7934 (parse_action): Remove.
7935 * po/POTFILES.in: Adjust.
7936
2e047461
AD
79372002-06-11 Akim Demaille <akim@epita.fr>
7938
cd05d13c 7939 * src/reader.c (parse_action): Don't store directly into the
2e047461
AD
7940 rule's action member: return the action as a string.
7941 Don't require `rule_length' as an argument: compute it.
7942 (grammar_current_rule_symbol_append)
7943 (grammar_current_rule_action_append): New, eved out from
7944 (readgram): here.
7945 Remove `action_flag', `rulelength', unused now.
7946
9af3fbce
AD
79472002-06-11 Akim Demaille <akim@epita.fr>
7948
7949 * src/reader.c (grammar_current_rule_prec_set).
7950 (grammar_current_rule_check): New, eved out from...
7951 (readgram): here.
7952 Remove `xaction', `first_rhs': useless.
7953 * tests/input.at (Type clashes): New.
7954 * tests/existing.at (GNU Cim Grammar): Adjust.
7955
1485e106
AD
79562002-06-11 Akim Demaille <akim@epita.fr>
7957
7958 * src/reader.c (grammar_midrule_action): New, Eved out from
7959 (readgram): here.
7960
da4160c3
AD
79612002-06-11 Akim Demaille <akim@epita.fr>
7962
7963 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
7964 New.
7965 (readgram): Use them as replacement of inlined code, crule and
7966 crule1.
7967
f6d0f937
AD
79682002-06-11 Akim Demaille <akim@epita.fr>
7969
7970 * src/reader.c (grammar_end, grammar_symbol_append): New.
7971 (readgram): Use them.
7972 Make the use of `p' as local as possible.
7973
69078d4b
AD
79742002-06-10 Akim Demaille <akim@epita.fr>
7975
7976 GCJ's parser requires the tokens to be defined before the prologue.
7977
7978 * data/bison.simple: Output the token definition before the user's
7979 prologue.
7980 * tests/regression.at (Braces parsing, Duplicate string)
7981 (Mixing %token styles): Check the output from bison.
7982 (Early token definitions): New.
7983
5e424082
AD
79842002-06-10 Akim Demaille <akim@epita.fr>
7985
7986 * src/symtab.c (symbol_user_token_number_set): Don't complain when
7987 assigning twice the same user number to a token, so that we can
7988 use it in...
7989 * src/lex.c (lex): here.
7990 Also use `symbol_class_set' instead of hand written code.
7991 * src/reader.c (parse_assoc_decl): Likewise.
7992
44536b35
AD
79932002-06-10 Akim Demaille <akim@epita.fr>
7994
7995 * src/symtab.c, src/symtab.c (symbol_class_set)
7996 (symbol_user_token_number_set): New.
7997 * src/reader.c (parse_token_decl): Use them.
7998 Use a switch instead of ifs.
7999 Use a single argument.
8000
8b9f2372
AD
80012002-06-10 Akim Demaille <akim@epita.fr>
8002
8003 Remove `%thong' support as it is undocumented, unused, duplicates
8004 `%token's job, and creates useless e-mail traffic with people who
8005 want to know what it is, why it is undocumented, unused, and
8006 duplicates `%token's job.
8007
8008 * src/reader.c (parse_thong_decl): Remove.
8009 * src/options.c (option_table): Remove "thong".
8010 * src/lex.h (tok_thong): Remove.
8011
3ae2b51f
AD
80122002-06-10 Akim Demaille <akim@epita.fr>
8013
8014 * src/symtab.c, src/symtab.c (symbol_type_set)
8015 (symbol_precedence_set): New.
8016 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
8017 (value_components_used): Remove, unused.
8018
2f1afb73
AD
80192002-06-09 Akim Demaille <akim@epita.fr>
8020
8021 Move symbols handling code out of the reader.
8022
8023 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
8024 (axiom): Move to...
8025 * src/symtab.h, src/symtab.c: here.
8026
8027 * src/gram.c (start_symbol): Remove: use startsymbol->number.
8028 * src/reader.c (startval): Rename as...
8029 * src/symtab.h, src/symtab.c (startsymbol): this.
8030 * src/reader.c: Adjust.
8031
8032 * src/reader.c (symbol_check_defined, symbol_make_alias)
8033 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
8034 (token_translations_init)
8035 Move to...
8036 * src/symtab.c: here.
8037 * src/reader.c (packsymbols): Move to...
8038 * src/symtab.h, src/symtab.c (symbols_pack): here.
8039 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
8040 argument.
8041
e9bca3ad
AD
80422002-06-03 Akim Demaille <akim@epita.fr>
8043
8044 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
8045 then statements.
8046
86eff183
AD
80472002-06-03 Akim Demaille <akim@epita.fr>
8048
8049 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
8050 structs with non literals.
8051 * src/scan-skel.l: never-interactive.
8052 * src/conflicts.c (enum conflict_resolution_e): No trailing
8053 comma.
8054 * src/getargs.c (usage): Split long literal strings.
8055 Reported by Hans Aberg.
8056
717be197
AD
80572002-05-28 Akim Demaille <akim@epita.fr>
8058
8059 * data/bison.c++: Use C++ ostreams.
8060 (cdebug_): New member.
8061
670ddffd
AD
80622002-05-28 Akim Demaille <akim@epita.fr>
8063
8064 * src/output.c (output_skeleton): Be sure to allocate enough room
8065 for `/' _and_ for `\0' in full_skeleton.
8066
769b430f
AD
80672002-05-28 Akim Demaille <akim@epita.fr>
8068
8069 * data/bison.c++: Catch up with bison.simple:
8070 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8071 and Paul Eggert <eggert@twinsun.com>: `error' handing.
8072 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
8073 and popping traces.
8074
7067cb36
PH
80752002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8076
8077 * src/output.c (output_skeleton): Put an explicit path in front of
8078 the skeleton file name, rather than relying on the -I directory,
8079 to partially alleviate effects of having a skeleton file lying around
8080 in the current directory.
769b430f 8081
4a713ec2
PH
80822002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8083
769b430f 8084 * src/conflicts.c (log_resolution): Correct typo:
4a713ec2
PH
8085 obstack_printf should be obstack_fgrow1.
8086
b408954b
AD
80872002-05-26 Akim Demaille <akim@epita.fr>
8088
8089 * src/state.h (state_t): `solved_conflicts' is a new member.
8090 * src/LR0.c (new_state): Set it to 0.
8091 * src/conflicts.h, src/conflicts.c (print_conflicts)
8092 (free_conflicts, solve_conflicts): Rename as...
8093 (conflicts_print, conflicts_free, conflicts_solve): these.
8094 Adjust callers.
8095 * src/conflicts.c (enum conflict_resolution_e)
8096 (solved_conflicts_obstack): New, used by...
8097 (log_resolution): this.
8098 Adjust to attach the conflict resolution to each state.
8099 Complete the description with the precedence/associativity
8100 information.
8101 (resolve_sr_conflict): Adjust.
8102 * src/print.c (print_state): Output its solved_conflicts.
8103 * tests/conflicts.at (Unresolved SR Conflicts)
8104 (Solved SR Conflicts): Exercise --report=all.
8105
a49aecd5
AD
81062002-05-26 Akim Demaille <akim@epita.fr>
8107
8108 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
8109 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
8110 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
8111 (token_number_t, item_number_as_token_number)
8112 (token_number_as_item_number, muscle_insert_token_number_table):
8113 Rename as...
8114 (symbol_number_t, item_number_as_symbol_number)
8115 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
8116 these, since it is more appropriate.
8117
5504898e
AD
81182002-05-26 Akim Demaille <akim@epita.fr>
8119
8120 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
8121 `Error:' lines.
8122 * data/bison.simple (yystos) [YYDEBUG]: New.
8123 (yyparse) [YYDEBUG]: Display the symbols which are popped during
8124 error recovery.
8125 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
8126
ec3bc396
AD
81272002-05-25 Akim Demaille <akim@epita.fr>
8128
8129 * doc/bison.texinfo (Debugging): Split into...
8130 (Tracing): this new section, its former contents, and...
8131 (Understanding): this new section.
8132 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
8133 by...
8134 (report_flag): this.
8135 Adjust all dependencies.
8136 (report_args, report_types, report_argmatch): New.
8137 (usage, getargs): Report/support -r, --report.
8138 * src/options.h
8139 (struct option_table_struct): Rename as..,
8140 (struct option_table_s): this.
8141 Rename the `set_flag' member to `flag' to match with getopt_long's
8142 struct.
8143 * src/options.c (option_table): Split verbose into an entry for
8144 %verbose, and another for --verbose.
8145 Support --report/-r, so remove -r from the obsolete --raw.
8146 * src/print.c: Attach full item sets and lookaheads reports to
8147 report_flag instead of trace_flag.
8148 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
8149
78df8250
PE
81502002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8151 and Paul Eggert <eggert@twinsun.com>
769b430f 8152
78df8250
PE
8153 * data/bison.simple (yyparse): Correct error handling to conform to
8154 POSIX and yacc. Specifically, after syntax error is discovered,
8155 do not reduce further before shifting the error token.
8156 Clean up the code a bit by removing the labels yyerrdefault,
8157 yyerrhandle, yyerrpop.
8158 * NEWS: Document the above.
8159
c0c9ea05
PH
81602002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8161
8162 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
8163 type; it isn't always big enough, since it doesn't necessarily
8164 include non-terminals.
769b430f 8165 (yytranslate): Expand definition of yy_token_number_type, so that
c0c9ea05
PH
8166 the latter can be removed.
8167 (yy_token_number_type): Remove, only one use.
8168 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
8169 don't use TokenNumberType as element type.
769b430f 8170
c0c9ea05
PH
8171 * tests/regression.at: Modify expected output to agree with change
8172 to yyr1 and yytranslate.
769b430f 8173
6390a83f
FK
81742002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
8175
8176 * src/reader.c (parse_action): Use copy_character instead of
8177 obstack_1grow.
8178
db7c8e9a
AD
81792002-05-13 Akim Demaille <akim@epita.fr>
8180
8181 * tests/regression.at (Token definitions): Prototype yylex and
8182 yyerror.
8183
fcc61800
PH
81842002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8185
158c687b 8186 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
fcc61800
PH
8187 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
8188 32-bit arithmetic.
8189 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
8190
5683e9b2
AD
81912002-05-07 Akim Demaille <akim@epita.fr>
8192
8193 * tests/synclines.at: Be sure to prototype yylex and yyerror to
8194 avoid GCC warnings.
8195
0c2d3f4c
AD
81962002-05-07 Akim Demaille <akim@epita.fr>
8197
8198 Kill GCC warnings.
8199
8200 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
8201 over the RHS of each rule.
8202 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
8203 * src/state.h (state_t): Member `nitems' is unsigned short.
8204 * src/LR0.c (get_state): Adjust.
8205 * src/reader.c (packgram): Likewise.
8206 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
8207 `Type'.
8208 (muscle_insert_int_table): Remove, unused.
8209 (prepare_rules): Remove `max'.
8210
1565b720
AD
82112002-05-06 Akim Demaille <akim@epita.fr>
8212
8213 * src/closure.c (print_firsts): Display of the symbol tags.
8214 (bitmatrix_print): Move to...
8215 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
8216 here.
8217 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
8218
cfaee611
AD
82192002-05-06 Akim Demaille <akim@epita.fr>
8220
8221 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
8222 hash_do_for_each.
8223
458be8e0
AD
82242002-05-06 Akim Demaille <akim@epita.fr>
8225
8226 * src/LR0.c (new_state, get_state): Instead of using the global
8227 `kernel_size' and `kernel_base', have two new arguments:
8228 `core_size' and `core'.
8229 Adjust callers.
8230
a900a624
AD
82312002-05-06 Akim Demaille <akim@epita.fr>
8232
8233 * src/reader.c (packgram): No longer end `ritem' with a 0
8234 sentinel: it is not used.
8235
d4e7d3a1
AD
82362002-05-05 Akim Demaille <akim@epita.fr>
8237
8238 New experimental feature: display the lookaheads in the report and
8239 graph.
8240
8241 * src/print (print_core): When --trace-flag, display the rules
8242 lookaheads.
8243 * src/print_graph.c (print_core): Likewise.
8244 Swap the arguments.
8245 Adjust caller.
8246
39ceb25b
AD
82472002-05-05 Akim Demaille <akim@epita.fr>
8248
8249 * tests/torture.at (Many lookaheads): New test.
8250
5372019f
AD
82512002-05-05 Akim Demaille <akim@epita.fr>
8252
8253 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
8254 (GENERATE_MUSCLE_INSERT_TABLE): this.
8255 (output_int_table, output_unsigned_int_table, output_short_table)
8256 (output_token_number_table, output_item_number_table): Replace with...
8257 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
8258 (muscle_insert_short_table, muscle_insert_token_number_table)
8259 (muscle_insert_item_number_table): these.
8260 Adjust all callers.
8261 (prepare_tokens): Don't free `translations', since...
8262 * src/reader.h, src/reader.c (grammar_free): do it.
8263 Move to...
8264 * src/gram.h, src/gram.c (grammar_free): here.
8265 * data/bison.simple, data/bison.c++: b4_token_number_max is now
8266 b4_translate_max.
8267
5df5f6d5
AD
82682002-05-05 Akim Demaille <akim@epita.fr>
8269
8270 * src/output.c (output_unsigned_int_table): New.
8271 (prepare_rules): `i' is unsigned.
8272 `prhs', `rline', `r2' are unsigned int.
8273 Rename muscle `rhs_number_max' as `rhs_max'.
8274 Output muscles `prhs_max', `rline_max', and `r2_max'.
8275 Free rline and r1.
8276 * data/bison.simple, data/bison.c++: Adjust to use these muscles
8277 to compute types instead of constant types.
8278 * tests/regression.at (Web2c Actions): Adjust.
8279
b87f8b21
AD
82802002-05-04 Akim Demaille <akim@epita.fr>
8281
8282 * src/symtab.h (SALIAS, SUNDEF): Rename as...
8283 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
8284 Adjust dependencies.
8285 * src/output.c (token_definitions_output): Be sure not to output a
8286 `#define 'a'' when fed with `%token 'a' "a"'.
8287 * tests/regression.at (Token definitions): New.
8288
8bb936e4
PE
82892002-05-03 Paul Eggert <eggert@twinsun.com>
8290
8291 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
8292 for K&R C.
8293
82942002-05-03 gettextize <bug-gnu-gettext@gnu.org>
8295
8296 * Makefile.am (SUBDIRS): Remove intl.
8297 (EXTRA_DIST): Add config/config.rpath.
8298
53c71a12
AD
82992002-05-03 Akim Demaille <akim@epita.fr>
8300
8301 * data/bison.simple (m4_if): Don't output empty enums.
8302 And actually, output valid enum definitions :(.
8303
289dd0cf
AD
83042002-05-03 Akim Demaille <akim@epita.fr>
8305
8306 * configure.bat: Remove, completely obsolete.
8307 * Makefile.am (EXTRA_DIST): Adjust.
8308 Don't distribute config.rpath...
8309 * config/Makefile.am (EXTRA_DIST): Do it.
8310
db85e524
AD
83112002-05-03 Akim Demaille <akim@epita.fr>
8312
8313 * configure.in (GETTEXT_VERSION): New.
8314 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
8315
83ccf991
AD
83162002-05-03 Akim Demaille <akim@epita.fr>
8317
8318 * data/bison.simple (b4_token_enum): New.
8319 (b4_token_defines): Use it to output tokens both as #define and
8320 enums.
8321 Suggested by Paul Eggert.
8322 * src/output.c (token_definitions_output): Don't output spurious
8323 white spaces.
8324
1f418995
AD
83252002-05-03 Akim Demaille <akim@epita.fr>
8326
8327 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
8328
45119f04
RA
83292002-05-02 Robert Anisko <robert@lrde.epita.fr>
8330
8331 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
8332 Update the stack class, give a try to deque as the default container.
8333
b2d52318
AD
83342002-05-02 Akim Demaille <akim@epita.fr>
8335
8336 * data/bison.simple (yyparse): Do not implement @$ = @1.
8337 (YYLLOC_DEFAULT): Adjust to do it.
8338 * doc/bison.texinfo (Location Default Action): Fix.
8339
3a8b4109
AD
83402002-05-02 Akim Demaille <akim@epita.fr>
8341
8342 * src/reader.c (parse_braces): Merge into...
8343 (parse_action): this.
8344
84614e13
AD
83452002-05-02 Akim Demaille <akim@epita.fr>
8346
8347 * configure.in (ALL_LINGUAS): Remove.
8348 * po/LINGUAS, hr.po: New.
8349
fdbcd8e2
AD
83502002-05-02 Akim Demaille <akim@epita.fr>
8351
8352 Remove the so called hairy (semantic) parsers.
8353
8354 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
8355 * src/gram.h, src/gram.c (semantic_parser): Remove.
8356 (rule_t): Remove the guard and guard_line members.
8357 * src/lex.h (token_t): remove tok_guard.
8358 * src/options.c (option_table): Remove %guard and %semantic_parser
8359 support.
8360 * src/output.c, src/output.h (guards_output): Remove.
8361 (prepare): Adjust.
8362 (token_definitions_output): Don't output the `T'
8363 tokens (???).
8364 (output_skeleton): Don't output the guards.
8365 * src/files.c, src/files.c (attrsfile): Remove.
8366 * src/reader.c (symbol_list): Remove the guard and guard_line
8367 members.
8368 Adjust dependencies.
8369 (parse_guard): Remove.
8370 * data/bison.hairy: Remove.
8371 * doc/bison.texinfo (Environment Variables): Remove occurrences of
8372 BISON_HAIRY.
8373
82b6cb3f
AD
83742002-05-02 Akim Demaille <akim@epita.fr>
8375
8376 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
8377 (parse_guard): Rename the formal argument `stack_offset' as
8378 `rule_length', which is more readable.
8379 Adjust callers.
8380 (copy_at, copy_dollar): Instead of outputting the hard coded
8381 values of $$, $n and so forth, output invocation to b4_lhs_value,
8382 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
8383 Note: this patch partially drops `semantic-parser' support: it
8384 always does `rule_length - n', where semantic parsers ought to
8385 always use `-n'.
82b6cb3f
AD
8386 * data/bison.simple, data/bison.c++ (b4_lhs_value)
8387 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
8388
6cbfbcc5
AD
83892002-05-02 Akim Demaille <akim@epita.fr>
8390
8391 * configure.in (AC_INIT): Bump to 1.49b.
8392 (AM_INIT_AUTOMAKE): Short invocation.
8393
b8548114
AD
83942002-05-02 Akim Demaille <akim@epita.fr>
8395
8396 Version 1.49a.
8397
c20cd1fa
AD
83982002-05-01 Akim Demaille <akim@epita.fr>
8399
8400 * src/skeleton.h: Remove.
8401
8a9566d4
AD
84022002-05-01 Akim Demaille <akim@epita.fr>
8403
8404 * src/skeleton.h: Fix the #endif.
8405 Reported by Magnus Fromreide.
8406
8c6d399a
PE
84072002-04-26 Paul Eggert <eggert@twinsun.com>
8408
8409 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
8410 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 8411 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 8412
2b7ed18a
RA
84132002-04-25 Robert Anisko <robert@lrde.epita.fr>
8414
8415 * src/scan-skel.l: Postprocess quadrigraphs.
8416
8417 * src/reader.c (copy_character): New function, used to output
8418 single characters while replacing `[' and `]' with quadrigraphs, to
8419 avoid troubles with M4 quotes.
8420 (copy_comment): Output characters with copy_character.
8421 (read_additionnal_code): Likewise.
8422 (copy_string2): Likewise.
8423 (copy_definition): Likewise.
8424
8425 * tests/calc.at: Exercise M4 quoting.
8426
34a89c50
AD
84272002-04-25 Akim Demaille <akim@epita.fr>
8428
8429 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
8430 between `!' and the command.
8431 Reported by Paul Eggert.
8432
0dd1580a
RA
84332002-04-24 Robert Anisko <robert@lrde.epita.fr>
8434
8435 * tests/calc.at: Exercise prologue splitting.
8436
8437 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
8438 `b4_post_prologue' instead of `b4_prologue'.
8439
8440 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
8441 muscles.
8442 (output): Free pre_prologue_obstack and post_prologue_obstack.
8443 * src/files.h, src/files.c (attrs_obstack): Remove.
8444 (pre_prologue_obstack, post_prologue_obstack): New.
8445 * src/reader.c (copy_definition): Add a parameter to specify the
8446 obstack to fill, instead of using attrs_obstack unconditionally.
8447 (read_declarations): Pass pre_prologue_obstack to copy_definition if
8448 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
8449
83c1796f
PE
84502002-04-23 Paul Eggert <eggert@twinsun.com>
8451
8452 * data/bison.simple: Remove unnecessary commentary and white
8453 space differences from 1_29-branch.
8454 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
8455
8456 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
8457 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
8458 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
8459 constructors or destructors.
8460
8461 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
8462
1207eeac
AD
84632002-04-23 Akim Demaille <akim@epita.fr>
8464
8465 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
8466 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
8467 location with columns.
8468 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
8469 All reported by Paul Eggert.
8470
78ab8f67
AD
84712002-04-22 Akim Demaille <akim@epita.fr>
8472
8473 * src/reduce.c (dump_grammar): Move to...
8474 * src/gram.h, src/gram.c (grammar_dump): here.
8475 Be sure to separate long item numbers.
8476 Don't read the members of a rule's prec if its nil.
8477
133c20e2
AD
84782002-04-22 Akim Demaille <akim@epita.fr>
8479
8480 * src/output.c (table_size, table_grow): New.
8481 (MAXTABLE): Remove, replace uses with table_size.
8482 (pack_vector): Instead of dying when the table is too big, grow it.
8483
9515e8a7
AD
84842002-04-22 Akim Demaille <akim@epita.fr>
8485
8486 * data/bison.simple (yyr1): Its type is that of a token number.
8487 * data/bison.c++ (r1_): Likewise.
8488 * tests/regression.at (Web2c Actions): Adjust.
8489
23c5a174
AD
84902002-04-22 Akim Demaille <akim@epita.fr>
8491
8492 * src/reader.c (token_translations_init): 256 is now the default
8493 value for the error token, i.e., it will be assigned another
8494 number if the user assigned 256 to one of her tokens.
8495 (reader): Don't force 256 to error.
8496 * doc/bison.texinfo (Symbols): Adjust.
8497 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
8498 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
8499 etc. instead of 10, 20, 30 (which was used to `jump' over error
8500 (256) and undefined (2)).
8501
5fbb0954
AD
85022002-04-22 Akim Demaille <akim@epita.fr>
8503
8504 Propagate more token_number_t.
8505
8506 * src/gram.h (token_number_as_item_number)
8507 (item_number_as_token_number): New.
8508 * src/output.c (GENERATE_OUTPUT_TABLE): New.
8509 Use it to create output_item_number_table and
8510 output_token_number_table.
8511 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
8512 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
8513 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
8514 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
8515
4f940944
AD
85162002-04-22 Akim Demaille <akim@epita.fr>
8517
8518 * src/output.h, src/output.c (get_lines_number): Remove.
8519
3ded9a63
AD
85202002-04-19 Akim Demaille <akim@epita.fr>
8521
8522 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
8523 as Lex/Flex'.
8524 (Debugging): More details about enabling the debugging features.
8525 (Table of Symbols): Describe $$, $n, @$, and @n.
8526 Suggested by Tim Josling.
8527
e0c471a9
AD
85282002-04-19 Akim Demaille <akim@epita.fr>
8529
8530 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
8531
fecc10cd
AD
85322002-04-10 Akim Demaille <akim@epita.fr>
8533
8534 * src/system.h: Rely on HAVE_LIMITS_H.
8535 Suggested by Paul Eggert.
8536
51dec47b
AD
85372002-04-09 Akim Demaille <akim@epita.fr>
8538
8539 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
8540 full stderr, and strip it according to the bison options, instead
8541 of composing the error message from different bits.
8542 This makes it easier to check for several error messages.
8543 Adjust all the invocations.
8544 Add an invocation exercising the error token.
8545 Add an invocation demonstrating a stupid error message.
8546 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
8547 Adjust the tests.
8548 Error message are for stderr, not stdout.
8549
007a50a4
AD
85502002-04-09 Akim Demaille <akim@epita.fr>
8551
8552 * src/gram.h, src/gram.c (error_token_number): Remove, use
8553 errtoken->number.
8554 * src/reader.c (reader): Don't specify the user token number (2)
8555 for $undefined, as it uselessly prevents using it.
8556 * src/gram.h (token_number_t): Move to...
8557 * src/symtab.h: here.
8558 (state_t.number): Is a token_number_t.
8559 * src/print.c, src/reader.c: Use undeftoken->number instead of
8560 hard coded 2.
8561 (Even though this 2 is not the same as above: the number of the
8562 undeftoken remains being 2, it is its user token number which
8563 might not be 2).
8564 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
8565 `user_token_number_max'.
8566 Output `undef_token_number'.
8567 * data/bison.simple, data/bison.c++: Use them.
8568 Be sure to map invalid yylex return values to
8569 `undef_token_number'. This saves us from gratuitous SEGV.
8570
8571 * tests/conflicts.at (Solved SR Conflicts)
8572 (Unresolved SR Conflicts): Adjust.
8573 * tests/regression.at (Web2c Actions): Adjust.
8574
06446ccf
AD
85752002-04-08 Akim Demaille <akim@epita.fr>
8576
8577 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
8578 Adding #line.
8579 Remove the duplicate `typedefs'.
8580 (RhsNumberType): Fix the declaration and various other typos.
8581 Use __ofile__.
8582 * data/bison.simple: Use __ofile__.
8583 * src/scan-skel.l: Handle __ofile__.
8584
62a3e4f0
AD
85852002-04-08 Akim Demaille <akim@epita.fr>
8586
8587 * src/gram.h (item_number_t): New, the type of item numbers in
8588 RITEM. Note that it must be able to code symbol numbers as
8589 positive number, and the negation of rule numbers as negative
8590 numbers.
8591 Adjust all dependencies (pretty many).
8592 * src/reduce.c (rule): Remove this `short *' pointer: use
8593 item_number_t.
8594 * src/system.h (MINSHORT, MAXSHORT): Remove.
8595 Include `limits.h'.
8596 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
8597 (shortcpy): Remove.
8598 (MAXTABLE): Move to...
8599 * src/output.c (MAXTABLE): here.
8600 (prepare_rules): Use output_int_table to output rhs.
8601 * data/bison.simple, data/bison.c++: Adjust.
8602 * tests/torture.at (Big triangle): Move the limit from 254 to
8603 500.
8604 * tests/regression.at (Web2c Actions): Ajust.
8605
8606 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
8607 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
8608 passes, but produces negative #line number, once fixed, GCC is
8609 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
8610 C), it passes.
8611 * src/state.h (state_h): Code input lines on ints, not shorts.
8612
bb88b0fc
AD
86132002-04-08 Akim Demaille <akim@epita.fr>
8614
8615 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
8616 and then the grammar.
8617
9a636f47
AD
86182002-04-08 Akim Demaille <akim@epita.fr>
8619
8620 * src/system.h: No longer using strndup.
8621
680e8701
AD
86222002-04-07 Akim Demaille <akim@epita.fr>
8623
8624 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
8625 * src/output.c (output_table_data): Return the longest number.
8626 (prepare_tokens): Output `token_number_max').
8627 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
8628 New.
8629 Use them to define yy_token_number_type/TokenNumberType.
8630 Use this type for yytranslate.
8631 * tests/torture.at (Big triangle): Push the limit from 124 to
8632 253.
8633 * tests/regression.at (Web2c Actions): Adjust.
8634
817e9f41
AD
86352002-04-07 Akim Demaille <akim@epita.fr>
8636
8637 * tests/torture.at (Big triangle): New.
8638 (GNU AWK Grammar, GNU Cim Grammar): Move to...
8639 * tests/existing.at: here.
8640
5123689b
AD
86412002-04-07 Akim Demaille <akim@epita.fr>
8642
8643 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
8644 nritems.
8645 Adjust dependencies.
8646
f3849179
AD
86472002-04-07 Akim Demaille <akim@epita.fr>
8648
8649 * src/reader.c: Normalize increments to prefix form.
8650
bd02036a
AD
86512002-04-07 Akim Demaille <akim@epita.fr>
8652
8653 * src/reader.c, symtab.c: Remove debugging code.
8654
db8837cb
AD
86552002-04-07 Akim Demaille <akim@epita.fr>
8656
8657 Rename all the `bucket's as `symbol_t'.
8658
8659 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
8660 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
8661 * src/symtab.c, src/symtab.h (bucket): Rename as...
8662 (symbol_t): this.
8663 (symbol_list_new, bucket_check_defined, bucket_make_alias)
8664 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
8665 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
8666 (buckets_new, buckets_free, buckets_do): Rename as...
8667 (symbol_list_new, symbol_check_defined, symbol_make_alias)
8668 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
8669 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
8670 (symbols_new, symbols_free, symbols_do): these.
8671
72a23c97
AD
86722002-04-07 Akim Demaille <akim@epita.fr>
8673
8674 Use lib/hash for the symbol table.
8675
8676 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
8677 EOF.
8678 * src/lex.c (lex): Set the `number' member of new terminals.
8679 * src/reader.c (bucket_check_defined, bucket_make_alias)
8680 (bucket_check_alias_consistence, bucket_translation): New.
8681 (reader, grammar_free, readgram, token_translations_init)
8682 (packsymbols): Adjust.
8683 (reader): Number the predefined tokens.
8684 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
8685 for predefined tokens.
8686 * src/symtab.h (bucket): Remove all the hash table related
8687 members.
8688 * src/symtab.c (symtab): Replace by...
8689 (bucket_table): this.
8690 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
8691 (buckets_new, buckets_do): New.
8692
280a38c3
AD
86932002-04-07 Akim Demaille <akim@epita.fr>
8694
8695 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
8696 (start_symbol, max_user_token_number, semantic_parser)
8697 (error_token_number): Initialize.
8698 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
8699 Initialize.
8700 (reader): Don't.
8701 (errtoken, eoftoken, undeftoken, axiom): Extern.
8702
03b31c0c
AD
87032002-04-07 Akim Demaille <akim@epita.fr>
8704
8705 * src/gram.h (rule_s): prec and precsym are now pointers
8706 to the bucket giving the priority/associativity.
8707 Member `associativity' removed: useless.
8708 * src/reduce.c, src/conflicts.c: Adjust.
8709
8b3df748
AD
87102002-04-07 Akim Demaille <akim@epita.fr>
8711
8712 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
8713 Properly escape the symbols' TAG when outputting them.
8714
e601aa1d
AD
87152002-04-07 Akim Demaille <akim@epita.fr>
8716
8717 * src/lalr.h (LA): Is a bitsetv, not bitset*.
8718
b0299a2e
AD
87192002-04-07 Akim Demaille <akim@epita.fr>
8720
8721 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
8722 (LArule): this, which is an array to rule_t*.
8723 * src/print.c, src/conflicts.c: Adjust.
8724
d7e1f00c
AD
87252002-04-07 Akim Demaille <akim@epita.fr>
8726
8727 * src/gram.h (rule_t): Rename `number' as `user_number'.
8728 `number' is a new member.
8729 Adjust dependencies.
8730 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
8731
cc9305dd
AD
87322002-04-07 Akim Demaille <akim@epita.fr>
8733
8734 As a result of the previous patch, it is no longer needed
8735 to reorder ritem itself.
8736
8737 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
8738
b0940840
AD
87392002-04-07 Akim Demaille <akim@epita.fr>
8740
8741 Be sure never to walk through RITEMS, but use only data related to
8742 the rules themselves. RITEMS should be banished.
8743
8744 * src/output.c (output_token_translations): Rename as...
8745 (prepare_tokens): this.
8746 In addition to `translate', prepare the muscles `tname' and
8747 `toknum', which were handled by...
8748 (output_rule_data): this.
8749 Remove, and move the remainder of its outputs into...
8750 (prepare_rules): this new routines, which also merges content from
8751 (output_gram): this.
8752 (prepare_rules): Be sure never to walk through RITEMS.
8753 (output_stos): Rename as...
8754 (prepare_stos): this.
8755 (output): Always invoke prepare_states, after all, just don't use it
8756 in the output if you don't need it.
8757
643a5994
AD
87582002-04-07 Akim Demaille <akim@epita.fr>
8759
8760 * src/LR0.c (new_state): Display `nstates' as the name of the
8761 newly created state.
8762 Adjust to initialize first_state and last_state if needed.
8763 Be sure to distinguish the initial from the final state.
8764 (new_states): Create the itemset of the initial state, and use
8765 new_state.
8766 * src/closure.c (closure): Now that the initial state has its
8767 items properly set, there is no need for a special case when
8768 creating `ruleset'.
8769
8770 As a result, now the rule 0, reducing to $axiom, is visible in the
8771 outputs. Adjust the test suite.
8772
8773 * tests/conflicts.at (Solved SR Conflicts)
8774 (Unresolved SR Conflicts): Adjust.
8775 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
8776 * tests/conflicts.at (S/R in initial): New.
8777
b4c4ccc2
AD
87782002-04-07 Akim Demaille <akim@epita.fr>
8779
8780 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
8781 the RHS of the rules.
8782 * src/output.c (output_gram): Likewise.
8783
bba97eb2
AD
87842002-04-07 Akim Demaille <akim@epita.fr>
8785
8786 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
8787 bucket.
8788 Adjust all dependencies.
8789 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
8790 `number' of the buckets too.
8791 * src/gram.h: Include `symtab.h'.
8792 (associativity): Move to...
8793 * src/symtab.h: here.
8794 No longer include `gram.h'.
8795
c3b407f4
AD
87962002-04-07 Akim Demaille <akim@epita.fr>
8797
8798 * src/gram.h, src/gram.c (rules_rhs_length): New.
8799 (ritem_longest_rhs): Use it.
8800 * src/gram.h (rule_t): `number' is a new member.
8801 * src/reader.c (packgram): Set it.
8802 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
8803 the end of `rules', and count them out of `nrules'.
8804 (reduce_output, dump_grammar): Adjust.
8805 * src/print.c (print_grammar): It is no longer needed to check for
8806 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
8807 * tests/reduce.at (Reduced Automaton): New test.
8808
11652ab3
AD
88092002-04-07 Akim Demaille <akim@epita.fr>
8810
8811 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
8812 lacking `+ 1' to nrules, Bison reported as useless a token if it
8813 was used solely to set the precedence of the last rule...
8814
26b23c1a
AD
88152002-04-07 Akim Demaille <akim@epita.fr>
8816
8817 * data/bison.c++, data/bison.simple: Don't output the current file
8818 name in #line, to avoid useless diffs between two identical
8819 outputs under different names.
8820
18bcecb0
AD
88212002-04-07 Akim Demaille <akim@epita.fr>
8822
8823 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
8824 Normalize loops to using `< nrules + 1', not `<= nrules'.
8825
fa770c86
AD
88262002-04-07 Akim Demaille <akim@epita.fr>
8827
8828 * TODO: Update.
8829
d9b739c3
AD
88302002-04-07 Akim Demaille <akim@epita.fr>
8831
8832 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
8833 bucket.value as bucket.number.
8834
99013900
AD
88352002-04-07 Akim Demaille <akim@epita.fr>
8836
8837 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
8838 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
8839 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
8840 RHS, instead of being an index in RITEMS.
8841
e966383b
PE
88422002-04-04 Paul Eggert <eggert@twinsun.com>
8843
8844 * doc/bison.texinfo: Update copyright date.
8845 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
8846 (Symbols): Warn about running Bison in one character set,
8847 but compiling and/or running in an incompatible one.
8848 Warn about character code 256, too.
8849
88502002-04-03 Paul Eggert <eggert@twinsun.com>
8851
8852 * src/bison.data (YYSTACK_ALLOC): Depend on whether
8853 YYERROR_VERBOSE is nonzero, not whether it is defined.
8854
8855 Merge changes from bison-1_29-branch.
c307773e 8856
8d6c48b9
PE
88572002-03-20 Paul Eggert <eggert@twinsun.com>
8858
8859 Merge fixes from Debian bison_1.34-1.diff.
8860
8861 * configure.in (AC_PREREQ): 2.53.
8862
e53c6322
AD
88632002-03-20 Akim Demaille <akim@epita.fr>
8864
8865 * src/conflicts.c (log_resolution): Argument `resolution' is const.
8866
9ffbeca7
PE
88672002-03-19 Paul Eggert <eggert@twinsun.com>
8868
21db0b2a
PE
8869 * src/bison.simple (YYCOPY): New macro.
8870 (YYSTACK_RELOCATE): Use it.
8871 Remove Type arg; no longer needed. All callers changed.
8872 (yymemcpy): Remove; no longer needed.
8873
9ffbeca7
PE
8874 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
8875 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
8876
642cb8f8
AD
88772002-03-19 Akim Demaille <akim@epita.fr>
8878
8879 Test and fix the #line outputs.
8880
8881 * tests/atlocal.at (GCC): New.
8882 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
0ffd4fd1 8883 (Prologue synch line, %union synch line, Postprologue synch line)
642cb8f8
AD
8884 (Action synch line, Epilogue synch line): New tests.
8885 * src/reader.c (parse_union_decl): Define the muscle stype_line.
8886 * data/bison.simple, data/bison.c++: Use it.
8887
3c31a486
AD
88882002-03-19 Akim Demaille <akim@epita.fr>
8889
8890 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
8891 (Solved SR Conflicts, %expect not enough, %expect right)
8892 (%expect too much): Move to...
8893 * tests/conflicts.at: this new file.
8894
0d8bed56
AD
88952002-03-19 Akim Demaille <akim@epita.fr>
8896
8897 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
8898 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
8899 that we can move to enums for instance.
8900 * src/output.c (token_definitions_output): Output a list of
8901 `token-name, token-number' instead of the #define.
8902 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
8903
9208d17f
AD
89042002-03-14 Akim Demaille <akim@epita.fr>
8905
8906 Use Gettext 0.11.1.
8907
af27eacb
RA
89082002-03-09 Robert Anisko <robert@lrde.epita.fr>
8909
8910 * data/bison.c++: Make the user able to add members to the generated
8911 parser by subclassing.
8912
9101a310
RA
89132002-03-05 Robert Anisko <robert@lrde.epita.fr>
8914
8915 * src/reader.c (read_additionnal_code): `c' should be an integer, not
8916 a character.
8917 Reported by Nicolas Tisserand and Nicolas Burrus.
8918
fff9bf0b
RA
89192002-03-04 Robert Anisko <robert@lrde.epita.fr>
8920
8921 * src/reader.c: Warn about lacking semi-colons, do not complain.
8922
64dba31e
RA
89232002-03-04 Robert Anisko <robert@lrde.epita.fr>
8924
8925 * data/bison.c++: Remove a debug line.
8926
374f5a14
RA
89272002-03-04 Robert Anisko <robert@lrde.epita.fr>
8928
8929 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
8930 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
8931 provide a default implementation.
8932
bfcf1f3a
AD
89332002-03-04 Akim Demaille <akim@epita.fr>
8934
8935 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
8936 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
8937 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
8938 * tests/semantic.at (Parsing Guards): Similarly.
8939 * src/reader.at (readgram): Complain if the last rule is not ended
8940 with a semi-colon.
8941
65ccf9fc
AD
89422002-03-04 Akim Demaille <akim@epita.fr>
8943
8944 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
8945 * src/closure.c: here.
8946 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
8947 RTC.
8948 * src/warshall.h, src/warshall.c: Remove.
8949 * tests/sets.at (Broken Closure): Adjust.
8950
d0039cbc
AD
89512002-03-04 Akim Demaille <akim@epita.fr>
8952
8953 * src/output.c (output_skeleton): tempdir is const.
8954 bytes_read is unused.
8955
345cea78
AD
89562002-03-04 Akim Demaille <akim@epita.fr>
8957
8958 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
8959 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
8960 Update.
8961 From Michael Hayes.
8962
564801f7
AD
89632002-03-04 Akim Demaille <akim@epita.fr>
8964
8965 * src/closure.c (closure): `r' is unused.
8966
e5352bc7
AD
89672002-03-04 Akim Demaille <akim@epita.fr>
8968
8969 * tests/sets.at (Broken Closure): Add the ending `;'.
8970 * src/reader.at (readgram): Complain if a rule is not ended with a
8971 semi-colon.
8972
914feea9
AD
89732002-03-04 Akim Demaille <akim@epita.fr>
8974
8975 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
8976 (count_sr_conflicts): Use bitset_count.
8977 * src/reduce.c (inaccessable_symbols): Ditto.
8978 (bits_size): Remove.
8979 * src/warshall.h, src/warshall.c: Convert to bitsetv.
8980
f0250de6
AD
89812002-03-04 Akim Demaille <akim@epita.fr>
8982
8983 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
8984 * src/reduce.c: Remove the `bitset_zero's following the
8985 `bitset_create's, as now it is performed by the latter.
8986
ef017502
AD
89872002-03-04 Akim Demaille <akim@epita.fr>
8988
8989 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
8990 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
8991 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
8992 latest sources from Michael.
8993
76514394
AD
89942002-03-04 Akim Demaille <akim@epita.fr>
8995
8996 * src/output.c (output): Don't free the grammar.
8997 * src/reader.c (grammar_free): New.
8998 * src/main.c (main): Call it and don't free symtab here.
8999
55024580
AD
90002002-03-04 Akim Demaille <akim@epita.fr>
9001
9002 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
9003 before returning.
9004 Reported by Benoit Perrot.
9005
f9abaa2c
AD
90062002-03-04 Akim Demaille <akim@epita.fr>
9007
9008 Use bitset operations when possible, not loops over bits.
9009
9010 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
9011 bitset_or.
9012 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
9013 * src/reduce.c (useless_nonterminals): Formatting changes.
9014 * src/warshall.c (TC): Use bitset_or.
9015
0e721e75
AD
90162002-03-04 Akim Demaille <akim@epita.fr>
9017
9018 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
9019 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
9020 Ditto.
9021
0fb1ffb1
AD
90222002-03-04 Akim Demaille <akim@epita.fr>
9023
9024 * src/lalr.c (F): Now a bitset*.
9025 Adjust all dependencies.
9026
b86796bf
AD
90272002-03-04 Akim Demaille <akim@epita.fr>
9028
9029 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
9030 Adjust all dependencies.
9031
602bbf31
AD
90322002-03-04 Akim Demaille <akim@epita.fr>
9033
9034 * src/L0.c, src/LR0.h (nstates): Be size_t.
9035 Adjust comparisons (signed vs unsigned).
9036 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
9037 bitset*.
9038 Adjust all dependencies.
9039
d8a0245c
AD
90402002-03-04 Akim Demaille <akim@epita.fr>
9041
9042 * src/closure.c (firsts): Now, also a bitset.
9043 Adjust all dependencies.
9044 (varsetsize): Remove, now unused.
9045 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
9046
34ba9743
AD
90472002-03-04 Akim Demaille <akim@epita.fr>
9048
9049 * src/print.c: Convert to use bitset.h, not hand coded iterations
9050 over ints.
9051
ed86e78c
AD
90522002-03-04 Akim Demaille <akim@epita.fr>
9053
9054 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
9055
dfdb1797
AD
90562002-03-04 Akim Demaille <akim@epita.fr>
9057
9058 * src/closure.c (ruleset): Be a bitset.
9059 (rulesetsize): Remove.
9060
7086e707
AD
90612002-03-04 Akim Demaille <akim@epita.fr>
9062
9063 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
9064 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
9065 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
9066 * src/closure.c (fderives): Be an array of bitsets.
9067
98254360
RA
90682002-02-28 Robert Anisko <robert@lrde.epita.fr>
9069
9070 * data/bison.c++: Merge the two generated headers. Insert a copyright
9071 notice in each output file.
9072
a75c057f
AD
90732002-02-28 Akim Demaille <akim@epita.fr>
9074
9075 * data/bison.c++: Copy the prologue of bison.simple to fetch
9076 useful M4 definitions, such as b4_header_guard.
9077
06b00abc
AD
90782002-02-25 Akim Demaille <akim@epita.fr>
9079
9080 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
9081 translator friendly scheme for the bgr
9082 copyright notice.
06b00abc 9083
70e7d534
AD
90842002-02-25 Akim Demaille <akim@epita.fr>
9085
9086 * src/output.c (header_output): Remove, now handled completely via
9087 M4.
9088
abe017f6
AD
90892002-02-25 Akim Demaille <akim@epita.fr>
9090
9091 * m4/m4.m4: New, from CVS Autoconf.
9092 * configure.in: Invoke it.
9093 * src/output.c (output_skeleton): Use its result instead of the
9094 hard coded name.
9095
381fb12e
AD
90962002-02-25 Akim Demaille <akim@epita.fr>
9097
9098 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
9099 Fileutils 4.1.5.
9100 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
9101 * src/output.c (output_skeleton): Use mkstemp to create a real
9102 temporary file.
9103 Move the filling of `skeleton' and its muscle to...
9104 (prepare): here.
9105 (output): Move the definition of the prologue muscle to...
9106 (prepare): here.
9107 * src/system.h (DEFAULT_TMPDIR): New.
9108
6f38107f
PE
91092002-02-14 Paul Eggert <eggert@twinsun.com>
9110
9111 Remove the support for C++ namespace cleanliness; it was
9112 causing more problems than it was curing, since it didn't work
9113 properly on some nonstandard C++ compilers. This can wait
9114 for a proper C++ parser.
9115
9116 * NEWS: Document this.
9117 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
9118 of C++, as it's treated like C now.
9119 * src/bison.simple (YYSTD): Remove.
9120 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
9121 Treat C++ just like Standard C instead of trying to support
9122 namespace cleanliness.
9123
80cce3da
AD
91242002-02-14 Akim Demaille <akim@epita.fr>
9125
9126 * tests/regression.at (else): Adjust to Andreas' change.
9127
842e8679
AD
91282002-02-14 Akim Demaille <akim@epita.fr>
9129
9130 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
9131
4bda3f10
AD
91322002-02-13 Andreas Schwab <schwab@suse.de>
9133
9134 * src/output.c (output_rule_data): Don't output NULL, it might
9135 not be defined yet.
9136
4162fa07 91372002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 9138
4162fa07
RA
9139 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
9140 (Copyright notice): Update.
b418ecd8 9141
bd16a5dc
AD
91422002-02-11 Akim Demaille <akim@epita.fr>
9143
9144 * tests/regression.at (%nonassoc and eof): Don't include
9145 nonportable headers.
9146
8d69a1a3
RA
91472002-02-08 Robert Anisko <robert@lrde.epita.fr>
9148
9149 * data/bison.c++: Correct error recovery. Make the user able to
9150 initialize the starting location.
9151
9b2d0677
AD
91522002-02-07 Akim Demaille <akim@epita.fr>
9153
9154 * tests/input.at: New.
9155
69e2658b
RA
91562002-02-07 Robert Anisko <robert@lrde.epita.fr>
9157
9158 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 9159 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
9160 directives around tables only needed for debugging.
9161
4aacc3a7
RA
91622002-02-07 Robert Anisko <robert@lrde.epita.fr>
9163
9164 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
9165 C++ parsers.
9166 (yy::b4_name::parse): Use print_.
9167
762a801e
RA
91682002-02-07 Robert Anisko <robert@lrde.epita.fr>
9169
9170 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
9171
4bb2bc3f
RA
91722002-02-07 Robert Anisko <robert@lrde.epita.fr>
9173
9174 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
9175 C++ parsers.
9176 (yy::b4_name::parse): Build verbose error messages, and use error_.
9177
6b45a3ca
RA
91782002-02-06 Robert Anisko <robert@lrde.epita.fr>
9179
9180 * data/bison.c++: Fix m4 quoting in comments.
9181
50997c6e
RA
91822002-02-06 Robert Anisko <robert@lrde.epita.fr>
9183
9184 * data/bison.c++: Adjust the parser code. Fix some muscles that were
9185 not expanded by m4.
9186
3f3eed27
AD
91872002-02-05 Akim Demaille <akim@epita.fr>
9188
9189 * data/bison.c++: Adjust to the M4 back end.
9190 More is certainly needed.
9191
be2a1a68
AD
91922002-02-05 Akim Demaille <akim@epita.fr>
9193
9194 Give a try to M4 as a back end.
9195
9196 * lib/readpipe.c: New, from wdiff.
9197 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
9198 BISON_HAIRY.
9199 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
9200 specific values. Now it is m4 that performs the lookup.
9201 * src/parse-skel.y: Remove.
9202 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
9203 * src/output.c (actions_output, guards_output)
9204 (token_definitions_output): No longer keeps track of the output
9205 line number, hence remove the second argument.
9206 (guards_output): Check against the guard member of a rule, not the
9207 action member.
9208 Adjust callers.
9209 (output_skeleton): Don't look for the skeleton location, let m4 do
9210 that.
9211 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
9212 file will be used.
9213 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
9214 (prepare): Given that for the time being changesyntax is not
9215 usable in M4, rename the muscles using `-' to `_'.
9216 Define `defines_flag', `output_parser_name' and `output_header_name'.
9217 * src/output.h (actions_output, guards_output)
9218 (token_definitions_output): Adjust prototypes.
9219 * src/scan-skel.l: Instead of scanning the skeletons, it now
9220 processes the output of m4: `__oline__' and `#output'.
9221 * data/bison.simple: Adjust to be used by M4(sugar).
9222 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
9223 to date.
9224 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
9225 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
9226 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
9227 shamelessly stolen from CVS Autoconf.
9228
beda758b
AD
92292002-02-05 Akim Demaille <akim@epita.fr>
9230
9231 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
9232 * configure.in: Check for the declarations of free and malloc.
9233 * src/muscle_tab.c: Adjust.
9234
5ece6d43
AD
92352002-02-05 Akim Demaille <akim@epita.fr>
9236
9237 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
9238 which have no values.
9239
5bb18f9a
AD
92402002-02-05 Akim Demaille <akim@epita.fr>
9241
9242 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
9243 * data/: here.
9244
894dd62e
PE
92452002-01-29 Paul Eggert <eggert@twinsun.com>
9246
9247 * src/bison.simple (YYSIZE_T): Do not define merely because
9248 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
9249 On some platforms, <alloca.h> does not declare YYSTD (size_t).
9250
82841af7
AD
92512002-01-27 Akim Demaille <akim@epita.fr>
9252
9253 Fix `%nonassoc and eof'.
9254
9255 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
9256 which were not properly copied! Replace
9257 memcpy (res->errs, src->errs, src->nerrs);
9258 with
9259 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
9260 !!!
9261 * tests/regression.at (%nonassoc and eof): Adjust to newest
9262 Autotest: `.' is not in the PATH.
9263
318b76e9
AD
92642002-01-27 Akim Demaille <akim@epita.fr>
9265
9266 * tests/sets.at (AT_EXTRACT_SETS): New.
9267 (Nullable): Use it.
9268 (Firsts): New.
9269
30d2f3d5
AD
92702002-01-26 Akim Demaille <akim@epita.fr>
9271
9272 * tests/actions.at, tests/calc.at, tests/headers.at,
9273 * tests/torture.at: Adjust to the newest Autotest which no longer
9274 forces `.' in the PATH.
9275
30f8c395
AD
92762002-01-25 Akim Demaille <akim@epita.fr>
9277
9278 * tests/regression.at (%nonassoc and eof): New.
9279 Suggested by Robert Anisko.
9280
29ae55f1
AD
92812002-01-24 Akim Demaille <akim@epita.fr>
9282
9283 Bison dumps core when trying to complain about broken input files.
9284 Reported by Cris van Pelt.
9285
9286 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
9287 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
9288 into...
9289 (Invalid inputs): Strengthen: exercise parse_percent_token.
9290
2b548aa6
RA
92912002-01-24 Robert Anisko <robert.anisko@epita.fr>
9292
9293 * src/Makefile.am: Add bison.c++.
9294 * src/bison.c++: New skeleton.
9295
bb0146c2
AD
92962002-01-21 Paolo Bonzini <bonzini@gnu.org>
9297
9298 * po/it.po: New.
9299
bec30531
AD
93002002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
9301
9302 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
9303
fc6edc45
MA
93042002-01-20 Marc Autret <marc@gnu.org>
9305
9306 * src/files.c (compute_output_file_names): Fix
9307
5e5d5415
MA
93082002-01-20 Marc Autret <marc@gnu.org>
9309
9310 * tests/output.at: New test.
9311 * src/files.c (compute_base_names): Don't map extensions when
9312 the YACC flag is set, use defaults.
9313 Reported by Evgeny Stambulchik.
9314
44ea3fbd
MA
93152002-01-20 Marc Autret <marc@gnu.org>
9316
ba0fe3c7
PE
9317 * src/system.h: Need to define __attribute__ away for non-GCC
9318 compilers as well (i.e., the vendor C compiler).
44ea3fbd
MA
9319 Suggested by Albert Chin-A-Young.
9320
338963d1
TVH
93212002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
9322
9323 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
9324 canonical definition.
9325 * src/system.h: Use the canonical definition for PARAMS (avoids
9326 a conflict with the macro from lib/hash.h).
9327
c57b2479
AD
93282002-01-11 Akim Demaille <akim@epita.fr>
9329
9330 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 9331 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 9332
b85810ae
AD
93332002-01-09 Akim Demaille <akim@epita.fr>
9334
9335 * src/files.c, src/files.h (output_infix): New.
9336 (tab_extension): Remove.
9337 (compute_base_names): Compute the former, drop the latter.
9338 * src/output.c (prepare): Insert the muscles `output-infix', and
9339 `output-suffix'.
9340 * src/parse-skel.y (string, string.1): New.
9341 (section.header): Use it.
9342 (section.yacc): Remove.
9343 (prefix): Remove too.
9344 * src/scan-skel.l: Adjust.
9345 * src/bison.simple, src/bison.hairy: Adjust.
9346
cae60122
AD
93472002-01-09 Akim Demaille <akim@epita.fr>
9348
9349 * configure.in (WERROR_CFLAGS): Compute it.
9350 * src/Makefile.am (CFLAGS): Pass it.
9351 * tests/atlocal.in (CFLAGS): Idem.
9352 * src/files.c: Fix a few warnings.
9353 (get_extension_index): Remove, unused.
9354
ae404801
AD
93552002-01-08 Akim Demaille <akim@epita.fr>
9356
9357 * src/getargs.c (AS_FILE_NAME): New.
9358 (getargs): Use it to convert DOSish file names.
9359 * src/files.c (base_name): Rename as full_base_name to avoid
9360 clashes with `base_name ()'.
9361 (filename_split): New.
9362 (compute_base_names): N-th rewrite, using filename_split.
9363
22312b71
AD
93642002-01-08 Akim Demaille <akim@epita.fr>
9365
9366 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
9367 New, stolen from the Fileutils 4.1.
9368 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
9369 * configure.in: Check for the presence of memrchr, and of its
9370 prototype.
9371
a67cef01
TVH
93722002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
9373
9374 * lib/hash.h (__P): Added definition for this macro.
9375 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
9376 BUILT_SOURCES, to ensure they are generated first.
9377 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
9378 %error-verbose to allow bootstrapping with bison 1.30x.
9379
2b25d624
AD
93802002-01-06 Akim Demaille <akim@epita.fr>
9381
9382 * src/reader.c (parse_braces): Don't fetch the next char, the
9383 convention is to fetch on entry.
9384 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
9385 'switch' without a following semicolon.
9386 * tests/regression.at (braces parsing): New.
9387
3460813b
AD
93882002-01-06 Akim Demaille <akim@epita.fr>
9389
9390 Bison is dead wrong in its RR conflict reports.
9391
9392 * tests/torture.at (GNU Cim Grammar): New.
9393 * src/conflicts.c (count_rr_conflicts): Fix.
9394
73784c64
AD
93952002-01-06 Akim Demaille <akim@epita.fr>
9396
9397 Creating package.m4 from configure.ac causes too many problems.
9398
9399 * tests/Makefile.am (package.m4): Create it by hand,
9400 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
9401
25d81090
AD
94022002-01-06 Akim Demaille <akim@epita.fr>
9403
9404 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
9405 skeleton.h.
9406
a9b8959e
PE
94072002-01-04 Paul Eggert <eggert@twinsun.com>
9408
9409 * doc/bison.texinfo (Debugging):
9410 Remove YYSTDERR; it's no longer defined or used.
9411 Also, s/cstdio.h/cstdio/.
9412
25d81090
AD
94132002-01-03 Akim Demaille <akim@epita.fr>
9414
9415 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
9416
1109455c
AD
94172002-01-03 Akim Demaille <akim@epita.fr>
9418
9419 * src/parse-skel.y (process_skeleton): Don't bind the parser's
9420 tracing code to --trace, wait for a better --trace option, with
9421 args.
9422
7ea5e977
AD
94232002-01-03 Akim Demaille <akim@epita.fr>
9424
9425 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
9426 The ISO C++ standard is extremely clear about it: stderr is
9427 considered a macro, not a regular symbol (see table 94 `Header
9428 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
9429 Therefore std:: does not apply to it. It still does with fprintf.
9430 Also, s/cstdio.h/cstdio/.
9431
fab5b110
AD
94322002-01-03 Akim Demaille <akim@epita.fr>
9433
9434 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
9435 for non system headers.
9436
aed7fd9b
AD
94372002-01-02 Akim Demaille <akim@epita.fr>
9438
9439 Equip the skeleton chain with location tracking, runtime trace,
9440 pure parser and scanner.
9441
9442 * src/parse-skel.y: Request a pure parser, locations, and prefix
9443 renaming.
9444 (%union): Having several members with the same type does not help
9445 type mismatches, simplify.
9446 (YYPRINT, yyprint): New.
9447 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
9448 (skel_error): this.
9449 Handle locations.
9450 * src/scan-skel.l: Adjust to these changes.
9451 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
9452 (LOCATION_PRINT, skel_control_t): New.
9453
24fad99e
AD
94542001-12-30 Akim Demaille <akim@epita.fr>
9455
9456 * src/parse-skel.y: Get rid of the shift/reduce conflict:
9457 replace `gb' with BLANKS.
9458 * src/scan-skel.l: Adjust.
9459
a4b36db4
AD
94602001-12-30 Akim Demaille <akim@epita.fr>
9461
9462 * src/system.h: We don't need nor want bcopy.
9463 Throw away MS-DOS crap: we don't need getpid.
9464 * configure.in: We don't need strndup. It was even causing
9465 problems: because Flex includes the headers *before* us,
9466 _GNU_SOURCE is not defined by config.h, and therefore strndup was
9467 not visible.
9468 * lib/xstrndup.c: New.
9469 * src/scan-skel.l: Use it.
9470 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
9471 * src/parse-skel.y: Use %directives instead of #defines.
9472
1239777d
AD
94732001-12-30 Akim Demaille <akim@epita.fr>
9474
9475 * src/skeleton.h: New.
9476 * src/output.c (output_parser, output_master_parser): Remove, dead
9477 code.
9478 * src/output.h (get_lines_number, actions_output, guards_output)
9479 (token_definitions_output): Prototype them.
9480 * src/parse-skel.y: Add the license notice.
9481 Include output.h and skeleton.h.
9482 (process_skeleton): Returns void, and takes a single parameter.
9483 * src/scan-skel.l: Add the license notice.
9484 Include skeleton.h.
9485 Don't use %option yylineno: it seems that then Flex imagines
9486 REJECT has been used, and therefore it won't reallocate its
9487 buffers (which makes no other sense to me than a bug). It results
9488 in warnings for `unused: yy_flex_realloc'.
9489
9b3add5b
RA
94902001-12-30 Robert Anisko <robert.anisko@epita.fr>
9491
9492 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
9493 (MUSCLE_INSERT_PREFIX): ...to there.
9494 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
9495 (MUSCLE_INSERT_PREFIX): Move from here...
9496
9497 * src/bison.hairy: Add a section directive. Put braces around muscle
9498 names. This parser skeleton is still broken, but Bison should not
9499 choke on a bad muscle 'syntax'.
9500 * src/bison.simple: Add a section directive. Put braces around muscle
9501 names.
9502
9503 * src/files.h (strsuffix, stringappend): Add declarations.
9504 (tab_extension): Add declaration.
9505 (short_base_name): Add declaration.
9506
9507 * src/files.c (strsuffix, stringappend): No longer static. These
9508 functions are used in the skeleton parser.
9509 (tab_extension): New.
9510 (compute_base_names): Use the computations done in this function
fab5b110 9511 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
9512 names.
9513 (short_base_name): No longer static.
9514
9515 * src/output.c (output_skeleton): New.
9516 (output): Disable call to output_master_parser, and give a try to
9517 a new skeleton handling system.
9518 (guards_output, actions_output): No longer static.
9519 (token_definitions_output, get_lines_number): No longer static.
9520
9521 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
9522
fab5b110 9523 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
9524 parse-skel.y.
9525
9526 * src/parse-skel.y: New file.
9527 * src/scan-skel.l: New file.
9528
b5b61c61
AD
95292001-12-29 Akim Demaille <akim@epita.fr>
9530
9531 %name-prefix is broken.
9532
9533 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
9534 Adjust all dependencies.
9535 * tests/headers.at (export YYLTYPE): Strengthen this test: use
9536 %name-prefix.
9537
9538 Renaming yylval but not yylloc is not consistent. Now we do.
9539
9540 * src/bison.simple: Prefix yylloc if used.
9541 * doc/bison.texinfo (Decl Summary): Document that.
9542
8c9a50be
AD
95432001-12-29 Akim Demaille <akim@epita.fr>
9544
9545 * doc/bison.texinfo: Promote `%long-directive' over
9546 `%long_directive'.
9547 Remove all references to fixed-output-files, yacc is enough.
9548
d99361e6
AD
95492001-12-29 Akim Demaille <akim@epita.fr>
9550
9551 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
9552 user prologue. These are defaults.
9553 * tests/actions.at (Mid-rule actions): Make sure the user can
9554 define YYDEBUG and YYERROR_VERBOSE.
9555
b9cecb91
AD
95562001-12-29 Akim Demaille <akim@epita.fr>
9557
9558 * src/output.c (header_output): Don't forget to export YYLTYPE and
9559 yylloc.
9560 * tests/headers.at (export YYLTYPE): New, make sure it does.
9561 * tests/regression.at (%union and --defines, Invalid CPP headers):
9562 Move to...
9563 * tests/headers.at: here.
9564
aea13e97
AD
95652001-12-29 Akim Demaille <akim@epita.fr>
9566
9567 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
9568
931394cb
AD
95692001-12-29 Akim Demaille <akim@epita.fr>
9570
9571 * tests/actions.at (Mid-rule actions): Output on a single line
9572 instead of several.
9573
704a47c4
AD
95742001-12-29 Akim Demaille <akim@epita.fr>
9575
9576 * doc/bison.texinfo: Formatting changes.
9577
091e20bb
AD
95782001-12-29 Akim Demaille <akim@epita.fr>
9579
9580 Don't store the token defs in a muscle, just be ready to output it
9581 on command. Now possible via `symbols'. Fixes a memory leak.
9582
9583 * src/output.c (token_definitions_output): New.
9584 (output_parser, header_output): Use it.
9585 * src/reader.c (symbols_save): Remove.
9586
cce71710
AD
95872001-12-29 Akim Demaille <akim@epita.fr>
9588
9589 * src/bison.simple: Do not provide a default for YYSTYPE and
9590 YYLTYPE before the user's prologue. Otherwise it's hardly... a
9591 default.
9592
82c035a8
AD
95932001-12-29 Akim Demaille <akim@epita.fr>
9594
9595 Mid-rule actions are simply... ignored!
9596
9597 * src/reader.c (readgram): Be sure to attach mid-rule actions to
9598 the empty-rule associated to the dummy symbol, not to the host
9599 rule.
9600 * tests/actions.at (Mid-rule actions): New.
9601
8419d367
AD
96022001-12-29 Akim Demaille <akim@epita.fr>
9603
9604 Memory leak.
9605
9606 * src/reader.c (reader): Free grammar.
9607
375d5806
AD
96082001-12-29 Akim Demaille <akim@epita.fr>
9609
9610 Memory leak.
9611
9612 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
9613 since it allocates it for each state, although only one is needed.
9614 (allocate_storage): Do it here.
9615
f51cb8ff
AD
96162001-12-29 Akim Demaille <akim@epita.fr>
9617
9618 * src/options.h, src/options.c (create_long_option_table): Rename
9619 as...
9620 (long_option_table_new): this, with a clearer prototype.
9621 (percent_table): Remove, unused,
9622 * src/getargs.c (getargs): Adjust.
9623
29e88316
AD
96242001-12-29 Akim Demaille <akim@epita.fr>
9625
9626 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
9627 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
9628 as states.
9629
b9f71f19
AD
96302001-12-29 Akim Demaille <akim@epita.fr>
9631
9632 * src/lalr.c (build_relations): Rename `states' as `states1'.
9633 Sorry, I don't understand exactly what it is, no better name...
9634
1a2b5d37
AD
96352001-12-29 Akim Demaille <akim@epita.fr>
9636
9637 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
9638 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
9639 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
9640 as rules.
9641
1cca533e
AD
96422001-12-29 Akim Demaille <akim@epita.fr>
9643
9644 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
9645 ago.
9646
c03ae966
AD
96472001-12-29 Akim Demaille <akim@epita.fr>
9648
9649 * src/reader.c, src/reader.h (user_toknums): Remove.
9650 Adjust all users to use symbols[i]->user_token_number.
9651
5a670b1e
AD
96522001-12-29 Akim Demaille <akim@epita.fr>
9653
9654 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
9655 Adjust all users to use symbols[i]->prec or ->assoc.
9656
ad949da9
AD
96572001-12-29 Akim Demaille <akim@epita.fr>
9658
9659 * src/reader.c, src/reader.h (tags): Remove.
9660 Adjust all users to use symbols[i]->tag.
9661
0e78e603
AD
96622001-12-29 Akim Demaille <akim@epita.fr>
9663
9664 * src/gram.h, src/gram.c (symbols): New, similar to state_table
9665 and rule_table.
9666 * src/reader.c (packsymbols): Fill this table.
9667 Drop sprec.
9668 * src/conflicts.c (resolve_sr_conflict): Adjust.
9669 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
9670 single table.
9671 Use symbols[i]->tag instead of tags[i].
9672
213e640e
AD
96732001-12-29 Akim Demaille <akim@epita.fr>
9674
9675 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
9676 In addition, put a comment in there, to replace...
9677 * tests/regression.at (%union and C comments): Remove.
9678
e7b8bef1
AD
96792001-12-29 Akim Demaille <akim@epita.fr>
9680
9681 * tests/regression.at (Web2c Actions): Blindly move the actual
9682 output as expected output. The contents *seem* right to me, but I
9683 can't pretend reading perfectly parser tables... Nonetheless, all
9684 the other tests pass correctly, the table look OK, even though the
9685 presence of `$axiom' is to be noted: AFAICS it is useless (but
9686 harmless).
9687
b68e7744
AD
96882001-12-29 Akim Demaille <akim@epita.fr>
9689
9690 * src/reader.c (readgram): Don't add the rule 0 if there were no
9691 rules read. In other words, add it _after_ having performed
9692 grammar sanity checks.
9693 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
9694
78d5bae9
AD
96952001-12-29 Akim Demaille <akim@epita.fr>
9696
9697 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
9698 visible, and some states have now a different number.
9699
ff442794
AD
97002001-12-29 Akim Demaille <akim@epita.fr>
9701
9702 * src/reader.c (readgram): Bind the initial rule's lineno to that
9703 of the first rule.
9704 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
9705 (Solved SR Conflicts): Adjust rule 0's line number.
9706
610ab194
AD
97072001-12-29 Akim Demaille <akim@epita.fr>
9708
9709 Fix the `GAWK Grammar' failure.
9710
9711 * src/LR0.c (final_state): Initialize to -1 so that we do compute
9712 the reductions of the first state which was mistakenly confused
9713 with the final state because precisely final_state was initialized
9714 to 0.
9715 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
9716 now noticed by Bison.
9717 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
9718 have a reduction on $default.
9719
29d29c8f
AD
97202001-12-29 Akim Demaille <akim@epita.fr>
9721
9722 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
9723 rule line numbers.
9724 * src/closure.c (print_closure): Likewise.
9725 * src/derives.c (print_derives): Likewise.
9726 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
9727 now.
9728
7c6b64d0
AD
97292001-12-29 Akim Demaille <akim@epita.fr>
9730
9731 * src/lalr.c (lookaheads_print): New.
9732 (lalr): Call it when --trace-flag.
9733 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
9734 are dumped.
9735
3d4daee3
AD
97362001-12-29 Akim Demaille <akim@epita.fr>
9737
9738 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
9739 when walking through ritem, even via rule->rhs.
9740 * src/reduce.c (dump_grammar, useful_production, reduce_output)
9741 (useful_production, useless_nonterminals): Likewise.
9742 (reduce_grammar_tables): Likewise, plus update nritems.
9743 * src/nullable.c (set_nullable): Likewise.
9744 * src/lalr.c (build_relations): Likewise.
9745 * tests/sets.at (Nullable): Adjust.
9746 Fortunately, now, the $axiom is no longer nullable.
9747
9e7f6bbd
AD
97482001-12-29 Akim Demaille <akim@epita.fr>
9749
9750 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
9751 the 0-sentinel.
9752 * src/gram.c (ritem_longest_rhs): Likewise.
9753 * src/reduce.c (nonterminals_reduce): Likewise.
9754 * src/print_graph.c (print_graph): Likewise.
9755 * src/output.c (output_rule_data): Likewise.
9756 * src/nullable.c (set_nullable): Likewise.
9757
255ef638
AD
97582001-12-29 Akim Demaille <akim@epita.fr>
9759
9760 * src/output.c: Comment changes.
9761
0d8a7363
AD
97622001-12-27 Paul Eggert <eggert@twinsun.com>
9763
9764 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
9765 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
9766 Sparc, as they were causing more porting problems than the
9767 (minor) performance improvement was worth.
9768
9769 Also, catch up with 1.31's YYSTD.
9770
3db472b9
AD
97712001-12-27 Akim Demaille <akim@epita.fr>
9772
9773 * src/output.c (output_gram): Rely on nritems, not the
9774 0-sentinel. See below.
9775 Use -1 as separator, not 0.
9776 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
9777 Rely on -1 as separator in yyrhs, instead of 0.
9778 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
9779 twice `Now at end of input', therefore there are two lines less to
9780 expect.
9781
b365aa05
AD
97822001-12-27 Akim Demaille <akim@epita.fr>
9783
9784 * tests/regression.at (Unresolved SR Conflicts):
9785 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
9786 below.
9787
30171f79
AD
97882001-12-27 Akim Demaille <akim@epita.fr>
9789
9790 * src/LR0.c (new_state): Recognize the final state by the fact it
9791 is reached by eoftoken.
9792 (insert_start_shifting_state, insert_eof_shifting_state)
9793 (insert_accepting_state, augment_automaton): Remove, since now
9794 these states are automatically computed from the initial state.
9795 (generate_states): Adjust.
9796 * src/print.c: When reporting a rule number to the user, substract
9797 1, so that the axiom rule is rule 0, and the first user rule is 1.
9798 * src/reduce.c: Likewise.
9799 * src/print_graph.c (print_core): For the time being, just as for
9800 the report, depend upon --trace-flags to dump the full set of
9801 items.
9802 * src/reader.c (readgram): Once the grammar read, insert the rule
9803 0: `$axiom: START-SYMBOL $'.
9804 * tests/set.at: Adjust: rule 0 is now displayed, and since the
9805 number of the states has changed (the final state is no longer
9806 necessarily the last), catch up.
9807
75142d45
AD
98082001-12-27 Akim Demaille <akim@epita.fr>
9809
9810 Try to make the use of the eoftoken valid. Given that its value
9811 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
9812 is used instead of > 0 where appropriate, (ii), depend upon nritems
9813 instead of the 0-sentinel.
9814
9815 * src/gram.h, src/gram.c (nritems): New.
9816 Expected to be duplication of nitems, but for the time being...
9817 * src/reader.c (packgram): Assert nritems and nitems are equal.
9818 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
9819 * src/closure.c (print_closure, print_fderives): Likewise.
9820 * src/gram.c (ritem_print): Likewise.
9821 * src/print.c (print_core, print_grammar): Likewise.
9822 * src/print_graph.c: Likewise.
9823
b7c49edf
AD
98242001-12-27 Akim Demaille <akim@epita.fr>
9825
9826 * src/main.c (main): If there are complains after grammar
9827 reductions, then output the report anyway if requested, then die.
9828 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
9829 * src/reader.c (eoftoken): New.
9830 (parse_token_decl): If the token being defined has value `0', it
9831 is the eoftoken.
9832 (packsymbols): No longer hack `tags' to insert `$' by hand.
9833 Be sure to preserve the value of the eoftoken.
9834 (reader): Make sure eoftoken is defined.
9835 Initialize nsyms to 0: now eoftoken is created just like the others.
9836 * src/print.c (print_grammar): Don't special case the eof token.
9837 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
9838 lie anyway, albeit pleasant.
9839 * tests/calc.at: Exercise error messages with eoftoken.
9840 Change the grammar so that empty input is invalid.
9841 Adjust expectations.
9842 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
9843
ec2da99f
AD
98442001-12-27 Akim Demaille <akim@epita.fr>
9845
9846 * configure.in: Check the protos of strchr ans strspn.
9847 Replace strchr if needed.
9848 * src/system.h: Provide the protos of strchr, strspn and memchr if
9849 missing.
9850 * lib/strchr.c: New.
9851 * src/reader.c (symbols_save): Use strchr.
9852
8adfa272
AD
98532001-12-27 Akim Demaille <akim@epita.fr>
9854
9855 * src/print.c, src/print_graph.c (escape): New.
9856 Use it to quote the TAGS outputs.
9857 * src/print_graph.c (print_state): Now errors are in red, and
9858 reductions in green.
9859 Prefer high to wide: output the state number on a line of its own.
9860
80dac38c
AD
98612001-12-27 Akim Demaille <akim@epita.fr>
9862
9863 * src/state.h, src/state.c (reductions_new): New.
9864 * src/LR0.c (set_state_table): Let all the states have a
9865 `reductions', even if reduced to 0.
9866 (save_reductions): Adjust.
9867 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
9868 * src/print.c (print_reductions, print_actions): Adjust.
9869 * src/output.c (action_row): Adjust.
9870
2cec70b9
AD
98712001-12-27 Akim Demaille <akim@epita.fr>
9872
9873 * src/state.h, src/state.c (errs_new, errs_dup): New.
9874 * src/LR0.c (set_state_table): Let all the states have an errs,
9875 even if reduced to 0.
9876 * src/print.c (print_errs, print_reductions): Adjust.
9877 * src/output.c (output_actions, action_row): Adjust.
9878 * src/conflicts.c (resolve_sr_conflict): Adjust.
9879
13ca549a
AD
98802001-12-27 Akim Demaille <akim@epita.fr>
9881
9882 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
9883
5092aba5
AD
98842001-12-27 Akim Demaille <akim@epita.fr>
9885
9886 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
9887 * src/print.c: here.
9888 (lookaheadset, shiftset): New, used as additional storage by
9889 print_reductions.
9890 (print_results): Adjust.
9891 (print_shifts, print_gotos, print_errs): New, extracted from...
9892 (print_actions): here.
9893 * src/print_graph.c (print_actions): Remove dead code.
9894
11e2beca
AD
98952001-12-27 Akim Demaille <akim@epita.fr>
9896
9897 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
9898 `$n' and `@n'.
9899
dac3c910
AD
99002001-12-27 Akim Demaille <akim@epita.fr>
9901
9902 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
9903 (build_relations): Adjust.
9904
d0b0fefa
AD
99052001-12-27 Akim Demaille <akim@epita.fr>
9906
9907 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
9908 duplication.
9909
adc8c848
AD
99102001-12-27 Akim Demaille <akim@epita.fr>
9911
9912 * src/reader.c (packgram): Catch nitems overflows.
9913
14d293ac
AD
99142001-12-27 Akim Demaille <akim@epita.fr>
9915
9916 * src/files.c, src/files.h (guard_obstack): Remove.
9917 * src/output.c (output): Adjust.
9918 * src/reader.c (parse_braces): New, factoring...
9919 (copy_action, copy_guard): these two which are renamed as...
9920 (parse_action, parse_guard): these.
9921 As a voluntary consequence, using braces around guards is now
9922 mandatory.
9923
f499b062
AD
99242001-12-27 Akim Demaille <akim@epita.fr>
9925
9926 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
9927 * src/reader.c (symbol_list): `guard' and `guard_line' are new
9928 members.
9929 (symbol_list_new): Adjust.
9930 (copy_action): action_line is the first line, not the last.
9931 (copy_guard): Just as for actions, store the `action' only, not
9932 the switch/case/break flesh.
9933 Don't parse the user action that might follow the guard, let...
9934 (readgram): do it, i.e., now, there can be an action after a
9935 guard.
9936 In other words the guard is just explicitly optional.
9937 (packgram): Adjust.
9938 * src/output.c (guards_output): New.
9939 (output_parser): Call it when needed.
9940 (output): Also free the guard and attrs obstacks.
9941 * src/files.c, src/files.h (obstack_save): Remove.
9942 (output_files): Remove.
9943 As a result, if one needs the former `.act' file, using an
9944 appropriate skeleton which requires actions and guards is now
9945 required.
9946 * src/main.c (main): Adjust.
9947 * tests/semantic.at: New.
9948 * tests/regression.at: Use `input.y' as input file name.
9949 Avoid 8+3 problems by requiring input.c when the test needs the
9950 parser.
9951
d945f5cd
AD
99522001-12-27 Akim Demaille <akim@epita.fr>
9953
9954 * src/reader.c (symbol_list_new): Be sure to initialize all the
9955 fields.
9956
d200e455
AD
99572001-12-27 Akim Demaille <akim@epita.fr>
9958
9959 All the hacks using a final pseudo state are now useless.
9960
9961 * src/LR0.c (set_state_table): state_table holds exactly nstates.
9962 * src/lalr.c (nLA): New.
9963 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
9964 instead of lookaheadsp from the pseudo state (nstate + 1).
9965
f9507c28
AD
99662001-12-27 Akim Demaille <akim@epita.fr>
9967
9968 * src/output.c (action_row, token_actions): Use a state_t instead
9969 of a integer, and nlookaheads instead of the following state's
9970 lookaheadsp.
9971
065fbd27
AD
99722001-12-27 Akim Demaille <akim@epita.fr>
9973
9974 * src/conflicts.c (log_resolution, flush_shift)
9975 (resolve_sr_conflict, set_conflicts, solve_conflicts)
9976 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
9977 (conflicts_print, print_reductions): Use a state_t instead of an
9978 integer when referring to a state.
9979 As much as possible, depend upon nlookaheads, instead of the
9980 `lookaheadsp' member of the following state (since lookaheads of
9981 successive states are successive, the difference between state n + 1
9982 and n served as the number of lookaheads for state n).
9983 * src/lalr.c (add_lookback_edge): Likewise.
9984 * src/print.c (print_core, print_actions, print_state)
9985 (print_results): Likewise.
9986 * src/print_graph.c (print_core, print_actions, print_state)
9987 (print_graph): Likewise.
9988 * src/conflicts.h: Adjust.
9989
1b177bd7
AD
99902001-12-27 Akim Demaille <akim@epita.fr>
9991
9992 * src/bison.hairy: Formatting/comment changes.
9993 ANSIfy.
9994 Remove `register' indications.
9995 Add plenty of `static'.
9996
7742ddeb
AD
99972001-12-27 Akim Demaille <akim@epita.fr>
9998
9999 * src/output.c (prepare): Drop the muscle `ntbase' which
10000 duplicates ntokens.
10001 * src/bison.simple: Formatting/comment changes.
10002 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
10003 is an undocumented synonym.
10004
1fa14068
AD
100052001-12-22 Akim Demaille <akim@epita.fr>
10006
10007 * src/output.c (output_table_data): Change the prototype to use
10008 `int' for array ranges: some invocations do pass an int, not a
10009 short.
10010 Reported by Wayne Green.
10011
b9752825
AD
100122001-12-22 Akim Demaille <akim@epita.fr>
10013
10014 Some actions of web2c.y are improperly triggered.
10015 Reported by Mike Castle.
10016
10017 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
10018 * tests/regression.at (Web2c): Rename as...
10019 (Web2c Report): this.
10020 (Web2c Actions): New.
10021
776209d6
AD
100222001-12-22 Akim Demaille <akim@epita.fr>
10023
10024 Reductions in web2c.y are improperly reported.
10025 Reported by Mike Castle.
10026
10027 * src/conflicts.c (print_reductions): Fix.
10028 * tests/regression.at (Web2c): New.
10029
275fc3ad
AD
100302001-12-18 Akim Demaille <akim@epita.fr>
10031
10032 Some host fail on `assert (!"foo")', which expands to
10033 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
10034 Reported by Nelson Beebee.
10035
10036 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
10037 `#define it_succeeded 0' and `assert (it_succeeded)'.
10038
897668ee
MA
100392001-12-17 Marc Autret <autret_m@epita.fr>
10040
10041 * src/bison.simple: Don't hard code the skeleton line and filename.
10042 * src/output.c (output_parser): Rename 'line' as 'output_line'.
10043 New line counter 'skeleton_line' (skeleton-line muscle).
10044
ab3399e0
PE
100452001-12-17 Paul Eggert <eggert@twinsun.com>
10046
10047 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
10048 YYDEBUG must be defined to a nonzero value.
10049
10050 * src/bison.simple (yytname): Do not assume that the user defines
10051 YYDEBUG to a properly parenthesized expression.
10052
3877f72b
AD
100532001-12-17 Akim Demaille <akim@epita.fr>
10054
10055 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
10056 nlookaheads is a new member.
10057 Adjust all users.
10058 * src/lalr.h (nlookaheads): Remove this orphan declaration.
10059 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
10060 state.
776209d6 10061
331dbc1b
AD
100622001-12-17 Akim Demaille <akim@epita.fr>
10063
10064 * src/files.h, src/files.c (open_files, close_files): Remove.
10065 * src/main.c (main): Don't open/close files, nor invoke lex_free,
10066 let...
10067 * src/reader.c (reader): Do it.
776209d6 10068
be750e4c
AD
100692001-12-17 Akim Demaille <akim@epita.fr>
10070
10071 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 10072
709ae8c6
AD
100732001-12-17 Akim Demaille <akim@epita.fr>
10074
10075 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
10076 (flush_reduce): New.
10077 (resolve_sr_conflict): Adjust.
776209d6 10078
f87685c3
AD
100792001-12-17 Akim Demaille <akim@epita.fr>
10080
10081 * src/output.c (output_obstack): Be static and rename as...
10082 (format_obstack): this, to avoid any confusion with files.c's
10083 output_obstack.
10084 * src/reader.h (muscle_obstack): Move to...
10085 * src/output.h: here, since it's defined in output.c.
10086
837491d8
AD
100872001-12-17 Akim Demaille <akim@epita.fr>
10088
10089 * src/output.c (action_row, save_column, default_goto)
10090 (sort_actions, matching_state, pack_vector): Better variable
10091 locality.
10092
796d61fb
AD
100932001-12-17 Akim Demaille <akim@epita.fr>
10094
10095 * src/output.c: Various formatting changes.
776209d6 10096
64d15509
AD
100972001-12-17 Akim Demaille <akim@epita.fr>
10098
10099 * src/files.c (output_files): Free the output_obstack.
10100 * src/main.c (main): Call print and print_graph conditionally.
10101 * src/print.c (print): Work unconditionally.
10102 * src/print_graph.c (print_graph): Work unconditionally.
10103 * src/conflicts.c (log_resolution): Output only if verbose_flag.
10104
fbc8ecb7
MA
101052001-12-16 Marc Autret <autret_m@epita.fr>
10106
10107 * src/output.c (actions_output): Fix. When we use %no-lines,
10108 there is one less line per action.
10109
f0440388
MA
101102001-12-16 Marc Autret <autret_m@epita.fr>
10111
10112 * src/bison.simple: Remove a useless #line directive.
10113 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
10114 * src/output.c (get_lines_number): New.
776209d6 10115 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
10116 output muscles.
10117 Fix line numbering.
10118 (actions_output): Computes the number of lines taken by actions.
10119 (output_master_parser): Insert new skeleton which is the name of
10120 the output parser file name.
10121
a79986b8
MA
101222001-12-15 Marc Autret <autret_m@epita.fr>
10123
10124 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
10125
4ec8e00f
MA
101262001-12-15 Marc Autret <autret_m@epita.fr>
10127
10128 * src/output.c (output_gram): Keep track of the hairy one.
10129
1a4648ff
AD
101302001-12-15 Akim Demaille <akim@epita.fr>
10131
10132 Make `make distcheck' work.
10133
10134 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
10135 system.h which uses libgettext.h.
10136
9c2c67e6
AD
101372001-12-15 Akim Demaille <akim@epita.fr>
10138
10139 * src/nullable.c (set_nullable): Useless rules must be skipped,
10140 otherwise, since we range over their symbols, we might look at a
10141 nonterminal which no longer ``exists'', i.e., it is not counted in
10142 `nvars', hence we overflow our arrays.
10143
93ede233
AD
101442001-12-15 Akim Demaille <akim@epita.fr>
10145
10146 The header can also be produced directly, without any obstack!
10147 Yahoo!
10148
10149 * src/files.c, src/files.h (defines_obstack): Remove.
10150 (compute_header_macro): Global.
10151 (defines_obstack_save): Remove.
10152 * src/reader.c (parse_union_decl): No longer output to
10153 defines_obstack: its content can be found in the `stype' muscle
10154 anyway.
10155 (output_token_translations): Merge into...
10156 (symbols_output): this.
10157 Rename as...
10158 (symbols_save): this.
10159 (reader): Adjust.
10160 * src/output.c (header_output): New.
10161 (output): Call it.
10162
2666f928
AD
101632001-12-15 Akim Demaille <akim@epita.fr>
10164
10165 * src/reader.c (parse_union_decl): Instead of handling two obstack
10166 simultaneously, use one to define the `stype' muscle, and use the
10167 value of the latter to fill defines_obstack.
10168 (copy_comment): Remove.
10169 (copy_comment2): Work for a single obstack.
10170 Rename as...
10171 (copy_comment): this.
10172
428046f8
AD
101732001-12-15 Akim Demaille <akim@epita.fr>
10174
10175 * src/lex.c, src/lex.h (xgetc): No longer static.
10176 * src/reader.c (parse_union_decl): Revamp.
10177
ea52d706
AD
101782001-12-15 Akim Demaille <akim@epita.fr>
10179
10180 Still making progress in separating Bison into (i) input, (ii)
10181 process, (iii) output: now we can directly output the parser file
10182 without using table_obstack at all.
10183
10184 * src/files.c, src/files.h (table_obstack): Bye bye.
10185 (parser_file_name): New.
10186 * src/files.c (compute_output_file_names): Compute it.
10187 * src/output.c (actions_output, output_parser)
10188 (output_master_parser): To a file instead of an obstack.
10189
3f96f4dc
AD
101902001-12-15 Akim Demaille <akim@epita.fr>
10191
10192 Attach actions to rules, instead of pre-outputting them to
10193 actions_obstack.
10194
10195 * src/gram.h (rule_t): action and action_line are new members.
10196 * src/reader.c (symbol_list): Likewise.
10197 (copy_action): Save the actions within the rule.
10198 (packgram): Save them in rule_table.
10199 * src/output.c (actions_output): New.
10200 (output_parser): Use it on `%%actions'.
10201 (output_rule_data): Don't free rule_table.
10202 (output): Do it.
10203 (prepare): Don't save the `action' muscle.
10204 * src/bison.simple: s/%%action/%%actions/.
10205
51576fb3
AD
102062001-12-15 Akim Demaille <akim@epita.fr>
10207
10208 * src/reader.c (copy_action): When --yacc, don't append a `;'
10209 to the user action: let it fail if lacking.
dee049eb 10210 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 10211
2648a72d
AD
102122001-12-14 Akim Demaille <akim@epita.fr>
10213
10214 * src/lex.c (literalchar): Simply return the char you decoded, non
10215 longer mess around with obstacks and int pointers.
10216 Adjust all callers.
10217
92790e5b
AD
102182001-12-14 Akim Demaille <akim@epita.fr>
10219
10220 * src/lex.c (literalchar): Don't escape the special characters,
10221 just decode them, and keep them as char (before, eol was output as
10222 the 2 char string `\n' etc.).
10223 * src/output.c (output_rule_data): Use quotearg to output the
10224 token strings.
10225
927c1557
PE
102262001-12-13 Paul Eggert <eggert@twinsun.com>
10227
10228 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
10229 Do not infringe on the global user namespace when using C++.
10230 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
10231 All uses of `fprintf' and `stderr' changed.
10232
10233 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
10234
ed8e1f68
AD
102352001-12-13 Akim Demaille <akim@epita.fr>
10236
10237 The computation of nullable is broken: it doesn't handle empty
10238 RHS's properly.
10239
10240 * tests/torture.at (GNU AWK Grammar): New.
10241 * tests/sets.at (Nullable): New.
10242 * src/nullable.c (set_nullable): Instead of blindly looping over
10243 `ritems', loop over the rules, and then over their rhs's.
10244
10245 Work around Autotest bugs.
10246
10247 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
10248 frame, because Autotest understand lines starting with a `+' as
10249 traces from the shell. Then, they are not processed properly.
10250 Admittedly an Autotest bug, but we don't have time to wait for
10251 Autotest to catch up.
10252 * tests/regression.at (Broken Closure): Adjust to the new table
10253 frames.
10254 Move to...
10255 * tests/sets.at: here.
10256
cb581495
AD
102572001-12-13 Akim Demaille <akim@epita.fr>
10258
10259 * src/closure.c (closure): Use nrules instead of playing tricks
10260 with BITS_PER_WORD.
10261
2e729273
AD
102622001-12-13 Akim Demaille <akim@epita.fr>
10263
10264 * src/print.c (print_actions): Output the handling of `$' as the
10265 traces do: shifting the token EOF. Before EOF was treated as a
10266 nonterminal.
10267 * tests/regression.at: Adjust some tests.
10268 * src/print_graph.c (print_core): Complete the set of items via
10269 closure. The next-to-final and final states are still unsatisfying,
10270 but that's to be addressed elsewhere.
10271 No longer output the rule numbers, but do output the state number.
10272 A single loop for the shifts + gotos is enough, but picked a
10273 distinct color for each.
10274 (print_graph): Initialize and finalize closure.
10275
107f7dfb
AD
102762001-12-13 Akim Demaille <akim@epita.fr>
10277
10278 * src/reader.c (readgram): Remove dead code, an strip useless
10279 braces.
10280 (get_type): Remove, unused.
10281
9b53a24f
AD
102822001-12-12 Akim Demaille <akim@epita.fr>
10283
10284 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
10285 on that of lib/error.c.
10286
dbfb6dcd
AD
102872001-12-12 Akim Demaille <akim@epita.fr>
10288
10289 Some hosts don't like `/' in includes.
10290
10291 * src/system.h: Include libgettext.h without qualifying the path.
10292 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
10293 $(top_srcdir).
10294
c25fb648
MA
102952001-12-11 Marc Autret <autret_m@epita.fr>
10296
10297 * src/output.c (output_parser): Remove useless muscle.
10298
710ddc4f
MA
102992001-12-11 Marc Autret <autret_m@epita.fr>
10300
10301 * src/bison.simple: Remove #line just before %%epilogue. It
10302 is now handled in ...
10303 * src/reader.c (read_additionnal_code): Add the output of a
10304 #line for the epilogue.
10305
e83d80b8
MA
103062001-12-10 Marc Autret <autret_m@epita.fr>
10307
927c1557 10308 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
10309 replace precedent remove.
10310 * src/bison.simple: Remove #line before %%prologue because
10311 %%input-line is wrong at this time.
10312
971d5158
MA
103132001-12-10 Marc Autret <autret_m@epita.fr>
10314
10315 * src/reader.c (symbols_output): Clean up.
927c1557 10316 * src/output.c (output_gram, output): Clean up.
971d5158 10317
5edafffd
AD
103182001-12-10 Akim Demaille <akim@epita.fr>
10319
10320 * src/lalr.c (initialize_lookaheads): New. Extracted from...
10321 * src/LR0.c (set_state_table): here.
10322 * src/lalr.c (lalr): Call it.
10323
0279f8e9
AD
103242001-12-10 Akim Demaille <akim@epita.fr>
10325
10326 * src/state.h (shifts): Remove the `number' member: shifts are
10327 attached to state, hence no longer need to be labelled with a
10328 state number.
10329
190c4f5f
AD
103302001-12-10 Akim Demaille <akim@epita.fr>
10331
10332 Now that states have a complete set of members, the linked list of
10333 shifts is useless: just fill directly the state's shifts member.
10334
10335 * src/state.h (shifts): Remove the `next' member.
10336 * src/LR0.c (first_state, last_state): Remove.
10337 Adjust the callers.
10338 (augment_automaton): Don't look for the shifts that must be added
10339 a shift on EOF: it is those of the state we looked for! But now,
10340 since shifts are attached, it is no longer needed to looking
10341 merely by its id: its number.
10342
2a73b93d
AD
103432001-12-10 Akim Demaille <akim@epita.fr>
10344
10345 * src/LR0.c (augment_automaton): Better variable locality.
10346 Remove an impossible branch: if there is a state corresponding to
10347 the start symbol being shifted, then there is shift for the start
10348 symbol from the initial state.
10349
74392f6a
AD
103502001-12-10 Akim Demaille <akim@epita.fr>
10351
10352 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
10353 only when appropriate: when insert_start_shifting_state' is not
10354 invoked.
10355 * tests/regression.at (Rule Line Numbers): Adjust.
10356
37c82725
AD
103572001-12-10 Akim Demaille <akim@epita.fr>
10358
10359 * src/LR0.c (augment_automaton): Now that all states have shifts,
10360 merge the two cases addition shifts to the initial state.
10361
6a164e0c
AD
103622001-12-10 Akim Demaille <akim@epita.fr>
10363
10364 * src/lalr.c (set_state_table): Move to...
10365 * src/LR0.c: here.
10366 * src/lalr.c (lalr): Don't call it...
10367 * src/LR0.c (generate_states): do it.
10368 * src/LR0.h (first_state): Remove, only the table is used.
10369
7215de24
AD
103702001-12-10 Akim Demaille <akim@epita.fr>
10371
10372 * src/LR0.h (first_shift, first_reduction): Remove.
10373 * src/lalr.c: Don't use first_shift: find shifts through the
10374 states.
10375
80e25d4d
AD
103762001-12-10 Akim Demaille <akim@epita.fr>
10377
10378 * src/LR0.c: Attach shifts to states as soon as they are
10379 computed.
10380 * src/lalr.c (set_state_table): Instead of assigning shifts to
10381 state, just assert that the mapping was properly done.
10382
0ab3728b
AD
103832001-12-10 Akim Demaille <akim@epita.fr>
10384
10385 * src/LR0.c (insert_start_shift): Rename as...
10386 (insert_start_shifting_state): this.
10387 (insert_eof_shifting_state, insert_accepting_state): New.
10388 (augment_automaton): Adjust.
10389 Better locality of the variables.
10390 When looking if the start_symbol is shifted from the initial
10391 state, using `while (... symbol != start_symbol ...)' sounds
10392 better than `while (... symbol < start_symbol ...)': If fail
10393 to see how the order between symbols could be relevant!
10394
78af9bbc
AD
103952001-12-10 Akim Demaille <akim@epita.fr>
10396
10397 * src/getargs.h: Don't declare `spec_name_prefix' and
10398 `spec_file_prefix', declared by src/files.h.
10399 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
10400 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
10401 * src/output.c (prepare): Adjust.
10402 * src/reader.c (symbols_output): Likewise.
10403 * src/vmsgetargs.c: Vaguely adjust, but who cares?
10404
bdef2a41
AD
104052001-12-10 Akim Demaille <akim@epita.fr>
10406
10407 * src/muscle_tab.c (muscle_init): NULL is a better default than
10408 `"0"'.
10409
3735969c
AD
104102001-12-10 Akim Demaille <akim@epita.fr>
10411
10412 * src/reader.c (reader): Calling symbols_output once is enough.
10413
49701457
AD
104142001-12-10 Akim Demaille <akim@epita.fr>
10415
10416 Now that states have a complete set of members, the linked list of
10417 reductions is useless: just fill directly the state's reductions
10418 member.
10419
10420 * src/state.h (struct reductions): Remove member `number' and
10421 `next'.
10422 * src/LR0.c (first_reduction, last_reduction): Remove.
10423 (save_reductions): Don't link the new reductions, store them in
10424 this_state.
10425 * src/lalr.c (set_state_table): No need to attach reductions to
10426 states, it's already done.
10427 * src/output.c (output_actions): No longer free the shifts, then
10428 the reductions, then the states: free all the states and their
10429 members.
10430
0edad749
AD
104312001-12-10 Akim Demaille <akim@epita.fr>
10432
10433 * src/options.c (OPTN, DRTV, BOTH): New.
10434 (option_table): Use them.
10435
0edad749
AD
10436 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
10437 the job of system.h.
10438 * src/options.c: Don't include stdio.h and xalloc.h for the same
10439 reasons.
10440
5449dd0f
AD
104412001-12-10 Akim Demaille <akim@epita.fr>
10442
10443 * src/output.c (output, prepare): Make sure the values of the
10444 muscles `action' and `prologue' are 0-terminated.
10445
a870c567
AD
104462001-12-10 Akim Demaille <akim@epita.fr>
10447
10448 Clean up GCC warnings.
10449
10450 * src/reader.c (copy_action): `buf' is not used.
10451 (parse_skel_decl): Be static.
10452 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
10453 * src/options.h (create_long_option_table): Have a real prototype.
10454 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
10455 (hash_delete_at): Return const void *.
10456 Adjust casts to preserve the const.
10457
80df8768
AD
104582001-12-10 Akim Demaille <akim@epita.fr>
10459
10460 * configure.in: Require 2.52g.
10461 M4 is not needed, but AUTOM4TE is.
10462 * m4/m4.m4: Remove.
10463 * tests/Makefile.am: Adjust.
10464
f693ad14
AD
104652001-12-10 Akim Demaille <akim@epita.fr>
10466
10467 One structure for states is enough, even though theoretically
10468 there are LR(0) states and LALR(1) states.
10469
10470 * src/lalr.h (state_t): Remove.
10471 (state_table): Be state_t **, not state_t *.
10472 * src/state.h (core, CORE_ALLOC): Rename as...
10473 (state_t, STATE_ALLOC): this.
10474 Add the LALR(1) members: shifts, reductions, errs.
10475 * src/LR0.c (state_table): Rename as...
10476 (state_hash): this, to avoid name clashes with the global
10477 `state_table'.
10478 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
10479 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
10480
74ffbcb6
AD
104812001-12-10 Akim Demaille <akim@epita.fr>
10482
10483 Bison dumps core on bash.y.
10484 Reported by Pascal Bart.
10485
10486 * src/warshall.c (bitmatrix_print): New.
10487 (TC): Use it.
ba0fe3c7 10488 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
74ffbcb6
AD
10489 j must be the outer loop.
10490 * tests/regression.at (Broken Closure): New.
10491
07708e19
AD
104922001-12-05 Akim Demaille <akim@epita.fr>
10493
10494 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
10495 its argument.
ba1ecc07 10496 Reported by Peter Hamorsky.
07708e19 10497
92b16366
AD
104982001-12-05 Akim Demaille <akim@epita.fr>
10499
10500 * src/conflicts.c (err_table): Remove.
10501 (resolve_sr_conflict): Adjust.
10502 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
10503 Rename as...
10504 (state_t.reductions, state_t.shifts): this.
10505
076ab033
AD
105062001-12-05 Akim Demaille <akim@epita.fr>
10507
10508 * src/reduce.c (reduce_grammar_tables): No longer disable the
10509 removal of useless rules via CPP but via `if (0)', so that the
10510 compiler still check the code is valid.
10511 For instance, it should have noticed `rline' no longer exists: use
10512 the `line' member of rule_t.
10513 * src/gram.c (dummy, rline): Remove, unused.
10514
3843c413
AD
105152001-12-05 Akim Demaille <akim@epita.fr>
10516
10517 * src/output.c (pack_vector): Use assert, not berror.
10518 * src/main.c (berror): Remove, unused.
10519
43168960
AD
105202001-12-05 Akim Demaille <akim@epita.fr>
10521
10522 New experimental feature: if --verbose --trace output all the
10523 items of a state, not only its kernel.
10524
10525 * src/print.c (print_core): If `trace_flag', then invoke closure
10526 before outputting the items of the state (print_core is no longer
10527 a correct name them).
10528 (print_results): Invoke new_closure/free_closure if needed.
10529
b2872512
AD
105302001-12-05 Akim Demaille <akim@epita.fr>
10531
10532 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
10533 * src/closure.c, src/closure.h (itemsetsize): Rename as...
10534 (nitemset): for consistency with the rest of the project.
10535
23cbcc6c
AD
105362001-12-05 Akim Demaille <akim@epita.fr>
10537
10538 * src/closure.c (print_closure): Improve.
10539 (closure): Use it for printing input and output.
10540
03ec521c
AD
105412001-12-05 Akim Demaille <akim@epita.fr>
10542
10543 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
10544 indexed by nonterminals.
10545
3a7456dd
AD
105462001-12-05 Akim Demaille <akim@epita.fr>
10547
10548 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
10549 what it was!).
10550 * src/warshall.h: Remove accidental duplication of the content.
10551
1cbcf2e7
AD
105522001-12-05 Akim Demaille <akim@epita.fr>
10553
10554 * src/closure.c (set_fderives): De-obfuscate.
10555
84182270
AD
105562001-12-05 Akim Demaille <akim@epita.fr>
10557
10558 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
10559
3f6f053c
AD
105602001-12-05 Akim Demaille <akim@epita.fr>
10561
10562 * src/closure.c (set_firsts): De-obfuscate.
10563
7a5350ba
AD
105642001-12-05 Akim Demaille <akim@epita.fr>
10565
10566 * src/output.c (action_row): De-obfuscate
10567 using the good o' techniques: arrays not pointers, variable
10568 locality, BITISSET, RESETBIT etc.
10569
d954473d
AD
105702001-12-05 Akim Demaille <akim@epita.fr>
10571
10572 Pessimize the code to simplify it: from now on, all the states
10573 have a valid SHIFTS, which NSHIFTS is possibly 0.
10574
10575 * src/LR0.c (shifts_new): Be global and move to..
10576 * src/state.c, src/state.h: here.
10577 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
10578 * src/print_graph: Adjust.
10579
9839bbe5
AD
105802001-12-05 Akim Demaille <akim@epita.fr>
10581
10582 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
10583 * src/conflicts.c: Use it.
10584 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
10585 incorrectly ``simplified''.
10586
9f136c07
AD
105872001-12-05 Akim Demaille <akim@epita.fr>
10588
10589 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
10590 using the good o' techniques: arrays not pointers, variable
10591 locality, BITISSET, RESETBIT etc.
10592
b608206e
AD
105932001-12-05 Akim Demaille <akim@epita.fr>
10594
10595 * src/state.h (SHIFT_SYMBOL): New.
10596 * src/conflicts.c: Use it to deobfuscate.
10597
52afa962
AD
105982001-12-05 Akim Demaille <akim@epita.fr>
10599
10600 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
10601 (print_reductions): De-obfuscate using the good o' techniques:
10602 arrays not pointers, variable locality, BITISSET.
10603
e74dc321
AD
106042001-12-05 Akim Demaille <akim@epita.fr>
10605
10606 * src/conflicts.c (print_reductions): Arrays, not pointers.
10607 Use BITISSET.
10608
768fca83
AD
106092001-12-05 Akim Demaille <akim@epita.fr>
10610
10611 * src/conflicts.c (print_reductions): Pessimize, but clarify.
10612
a17e599f
AD
106132001-12-05 Akim Demaille <akim@epita.fr>
10614
10615 * src/conflicts.c (print_reductions): Improve variable locality.
10616
a04bc341
AD
106172001-12-05 Akim Demaille <akim@epita.fr>
10618
10619 * src/conflicts.c (print_reductions): Pessimize, but clarify.
10620
c8ea038e
AD
106212001-12-05 Akim Demaille <akim@epita.fr>
10622
10623 * src/conflicts.c (print_reductions): Improve variable locality.
10624
aa2aab3c
AD
106252001-12-05 Akim Demaille <akim@epita.fr>
10626
10627 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
10628 * src/lalr.c: Use them.
10629
b178c8cc
AD
106302001-12-05 Akim Demaille <akim@epita.fr>
10631
10632 * src/LR0.c (augment_automaton): Formatting changes.
10633 Better variable locality.
10634
f67d13aa
AD
106352001-12-05 Akim Demaille <akim@epita.fr>
10636
10637 * src/lalr.c (matrix_print): New.
10638 (transpose): Use it.
10639 Use arrays instead of pointers.
10640
c2713865
AD
106412001-12-05 Akim Demaille <akim@epita.fr>
10642
10643 * src/lalr.c (maxrhs): Move to...
10644 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
10645 * src/lalr.c (build_relations): Adjust.
10646
9887c18a
AD
106472001-12-05 Akim Demaille <akim@epita.fr>
10648
10649 * src/lalr.c (transpose): Free the memory allocated to the
10650 argument, as it is replaced by the results by the unique caller.
10651 (build_relations): Merely invoke transpose: it handles the memory
10652 deallocation.
10653 Improve variable locality.
10654 Avoid variables used as mere abbreviations.
10655 (compute_lookaheads): Use arrays instead of pointers.
10656
4d4f699c
AD
106572001-12-05 Akim Demaille <akim@epita.fr>
10658
10659 * src/lalr.c (initialize_F): Improve variable locality.
10660 Avoid variables used as mere abbreviations.
10661
80a69750
AD
106622001-12-05 Akim Demaille <akim@epita.fr>
10663
10664 * src/derives.c (print_derives): Display the ruleno.
10665 * src/lalr.c (initialize_F, transpose): Better variable locality
10666 to improve readability.
10667 Avoid variables used as mere abbreviations.
10668
fe961097
AD
106692001-12-05 Akim Demaille <akim@epita.fr>
10670
10671 * src/lalr.c (traverse): Use arrays instead of pointers.
10672
e3e4e814
AD
106732001-12-05 Akim Demaille <akim@epita.fr>
10674
10675 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
10676 the handling of squeue.
10677 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
10678
630e182b
AD
106792001-12-05 Akim Demaille <akim@epita.fr>
10680
10681 Because useless nonterminals are now kept alive (instead of being
10682 `destroyed'), we now sometimes examine them, and store information
10683 related to them. Hence we need to know their number, and adjust
10684 memory allocations.
10685
10686 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
10687 static.
10688 * src/LR0.c (allocate_itemsets): The memory allocated to
10689 `symbol_count' was used for two different purpose: once to count
10690 the number of occurrences of each symbol, and later reassigned to
10691 `shift_symbol', containing the symbol that can be shifted from a
10692 given state.
10693 Deobfuscate, i.e., allocate, use and free `symbol_count' here
10694 only, and...
10695 (new_itemsets): Allocate `shift_symbol' here.
10696 (allocate_itemsets): symbol_count includes useless nonterminals.
10697 Make room for them.
10698 (free_storage): Use `free', not `XFREE', for pointers that cannot
10699 be null.
10700
81b51460
AD
107012001-12-05 Akim Demaille <akim@epita.fr>
10702
10703 * src/nullable.c (set_nullable): Deobfuscate the handling of
10704 ritem.
10705 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
10706
3067fbef
AD
107072001-12-05 Akim Demaille <akim@epita.fr>
10708
10709 * src/gram.c, src/gram.h (ritem_print): New.
10710 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
10711 (This useless function was defined only to work around VMS linkers
10712 that can't handle compilation units with variables only).
10713 * src/reduce.c (dump_grammar): Use it to trace the construction of
10714 ritem.
10715
c2bea5f9
PE
107162001-12-04 Paul Eggert <eggert@twinsun.com>
10717
7d27c823
PE
10718 * src/bison.simple (union yyalloc): Change member names
10719 to be the same as the stack names.
10720 (yyparse): yyptr is now union yyalloc *, not char *.
10721 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
10722 and may generate better code on some machines.
c2bea5f9
PE
10723 (yystpcpy): Use prototype if __STDC__ is defined, not just
10724 if __cplusplus is defined.
35687a9d 10725
2c8a9dfa
AD
107262001-11-30 Akim Demaille <akim@epita.fr>
10727
10728 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
10729 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
10730 Gettext doesn't compile cleanly, and dies with -Werror.
10731 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
10732 Include WARNING_CFLAGS here.
10733 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
10734 before being defined.
10735
f4e421e6
AD
107362001-11-27 Paul Eggert <eggert@twinsun.com>
10737
10738 * lib/quotearg.h (quotearg_n, quotearg_n_style):
10739 First arg is int, not unsigned.
10740 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
10741 (SIZE_MAX, UINT_MAX): New macros.
10742 (quotearg_n_options): Abort if N is negative.
10743 Avoid overflow check on hosts where size_t is 64 bits and int
10744 is 32 bits, as overflow is impossible there.
10745 Fix off-by-one typo that caused unnecessary reallocation.
10746
7093d0f5
AD
107472001-11-29 Paul Eggert <eggert@twinsun.com>
10748
10749 Name space cleanup in generated parser.
10750
10751 * doc/bison.texinfo (Bison Parser): Discuss system headers
10752 and their effect on the user name space.
10753
10754 * src/bison.simple:
10755 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
10756 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
10757 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
10758
10759 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
10760 on user names when possible.
10761
10762 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
10763 Simplify test for whather <alloca.h> exists.
10764
10765 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
10766
10767 (<stdio.h>): Include if YYDEBUG.
10768
10769 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
10770 ! defined (yyoverflow) && ! defined (yymemcpy).
10771
10772 (yymemcpy, yyparse): Rename local variables as needed so that
10773 they all begin with 'yy'.
10774
10775 (yystrlen, yystpcpy): New functions.
10776
10777 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
10778 All uses changed.
10779
10780 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
10781 instead of relying on string.h functions. Use YYSTACK_ALLOC
10782 and YYSTACK_FREE instead of malloc and free.
10783
fd51e5ff
AD
107842001-11-30 Akim Demaille <akim@epita.fr>
10785
10786 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
10787 before their first uses.
10788 (YYBISON, YYPURE): Move to the top of the output.
10789
7d13ff5f
AD
107902001-11-30 Akim Demaille <akim@epita.fr>
10791
10792 * tests/reduce.at (Useless Nonterminals): Fix.
10793
892a3995
AD
107942001-11-30 Akim Demaille <akim@epita.fr>
10795
10796 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
10797 if body instead of `;' to pacify GCC's warnings.
10798
68f1e3ed
AD
107992001-11-30 Akim Demaille <akim@epita.fr>
10800
10801 Instead of mapping the LHS of unused rules to -1, keep the LHS
10802 valid, but flag the rules as invalid.
10803
10804 * src/gram.h (rule_t): `useful' is a new member.
10805 * src/print.c (print_grammar): Adjust.
10806 * src/derives.c (set_derives): Likewise.
10807 * src/reader.c (packgram, reduce_output): Likewise.
10808 * src/reduce.c (reduce_grammar_tables): Likewise.
10809 * tests/reduce.at (Underivable Rules, Useless Rules): New.
10810
d2d1b42b
AD
108112001-11-30 Akim Demaille <akim@epita.fr>
10812
10813 * src/reduce.c (reduce_output): Formatting changes.
10814 * src/print.c (print_results, print_grammar): Likewise.
10815 * tests/regression.at (Rule Line Numbers)
10816 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
10817
760b53a8
AD
108182001-11-30 Akim Demaille <akim@epita.fr>
10819
10820 * src/reduce.c (nonterminals_reduce): Instead of throwing away
10821 useless nonterminals, move them at the end of the symbol arrays.
10822 (reduce_output): Adjust.
10823 * tests/reduce.at (Useless Nonterminals): Adjust.
10824
00238958
AD
108252001-11-30 Akim Demaille <akim@epita.fr>
10826
10827 * src/reduce.c: Various comment/formatting changes.
10828 (nonterminals_reduce): New, extracted from...
10829 (reduce_grammar_tables): here.
10830 (reduce_grammar): Call nonterminals_reduce.
10831
396452de
PE
108322001-11-29 Paul Eggert <eggert@twinsun.com>
10833
10834 * src/bison.simple (YYSTACK_REALLOC): Remove.
10835 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
10836 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
10837 New macros.
10838 (union yyalloc): New type.
10839 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
10840 an arbitrary restriction on hosts where size_t is wider than int.
10841
10842 (yyparse): Don't dump core if alloca or malloc fails; instead, report
10843 a parser stack overflow. Allocate just one block of memory for all
10844 three stacks, instead of allocating three blocks; this typically is
10845 faster and reduces fragmentation.
10846
10847 Do not limit the number of items in the stack to a value that fits
10848 in 'int', as this is an arbitrary limit on hosts with 64-bit
10849 size_t and 32-bit int.
10850
147e184c
MA
108512001-11-29 Marc Autret <autret_m@epita.fr>
10852
10853 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
10854 of defining YYERROR_VERBOSE.
10855 [AT_DATA]: $4 is now out of C declarations in the prologue.
10856
426cf563
MA
108572001-11-28 Marc Autret <autret_m@epita.fr>
10858
10859 * src/reader.c (parse_dquoted_param): New.
10860 (parse_skel_decl): Use it.
10861 * src/lex.h: Add its prototype.
10862 * src/lex.c (literalchar): Become not static.
10863
c7925b99
MA
108642001-11-28 Marc Autret <autret_m@epita.fr>
10865
10866 * src/output.h: And put its extern declaration here.
10867 * src/output.c (error_verbose): Define here.
10868 (prepare): Echo name modification.
10869 * src/getargs.h: Clean its extern declaration.
10870 * src/getargs.c (error_verbose_flag): Remove.
10871 (getargs): Remove case 'e'.
10872 * src/options.c (option_table): 'error-verbose' is now seen as simple
10873 percent option.
10874 Include output.h.
10875
10876 * src/reader.c (read_declarations): Remove case tok_include.
10877 (parse_include_decl): Remove.
10878 * src/lex.h (token_t): Remove tok_include.
10879 * src/options.c (option_table): 'include' is now a simple command line
10880 option.
10881
5b5d1929
MA
108822001-11-28 Marc Autret <autret_m@epita.fr>
10883
10884 * src/bison.simple: Adjust muscle names.
10885 * src/muscle_tab.c (muscle_init): Also rename the muscles.
10886 * src/output.c (prepare): s/_/-/ for the muscles names.
10887 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
10888
8850be4b
MA
108892001-11-28 Marc Autret <autret_m@epita.fr>
10890
10891 * src/bison.simple: Fix debug.
10892 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
10893
4a38e613
AD
108942001-11-28 Akim Demaille <akim@epita.fr>
10895
10896 * src/LR0.c (shifts_new): New.
10897 (save_shifts, insert_start_shift, augment_automaton): Use it.
10898
4b35e1c1
AD
108992001-11-28 Akim Demaille <akim@epita.fr>
10900
10901 * src/closure.c (closure): `b' and `ruleno' denote the same value:
10902 keep ruleno only.
10903
d2b04478
AD
109042001-11-28 Akim Demaille <akim@epita.fr>
10905
10906 * src/closure.c (closure): Instead of looping over word in array
10907 then bits in words, loop over bits in array.
10908
2c4c30aa
AD
109092001-11-28 Akim Demaille <akim@epita.fr>
10910
10911 * src/closure.c (closure): No longer optimize the special case
10912 where all the bits of `ruleset[r]' are set to 0, to make the code
10913 clearer.
10914
576890b7
AD
109152001-11-28 Akim Demaille <akim@epita.fr>
10916
10917 * src/closure.c (closure): `r' and `c' are new variables, used to
10918 de-obfuscate accesses to RULESET and CORE.
10919
cb487d7d
AD
109202001-11-28 Akim Demaille <akim@epita.fr>
10921
10922 * src/reduce.c (reduce_print): Use ngettext.
10923 (dump_grammar): Improve the trace accuracy.
10924
6013d43f
AD
109252001-11-28 Akim Demaille <akim@epita.fr>
10926
10927 * src/reduce.c (dump_grammar): Don't translate trace messages.
10928
cb4956ee
AD
109292001-11-28 Akim Demaille <akim@epita.fr>
10930
10931 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
10932 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
10933 as all tags are free'ed afterwards.
10934 From Enrico Scholz.
10935
648185ab
PE
109362001-11-27 Paul Eggert <eggert@twinsun.com>
10937
10938 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
10939 use alloca when we didn't want to, and vice versa.
10940
68254a03
MA
109412001-11-27 Marc Autret <autret_m@epita.fr>
10942
9113b58f
AD
10943 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
10944 initialization.
68254a03
MA
10945 * src/output.c (prepare): Remove its update.
10946
04d843a2
MA
109472001-11-27 Marc Autret <autret_m@epita.fr>
10948
10949 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
10950 Use %error-verbose.
10951
d2079671 109522001-11-27 Marc Autret <autret_m@epita.fr>
eeeb962b
MA
10953
10954 * src/bison.simple: Remove YYERROR_VERBOSE using.
10955 Use %%error_verbose.
10956 (yyparse): Likewise.
10957 * src/output.c (prepare): Give its final value.
10958 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
10959 * src/getargs.h: Add its extern declaration.
10960 * src/getargs.c (error_verbose_flag): New int.
10961 (getargs): Update to catch new case.
10962 * src/options.c (option_table): 'error-verbose' is a new option.
10963 (shortopts): Update.
10964
e0327bc8
AD
109652001-11-27 Akim Demaille <akim@epita.fr>
10966
10967 * src/system.h: Use intl/libgettext.h.
10968 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
10969
000f1a3c
AD
109702001-11-27 Akim Demaille <akim@epita.fr>
10971
10972 * tests/torture.at (Exploding the Stack Size with Malloc):
10973 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
10974
26cfe0be
AD
109752001-11-27 Akim Demaille <akim@epita.fr>
10976
10977 * src/files.c: Include error.h.
10978 Reported by Hans Aberg.
10979
f6bd5427
MA
109802001-11-26 Marc Autret <autret_m@epita.fr>
10981
d2079671 10982 * src/reader.c (parse_include_decl): New, not yet implemented.
f6bd5427
MA
10983 (read_declarations): Add case tok_include.
10984 * src/getargs.h (include): Add its extern definition.
10985 * src/getargs.c (include): New const char *.
10986 (getargs): Add case '-I'.
10987 * src/options.c (option_table): Add include as command line and
10988 percent option.
10989 * src/lex.h (token_t): Add tok_include.
10990
2ca209c1
AD
109912001-11-26 Akim Demaille <akim@epita.fr>
10992
10993 * src/reader.c (readgram): Make sure rules for mid-rule actions
10994 have a lineno equal to that of their host rule.
10995 Reported by Hans Aberg.
10996 * tests/regression.at (Rule Line Numbers): New.
10997
0e41b407
AD
109982001-11-26 Akim Demaille <akim@epita.fr>
10999
11000 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
11001 size_ts.
11002
110032001-11-26 Akim Demaille <akim@epita.fr>
11004
11005 * src/complain.c, src/complain.h (error): Remove, provided by
11006 lib/error.[ch].
11007
e0c40012
AD
110082001-11-26 Akim Demaille <akim@epita.fr>
11009
11010 * src/reader.c (read_declarations): Don't abort on tok_illegal,
11011 issue an error message.
11012 * tests/regression.at (Invalid %directive): New.
11013 Reported by Hans Aberg.
11014
5e147124
AD
110152001-11-26 Akim Demaille <akim@epita.fr>
11016
11017 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
11018 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
11019
a034c8b8
AD
110202001-11-26 Akim Demaille <akim@epita.fr>
11021
11022 * src/conflicts.c (conflicts_print): Don't complain at all when
11023 there are no reduce/reduce conflicts, and as many shift/reduce
11024 conflicts as expected.
11025 * tests/regression.at (%expect right): Adjust.
11026
c64a20f3
AD
110272001-11-23 Akim Demaille <akim@epita.fr>
11028
11029 * lib/alloca.c: Update, from fileutils.
11030
5b0d29bb
AD
110312001-11-23 Akim Demaille <akim@epita.fr>
11032
11033 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
11034
722c4bfe
AD
110352001-11-23 Akim Demaille <akim@epita.fr>
11036
11037 * src/system.h: Include alloca.h.
11038 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
11039
6255b435
AD
110402001-11-23 Akim Demaille <akim@epita.fr>
11041
11042 * src/print_graph.c (print_actions): Remove `rule', unused.
11043 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
11044 pacify GCC's signed < unsigned warnings.
11045 * src/closure.c (itemsetsize): Likewise.
11046 * src/reader.c (symbol_list_new): Static.
11047
b29b2ed5
AD
110482001-11-23 Akim Demaille <akim@epita.fr>
11049
11050 Attaching lineno to buckets is stupid, since only one copy of each
11051 symbol is kept, only the line of the first occurrence is kept too.
11052
11053 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
11054 * src/reader.c (rline_allocated): Remove, unused.
11055 (symbol_list): Have a `line' member.
11056 (symbol_list_new): New.
11057 (readgram): Use it.
11058 * src/print.c (print_grammar): Output the rule line numbers.
11059 * tests/regression.at (Solved SR Conflicts)
11060 (Unresolved SR Conflicts): Adjust.
11061 Reported by Hans Aberg.
11062
a81b1d4a
MA
110632001-11-22 Marc Autret <autret_m@epita.fr>
11064
11065 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
11066
c1ecb3c1
MA
110672001-11-22 Marc Autret <autret_m@epita.fr>
11068
11069 * src/muscle_tab.c (muscle_init): Remove initialization of
11070 skeleton muscle.
11071 * src/output.c (output_master_parser): Do it here.
11072
fbe01355
AD
110732001-11-20 Akim Demaille <akim@epita.fr>
11074
11075 * po/sv.po: New.
11076 * configure.in (ALL_LINGUAS): Adjust.
11077 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
11078 longer contains strings to translate.
11079
81e895c0
AD
110802001-11-19 Akim Demaille <akim@epita.fr>
11081
11082 * src/conflicts.c (conflicts_print): Add a missing \n.
11083
6bb1878b
AD
110842001-11-19 Akim Demaille <akim@epita.fr>
11085
11086 * src/nullable.c (nullable_print): New.
11087 (set_nullable): Call it when tracing.
11088 Better locality of variables.
11089
d9ec2d07
AD
110902001-11-19 Akim Demaille <akim@epita.fr>
11091
11092 * src/print.c (print_actions): Better locality of variables.
11093
720e5c1b
AD
110942001-11-19 Akim Demaille <akim@epita.fr>
11095
11096 * src/derives.c (print_derives): Fix and enrich.
11097 * src/closure.c (print_fderives): Likewise.
11098
fb908786
AD
110992001-11-19 Akim Demaille <akim@epita.fr>
11100
11101 * src/closure.c (itemsetend): Remove, replaced with...
11102 (itemsetsize): new.
11103
125ecb56
AD
111042001-11-19 Akim Demaille <akim@epita.fr>
11105
11106 * src/LR0.c (kernel_end): Remove, replaced with...
11107 (kernel_size): new.
11108
d8cf039f
AD
111092001-11-19 Akim Demaille <akim@epita.fr>
11110
11111 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
11112 to clarify.
11113
7bec0760
AD
111142001-11-19 Akim Demaille <akim@epita.fr>
11115
11116 * src/closure.c (closure): Use arrays instead of pointers to clarify.
11117
c87d4863
AD
111182001-11-19 Akim Demaille <akim@epita.fr>
11119
11120 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
11121 trace messages.
11122 * src/LR0.c: Likewise.
11123 (allocate_itemsets): Use arrays instead of pointers to clarify.
11124
9bfe901c
AD
111252001-11-19 Akim Demaille <akim@epita.fr>
11126
11127 * src/getargs.c (statistics_flag): Replace with...
11128 (trace_flag): New.
11129 (longopts): Accept --trace instead of --statistics.
11130 * src/getargs.h, src/options.c: Adjust.
11131 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
11132 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
11133
97db7bd4
AD
111342001-11-19 Akim Demaille <akim@epita.fr>
11135
cc72668c 11136 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
97db7bd4
AD
11137 pointers to clarify the code.
11138 (save_reductions, save_shifts): Factor common parts of alternatives.
11139
2c5f66ed
AD
111402001-11-19 Akim Demaille <akim@epita.fr>
11141
11142 * src/LR0.c (new_state, get_state): Complete TRACE code.
11143 * src/closure.c: Include `reader.h' to get `tags', needed by the
11144 trace code.
11145 Rename the conditional DEBUG as TRACE.
11146 Output consistently TRACEs to stderr, not stdout.
11147 * src/derives.c: Likewise.
11148 * src/reduce.c: (inaccessable_symbols): Using if is better style
11149 than goto.
11150 Use `#if TRACE' instead of `#if 0' for tracing code.
11151
300f275f
AD
111522001-11-19 Akim Demaille <akim@epita.fr>
11153
11154 * src/system.h (LIST_FREE, shortcpy): New.
11155 * src/LR0.c: Use them.
11156 * src/output.c (free_itemsets, free_reductions, free_shifts):
11157 Remove, replaced by LIST_FREE.
11158
f59c437a
AD
111592001-11-19 Akim Demaille <akim@epita.fr>
11160
11161 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
11162 (REDUCTIONS_ALLOC): New.
11163 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
11164 allocation.
11165
6986fd9e
AD
111662001-11-19 Akim Demaille <akim@epita.fr>
11167
11168 * src/LR0.c (new_state): Complete trace code.
11169 * src/nullable.c (set_nullable): Don't translate traces.
11170
4bc30f78
AD
111712001-11-19 Akim Demaille <akim@epita.fr>
11172
11173 * src/print_graph.c (print_core): Better locality of variables.
11174 * src/print.c (print_core): Likewise.
11175
08a946e0
AD
111762001-11-19 Akim Demaille <akim@epita.fr>
11177
11178 * src/vcg.c: You do the output, so you are responsible of the
11179 handling of VCG syntax, in particular: use quotearg.
11180 * src/print_graph.c: Don't.
11181 (print_actions): Don't output the actions as part of the nodes,
11182 since that's the job of the edges.
11183 (print_state): Don't output by hand: fill the node description,
9bfe901c 11184 and ask for its output.
08a946e0 11185
f0473484
AD
111862001-11-19 Akim Demaille <akim@epita.fr>
11187
cc72668c
AD
11188 * src/bison.simple (yyparse): When verbosely reporting an error,
11189 no longer put additional quotes around token names.
f0473484
AD
11190 * tests/calc.at: Adjust.
11191
e41dc700
AD
111922001-11-19 Akim Demaille <akim@epita.fr>
11193
11194 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
11195 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
11196 * src/output.c: Adjust.
11197
652a871c
AD
111982001-11-19 Akim Demaille <akim@epita.fr>
11199
11200 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
11201 (rule_t): this.
11202 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
11203
b2ed6e58
AD
112042001-11-19 Akim Demaille <akim@epita.fr>
11205
11206 * src/gram.h (rule_t): New.
11207 (rule_table): New.
11208 (rrhs, rlhs): Remove, part of state_t.
11209 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
11210 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
11211 * src/reader.c, src/reduce.c: Adjust.
11212
edad7067
AD
112132001-11-19 Akim Demaille <akim@epita.fr>
11214
11215 * src/reader.c (symbols_output): New, extracted from...
11216 (packsymbols): Here.
11217 (reader): Call it.
11218
3feec034
AD
112192001-11-19 Akim Demaille <akim@epita.fr>
11220
11221 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
11222 (maxrhs): this new function.
11223
ddcd5fdf
AD
112242001-11-19 Akim Demaille <akim@epita.fr>
11225
cc72668c 11226 * src/lalr.c (F): New macro to access the variable F.
ddcd5fdf
AD
11227 Adjust.
11228
bb527fc2
AD
112292001-11-19 Akim Demaille <akim@epita.fr>
11230
cc72668c 11231 * src/lalr.h (LA): New macro to access the variable LA.
bb527fc2
AD
11232 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
11233 * src/lalr.c: Adjust.
11234
a845a697
AD
112352001-11-19 Akim Demaille <akim@epita.fr>
11236
11237 * src/lalr.c (initialize_LA): Only initialize LA. Let...
11238 (set_state_table): handle the `lookaheads' members.
11239
f004bf6a
AD
112402001-11-19 Akim Demaille <akim@epita.fr>
11241
cc72668c
AD
11242 * src/lalr.h (lookaheads): Removed array, whose contents is now
11243 a member of...
f004bf6a
AD
11244 (state_t): this structure.
11245 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
11246 Adjust.
11247
de326cc0
AD
112482001-11-19 Akim Demaille <akim@epita.fr>
11249
cc72668c
AD
11250 * src/lalr.h (consistent): Removed array, whose contents is now
11251 a member of...
de326cc0
AD
11252 (state_t): this structure.
11253 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
11254 Adjust.
11255
90b4416b
AD
112562001-11-19 Akim Demaille <akim@epita.fr>
11257
cc72668c
AD
11258 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
11259 contents are now members of...
90b4416b
AD
11260 (state_t): this structure.
11261 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
11262 Adjust.
11263
9703cc49
AD
112642001-11-19 Akim Demaille <akim@epita.fr>
11265
11266 * src/lalr.h (state_t): New.
11267 (state_table): Be a state_t * instead of a core **.
11268 (accessing_symbol): Remove, part of state_t.
11269 * src/lalr.c: Adjust.
11270 (set_accessing_symbol): Merge into...
11271 (set_state_table): this.
11272 * src/print_graph.c, src/conflicts.c: Adjust.
11273
d803322e
AD
112742001-11-14 Akim Demaille <akim@epita.fr>
11275
11276 * tests/calc.at, tests/output.at, tests/regression.at,
11277 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
11278 now the tests are run in private dirs, therefore AC_CLEANUP and
11279 family can be simplified to 0-ary.
11280 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
11281 use abs. path to find config.h.
11282 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
11283 stderr, there can be way too much random noise.
11284 Instead pass -Werror to GCC and rely on the exit status.
11285 Reported by Wolfram Wagner.
11286
3d76b07d
AD
112872001-11-14 Akim Demaille <akim@epita.fr>
11288
11289 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
11290 defined only if yyoverflow is defined, to avoid `warning: unused
11291 variable `yyvs1''.
11292 Reported by The Test Suite.
11293
09b503c8
AD
112942001-11-14 Akim Demaille <akim@epita.fr>
11295
11296 * src/print.c: Include reduce.h.
11297 Reported by Hans Aberg.
11298
112992001-11-14 Akim Demaille <akim@epita.fr>
11300
11301 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
11302 Revert a previous patch: these are really const.
11303 * src/conflicts.c (conflict_report): Additional useless pair of
11304 braces to pacify GCC's warnings for `if () if () {} else {}'.
11305 * src/lex.c (parse_percent_token): Replace equal_offset with
11306 arg_offset.
11307 arg is const.
11308 Be sure to strdup `arg' when used, since there is no reason for
11309 token_buffer not to change.
11310
0f37a994
AD
113112001-11-14 Akim Demaille <akim@epita.fr>
11312
11313 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
11314 definition.
11315 * src/main.c (main): Use them.
11316 Suggested by Hans Aberg.
11317
d39d93b8
AD
113182001-11-12 Akim Demaille <akim@epita.fr>
11319
11320 * src/system.h (ngettext): Now that we use ngettext, be sure to
11321 provide a default definition when NLS are not used.
11322
9edcd895
AD
113232001-11-12 Akim Demaille <akim@epita.fr>
11324
11325 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
11326 Use @kbd to denote user input.
11327 (Language and Grammar): ANSIfy the example.
11328 Adjust its layout for info/notinfo.
11329 (Location Tracking Calc): Output error messages to stderr.
11330 Output locations in a more GNUtically correct way.
11331 Fix a couple of Englishos.
11332 Adjust @group/@end group pairs.
11333
7da99ede
AD
113342001-11-12 Akim Demaille <akim@epita.fr>
11335
e3aa65c5 11336 %expect was not functioning at all.
7da99ede
AD
11337
11338 * src/conflicts.c (expected_conflicts): Set to -1.
11339 (conflict_report): Use ngettext.
11340 (conflicts_print): Check %expect and make its violation an error.
11341 * doc/bison.texinfo (Expect Decl): Adjust.
11342 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
11343 * tests/regression.at (%expect not enough, %expect right)
11344 (%expect too much): New.
11345
ba9dda1a
AD
113462001-11-12 Akim Demaille <akim@epita.fr>
11347
11348 * tests/regression.at (Conflicts): Rename as...
11349 (Unresolved SR Conflicts): this.
11350 (Solved SR Conflicts): New.
11351
337c5bd1
AD
113522001-11-12 Akim Demaille <akim@epita.fr>
11353
11354 * src/reduce.c (print_results): Rename as...
11355 (reduce_output): This.
11356 Output to OUT, passed as argument, instead of output_obstack.
11357 (dump_grammar): Likewise.
11358 (reduce_free): New.
11359 Also free V1.
11360 (reduce_grammar): No longer call reduce_output, since...
11361 * src/print.c (print_results): do it.
11362 * src/main.c (main): Call reduce_free;
11363
c73a41af
AD
113642001-11-12 Akim Demaille <akim@epita.fr>
11365
11366 * src/conflicts.c (print_reductions): Accept OUT as argument.
11367 Output to it, not to output_obstack.
11368 * src/print.c (print_actions): Adjust.
11369
0df87bb6
AD
113702001-11-12 Akim Demaille <akim@epita.fr>
11371
11372 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
11373 the result instead of using...
11374 (src_total, rrc_total, src_count, rrc_count): Remove.
11375 (any_conflicts): Remove.
11376 (print_conflicts): Split into...
11377 (conflicts_print, conflicts_output): New.
11378 * src/conflicts.h: Adjust.
11379 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
0f37a994 11380 * src/print.c (print_grammar): Issue `\n' between two rules.
0df87bb6
AD
11381 * tests/regression.at (Conflicts): New.
11382 Reported by Tom Lane.
11383
e4d3d4de
AD
113842001-11-12 Akim Demaille <akim@epita.fr>
11385
11386 * tests/regression.at (Invalid input): Remove, duplicate with
11387 ``Invalid input: 1''.
11388
6d7d248e
AD
113892001-11-12 Akim Demaille <akim@epita.fr>
11390
11391 * tests/torture.at (AT_DATA_STACK_TORTURE)
11392 (Exploding the Stack Size with Alloca)
11393 (Exploding the Stack Size with Malloc): New.
11394
e9e4c321
AD
113952001-11-12 Akim Demaille <akim@epita.fr>
11396
11397 * src/bison.simple (YYSTACK_REALLOC): New.
11398 (yyparse) [!yyoverflow]: Use it and free the old stack.
0f37a994 11399 Reported by Per Allansson.
e9e4c321 11400
5f7e0832
AD
114012001-11-12 Pascal Bart <pascal.bart@epita.fr>
11402
11403 * src/bison.simple: Define type yystype instead of YYSTYPE, and
11404 define CPP macro, which substitute YYSTYPE by yystype.
11405 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
11406 with yyltype/YYLTYPE. This allows inclusion of the generated
11407 header within the parser if the compiler, such as GGC, accepts
11408 multiple equivalent #defines.
11409 From Akim.
11410
e3f1699f
AD
114112001-11-05 Akim Demaille <akim@epita.fr>
11412
11413 * src/reader.c (symbols_output): New, extracted from...
11414 (packsymbols): here.
11415 (reader): Adjust.
11416
65be0866
AD
114172001-11-05 Akim Demaille <akim@epita.fr>
11418
11419 * src/lex.c (parse_percent_token): s/quotearg/quote/.
11420
e4d910bf
AD
114212001-11-05 Akim Demaille <akim@epita.fr>
11422
11423 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
11424 pattern.
11425
951366c1
AD
114262001-11-05 Akim Demaille <akim@epita.fr>
11427
11428 * src/options.h (struct option_table_struct): set_flags is void*.
11429 * src/options.c (longopts): Support `--output' and `%output'.
11430 (usage): Adjust.
11431 * src/lex.h (tok_setopt): Remove, replaced with...
11432 (tok_intopt, tok_stropt): these new guys.
11433 * src/lex.c (getopt.h): Not needed.
11434 (token_buffer, unlexed_token_buffer): Not const.
11435 (percent_table): Promote `-' over `_' in directive names.
11436 Active `%name-prefix', `file-prefix', and `output'.
11437 (parse_percent_token): Accept possible arguments to directives.
11438 Promote `-' over `_' in directive names.
11439
d8988b2f
AD
114402001-11-04 Akim Demaille <akim@epita.fr>
11441
11442 * doc/bison.texinfo (Decl Summary): Split the list into
11443 `directives for grammars' and `directives for bison'.
11444 Sort'em.
11445 Add description of `%name-prefix', `file-prefix', and `output'.
11446 Promote `-' over `_' in directive names.
11447 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
11448 Simplify the description of `--name-prefix'.
11449 Promote `-' over `_' in directive names.
11450 Promote `--output' over `--output-file'.
11451 Fix the description of `--defines'.
11452 * tests/output.at: Exercise %file-prefix and %output.
11453
6468d18e
AD
114542001-11-02 Akim Demaille <akim@epita.fr>
11455
11456 * doc/refcard.tex: Update.
11457
6b7e85b9
AD
114582001-11-02 Akim Demaille <akim@epita.fr>
11459
11460 * src/symtab.h (SUNDEF): New.
11461 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
11462 stand for `uninitialized', instead of 0.
11463 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
11464 * src/lex.c (lex): Adjust.
11465
11466 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
11467 Number it 0.
11468 Let yylex return it instead of a plain 0.
11469 Reported by Dick Streefland.
11470
cd5aafcf
AD
114712001-11-02 Akim Demaille <akim@epita.fr>
11472
11473 * tests/regression.at (Mixing %token styles): New test.
11474
037ca2f1
AD
114752001-11-02 Akim Demaille <akim@epita.fr>
11476
11477 * src/reader.c (parse_thong_decl): Formatting changes.
11478 (token_translations_init): New, extracted from...
11479 (packsymbols): Here.
11480 Adjust.
11481
270a173c
AD
114822001-11-01 Akim Demaille <akim@epita.fr>
11483
11484 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
11485 Check that `9foo.y' produces correct cpp guards.
11486 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
11487 guards.
11488 Reported by Wwp.
11489
561f9a30
AD
114902001-11-01 Akim Demaille <akim@epita.fr>
11491
11492 * tests/regression.at (Invalid input: 2): New.
11493 * src/lex.c (unlexed_token_buffer): New.
11494 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
11495 too.
11496 Reported by Wwp.
11497
f987e9d2
AD
114982001-11-01 Akim Demaille <akim@epita.fr>
11499
11500 * tests/calc.at: Catch up with 1.30.
11501 * configure.in: Bump to 1.49a.
11502 Adjust to newer Autotest.
11503
0846f581
PB
115042001-10-19 Pascal Bart <pascal.bart@epita.fr>
11505
11506 * src/conflicts.c: Move global variables rrc_total and src_total ...
11507 (print_conflicts): here.
11508 * src/output.c (output): Free global variable user_toknums.
11509 * src/lex.c (token_obstack): Become static.
11510
3c1a79b3
AD
115112001-10-18 Akim Demaille <akim@epita.fr>
11512
11513 * tests/atlocal.in (GCC): Add.
11514 * tests/calc.at: s/m4_match/m4_bmatch/.
11515 s/m4_patsubst/m4_bpatsubst/.
11516 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
11517 * configure.in: AC_SUBST(GCC).
11518
5d52e7d0
MA
115192001-10-14 Marc Autret <autret_m@epita.fr>
11520
11521 * src/options.c (create_long_option_table): Fix.
11522
631aa1d3
AD
115232001-10-10 Akim Demaille <akim@epita.fr>
11524
11525 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
11526
f6ec6d13
AD
115272001-10-04 Akim Demaille <akim@epita.fr>
11528
11529 * src/reader.c (parse_union_decl): Push the caracters in
11530 union_obstack, not attrs_obstack.
11531
342b8b6e
AD
115322001-10-04 Akim Demaille <akim@epita.fr>
11533
11534 Merge in the branch 1.29.
11535
11536 * src/reader.c (packsymbols): Use a temporary obstack for
11537 `%%tokendef', since output_stack is already used elsewhere.
11538
11539 2001-10-02 Akim Demaille <akim@epita.fr>
11540
11541 Bump 1.29d.
11542
11543 2001-10-02 Akim Demaille <akim@epita.fr>
11544
11545 Version 1.29c.
11546
11547 2001-10-02 Akim Demaille <akim@epita.fr>
11548
11549 * tests/regression.at (Invalid CPP headers): New.
11550 From Alexander Belopolsky.
11551 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
11552
11553 2001-10-02 Akim Demaille <akim@epita.fr>
11554
11555 * tests/regression.at (Invalid input): New.
11556 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
11557 Reported by Shura.
11558
11559 2001-10-02 Akim Demaille <akim@epita.fr>
11560
11561 * tests/calc.at: Now that --debug works, the tests must be adjusted.
11562
11563 2001-10-02 Akim Demaille <akim@epita.fr>
11564
11565 * src/output.c (output_parser): Assert `skeleton'.
11566 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
11567 systems.
11568 From Shura.
11569
11570 2001-10-01 Marc Autret <autret_m@epita.fr>
11571
11572 * src/lex.h: Echo modifications.
11573 * src/lex.c (unlex): Parameter is now token_t.
11574 From Hans Aberg.
11575
11576 2001-10-01 Marc Autret <autret_m@epita.fr>
11577
11578 * src/main.c: Include lex.h.
11579 From Hans Aberg.
11580
11581 2001-09-29 Akim Demaille <akim@epita.fr>
11582
11583 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
11584
11585 2001-09-28 Akim Demaille <akim@epita.fr>
11586
11587 * tests/testsuite.at: Update to newer Autotest.
11588 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
11589
11590 2001-09-27 Akim Demaille <akim@epita.fr>
11591
11592 Position independent wrapper.
11593
11594 * tests/bison: Remove.
11595 * tests/bison.in: New.
11596 * configure.in: Adjust.
11597
11598 2001-09-27 Paul Eggert <eggert@twinsun.com>
11599
11600 Port quotearg fixes from tar 1.13.24.
11601
11602 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
11603 tm to be declared.
11604 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
11605 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
11606
11607 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
11608 * m4/mbrtowc.m4: New file.
11609 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
11610 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
11611
11612 2001-09-27 Akim Demaille <akim@epita.fr>
11613
11614 Bump to 1.29c.
11615
11616 2001-09-27 Akim Demaille <akim@epita.fr>
11617
11618 Version 1.29b.
11619
11620 2001-09-25 Akim Demaille <akim@epita.fr>
11621
11622 * src/system.h: Include `xalloc.h'.
11623 Remove it from the C files.
11624 * src/files.c (output_files): Free the obstacks.
11625 * src/lex.c (init_lex): Rename as...
11626 (lex_init): this.
11627 (lex_free): New.
11628 * src/main.c (main): Use it.
11629
11630 2001-09-24 Marc Autret <autret_m@epita.fr>
11631
11632 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
11633 to output informations in fout (FILE*).
11634 (open_graph, close_graph): Likewise.
11635 (output_graph, output_edge, output_node): Likewise.
11636 * src/vcg.h: Update function prototypes.
11637 * src/print_graph.c (print_graph): Open output graph file.
11638 (print_actions): Adjust.
11639 * src/files.h: Remove extern declaration.
11640 * src/files.c: Remove graph_obstack declaration.
11641 (open_files): Remove graph_obstack initialization.
11642 (output_files): Remove graph_obstack saving.
11643
11644 2001-09-24 Marc Autret <autret_m@epita.fr>
11645
11646 * src/files.c (compute_output_file_names): Fix.
11647
11648 2001-09-24 Marc Autret <autret_m@epita.fr>,
11649 Akim Demaille <akim@epita.fr>
11650
11651 * src/reader.c (reader): Remove call to free_symtab ().
11652 * src/main.c (main): Call it here.
11653 Include symtab.h.
11654 * src/conflicts.c (initialize_conflicts): Rename as...
11655 (solve_conflicts): this.
11656 * src/print.c (print_core, print_actions, print_state)
11657 (print_grammar): Dump to a file instead a `output_obstack'.
11658 (print_results): Dump `output_obstack', and then proceed with the
11659 FILE *.
11660 * src/files.c (compute_output_file_names, close_files): New.
11661 (output_files): Adjust.
11662 * src/main.c (main): Adjust.
11663
11664 2001-09-23 Marc Autret <autret_m@epita.fr>
11665
11666 * src/files.c (compute_header_macro): Computes header macro name
11667 from spec_defines_file when given.
11668
11669 2001-09-23 Marc Autret <autret_m@epita.fr>
11670
11671 * src/files.c (output_files): Add default extensions.
11672
11673 2001-09-22 Akim Demaille <akim@epita.fr>
11674
11675 * src/conflicts.c (finalize_conflicts): Rename as...
11676 (free_conflicts): this.
11677
11678 2001-09-22 Akim Demaille <akim@epita.fr>
11679
11680 * src/gram.c (gram_free): Rename back as...
11681 (dummy): this.
11682 (output_token_translations): Free `token_translations'.
11683 * src/symtab.c (free_symtab): Free the tag field.
11684
11685 2001-09-22 Akim Demaille <akim@epita.fr>
11686
11687 Remove `translations' as it is always set to true.
11688
11689 * src/gram.h: Adjust.
11690 * src/reader.c (packsymbols, parse_token_decl): Adjust
11691 * src/print.c (print_grammar): Adjust.
11692 * src/output.c (output_token_translations): Adjust.
11693 * src/lex.c (lex): Adjust.
11694 * src/gram.c: Be sure the set pointers to NULL.
11695 (dummy): Rename as...
11696 (gram_free): this.
11697
11698 2001-09-22 Akim Demaille <akim@epita.fr>
11699
11700 * configure.in: Invoke AM_LIB_DMALLOC.
11701 * src/system.h: Use dmalloc.
11702 * src/LR0.c: Be sure to have pointers initialized to NULL.
11703 (allocate_itemsets): Allocate kernel_items only if needed.
11704
11705 2001-09-22 Akim Demaille <akim@epita.fr>
11706
11707 * configure.in: Bump to 1.29b.
11708 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
11709 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
11710 need xmalloc.c in calc.y.
11711 From Pascal Bart.
11712
11713 2001-09-21 Akim Demaille <akim@epita.fr>
11714
11715 Version 1.29a.
11716 * Makefile.maint, config/config.guess, config/config.sub,
11717 * config/missing: Update from masters.
11718 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
11719 upon package.m4.
11720 * configure.in (ALL_LINGUAS): Add `tr'.
11721
11722 2001-09-21 Akim Demaille <akim@epita.fr>
11723
11724 * tests/Makefile.am (package.m4): Move to...
11725 ($(srcdir)/$(TESTSUITE)): here.
11726
11727 2001-09-20 Akim Demaille <akim@epita.fr>
11728
11729 * src/complain.c: No longer try to be standalone: use system.h.
11730 Don't assume __STDC__ is defined to 1. Just test if it is defined.
11731 * src/complain.h: Likewise.
11732 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
11733 Remove the unused variable `n'.
11734 From Albert Chin-A-Young.
11735
11736 2001-09-18 Marc Autret <autret_m@epita.fr>
11737
11738 * doc/bison.1: Update.
11739 * doc/bison.texinfo (Bison Options): Update --defines and --graph
11740 descriptions.
11741 (Option Cross Key): Update.
11742 Add --graph.
11743
11744 2001-09-18 Marc Autret <autret_m@epita.fr>
11745
11746 * tests/regression.at: New test (comment in %union).
11747
11748 2001-09-18 Marc Autret <autret_m@epita.fr>
11749
11750 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
11751 do that.
11752 Reported by Keith Browne.
11753
11754 2001-09-18 Marc Autret <autret_m@epita.fr>
11755
11756 * tests/output.at: Add tests for --defines and --graph.
11757
11758 2001-09-18 Marc Autret <autret_m@epita.fr>
11759
11760 * tests/output.at: Removes tests of %{header,src}_extension features.
11761
11762 2001-09-18 Akim Demaille <akim@epita.fr>
11763
11764 * tests/Makefile.am (package.m4): New.
11765 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
11766 (_AT_CHECK_CALC_ERROR): Likewise.
11767 Factor the `, ' part of verbose error messages.
11768
11769 2001-09-18 Marc Autret <autret_m@epita.fr>
11770
11771 * src/getargs.c (longopts): Declare --defines and --graph as options
11772 with optional arguments.
11773 * src/files.h: Add extern declarations.
11774 * src/files.c (spec_graph_file, spec_defines_file): New.
11775 (output_files): Update.
11776 Remove CPP-outed code.
11777
11778 2001-09-18 Marc Autret <autret_m@epita.fr>
11779
11780 Turn off %{source,header}_extension feature.
11781
11782 * src/files.c (compute_exts_from_gf): Update.
11783 (compute_exts_from_src): Update.
11784 (output_files): CPP-out useless code.
11785 * src/files.h: Remove {header,source}_extension extern declarations.
11786 * src/reader.c (parse_dquoted_param): CPP-out.
11787 (parse_header_extension_decl): Remove.
11788 (parse_source_extension_decl): Remove.
11789 (read_declarations): Remove cases tok_{hdrext,srcext}.
11790 * src/lex.c (percent_table): Remove {header,source}_extension entries.
11791 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
11792
11793 2001-09-10 Akim Demaille <akim@epita.fr>
11794
11795 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
11796 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
11797 (AT_CHECK_OUTPUT): this.
11798 Merely check ls' exit status, its output is useless.
11799
11800 2001-09-10 Akim Demaille <akim@epita.fr>
11801
11802 * tests/calc.at: Use m4_match.
11803 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
11804
11805 2001-09-10 Marc Autret <autret_m@epita.fr>,
11806 Akim Demaille <akim@epita.fr>
11807
11808 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
11809 enum color_e.
11810 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
11811 to `normal'.
11812 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
11813 * src/lex.h: Adjust prototype.
11814 (token_t): Add `tok_undef'.
11815 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
11816 (parse_percent_token): Now returns token_t.
11817 Add default statement in switch.
11818 (lex): Separate `c' as an input variable, from the token_t result
11819 part.
11820 (unlexed): Is a token_t.
11821
11822 2001-09-10 Akim Demaille <akim@epita.fr>
11823
11824 * configure.in: Bump to 1.29a.
11825
11826 2001-09-07 Akim Demaille <akim@epita.fr>
11827
11828 Version 1.29.
11829
11830 2001-08-30 Akim Demaille <akim@epita.fr>
11831
11832 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
11833 * m4/atconfig.m4: Remove.
11834 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
11835 * tests/bison: New.
11836 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
11837 m4_if, m4_patsubst, and m4_regexp.
11838 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
11839 `input' file instead of echo.
11840
11841 2001-08-29 Akim Demaille <akim@epita.fr>
11842
11843 Bump to 1.28e.
11844
11845 2001-08-29 Akim Demaille <akim@epita.fr>
11846
11847 Version 1.28d.
11848
11849 2001-08-29 Paul Eggert <eggert@twinsun.com>
11850
11851 * src/bison.simple (yyparse): Don't take the address of an
11852 item before the start of an array, as that doesn't conform to
11853 the C Standard.
11854
11855 2001-08-29 Robert Anisko <anisko_r@epita.fr>
11856
11857 * doc/bison.texinfo (Location Tracking Calc): New node.
11858
11859 2001-08-29 Paul Eggert <eggert@twinsun.com>
11860
11861 * src/output.c (output): Do not define const, as this now
11862 causes more problems than it cures.
11863
11864 2001-08-29 Akim Demaille <akim@epita.fr>
11865
11866 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
11867 the nodes.
11868 Be sure to tag the `detailmenu'.
11869
11870 2001-08-29 Akim Demaille <akim@epita.fr>
11871
11872 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
11873 download in a tmp dir.
11874
11875 2001-08-28 Marc Autret <autret_m@epita.fr>
11876
11877 * config/depcomp: New file.
11878
11879 2001-08-28 Marc Autret <autret_m@epita.fr>
11880
11881 * doc/bison.1 (mandoc): Adjust.
11882 From Juan Manuel Guerrero.
11883
11884 2001-08-28 Marc Autret <autret_m@epita.fr>
11885
11886 * src/print_graph.c (print_state): Fix.
11887
11888 2001-08-27 Marc Autret <autret_m@epita.fr>
11889
11890 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
11891 char * members.
11892 Echo modifications to the functions prototypes.
11893 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
11894
11895 2001-08-27 Marc Autret <autret_m@epita.fr>
11896
11897 * src/vcg.c: Include `xalloc.h'.
11898 (add_colorentry): New.
11899 (add_classname): New.
11900 (add_infoname): New.
11901 * src/vcg.h: Add new prototypes.
11902
11903 2001-08-27 Akim Demaille <akim@epita.fr>
11904
11905 * Makefile.maint: Sync. again with CVS Autoconf.
11906
11907 2001-08-27 Akim Demaille <akim@epita.fr>
11908
11909 * Makefile.maint: Formatting changes.
11910 (po-update, cvs-update, update): New targets.
11911 (AMTAR): Remove.
11912
11913 2001-08-27 Akim Demaille <akim@epita.fr>
11914
11915 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
11916 * Makefile.maint: Sync. with CVS Autoconf.
11917
11918 2001-08-27 Marc Autret <autret_m@epita.fr>
11919
11920 * src/vcg.h (struct infoname_s): New.
11921 (struct colorentry_s): New.
11922 (graph_s): New fields {vertical,horizontal}_order in structure.
11923 Add `infoname' field.
11924 Add `colorentry' field;
11925 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
11926 (G_HORIZONTAL_ORDER): New.
11927 (G_INFONAME): New.
11928 (G_COLORENTRY): New.
11929 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
11930 Add output of `infoname'.
11931 Add output of `colorentry'.
11932
11933 2001-08-27 Marc Autret <autret_m@epita.fr>
11934
11935 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
11936 This one shadowed a global parameter.
11937
11938 2001-08-24 Marc Autret <autret_m@epita.fr>
11939
11940 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
11941 instead of `unsigned'.
11942 (print_state): Do not call obstack_object_size () in obstack_grow ()
11943 to avoid macro variables shadowing.
11944
11945 2001-08-23 Marc Autret <autret_m@epita.fr>
11946
11947 * src/lex.c (percent_table): Typo: s/naem/name/.
11948 Add graph option.
11949 Normalize new options declarations.
11950
11951 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
11952
11953 * tests/suite.at: Exercise %header_extension and %source_extension.
11954
11955 2001-08-16 Marc Autret <autret_m@epita.fr>
11956
11957 * src/reader.c (parse_dquoted_param): New.
11958 (parse_header_extension_decl): Use it.
11959 (parse_source_extension_decl): Likewise.
11960
11961 2001-08-16 Marc Autret <autret_m@epita.fr>
11962
11963 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
11964 (get_xxxx_str): Use assert () instead of complain ().
11965 Remove return invokations in default cases.
11966 (get_decision_str): Modify default behaviour. Remove second argument.
11967 Echo modifications on calls.
11968 (output_graph): Fix.
11969
11970 2001-08-16 Marc Autret <autret_m@epita.fr>
11971
11972 * src/getargs.c (usage): Update with ``-g, --graph''.
11973
11974 2001-08-16 Marc Autret <autret_m@epita.fr>
11975
11976 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
11977 (Option Cross Key): Likewise.
11978 * doc/bison.1: Update.
11979
1c8c2190
PB
119802001-09-25 Pascal Bart <pascal.bart@epita.fr>
11981
11982 * src/output.c (output_master_parser): Don't finish action_obstack.
11983 (output_parser): Don't care about the muscle action, here.
11984 (prepare): Copy the action_obstack in the action muscle.
11985 (output): Free action_obstack.
11986
180d45ba
PB
119872001-09-23 Pascal Bart <pascal.bart@epita.fr>
11988
11989 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
11990 will contain `%union' declaration.
11991 (parse_union_decl): Delete #line directive output.
11992 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
11993 informations about %union.
11994 (parse_union_decl): Copy the union_obstack in the muscle stype.
11995 * src/bison.simple: Add new #line directive.
11996 Add typdef %%stype YYSTYPE.
11997
c51d1a19
PB
119982001-09-23 Pascal Bart <pascal.bart@epita.fr>
11999
12000 * src/bison.simple: Add new `#line' directive.
12001
6f9344da
PB
120022001-09-22 Pascal Bart <pascal.bart@epita.fr>
12003
12004 * src/bison.simple: New `#line' directive.
12005 * src/output.c (output_parser): Support new dynamic muscle input_line.
12006
652def80
MA
120072001-09-22 Marc Autret <autret_m@epita.fr>
12008
12009 * src/output.c (output_master_parser): New.
12010 (output_parser): Be more re-entrant.
12011
25b222fa
MA
120122001-09-21 Marc Autret <autret_m@epita.fr>
12013
12014 * src/reader.c (copy_definition, parse_union_decl): Update and use
12015 `linef' muscle.
12016 (copy_action): Likewise.
12017 Use obstack_1grow ().
12018 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
12019
6bc35ae5
MA
120202001-09-21 Marc Autret <autret_m@epita.fr>
12021
12022 * src/options.c (option_table): Adjust.
12023 * src/lex.c (parse_percent_token): Fix.
12024
c0629aa1
PB
120252001-09-20 Pascal Bart <pascal.bart@epita.fr>
12026
12027 * src/options.c (symtab.h): Include it, need by lex.h.
342b8b6e 12028
82b6d266
PB
120292001-09-20 Pascal Bart <pascal.bart@epita.fr>
12030
12031 * src/lex.c (parse_percent_token): Change type of variable `tx', which
12032 is now an option_table_struct*.
12033 (option_strcmp): New function option_strcmp.
12034 (parse_percent_token): Call option_strcmp.
12035 * src/getargs.c (xalloc.h, options.h): Include it.
12036 (getargs): Call create_long_option_table.
12037 (getargs): Free longopts at the end of the function.
12038 (shortopts): Move in options.c.
12039 * src/options.c (create_long_option_table): New function. Convert
12040 information from option_table to option structure.
12041 * src/reader.c (options.h): Include it.
12042
12043 * src/Makefile.am: Adjust.
12044 * src/options.c (option_table): Create from longopts and percent_table.
12045 * src/getargs.c (longopts): Delete.
12046 * src/lex.c (struct percent_table_struct): Delete.
12047 (percent_table): Delete.
12048 (options.h): Include it.
12049 * src/options.c: Create.
12050 * src/options.h: Create.
12051 Declare enum opt_access_e.
12052 Define struct option_table_struct.
12053
75f5aaea
MA
120542001-09-20 Marc Autret <autret_m@epita.fr>
12055
12056 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
12057 sections of Bison.
12058
f508cb0a
PB
120592001-09-19 Pascal Bart <pascal.bart@epita.fr>
12060
12061 * src/bison.simple: s/%%filename/%%skeleton.
12062 * src/muscle_tab.c (getargs.h): Include it.
12063 (muscle_init): Insert new muscle skeleton.
12064
13105fc1
PB
120652001-09-18 Pascal Bart <pascal.bart@epita.fr>
12066
12067 * src/output.c (output_parser): Delete unused variable actions_dumped.
12068
b0c4483e
PB
120692001-09-07 Pascal Bart <pascal.bart@epita.fr>
12070
12071 * src/output.c (output): Delete call to reader_output_yylsp.
12072 * src/reader.c (reader): Likewise.
ba0fe3c7 12073 * src/reader.h: Delete declaration of reader_output_yylsp.
342b8b6e 12074
11d82f03
MA
120752001-09-02 Marc Autret <autret_m@epita.fr>
12076
12077 * src/reader.c: Include muscle_tab.h.
12078 (parse_union_decl): Update.
12079 (parse_macro_decl): Rename parse_muscle_decl.
12080 Update to use renamed functions and variable.
12081 (read_declarations, copy_action, read_additionnal_code, : Updated
12082 with correct variables and functions names.
12083 (packsymbols, reader): Likewise.
342b8b6e 12084
11d82f03 12085 * src/reader.h (muscle_obstack): Extern declaration update.
342b8b6e 12086
11d82f03
MA
12087 * src/output.c: Include muscle_tab.h
12088 In all functions using macro_insert, change by using muscle_insert ().
12089 (macro_obstack): Rename muscle_obstack.
12090 Echo modifications in the whole file.
12091 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
12092 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
12093 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
12094
12095 * src/muscle_tab.h: Update double inclusion macros.
12096 (macro_entry_s): Rename muscle_entry_s.
12097 Update prototypes.
342b8b6e 12098
11d82f03
MA
12099 * src/muscle_tab.c: Include muscle_tab.h.
12100 Rename macro_tabble to muscle_table.
12101 (mhash1, mhash2, mcmp): Use muscle_entry.
12102 (macro_init): Rename muscle_init. Update.
12103 (macro_insert): Rename muscle_insert. Update.
12104 (macro_find): Rename muscle_find. Update.
12105
12106 * src/main.c: Include muscle_tab.h.
12107 (main): Call muscle_init ().
12108 * src/Makefile.am (bison_SOURCES): Echo modifications.
12109
93a37297
MA
121102001-09-02 Marc Autret <autret_m@epita.fr>
12111
f753cd62 12112 Now the files macro_tab.[ch] are named muscle_tab.[ch].
342b8b6e 12113
f753cd62
MA
12114 * src/muscle_tab.c, src/muscle_tab.h: Add files.
12115
121162001-09-02 Marc Autret <autret_m@epita.fr>
12117
12118 * src/macrotab.c, src/macrotab.h: Remove.
93a37297 12119
682d48cd
PB
121202001-09-01 Pascal Bart <pascal.bart@epita.fr>
12121
342b8b6e 12122 * src/reader.c (copy_guard): Use muscle to specify the `#line'
682d48cd
PB
12123 filename.
12124
087c8fda
MA
121252001-09-01 Marc Autret <autret_m@epita.fr>
12126
12127 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
12128 to an explicit value to activate the feature. We do it here.
12129
dda680cb
PB
121302001-08-31 Pascal Bart <pascal.bart@epita.fr>
12131
12132 * src/output.c (prepare): Delete the `filename' muscule insertion.
12133 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
12134 (parse_union_decl): Likewise.
12135 * src/macrotab.c (macro_init): Initialize filename by infile.
12136
9e644e64
MA
121372001-08-31 Marc Autret <autret_m@epita.fr>
12138
12139 * src/bison.simple (YYLSP_NEEDED): New definition.
12140 * src/output.c (prepare): Add macro insertion of `locations_flag'
12141
17da6427
PB
121422001-08-31 Pascal Bart <pascal.bart@epita.fr>
12143
12144 * src/output.c (prepare): Delete insertion of previous muscles,
12145 and insert the `prefix' muscles.
12146 * src/macrotab.c (macro_init): Likewise.
12147 (macro_init): Initialization prefix directive by `yy'.
342b8b6e 12148 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
17da6427
PB
12149 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
12150 yylval, yydebug, yyerror, yynerrs and yyparse.
342b8b6e 12151 New directive `#define' to substitute yydebug, ... with option
17da6427
PB
12152 name_prefix.
12153
e8cb70b9
PB
121542001-08-31 Pascal Bart <pascal.bart@epita.fr>
12155
12156 * src/main.c (main): Standardize.
12157 * src/output.c (output_table_data, output_parser): Likewise.
12158 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
12159
63c2d5de
MA
121602001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
12161
342b8b6e 12162 * src/reader.c (read_additionnal_code): Rename %%user_code to
63c2d5de
MA
12163 %%epilogue.
12164 * src/output.c (output): Rename %%declarations to %%prologue.
12165 * src/bison.simple: Echo modifications.
342b8b6e 12166
d8cb5183
MA
121672001-08-31 Marc Autret <autret_m@epita.fr>
12168
12169 * src/reader.c (readgram): CleanUp.
12170 (output_token_defines): Likewise.
12171 (packsymbols): Likewise.
12172 (reader): Likewise.
12173 * src/output.c (output): CPP-out useless code.
12174
6c686258
PB
121752001-08-31 Pascal Bart <pascal.bart@epita.fr>
12176
342b8b6e 12177 * src/reader.c (reader): Delete obsolete call to function
6c686258
PB
12178 output_trailers and output_headers.
12179 * src/output.h: Remove obsolete functions prototypes of output_headers
12180 and output_trailers.
12181
8f451ef7
PB
121822001-08-30 Pascal Bart <pascal.bart@epita.fr>
12183
12184 * src/main.c: Include macrotab.h.
342b8b6e 12185 * src/macrotab.h (macro_entry_s): Constify fields.
8f451ef7
PB
12186 Adjust functions prototypes.
12187 * src/macrotab.c (macro_insert): Constify key and value.
12188 (macro_find): Constify key.
12189 (macro_insert): Include 'xalloc.h'
12190 (macro_insert): Use XMALLOC.
12191 (macro_find): Constify return value.
12192 * src/output.c (output_table_data): Rename table to table_data.
12193 (output_parser): Constify macro_key, macro_value.
12194
997b6fd0 121952001-08-30 Marc Autret <autret_m@epita.fr>
2ba3b73c
MA
12196
12197 * src/reader.c (parse_skel_decl): New.
342b8b6e 12198 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
2ba3b73c
MA
12199 * src/lex.h (token_t): New token `tok_skel'.
12200 * src/lex.c (percent_table): Add skeleton option entry.
12201 Standardize.
12202
ff48177d
MA
122032001-08-29 Marc Autret <autret_m@epita.fr>
12204
12205 * src/bison.simple: Add %%user_code directive at the end.
12206 * src/reader.c (read_additionnal_code): New.
12207 (reader): Use it.
12208 * src/output.c (output_program): Remove.
12209 (output): Update.
12210
b33160bf
MA
122112001-08-28 Marc Autret <autret_m@epita.fr>
12212
12213 * src/output.c (output_actions): Clean up.
4e5caae2 12214 (output_gram): CPP-out useless code.
b33160bf
MA
12215 * src/reader.c (reader): Clean up, CPP-out useless code.
12216
d1a2daf7
PB
122172001-08-28 Pascal Bart <pascal.bart@epita.fr>
12218
342b8b6e 12219 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
535c0e75 12220 directive.
d1a2daf7
PB
12221 * src/bison.simple: Add `%%definitions'.
12222
2b763dfe
MA
122232001-08-28 Marc Autret <autret_m@epita.fr>
12224
12225 * config/depcomp: New file.
12226
f1a87ef6
PE
122272001-08-27 Paul Eggert <eggert@twinsun.com>
12228
12229 * src/bison.simple (yyparse): Don't take the address of an
12230 item before the start of an array, as that doesn't conform to
12231 the C Standard.
12232
82e236e2
RA
122332001-08-27 Robert Anisko <robert.anisko@epita.fr>
12234
f1a87ef6 12235 * src/output.c (output): Remove the initialization of the macro
82e236e2
RA
12236 obstack. It was done too late here.
12237
12238 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
12239 completely wrong.
12240 (reader): Initialize the macro obstack here, since we need it to grow
12241 '%define' directives.
12242
12243 * src/reader.h: Declare the macro obstack as extern.
12244
b0cfa28a
RA
122452001-08-27 Robert Anisko <robert.anisko@epita.fr>
12246
12247 * src/output.c (output_parser): Fix. Store single '%' characters in
12248 the output obstack instead of throwing them away.
12249
6fc74234
AD
122502001-08-27 Akim Demaille <akim@epita.fr>
12251
12252 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
12253
9c76d118
RA
122542001-08-25 Robert Anisko <robert.anisko@epita.fr>
12255
12256 * lib/Makefile.am: Adjust.
12257
a8289c62
RA
122582001-08-25 Robert Anisko <robert.anisko@epita.fr>
12259
12260 * src/bison.simple: Update and add '%%' directives.
12261
b6610515
RA
122622001-08-25 Robert Anisko <robert.anisko@epita.fr>
12263
12264 * src/reader.c (reader): Remove calls to 'output_headers' and
12265 'output_trailers'. Remove some C output.
12266 (readgram): Disable a piece of code that was writing a default
12267 definition for 'YYSTYPE'.
12268 (reader_output_yylsp): Remove.
12269 (packsymbols): Output token defintions to a macro.
12270 (copy_definition): Disable C output.
6fc74234 12271
b6610515
RA
12272 * src/reader.c (parse_macro_decl): New function used to parse macro
12273 declarations.
12274 (copy_string2): Put the body of copy_string into this new function.
12275 Add a parameter to let the caller choose whether he wants to copy the
12276 string delimiters or not.
12277 (copy_string): Be a simple call to copy_string2 with the last argument
12278 bound to true.
12279 (read_declarations): Add case for macro definition.
12280 (copy_identifier): New.
6fc74234 12281 (parse_macro_decl): Read macro identifiers using copy_identifier
b6610515
RA
12282 rather than lex.
12283
26f609ff
RA
122842001-08-25 Robert Anisko <robert.anisko@epita.fr>
12285
12286 * src/output.c (prepare): Add prefixed names.
12287 (output_parser): Output semantic actions.
12288 (output_parser): Fix bug on '%%line' directives.
6fc74234 12289
26f609ff
RA
12290 * src/output.c (output_headers): Remove. The C code printed by this
12291 function should now be in the skeletons.
12292 (output_trailers): Remove.
12293 (output): Disable call to 'reader_output_yylsp'.
12294 (output_rule_data): Do not output tables to the table obstack.
12295
12296 * src/output.c: Remove some C dedicated output.
12297 Improve the use of macro and output obstacks.
12298 (output_defines): Remove.
6fc74234 12299
26f609ff
RA
12300 * src/output.c (output_token_translations): Associate 'translate'
12301 table with a macro. No output to the table obstack.
12302 (output_gram): Same for 'rhs' and 'prhs'.
12303 (output_stos): Same for 'stos'.
12304 (output_rule_data): Same for 'r1' and 'r2'.
12305 (token_actions): Same for 'defact'.
12306 (goto_actions): Same for 'defgoto'.
12307 (output_base): Same for 'pact' and 'pgoto'.
12308 (output_table): Same for 'table'.
12309 (output_check): Same for 'check'.
6fc74234 12310
26f609ff
RA
12311 * src/output.c (output_table_data): New function.
12312 (output_short_table): Remove.
12313 (output_short_or_char_table): Remove.
6fc74234 12314
26f609ff
RA
12315 * src/output.c (output_parser): Replace most of the skeleton copy code
12316 with something new. Skeletons are now processed character by character
12317 rather than line by line, and Bison looks for '%%' macros. This is the
12318 first step in making Bison's output process (a lot) more flexible.
12319 (output_parser): Use the macro table.
12320
6f43b113
RA
123212001-08-25 Robert Anisko <robert.anisko@epita.fr>
12322
12323 * src/main.c (main): Initialize the macro table.
12324
dd3127cf
RA
123252001-08-25 Robert Anisko <robert.anisko@epita.fr>
12326
12327 * src/lex.c (percent_table): Add tok_define.
12328 * src/lex.h: Add tok_define.
12329
aa321494
RA
123302001-08-25 Robert Anisko <robert.anisko@epita.fr>
12331
12332 * src/macrotab.c: New file.
12333 * src/macrotab.h: New file.
12334 * src/Makefile.am: Update.
12335
68bd3b6b
RA
123362001-08-25 Robert Anisko <robert.anisko@epita.fr>
12337
12338 * lib/hash.c: New file.
12339 * lib/hash.h: New file.
12340 * lib/Makefile.am: Update.
12341
45f8dd1e
AD
123422001-08-15 Akim Demaille <akim@epita.fr>
12343
12344 Version 1.28c.
12345
40a64a7a 123462001-08-15 Marc Autret <autret_m@epita.fr>
0b8afb77
AD
12347
12348 * src/reader.c (readgram): Indent output macro YYSTYPE.
12349 (packsymbols): Likewise.
12350 (output_token_defines): Likewise.
12351 * src/files.c: Standardize.
12352 (compute_header_macro): New.
12353 (defines_obstack_save): New. Use compute_header_macro.
12354 (output_files): Update. Use defines_obstack_save.
12355
f9a8293a
AD
123562001-08-15 Akim Demaille <akim@epita.fr>
12357
12358 * doc/bison.texinfo (Table of Symbols): Document
12359 YYSTACK_USE_ALLOCA.
12360
150ca7a7
AD
123612001-08-15 Akim Demaille <akim@epita.fr>
12362
12363 * missing: Update from CVS Automake.
12364 * config/config.guess, config/config.sub, config/texinfo.tex:
12365 Update from gnu.org.
12366
69b5cec4
AD
123672001-08-15 Akim Demaille <akim@epita.fr>
12368
12369 * Makefile.maint: Sync with CVS Autoconf.
12370
f2b5126e
PB
123712001-08-14 Pascal Bart <pascal.bart@epita.fr>
12372
69b5cec4 12373 * doc/bison.texinfo: Include GNU Free Documentation License from
f2b5126e
PB
12374 `fdl.texi'.
12375 * doc/fdl.texi: Add to package.
12376
4ecbf796
MA
123772001-08-14 Marc Autret <autret_m@epita.fr>
12378
12379 Turn on %{source,header}_extension features.
12380
69b5cec4 12381 * src/lex.c (percent_table): Un-CPP out header_extension and
4ecbf796
MA
12382 source_extension.
12383 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
69b5cec4 12384 (compute_exts_from_src): Remove conditions. It restores priorities
4ecbf796
MA
12385 between options.
12386
95fb5662
MA
123872001-08-14 Marc Autret <autret_m@epita.fr>
12388
12389 * src/files.c (compute_base_names): Add extensions computing when
12390 `--file-prefix' used.
12391 Standardize function calls.
12392
78d09da9
MA
123932001-08-13 Marc Autret <autret_m@epita.fr>
12394
69b5cec4 12395 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
78d09da9
MA
12396 defining it (defined but null disables alloca).
12397
5a009f2c
MA
123982001-08-13 Marc Autret <autret_m@epita.fr>
12399
12400 * src/bison.simple (_yy_memcpy): CPP reformat.
12401
1e41465a
PB
124022001-08-13 Pascal Bart <pascal.bart@epita.fr>
12403
12404 * tests/atconfig.in (CPPFLAGS): Fix.
12405
c67a198d
PB
124062001-08-10 Pascal Bart <pascal.bart@epita.fr>
12407
79282c6c 12408 * doc/bison.texinfo: Include GNU General Public License from
c67a198d
PB
12409 `gpl.texi'.
12410 * doc/gpl.texi: Add to package.
12411
09a6de7e
MA
124122001-08-10 Marc Autret <autret_m@epita.fr>
12413
12414 * src/print_graph.h: Fix.
12415 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
12416
b77b9ee0
AD
124172001-08-10 Akim Demaille <akim@epita.fr>
12418
12419 * src/system.h: Provide default declarations for stpcpy, strndup,
12420 and strnlen.
12421
3e259915
MA
124222001-08-10 Robert Anisko <anisko_r@epita.fr>
12423
12424 * doc/bison.texinfo (Locations): Update @$ stuff.
12425
ca96bc2d
MA
124262001-08-09 Robert Anisko <anisko_r@epita.fr>
12427
12428 * src/bison.simple (YYLLOC_DEFAULT): Update.
12429 (yyparse): Adjust.
12430
fdc6758b
MA
124312001-08-08 Marc Autret <autret_m@epita.fr>
12432
b77b9ee0 12433 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
fdc6758b
MA
12434 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
12435 Reported by Fabrice Bauzac.
957d4dbf 12436
600cad3b
MA
124372001-08-08 Marc Autret <autret_m@epita.fr>
12438
12439 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
12440 * src/vcg.c (output_node): Fix.
12441 * src/vcg.h: Cleanup.
12442 * src/print_graph.c: Add comments.
b77b9ee0 12443 (node_output_size): New global variable. Simplify the formatting of
600cad3b 12444 the VCG graph output.
b77b9ee0 12445 (print_actions): Unused code is now used. It notifies the final state
600cad3b 12446 and no action states in the VCG graph. It also give the reduce actions.
b77b9ee0 12447 The `shift and goto' edges are red and the `go to state' edges are
600cad3b
MA
12448 blue.
12449 Get the current node name and node_obstack by argument.
12450 (node_obstack): New variable.
12451 (print_state): Manage node_obstack.
12452 (print_core): Use node_obstack given by argument.
12453 A node is not only computed here but in print_actions also.
12454 (print_graph): CPP out useless code instead of commenting it.
12455
976e528f
AD
124562001-08-07 Pascal Bart <pascal.bart@epita.fr>
12457
12458 * tests/atconfig.in (CPPFLAGS): Fix.
12459
20e8e5ca
AD
124602001-08-07 Akim Demaille <akim@epita.fr>
12461
12462 * src/print_graph.c (quote): New.
12463 (print_core): Use it.
12464
957d4dbf 124652001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
3e3da797 12466
3e3da797
AD
12467 * src/vcg.c (complain.h): Include it.
12468 Unepitaize `return' invocations.
c4b66126 12469 [NDEBUG] (main): Remove.
79282c6c 12470 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
c4b66126
AD
12471 * src/files.c (open_files): Initialize graph_obstack.
12472 * src/print_graph.c (print_actions): CPP out useless code.
12473 (print_core): Don't output the last `\n' in labels.
12474 Use `quote'.
12475 * src/files.c (output_files): Output the VCG file.
12476 * src/main.c (main): Invoke print_graph ();
3e3da797 12477
957d4dbf 124782001-08-06 Marc Autret <autret_m@epita.fr>
22c2cbc0
AD
12479
12480 Automaton VCG graph output.
12481 Using option ``-g'' or long option ``--graph'', you can generate
12482 a gram_filename.vcg file containing a VCG description of the LALR (1)
12483 automaton of your grammar.
12484
12485 * src/main.c: Call to print_graph() function.
12486 * src/getargs.h: Update.
12487 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
12488 (graph_flag): New flag.
12489 (longopts): Update.
12490 (getargs): Add case `g'.
12491 * src/files.c (graph_obstack): New obstack struct.
12492 (open_files): Initialize new obstack.
12493 (output_files): Saves graph_obstack if required.
12494 * src/files.h (graph_obstack): New extern declaration.
12495 * src/Makefile.am: Add new source files.
12496
927c1557 124972001-08-06 Marc Autret <autret_m@epita.fr>
ce4d5ce0
AD
12498
12499 * src/print_graph.c, src/print_graph.h (graph): New.
12500 * src/vcg.h: New file.
12501 * src/vcg.c: New file, VCG graph handling.
12502
7333d403
AD
125032001-08-06 Marc Autret <autret_m@epita.fr>
12504
12505 Add of %source_extension and %header_extension which specify
12506 the source or/and the header output file extension.
12507
12508 * src/files.c (compute_base_names): Remove initialisation of
12509 src_extension and header_extension.
12510 (compute_exts_from_gf): Update.
12511 (compute_exts_from_src): Update.
12512 (output_files): Update.
12513 * src/reader.c (parse_header_extension_decl): New.
12514 (parse_source_extension_decl): New.
12515 (read_declarations): New case statements for the new tokens.
12516 * src/lex.c (percent_table): Add entries for %source_extension
12517 and %header_extension.
12518 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
12519
84163231
AD
125202001-08-06 Marc Autret <autret_m@epita.fr>
12521
12522 * configure.in: Bump to 1.28c.
12523 * doc/bison.texinfo: Texinfo thingies.
12524
8303fc42
AD
125252001-08-04 Pascal Bart <pascal.bart@epita.fr>
12526
12527 * tests/atconfig.in (CPPFLAGS): Add.
12528 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
12529
70a84437
AD
125302001-08-03 Akim Demaille <akim@epita.fr>
12531
12532 Version 1.28b.
12533
2ce10144
AD
125342001-08-03 Akim Demaille <akim@epita.fr>
12535
12536 * tests/Makefile.am (check-local): Ship testsuite.
12537 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
12538 Include `string.h'.
12539
1e3e4bc1
AD
125402001-08-03 Akim Demaille <akim@epita.fr>
12541
12542 * configure.in: Try using -Wformat when compiling.
12543
42b45b7f
AD
125442001-08-03 Akim Demaille <akim@epita.fr>
12545
12546 * configure.in: Bump to 1.28b.
12547
8f13fe33
AD
125482001-08-03 Akim Demaille <akim@epita.fr>
12549
12550 * src/complain.c: Adjust strerror_r portability issues.
12551
b37ba92c
AD
125522001-08-03 Akim Demaille <akim@epita.fr>
12553
12554 Version 1.28a.
12555
b0ce6046
AD
125562001-08-03 Akim Demaille <akim@epita.fr>
12557
12558 * src/getargs.c, src/getarg.h (skeleton)): Constify.
12559 * src/lex.c (literalchar): Avoid name clashes on `buf'.
12560 * src/getargs.c: Include complain.h.
12561 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
12562 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
12563
d01c415b
AD
125642001-08-03 Akim Demaille <akim@epita.fr>
12565
12566 * src/reader.c (readgram): Display hidden chars in error messages.
12567
459dd1a6
AD
125682001-08-03 Akim Demaille <akim@epita.fr>
12569
12570 Update to gettext 0.10.39.
12571
53b74c0c
AD
125722001-08-03 Akim Demaille <akim@epita.fr>
12573
12574 * lib/strspn.c: New.
12575
234a3be3
AD
125762001-08-01 Marc Autret <autret_m@epita.fr>
12577
12578 * doc/bison.texinfo: Update.
12579 * doc/bison.1 (mandoc): Update.
12580 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
12581 * src/files.c: Support output files extensions computing.
12582 (src_extension): New static variable.
12583 (header_extension): New static variable.
12584 (tr): New function.
12585 (get_extension_index): New function, gets the index of an extension
12586 filename in a string.
12587 (compute_exts_from_gf): New function, computes extensions from the
12588 grammar file extension.
12589 (compute_exts_from_src): New functions, computes extensions from the
12590 C source file extension, file given by ``-o'' option.
12591 (compute_base_names): Update.
12592 (output_files): Update.
12593
847bf1f5
AD
125942001-08-01 Robert Anisko <anisko_r@epita.fr>
12595
d995fee7 12596 * doc/bison.texi: Document @$.
847bf1f5
AD
12597 (Locations): New section.
12598
d074a105
AD
125992001-07-18 Akim Demaille <akim@epita.fr>
12600
12601 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
12602 * config/prev-version.txt, config/move-if-change: New.
12603 * Makefile.am: Adjust.
12604
3419715d
AD
126052001-07-08 Pascal Bart <pascal.bart@epita.fr>
12606
12607 * src/bison.simple (yyparse): Suppress warning `comparaison
12608 between signed and unsigned'.
12609
62ab6972
AD
126102001-07-05 Pascal Bart <pascal.bart@epita.fr>
12611
12612 * src/getargs.h (raw_flag): Remove.
12613 * src/getargs.c: Die on `-r'/`--raw'.
12614 * src/lex.c (parse_percent_token): Die on `%raw'.
12615 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
12616 * tests/calc.at: Suppress test with option `--raw'.
12617
1e24cc5b
AD
126182001-07-14 Akim Demaille <akim@epita.fr>
12619
12620 * config/: New.
12621 * configure.in: Require Autoconf 2.50.
12622 Update to gettext 0.10.38.
12623
32dfccf8
AD
126242001-03-16 Akim Demaille <akim@epita.fr>
12625
12626 * doc/bison.texinfo: ANSIfy the examples.
12627
cd5bd6ac
AD
126282001-03-16 Akim Demaille <akim@epita.fr>
12629
12630 * getargs.c (skeleton): New variable.
12631 (longopts): --skeleton is a new option.
12632 (shortopts, getargs): -S is a new option.
12633 * getargs.h: Declare skeleton.
12634 * output.c (output_parser): Use it.
12635
5141b016
AD
126362001-03-16 Akim Demaille <akim@epita.fr>
12637
12638 * m4/strerror_r.m4: New.
12639 * m4/error.m4: Run AC_FUNC_STRERROR_R.
12640 * lib/error.h, lib/error.c: Update.
12641
447992b9
AD
126422001-03-16 Akim Demaille <akim@epita.fr>
12643
12644 * src/getargs.c (longopts): Clean up.
12645
274d42ce
AD
126462001-02-21 Akim Demaille <akim@epita.fr>
12647
12648 * src/reader.c (gensym): `gensym_count' is your own.
12649 Use a static buf to create the symbol name, as token_buffer is no
12650 longer a buffer.
12651
22c821f3
AD
126522001-02-08 Akim Demaille <akim@epita.fr>
12653
12654 * src/conflicts.c (conflict_report): Be sure not to append to res
12655 between two calls, which could happen if both first sprintf were
12656 skipped, but not the first cp += strlen.
12657
18569462
AD
126582001-02-08 Akim Demaille <akim@epita.fr>
12659
12660 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
12661 New, from fileutils 4.0.37.
12662 * configure.in: Require Autoconf 2.49c. I took some time before
12663 making this decision. This is the only way out for portability
12664 issues in Bison, it would mean way too much duplicate effort to
12665 import in Bison features implemented in 2.49c since 2.13.
12666 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
12667
0d8f3c8a
AD
126682001-02-02 Akim Demaille <akim@epita.fr>
12669
12670 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
66075dcf 12671 * lib/xalloc.h, lib/xmalloc.c: Update.
0d8f3c8a 12672
f17bcd1f
AD
126732001-01-19 Akim Demaille <akim@epita.fr>
12674
12675 Get rid of the ad hoc handling of token_buffer in the scanner: use
12676 the obstacks.
12677
12678 * src/lex.c (token_obstack): New.
12679 (init_lex): Initialize it. No longer call...
12680 (grow_token_buffer): this. Remove it.
12681 Adjust all the places which used it to use the obstack.
12682
511e79b3
AD
126832001-01-19 Akim Demaille <akim@epita.fr>
12684
12685 * src/lex.h: Rename all the tokens:
12686 s/\bENDFILE\b/tok_eof/g;
12687 s/\bIDENTIFIER\b/tok_identifier/g;
12688 etc.
12689 Let them be enums, not #define, to ease debugging.
12690 Adjust all the code.
12691
0d6508ef
AD
126922001-01-18 Akim Demaille <akim@epita.fr>
12693
12694 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
12695 * src/lex.c (maxtoken, grow_token_buffer): Static.
12696
6deb4447
AD
126972001-01-18 Akim Demaille <akim@epita.fr>
12698
12699 Since we now use obstacks, more % directives can be enabled.
12700
12701 * src/lex.c (percent_table): Also accept `%yacc',
12702 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
12703 `%debug'.
12704 Handle the actions for `%semantic_parser' and `%pure_parser' here,
12705 instead of returning a token.
12706 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
12707 * src/reader.c (read_declarations): Adjust.
12708 * src/files.c (open_files): Don't call `compute_base_names', don't
12709 compute `attrsfile' since they depend upon data which might be
12710 *in* the input file now.
12711 (output_files): Do it here.
12712 * src/output.c (output_headers): Document the fact that this patch
12713 introduces a guaranteed SEGV for semantic parsers.
12714 * doc/bison.texinfo: Document them.
12715 * tests/suite.at: Exercise these %options.
12716
ff4423cc
AD
127172000-12-20 Akim Demaille <akim@epita.fr>
12718
12719 Also handle the output file (--verbose) with obstacks.
12720
12721 * files.c (foutput): Remove.
12722 (output_obstack): New.
12723 Adjust all dependencies.
12724 * src/conflicts.c: Return a string.
12725 * src/system.h (obstack_grow_string): Rename as...
12726 (obstack_sgrow): this. Be ready to work with non literals.
12727 (obstack_fgrow4): New.
12728
956dba3a
AD
127292000-12-20 Akim Demaille <akim@epita.fr>
12730
12731 * src/files.c (open_files): Fix the computation of short_base_name
12732 in the case of `-o foo.tab.c'.
12733
337bab46
AD
127342000-12-20 Akim Demaille <akim@epita.fr>
12735
12736 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
12737 (copy_dollar): Now that everything uses obstacks, get rid of the
12738 FILE * parameters.
12739
5d3214b8
AD
127402000-12-20 Akim Demaille <akim@epita.fr>
12741
12742 * src/files.c (open_files): Actually the `.output' file is based
12743 on the short_base_name, not base_name.
12744 * tests/suite.at (Checking output file names): Adjust.
12745
29092a57
AD
127462000-12-20 Akim Demaille <akim@epita.fr>
12747
12748 * src/bison.s1: Remove, we now use directly...
12749 * src/bison.simple: this.
12750 * src/Makefile.am: Use pkgdata instead of data.
12751
ea5607fd
AD
127522000-12-20 Akim Demaille <akim@epita.fr>
12753
12754 * src/files.c (guard_obstack): New.
12755 (open_files): Initialize it.
12756 (output_files): Dump it...
12757 * src/files.h: Export it.
12758 * src/reader.c (copy_guard): Use it.
12759
27110317
AD
127602000-12-19 Akim Demaille <akim@epita.fr>
12761
12762 * src/files.c (outfile, defsfile, actfile): Removed as global
12763 vars.
12764 (open_files): Don't compute them.
12765 (output_files): Adjust.
12766 (base_name, short_base_name): Be global.
12767 Adjust dependencies.
12768
19c50364
AD
127692000-12-19 Akim Demaille <akim@epita.fr>
12770
12771 * src/files.c (strsuffix): New.
12772 (stringappend): Be just like strcat but allocate.
12773 (base_names): Eve out from open_files.
12774 Try to simplify the rather hairy computation of base_name and
12775 short_base_name.
12776 (open_files): Use it.
12777 * tests/suite.at (Checking output file names): New test.
12778
573c1d9f
AD
127792000-12-19 Akim Demaille <akim@epita.fr>
12780
12781 * src/system.h (obstack_grow_literal_string): Rename as...
12782 (obstack_grow_string): this.
12783 * src/output.c (output_parser): Recognize `%% actions' instead of
12784 `$'.
12785 * src/bison.s1: s/$/%% actions/.
12786 * src/bison.hairy: Likewise.
12787
ef7ddedd
AD
127882000-12-19 Akim Demaille <akim@epita.fr>
12789
12790 * src/output.c (output_parser): Compute the `#line' lines when
12791 there are.
12792 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
12793 Suggested by Hans Aberg.
12794
ff61dabd
AD
127952000-12-19 Akim Demaille <akim@epita.fr>
12796
12797 Let the handling of the skeleton files be local to the procedures
12798 that use it.
12799
12800 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
12801 longer static.
12802 (fparser, open_extra_files): Remove.
12803 (open_files, output_files): Don't take care of fparser.
12804 * src/files.h: Adjust.
12805 * src/output.c (output_parser): Open and close the file to the
12806 skeleton.
12807 * src/reader.c (read_declarations): When %semantic_parser, open
12808 fguard.
12809
55b96341
AD
128102000-12-19 Akim Demaille <akim@epita.fr>
12811
12812 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
12813 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
12814
358c15b7
AD
128152000-12-19 Akim Demaille <akim@epita.fr>
12816
12817 * src/files.c (open_files): Yipee! We no longer need all the code
12818 looking for `/tmp' since we have no tmp file.
12819
7de3329e
AD
128202000-12-19 Akim Demaille <akim@epita.fr>
12821
12822 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
12823 New macros.
12824 * src/files.c (open_files): Less dependency on MSDOS etc.
12825
3abcd459
AD
128262000-12-14 Akim Demaille <akim@epita.fr>
12827
12828 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
12829 Provide a default definition.
12830 Use it when executing the default @ action.
12831 * src/reader.c (reader_output_yylsp): No longer include
12832 `timestamp' and `text' in the default YYLTYPE.
12833
2a91a95e
AD
128342000-12-12 Akim Demaille <akim@epita.fr>
12835
12836 * src/reader.c (copy_definition, parse_union_decl, copy_action)
12837 (copy_guard): Quote the file names.
12838 Reported by Laurent Mascherpa.
12839
14d3eb9b
AD
128402000-12-12 Akim Demaille <akim@epita.fr>
12841
12842 * src/output.c (output_headers, output_program, output): Be sure
12843 to escape special characters when outputting filenames.
12844 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
12845 (output_headers): Don't depend on them, Use ACTSTR.
12846
d7045ec6
AD
128472000-11-17 Akim Demaille <akim@epita.fr>
12848
12849 * lib/obstack.h: Formatting changes.
12850 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
12851 prevents type checking.
12852 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
12853 cast the value to (void *): assigning a `foo *' to a `void *'
12854 variable is valid.
12855 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
12856 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
12857 append characters.
12858
6fd54b73
AD
128592000-11-17 Akim Demaille <akim@epita.fr>
12860
12861 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
12862 as...
12863 (suite.m4, regression.m4, calc.m4): these.
12864 * tests/atgeneral.m4: Update from CVS Autoconf.
12865
4c50eae6
AD
128662000-11-17 Akim Demaille <akim@epita.fr>
12867
12868 * tests/regression.m4 (%union and --defines): New test,
12869 demonstrating a current bug in the obstack implementation.
12870
a35f64ea
AD
128712000-11-17 Akim Demaille <akim@epita.fr>
12872
12873 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
12874 macros.
12875 Use them to declare the variables which are global or local to
12876 `yyparse'.
12877
7de23534
AD
128782000-11-17 Akim Demaille <akim@epita.fr>
12879
12880 * acconfig.h: Remove, no longer used.
12881
aa7815f5
AD
128822000-11-07 Akim Demaille <akim@epita.fr>
12883
12884 * src: s/Copyright (C)/Copyright/g.
12885
5af1f549
AD
128862000-11-07 Akim Demaille <akim@epita.fr>
12887
12888 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
12889 defining.
12890 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
12891
553e2b22
AD
128922000-11-07 Akim Demaille <akim@epita.fr>
12893
12894 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
12895 Merge in a single CPP if/else.
12896
8a4f41d6
AD
128972000-11-07 Akim Demaille <akim@epita.fr>
12898
12899 * src/output.c (output): Remove useless variables.
12900 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
12901 argument `data' for consistency with the prototypes.
12902 Qualify it `const'.
12903 (obstack_copy, obstack_copy0): Rename the second argument as
12904 `address' for consistency. Qualify it `const'.
12905 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
12906 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
12907 `const' their input argument (`data' or `address').
12908 Adjust the corresponding macros to include `const' in casts.
12909
095a3fb5
AD
129102000-11-03 Akim Demaille <akim@epita.fr>
12911
12912 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
12913 s/PFILE1/BISON_HAIRY/.
12914 Adjust dependencies.
12915
d1cdce7c
AD
129162000-11-03 Akim Demaille <akim@epita.fr>
12917
090c5ebf 12918 For some reason, this was not applied.
d1cdce7c
AD
12919
12920 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
12921 `unlink': it's no longer used.
12922
9311529b
AD
129232000-11-03 Akim Demaille <akim@epita.fr>
12924
12925 * src/files.c (skeleton_find): New function, eved out of...
12926 (open_files, open_extra_files): here.
12927
d8880f69
AD
129282000-11-03 Akim Demaille <akim@epita.fr>
12929
12930 Don't use `atexit'.
12931
12932 * src/files.c (obstack_save): New function.
12933 (done): Rename as...
12934 (output_files): this.
12935 Use `obstack_save'.
12936 * src/main.c (main): Don't use `atexit' to register `done', since
12937 it no longer has to remove tmp files, just call `output_files'
12938 when there are no errors.
12939
0dbb648e
AD
129402000-11-02 Akim Demaille <akim@epita.fr>
12941
12942 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
12943 `unlink': it's no longer used.
12944 * src/files.h: Formatting changes.
12945
896fe5c1
AD
129462000-11-02 Akim Demaille <akim@epita.fr>
12947
12948 Remove the last uses of mktemp and unlink/delete.
12949
12950 * src/files.c (fdefines, ftable): Removed.
12951 (defines_ostack, table_obstack): New.
12952 Adjust dependencies of the former into uses of the latter.
12953 * src/output.c (output_short_or_char_table, output_short_table):
12954 Convert to using obstacks.
12955 * src/reader.c (copy_comment2): Accept one FILE * and two
12956 obstacks.
12957 (output_token_defines, reader_output_yylsp): Use obstacks.
12958 * src/system.h (obstack_fgrow3): New.
1f65350a 12959 * po/POTFILES.in: Adjust.
896fe5c1 12960
dd60faec
AD
129612000-11-01 Akim Demaille <akim@epita.fr>
12962
12963 Change each use of `fattrs' into a use of `attrs_obstack'.
12964
12965 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
12966 * src/files.c (fattrs): Remove.
12967 (attrs_obstack): New.
12968 Adjust all dependencies.
12969 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
12970
8c7ebe49
AD
129712000-11-01 Akim Demaille <akim@epita.fr>
12972
12973 Introduce obstacks.
12974 Change each use of `faction' into a use of `action_obstack'.
12975
12976 * lib/obstack.h, lib/obstack.c: New files.
12977 * src/files.c (faction): Remove.
12978 (action_obstack): New.
12979 Adjust all dependencies.
12980
77aee789
AD
129812000-10-20 Akim Demaille <akim@epita.fr>
12982
12983 * lib/quote.h (PARAMS): New macro. Use it.
12984
43591cec
AD
129852000-10-16 Akim Demaille <akim@epita.fr>
12986
12987 * src/output.c (output_short_or_char_table): New function.
12988 (output_short_table, output_token_translations): Use it.
12989 (goto_actions): Use output_short_table.
12990
1e9798d5
AD
129912000-10-16 Akim Demaille <akim@epita.fr>
12992
12993 * src/symtab.c (bucket_new): New function.
12994 (getsym): Use it.
12995
12996 * src/output.c (output_short_table): New argument to display the
12997 comment associated with the table.
12998 Adjust dependencies.
12999 (output_gram): Use it.
13000 (output_rule_data): Nicer output layout for YYTNAME.
13001
f282676b
AD
130022000-10-16 Akim Demaille <akim@epita.fr>
13003
13004 * src/lex.c (read_typename): New function.
13005 (lex): Use it.
13006 * src/reader.c (copy_dollar): Likewise.
13007
550a72a3
AD
130082000-10-16 Akim Demaille <akim@epita.fr>
13009
13010 * src/reader.c (copy_comment2): Expect the input stream to be on
13011 the `/' which is suspected to open a comment, instead of being
13012 called after `//' or `/*' was read.
13013 (copy_comment, copy_definition, parse_union_decl, copy_action)
13014 (copy_guard): Adjust.
13015
131e2fef
AD
130162000-10-16 Akim Demaille <akim@epita.fr>
13017
13018 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
13019 `read_signed_integer'.
13020
79282c5a
AD
130212000-10-16 Akim Demaille <akim@epita.fr>
13022
13023 * src/reader.c (copy_dollar): New function.
13024 (copy_guard, copy_action): Use it.
13025
ff4a34be
AD
130262000-10-16 Akim Demaille <akim@epita.fr>
13027
13028 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
13029 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
13030 New files, from Fileutils 4.0.27.
13031 * src/main.c (printable_version): Remove.
13032 * src/lex.c, src/reader.c: Use `quote'.
13033
130342000-10-04 Akim Demaille <akim@epita.fr>
13035
13036 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
13037
14ded682
AD
130382000-10-04 Akim Demaille <akim@epita.fr>
13039
13040 * doc/bison.texinfo: Various typos spotted by Neil Booth.
13041
8e03724b
AD
130422000-10-04 Akim Demaille <akim@epita.fr>
13043
13044 When a literal string is used to define two different tokens,
13045 `bison -v' segfaults.
13046 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
13047
13048 * tests/regression.m4: New file.
13049 Include the core of the sample provided by Piotr Gackiewicz.
13050 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
13051 properly.
13052
a9e64249
AD
130532000-10-04 Akim Demaille <akim@epita.fr>
13054
13055 * src/reader.c (parse_expect_decl): Keep `count' within the size
13056 of `buffer'.
13057 From Neil Booth.
13058
da9abf43
AD
130592000-10-02 Paul Eggert <eggert@twinsun.com>
13060
13061 * bison.s1 (yyparse): Assign the default value
13062 unconditionally, to avoid a GCC warning and make the parser a
13063 tad smaller.
13064
c33638bb
AD
130652000-10-02 Akim Demaille <akim@epita.fr>
13066
13067 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
13068 options.
13069
444c570a
AD
130702000-10-02 Akim Demaille <akim@epita.fr>
13071
13072 * src/derives.c, src/print.c, src/reduce.c: To ease the
13073 translation, move some `\n' out of the translated strings.
13074
89cab50d
AD
130752000-10-02 Akim Demaille <akim@epita.fr>
13076
13077 The location tracking mechanism is precious for parse error
13078 messages. Nevertheless, it is enabled only when `@n' is used in
13079 the grammar, which is a different issue (you can use it in error
13080 message, but not in the grammar per se). Therefore, there should
13081 be another means to enable it.
13082
13083 * src/getargs.c (getargs): Support `--locations'.
13084 (usage): Report it.
13085 * src/getargs.h (locationsflag): Export it.
13086 * src/lex.c (percent_table): Support `%locations'.
13087 * src/reader.c (yylsp_needed): Remove this variable, now replaced
13088 with `locationsflag'.
13089 * doc/bison.texinfo: Document `--locations' and `%locations'.
13090 Sort the options.
13091 * tests/calc.m4: Test it.
13092
13093 For regularity of the names, replace each
13094 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
13095 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
13096 In addition replace each `flag' with `_flag'.
13097
d6c2cba0
AD
130982000-10-02 Akim Demaille <akim@epita.fr>
13099
13100 Also test parse error messages, including with YYERROR_VERBOSE.
13101
13102 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
13103 associative).
13104 Use it to check the computations.
13105 Use it to check `nonassoc' is honored.
13106 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
13107 `--yyerror-verbose'.
13108 (_AT_CHECK_CALC): Adjust to this option.
13109 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
13110
5a35a6cb
AD
131112000-10-02 Akim Demaille <akim@epita.fr>
13112
13113 Test also `--verbose', `--defines' and `--name-prefix'. Testing
13114 the latter demonstrates a flaw in the handling of non debugging
13115 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
13116 was used in order to simplify:
13117
13118 #if YYDEBUG
13119 if (yydebug)
13120 {
13121 ...
13122 }
13123 #endif
13124
13125 into
13126
13127 if (yydebug)
13128 {
13129 ...
13130 }
13131
13132 unfortunately this leads to a CPP conflict when
13133 `--name-prefix=foo' is used since it produces `#define yydebug
13134 foodebug'.
13135
13136 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
13137 (YYDPRINTF): New macro.
13138 Spread its use.
13139 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
13140 the bison options.
13141 Also test `--verbose', `--defines' and `--name-prefix'.
13142
71da9eea
AD
131432000-10-02 Akim Demaille <akim@epita.fr>
13144
13145 Improve the readability of the produced parsers.
13146
13147 * src/bison.s1: Formatting changes.
13148 Improve the comment related to the `$' mark.
13149 (yydefault): Don't fall through to `yyresume': `goto' there.
13150 * src/output.c (output_parser): When the `$' is met, skip the end
13151 of its line.
13152 New variable, `number_of_dollar_signs', to check there's exactly
13153 one `$' in the parser skeleton.
13154
95e36146
AD
131552000-10-02 Akim Demaille <akim@epita.fr>
13156
13157 * lib/xstrdup.c: New file, from the fileutils.
13158 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
13159 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
13160 instead of strlen + xmalloc + strcpy.
13161 * src/symtab.c (copys): Remove, use xstrdup instead.
13162
d7020c20
AD
131632000-10-02 Akim Demaille <akim@epita.fr>
13164
13165 * src/gram.h (associativity): New enum type which replaces the
13166 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
13167 `right_assoc', `left_assoc' and `non_assoc'.
13168 Adjust all dependencies.
13169 * src/reader.c: Formatting changes.
13170 (LTYPESTR): Don't define it, use it as a literal in
13171 `reader_output_yylsp'.
13172 * src/symtab.h (symbol_class): New enum type which replaces the
13173 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
13174 `sunknown', `stoken and `snterm'.
13175
1916f98e
AD
131762000-10-02 Akim Demaille <akim@epita.fr>
13177
13178 * src/getargs.c (fixed_outfiles): Rename as...
13179 (yaccflag): for consistency and accuracy.
13180 Adjust dependencies.
13181
d7913476
AD
131822000-10-02 Akim Demaille <akim@epita.fr>
13183
13184 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
13185 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
13186 difficult and introduced a lot of core dump. It turns out that
13187 Bison used an implementation of `xmalloc' based on `calloc', and
13188 at various places it does depend upon the initialization to 0. I
13189 have not tried to isolate the pertinent places, and all the former
13190 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
13191 someone should address this issue.
13192
13193 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
13194 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
13195 files.
13196 Adjust dependencies.
13197 * src/warshall.h: New file.
13198 Propagate.
13199
340ef489
AD
132002000-10-02 Akim Demaille <akim@epita.fr>
13201
13202 Various anti-`extern in *.c' changes.
13203
13204 * src/system.h: Include `assert.h'.
13205
b2ca4022
AD
132062000-10-02 Akim Demaille <akim@epita.fr>
13207
13208 * src/state.h (nstates, final_state, first_state, first_shift)
13209 (first_reduction): Move their exportation from here...
13210 * src/LR0.h: to here.
13211 Adjust dependencies.
13212 * src/getargs.c (statisticsflag): New variable.
13213 Add support for `--statistics'.
13214 Adjust dependencies.
13215
13216 Remove a lot of now useless `extern' statements in most files.
13217
403b315b
AD
132182000-10-02 Akim Demaille <akim@epita.fr>
13219
13220 * src/LR0.h: New file.
13221 Propagate its use.
13222
07a58c13
AD
132232000-10-02 Akim Demaille <akim@epita.fr>
13224
13225 * src/print.h: New file.
13226 Propagate its use.
13227 * src/print.c: Formatting and ordering changes.
13228 (verbose, terse): Replace with...
13229 (print_results): this new function.
13230 Adjust dependencies.
13231
0619caf0
AD
132322000-10-02 Akim Demaille <akim@epita.fr>
13233
13234 * src/conflicts.c (conflict_report): New function.
13235 (conflict_log, verbose_conflict_log): Replace with...
13236 (print_conflicts): this function.
13237 Adjust dependencies.
13238 * src/conflicts.h: New file.
13239 Propagate its inclusion.
13240
3519ec76
AD
132412000-10-02 Akim Demaille <akim@epita.fr>
13242
13243 * src/nullable.h: New file.
13244 Propagate its inclusion.
13245 * src/nullable.c: Formatting changes.
13246
015acc48
AD
132472000-10-02 Akim Demaille <akim@epita.fr>
13248
13249 * src/reduce.h: New file.
13250 Propagate its inclusion.
13251 * src/reduce.c: Topological sort and other formatting changes.
13252 (bool, TRUE, FALSE): Move their definition to...
13253 * src/system.h: here.
13254
8963a27b
AD
132552000-10-02 Akim Demaille <akim@epita.fr>
13256
13257 * src/files.c: Formatting changes.
13258 (tryopen, tryclose, openfiles): Rename as...
13259 (xfopen, xfclose, open_files): this.
13260 (stringappend): static.
13261 * src/files.h: Complete the list of exported symbols.
13262 Propagate its use.
13263
a70083a3
AD
132642000-10-02 Akim Demaille <akim@epita.fr>
13265
13266 * src/reader.h: New file.
13267 Propagate its use instead of tedious list of `extern' and
13268 prototypes.
13269 * src/reader.c: Formatting changes, topological sort,
13270 s/register//.
13271
abadc117
AD
132722000-10-02 Akim Demaille <akim@epita.fr>
13273
13274 * src/lex.h: Prototype `lex.c' exported functions.
13275 * src/reader.c: Adjust.
13276 * src/lex.c: Formatting changes.
13277 (safegetc): Rename as...
13278 (xgetc): this.
13279
720d742f
AD
132802000-10-02 Akim Demaille <akim@epita.fr>
13281
13282 * src/lalr.h: New file.
13283 Propagate its inclusion instead of prototypes and `extern'.
13284 * src/lalr.c: Formatting changes, topological sorting etc.
13285
f2acea59
AD
132862000-10-02 Akim Demaille <akim@epita.fr>
13287
13288 * src/output.c (token_actions): Introduce a temporary array,
13289 YYDEFACT, that makes it possible for this function to use
13290 output_short_table.
13291
d019d655
AD
132922000-10-02 Akim Demaille <akim@epita.fr>
13293
13294 `user_toknums' is output as a `short[]' in `output.c', while it is
13295 defined as a `int[]' in `reader.c'. For consistency with the
13296 other output tables, `user_toknums' is now defined as a table of
13297 shorts.
13298
13299 * src/reader.c (user_toknums): Be a short table instead of an int
13300 table.
13301 Adjust dependencies.
13302
13303 Factor the short table outputs.
13304
13305 * src/output.c (output_short_table): New function.
13306 * src/output.c (output_gram, output_stos, output_rule_data)
13307 (output_base, output_table, output_check): Use it.
13308
6c89f1c1
AD
133092000-10-02 Akim Demaille <akim@epita.fr>
13310
13311 * src/output.c (output): Topological sort of the functions, in
13312 order to get rid of the `static' prototypes.
13313 No longer use `register'.
13314 * src/output.h: New file.
13315 Propagate its inclusion in files explicitly prototyping functions
13316 from output.c.
13317
d9efd181
AD
133182000-09-21 Akim Demaille <akim@epita.fr>
13319
13320 * src/atgeneral.m4: Update from Autoconf.
13321
c29240e7 133222000-09-21 Akim Demaille <akim@epita.fr>
2fa6973e
AD
13323
13324 * src/closure.h: New file.
13325 * src/closure.c: Formatting changes, topological sort over the
13326 functions, use of closure.h.
13327 (initialize_closure, finalize_closure): Rename as...
13328 (new_closure, free_closure): these. Adjust dependencies.
13329 * src/LR0.c: Formatting changes, topological sort, use of
13330 cloture.h.
13331 (initialize_states): Rename as...
13332 (new_states): this.
13333 * src/Makefile.am (noinst_HEADERS): Adjust.
13334
499daa50
AD
133352000-09-20 Akim Demaille <akim@epita.fr>
13336
13337 * src/acconfig.h: Don't protect config.h against multiple
13338 inclusion.
13339 Don't define PARAMS.
13340 * src/system.h: Define PARAMS.
13341 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
13342 purpose of config.h. system.h must not try to fix wrong
13343 definitions in config.h.
13344
cc84fd5d
AD
133452000-09-20 Akim Demaille <akim@epita.fr>
13346
13347 * src/derives.h: New file.
13348 * src/main.c, src/derives.h: Use it.
13349 Formatting changes.
13350 * src/Makefile.am (noinst_HEADERS): Adjust.
13351
db5b3a89
AD
133522000-09-20 Akim Demaille <akim@epita.fr>
13353
13354 * tests/atgeneral.m4: Update from Autoconf.
13355 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
13356 (AT_CHECK_CALC): New macros.
13357 Use these macros to test bison with options `', `--raw',
13358 `--debug', `--yacc', `--yacc --debug'.
13359
ceed8467
AD
133602000-09-19 Akim Demaille <akim@epita.fr>
13361
13362 * src/output.c: Formatting changes.
13363 * src/machine.h: Remove, leaving its contents in...
13364 * src/system.h: here.
13365 Include stdio.h.
13366 Adjust all dependencies on stdio.h and machine.h.
13367 * src/getargs.h: New file.
13368 Let all `extern' declarations about getargs.c be replaced with
13369 inclusion of `getargs.h'.
13370 * src/Makefile.am (noinst_HEADERS): Adjust.
13371
13372 * tests/calc.m4 (yyin): Be initialized in main, not on the global
13373 scope.
13374 (yyerror): Returns void, not int.
13375 * doc/bison.texinfo: Formatting changes.
13376
05a1d24b
AD
133772000-09-19 Akim Demaille <akim@epita.fr>
13378
13379 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
13380 portable.
13381
cbd25751
AD
133822000-09-18 Akim Demaille <akim@epita.fr>
13383
13384 * configure.in: Append WARNING_CFLAGS to CFLAGS.
13385 * src/Makefile.am (INCLUDES): Don't.
13386 Be ready to fetch headers in lib/.
13387
13863333
AD
133882000-09-18 Akim Demaille <akim@epita.fr>
13389
13390 * doc/bison.texinfo: Update the copyright.
13391 ANSIfy and GNUify the examples.
13392 Remove the old menu.
13393
0d533154
AD
133942000-09-18 Akim Demaille <akim@epita.fr>
13395
13396 First set of tests: use the `calc' example from the documentation.
13397
13398 * src/bison.s1 (yyparse): Condition the code using `yytname' which
13399 is defined only when YYDEBUG is.
13400 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
13401 * src/files.c (tryopen, tryclose): Formatting changes.
13402 Move to the top and be static.
13403 * src/reader.c (read_signed_integer): Likewise.
13404 * tests/calc.m4: New file.
13405 * Makefile.am, suite.m4: Adjust.
13406 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
13407
e79137ac
AD
134082000-09-18 Akim Demaille <akim@epita.fr>
13409
13410 Add support for an Autotest test suite for Bison.
13411
13412 * m4/m4.m4, m4/atconfig.m4: New files.
13413 * m4/Makefile.am (EXTRA_DIST): Adjust.
13414 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
13415 files.
13416 * src/getargs.c: Display a more standard --version message.
13417 * src/reader.c (reader): Formatting changes.
13418 No longer depend upon VERSION_STRING.
13419 * configure.in: No longer use `dnl'.
13420 Set up the test suite and the new directory `tests/.
13421 (VERSION_STRING): Remove.
13422
27821bff
AD
134232000-04-14 Akim Demaille <akim@epita.fr>
13424
13425 * src/reader.c (copy_comment2): New function, same as former
13426 `copy_comment', but outputs into two FILE *.
13427 (copy_comment): Use it.
13428 (parse_union_decl): Use it.
13429 (get_type, parse_start_decl): Use the same `invalid' message.
13430 (parse_start_decl, parse_union_decl): Use the same `multiple'
13431 message.
13432 (parse_union_decl, copy_guard, copy_action): Use the same
13433 `unmatched' message.
13434 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
13435
cfe5fbc0
AD
134362000-03-31 Akim Demaille <akim@epita.fr>
13437
13438 * src/files.c (tryopen, tryclose): Move to the top.
13439 Be static.
13440
cb7db13e
AD
134412000-03-31 Akim Demaille <akim@epita.fr>
13442
13443 * src/main.c (main): Don't call `done', exit does it.
13444
a0f6b076
AD
134452000-03-31 Akim Demaille <akim@epita.fr>
13446
36281465
AD
13447 * allocate.c: s/return (foo)/return foo/.
13448 * lalr.c: Likewise.
13449 * LR0.c: Likewise.
13450 * output.c: Likewise.
13451 * reader.c: Likewise.
13452 * symtab.c: Likewise.
13453 * vmsgetargs.c: Likewise.
13454
134552000-03-31 Akim Demaille <akim@epita.fr>
13456
13457 Clean up the error reporting functions.
a0f6b076
AD
13458
13459 * src/report.c: New file.
13460 * src/report.h: Likewise.
13461 * src/Makefile.am: Adjust.
13462 * m4/error.m4: New file.
13463 * m4/Makefile.am: Adjust.
13464 * configure.in (jm_PREREQ_ERROR): Call it.
13465 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
13466 Remove.
13467 (fatal, fatals): Remove. All callers use complain.c::fatal.
13468 (warn, warni, warns, warnss, warnss): Remove. All callers use
13469 complain.c::complain.
13470 (toomany): Remove, use fatal instead.
13471 * src/files.c (done): No argument, use complain_message_count.
13472 * src/main.c (main): Register `done' to `atexit'.
13473
13474 * src/getargs.c (usage): More `fputs', less `fprintf'.
13475
18539825
AD
134762000-03-28 Akim Demaille <akim@epita.fr>
13477
13478 * lib/: New directory.
13479 * Makefile.am (SUBDIRS): Adjust.
13480 * configure.in: Adjust.
13481 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
13482 useless.
13483 * src/alloca.c: Moved to lib/.
13484 * src/getopt.c: Likewise.
13485 * src/getopt1.c: Likewise.
13486 * src/getopt.h: Likewise.
13487 * src/ansi2knr.c: Likewise.
13488 * src/ansi2knr.1: Likewise.
13489 * src/Makefile.am: Adjust.
13490 * lib/Makefile.am: New file.
13491
9f306f2a
AD
134922000-03-28 Akim Demaille <akim@epita.fr>
13493
13494 * src/getargs.c (usage): Refresh the help message.
13495
0ba347b6
AD
134962000-03-17 Akim Demaille <akim@epita.fr>
13497
13498 * src/getopt1.c: Updated from textutils 2.0e
13499 * src/getopt.c: Likewise.
13500 * src/getopt.h: Likewise.
13501
dbe7f271
AD
135022000-03-17 Akim Demaille <akim@epita.fr>
13503
13504 * src/Makefile.am (bison.simple): Fix the awk program: quote only
13505 the file name, not the whole `#line LINE FILE'.
13506
75bbe78d
AD
135072000-03-17 Akim Demaille <akim@epita.fr>
13508
13509 On syntax errors, report the token on which we choked.
13510
aa5fd0ee
AD
13511 * src/bison.s1 (yyparse): In the label yyerrlab, when
13512 YYERROR_VERBOSE, add yychar in msg.
75bbe78d 13513
7b306f52
AD
135142000-03-17 Akim Demaille <akim@epita.fr>
13515
aa5fd0ee 13516 * src/reader.c (copy_at): New function.
7b306f52
AD
13517 (copy_guard): Use it.
13518 (copy_action): Use it.
13519
e87b5700
AD
135202000-03-17 Akim Demaille <akim@epita.fr>
13521
13522 Be kind to translators, save some useless translations.
13523
aa5fd0ee 13524 * src/main.c (banner): New function.
e87b5700
AD
13525 (fatal_banner): Use it.
13526 (warn_banner): Use it.
13527
ae3c3164
AD
135282000-03-17 Akim Demaille <akim@epita.fr>
13529
aa5fd0ee
AD
13530 * src/reader.c (copy_definition): Use copy_string and
13531 copy_comment. Removed now unused `match', `ended',
13532 `cplus_comment'.
ae3c3164
AD
13533 (copy_comment, copy_string): Moved, to be visible from
13534 copy_definition.
13535
4dc58e7c
AD
135362000-03-17 Akim Demaille <akim@epita.fr>
13537
aa5fd0ee
AD
13538 * src/reader.c (copy_string): Declare `static inline'. No
13539 problems with inline, since it is checked by configure.
4dc58e7c
AD
13540 (copy_comment): Likewise.
13541
0a6384c4
AD
135422000-03-17 Akim Demaille <akim@epita.fr>
13543
aa5fd0ee 13544 * src/reader.c (packsymbols): Formatting changes.
0a6384c4 13545
3cef001a
AD
135462000-03-17 Akim Demaille <akim@epita.fr>
13547
aa5fd0ee 13548 * src/reader.c (copy_comment): New function, factored out from:
3cef001a
AD
13549 (copy_action): Use it. Removed now unused `match', `ended',
13550 `cplus_comment'.
13551 (copy_guard): Likewise.
13552
ca36d2ef
AD
135532000-03-17 Akim Demaille <akim@epita.fr>
13554
aa5fd0ee 13555 * src/reader.c (copy_string): New function, factored out from:
ca36d2ef
AD
13556 (copy_action): Use it.
13557 (copy_guard): Likewise.
13558
6666f98f
AD
135592000-03-17 Akim Demaille <akim@epita.fr>
13560
13561 Change the handling of @s so that they behave exactly like $s.
13562 There is now a pseudo variable @$ (readble and writable), location
13563 of the lhs of the rule (by default ranging from the location of
13564 the first symbol of the rhs, to the location of the last symbol,
13565 or, if the rhs is empty, YYLLOC).
13566
13567 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
13568 yyval.
13569 (yyparse): When providing a default semantic action, provide a
13570 default location action.
13571 (after the $): No longer change `*YYLSP', just stack YYLOC the
13572 same way you stack YYVAL.
13573 * src/reader.c (read_declarations): Use warns.
13574 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
13575 (copy_action, case '@'): Likewise.
13576 Use a standard error message, to save useless work from
13577 translators.
13578
41aca2e0
AD
135792000-03-17 Akim Demaille <akim@epita.fr>
13580
aa5fd0ee
AD
13581 * src/bison.s1: Formatting and cosmetics changes.
13582 * src/reader.c: Likewise.
41aca2e0
AD
13583 Update the Copyright notice.
13584
dc08c1d5
AD
135852000-03-17 Akim Demaille <akim@epita.fr>
13586
aa5fd0ee
AD
13587 * src/bison.s1 (#line): All set to `#line' only, since the
13588 Makefile now handles them.
dc08c1d5 13589
9ee3c97b
AD
135902000-03-16 Akim Demaille <akim@epita.fr>
13591
13592 * src/output.c (output_rule_data): Output the documentation of
13593 some of the tables.
13594 (Copyright notice): Update.
13595 Formatting changes.
13596
0de741ca
AD
135972000-03-16 Akim Demaille <akim@epita.fr>
13598
13599 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
13600 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
13601 One `#if YYDEBUG' remains, since it uses variables which are
13602 defined only if `YYDEBUG != 0'.
13603
bb10be54
AD
136042000-03-16 Akim Demaille <akim@epita.fr>
13605
13606 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
13607 and related variables so that the similarities are highlighted.
13608
b07b484a
AD
136092000-03-16 Akim Demaille <akim@epita.fr>
13610
13611 * src/bison.s1: Properly indent CPP directives.
13612
361f60b3
AD
136132000-03-16 Akim Demaille <akim@epita.fr>
13614
13615 * src/bison.s1: Properly indent the `alloca' CPP section.
13616
8c44d3ec
AD
136172000-03-16 Akim Demaille <akim@epita.fr>
13618
13619 Do not hard code values of directories in `configure.in'.
13620 Update the `configure' tool chain.
13621
13622 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
13623 src/makefile.am.
13624 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
13625 (AC_OUTPUT): Add m4/Makefile.
13626 Bump to bison 1.28a, 1.29 has never been released.
13627 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
13628 handled via src/Makefile.am.
13629 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
13630 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
13631 autoheader.
13632 * Makefile.am (SUBDIRS): Add m4.
13633 (ACLOCAL_AM_FLAGS): New variable.
13634 (AUTOMAKE_OPTIONS): Add check-news.
13635 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
13636 the proper line number and file name.
13637 (DEFS): Propagate the location of bison library files and of the
13638 locale files.
13639 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
13640 builddir.
13641 * acinclude.m4: Remove, replaced by the directory m4.
13642 * m4/Makefile.am (EXTRA_DIST): New variable.
13643 * m4/gettext.m4: New file, from the fileutils.
13644 * m4/lcmessage.m4: Likewise
13645 * m4/progtest.m4: Likewise.
13646 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
13647
f95997e7
AD
136482000-03-10 Akim Demaille <akim@epita.fr>
13649
13650 * src/closure.c:
13651 Formatting changes of various comments.
13652 Respect the GNU coding standards at various places.
13653 Don't use `_()' when no translation is needed.
13654
136551999-12-13 Jesse Thilo <jthilo@gnu.org>
13656
13657 * src/files.c:
13658 OS/2 honors TMPDIR environment variable.
13659
136601999-12-13 Jesse Thilo <jthilo@gnu.org>
13661
13662 * doc/bison.texinfo: Tweaked spelling and grammar.
13663 Updated ISBN.
13664 Removed reference to price of printed copy.
13665 Mention BISON_SIMPLE and BISON_HAIRY.
13666
136671999-12-13 Jesse Thilo <jthilo@gnu.org>
13668
13669 * configure.in, NEWS:
13670 Bison 1.29 released.
13671
136721999-10-27 Jesse Thilo <jthilo@gnu.org>
13673
13674 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
13675 Added reference card.
13676
136771999-07-26 Jesse Thilo <jthilo@gnu.org>
13678
13679 * po/ru.po: Added Russian translation.
13680
136811999-07-26 Jesse Thilo <jthilo@gnu.org>
13682
13683 * configure.in: Added Russian translation.
13684
136851999-07-06 Jesse Thilo <jthilo@gnu.org>
13686
13687 * configure.in, NEWS, README:
13688 Released version 1.28.
13689
136901999-06-14 Jesse Thilo <jthilo@gnu.org>
13691
13692 * src/system.h:
13693 Squashed redefinition warning on some systems.
13694
13695 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
13696 Have configure build version string instead of relying on ANSI string
13697 concatentation.
13698
136991999-06-14 Jesse Thilo <jthilo@gnu.org>
13700
13701 * po/POTFILES.in: Got rid of version.c.
13702
137031999-06-14 Jesse Thilo <jthilo@gnu.org>
13704
13705 * acconfig.h, configure.in:
13706 Have configure build version string instead of relying on ANSI string
13707 concatentation.
13708
137091999-06-08 Jesse Thilo <jthilo@gnu.org>
13710
13711 * doc/bison.1:
13712 Dropped mention of `+' for long-named options.
13713
137141999-05-30 Jesse Thilo <jthilo@gnu.org>
13715
13716 * src/files.c: Added <unistd.h> for unlink().
13717
13718 * src/Makefile.am, src/system.h:
13719 I18n fixes.
13720
137211999-05-30 Jesse Thilo <jthilo@gnu.org>
13722
13723 * README: Added a FAQ list.
13724
13725 * configure.in, acconfig.h:
13726 I18n fixes.
13727
137281999-05-30 Jesse Thilo <jthilo@gnu.org>
13729
13730 * doc/FAQ, doc/Makefile.am:
13731 Added a FAQ list.
13732
137331999-05-19 Jesse Thilo <jthilo@gnu.org>
13734
13735 * src/alloc.h, src/symtab.h, src/version.c:
13736 Protected inclusion of "config.h" with HAVE_CONFIG_H.
13737
137381999-04-18 Jesse Thilo <jthilo@gnu.org>
13739
13740 * src/.cvsignore, src/Makefile.am:
13741 Reorganized: sources in `src', documentation in `doc'.
13742
13743 * src/lex.c (literalchar):
13744 fixed the code for escaping double quotes (thanks
13745 Jonathan Czisny.)
13746
137471999-04-18 Jesse Thilo <jthilo@gnu.org>
13748
13749 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
13750 Adjusted paths to reflect directory reorganization.
13751
137521999-04-18 Jesse Thilo <jthilo@gnu.org>
13753
13754 * doc/.cvsignore, doc/Makefile.am:
13755 Reorganized: sources in `src', documentation in `doc'.
13756
137571999-04-18 Jesse Thilo <jthilo@gnu.org>
13758
13759 * configure.in:
13760 Updated AC_INIT file to reflect directory reorganization.
13761
13762 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
13763 Reorganized: sources in `src', documentation in `doc'.
13764
137651999-04-13 Jesse Thilo <jthilo@gnu.org>
13766
13767 * src/allocate.c:
13768 Don't declare calloc() and realloc() if not necessary.
13769
137701999-04-13 Jesse Thilo <jthilo@gnu.org>
13771
13772 * configure.in, acconfig.h, acinclude.m4:
13773 Don't declare calloc() and realloc() if not necessary.
13774
137751999-03-23 Jesse Thilo <jthilo@gnu.org>
13776
13777 * po/.cvsignore: Added i18n support.
13778
137791999-03-23 Jesse Thilo <jthilo@gnu.org>
13780
13781 * acconfig.h, configure.in, Makefile.am:
13782 Added i18n support.
13783
137841999-03-22 Jesse Thilo <jthilo@gnu.org>
13785
13786 * src/bison.s1: Fixed #line numbers.
13787
137881999-03-15 Jesse Thilo <jthilo@gnu.org>
13789
13790 * po/es.po, po/fr.po, po/nl.po, po/de.po:
13791 Added PO files from Translation Project.
13792
137931999-03-03 Jesse Thilo <jthilo@gnu.org>
13794
13795 * Makefile.am:
13796 Added support for non-ANSI compilers (ansi2knr).
13797
137981999-02-16 Jesse Thilo <jthilo@gnu.org>
13799
13800 * configure.in: Bumped version number to 1.27.
13801
13802 * Makefile.am:
13803 Added `bison.simple' to list of files removed by `make distclean'.
13804
138051999-02-12 Jesse Thilo <jthilo@gnu.org>
13806
13807 * src/files.c, src/files.h:
13808 Defined locations of parser files in config.h instead of Makefile.
13809
138101999-02-12 Jesse Thilo <jthilo@gnu.org>
13811
13812 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
13813 Defined locations of parser files in config.h instead of Makefile.
13814
138151999-02-09 Jesse Thilo <jthilo@gnu.org>
13816
13817 * Makefile.am:
13818 Removed inappropriate use of $< macro.
13819
138201999-02-05 Jesse Thilo <jthilo@gnu.org>
13821
13822 * po/Makefile.in.in, po/POTFILES.in:
13823 Add `po' directory skeleton.
13824
138251999-01-27 Jesse Thilo <jthilo@gnu.org>
13826
13827 * README: Document help-bison list.
13828
13829 * configure.in: Add check for mkstemp().
13830
138311999-01-20 Jesse Thilo <jthilo@gnu.org>
13832
13833 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
13834 Hush a few compiler warnings.
13835
13836 * src/files.c:
13837 Add tryclose(), which verifies that fclose was successful.
13838 Hush a couple of compiler warnings.
13839
138401999-01-20 Jesse Thilo <jthilo@gnu.org>
13841
13842 * Makefile.am, OChangeLog:
13843 ChangeLog is now automatically generated. Include the old version as
13844 OChangeLog.
13845
138461999-01-14 Jesse Thilo <jthilo@gnu.org>
13847
13848 * 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:
13849 Update FSF address.
13850
138511999-01-14 Jesse Thilo <jthilo@gnu.org>
13852
13853 * doc/bison.texinfo: Fix formatting glitch.
13854
13855 * doc/bison.texinfo: Update FSF address.
13856
138571999-01-14 Jesse Thilo <jthilo@gnu.org>
13858
13859 * acconfig.h: Update FSF address.
13860
138611999-01-08 Jesse Thilo <jthilo@gnu.org>
13862
13863 * src/system.h:
13864 Don't define PACKAGE here, since config.h defines it.
13865
138661998-12-30 Jesse Thilo <jthilo@gnu.org>
13867
13868 * src/reader.c: Update copyright date.
13869
13870 * src/main.c:
13871 Ditch sprintf to statically-sized buffers in fatal/warn functions in
13872 favor of output directly to stderr (avoids buffer overruns).
13873
13874 * src/reader.c: Some checks for premature EOF.
13875
13876 * 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:
13877 Use prototypes if the compiler understands them.
13878
13879 * src/files.c: Honor TMPDIR on Unix hosts.
13880 Use prototypes if the compiler understands them.
13881
13882 * src/reader.c:
13883 Fix a couple of buffer overrun bugs.
13884 Use prototypes if the compiler understands them.
13885
13886 * src/system.h: Include unistd.h and ctype.h.
13887 Use #ifdef instead of #if for NLS symbols.
13888
138891998-12-30 Jesse Thilo <jthilo@gnu.org>
13890
13891 * doc/bison.texinfo:
13892 Delete comment "consider using @set for edition number, etc..." since
13893 we now are doing so.
13894
138951998-12-30 Jesse Thilo <jthilo@gnu.org>
13896
13897 * configure.in:
13898 Use prototypes if the compiler understands them.
13899
13900 * NEWS: Document 1.26 highlights.
13901
13902 * Makefile.am: Require Automake 1.3 or later.
13903
13904 * acconfig.h:
13905 Use prototypes if the compiler understands them.
13906
139071998-12-29 Jesse Thilo <jthilo@gnu.org>
13908
13909 * src/version.c:
13910 Use VERSION symbol from automake for version number.
13911
139121998-12-29 Jesse Thilo <jthilo@gnu.org>
13913
13914 * acconfig.h, configure.in, version.cin:
13915 Use VERSION symbol from automake for version number.
13916
139171998-11-28 Jesse Thilo <jthilo@gnu.org>
13918
13919 * Makefile.am:
13920 Distribute original version of simple parser (bison.s1), not built
13921 version (bison.simple).
13922
139231998-11-28 Jesse Thilo <jthilo@gnu.org>
13924
13925 * doc/bison.texinfo: Add info dir entry.
13926
13927 * doc/bison.texinfo:
13928 Let automake put version number into documentation.
13929
139301998-11-26 Jesse Thilo <jthilo@gnu.org>
13931
13932 * src/bison.cld, src/build.com, src/vmshlp.mar:
13933 Add non-RCS files from /gd/gnu/bison.
13934
139351998-11-26 Jesse Thilo <jthilo@gnu.org>
13936
13937 * doc/bison.1:
13938 Document the BISON_HAIRY and BISON_SIMPLE variables.
13939
139401998-11-25 Jesse Thilo <jthilo@gnu.org>
13941
13942 * src/version.c: Build version.c automatically.
13943
13944 * src/reader.c:
13945 Fix token numbering (used to start at 258, not 257).
13946
13947 * src/system.h: Include config.h.
13948
13949 * src/getargs.c: Update bug report address.
13950
13951 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
13952 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
13953
139541998-11-25 Jesse Thilo <jthilo@gnu.org>
13955
13956 * Makefile.am:
13957 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
13958
13959 * configure.in, version.cin:
13960 Build version.c automatically.
13961
13962 * AUTHORS: Add AUTHORS file.
13963
13964 * README: Update bug report address.
13965
13966 * bison.simple:
13967 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
13968
13969 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
13970 Add automake stuff.
13971
139721998-11-25 Jesse Thilo <jthilo@gnu.org>
13973
13974 * doc/bison.texinfo: Clean up some formatting.
13975
139761998-05-05 Richard Stallman <rms@gnu.org>
13977
13978 * doc/bison.texinfo:
13979 Explain better why to make a pure parser.
13980
139811998-01-05 Richard Stallman <rms@gnu.org>
13982
13983 * src/files.c (openfiles):
13984 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
13985 find a temporary directory, if possible. Do not unlink files while
13986 they are open.
13987
139881997-08-25 Richard Stallman <rms@gnu.org>
13989
13990 * src/reader.c (stack_offset;):
13991 Change some warni to warns.
13992
13993 * src/lex.c (literalchar): Use warns, not warni.
13994
139951997-06-28 Richard Stallman <rms@gnu.org>
13996
13997 * src/bison.s1: Add a Bison version comment.
13998
13999 * src/main.c (fatal, warn, berror):
14000 Use program_name.
14001
140021997-06-28 Richard Stallman <rms@gnu.org>
14003
14004 * Makefile.in (bison_version): New variable.
14005 (dist): Use that variable.
14006 (bison.s1): Substitute the Bison version into bison.simple.
14007
14008 * bison.simple: Add a Bison version comment.
14009
140101997-06-18 Richard Stallman <rms@gnu.org>
14011
14012 * src/main.c (fatal, warn, berror):
14013 Make error messages standard.
14014 (toomany): Improve error message text.
14015
14016 * 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:
14017 new.h renamed to alloc.h.
14018
140191997-06-18 Richard Stallman <rms@gnu.org>
14020
14021 * Makefile.in: new.h renamed to alloc.h.
14022
140231997-05-24 Richard Stallman <rms@gnu.org>
14024
14025 * src/lex.c (literalchar):
14026 Fix the code for escaping \, " and '.
14027
14028 (lex): Avoid trouble when there are many chars
14029 to discard in a char literal with just several chars in it.
14030
140311997-05-17 Richard Stallman <rms@gnu.org>
14032
14033 * src/bison.s1:
14034 Use malloc, if using alloca is troublesome.
14035 (YYSTACK_USE_ALLOCA): New flag macro.
14036 Define it for some systems and compilers.
14037 (YYSTACK_ALLOC): New macro.
14038 (yyparse): Use YYSTACK_ALLOC to allocate stack.
14039 If it was malloc'd, free it.
14040
140411997-05-17 Richard Stallman <rms@gnu.org>
14042
14043 * bison.simple:
14044 Use malloc, if using alloca is troublesome.
14045 (YYSTACK_USE_ALLOCA): New flag macro.
14046 Define it for some systems and compilers.
14047 (YYSTACK_ALLOC): New macro.
14048 (yyparse): Use YYSTACK_ALLOC to allocate stack.
14049 If it was malloc'd, free it.
14050
140511997-04-23 Richard Stallman <rms@gnu.org>
14052
14053 * src/bison.s1:
14054 (alloca) [__hpux]: Always define as __builtin_alloca.
14055
140561997-04-23 Richard Stallman <rms@gnu.org>
14057
14058 * bison.simple:
14059 (alloca) [__hpux]: Always define as __builtin_alloca.
14060
140611997-04-22 Richard Stallman <rms@gnu.org>
14062
14063 * src/bison.s1:
14064 [__hpux]: Include alloca.h (right for HPUX 10)
14065 instead of declaring alloca (right for HPUX 9).
14066
14067 * src/bison.s1 (__yy_memcpy):
14068 Declare arg `count' as unsigned int.
14069 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
14070
140711997-04-22 Richard Stallman <rms@gnu.org>
14072
14073 * bison.simple:
14074 [__hpux]: Include alloca.h (right for HPUX 10)
14075 instead of declaring alloca (right for HPUX 9).
14076
14077 * bison.simple (__yy_memcpy):
14078 Declare arg `count' as unsigned int.
14079 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
14080
140811997-01-03 Richard Stallman <rms@gnu.org>
14082
14083 * src/allocate.c: [__STDC__ or _MSC_VER]:
14084 Declare calloc and realloc to return void *.
14085
140861997-01-02 Richard Stallman <rms@gnu.org>
14087
14088 * src/system.h:
14089 [_MSC_VER]: Include stdlib.h and process.h.
14090 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
14091
14092 * src/main.c (main): Return FAILURE as a value.
14093 (printable_version): Declare arg as int, not char.
14094
140951997-01-02 Richard Stallman <rms@gnu.org>
14096
14097 * Makefile.in (dist):
14098 Explicitly check for symlinks, and copy them.
14099
141001996-12-19 Richard Stallman <rms@gnu.org>
14101
14102 * src/files.c:
14103 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
14104
141051996-12-18 Paul Eggert <eggert@gnu.org>
14106
14107 * src/bison.s1 (yyparse):
14108 If __GNUC__ and YYPARSE_PARAM are both defined,
14109 declare yyparse to have a void * argument.
14110
141111996-12-18 Paul Eggert <eggert@gnu.org>
14112
14113 * bison.simple (yyparse):
14114 If __GNUC__ and YYPARSE_PARAM are both defined,
14115 declare yyparse to have a void * argument.
14116
141171996-12-17 Richard Stallman <rms@gnu.org>
14118
14119 * src/reduce.c (nbits): Add some casts.
14120
141211996-08-12 Richard Stallman <rms@gnu.org>
14122
14123 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
14124
141251996-08-12 Richard Stallman <rms@gnu.org>
14126
14127 * bison.simple: Test _MSDOS as well as _MSDOS_.
14128
141291996-07-31 Richard Stallman <rms@gnu.org>
14130
14131 * src/bison.s1:
14132 [__sun && __i386]: Include alloca.h.
14133
141341996-07-31 Richard Stallman <rms@gnu.org>
14135
14136 * bison.simple:
14137 [__sun && __i386]: Include alloca.h.
14138
141391996-07-30 Richard Stallman <rms@gnu.org>
14140
14141 * src/bison.s1: Comment change.
14142
14143 * src/bison.s1: Test _MSDOS_, not MSDOS.
14144
141451996-07-30 Richard Stallman <rms@gnu.org>
14146
14147 * bison.simple: Comment change.
14148
14149 * bison.simple: Test _MSDOS_, not MSDOS.
14150
141511996-06-01 Richard Stallman <rms@gnu.org>
14152
14153 * 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:
14154 Insert `_' macro around many string constants.
14155
14156 * src/main.c:
14157 Insert `_' macro around many string constants.
14158
14159 (main): Call setlocale, bindtextdomain and textdomain.
14160
14161 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
14162 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
14163 [ENABLE_NLS]: Include libintl.h.
14164 [ENABLE_NLS] (gettext): Define.
14165 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
14166 (N_, PACKAGE, LOCALEDIR): New macros.
14167
141681996-06-01 Richard Stallman <rms@gnu.org>
14169
14170 * POTFILES.in: New file.
14171
14172 * Makefile.in (allocate.o):
14173 Define target explicitly.
14174
14175 * Makefile.in (CFLAGS): Set to @CFLAGS@.
14176 (LDFLAGS): Set to @LDFLAGS@.
14177 (configure): Run autoconf only if preceding `cd' succeeds.
14178 (bison.s1): Redirect output to temporary file then move the
14179 temporary to the target, rather than redirecting directly to bison.s1.
14180 (clean): Remove config.status and config.log.
14181 (distclean): Don't remove config.status here.
14182
141831996-05-12 Richard Stallman <rms@gnu.org>
14184
14185 * src/bison.s1:
14186 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
14187
141881996-05-12 Richard Stallman <rms@gnu.org>
14189
14190 * bison.simple:
14191 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
14192
141931996-05-11 Richard Stallman <rms@gnu.org>
14194
14195 * src/bison.s1 (__yy_memcpy):
14196 Really reorder the args, as was supposedly done on Feb 14 1995.
14197 (yyparse): Calls changed accordingly.
14198
141991996-05-11 Richard Stallman <rms@gnu.org>
14200
14201 * Makefile.in (dist): Don't use $(srcdir).
14202
14203 * bison.simple (__yy_memcpy):
14204 Really reorder the args, as was supposedly done on Feb 14 1995.
14205 (yyparse): Calls changed accordingly.
14206
142071996-01-27 Richard Stallman <rms@gnu.org>
14208
14209 * src/output.c (output_rule_data):
14210 Test YYERROR_VERBOSE in the conditional
14211 around the definition of ttyname.
14212
142131995-12-29 Richard Stallman <rms@gnu.org>
14214
14215 * src/bison.s1:
14216 Fix line numbers in #line commands.
14217
142181995-12-29 Richard Stallman <rms@gnu.org>
14219
14220 * bison.simple:
14221 Fix line numbers in #line commands.
14222
142231995-12-27 Richard Stallman <rms@gnu.org>
14224
14225 * src/bison.s1 (YYPARSE_PARAM_DECL):
14226 In C++, make it always null.
14227 (YYPARSE_PARAM_ARG): New macro.
14228 (yyparse): Use YYPARSE_PARAM_ARG.
14229
142301995-12-27 Richard Stallman <rms@gnu.org>
14231
14232 * bison.simple (YYPARSE_PARAM_DECL):
14233 In C++, make it always null.
14234 (YYPARSE_PARAM_ARG): New macro.
14235 (yyparse): Use YYPARSE_PARAM_ARG.
14236
142371995-11-29 Richard Stallman <rms@gnu.org>
14238
14239 * doc/bison.texinfo:
14240 Describe literal string tokens, %raw, %no_lines, %token_table.
14241
142421995-11-29 Daniel Hagerty <hag@gnu.org>
14243
14244 * doc/bison.texinfo: Fixed update date
14245
142461995-10-16 Richard Stallman <rms@gnu.org>
14247
14248 * src/version.c: Version 1.25.
14249
142501995-10-16 Richard Stallman <rms@gnu.org>
14251
14252 * NEWS: *** empty log message ***
14253
142541995-10-16 Richard Stallman <rms@gnu.org>
14255
14256 * doc/bison.1, doc/bison.rnh:
14257 Add new options.
14258
142591995-10-15 Richard Stallman <rms@gnu.org>
14260
14261 * src/vmsgetargs.c, src/getargs.c:
14262 Added -n, -k, and -raw switches.
14263 (noparserflag, toknumflag, rawtoknumflag): New variables.
14264
14265 * src/symtab.h (SALIAS):
14266 New #define for adding aliases to %token.
14267 (struct bucket): Added `alias' field.
14268
14269 * src/reduce.c (reduce_grammar):
14270 Revise error message.
14271 (print_notices): Remove final `.' from error message.
14272
14273 * src/reader.c (reader_output_yylsp):
14274 New function.
14275 (readgram): Use `#if 0' around code that accepted %command
14276 inside grammar rules: The documentation doesn't allow it,
14277 and it will fail since the %command processors scan for the next %.
14278 (parse_token_decl): Extended the %token
14279 declaration to allow a multi-character symbol as an alias.
14280 (parse_thong_decl): New function.
14281 (read_declarations): Added %thong declarations.
14282 (read_declarations): Handle NOOP to deal with allowing
14283 % declarations as another means to specify the flags.
14284 (readgram): Allow %prec prior to semantics embedded in a rule.
14285 (skip_to_char, read_declarations, copy_definition)
14286 (parse_token_decl, parse_start_decl, parse_type_decl)
14287 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
14288 (get_type_name, copy_guard, copy_action, readgram)
14289 (get_type, packsymbols): Revised most error messages.
14290 Changed `fatal' to `warnxxx' to avoid aborting for error.
14291 Revised and use multiple warnxxx functions to avoid using VARARGS1.
14292 (read_declarations): Improve the error message for
14293 an invalid character. Do not abort.
14294 (read_declarations, copy_guard, copy_action): Use
14295 printable_version to avoid unprintable characters in printed output.
14296 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
14297 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
14298 Allow the type of a non-terminal can be given
14299 more than once, as long as all specifications give the same type.
14300
14301 * src/output.c:
14302 (output_headers, output_trailers, output, output_gram)
14303 (output_rule_data): Implement noparserflag variable.
14304 Implement toknumflag variable.
14305 (output): Call reader_output_yylsp to output LTYPESTR.
14306
14307 * src/main.c (main):
14308 If reader sees an error, don't process the grammar.
14309 (fatals): Updated to not use VARARGS1.
14310 (printable_version, int_to_string, warn, warni, warns, warnss)
14311 (warnsss): New error reporting functions. Avoid abort for error.
14312
14313 * src/lex.h:
14314 Added THONG and NOOP for alias processing.
14315 Added SETOPT for the new code that allows setting options with %flags.
14316
14317 * src/lex.c:
14318 Include getopt.h. Add some extern decls.
14319 (safegetc): New function to deal with EOF gracefully.
14320 (literalchar); new function to deal with reading \ escapes.
14321 (lex): Use literalchar.
14322 (lex): Implemented "..." tokens.
14323 (literalchar, lex, parse_percent_token): Made tokenbuffer
14324 always contain the token. This includes growing the token
14325 buffer while reading an integer.
14326 (parse_percent_token): Replaced if-else statement with percent_table.
14327 (parse_percent_token): Added % declarations as another
14328 way to specify the flags -n, -l, and -r. Also added hooks for
14329 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
14330 major changes to files.c.
14331 (lex) Retain in the incoming stream a character following
14332 an incorrect '/'.
14333 (skip_white_space, lex): Revised most error messages
14334 and changed fatal to warn to avoid aborting.
14335 (percent_table): Added %thong declarations.
14336
14337 * src/gram.h: Comment changes.
14338
14339 * src/files.c (openfiles, open_extra_files, done):
14340 Add faction flag
14341 and actfile file. Handle noparserflag. Both for -n switch.
14342
14343 * src/conflicts.c (resolve_sr_conflict):
14344 Remove use of alloca.
14345
143461995-06-01 Jim Meyering <meyering@gnu.org>
14347
14348 * doc/bison.texinfo: *** empty log message ***
14349
143501995-05-06 Richard Stallman <rms@gnu.org>
14351
14352 * src/bison.s1: Comment change.
14353
143541995-05-06 Richard Stallman <rms@gnu.org>
14355
14356 * bison.simple: Comment change.
14357
143581995-05-03 Richard Stallman <rms@gnu.org>
14359
14360 * src/version.c: Version now 1.24.
14361
14362 * src/bison.s1: Change distribution terms.
14363
14364 * src/version.c: Version now 1.23.
14365
143661995-05-03 Richard Stallman <rms@gnu.org>
14367
14368 * doc/bison.texinfo:
14369 Rewrite "Conditions for Using Bison".
14370 Update version to 1.24.
14371
143721995-05-03 Richard Stallman <rms@gnu.org>
14373
14374 * bison.simple: Change distribution terms.
14375
143761995-02-23 Richard Stallman <rms@gnu.org>
14377
14378 * src/files.c: Test __VMS_POSIX as well as VMS.
14379
143801995-02-14 Jim Meyering <meyering@gnu.org>
14381
14382 * src/bison.s1 (__yy_memcpy):
14383 Renamed from __yy_bcopy to avoid
14384 confusion. Reverse FROM and TO arguments to be consistent with
14385 those of memcpy.
14386
143871995-02-14 Jim Meyering <meyering@gnu.org>
14388
14389 * bison.simple (__yy_memcpy):
14390 Renamed from __yy_bcopy to avoid
14391 confusion. Reverse FROM and TO arguments to be consistent with
14392 those of memcpy.
14393
143941994-11-10 David J. MacKenzie <djm@gnu.org>
14395
14396 * NEWS: reformat
14397
14398 * NEWS: New file.
14399
14400 * Makefile.in (DISTFILES): Include NEWS.
14401
14402 * Makefile.in (DISTFILES):
14403 Include install-sh, not install.sh.
14404
14405 * configure.in: Update to Autoconf v2 macro names.
14406
144071994-10-05 David J. MacKenzie <djm@gnu.org>
14408
14409 * Makefile.in: fix typo
14410
14411 * Makefile.in (prefix, exec_prefix):
14412 Let configure set them.
14413
144141994-09-28 David J. MacKenzie <djm@gnu.org>
14415
14416 * Makefile.in: Set datadir to $(prefix)/share.
14417
144181994-09-15 Richard Stallman <rms@gnu.org>
14419
14420 * src/bison.s1:
14421 Update copyright notice and GPL version.
14422
144231994-09-15 Richard Stallman <rms@gnu.org>
14424
14425 * bison.simple:
14426 Update copyright notice and GPL version.
14427
144281994-07-12 Richard Stallman <rms@gnu.org>
14429
14430 * src/reduce.c, src/reader.c:
14431 entered into RCS
14432
144331994-05-05 David J. MacKenzie <djm@gnu.org>
14434
14435 * Makefile.in: entered into RCS
14436
144371994-03-26 Richard Stallman <rms@gnu.org>
14438
14439 * src/bison.s1: entered into RCS
14440
144411994-03-26 Richard Stallman <rms@gnu.org>
14442
14443 * bison.simple: entered into RCS
14444
144451994-03-25 Richard Stallman <rms@gnu.org>
14446
14447 * src/main.c: entered into RCS
14448
144491994-03-24 Richard Stallman <rms@gnu.org>
14450
14451 * src/conflicts.c: entered into RCS
14452
144531994-01-02 Richard Stallman <rms@gnu.org>
14454
14455 * Makefile.in: *** empty log message ***
14456
144571993-11-21 Richard Stallman <rms@gnu.org>
14458
14459 * src/bison.s1: *** empty log message ***
14460
144611993-11-21 Richard Stallman <rms@gnu.org>
14462
14463 * doc/bison.texinfo: entered into RCS
14464
14465 * doc/bison.texinfo: *** empty log message ***
14466
144671993-11-21 Richard Stallman <rms@gnu.org>
14468
14469 * bison.simple: *** empty log message ***
14470
144711993-10-25 David J. MacKenzie <djm@gnu.org>
14472
14473 * doc/bison.texinfo: *** empty log message ***
14474
144751993-10-19 Richard Stallman <rms@gnu.org>
14476
14477 * src/bison.s1: *** empty log message ***
14478
144791993-10-19 Richard Stallman <rms@gnu.org>
14480
14481 * bison.simple: *** empty log message ***
14482
144831993-10-14 Richard Stallman <rms@gnu.org>
14484
14485 * src/bison.s1: *** empty log message ***
14486
144871993-10-14 Richard Stallman <rms@gnu.org>
14488
14489 * bison.simple: *** empty log message ***
14490
144911993-09-14 David J. MacKenzie <djm@gnu.org>
14492
14493 * doc/bison.texinfo: *** empty log message ***
14494
144951993-09-13 Noah Friedman <friedman@gnu.org>
14496
14497 * Makefile.in: *** empty log message ***
14498
144991993-09-10 Richard Stallman <rms@gnu.org>
14500
14501 * src/conflicts.c: *** empty log message ***
14502
14503 * src/system.h: entered into RCS
14504
145051993-09-10 Richard Stallman <rms@gnu.org>
14506
14507 * doc/bison.1: entered into RCS
14508
145091993-09-06 Noah Friedman <friedman@gnu.org>
14510
14511 * src/version.c: entered into RCS
14512
145131993-09-06 Noah Friedman <friedman@gnu.org>
14514
14515 * Makefile.in: *** empty log message ***
14516
145171993-07-30 David J. MacKenzie <djm@gnu.org>
14518
14519 * Makefile.in: *** empty log message ***
14520
145211993-07-24 Richard Stallman <rms@gnu.org>
14522
14523 * src/bison.s1: *** empty log message ***
14524
145251993-07-24 Richard Stallman <rms@gnu.org>
14526
14527 * bison.simple: *** empty log message ***
14528
145291993-07-08 David J. MacKenzie <djm@gnu.org>
14530
14531 * Makefile.in: *** empty log message ***
14532
145331993-07-04 Richard Stallman <rms@gnu.org>
14534
14535 * src/bison.s1: *** empty log message ***
14536
145371993-07-04 Richard Stallman <rms@gnu.org>
14538
14539 * bison.simple: *** empty log message ***
14540
145411993-06-26 David J. MacKenzie <djm@gnu.org>
14542
14543 * src/getargs.c: entered into RCS
14544
145451993-06-26 David J. MacKenzie <djm@gnu.org>
14546
14547 * doc/bison.texinfo: *** empty log message ***
14548
14549 * doc/bison.1: New file.
14550
145511993-06-25 Richard Stallman <rms@gnu.org>
14552
14553 * src/getargs.c: New file.
14554
145551993-06-16 Richard Stallman <rms@gnu.org>
14556
14557 * src/bison.s1: *** empty log message ***
14558
145591993-06-16 Richard Stallman <rms@gnu.org>
14560
14561 * bison.simple: *** empty log message ***
14562
145631993-06-03 Richard Stallman <rms@gnu.org>
14564
14565 * src/bison.s1: New file.
14566
145671993-06-03 Richard Stallman <rms@gnu.org>
14568
14569 * doc/bison.texinfo: *** empty log message ***
14570
145711993-06-03 Richard Stallman <rms@gnu.org>
14572
14573 * bison.simple: New file.
14574
145751993-05-19 Richard Stallman <rms@gnu.org>
14576
14577 * doc/bison.texinfo: New file.
14578
145791993-05-07 Noah Friedman <friedman@gnu.org>
14580
14581 * Makefile.in: *** empty log message ***
14582
145831993-04-28 Noah Friedman <friedman@gnu.org>
14584
14585 * src/reader.c: *** empty log message ***
14586
145871993-04-23 Noah Friedman <friedman@gnu.org>
14588
14589 * src/alloc.h: entered into RCS
14590
145911993-04-20 David J. MacKenzie <djm@gnu.org>
14592
14593 * src/version.c: *** empty log message ***
14594
14595 * src/files.c, src/allocate.c:
14596 entered into RCS
14597
14598 * src/reader.c: *** empty log message ***
14599
14600 * src/lex.c: entered into RCS
14601
14602 * src/conflicts.c: New file.
14603
14604 * src/symtab.c: entered into RCS
14605
14606 * src/alloc.h: New file.
14607
14608 * src/LR0.c: entered into RCS
14609
146101993-04-18 Noah Friedman <friedman@gnu.org>
14611
14612 * src/reader.c: New file.
14613
14614 * src/version.c: *** empty log message ***
14615
146161993-04-18 Noah Friedman <friedman@gnu.org>
14617
14618 * Makefile.in: *** empty log message ***
14619
146201993-04-17 Noah Friedman <friedman@gnu.org>
14621
14622 * Makefile.in: *** empty log message ***
14623
146241993-04-15 Richard Stallman <rms@gnu.org>
14625
14626 * src/main.c, src/files.c:
14627 New file.
14628
146291993-04-15 Noah Friedman <friedman@gnu.org>
14630
14631 * configure.in: entered into RCS
14632
14633 * configure.in: *** empty log message ***
14634
14635 * configure.in: New file.
14636
146371993-04-14 Richard Stallman <rms@gnu.org>
14638
14639 * Makefile.in: New file.
14640
146411993-04-13 Richard Stallman <rms@gnu.org>
14642
14643 * src/version.c: New file.
14644
146451993-03-25 Richard Stallman <rms@gnu.org>
14646
14647 * src/output.c: entered into RCS
14648
146491992-09-25 Richard Stallman <rms@gnu.org>
14650
14651 * configure.bat: entered into RCS
14652
146531992-06-22 Richard Stallman <rms@gnu.org>
14654
14655 * src/vmsgetargs.c: entered into RCS
14656
146571992-06-22 Richard Stallman <rms@gnu.org>
14658
14659 * doc/bison.rnh: entered into RCS
14660
146611992-04-20 David J. MacKenzie <djm@gnu.org>
14662
14663 * README: entered into RCS
14664
146651992-01-22 Richard Stallman <rms@gnu.org>
14666
14667 * src/machine.h: entered into RCS
14668
146691991-12-21 Richard Stallman <rms@gnu.org>
14670
14671 * src/lalr.c, src/closure.c:
14672 entered into RCS
14673
146741991-12-20 Richard Stallman <rms@gnu.org>
14675
14676 * src/state.h: entered into RCS
14677
146781991-12-18 Richard Stallman <rms@gnu.org>
14679
14680 * src/print.c, src/nullable.c, src/derives.c:
14681 entered into RCS
14682
146831991-11-03 David J. MacKenzie <djm@gnu.org>
14684
14685 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
14686 entered into RCS
14687
146881988-09-09 Richard Stallman <rms@gnu.org>
14689
14690 * src/bison.hairy: entered into RCS
14691
146921987-12-16 Richard Stallman <rms@gnu.org>
14693
14694 * REFERENCES: entered into RCS
dc546b0f 14695
f294a2c2 14696
04098407 14697 -----
f294a2c2 14698
04098407
PE
14699 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
14700 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software
14701 Foundation, Inc.
f294a2c2 14702
04098407
PE
14703 Copying and distribution of this file, with or without
14704 modification, are permitted provided the copyright notice and this
14705 notice are preserved.