]> git.saurik.com Git - bison.git/blob - ChangeLog
* configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
[bison.git] / ChangeLog
1 2002-10-13 Akim Demaille <akim@epita.fr>
2
3 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
4 (O0FLAGS): New.
5 (VALGRIND, GXX): New.
6 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
7 * tests/bison.in: Run $PREBISON a pre-command.
8 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
9 (maintainer-check-g++): New.
10 * Makefile.am (maintainer-check): New.
11
12 2002-10-13 Akim Demaille <akim@epita.fr>
13
14 * data/glr.c: Formatting changes.
15 Tweak some trace messages to match yacc.c's.
16
17 2002-10-13 Akim Demaille <akim@epita.fr>
18
19 GLR parsers sometimes raise parse errors instead of performing the
20 default reduction.
21 Reported by Charles-Henry de Boysson.
22
23 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
24 check the length of the traces when %glr.
25 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
26 GLR's traces.
27 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
28 Test GLR parsers.
29 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
30 (yyltype): Remove the yy prefix from the member names.
31 (yytable): Complete its comment.
32 (yygetLRActions): Map error action number from YYTABLE from
33 YYTABLE_NINF to 0.
34 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
35 (which was a bug: it should have been YYTABEL_NINF, and yet it was
36 not satisfying as we could compare an YYACTION computed from
37 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
38 only value for error actions.
39 (yyreportParseError): In verbose parse error messages, don't issue
40 `error' in the list of expected tokens.
41 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
42 next action to perform to match glr.c's decoding.
43 (yytable): Complete its comment.
44
45 2002-10-13 Paul Eggert <eggert@twinsun.com>
46
47 Fix problem reported by Henrik Grubbstroem in
48 <http://mail.gnu.org/pipermail/bug-bison/2002-October/001670.html>:
49 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
50 because the Bison parser reads the second action before reducing
51 the first one.
52 * src/scan-gram.l (rule_length): New static var.
53 Use it to keep track of the rule length in the scanner, since
54 we can't expect the parser to be in lock-step sync with the scanner.
55 (handle_action_dollar, handle_action_at): Use this var.
56 * tests/actions.at (Exotic Dollars): Test for the problem.
57
58 2002-10-12 Paul Eggert <eggert@twinsun.com>
59
60 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
61 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
62 Include <sys/time.h> when checking for clock_t and struct tms.
63 Use same include order as source.
64 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
65 <http://mail.gnu.org/pipermail/bug-bison/2002-October/001674.html>.
66
67 * lib/timevar.c: Update copyright date and clarify comments.
68 (get_time) [IN_GCC]: Keep the GCC version for reference.
69
70 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
71 GCC version as of today, then merge Bison's changes.
72 Change "GCC" to "Bison" in copyright notice. timevar.def's
73 author is Akim, so change that too.
74
75 * src/reader.c (grammar_current_rule_check):
76 Don't worry about the default action if $$ is untyped.
77 Prevents bogus warnings reported by Jim Gifford in
78 <http://mail.gnu.org/pipermail/bug-bison/2002-October/001673.html>.
79
80 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
81 * data/glr.c, data/lalr1.cc, data/yacc.c:
82 Output token definitions before the first part of user declarations.
83 Fixes compatibility problem reported by Jim Gifford for kbd in
84 <http://mail.gnu.org/pipermail/bug-bison/2002-October/001672.html>.
85
86 2002-10-11 Paul Eggert <eggert@twinsun.com>
87
88 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
89 (yyparse): here. This undoes some of the 2002-07-25 change.
90 Compatibility problem reported by Ralf S. Engelschall with
91 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
92
93 2002-10-11 Akim Demaille <akim@epita.fr>
94
95 * tests/regression.at Characters Escapes): New.
96 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
97 characters.
98 Reported by Jan Nieuwenhuizen.
99
100 2002-10-11 Akim Demaille <akim@epita.fr>
101
102 * po/id.po: New.
103
104 2002-10-10 Paul Eggert <eggert@twinsun.com>
105
106 Portability fixes for bitsets; this also avoids several GCC
107 warnings.
108
109 * lib/abitset.c: Include <stddef.h>, for offsetof.
110 * lib/lbitset.c: Likewise.
111
112 * lib/abitset.c (abitset_bytes): Return a size that is aligned
113 properly for vectors of objects. Do not assume that adding a
114 header size to a multiple of a word size yields a value that is
115 properly aligned for the whole union.
116 * lib/bitsetv.c (bitsetv_alloc): Likewise.
117
118 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
119 unique names for structures.
120 * lib/ebitset.c (ebitset_bytes): Likewise.
121 * lib/lbitset.c (lbitset_bytes): Likewise.
122
123 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
124 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
125 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
126 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
127 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
128 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
129 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
130 to improve the type-checking that GCC can do.
131 * lib/bitset.c (bitset_op4_cmp): Likewise.
132 * lib/bitset_stats.c (bitset_stats_count,
133 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
134 bitset_stats_copy, bitset_stats_disjoint_p,
135 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
136 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
137 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
138 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
139 bitset_stats_and_or_cmp, bitset_stats_andn_or,
140 bitset_stats_andn_or_cmp, bitset_stats_or_and,
141 bitset_stats_or_and_cmp): Likewise.
142 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
143 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
144 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
145 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
146
147 * lib/abitset.h: Include bitset.h, not bbitset.h.
148 * lib/ebitset.h: Likewise.
149 * lib/lbitset.h: Likewise.
150
151 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
152 All instances of parameters of type enum bitset_opts are now of
153 type enum_bitset_opts, to conform to the C Standard, and similarly
154 for enum_bitset_type.
155 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
156 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
157
158 Do not use "struct bitset_struct" to mean different things in
159 different modules. Not only is this confusing, it violates
160 the C Standard, which requires that structure types in different
161 modules must be compatible if one is to be passed to the other.
162 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
163 All instances of "struct bitset_struct *" replaced with "bitset".
164 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
165 (union bitset_union, struct abitset_struct, struct ebitset_struct,
166 struct lbitset_struct, struct bitset_stats_struct): New types.
167 All uses of struct bitset_struct changed to union bitset_union,
168 etc.
169 * lib/abitset.c (struct abitset_struct, abitset,
170 struct bitset_struct): Remove.
171 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
172 struct bitset_struct): Remove.
173 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
174 bitset_struct): Remove.
175 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
176 Likewise.
177
178 Do not call a function of type T using a call that assumes the
179 function is of a different type U. Standard C requires that a
180 function must be called with a type that is compatible with its
181 definition.
182 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
183 New decls.
184 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
185 New functions.
186 * lib/ebitset.c (PFV): Remove.
187 * lib/lbitset.c (PFV): Likewise.
188 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
189 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
190 decls.
191 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
192 (ebitset_vtable): Use them.
193 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
194 lbitset_xor): New functions.
195 (lbitset_vtable): Use them.
196
197 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
198 Declare.
199
200 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
201 GCC warning.
202 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
203 Use offsetof, for simplicity.
204
205 2002-10-06 Paul Eggert <eggert@twinsun.com>
206
207 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
208 the same width as int. This reapplies a hunk of the 2002-08-12 patch
209 <http://mail.gnu.org/pipermail/bison-patches/2002-August/001111.html>,
210 which was inadvertently undone by the 2002-09-30 patch.
211 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
212 the same width as int.
213
214 2002-10-04 Paul Eggert <eggert@twinsun.com>
215
216 Version 1.50.
217
218 * configure.ac (AC_INIT), NEWS: Increment version number.
219
220 * doc/bison.texinfo: Minor spelling, grammar, and white space
221 fixes.
222 (Symbols): Mention that any negative value returned from yylex
223 signifies end-of-input. Warn about negative chars. Mention
224 the portable Standard C character set.
225
226 The GNU coding standard says CFLAGS and YFLAGS are reserved
227 for the installer to set.
228 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
229 * src/Makefile.am (AM_CFLAGS): Likewise.
230 (AM_YFLAGS): Renamed from YFLAGS.
231
232 Fix some MAX and MIN problems.
233 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
234 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
235 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
236 * src/reader.c (reader): Use it.
237
238 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
239 POSIX 1003.1-2001 has removed fgrep.
240
241 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
242
243 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
244 interpreted as signed.
245 * lib/ebitset.c (ebitset_list): Fix bug.
246
247 2002-10-01 Paul Eggert <eggert@twinsun.com>
248
249 More fixes for 64-bit hosts and large bitsets.
250
251 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
252 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
253 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
254 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
255 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
256 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
257 bitset_count_): Likewise.
258 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
259 bitset_first, bitset_last): Likewise.
260 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
261 bitset_stats_list_reverse, bitset_stats_size,
262 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
263 Likewise.
264 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
265 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
266 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
267 bitsetv_reflexive_transitive_closure): Likewise.
268 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
269 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
270 Likewise.
271 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
272 Likewise.
273
274 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
275 Use size_t, not unsigned int, to count bytes.
276 * lib/abitset.h (abitset_bytes): Likewise.
277 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
278 Likewise.
279 * lib/bitset.h (bitset_bytes): Likewise.
280 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
281 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
282 * lib/bitsetv.c (bitsetv_alloc): Likewise.
283 * lib/ebitset.c (ebitset_bytes): Likewise.
284 * lib/ebitset.h (ebitset_bytes): Likewise.
285 * lib/lbitset.c (lbitset_bytes): Likewise.
286 * lib/lbitset.h (lbitset_bytes): Likewise.
287
288 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
289 abitset_subset_p, abitset_disjoint_p, abitset_and,
290 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
291 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
292 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
293 abitset_or_and, abitset_or_and_cmp):
294 Use bitset_windex instead of unsigned int.
295 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
296 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
297 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
298 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
299 Likewise.
300 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
301
302 * lib/bitset.c (bitset_print):
303 Use proper printf formats for widths of integer types.
304 * lib/bitset_stats.c (bitset_percent_histogram_print,
305 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
306 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
307 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
308 * lib/lbitset.c (lbitset_bytes): Likewise.
309
310 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
311 BITSET_SIZE_MAX): New macros.
312 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
313 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
314 to BITSET_WINDEX_MAX.
315
316 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
317 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
318 since we now return the bitset_bindex type (not int).
319
320 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
321 when computing sizes.
322 * lib/ebitset.c (ebitset_elts_grow): Likewise.
323
324 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
325 and avoid cast to unsigned.
326
327 2002-09-30 Akim Demaille <akim@epita.fr>
328
329 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
330 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
331 Updates from Michael Hayes.
332
333 2002-09-30 Art Haas <ahaas@neosoft.com>
334
335 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
336 invocations.
337 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
338 defined.
339
340 2002-09-27 Akim Demaille <akim@epita.fr>
341
342 Version 1.49c.
343
344 2002-09-27 Akim Demaille <akim@epita.fr>
345
346 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
347 (Because of AC_LIBSOURCE).
348
349 2002-09-27 Akim Demaille <akim@epita.fr>
350
351 Playing with Autoscan.
352
353 * configure.ac: Remove the old LIBOBJ tweaks.
354 (AC_REPLACE_FUNCS): Add strrchr and strtol.
355 * lib/strrchr.c: New.
356 * lib/strtol.c: New, from the Coreutils 4.5.1.
357
358 2002-09-27 Akim Demaille <akim@epita.fr>
359
360 Playing with Autoscan.
361
362 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
363 * lib/Makefile.am (libbison_a_SOURCES): No longer include
364 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
365 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
366 Coreutils 4.5.1.
367
368 2002-09-24 Akim Demaille <akim@epita.fr>
369
370 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
371 (Frequently Asked Questions, Parser Stack Overflow): New.
372
373 2002-09-13 Akim Demaille <akim@epita.fr>
374
375 Playing with autoscan.
376
377 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
378 * src/files.c (skeleton_find): Remove, unused.
379 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
380 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
381
382 2002-09-13 Akim Demaille <akim@epita.fr>
383
384 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
385 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
386
387 2002-09-13 Akim Demaille <akim@epita.fr>
388
389 * configure.ac: Require 2.54.
390 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
391 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
392 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
393 Remove, provided by Autoconf macros.
394
395 2002-09-12 Akim Demaille <akim@epita.fr>
396
397 * m4/prereq.m4: Update, from Coreutils 4.5.1.
398
399 2002-09-12 Akim Demaille <akim@epita.fr>
400
401 * m4/prereq.m4: Update, from Fileutils 4.1.5.
402 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
403 Reported by Martin Mokrejs.
404
405 2002-09-10 Akim Demaille <akim@epita.fr>
406
407 * src/parse-gram.y: Associate a human readable string to each
408 token type.
409 * tests/regression.at (Invalid inputs): Adjust.
410
411 2002-09-10 Gary V. Vaughan <gary@gnu.org>
412
413 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
414 with an Autoconf-2.5x style configure.ac.
415
416 2002-09-06 Paul Eggert <eggert@twinsun.com>
417
418 * doc/bison.texinfo (Conditions): Make explicit that the GPL
419 exception applies only to yacc.c. This is a modification of a
420 patch originally suggested by Akim Demaille.
421
422 2002-09-06 Akim Demaille <akim@epita.fr>
423
424 * data/c.m4 (b4_copyright): Move the GPL exception comment from
425 here to...
426 * data/yacc.c: here.
427
428 * data/lalr1.cc (struct yyltype): Don't define it, since we use
429 LocationType.
430 (b4_ltype): Default to yy::Location from location.hh.
431
432 2002-09-04 Jim Meyering <jim@meyering.net>
433
434 * data/yacc.c: Guard the declaration of yytoknum also with
435 `#ifdef YYPRINT', so it is declared only when used.
436
437 2002-09-04 Akim Demaille <akim@epita.fr>
438
439 * configure.in: Rename as...
440 * configure.ac: this.
441 Bump to 1.49c.
442
443 2002-09-04 Akim Demaille <akim@epita.fr>
444
445 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
446 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
447 translate maintainer only messages.
448
449 2002-08-12 Paul Eggert <eggert@twinsun.com>
450
451 Version 1.49b.
452
453 * Makefile.am (SUBDIRS): Remove intl.
454 (DISTCLEANFILES): Remove.
455 * NEWS: Mention that GNU M4 is now required. Clarify what is
456 meant by "larger grammars". Mention the pt_BR translation.
457 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
458 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
459 Bump version from 0.11.2 to 0.11.5.
460 (BISON_PREREQ_STAGE): Remove.
461 (AM_GNU_GETTEXT): Use external gettext.
462 (AC_OUTPUT): Remove intl/Makefile.
463
464 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
465
466 * data/glr.c: Include string.h, for strlen.
467 (yyreportParseError): Use size_t for yysize.
468 (yy_yypstack): No longer nested inside yypstates, as nested
469 functions are not portable. Do not assume size_t is the
470 same width as int.
471 (yypstates): Do not assume that ptrdiff_t is the same width
472 as int, and similarly for yyposn and YYINDEX.
473
474 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
475
476 * lib/Makefile.am (INCLUDES): Do not include from the intl
477 directory, which has been removed.
478 * src/Makefile.am (INCLUDES): Likewise.
479
480 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
481 (bitsets_sources, additional_bitsets_sources, timevars_sources):
482 New vars.
483
484 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
485 * tests/Makefile.am (EXTRA_DIST): Likewise.
486
487 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
488 Do not assume that bitset_windex is the same width as unsigned.
489
490 * lib/abitset.c (abitset_unused_clear): Do not assume that
491 bitset_word is the same width as int.
492 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
493 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
494 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
495 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
496 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
497
498 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
499 portability to one's complement hosts!).
500 * lib/ebitset.c (ebitset_op1): Likewise.
501 * lib/lbitset.c (lbitset_op1): Likewise.
502
503 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
504 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
505 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
506 Sync with fileutils.
507 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
508 lib/gettext.h: Sync with diffutils.
509
510 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
511 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
512
513 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
514 PROTOTYPES to check for prototypes, and "defined __STDC__" to
515 check for void *.
516
517 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
518 size_t; the old version tried to do this but casted improperly.
519 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
520 (bitset_test): Now returns int, not unsigned long.
521
522 * lib/bitset_stats.c: Include "gettext.h".
523 (_): New macro.
524 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
525 name locals "index", as it generates unnecessary warnings on some
526 hosts that have an "index" function.
527
528 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
529 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
530 they need translation.
531 * src/LR0.c (state_list_append, new_itemsets, get_state,
532 append_states, generate_states): Likewise.
533 * src/assoc.c (assoc_to_string): Likewise.
534 * src/closure.c (print_closure, set_firsts, closure): Likewise.
535 * src/gram.c (grammar_dump): Likewise.
536 * src/injections.c (injections_compute): Likewise.
537 * src/lalr.c (lookaheads_print): Likewise.
538 * src/relation.c (relation_transpose): Likewise.
539 * src/scan-gram.l: Likewise.
540 * src/tables.c (table_grow, pack_vector): Likewise.
541
542 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
543 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
544 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
545 * m4/mbstate_t.m4: Sync with fileutils.
546 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
547
548 * po/LINGUAS: Add pt_BR.
549 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
550 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
551 lib/timevar.c.
552 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
553 manual recommends.
554 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
555
556 * src/complain.c (strerror_r): Remove decl; not needed.
557 (strerror): Use same pattern as ../lib/error.c.
558
559 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
560
561 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
562
563 * src/main.c (main): Cast result of bindtextdomain and textdomain
564 to void, to avoid a GCC warning when --disable-nls is in effect.
565
566 * src/scan-gram.l: Use strings rather than escapes when possible,
567 to minimize the number of warnings from xgettext.
568 (handle_action_dollar, handle_action_at): Don't use isdigit,
569 as it mishandles negative chars and it may not work as expected
570 outside the C locale.
571
572 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
573 this is a GCC extension and is not portable to other compilers.
574
575 * src/system.h (alloca): Use same pattern as ../lib/error.c.
576 Do not include <ctype.h>; no longer needed.
577 Do not include <malloc.h>; no longer needed (and generates
578 warnings on OpenBSD 3.0).
579
580 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
581 it's not portable.
582
583 * tests/regression.at: Do not use 'cc -c input.c -o input';
584 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
585
586 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
587 exit status as failure, not just exit status 1. Sun C exits
588 with status 2 sometimes.
589
590 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
591 Use it for the two large tests.
592
593 2002-08-02 Akim Demaille <akim@epita.fr>
594
595 * src/conflicts.c (conflicts_output): Don't output rules never
596 reduced here, since anyway that computation doesn't work.
597 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
598 (rule_useless_p, rule_never_reduced_p): New.
599 (grammar_rules_partial_print): Use a filter instead of a range.
600 Display the title only if needed.
601 (grammar_rules_print): Adjust.
602 (grammar_rules_never_reduced_report): New.
603 * src/tables.c (action_row): Move the computation of rules never
604 reduced to...
605 (token_actions): here.
606 * src/main.c (main): Make the parser before making the report, so
607 that rules never reduced are computed.
608 Call grammar_rules_never_reduced_report.
609 * src/print.c (print_results): Report rules never reduced.
610 * tests/conflicts.at, tests/reduce.at: Adjust.
611
612 2002-08-01 Akim Demaille <akim@epita.fr>
613
614 Instead of attaching lookaheads and duplicating the rules being
615 reduced by a state, attach the lookaheads to the reductions.
616
617 * src/state.h (state_t): Remove the `lookaheads',
618 `lookaheads_rule' member.
619 (reductions_t): Add a `lookaheads' member.
620 Use a regular array for the `rules'.
621 * src/state.c (reductions_new): Initialize the lookaheads member
622 to 0.
623 (state_rule_lookaheads_print): Adjust.
624 * src/state.h, src/state.c (state_reductions_find): New.
625 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
626 (count_rr_conflicts): Adjust.
627 * src/lalr.c (LArule): Remove.
628 (add_lookback_edge): Adjust.
629 (state_lookaheads_count): New.
630 (states_lookaheads_initialize): Merge into...
631 (initialize_LA): this.
632 (lalr_free): Adjust.
633 * src/main.c (main): Don't free nullable and derives too early: it
634 is used by --verbose.
635 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
636
637 2002-08-01 Akim Demaille <akim@epita.fr>
638
639 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
640 `rule_number_t**'.
641 (set_derives, free_derives): Rename as...
642 (derives_compute, derives_free): this.
643 Adjust all dependencies.
644 * src/nullable.c (set_nullable, free_nullable): Rename as...
645 (nullable_compute, nullable_free): these.
646 (rule_list_t): Store rule_t *, not rule_number_t.
647 * src/state.c (state_rule_lookaheads_print): Directly compare rule
648 pointers, instead of their numbers.
649 * src/main.c (main): Call nullable_free, and derives_free earlier,
650 as they were lo longer used.
651
652 2002-08-01 Akim Demaille <akim@epita.fr>
653
654 * lib/timevar.c (get_time): Include children time.
655 * src/lalr.h (LA, LArule): Don't export them: used with the
656 state_t.
657 * src/lalr.c (LA, LArule): Static.
658 * src/lalr.h, src/lalr.c (lalr_free): New.
659 * src/main.c (main): Call it.
660 * src/tables.c (pack_vector): Check whether loc is >= to the
661 table_size, not >.
662 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
663 (tables_generate): do it, since that's also it which allocates
664 them.
665 Don't free LA and LArule, main does.
666
667 2002-07-31 Akim Demaille <akim@epita.fr>
668
669 Separate parser tables computation and output.
670
671 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
672 (conflict_list, conflict_list_cnt, table, check, table_ninf)
673 (yydefgoto, yydefact, high): Move to...
674 * src/tables.h, src/tables.c: here.
675 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
676 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
677 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
678 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
679 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
680 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
681 (action_row, save_row, token_actions, save_column, default_goto)
682 (goto_actions, sort_actions, matching_state, pack_vector)
683 (table_ninf_remap, pack_table, prepare_actions): Move to...
684 * src/tables.c: here.
685 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
686 * src/output.c (token_actions, output_base, output_conflicts)
687 (output_check): Merge into...
688 (prepare_actions): this.
689 (actions_output): Rename as...
690 (user_actions_output): this.
691 * src/main.c (main): Call tables_generate and tables_free.
692
693 2002-07-31 Akim Demaille <akim@epita.fr>
694
695 Steal GCC's --time-report support.
696
697 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
698 stolen/adjusted from GCC.
699 * m4/stage.m4: Remove time related checks.
700 * m4/timevar.m4: New.
701 * configure.in: Adjust.
702 * src/system.h: Adjust to using timevar.h.
703 * src/getargs.h, src/getargs.c: Support trace_time for
704 --trace=time.
705 * src/main.c (stage): Remove.
706 (main): Replace `stage' invocations with timevar calls.
707 * src/output.c: Insert pertinent timevar calls.
708
709 2002-07-31 Akim Demaille <akim@epita.fr>
710
711 Let --trace have arguments.
712
713 * src/getargs.h (enum trace_e): New.
714 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
715 (long_options, short_options): --trace/-T takes an optional
716 argument.
717 Change all the uses of trace_flag to reflect the new flags.
718 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
719
720 Strengthen `stage' portability.
721
722 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
723 * configure.in: Use it.
724 Don't check for malloc.h and sys/times.h.
725 * src/system.h: Include them when appropriate.
726 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
727 times and struct tms are available.
728
729 2002-07-30 Akim Demaille <akim@epita.fr>
730
731 In verbose parse error message, don't report `error' as an
732 expected token.
733 * tests/actions.at (Printers and Destructors): Adjust.
734 * tests/calc.at (Calculator $1): Adjust.
735 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
736 error message, do not report the parser accepts the error token in
737 that state.
738
739 2002-07-30 Akim Demaille <akim@epita.fr>
740
741 Normalize conflict related messages.
742
743 * src/complain.h, src/complain.c (warn, complain): New.
744 * src/conflicts.c (conflicts_print): Use them.
745 (conflict_report_yacc): New, extracted from...
746 (conflicts_print): here.
747 * tests/conflicts.at, tests/existing.at: Adjust.
748
749 2002-07-30 Akim Demaille <akim@epita.fr>
750
751 Report rules which are never reduced by the parser: those hidden
752 by conflicts.
753
754 * src/LR0.c (save_reductions): Don't make the final state too
755 different: save its reduction (accept) instead of having a state
756 without any action (no shift or goto, no reduce).
757 Note: the final state is now a ``regular'' state, i.e., the
758 parsers now contain `reduce 0' as default reduction.
759 Nevertheless, since they decide to `accept' when yystate =
760 final_state, they still will not reduce rule 0.
761 * src/print.c (print_actions, print_reduction): Adjust.
762 * src/output.c (action_row): Track reduced rules.
763 (token_actions): Report rules never reduced.
764 * tests/conflicts.at, tests/regression.at: Adjust.
765
766 2002-07-30 Akim Demaille <akim@epita.fr>
767
768 `stage' was accidently included in a previous patch.
769 Initiate its autoconfiscation.
770
771 * configure.in: Look for malloc.h and sys/times.h.
772 * src/main.c (stage): Adjust.
773 Report only when trace_flag.
774
775 2002-07-29 Akim Demaille <akim@epita.fr>
776
777 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
778 state_number_t.
779 (errs_t): symbol_t*, not symbol_number_t.
780 (reductions_t): rule_t*, not rule_number_t.
781 (FOR_EACH_SHIFT): New.
782 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
783 * src/print.c, src/print_graph.c: Adjust.
784
785 2002-07-29 Akim Demaille <akim@epita.fr>
786
787 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
788
789 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
790 (endtoken, accept): these.
791 * src/reader.c (reader): Set endtoken's default tag to "$end".
792 Set undeftoken's tag to "$undefined" instead of "$undefined.".
793 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
794 Adjust.
795
796 2002-07-29 Akim Demaille <akim@epita.fr>
797
798 * src/reduce.c (reduce_grammar): When the language is empty,
799 complain about the start symbol, not the axiom.
800 Use its location.
801 * tests/reduce.at (Empty Language): New.
802
803 2002-07-26 Akim Demaille <akim@epita.fr>
804
805 * src/reader.h, src/reader.c (gram_error): ... can't get
806 yycontrol without making too strong assumptions on the parser
807 itself.
808 * src/output.c (prepare_tokens): Use the real 0th value of
809 token_translations instead of `0'.
810 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
811 visible here.
812 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
813 for the time being: %locations ought to provide it to yyerror.
814
815 2002-07-25 Akim Demaille <akim@epita.fr>
816
817 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
818 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
819 * tests/regression.at (Web2c Actions): Adjust.
820
821 2002-07-25 Akim Demaille <akim@epita.fr>
822
823 Stop storing rules from 1 to nrules + 1.
824
825 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
826 * src/nullable.c, src/output.c, src/print.c, src/reader.c
827 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
828 Iterate from 0 to nrules.
829 Use rule_number_as_item_number and item_number_as_rule_number.
830 Adjust to `derive' now containing possibly 0.
831 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
832 Handle the `- 1' part in rule numbers from/to item numbers.
833 * src/conflicts.c (log_resolution): Fix the message which reversed
834 shift and reduce.
835 * src/output.c (action_row): Initialize default_rule to -1.
836 (token_actions): Adjust.
837 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
838 expected output.
839 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
840
841 2002-07-25 Akim Demaille <akim@epita.fr>
842
843 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
844 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
845 (b4_c_knr_arg_decl): New.
846 * data/yacc.c: Use it to define yysymprint, yydestruct, and
847 yyreport_parse_error.
848
849 2002-07-25 Akim Demaille <akim@epita.fr>
850
851 * data/yacc.c (yyreport_parse_error): New, extracted from...
852 (yyparse): here.
853 (yydestruct, yysymprint): Move above yyparse.
854 Be K&R compliant.
855
856 2002-07-25 Akim Demaille <akim@epita.fr>
857
858 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
859 replace...
860 (b4_sint_type, b4_uint_type): these.
861 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
862 * tests/regression.at (Web2c Actions): Adjust.
863
864 2002-07-25 Akim Demaille <akim@epita.fr>
865
866 * src/gram.h (TIEM_NUMBER_MAX): New.
867 (item_number_of_rule_number, rule_number_of_item_number): Rename
868 as...
869 (rule_number_as_item_number, item_number_as_rule_number): these.
870 Adjust dependencies.
871 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
872 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
873 (symbol_number_to_vector_number): New.
874 (order): Of vector_number_t* type.
875 (base_t, BASE_MAX, BASE_MIN): New.
876 (froms, tos, width, pos, check): Of base_t type.
877 (action_number_t, ACTION_MIN, ACTION_MAX): New.
878 (actrow): Of action_number_t type.
879 (conflrow): Of unsigned int type.
880 (table_ninf, base_ninf): New.
881 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
882 (muscle_insert_int_table, muscle_insert_base_table)
883 (muscle_insert_rule_number_table): New.
884 (prepare_tokens): Output `toknum' as int_table.
885 (action_row): Returns a rule_number_t.
886 Use ACTION_MIN, not SHRT_MIN.
887 (token_actions): yydefact is rule_number_t*.
888 (table_ninf_remap): New.
889 (pack_table): Use it for `base' and `table'.
890 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
891 replaced with...
892 (YYPACT_NINF, YYTABLE_NINF): these.
893 (yypact, yytable): Compute their types instead of hard-coded
894 `short'.
895 * tests/regression.at (Web2c Actions): Adjust.
896
897 2002-07-19 Akim Demaille <akim@epita.fr>
898
899 * src/scan-gram.l (id): Can start with an underscore.
900
901 2002-07-16 Akim Demaille <akim@epita.fr>
902
903 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
904 Adjust all former `associativity' dependencies.
905 * src/symtab.c (symbol_new): Default associativity is `undef', not
906 `right'.
907 (symbol_check_alias_consistence): Adjust.
908
909 2002-07-09 Akim Demaille <akim@epita.fr>
910
911 * doc/bison.texinfo: Properly set the ``header'' part.
912 Use @dircategory ``GNU programming tools'' as per Texinfo's
913 documentation.
914 Use @copying.
915
916 2002-07-09 Akim Demaille <akim@epita.fr>
917
918 * lib/quotearg.h: Protect against multiple inclusions.
919 * src/location.h (location_t): Add a `file' member.
920 (LOCATION_RESET, LOCATION_PRINT): Adjust.
921 * src/complain.c (warn_at, complain_at, fatal_at): Drop
922 `error_one_per_line' support.
923
924 2002-07-09 Akim Demaille <akim@epita.fr>
925
926 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
927 * src/reader.c (lineno): Remove.
928 Adjust all dependencies.
929 (get_merge_function): Take a location and use complain_at.
930 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
931 * tests/regression.at (Invalid inputs, Mixing %token styles):
932 Adjust.
933
934 2002-07-09 Akim Demaille <akim@epita.fr>
935
936 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
937 recovery rule, and forbid extensions when --yacc.
938 (gram_error): Use complain_at.
939 * src/reader.c (reader): Exit if there were parse errors.
940
941 2002-07-09 Akim Demaille <akim@epita.fr>
942
943 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
944 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
945 Reported by R Blake <blakers@mac.com>.
946
947 2002-07-09 Akim Demaille <akim@epita.fr>
948
949 * data/yacc.c: Output the copyright notive in the header.
950
951 2002-07-03 Akim Demaille <akim@epita.fr>
952
953 * src/output.c (froms, tos): Are state_number_t.
954 (save_column): sp, sp1, and sp2 are state_number_t.
955 (prepare): Rename `final' as `final_state_number', `nnts' as
956 `nterms_number', `nrules' as `rules_number', `nstates' as
957 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
958 unused.
959 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
960 * data/lalr1.cc (nsym_): Remove, unused.
961
962 2002-07-03 Akim Demaille <akim@epita.fr>
963
964 * src/lalr.h, src/lalr.c (goto_number_t): New.
965 * src/lalr.c (goto_list_t): New.
966 Propagate them.
967 * src/nullable.c (rule_list_t): New.
968 Propagate.
969 * src/types.h: Remove.
970
971 2002-07-03 Akim Demaille <akim@epita.fr>
972
973 * src/closure.c (print_fderives): Use rule_rhs_print.
974 * src/derives.c (print_derives): Use rule_rhs_print.
975 (rule_list_t): New, replaces `shorts'.
976 (set_derives): Add comments.
977 * tests/sets.at (Nullable, Firsts): Adjust.
978
979 2002-07-03 Akim Demaille <akim@epita.fr>
980
981 * src/output.c (prepare_actions): Free `tally' and `width'.
982 (prepare_actions): Allocate and free `order'.
983 * src/symtab.c (symbols_free): Free `symbols'.
984 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
985 * src/output.c (m4_invoke): Move to...
986 * src/scan-skel.l: here.
987 (<<EOF>>): Close yyout, and free its name.
988
989 2002-07-03 Akim Demaille <akim@epita.fr>
990
991 Fix some memory leaks, and fix a bug: state 0 was examined twice.
992
993 * src/LR0.c (new_state): Merge into...
994 (state_list_append): this.
995 (new_states): Merge into...
996 (generate_states): here.
997 (set_states): Don't ensure a proper `errs' state member here, do it...
998 * src/conflicts.c (conflicts_solve): here.
999 * src/state.h, src/state.c: Comment changes.
1000 (state_t): Rename member `shifts' as `transitions'.
1001 Adjust all dependencies.
1002 (errs_new): For consistency, also take the values as argument.
1003 (errs_dup): Remove.
1004 (state_errs_set): New.
1005 (state_reductions_set, state_transitions_set): Assert that no
1006 previous value was assigned.
1007 (state_free): New.
1008 (states_free): Use it.
1009 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
1010 temporary storage: use `errs' and `nerrs' as elsewhere.
1011 (set_conflicts): Allocate and free this `errs'.
1012
1013 2002-07-02 Akim Demaille <akim@epita.fr>
1014
1015 * lib/libiberty.h: New.
1016 * lib: Update the bitset implementation from upstream.
1017 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
1018 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
1019 * src/main.c: Adjust bitset stats calls.
1020
1021 2002-07-01 Paul Eggert <eggert@twinsun.com>
1022
1023 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
1024 char, so that negative chars don't collide with $.
1025
1026 2002-06-30 Akim Demaille <akim@epita.fr>
1027
1028 Have the GLR tests be `warning' checked, and fix the warnings.
1029
1030 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
1031 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
1032 (yyremoveDeletes): `yyi' and `yyj' are size_t.
1033 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
1034 (yyaddDeferredAction): static.
1035 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
1036 (yyreportParseError): yyprefix is const.
1037 yytokenp is used only when verbose.
1038 (yy__GNUC__): Replace with __GNUC__.
1039 (yypdumpstack): yyi is size_t.
1040 (yypreference): Un-yy local variables and arguments, to avoid
1041 clashes with `yyr1'. Anyway, we are not in the user name space.
1042 (yytname_size): be an int, as is compared with ints.
1043 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
1044 Use them.
1045 * tests/cxx-gram.at: Use quotation to protect $1.
1046 Use AT_COMPILE to enable warnings hunts.
1047 Prototype yylex and yyerror.
1048 `Use' argc.
1049 Include `string.h', not `strings.h'.
1050 Produce and prototype stmtMerge only when used.
1051 yylex takes a location.
1052
1053 2002-06-30 Akim Demaille <akim@epita.fr>
1054
1055 We spend a lot of time in quotearg, in particular when --verbose.
1056
1057 * src/symtab.c (symbol_get): Store a quoted version of the key.
1058 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
1059 Adjust all callers.
1060
1061 2002-06-30 Akim Demaille <akim@epita.fr>
1062
1063 * src/state.h (reductions_t): Rename member `nreds' as num.
1064 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
1065 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
1066
1067 2002-06-30 Akim Demaille <akim@epita.fr>
1068
1069 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
1070 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
1071 (shifts_to): Rename as...
1072 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
1073 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
1074 (TRANSITION_IS_DISABLED, transitions_to): these.
1075
1076 2002-06-30 Akim Demaille <akim@epita.fr>
1077
1078 * src/print.c (print_shifts, print_gotos): Merge into...
1079 (print_transitions): this.
1080 (print_transitions, print_errs, print_reductions): Align the
1081 lookaheads columns.
1082 (print_core, print_transitions, print_errs, print_state,
1083 print_grammar): Output empty lines separator before, not after.
1084 (state_default_rule_compute): Rename as...
1085 (state_default_rule): this.
1086 * tests/conflicts.at (Defaulted Conflicted Reduction),
1087 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
1088 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
1089
1090 2002-06-30 Akim Demaille <akim@epita.fr>
1091
1092 Display items as we display rules.
1093
1094 * src/gram.h, src/gram.c (rule_lhs_print): New.
1095 * src/gram.c (grammar_rules_partial_print): Use it.
1096 * src/print.c (print_core): Likewise.
1097 * tests/conflicts.at (Defaulted Conflicted Reduction),
1098 (Unresolved SR Conflicts): Adjust.
1099 (Unresolved SR Conflicts): Adjust and rename as...
1100 (Resolved SR Conflicts): this, as was meant.
1101 * tests/regression.at (Web2c Report): Adjust.
1102
1103 2002-06-30 Akim Demaille <akim@epita.fr>
1104
1105 * src/print.c (state_default_rule_compute): New, extracted from...
1106 (print_reductions): here.
1107 Pessimize, but clarify the code.
1108 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
1109
1110 2002-06-30 Akim Demaille <akim@epita.fr>
1111
1112 * src/output.c (action_row): Let default_rule be always a rule
1113 number.
1114
1115 2002-06-30 Akim Demaille <akim@epita.fr>
1116
1117 * src/closure.c (print_firsts, print_fderives, closure):
1118 Use BITSET_EXECUTE.
1119 * src/lalr.c (lookaheads_print): Likewise.
1120 * src/state.c (state_rule_lookaheads_print): Likewise.
1121 * src/print_graph.c (print_core): Likewise.
1122 * src/print.c (print_reductions): Likewise.
1123 * src/output.c (action_row): Likewise.
1124 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
1125
1126 2002-06-30 Akim Demaille <akim@epita.fr>
1127
1128 * src/print_graph.c: Use report_flag.
1129
1130 2002-06-30 Akim Demaille <akim@epita.fr>
1131
1132 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
1133 to...
1134 * src/relation.h, src/relation.c (traverse, relation_digraph)
1135 (relation_print, relation_transpose): New.
1136
1137 2002-06-30 Akim Demaille <akim@epita.fr>
1138
1139 * src/state.h, src/state.c (shifts_to): New.
1140 * src/lalr.c (build_relations): Use it.
1141
1142 2002-06-30 Akim Demaille <akim@epita.fr>
1143
1144 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
1145 (item_number_of_rule_number, rule_number_of_item_number): New.
1146 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
1147 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
1148 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
1149 Propagate their use.
1150 Much remains to be done, in particular wrt `shorts' from types.h.
1151
1152 2002-06-30 Akim Demaille <akim@epita.fr>
1153
1154 * src/symtab.c (symbol_new): Initialize the `printer' member.
1155
1156 2002-06-30 Akim Demaille <akim@epita.fr>
1157
1158 * src/LR0.c (save_reductions): Remove, replaced by...
1159 * src/state.h, src/state.c (state_reductions_set): New.
1160 (reductions, errs): Rename as...
1161 (reductions_t, errs_t): these.
1162 Adjust all dependencies.
1163
1164 2002-06-30 Akim Demaille <akim@epita.fr>
1165
1166 * src/LR0.c (state_list_t, state_list_append): New.
1167 (first_state, last_state): Now symbol_list_t.
1168 (this_state): Remove.
1169 (new_itemsets, append_states, save_reductions): Take a state_t as
1170 argument.
1171 (set_states, generate_states): Adjust.
1172 (save_shifts): Remove, replaced by...
1173 * src/state.h, src/state.c (state_shifts_set): New.
1174 (shifts): Rename as...
1175 (shifts_t): this.
1176 Adjust all dependencies.
1177 * src/state.h (state_t): Remove the `next' member.
1178
1179 2002-06-30 Akim Demaille <akim@epita.fr>
1180
1181 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
1182 escaped in slot 0.
1183
1184 2002-06-30 Akim Demaille <akim@epita.fr>
1185
1186 Use hash.h for the state hash table.
1187
1188 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
1189 (allocate_storage): Use state_hash_new.
1190 (free_storage): Use state_hash_free.
1191 (new_state, get_state): Adjust.
1192 * src/lalr.h, src/lalr.c (states): Move to...
1193 * src/states.h (state_t): Remove the `link' member, no longer
1194 used.
1195 * src/states.h, src/states.c: here.
1196 (state_hash_new, state_hash_free, state_hash_lookup)
1197 (state_hash_insert, states_free): New.
1198 * src/states.c (state_table, state_compare, state_hash): New.
1199 * src/output.c (output_actions): Do not free states now, since we
1200 still need to know the final_state number in `prepare', called
1201 afterwards. Do it...
1202 * src/main.c (main): here: call states_free after `output'.
1203
1204 2002-06-30 Akim Demaille <akim@epita.fr>
1205
1206 * src/state.h, src/state.c (state_new): New, extracted from...
1207 * src/LR0.c (new_state): here.
1208 * src/state.h (STATE_ALLOC): Move to...
1209 * src/state.c: here.
1210 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
1211 * src/state.h, src/state.c: here.
1212
1213 2002-06-30 Akim Demaille <akim@epita.fr>
1214
1215 * src/reader.c (gensym): Rename as...
1216 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
1217 (getsym): Rename as...
1218 (symbol_get): this.
1219
1220 2002-06-30 Akim Demaille <akim@epita.fr>
1221
1222 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
1223 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
1224 * src/output.c, src/print.c, src/print_graph.c: Propagate.
1225 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
1226
1227 2002-06-30 Akim Demaille <akim@epita.fr>
1228
1229 Make the test suite pass with warnings checked.
1230
1231 * tests/actions.at (Printers and Destructors): Improve.
1232 Avoid unsigned vs. signed issues.
1233 * tests/calc.at: Don't exercise the scanner here, do it...
1234 * tests/input.at (Torturing the Scanner): here.
1235
1236 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1237
1238 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
1239 reorganize first lines parallel to yacc.c.
1240
1241 2002-06-28 Akim Demaille <akim@epita.fr>
1242
1243 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
1244 (b4_token_enum, b4_token_defines): New, factored from...
1245 * data/lalr1.cc, data/yacc.c, glr.c: here.
1246
1247 2002-06-28 Akim Demaille <akim@epita.fr>
1248
1249 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
1250 unused variables.
1251 * src/output.c (merger_output): static.
1252
1253 2002-06-28 Akim Demaille <akim@epita.fr>
1254
1255 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
1256 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
1257 pacify GCC.
1258 * src/output.c (save_row): Initialize all the variables to pacify GCC.
1259
1260 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1261
1262 Accumulated changelog for new GLR parsing features.
1263
1264 * src/conflicts.c (count_total_conflicts): Change name to
1265 conflicts_total_count.
1266 * src/conflicts.h: Ditto.
1267 * src/output.c (token_actions): Use the new name.
1268 (output_conflicts): Change conflp => conflict_list_heads, and
1269 confl => conflict_list for better readability.
1270 * data/glr.c: Use the new names.
1271 * NEWS: Add self to GLR announcement.
1272
1273 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
1274
1275 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
1276 Akim Demaille.
1277
1278 * data/bison.glr: Change name to glr.c
1279 * data/glr.c: Renamed from bison.glr.
1280 * data/Makefile.am: Add glr.c
1281
1282 * src/getargs.c:
1283
1284 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
1285 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
1286
1287 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1288
1289 * data/bison.glr: Be sure to restore the
1290 current #line when returning to the skeleton contents after having
1291 exposed the input file's #line.
1292
1293 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1294
1295 * data/bison.glr: Bring up to date with changes to bison.simple.
1296
1297 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1298
1299 * data/bison.glr: Correct definitions that use b4_prefix.
1300 Various reformatting.
1301 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
1302 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
1303 yytokenp argument; now part of stack.
1304 (yychar): Define to behave as documented.
1305 (yyclearin): Ditto.
1306
1307 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1308
1309 * src/reader.h: Add declaration for free_merger_functions.
1310
1311 * src/reader.c (merge_functions): New variable.
1312 (get_merge_function): New function.
1313 (free_merger_functions): New function.
1314 (readgram): Check for %prec that is not followed by a symbol.
1315 Handle %dprec and %merge declarations.
1316 (packgram): Initialize dprec and merger fields in rules array.
1317
1318 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
1319 conflict_list_cnt, conflict_list_free): New variables.
1320 (table_grow): Also grow conflict_table.
1321 (prepare_rules): Output dprec and merger tables.
1322 (conflict_row): New function.
1323 (action_row): Output conflict lists for GLR parser. Don't use
1324 default reduction in conflicted states for GLR parser so that there
1325 are spaces for the conflict lists.
1326 (save_row): Also save conflict information.
1327 (token_actions): Allocate conflict list.
1328 (merger_output): New function.
1329 (pack_vector): Pack conflict table, too.
1330 (output_conflicts): New function to output yyconflp and yyconfl.
1331 (output_check): Allocate conflict_tos.
1332 (output_actions): Output conflict tables, also.
1333 (output_skeleton): Output b4_mergers definition.
1334 (prepare): Output b4_max_rhs_length definition.
1335 Use 'bison.glr' as default skeleton for GLR parsers.
1336
1337 * src/gram.c (glr_parser): New flag.
1338 (grammar_free): Call free_merger_functions.
1339
1340 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
1341 all pairs of conflicting reductions, rather than just all tokens
1342 causing conflicts. Needed to size conflict tables.
1343 (conflicts_output): Modify call to count_rr_conflicts for new
1344 interface.
1345 (conflicts_print): Ditto.
1346 (count_total_conflicts): New function.
1347
1348 * src/reader.h (merger_list): New type.
1349 (merge_functions): New variable.
1350
1351 * src/lex.h (tok_dprec, tok_merge): New token types.
1352
1353 * src/gram.h (rule_s): Add dprec and merger fields.
1354 (glr_parser): New flag.
1355
1356 * src/conflicts.h (count_total_conflicts): New function.
1357
1358 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
1359
1360 * doc/bison.texinfo (Generalized LR Parsing): New section.
1361 (GLR Parsers): New section.
1362 (Language and Grammar): Mention GLR parsing.
1363 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
1364 Correct typo ("tge" -> "the").
1365
1366 * data/bison.glr: New skeleton for GLR parsing.
1367
1368 * tests/cxx-gram.at: New tests for GLR parsing.
1369
1370 * tests/testsuite.at: Include cxx-gram.at.
1371
1372 * tests/Makefile.am: Add cxx-gram.at.
1373
1374 * src/parse-gram.y:
1375
1376 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
1377
1378 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
1379
1380 2002-06-27 Akim Demaille <akim@epita.fr>
1381
1382 * src/options.h, src/options.c: Remove.
1383 * src/getargs.c (short_options, long_options): New.
1384
1385 2002-06-27 Akim Demaille <akim@epita.fr>
1386
1387 * data/bison.simple, data/bison.c++: Rename as...
1388 * data/yacc.c, data/lalr1.cc: these.
1389 * doc/bison.texinfo (Environment Variables): Remove.
1390
1391 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
1392
1393 * src/getargs.c (report_argmatch): Initialize strtok().
1394
1395 2002-06-20 Akim Demaille <akim@epita.fr>
1396
1397 * data/bison.simple (b4_symbol_actions): New, replaces...
1398 (b4_symbol_destructor, b4_symbol_printer): these.
1399 (yysymprint): Be sure to call YYPRINT only for tokens, and using
1400 user token numbers.
1401
1402 2002-06-20 Akim Demaille <akim@epita.fr>
1403
1404 * data/bison.simple (yydestructor): Rename as...
1405 (yydestruct): this.
1406
1407 2002-06-20 Akim Demaille <akim@epita.fr>
1408
1409 * src/symtab.h, src/symtab.c (symbol_type_set)
1410 (symbol_destructor_set, symbol_precedence_set): The location is
1411 the last argument.
1412 Adjust all callers.
1413
1414 2002-06-20 Akim Demaille <akim@epita.fr>
1415
1416 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
1417 internals.
1418 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
1419 Takes a location.
1420 * src/symtab.h, src/symtab.c (symbol_class_set)
1421 (symbol_user_token_number_set): Likewise.
1422 Adjust all callers.
1423 Promote complain_at.
1424 * tests/input.at (Type Clashes): Adjust.
1425
1426 2002-06-20 Akim Demaille <akim@epita.fr>
1427
1428 * data/bison.simple (YYLEX): Fix the declaration when
1429 %pure-parser.
1430
1431 2002-06-20 Akim Demaille <akim@epita.fr>
1432
1433 * data/bison.simple (yysymprint): Don't print the token number,
1434 just its name.
1435 * tests/actions.at (Destructors): Rename as...
1436 (Printers and Destructors): this.
1437 Also exercise %printer.
1438
1439 2002-06-20 Akim Demaille <akim@epita.fr>
1440
1441 * data/bison.simple (YYDSYMPRINT): New.
1442 Use it to remove many of the #if YYDEBUG/if (yydebug).
1443
1444 2002-06-20 Akim Demaille <akim@epita.fr>
1445
1446 * src/symtab.h, src/symtab.c (symbol_t): printer and
1447 printer_location are new members.
1448 (symbol_printer_set): New.
1449 * src/parse-gram.y (PERCENT_PRINTER): New token.
1450 Handle its associated rule.
1451 * src/scan-gram.l: Adjust.
1452 (handle_destructor_at, handle_destructor_dollar): Rename as...
1453 (handle_symbol_code_at, handle_symbol_code_dollar): these.
1454 * src/output.c (symbol_printers_output): New.
1455 (output_skeleton): Call it.
1456 * data/bison.simple (yysymprint): New. Cannot be named yyprint
1457 since there are already many grammar files with a user `yyprint'.
1458 Replace the calls to YYPRINT to calls to yysymprint.
1459 * tests/calc.at: Adjust.
1460 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
1461 taking advantage of parser very internal details (stack size!).
1462
1463 2002-06-20 Akim Demaille <akim@epita.fr>
1464
1465 * src/scan-gram.l: Complete the scanner with the missing patterns
1466 to pacify Flex.
1467 Use `quote' and `symbol_tag_get' where appropriate.
1468
1469 2002-06-19 Akim Demaille <akim@epita.fr>
1470
1471 * tests/actions.at (Destructors): Augment to test locations.
1472 * data/bison.simple (yydestructor): Pass it the current location
1473 if locations are enabled.
1474 Prototype only when __STDC__ or C++.
1475 Change the argument names to move into the yy name space: there is
1476 user code here.
1477
1478 2002-06-19 Akim Demaille <akim@epita.fr>
1479
1480 * data/bison.simple (b4_pure_if): New.
1481 Use it instead of #ifdef YYPURE.
1482
1483 2002-06-19 Akim Demaille <akim@epita.fr>
1484
1485 * data/bison.simple (b4_location_if): New.
1486 Use it instead of #ifdef YYLSP_NEEDED.
1487
1488 2002-06-19 Akim Demaille <akim@epita.fr>
1489
1490 Prepare @$ in %destructor, but currently don't bind it in the
1491 skeleton, as %location use is not cleaned up yet.
1492
1493 * src/scan-gram.l (handle_dollar, handle_destructor_at)
1494 (handle_action_at): New.
1495 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
1496 a braced_code_t and a location as additional arguments.
1497 (handle_destructor_dollar): Instead of requiring `b4_eval', just
1498 unquote one when outputting `b4_dollar_dollar'.
1499 Adjust callers.
1500 * data/bison.simple (b4_eval): Remove.
1501 (b4_symbol_destructor): Adjust.
1502 * tests/input.at (Invalid @n): Adjust.
1503
1504 2002-06-19 Zack Weinberg <zack@codesourcery.com>
1505
1506 * doc/bison.texinfo: Document ability to have multiple
1507 prologue sections.
1508
1509 2002-06-18 Akim Demaille <akim@epita.fr>
1510
1511 * src/files.c (compute_base_names): When computing the output file
1512 names from the input file name, strip the directory part.
1513
1514 2002-06-18 Akim Demaille <akim@epita.fr>
1515
1516 * data/bison.simple.new: Comment changes.
1517 Reported by Andreas Schwab.
1518
1519 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
1520
1521 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
1522 there are no `label `yyoverflowlab' defined but not used' warnings
1523 when yyoverflow is defined.
1524
1525 2002-06-18 Akim Demaille <akim@epita.fr>
1526
1527 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
1528 new member.
1529 (symbol_destructor_set): Adjust.
1530 * src/output.c (symbol_destructors_output): Output the destructor
1531 locations.
1532 Output the symbol name.
1533 * data/bison.simple (b4_symbol_destructor): Adjust.
1534
1535 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
1536 and Akim Demaille <akim@epita.fr>
1537
1538 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
1539 what's left on the stack when the error recovery hits EOF.
1540 * tests/actions.at (Destructors): Complete to exercise this case.
1541
1542 2002-06-17 Akim Demaille <akim@epita.fr>
1543
1544 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
1545 arguments is really empty, not only equal to `[]'.
1546 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
1547 member.
1548 (symbol_destructor_set): New.
1549 * src/output.c (symbol_destructors_output): New.
1550 * src/reader.h (brace_code_t, current_braced_code): New.
1551 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
1552 (handle_dollar): Rename as...
1553 (handle_action_dollar): this.
1554 (handle_destructor_dollar): New.
1555 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
1556 (grammar_declaration): Use it.
1557 * data/bison.simple (yystos): Is always defined.
1558 (yydestructor): New.
1559 * tests/actions.at (Destructors): New.
1560 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
1561
1562 2002-06-17 Akim Demaille <akim@epita.fr>
1563
1564 * src/symlist.h, src/symlist.c (symbol_list_length): New.
1565 * src/scan-gram.l (handle_dollar, handle_at): Compute the
1566 rule_length only when needed.
1567 * src/output.c (actions_output, token_definitions_output): Output
1568 the full M4 block.
1569 * src/symtab.c: Don't access directly to the symbol tag, use
1570 symbol_tag_get.
1571 * src/parse-gram.y: Use symbol_list_free.
1572
1573 2002-06-17 Akim Demaille <akim@epita.fr>
1574
1575 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
1576 (symbol_list_prepend, get_type_name): Move to...
1577 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
1578 (symbol_list_prepend, symbol_list_n_type_name_get): here.
1579 Adjust all callers.
1580 (symbol_list_free): New.
1581 * src/scan-gram.l (handle_dollar): Takes a location.
1582 * tests/input.at (Invalid $n): Adjust.
1583
1584 2002-06-17 Akim Demaille <akim@epita.fr>
1585
1586 * src/reader.h, src/reader.c (symbol_list_new): Export it.
1587 (symbol_list_prepend): New.
1588 * src/parse-gram.y (%union): `list' is a new member.
1589 (symbols.1): New, replaces...
1590 (terms_to_prec.1, nterms_to_type.1): these.
1591 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
1592 Take a location as additional argument.
1593 Adjust all callers.
1594
1595 2002-06-15 Akim Demaille <akim@epita.fr>
1596
1597 * src/parse-gram.y: Move %token in the declaration section so that
1598 we don't depend upon CVS Bison.
1599
1600 2002-06-15 Akim Demaille <akim@epita.fr>
1601
1602 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
1603 * src/print.c (print_core): Use it.
1604
1605 2002-06-15 Akim Demaille <akim@epita.fr>
1606
1607 * src/conflicts.c (log_resolution): Accept the rule involved in
1608 the sr conflicts instead of the lookahead number that points to
1609 that rule.
1610 (flush_reduce): Accept the current lookahead vector as argument,
1611 instead of the index in LA.
1612 (resolve_sr_conflict): Accept the current number of lookahead
1613 bitset to consider for the STATE, instead of the index in LA.
1614 (set_conflicts): Adjust.
1615 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
1616
1617 2002-06-15 Akim Demaille <akim@epita.fr>
1618
1619 * src/state.h (state_t): Replace the `lookaheadsp' member, a
1620 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
1621 Adjust all dependencies.
1622 * src/lalr.c (initialize_lookaheads): Split into...
1623 (states_lookaheads_count, states_lookaheads_initialize): these.
1624 (lalr): Adjust.
1625
1626 2002-06-15 Akim Demaille <akim@epita.fr>
1627
1628 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
1629 out of...
1630 (grammar_rules_print): here.
1631 * src/reduce.c (reduce_output): Use it.
1632 * tests/reduce.at (Useless Rules, Reduced Automaton)
1633 (Underivable Rules): Adjust.
1634
1635 2002-06-15 Akim Demaille <akim@epita.fr>
1636
1637 Copy BYacc's nice way to report the grammar.
1638
1639 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
1640 New.
1641 Don't print the rules' location, it is confusing and useless.
1642 (rule_print): Use grammar_rhs_print.
1643 * src/print.c (print_grammar): Use grammar_rules_print.
1644
1645 2002-06-15 Akim Demaille <akim@epita.fr>
1646
1647 Complete and rationalize `useless thing' warnings.
1648
1649 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
1650 (symbol_tag_print): New.
1651 Use them everywhere in place of accessing directly the tag member.
1652 * src/gram.h, src/gram.c (rule_print): New.
1653 Use it where a rule used to be printed `by hand'.
1654 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
1655 (reduce_grammar_tables): Report the useless rules.
1656 (reduce_print): Useless things are a warning, not an error.
1657 Report it as such.
1658 * tests/reduce.at (Useless Nonterminals, Useless Rules):
1659 (Reduced Automaton, Underivable Rules): Adjust.
1660 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
1661 * tests/conflicts.at (Unresolved SR Conflicts)
1662 (Solved SR Conflicts): Adjust.
1663
1664 2002-06-15 Akim Demaille <akim@epita.fr>
1665
1666 Let symbols have a location.
1667
1668 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
1669 (getsym): Adjust.
1670 Adjust all callers.
1671 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
1672 Use location_t, not int.
1673 * src/symtab.c (symbol_check_defined): Take advantage of the
1674 location.
1675 * tests/regression.at (Invalid inputs): Adjust.
1676
1677 2002-06-15 Akim Demaille <akim@epita.fr>
1678
1679 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
1680 (input): Don't try to initialize yylloc here, do it in the
1681 scanner.
1682 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
1683 * src/gram.h (rule_t): Change line and action_line into location
1684 and action_location, of location_t type.
1685 Adjust all dependencies.
1686 * src/location.h, src/location.c (empty_location): New.
1687 * src/reader.h, src/reader.c (grammar_start_symbol_set)
1688 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
1689 (grammar_current_rule_symbol_append)
1690 (grammar_current_rule_action_append): Expect a location as argument.
1691 * src/reader.c (grammar_midrule_action): Adjust to attach an
1692 action's location as dummy symbol location.
1693 * src/symtab.h, src/symtab.c (startsymbol_location): New.
1694 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
1695 the line numbers.
1696
1697 2002-06-14 Akim Demaille <akim@epita.fr>
1698
1699 Grammar declarations may be found in the grammar section.
1700
1701 * src/parse-gram.y (rules_or_grammar_declaration): New.
1702 (declarations): Each declaration may end with a semicolon, not
1703 just...
1704 (grammar_declaration): `"%union"'.
1705 (grammar): Branch to rules_or_grammar_declaration.
1706
1707 2002-06-14 Akim Demaille <akim@epita.fr>
1708
1709 * src/main.c (main): Invoke scanner_free.
1710
1711 2002-06-14 Akim Demaille <akim@epita.fr>
1712
1713 * src/output.c (m4_invoke): Extracted from...
1714 (output_skeleton): here.
1715 Free tempfile.
1716
1717 2002-06-14 Akim Demaille <akim@epita.fr>
1718
1719 * src/parse-gram.y (directives, directive, gram)
1720 (grammar_directives, precedence_directives, precedence_directive):
1721 Rename as...
1722 (declarations, declaration, grammar, grammar_declaration)
1723 (precedence_declaration, precedence_declarator): these.
1724 (symbol_declaration): New.
1725
1726 2002-06-14 Akim Demaille <akim@epita.fr>
1727
1728 * src/files.c (action_obstack): Remove, unused.
1729 (output_obstack): Remove it, and all its dependencies, as it is no
1730 longer needed.
1731 * src/reader.c (epilogue_set): Build the epilogue in the
1732 muscle_obstack.
1733 * src/output.h, src/output.c (muscle_obstack): Move to...
1734 * src/muscle_tab.h, src/muscle_tab.h: here.
1735 (muscle_init): Initialize muscle_obstack.
1736 (muscle_free): New.
1737 * src/main.c (main): Call it.
1738
1739 2002-06-14 Akim Demaille <akim@epita.fr>
1740
1741 * src/location.h: New, extracted from...
1742 * src/reader.h: here.
1743 * src/Makefile.am (noinst_HEADERS): Merge into
1744 (bison_SOURCES): this.
1745 Add location.h.
1746 * src/parse-gram.y: Use location_t instead of Bison's.
1747 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
1748 Use location_t instead of ints.
1749
1750 2002-06-14 Akim Demaille <akim@epita.fr>
1751
1752 * data/bison.simple, data/bison.c++: Be sure to restore the
1753 current #line when returning to the skeleton contents after having
1754 exposed the input file's #line.
1755
1756 2002-06-12 Akim Demaille <akim@epita.fr>
1757
1758 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
1759 eager.
1760 * tests/actions.at (Exotic Dollars): New.
1761
1762 2002-06-12 Akim Demaille <akim@epita.fr>
1763
1764 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
1765 ['"/] too eagerly.
1766 * tests/input.at (Torturing the Scanner): New.
1767
1768 2002-06-11 Akim Demaille <akim@epita.fr>
1769
1770 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
1771 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
1772 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
1773 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
1774 * src/reader.c (reader): Use it.
1775
1776 2002-06-11 Akim Demaille <akim@epita.fr>
1777
1778 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
1779 Adjust all callers.
1780 (scanner_last_string_free): New.
1781
1782 2002-06-11 Akim Demaille <akim@epita.fr>
1783
1784 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
1785 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
1786 (last_string, YY_OBS_FREE): New.
1787 Use them when returning an ID.
1788
1789 2002-06-11 Akim Demaille <akim@epita.fr>
1790
1791 Have Bison grammars parsed by a Bison grammar.
1792
1793 * src/reader.c, src/reader.h (prologue_augment): New.
1794 * src/reader.c (copy_definition): Remove.
1795
1796 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
1797 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
1798 (grammar_current_rule_prec_set, grammar_current_rule_check)
1799 (grammar_current_rule_symbol_append)
1800 (grammar_current_rule_action_append): Export.
1801 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
1802 (symbol_list_action_append): Remove.
1803 Hook the routines from reader.
1804 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
1805 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
1806
1807 * src/reader.c (read_declarations): Remove, unused.
1808
1809 * src/parse-gram.y: Handle the epilogue.
1810 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
1811 (grammar_start_symbol_set): this.
1812 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
1813 * src/reader.c (readgram): Remove, unused.
1814 (reader): Adjust to insert eoftoken and axiom where appropriate.
1815
1816 * src/reader.c (copy_dollar): Replace with...
1817 * src/scan-gram.h (handle_dollar): this.
1818 * src/parse-gram.y: Remove `%thong'.
1819
1820 * src/reader.c (copy_at): Replace with...
1821 * src/scan-gram.h (handle_at): this.
1822
1823 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
1824 New.
1825
1826 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
1827 time being.
1828
1829 * src/reader.h, src/reader.c (grammar_rule_end): New.
1830
1831 * src/parse.y (current_type, current_class): New.
1832 Implement `%nterm', `%token' support.
1833 Merge `%term' into `%token'.
1834 (string_as_id): New.
1835 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
1836 type name.
1837
1838 * src/parse-gram.y: Be sure to handle properly the beginning of
1839 rules.
1840
1841 * src/parse-gram.y: Handle %type.
1842 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
1843
1844 * src/parse-gram.y: More directives support.
1845 * src/options.c: No longer handle source directives.
1846
1847 * src/parse-gram.y: Fix %output.
1848
1849 * src/parse-gram.y: Handle %union.
1850 Use the prologue locations.
1851 * src/reader.c (parse_union_decl): Remove.
1852
1853 * src/reader.h, src/reader.c (epilogue_set): New.
1854 * src/parse-gram.y: Use it.
1855
1856 * data/bison.simple, data/bison.c++: b4_stype is now either not
1857 defined, then default to int, or to the contents of %union,
1858 without `union' itself.
1859 Adjust.
1860 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
1861
1862 * src/output.c (actions_output): Don't output braces, as they are
1863 already handled by the scanner.
1864
1865 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
1866 characters to themselves.
1867
1868 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
1869 that the epilogue has a proper #line.
1870
1871 * src/parse-gram.y: Handle precedence/associativity.
1872
1873 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
1874 a terminal.
1875 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
1876 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
1877 at all to define terminals that cannot be emitted.
1878
1879 * src/scan-gram.l: Escape M4 characters.
1880
1881 * src/scan-gram.l: Working properly with escapes in user
1882 strings/characters.
1883
1884 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
1885 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
1886 grammar.
1887 Use more modest sizes, as for the time being the parser does not
1888 release memory, and therefore the process swallows a huge amount
1889 of memory.
1890
1891 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
1892 stricter %token grammar.
1893
1894 * src/symtab.h (associativity): Add `undef_assoc'.
1895 (symbol_precedence_set): Do nothing when passed an undef_assoc.
1896 * src/symtab.c (symbol_check_alias_consistence): Adjust.
1897
1898 * tests/regression.at (Invalid %directive): Remove, as it is now
1899 meaningless.
1900 (Invalid inputs): Adjust to the new error messages.
1901 (Token definitions): The new grammar doesn't allow too many
1902 eccentricities.
1903
1904 * src/lex.h, src/lex.c: Remove.
1905 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
1906 (copy_character, copy_string2, copy_string, copy_identifier)
1907 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
1908 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
1909 (parse_action): Remove.
1910 * po/POTFILES.in: Adjust.
1911
1912 2002-06-11 Akim Demaille <akim@epita.fr>
1913
1914 * src/reader.c (parse_action): Don't store directly into the
1915 rule's action member: return the action as a string.
1916 Don't require `rule_length' as an argument: compute it.
1917 (grammar_current_rule_symbol_append)
1918 (grammar_current_rule_action_append): New, eved out from
1919 (readgram): here.
1920 Remove `action_flag', `rulelength', unused now.
1921
1922 2002-06-11 Akim Demaille <akim@epita.fr>
1923
1924 * src/reader.c (grammar_current_rule_prec_set).
1925 (grammar_current_rule_check): New, eved out from...
1926 (readgram): here.
1927 Remove `xaction', `first_rhs': useless.
1928 * tests/input.at (Type clashes): New.
1929 * tests/existing.at (GNU Cim Grammar): Adjust.
1930
1931 2002-06-11 Akim Demaille <akim@epita.fr>
1932
1933 * src/reader.c (grammar_midrule_action): New, Eved out from
1934 (readgram): here.
1935
1936 2002-06-11 Akim Demaille <akim@epita.fr>
1937
1938 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
1939 New.
1940 (readgram): Use them as replacement of inlined code, crule and
1941 crule1.
1942
1943 2002-06-11 Akim Demaille <akim@epita.fr>
1944
1945 * src/reader.c (grammar_end, grammar_symbol_append): New.
1946 (readgram): Use them.
1947 Make the use of `p' as local as possible.
1948
1949 2002-06-10 Akim Demaille <akim@epita.fr>
1950
1951 GCJ's parser requires the tokens to be defined before the prologue.
1952
1953 * data/bison.simple: Output the token definition before the user's
1954 prologue.
1955 * tests/regression.at (Braces parsing, Duplicate string)
1956 (Mixing %token styles): Check the output from bison.
1957 (Early token definitions): New.
1958
1959 2002-06-10 Akim Demaille <akim@epita.fr>
1960
1961 * src/symtab.c (symbol_user_token_number_set): Don't complain when
1962 assigning twice the same user number to a token, so that we can
1963 use it in...
1964 * src/lex.c (lex): here.
1965 Also use `symbol_class_set' instead of hand written code.
1966 * src/reader.c (parse_assoc_decl): Likewise.
1967
1968 2002-06-10 Akim Demaille <akim@epita.fr>
1969
1970 * src/symtab.c, src/symtab.c (symbol_class_set)
1971 (symbol_user_token_number_set): New.
1972 * src/reader.c (parse_token_decl): Use them.
1973 Use a switch instead of ifs.
1974 Use a single argument.
1975
1976 2002-06-10 Akim Demaille <akim@epita.fr>
1977
1978 Remove `%thong' support as it is undocumented, unused, duplicates
1979 `%token's job, and creates useless e-mail traffic with people who
1980 want to know what it is, why it is undocumented, unused, and
1981 duplicates `%token's job.
1982
1983 * src/reader.c (parse_thong_decl): Remove.
1984 * src/options.c (option_table): Remove "thong".
1985 * src/lex.h (tok_thong): Remove.
1986
1987 2002-06-10 Akim Demaille <akim@epita.fr>
1988
1989 * src/symtab.c, src/symtab.c (symbol_type_set)
1990 (symbol_precedence_set): New.
1991 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
1992 (value_components_used): Remove, unused.
1993
1994 2002-06-09 Akim Demaille <akim@epita.fr>
1995
1996 Move symbols handling code out of the reader.
1997
1998 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
1999 (axiom): Move to...
2000 * src/symtab.h, src/symtab.c: here.
2001
2002 * src/gram.c (start_symbol): Remove: use startsymbol->number.
2003 * src/reader.c (startval): Rename as...
2004 * src/symtab.h, src/symtab.c (startsymbol): this.
2005 * src/reader.c: Adjust.
2006
2007 * src/reader.c (symbol_check_defined, symbol_make_alias)
2008 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
2009 (token_translations_init)
2010 Move to...
2011 * src/symtab.c: here.
2012 * src/reader.c (packsymbols): Move to...
2013 * src/symtab.h, src/symtab.c (symbols_pack): here.
2014 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
2015 argument.
2016
2017 2002-06-03 Akim Demaille <akim@epita.fr>
2018
2019 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
2020 then statements.
2021
2022 2002-06-03 Akim Demaille <akim@epita.fr>
2023
2024 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
2025 structs with non literals.
2026 * src/scan-skel.l: never-interactive.
2027 * src/conflicts.c (enum conflict_resolution_e): No trailing
2028 comma.
2029 * src/getargs.c (usage): Split long literal strings.
2030 Reported by Hans Aberg.
2031
2032 2002-05-28 Akim Demaille <akim@epita.fr>
2033
2034 * data/bison.c++: Use C++ ostreams.
2035 (cdebug_): New member.
2036
2037 2002-05-28 Akim Demaille <akim@epita.fr>
2038
2039 * src/output.c (output_skeleton): Be sure to allocate enough room
2040 for `/' _and_ for `\0' in full_skeleton.
2041
2042 2002-05-28 Akim Demaille <akim@epita.fr>
2043
2044 * data/bison.c++: Catch up with bison.simple:
2045 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2046 and Paul Eggert <eggert@twinsun.com>: `error' handing.
2047 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
2048 and popping traces.
2049
2050 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2051
2052 * src/output.c (output_skeleton): Put an explicit path in front of
2053 the skeleton file name, rather than relying on the -I directory,
2054 to partially alleviate effects of having a skeleton file lying around
2055 in the current directory.
2056
2057 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2058
2059 * src/conflicts.c (log_resolution): Correct typo:
2060 obstack_printf should be obstack_fgrow1.
2061
2062 2002-05-26 Akim Demaille <akim@epita.fr>
2063
2064 * src/state.h (state_t): `solved_conflicts' is a new member.
2065 * src/LR0.c (new_state): Set it to 0.
2066 * src/conflicts.h, src/conflicts.c (print_conflicts)
2067 (free_conflicts, solve_conflicts): Rename as...
2068 (conflicts_print, conflicts_free, conflicts_solve): these.
2069 Adjust callers.
2070 * src/conflicts.c (enum conflict_resolution_e)
2071 (solved_conflicts_obstack): New, used by...
2072 (log_resolution): this.
2073 Adjust to attach the conflict resolution to each state.
2074 Complete the description with the precedence/associativity
2075 information.
2076 (resolve_sr_conflict): Adjust.
2077 * src/print.c (print_state): Output its solved_conflicts.
2078 * tests/conflicts.at (Unresolved SR Conflicts)
2079 (Solved SR Conflicts): Exercise --report=all.
2080
2081 2002-05-26 Akim Demaille <akim@epita.fr>
2082
2083 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
2084 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
2085 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
2086 (token_number_t, item_number_as_token_number)
2087 (token_number_as_item_number, muscle_insert_token_number_table):
2088 Rename as...
2089 (symbol_number_t, item_number_as_symbol_number)
2090 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
2091 these, since it is more appropriate.
2092
2093 2002-05-26 Akim Demaille <akim@epita.fr>
2094
2095 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
2096 `Error:' lines.
2097 * data/bison.simple (yystos) [YYDEBUG]: New.
2098 (yyparse) [YYDEBUG]: Display the symbols which are popped during
2099 error recovery.
2100 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
2101
2102 2002-05-25 Akim Demaille <akim@epita.fr>
2103
2104 * doc/bison.texinfo (Debugging): Split into...
2105 (Tracing): this new section, its former contents, and...
2106 (Understanding): this new section.
2107 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
2108 by...
2109 (report_flag): this.
2110 Adjust all dependencies.
2111 (report_args, report_types, report_argmatch): New.
2112 (usage, getargs): Report/support -r, --report.
2113 * src/options.h
2114 (struct option_table_struct): Rename as..,
2115 (struct option_table_s): this.
2116 Rename the `set_flag' member to `flag' to match with getopt_long's
2117 struct.
2118 * src/options.c (option_table): Split verbose into an entry for
2119 %verbose, and another for --verbose.
2120 Support --report/-r, so remove -r from the obsolete --raw.
2121 * src/print.c: Attach full item sets and lookaheads reports to
2122 report_flag instead of trace_flag.
2123 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
2124
2125 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2126 and Paul Eggert <eggert@twinsun.com>
2127
2128 * data/bison.simple (yyparse): Correct error handling to conform to
2129 POSIX and yacc. Specifically, after syntax error is discovered,
2130 do not reduce further before shifting the error token.
2131 Clean up the code a bit by removing the labels yyerrdefault,
2132 yyerrhandle, yyerrpop.
2133 * NEWS: Document the above.
2134
2135 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2136
2137 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
2138 type; it isn't always big enough, since it doesn't necessarily
2139 include non-terminals.
2140 (yytranslate): Expand definition of yy_token_number_type, so that
2141 the latter can be removed.
2142 (yy_token_number_type): Remove, only one use.
2143 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
2144 don't use TokenNumberType as element type.
2145
2146 * tests/regression.at: Modify expected output to agree with change
2147 to yyr1 and yytranslate.
2148
2149 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
2150
2151 * src/reader.c (parse_action): Use copy_character instead of
2152 obstack_1grow.
2153
2154 2002-05-13 Akim Demaille <akim@epita.fr>
2155
2156 * tests/regression.at (Token definitions): Prototype yylex and
2157 yyerror.
2158
2159 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2160
2161 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
2162 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
2163 32-bit arithmetic.
2164 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
2165
2166 2002-05-07 Akim Demaille <akim@epita.fr>
2167
2168 * tests/synclines.at: Be sure to prototype yylex and yyerror to
2169 avoid GCC warnings.
2170
2171 2002-05-07 Akim Demaille <akim@epita.fr>
2172
2173 Kill GCC warnings.
2174
2175 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
2176 over the RHS of each rule.
2177 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
2178 * src/state.h (state_t): Member `nitems' is unsigned short.
2179 * src/LR0.c (get_state): Adjust.
2180 * src/reader.c (packgram): Likewise.
2181 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
2182 `Type'.
2183 (muscle_insert_int_table): Remove, unused.
2184 (prepare_rules): Remove `max'.
2185
2186 2002-05-06 Akim Demaille <akim@epita.fr>
2187
2188 * src/closure.c (print_firsts): Display of the symbol tags.
2189 (bitmatrix_print): Move to...
2190 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
2191 here.
2192 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
2193
2194 2002-05-06 Akim Demaille <akim@epita.fr>
2195
2196 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
2197 hash_do_for_each.
2198
2199 2002-05-06 Akim Demaille <akim@epita.fr>
2200
2201 * src/LR0.c (new_state, get_state): Instead of using the global
2202 `kernel_size' and `kernel_base', have two new arguments:
2203 `core_size' and `core'.
2204 Adjust callers.
2205
2206 2002-05-06 Akim Demaille <akim@epita.fr>
2207
2208 * src/reader.c (packgram): No longer end `ritem' with a 0
2209 sentinel: it is not used.
2210
2211 2002-05-05 Akim Demaille <akim@epita.fr>
2212
2213 New experimental feature: display the lookaheads in the report and
2214 graph.
2215
2216 * src/print (print_core): When --trace-flag, display the rules
2217 lookaheads.
2218 * src/print_graph.c (print_core): Likewise.
2219 Swap the arguments.
2220 Adjust caller.
2221
2222 2002-05-05 Akim Demaille <akim@epita.fr>
2223
2224 * tests/torture.at (Many lookaheads): New test.
2225
2226 2002-05-05 Akim Demaille <akim@epita.fr>
2227
2228 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
2229 (GENERATE_MUSCLE_INSERT_TABLE): this.
2230 (output_int_table, output_unsigned_int_table, output_short_table)
2231 (output_token_number_table, output_item_number_table): Replace with...
2232 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
2233 (muscle_insert_short_table, muscle_insert_token_number_table)
2234 (muscle_insert_item_number_table): these.
2235 Adjust all callers.
2236 (prepare_tokens): Don't free `translations', since...
2237 * src/reader.h, src/reader.c (grammar_free): do it.
2238 Move to...
2239 * src/gram.h, src/gram.c (grammar_free): here.
2240 * data/bison.simple, data/bison.c++: b4_token_number_max is now
2241 b4_translate_max.
2242
2243 2002-05-05 Akim Demaille <akim@epita.fr>
2244
2245 * src/output.c (output_unsigned_int_table): New.
2246 (prepare_rules): `i' is unsigned.
2247 `prhs', `rline', `r2' are unsigned int.
2248 Rename muscle `rhs_number_max' as `rhs_max'.
2249 Output muscles `prhs_max', `rline_max', and `r2_max'.
2250 Free rline and r1.
2251 * data/bison.simple, data/bison.c++: Adjust to use these muscles
2252 to compute types instead of constant types.
2253 * tests/regression.at (Web2c Actions): Adjust.
2254
2255 2002-05-04 Akim Demaille <akim@epita.fr>
2256
2257 * src/symtab.h (SALIAS, SUNDEF): Rename as...
2258 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
2259 Adjust dependencies.
2260 * src/output.c (token_definitions_output): Be sure not to output a
2261 `#define 'a'' when fed with `%token 'a' "a"'.
2262 * tests/regression.at (Token definitions): New.
2263
2264 2002-05-03 Paul Eggert <eggert@twinsun.com>
2265
2266 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
2267 for K&R C.
2268
2269 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
2270
2271 * Makefile.am (SUBDIRS): Remove intl.
2272 (EXTRA_DIST): Add config/config.rpath.
2273
2274 2002-05-03 Akim Demaille <akim@epita.fr>
2275
2276 * data/bison.simple (m4_if): Don't output empty enums.
2277 And actually, output valid enum definitions :(.
2278
2279 2002-05-03 Akim Demaille <akim@epita.fr>
2280
2281 * configure.bat: Remove, completely obsolete.
2282 * Makefile.am (EXTRA_DIST): Adjust.
2283 Don't distribute config.rpath...
2284 * config/Makefile.am (EXTRA_DIST): Do it.
2285
2286 2002-05-03 Akim Demaille <akim@epita.fr>
2287
2288 * configure.in (GETTEXT_VERSION): New.
2289 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
2290
2291 2002-05-03 Akim Demaille <akim@epita.fr>
2292
2293 * data/bison.simple (b4_token_enum): New.
2294 (b4_token_defines): Use it to output tokens both as #define and
2295 enums.
2296 Suggested by Paul Eggert.
2297 * src/output.c (token_definitions_output): Don't output spurious
2298 white spaces.
2299
2300 2002-05-03 Akim Demaille <akim@epita.fr>
2301
2302 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
2303
2304 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
2305
2306 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
2307 Update the stack class, give a try to deque as the default container.
2308
2309 2002-05-02 Akim Demaille <akim@epita.fr>
2310
2311 * data/bison.simple (yyparse): Do not implement @$ = @1.
2312 (YYLLOC_DEFAULT): Adjust to do it.
2313 * doc/bison.texinfo (Location Default Action): Fix.
2314
2315 2002-05-02 Akim Demaille <akim@epita.fr>
2316
2317 * src/reader.c (parse_braces): Merge into...
2318 (parse_action): this.
2319
2320 2002-05-02 Akim Demaille <akim@epita.fr>
2321
2322 * configure.in (ALL_LINGUAS): Remove.
2323 * po/LINGUAS, hr.po: New.
2324
2325 2002-05-02 Akim Demaille <akim@epita.fr>
2326
2327 Remove the so called hairy (semantic) parsers.
2328
2329 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
2330 * src/gram.h, src/gram.c (semantic_parser): Remove.
2331 (rule_t): Remove the guard and guard_line members.
2332 * src/lex.h (token_t): remove tok_guard.
2333 * src/options.c (option_table): Remove %guard and %semantic_parser
2334 support.
2335 * src/output.c, src/output.h (guards_output): Remove.
2336 (prepare): Adjust.
2337 (token_definitions_output): Don't output the `T'
2338 tokens (???).
2339 (output_skeleton): Don't output the guards.
2340 * src/files.c, src/files.c (attrsfile): Remove.
2341 * src/reader.c (symbol_list): Remove the guard and guard_line
2342 members.
2343 Adjust dependencies.
2344 (parse_guard): Remove.
2345 * data/bison.hairy: Remove.
2346 * doc/bison.texinfo (Environment Variables): Remove occurrences of
2347 BISON_HAIRY.
2348
2349 2002-05-02 Akim Demaille <akim@epita.fr>
2350
2351 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
2352 (parse_guard): Rename the formal argument `stack_offset' as
2353 `rule_length', which is more readable.
2354 Adjust callers.
2355 (copy_at, copy_dollar): Instead of outputting the hard coded
2356 values of $$, $n and so forth, output invocation to b4_lhs_value,
2357 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
2358 Note: this patch partially drops `semantic-parser' support: it
2359 always does `rule_length - n', where semantic parsers ought to
2360 always use `-n'.
2361 * data/bison.simple, data/bison.c++ (b4_lhs_value)
2362 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
2363
2364 2002-05-02 Akim Demaille <akim@epita.fr>
2365
2366 * configure.in (AC_INIT): Bump to 1.49b.
2367 (AM_INIT_AUTOMAKE): Short invocation.
2368
2369 2002-05-02 Akim Demaille <akim@epita.fr>
2370
2371 Version 1.49a.
2372
2373 2002-05-01 Akim Demaille <akim@epita.fr>
2374
2375 * src/skeleton.h: Remove.
2376
2377 2002-05-01 Akim Demaille <akim@epita.fr>
2378
2379 * src/skeleton.h: Fix the #endif.
2380 Reported by Magnus Fromreide.
2381
2382 2002-04-26 Paul Eggert <eggert@twinsun.com>
2383
2384 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
2385 Define if we define YYSTYPE and YYLTYPE, respectively.
2386 (YYCOPY): Fix [] quoting problem in the non-GCC case.
2387
2388 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
2389
2390 * src/scan-skel.l: Postprocess quadrigraphs.
2391
2392 * src/reader.c (copy_character): New function, used to output
2393 single characters while replacing `[' and `]' with quadrigraphs, to
2394 avoid troubles with M4 quotes.
2395 (copy_comment): Output characters with copy_character.
2396 (read_additionnal_code): Likewise.
2397 (copy_string2): Likewise.
2398 (copy_definition): Likewise.
2399
2400 * tests/calc.at: Exercise M4 quoting.
2401
2402 2002-04-25 Akim Demaille <akim@epita.fr>
2403
2404 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
2405 between `!' and the command.
2406 Reported by Paul Eggert.
2407
2408 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
2409
2410 * tests/calc.at: Exercise prologue splitting.
2411
2412 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
2413 `b4_post_prologue' instead of `b4_prologue'.
2414
2415 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
2416 muscles.
2417 (output): Free pre_prologue_obstack and post_prologue_obstack.
2418 * src/files.h, src/files.c (attrs_obstack): Remove.
2419 (pre_prologue_obstack, post_prologue_obstack): New.
2420 * src/reader.c (copy_definition): Add a parameter to specify the
2421 obstack to fill, instead of using attrs_obstack unconditionally.
2422 (read_declarations): Pass pre_prologue_obstack to copy_definition if
2423 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
2424
2425 2002-04-23 Paul Eggert <eggert@twinsun.com>
2426
2427 * data/bison.simple: Remove unnecessary commentary and white
2428 space differences from 1_29-branch.
2429 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
2430
2431 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
2432 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
2433 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
2434 constructors or destructors.
2435
2436 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
2437
2438 2002-04-23 Akim Demaille <akim@epita.fr>
2439
2440 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
2441 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
2442 location with columns.
2443 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
2444 All reported by Paul Eggert.
2445
2446 2002-04-22 Akim Demaille <akim@epita.fr>
2447
2448 * src/reduce.c (dump_grammar): Move to...
2449 * src/gram.h, src/gram.c (grammar_dump): here.
2450 Be sure to separate long item numbers.
2451 Don't read the members of a rule's prec if its nil.
2452
2453 2002-04-22 Akim Demaille <akim@epita.fr>
2454
2455 * src/output.c (table_size, table_grow): New.
2456 (MAXTABLE): Remove, replace uses with table_size.
2457 (pack_vector): Instead of dying when the table is too big, grow it.
2458
2459 2002-04-22 Akim Demaille <akim@epita.fr>
2460
2461 * data/bison.simple (yyr1): Its type is that of a token number.
2462 * data/bison.c++ (r1_): Likewise.
2463 * tests/regression.at (Web2c Actions): Adjust.
2464
2465 2002-04-22 Akim Demaille <akim@epita.fr>
2466
2467 * src/reader.c (token_translations_init): 256 is now the default
2468 value for the error token, i.e., it will be assigned another
2469 number if the user assigned 256 to one of her tokens.
2470 (reader): Don't force 256 to error.
2471 * doc/bison.texinfo (Symbols): Adjust.
2472 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
2473 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
2474 etc. instead of 10, 20, 30 (which was used to `jump' over error
2475 (256) and undefined (2)).
2476
2477 2002-04-22 Akim Demaille <akim@epita.fr>
2478
2479 Propagate more token_number_t.
2480
2481 * src/gram.h (token_number_as_item_number)
2482 (item_number_as_token_number): New.
2483 * src/output.c (GENERATE_OUTPUT_TABLE): New.
2484 Use it to create output_item_number_table and
2485 output_token_number_table.
2486 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
2487 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
2488 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
2489 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
2490
2491 2002-04-22 Akim Demaille <akim@epita.fr>
2492
2493 * src/output.h, src/output.c (get_lines_number): Remove.
2494
2495 2002-04-19 Akim Demaille <akim@epita.fr>
2496
2497 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
2498 as Lex/Flex'.
2499 (Debugging): More details about enabling the debugging features.
2500 (Table of Symbols): Describe $$, $n, @$, and @n.
2501 Suggested by Tim Josling.
2502
2503 2002-04-19 Akim Demaille <akim@epita.fr>
2504
2505 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
2506
2507 2002-04-10 Akim Demaille <akim@epita.fr>
2508
2509 * src/system.h: Rely on HAVE_LIMITS_H.
2510 Suggested by Paul Eggert.
2511
2512 2002-04-09 Akim Demaille <akim@epita.fr>
2513
2514 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
2515 full stderr, and strip it according to the bison options, instead
2516 of composing the error message from different bits.
2517 This makes it easier to check for several error messages.
2518 Adjust all the invocations.
2519 Add an invocation exercising the error token.
2520 Add an invocation demonstrating a stupid error message.
2521 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
2522 Adjust the tests.
2523 Error message are for stderr, not stdout.
2524
2525 2002-04-09 Akim Demaille <akim@epita.fr>
2526
2527 * src/gram.h, src/gram.c (error_token_number): Remove, use
2528 errtoken->number.
2529 * src/reader.c (reader): Don't specify the user token number (2)
2530 for $undefined, as it uselessly prevents using it.
2531 * src/gram.h (token_number_t): Move to...
2532 * src/symtab.h: here.
2533 (state_t.number): Is a token_number_t.
2534 * src/print.c, src/reader.c: Use undeftoken->number instead of
2535 hard coded 2.
2536 (Even though this 2 is not the same as above: the number of the
2537 undeftoken remains being 2, it is its user token number which
2538 might not be 2).
2539 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
2540 `user_token_number_max'.
2541 Output `undef_token_number'.
2542 * data/bison.simple, data/bison.c++: Use them.
2543 Be sure to map invalid yylex return values to
2544 `undef_token_number'. This saves us from gratuitous SEGV.
2545
2546 * tests/conflicts.at (Solved SR Conflicts)
2547 (Unresolved SR Conflicts): Adjust.
2548 * tests/regression.at (Web2c Actions): Adjust.
2549
2550 2002-04-08 Akim Demaille <akim@epita.fr>
2551
2552 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
2553 Adding #line.
2554 Remove the duplicate `typedefs'.
2555 (RhsNumberType): Fix the declaration and various other typos.
2556 Use __ofile__.
2557 * data/bison.simple: Use __ofile__.
2558 * src/scan-skel.l: Handle __ofile__.
2559
2560 2002-04-08 Akim Demaille <akim@epita.fr>
2561
2562 * src/gram.h (item_number_t): New, the type of item numbers in
2563 RITEM. Note that it must be able to code symbol numbers as
2564 positive number, and the negation of rule numbers as negative
2565 numbers.
2566 Adjust all dependencies (pretty many).
2567 * src/reduce.c (rule): Remove this `short *' pointer: use
2568 item_number_t.
2569 * src/system.h (MINSHORT, MAXSHORT): Remove.
2570 Include `limits.h'.
2571 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
2572 (shortcpy): Remove.
2573 (MAXTABLE): Move to...
2574 * src/output.c (MAXTABLE): here.
2575 (prepare_rules): Use output_int_table to output rhs.
2576 * data/bison.simple, data/bison.c++: Adjust.
2577 * tests/torture.at (Big triangle): Move the limit from 254 to
2578 500.
2579 * tests/regression.at (Web2c Actions): Ajust.
2580
2581 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
2582 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
2583 passes, but produces negative #line number, once fixed, GCC is
2584 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
2585 C), it passes.
2586 * src/state.h (state_h): Code input lines on ints, not shorts.
2587
2588 2002-04-08 Akim Demaille <akim@epita.fr>
2589
2590 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
2591 and then the grammar.
2592
2593 2002-04-08 Akim Demaille <akim@epita.fr>
2594
2595 * src/system.h: No longer using strndup.
2596
2597 2002-04-07 Akim Demaille <akim@epita.fr>
2598
2599 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
2600 * src/output.c (output_table_data): Return the longest number.
2601 (prepare_tokens): Output `token_number_max').
2602 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
2603 New.
2604 Use them to define yy_token_number_type/TokenNumberType.
2605 Use this type for yytranslate.
2606 * tests/torture.at (Big triangle): Push the limit from 124 to
2607 253.
2608 * tests/regression.at (Web2c Actions): Adjust.
2609
2610 2002-04-07 Akim Demaille <akim@epita.fr>
2611
2612 * tests/torture.at (Big triangle): New.
2613 (GNU AWK Grammar, GNU Cim Grammar): Move to...
2614 * tests/existing.at: here.
2615
2616 2002-04-07 Akim Demaille <akim@epita.fr>
2617
2618 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
2619 nritems.
2620 Adjust dependencies.
2621
2622 2002-04-07 Akim Demaille <akim@epita.fr>
2623
2624 * src/reader.c: Normalize increments to prefix form.
2625
2626 2002-04-07 Akim Demaille <akim@epita.fr>
2627
2628 * src/reader.c, symtab.c: Remove debugging code.
2629
2630 2002-04-07 Akim Demaille <akim@epita.fr>
2631
2632 Rename all the `bucket's as `symbol_t'.
2633
2634 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
2635 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
2636 * src/symtab.c, src/symtab.h (bucket): Rename as...
2637 (symbol_t): this.
2638 (symbol_list_new, bucket_check_defined, bucket_make_alias)
2639 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
2640 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
2641 (buckets_new, buckets_free, buckets_do): Rename as...
2642 (symbol_list_new, symbol_check_defined, symbol_make_alias)
2643 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
2644 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
2645 (symbols_new, symbols_free, symbols_do): these.
2646
2647 2002-04-07 Akim Demaille <akim@epita.fr>
2648
2649 Use lib/hash for the symbol table.
2650
2651 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
2652 EOF.
2653 * src/lex.c (lex): Set the `number' member of new terminals.
2654 * src/reader.c (bucket_check_defined, bucket_make_alias)
2655 (bucket_check_alias_consistence, bucket_translation): New.
2656 (reader, grammar_free, readgram, token_translations_init)
2657 (packsymbols): Adjust.
2658 (reader): Number the predefined tokens.
2659 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
2660 for predefined tokens.
2661 * src/symtab.h (bucket): Remove all the hash table related
2662 members.
2663 * src/symtab.c (symtab): Replace by...
2664 (bucket_table): this.
2665 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
2666 (buckets_new, buckets_do): New.
2667
2668 2002-04-07 Akim Demaille <akim@epita.fr>
2669
2670 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
2671 (start_symbol, max_user_token_number, semantic_parser)
2672 (error_token_number): Initialize.
2673 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
2674 Initialize.
2675 (reader): Don't.
2676 (errtoken, eoftoken, undeftoken, axiom): Extern.
2677
2678 2002-04-07 Akim Demaille <akim@epita.fr>
2679
2680 * src/gram.h (rule_s): prec and precsym are now pointers
2681 to the bucket giving the priority/associativity.
2682 Member `associativity' removed: useless.
2683 * src/reduce.c, src/conflicts.c: Adjust.
2684
2685 2002-04-07 Akim Demaille <akim@epita.fr>
2686
2687 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
2688 Properly escape the symbols' TAG when outputting them.
2689
2690 2002-04-07 Akim Demaille <akim@epita.fr>
2691
2692 * src/lalr.h (LA): Is a bitsetv, not bitset*.
2693
2694 2002-04-07 Akim Demaille <akim@epita.fr>
2695
2696 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
2697 (LArule): this, which is an array to rule_t*.
2698 * src/print.c, src/conflicts.c: Adjust.
2699
2700 2002-04-07 Akim Demaille <akim@epita.fr>
2701
2702 * src/gram.h (rule_t): Rename `number' as `user_number'.
2703 `number' is a new member.
2704 Adjust dependencies.
2705 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
2706
2707 2002-04-07 Akim Demaille <akim@epita.fr>
2708
2709 As a result of the previous patch, it is no longer needed
2710 to reorder ritem itself.
2711
2712 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
2713
2714 2002-04-07 Akim Demaille <akim@epita.fr>
2715
2716 Be sure never to walk through RITEMS, but use only data related to
2717 the rules themselves. RITEMS should be banished.
2718
2719 * src/output.c (output_token_translations): Rename as...
2720 (prepare_tokens): this.
2721 In addition to `translate', prepare the muscles `tname' and
2722 `toknum', which were handled by...
2723 (output_rule_data): this.
2724 Remove, and move the remainder of its outputs into...
2725 (prepare_rules): this new routines, which also merges content from
2726 (output_gram): this.
2727 (prepare_rules): Be sure never to walk through RITEMS.
2728 (output_stos): Rename as...
2729 (prepare_stos): this.
2730 (output): Always invoke prepare_states, after all, just don't use it
2731 in the output if you don't need it.
2732
2733 2002-04-07 Akim Demaille <akim@epita.fr>
2734
2735 * src/LR0.c (new_state): Display `nstates' as the name of the
2736 newly created state.
2737 Adjust to initialize first_state and last_state if needed.
2738 Be sure to distinguish the initial from the final state.
2739 (new_states): Create the itemset of the initial state, and use
2740 new_state.
2741 * src/closure.c (closure): Now that the initial state has its
2742 items properly set, there is no need for a special case when
2743 creating `ruleset'.
2744
2745 As a result, now the rule 0, reducing to $axiom, is visible in the
2746 outputs. Adjust the test suite.
2747
2748 * tests/conflicts.at (Solved SR Conflicts)
2749 (Unresolved SR Conflicts): Adjust.
2750 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
2751 * tests/conflicts.at (S/R in initial): New.
2752
2753 2002-04-07 Akim Demaille <akim@epita.fr>
2754
2755 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
2756 the RHS of the rules.
2757 * src/output.c (output_gram): Likewise.
2758
2759 2002-04-07 Akim Demaille <akim@epita.fr>
2760
2761 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
2762 bucket.
2763 Adjust all dependencies.
2764 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
2765 `number' of the buckets too.
2766 * src/gram.h: Include `symtab.h'.
2767 (associativity): Move to...
2768 * src/symtab.h: here.
2769 No longer include `gram.h'.
2770
2771 2002-04-07 Akim Demaille <akim@epita.fr>
2772
2773 * src/gram.h, src/gram.c (rules_rhs_length): New.
2774 (ritem_longest_rhs): Use it.
2775 * src/gram.h (rule_t): `number' is a new member.
2776 * src/reader.c (packgram): Set it.
2777 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
2778 the end of `rules', and count them out of `nrules'.
2779 (reduce_output, dump_grammar): Adjust.
2780 * src/print.c (print_grammar): It is no longer needed to check for
2781 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
2782 * tests/reduce.at (Reduced Automaton): New test.
2783
2784 2002-04-07 Akim Demaille <akim@epita.fr>
2785
2786 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
2787 lacking `+ 1' to nrules, Bison reported as useless a token if it
2788 was used solely to set the precedence of the last rule...
2789
2790 2002-04-07 Akim Demaille <akim@epita.fr>
2791
2792 * data/bison.c++, data/bison.simple: Don't output the current file
2793 name in #line, to avoid useless diffs between two identical
2794 outputs under different names.
2795
2796 2002-04-07 Akim Demaille <akim@epita.fr>
2797
2798 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
2799 Normalize loops to using `< nrules + 1', not `<= nrules'.
2800
2801 2002-04-07 Akim Demaille <akim@epita.fr>
2802
2803 * TODO: Update.
2804
2805 2002-04-07 Akim Demaille <akim@epita.fr>
2806
2807 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
2808 bucket.value as bucket.number.
2809
2810 2002-04-07 Akim Demaille <akim@epita.fr>
2811
2812 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
2813 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
2814 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
2815 RHS, instead of being an index in RITEMS.
2816
2817 2002-04-04 Paul Eggert <eggert@twinsun.com>
2818
2819 * doc/bison.texinfo: Update copyright date.
2820 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
2821 (Symbols): Warn about running Bison in one character set,
2822 but compiling and/or running in an incompatible one.
2823 Warn about character code 256, too.
2824
2825 2002-04-03 Paul Eggert <eggert@twinsun.com>
2826
2827 * src/bison.data (YYSTACK_ALLOC): Depend on whether
2828 YYERROR_VERBOSE is nonzero, not whether it is defined.
2829
2830 Merge changes from bison-1_29-branch.
2831
2832 2002-03-20 Paul Eggert <eggert@twinsun.com>
2833
2834 Merge fixes from Debian bison_1.34-1.diff.
2835
2836 * configure.in (AC_PREREQ): 2.53.
2837
2838 2002-03-20 Akim Demaille <akim@epita.fr>
2839
2840 * src/conflicts.c (log_resolution): Argument `resolution' is const.
2841
2842 2002-03-19 Paul Eggert <eggert@twinsun.com>
2843
2844 * src/bison.simple (YYCOPY): New macro.
2845 (YYSTACK_RELOCATE): Use it.
2846 Remove Type arg; no longer needed. All callers changed.
2847 (yymemcpy): Remove; no longer needed.
2848
2849 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
2850 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
2851
2852 2002-03-19 Akim Demaille <akim@epita.fr>
2853
2854 Test and fix the #line outputs.
2855
2856 * tests/atlocal.at (GCC): New.
2857 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
2858 (Prologue synch line, ,%union synch line, Postprologue synch line)
2859 (Action synch line, Epilogue synch line): New tests.
2860 * src/reader.c (parse_union_decl): Define the muscle stype_line.
2861 * data/bison.simple, data/bison.c++: Use it.
2862
2863 2002-03-19 Akim Demaille <akim@epita.fr>
2864
2865 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
2866 (Solved SR Conflicts, %expect not enough, %expect right)
2867 (%expect too much): Move to...
2868 * tests/conflicts.at: this new file.
2869
2870 2002-03-19 Akim Demaille <akim@epita.fr>
2871
2872 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
2873 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
2874 that we can move to enums for instance.
2875 * src/output.c (token_definitions_output): Output a list of
2876 `token-name, token-number' instead of the #define.
2877 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
2878
2879 2002-03-14 Akim Demaille <akim@epita.fr>
2880
2881 Use Gettext 0.11.1.
2882
2883 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
2884
2885 * data/bison.c++: Make the user able to add members to the generated
2886 parser by subclassing.
2887
2888 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
2889
2890 * src/reader.c (read_additionnal_code): `c' should be an integer, not
2891 a character.
2892 Reported by Nicolas Tisserand and Nicolas Burrus.
2893
2894 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
2895
2896 * src/reader.c: Warn about lacking semi-colons, do not complain.
2897
2898 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
2899
2900 * data/bison.c++: Remove a debug line.
2901
2902 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
2903
2904 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
2905 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
2906 provide a default implementation.
2907
2908 2002-03-04 Akim Demaille <akim@epita.fr>
2909
2910 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
2911 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
2912 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
2913 * tests/semantic.at (Parsing Guards): Similarly.
2914 * src/reader.at (readgram): Complain if the last rule is not ended
2915 with a semi-colon.
2916
2917 2002-03-04 Akim Demaille <akim@epita.fr>
2918
2919 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
2920 * src/closure.c: here.
2921 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
2922 RTC.
2923 * src/warshall.h, src/warshall.c: Remove.
2924 * tests/sets.at (Broken Closure): Adjust.
2925
2926 2002-03-04 Akim Demaille <akim@epita.fr>
2927
2928 * src/output.c (output_skeleton): tempdir is const.
2929 bytes_read is unused.
2930
2931 2002-03-04 Akim Demaille <akim@epita.fr>
2932
2933 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
2934 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
2935 Update.
2936 From Michael Hayes.
2937
2938 2002-03-04 Akim Demaille <akim@epita.fr>
2939
2940 * src/closure.c (closure): `r' is unused.
2941
2942 2002-03-04 Akim Demaille <akim@epita.fr>
2943
2944 * tests/sets.at (Broken Closure): Add the ending `;'.
2945 * src/reader.at (readgram): Complain if a rule is not ended with a
2946 semi-colon.
2947
2948 2002-03-04 Akim Demaille <akim@epita.fr>
2949
2950 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
2951 (count_sr_conflicts): Use bitset_count.
2952 * src/reduce.c (inaccessable_symbols): Ditto.
2953 (bits_size): Remove.
2954 * src/warshall.h, src/warshall.c: Convert to bitsetv.
2955
2956 2002-03-04 Akim Demaille <akim@epita.fr>
2957
2958 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
2959 * src/reduce.c: Remove the `bitset_zero's following the
2960 `bitset_create's, as now it is performed by the latter.
2961
2962 2002-03-04 Akim Demaille <akim@epita.fr>
2963
2964 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
2965 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
2966 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
2967 latest sources from Michael.
2968
2969 2002-03-04 Akim Demaille <akim@epita.fr>
2970
2971 * src/output.c (output): Don't free the grammar.
2972 * src/reader.c (grammar_free): New.
2973 * src/main.c (main): Call it and don't free symtab here.
2974
2975 2002-03-04 Akim Demaille <akim@epita.fr>
2976
2977 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
2978 before returning.
2979 Reported by Benoit Perrot.
2980
2981 2002-03-04 Akim Demaille <akim@epita.fr>
2982
2983 Use bitset operations when possible, not loops over bits.
2984
2985 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
2986 bitset_or.
2987 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
2988 * src/reduce.c (useless_nonterminals): Formatting changes.
2989 * src/warshall.c (TC): Use bitset_or.
2990
2991 2002-03-04 Akim Demaille <akim@epita.fr>
2992
2993 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
2994 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
2995 Ditto.
2996
2997 2002-03-04 Akim Demaille <akim@epita.fr>
2998
2999 * src/lalr.c (F): Now a bitset*.
3000 Adjust all dependencies.
3001
3002 2002-03-04 Akim Demaille <akim@epita.fr>
3003
3004 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
3005 Adjust all dependencies.
3006
3007 2002-03-04 Akim Demaille <akim@epita.fr>
3008
3009 * src/L0.c, src/LR0.h (nstates): Be size_t.
3010 Adjust comparisons (signed vs unsigned).
3011 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
3012 bitset*.
3013 Adjust all dependencies.
3014
3015 2002-03-04 Akim Demaille <akim@epita.fr>
3016
3017 * src/closure.c (firsts): Now, also a bitset.
3018 Adjust all dependencies.
3019 (varsetsize): Remove, now unused.
3020 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
3021
3022 2002-03-04 Akim Demaille <akim@epita.fr>
3023
3024 * src/print.c: Convert to use bitset.h, not hand coded iterations
3025 over ints.
3026
3027 2002-03-04 Akim Demaille <akim@epita.fr>
3028
3029 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
3030
3031 2002-03-04 Akim Demaille <akim@epita.fr>
3032
3033 * src/closure.c (ruleset): Be a bitset.
3034 (rulesetsize): Remove.
3035
3036 2002-03-04 Akim Demaille <akim@epita.fr>
3037
3038 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
3039 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
3040 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
3041 * src/closure.c (fderives): Be an array of bitsets.
3042
3043 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
3044
3045 * data/bison.c++: Merge the two generated headers. Insert a copyright
3046 notice in each output file.
3047
3048 2002-02-28 Akim Demaille <akim@epita.fr>
3049
3050 * data/bison.c++: Copy the prologue of bison.simple to fetch
3051 useful M4 definitions, such as b4_header_guard.
3052
3053 2002-02-25 Akim Demaille <akim@epita.fr>
3054
3055 * src/getargs.c (version): Give the name of the authors, and use a
3056 translator friendly scheme for the bgr
3057 copyright notice.
3058
3059 2002-02-25 Akim Demaille <akim@epita.fr>
3060
3061 * src/output.c (header_output): Remove, now handled completely via
3062 M4.
3063
3064 2002-02-25 Akim Demaille <akim@epita.fr>
3065
3066 * m4/m4.m4: New, from CVS Autoconf.
3067 * configure.in: Invoke it.
3068 * src/output.c (output_skeleton): Use its result instead of the
3069 hard coded name.
3070
3071 2002-02-25 Akim Demaille <akim@epita.fr>
3072
3073 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
3074 Fileutils 4.1.5.
3075 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
3076 * src/output.c (output_skeleton): Use mkstemp to create a real
3077 temporary file.
3078 Move the filling of `skeleton' and its muscle to...
3079 (prepare): here.
3080 (output): Move the definition of the prologue muscle to...
3081 (prepare): here.
3082 * src/system.h (DEFAULT_TMPDIR): New.
3083
3084 2002-02-14 Paul Eggert <eggert@twinsun.com>
3085
3086 Remove the support for C++ namespace cleanliness; it was
3087 causing more problems than it was curing, since it didn't work
3088 properly on some nonstandard C++ compilers. This can wait
3089 for a proper C++ parser.
3090
3091 * NEWS: Document this.
3092 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
3093 of C++, as it's treated like C now.
3094 * src/bison.simple (YYSTD): Remove.
3095 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
3096 Treat C++ just like Standard C instead of trying to support
3097 namespace cleanliness.
3098
3099 2002-02-14 Akim Demaille <akim@epita.fr>
3100
3101 * tests/regression.at (else): Adjust to Andreas' change.
3102
3103 2002-02-14 Akim Demaille <akim@epita.fr>
3104
3105 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
3106
3107 2002-02-13 Andreas Schwab <schwab@suse.de>
3108
3109 * src/output.c (output_rule_data): Don't output NULL, it might
3110 not be defined yet.
3111
3112 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
3113
3114 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
3115 (Copyright notice): Update.
3116
3117 2002-02-11 Akim Demaille <akim@epita.fr>
3118
3119 * tests/regression.at (%nonassoc and eof): Don't include
3120 nonportable headers.
3121
3122 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
3123
3124 * data/bison.c++: Correct error recovery. Make the user able to
3125 initialize the starting location.
3126
3127 2002-02-07 Akim Demaille <akim@epita.fr>
3128
3129 * tests/input.at: New.
3130
3131 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
3132
3133 * data/bison.c++: Replace some direct m4 expansions by constants. Be
3134 more consistent when naming methods and variables. Put preprocessor
3135 directives around tables only needed for debugging.
3136
3137 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
3138
3139 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
3140 C++ parsers.
3141 (yy::b4_name::parse): Use print_.
3142
3143 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
3144
3145 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
3146
3147 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
3148
3149 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
3150 C++ parsers.
3151 (yy::b4_name::parse): Build verbose error messages, and use error_.
3152
3153 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
3154
3155 * data/bison.c++: Fix m4 quoting in comments.
3156
3157 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
3158
3159 * data/bison.c++: Adjust the parser code. Fix some muscles that were
3160 not expanded by m4.
3161
3162 2002-02-05 Akim Demaille <akim@epita.fr>
3163
3164 * data/bison.c++: Adjust to the M4 back end.
3165 More is certainly needed.
3166
3167 2002-02-05 Akim Demaille <akim@epita.fr>
3168
3169 Give a try to M4 as a back end.
3170
3171 * lib/readpipe.c: New, from wdiff.
3172 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
3173 BISON_HAIRY.
3174 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
3175 specific values. Now it is m4 that performs the lookup.
3176 * src/parse-skel.y: Remove.
3177 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
3178 * src/output.c (actions_output, guards_output)
3179 (token_definitions_output): No longer keeps track of the output
3180 line number, hence remove the second argument.
3181 (guards_output): Check against the guard member of a rule, not the
3182 action member.
3183 Adjust callers.
3184 (output_skeleton): Don't look for the skeleton location, let m4 do
3185 that.
3186 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
3187 file will be used.
3188 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
3189 (prepare): Given that for the time being changesyntax is not
3190 usable in M4, rename the muscles using `-' to `_'.
3191 Define `defines_flag', `output_parser_name' and `output_header_name'.
3192 * src/output.h (actions_output, guards_output)
3193 (token_definitions_output): Adjust prototypes.
3194 * src/scan-skel.l: Instead of scanning the skeletons, it now
3195 processes the output of m4: `__oline__' and `#output'.
3196 * data/bison.simple: Adjust to be used by M4(sugar).
3197 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
3198 to date.
3199 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
3200 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
3201 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
3202 shamelessly stolen from CVS Autoconf.
3203
3204 2002-02-05 Akim Demaille <akim@epita.fr>
3205
3206 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
3207 * configure.in: Check for the declarations of free and malloc.
3208 * src/muscle_tab.c: Adjust.
3209
3210 2002-02-05 Akim Demaille <akim@epita.fr>
3211
3212 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
3213 which have no values.
3214
3215 2002-02-05 Akim Demaille <akim@epita.fr>
3216
3217 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
3218 * data/: here.
3219
3220 2002-01-29 Paul Eggert <eggert@twinsun.com>
3221
3222 * src/bison.simple (YYSIZE_T): Do not define merely because
3223 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
3224 On some platforms, <alloca.h> does not declare YYSTD (size_t).
3225
3226 2002-01-27 Akim Demaille <akim@epita.fr>
3227
3228 Fix `%nonassoc and eof'.
3229
3230 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
3231 which were not properly copied! Replace
3232 memcpy (res->errs, src->errs, src->nerrs);
3233 with
3234 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
3235 !!!
3236 * tests/regression.at (%nonassoc and eof): Adjust to newest
3237 Autotest: `.' is not in the PATH.
3238
3239 2002-01-27 Akim Demaille <akim@epita.fr>
3240
3241 * tests/sets.at (AT_EXTRACT_SETS): New.
3242 (Nullable): Use it.
3243 (Firsts): New.
3244
3245 2002-01-26 Akim Demaille <akim@epita.fr>
3246
3247 * tests/actions.at, tests/calc.at, tests/headers.at,
3248 * tests/torture.at: Adjust to the newest Autotest which no longer
3249 forces `.' in the PATH.
3250
3251 2002-01-25 Akim Demaille <akim@epita.fr>
3252
3253 * tests/regression.at (%nonassoc and eof): New.
3254 Suggested by Robert Anisko.
3255
3256 2002-01-24 Akim Demaille <akim@epita.fr>
3257
3258 Bison dumps core when trying to complain about broken input files.
3259 Reported by Cris van Pelt.
3260
3261 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
3262 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
3263 into...
3264 (Invalid inputs): Strengthen: exercise parse_percent_token.
3265
3266 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
3267
3268 * src/Makefile.am: Add bison.c++.
3269 * src/bison.c++: New skeleton.
3270
3271 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
3272
3273 * po/it.po: New.
3274
3275 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
3276
3277 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
3278
3279 2002-01-20 Marc Autret <marc@gnu.org>
3280
3281 * src/files.c (compute_output_file_names): Fix
3282
3283 2002-01-20 Marc Autret <marc@gnu.org>
3284
3285 * tests/output.at: New test.
3286 * src/files.c (compute_base_names): Don't map extensions when
3287 the YACC flag is set, use defaults.
3288 Reported by Evgeny Stambulchik.
3289
3290 2002-01-20 Marc Autret <marc@gnu.org>
3291
3292 * src/system.h: Need to define __attribute__ away for non-GCC
3293 compilers as well (i.e. the vendor C compiler).
3294 Suggested by Albert Chin-A-Young.
3295
3296 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
3297
3298 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
3299 canonical definition.
3300 * src/system.h: Use the canonical definition for PARAMS (avoids
3301 a conflict with the macro from lib/hash.h).
3302
3303 2002-01-11 Akim Demaille <akim@epita.fr>
3304
3305 * configure.in: Use AC_FUNC_STRNLEN.
3306 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
3307
3308 2002-01-09 Akim Demaille <akim@epita.fr>
3309
3310 * src/files.c, src/files.h (output_infix): New.
3311 (tab_extension): Remove.
3312 (compute_base_names): Compute the former, drop the latter.
3313 * src/output.c (prepare): Insert the muscles `output-infix', and
3314 `output-suffix'.
3315 * src/parse-skel.y (string, string.1): New.
3316 (section.header): Use it.
3317 (section.yacc): Remove.
3318 (prefix): Remove too.
3319 * src/scan-skel.l: Adjust.
3320 * src/bison.simple, src/bison.hairy: Adjust.
3321
3322 2002-01-09 Akim Demaille <akim@epita.fr>
3323
3324 * configure.in (WERROR_CFLAGS): Compute it.
3325 * src/Makefile.am (CFLAGS): Pass it.
3326 * tests/atlocal.in (CFLAGS): Idem.
3327 * src/files.c: Fix a few warnings.
3328 (get_extension_index): Remove, unused.
3329
3330 2002-01-08 Akim Demaille <akim@epita.fr>
3331
3332 * src/getargs.c (AS_FILE_NAME): New.
3333 (getargs): Use it to convert DOSish file names.
3334 * src/files.c (base_name): Rename as full_base_name to avoid
3335 clashes with `base_name ()'.
3336 (filename_split): New.
3337 (compute_base_names): N-th rewrite, using filename_split.
3338
3339 2002-01-08 Akim Demaille <akim@epita.fr>
3340
3341 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
3342 New, stolen from the Fileutils 4.1.
3343 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
3344 * configure.in: Check for the presence of memrchr, and of its
3345 prototype.
3346
3347 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
3348
3349 * lib/hash.h (__P): Added definition for this macro.
3350 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
3351 BUILT_SOURCES, to ensure they are generated first.
3352 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
3353 %error-verbose to allow bootstrapping with bison 1.30x.
3354
3355 2002-01-06 Akim Demaille <akim@epita.fr>
3356
3357 * src/reader.c (parse_braces): Don't fetch the next char, the
3358 convention is to fetch on entry.
3359 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
3360 'switch' without a following semicolon.
3361 * tests/regression.at (braces parsing): New.
3362
3363 2002-01-06 Akim Demaille <akim@epita.fr>
3364
3365 Bison is dead wrong in its RR conflict reports.
3366
3367 * tests/torture.at (GNU Cim Grammar): New.
3368 * src/conflicts.c (count_rr_conflicts): Fix.
3369
3370 2002-01-06 Akim Demaille <akim@epita.fr>
3371
3372 Creating package.m4 from configure.ac causes too many problems.
3373
3374 * tests/Makefile.am (package.m4): Create it by hand,
3375 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
3376
3377 2002-01-06 Akim Demaille <akim@epita.fr>
3378
3379 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
3380 skeleton.h.
3381
3382 2002-01-04 Paul Eggert <eggert@twinsun.com>
3383
3384 * doc/bison.texinfo (Debugging):
3385 Remove YYSTDERR; it's no longer defined or used.
3386 Also, s/cstdio.h/cstdio/.
3387
3388 2002-01-03 Akim Demaille <akim@epita.fr>
3389
3390 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
3391
3392 2002-01-03 Akim Demaille <akim@epita.fr>
3393
3394 * src/parse-skel.y (process_skeleton): Don't bind the parser's
3395 tracing code to --trace, wait for a better --trace option, with
3396 args.
3397
3398 2002-01-03 Akim Demaille <akim@epita.fr>
3399
3400 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
3401 The ISO C++ standard is extremely clear about it: stderr is
3402 considered a macro, not a regular symbol (see table 94 `Header
3403 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
3404 Therefore std:: does not apply to it. It still does with fprintf.
3405 Also, s/cstdio.h/cstdio/.
3406
3407 2002-01-03 Akim Demaille <akim@epita.fr>
3408
3409 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
3410 for non system headers.
3411
3412 2002-01-02 Akim Demaille <akim@epita.fr>
3413
3414 Equip the skeleton chain with location tracking, runtime trace,
3415 pure parser and scanner.
3416
3417 * src/parse-skel.y: Request a pure parser, locations, and prefix
3418 renaming.
3419 (%union): Having several members with the same type does not help
3420 type mismatches, simplify.
3421 (YYPRINT, yyprint): New.
3422 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
3423 (skel_error): this.
3424 Handle locations.
3425 * src/scan-skel.l: Adjust to these changes.
3426 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
3427 (LOCATION_PRINT, skel_control_t): New.
3428
3429 2001-12-30 Akim Demaille <akim@epita.fr>
3430
3431 * src/parse-skel.y: Get rid of the shift/reduce conflict:
3432 replace `gb' with BLANKS.
3433 * src/scan-skel.l: Adjust.
3434
3435 2001-12-30 Akim Demaille <akim@epita.fr>
3436
3437 * src/system.h: We don't need nor want bcopy.
3438 Throw away MS-DOS crap: we don't need getpid.
3439 * configure.in: We don't need strndup. It was even causing
3440 problems: because Flex includes the headers *before* us,
3441 _GNU_SOURCE is not defined by config.h, and therefore strndup was
3442 not visible.
3443 * lib/xstrndup.c: New.
3444 * src/scan-skel.l: Use it.
3445 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
3446 * src/parse-skel.y: Use %directives instead of #defines.
3447
3448 2001-12-30 Akim Demaille <akim@epita.fr>
3449
3450 * src/skeleton.h: New.
3451 * src/output.c (output_parser, output_master_parser): Remove, dead
3452 code.
3453 * src/output.h (get_lines_number, actions_output, guards_output)
3454 (token_definitions_output): Prototype them.
3455 * src/parse-skel.y: Add the license notice.
3456 Include output.h and skeleton.h.
3457 (process_skeleton): Returns void, and takes a single parameter.
3458 * src/scan-skel.l: Add the license notice.
3459 Include skeleton.h.
3460 Don't use %option yylineno: it seems that then Flex imagines
3461 REJECT has been used, and therefore it won't reallocate its
3462 buffers (which makes no other sense to me than a bug). It results
3463 in warnings for `unused: yy_flex_realloc'.
3464
3465 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
3466
3467 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
3468 (MUSCLE_INSERT_PREFIX): ...to there.
3469 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
3470 (MUSCLE_INSERT_PREFIX): Move from here...
3471
3472 * src/bison.hairy: Add a section directive. Put braces around muscle
3473 names. This parser skeleton is still broken, but Bison should not
3474 choke on a bad muscle 'syntax'.
3475 * src/bison.simple: Add a section directive. Put braces around muscle
3476 names.
3477
3478 * src/files.h (strsuffix, stringappend): Add declarations.
3479 (tab_extension): Add declaration.
3480 (short_base_name): Add declaration.
3481
3482 * src/files.c (strsuffix, stringappend): No longer static. These
3483 functions are used in the skeleton parser.
3484 (tab_extension): New.
3485 (compute_base_names): Use the computations done in this function
3486 to guess if the generated parsers should have '.tab' in their
3487 names.
3488 (short_base_name): No longer static.
3489
3490 * src/output.c (output_skeleton): New.
3491 (output): Disable call to output_master_parser, and give a try to
3492 a new skeleton handling system.
3493 (guards_output, actions_output): No longer static.
3494 (token_definitions_output, get_lines_number): No longer static.
3495
3496 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
3497
3498 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
3499 parse-skel.y.
3500
3501 * src/parse-skel.y: New file.
3502 * src/scan-skel.l: New file.
3503
3504 2001-12-29 Akim Demaille <akim@epita.fr>
3505
3506 %name-prefix is broken.
3507
3508 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
3509 Adjust all dependencies.
3510 * tests/headers.at (export YYLTYPE): Strengthen this test: use
3511 %name-prefix.
3512
3513 Renaming yylval but not yylloc is not consistent. Now we do.
3514
3515 * src/bison.simple: Prefix yylloc if used.
3516 * doc/bison.texinfo (Decl Summary): Document that.
3517
3518 2001-12-29 Akim Demaille <akim@epita.fr>
3519
3520 * doc/bison.texinfo: Promote `%long-directive' over
3521 `%long_directive'.
3522 Remove all references to fixed-output-files, yacc is enough.
3523
3524 2001-12-29 Akim Demaille <akim@epita.fr>
3525
3526 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
3527 user prologue. These are defaults.
3528 * tests/actions.at (Mid-rule actions): Make sure the user can
3529 define YYDEBUG and YYERROR_VERBOSE.
3530
3531 2001-12-29 Akim Demaille <akim@epita.fr>
3532
3533 * src/output.c (header_output): Don't forget to export YYLTYPE and
3534 yylloc.
3535 * tests/headers.at (export YYLTYPE): New, make sure it does.
3536 * tests/regression.at (%union and --defines, Invalid CPP headers):
3537 Move to...
3538 * tests/headers.at: here.
3539
3540 2001-12-29 Akim Demaille <akim@epita.fr>
3541
3542 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
3543
3544 2001-12-29 Akim Demaille <akim@epita.fr>
3545
3546 * tests/actions.at (Mid-rule actions): Output on a single line
3547 instead of several.
3548
3549 2001-12-29 Akim Demaille <akim@epita.fr>
3550
3551 * doc/bison.texinfo: Formatting changes.
3552
3553 2001-12-29 Akim Demaille <akim@epita.fr>
3554
3555 Don't store the token defs in a muscle, just be ready to output it
3556 on command. Now possible via `symbols'. Fixes a memory leak.
3557
3558 * src/output.c (token_definitions_output): New.
3559 (output_parser, header_output): Use it.
3560 * src/reader.c (symbols_save): Remove.
3561
3562 2001-12-29 Akim Demaille <akim@epita.fr>
3563
3564 * src/bison.simple: Do not provide a default for YYSTYPE and
3565 YYLTYPE before the user's prologue. Otherwise it's hardly... a
3566 default.
3567
3568 2001-12-29 Akim Demaille <akim@epita.fr>
3569
3570 Mid-rule actions are simply... ignored!
3571
3572 * src/reader.c (readgram): Be sure to attach mid-rule actions to
3573 the empty-rule associated to the dummy symbol, not to the host
3574 rule.
3575 * tests/actions.at (Mid-rule actions): New.
3576
3577 2001-12-29 Akim Demaille <akim@epita.fr>
3578
3579 Memory leak.
3580
3581 * src/reader.c (reader): Free grammar.
3582
3583 2001-12-29 Akim Demaille <akim@epita.fr>
3584
3585 Memory leak.
3586
3587 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
3588 since it allocates it for each state, although only one is needed.
3589 (allocate_storage): Do it here.
3590
3591 2001-12-29 Akim Demaille <akim@epita.fr>
3592
3593 * src/options.h, src/options.c (create_long_option_table): Rename
3594 as...
3595 (long_option_table_new): this, with a clearer prototype.
3596 (percent_table): Remove, unused,
3597 * src/getargs.c (getargs): Adjust.
3598
3599 2001-12-29 Akim Demaille <akim@epita.fr>
3600
3601 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
3602 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
3603 as states.
3604
3605 2001-12-29 Akim Demaille <akim@epita.fr>
3606
3607 * src/lalr.c (build_relations): Rename `states' as `states1'.
3608 Sorry, I don't understand exactly what it is, no better name...
3609
3610 2001-12-29 Akim Demaille <akim@epita.fr>
3611
3612 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
3613 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
3614 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
3615 as rules.
3616
3617 2001-12-29 Akim Demaille <akim@epita.fr>
3618
3619 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
3620 ago.
3621
3622 2001-12-29 Akim Demaille <akim@epita.fr>
3623
3624 * src/reader.c, src/reader.h (user_toknums): Remove.
3625 Adjust all users to use symbols[i]->user_token_number.
3626
3627 2001-12-29 Akim Demaille <akim@epita.fr>
3628
3629 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
3630 Adjust all users to use symbols[i]->prec or ->assoc.
3631
3632 2001-12-29 Akim Demaille <akim@epita.fr>
3633
3634 * src/reader.c, src/reader.h (tags): Remove.
3635 Adjust all users to use symbols[i]->tag.
3636
3637 2001-12-29 Akim Demaille <akim@epita.fr>
3638
3639 * src/gram.h, src/gram.c (symbols): New, similar to state_table
3640 and rule_table.
3641 * src/reader.c (packsymbols): Fill this table.
3642 Drop sprec.
3643 * src/conflicts.c (resolve_sr_conflict): Adjust.
3644 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
3645 single table.
3646 Use symbols[i]->tag instead of tags[i].
3647
3648 2001-12-29 Akim Demaille <akim@epita.fr>
3649
3650 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
3651 In addition, put a comment in there, to replace...
3652 * tests/regression.at (%union and C comments): Remove.
3653
3654 2001-12-29 Akim Demaille <akim@epita.fr>
3655
3656 * tests/regression.at (Web2c Actions): Blindly move the actual
3657 output as expected output. The contents *seem* right to me, but I
3658 can't pretend reading perfectly parser tables... Nonetheless, all
3659 the other tests pass correctly, the table look OK, even though the
3660 presence of `$axiom' is to be noted: AFAICS it is useless (but
3661 harmless).
3662
3663 2001-12-29 Akim Demaille <akim@epita.fr>
3664
3665 * src/reader.c (readgram): Don't add the rule 0 if there were no
3666 rules read. In other words, add it _after_ having performed
3667 grammar sanity checks.
3668 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
3669
3670 2001-12-29 Akim Demaille <akim@epita.fr>
3671
3672 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
3673 visible, and some states have now a different number.
3674
3675 2001-12-29 Akim Demaille <akim@epita.fr>
3676
3677 * src/reader.c (readgram): Bind the initial rule's lineno to that
3678 of the first rule.
3679 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
3680 (Solved SR Conflicts): Adjust rule 0's line number.
3681
3682 2001-12-29 Akim Demaille <akim@epita.fr>
3683
3684 Fix the `GAWK Grammar' failure.
3685
3686 * src/LR0.c (final_state): Initialize to -1 so that we do compute
3687 the reductions of the first state which was mistakenly confused
3688 with the final state because precisely final_state was initialized
3689 to 0.
3690 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
3691 now noticed by Bison.
3692 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
3693 have a reduction on $default.
3694
3695 2001-12-29 Akim Demaille <akim@epita.fr>
3696
3697 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
3698 rule line numbers.
3699 * src/closure.c (print_closure): Likewise.
3700 * src/derives.c (print_derives): Likewise.
3701 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
3702 now.
3703
3704 2001-12-29 Akim Demaille <akim@epita.fr>
3705
3706 * src/lalr.c (lookaheads_print): New.
3707 (lalr): Call it when --trace-flag.
3708 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
3709 are dumped.
3710
3711 2001-12-29 Akim Demaille <akim@epita.fr>
3712
3713 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
3714 when walking through ritem, even via rule->rhs.
3715 * src/reduce.c (dump_grammar, useful_production, reduce_output)
3716 (useful_production, useless_nonterminals): Likewise.
3717 (reduce_grammar_tables): Likewise, plus update nritems.
3718 * src/nullable.c (set_nullable): Likewise.
3719 * src/lalr.c (build_relations): Likewise.
3720 * tests/sets.at (Nullable): Adjust.
3721 Fortunately, now, the $axiom is no longer nullable.
3722
3723 2001-12-29 Akim Demaille <akim@epita.fr>
3724
3725 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
3726 the 0-sentinel.
3727 * src/gram.c (ritem_longest_rhs): Likewise.
3728 * src/reduce.c (nonterminals_reduce): Likewise.
3729 * src/print_graph.c (print_graph): Likewise.
3730 * src/output.c (output_rule_data): Likewise.
3731 * src/nullable.c (set_nullable): Likewise.
3732
3733 2001-12-29 Akim Demaille <akim@epita.fr>
3734
3735 * src/output.c: Comment changes.
3736
3737 2001-12-27 Paul Eggert <eggert@twinsun.com>
3738
3739 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
3740 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
3741 Sparc, as they were causing more porting problems than the
3742 (minor) performance improvement was worth.
3743
3744 Also, catch up with 1.31's YYSTD.
3745
3746 2001-12-27 Akim Demaille <akim@epita.fr>
3747
3748 * src/output.c (output_gram): Rely on nritems, not the
3749 0-sentinel. See below.
3750 Use -1 as separator, not 0.
3751 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
3752 Rely on -1 as separator in yyrhs, instead of 0.
3753 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
3754 twice `Now at end of input', therefore there are two lines less to
3755 expect.
3756
3757 2001-12-27 Akim Demaille <akim@epita.fr>
3758
3759 * tests/regression.at (Unresolved SR Conflicts):
3760 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
3761 below.
3762
3763 2001-12-27 Akim Demaille <akim@epita.fr>
3764
3765 * src/LR0.c (new_state): Recognize the final state by the fact it
3766 is reached by eoftoken.
3767 (insert_start_shifting_state, insert_eof_shifting_state)
3768 (insert_accepting_state, augment_automaton): Remove, since now
3769 these states are automatically computed from the initial state.
3770 (generate_states): Adjust.
3771 * src/print.c: When reporting a rule number to the user, substract
3772 1, so that the axiom rule is rule 0, and the first user rule is 1.
3773 * src/reduce.c: Likewise.
3774 * src/print_graph.c (print_core): For the time being, just as for
3775 the report, depend upon --trace-flags to dump the full set of
3776 items.
3777 * src/reader.c (readgram): Once the grammar read, insert the rule
3778 0: `$axiom: START-SYMBOL $'.
3779 * tests/set.at: Adjust: rule 0 is now displayed, and since the
3780 number of the states has changed (the final state is no longer
3781 necessarily the last), catch up.
3782
3783 2001-12-27 Akim Demaille <akim@epita.fr>
3784
3785 Try to make the use of the eoftoken valid. Given that its value
3786 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
3787 is used instead of > 0 where appropriate, (ii), depend upon nritems
3788 instead of the 0-sentinel.
3789
3790 * src/gram.h, src/gram.c (nritems): New.
3791 Expected to be duplication of nitems, but for the time being...
3792 * src/reader.c (packgram): Assert nritems and nitems are equal.
3793 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
3794 * src/closure.c (print_closure, print_fderives): Likewise.
3795 * src/gram.c (ritem_print): Likewise.
3796 * src/print.c (print_core, print_grammar): Likewise.
3797 * src/print_graph.c: Likewise.
3798
3799 2001-12-27 Akim Demaille <akim@epita.fr>
3800
3801 * src/main.c (main): If there are complains after grammar
3802 reductions, then output the report anyway if requested, then die.
3803 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
3804 * src/reader.c (eoftoken): New.
3805 (parse_token_decl): If the token being defined has value `0', it
3806 is the eoftoken.
3807 (packsymbols): No longer hack `tags' to insert `$' by hand.
3808 Be sure to preserve the value of the eoftoken.
3809 (reader): Make sure eoftoken is defined.
3810 Initialize nsyms to 0: now eoftoken is created just like the others.
3811 * src/print.c (print_grammar): Don't special case the eof token.
3812 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
3813 lie anyway, albeit pleasant.
3814 * tests/calc.at: Exercise error messages with eoftoken.
3815 Change the grammar so that empty input is invalid.
3816 Adjust expectations.
3817 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
3818
3819 2001-12-27 Akim Demaille <akim@epita.fr>
3820
3821 * configure.in: Check the protos of strchr ans strspn.
3822 Replace strchr if needed.
3823 * src/system.h: Provide the protos of strchr, strspn and memchr if
3824 missing.
3825 * lib/strchr.c: New.
3826 * src/reader.c (symbols_save): Use strchr.
3827
3828 2001-12-27 Akim Demaille <akim@epita.fr>
3829
3830 * src/print.c, src/print_graph.c (escape): New.
3831 Use it to quote the TAGS outputs.
3832 * src/print_graph.c (print_state): Now errors are in red, and
3833 reductions in green.
3834 Prefer high to wide: output the state number on a line of its own.
3835
3836 2001-12-27 Akim Demaille <akim@epita.fr>
3837
3838 * src/state.h, src/state.c (reductions_new): New.
3839 * src/LR0.c (set_state_table): Let all the states have a
3840 `reductions', even if reduced to 0.
3841 (save_reductions): Adjust.
3842 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
3843 * src/print.c (print_reductions, print_actions): Adjust.
3844 * src/output.c (action_row): Adjust.
3845
3846 2001-12-27 Akim Demaille <akim@epita.fr>
3847
3848 * src/state.h, src/state.c (errs_new, errs_dup): New.
3849 * src/LR0.c (set_state_table): Let all the states have an errs,
3850 even if reduced to 0.
3851 * src/print.c (print_errs, print_reductions): Adjust.
3852 * src/output.c (output_actions, action_row): Adjust.
3853 * src/conflicts.c (resolve_sr_conflict): Adjust.
3854
3855 2001-12-27 Akim Demaille <akim@epita.fr>
3856
3857 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
3858
3859 2001-12-27 Akim Demaille <akim@epita.fr>
3860
3861 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
3862 * src/print.c: here.
3863 (lookaheadset, shiftset): New, used as additional storage by
3864 print_reductions.
3865 (print_results): Adjust.
3866 (print_shifts, print_gotos, print_errs): New, extracted from...
3867 (print_actions): here.
3868 * src/print_graph.c (print_actions): Remove dead code.
3869
3870 2001-12-27 Akim Demaille <akim@epita.fr>
3871
3872 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
3873 `$n' and `@n'.
3874
3875 2001-12-27 Akim Demaille <akim@epita.fr>
3876
3877 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
3878 (build_relations): Adjust.
3879
3880 2001-12-27 Akim Demaille <akim@epita.fr>
3881
3882 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
3883 duplication.
3884
3885 2001-12-27 Akim Demaille <akim@epita.fr>
3886
3887 * src/reader.c (packgram): Catch nitems overflows.
3888
3889 2001-12-27 Akim Demaille <akim@epita.fr>
3890
3891 * src/files.c, src/files.h (guard_obstack): Remove.
3892 * src/output.c (output): Adjust.
3893 * src/reader.c (parse_braces): New, factoring...
3894 (copy_action, copy_guard): these two which are renamed as...
3895 (parse_action, parse_guard): these.
3896 As a voluntary consequence, using braces around guards is now
3897 mandatory.
3898
3899 2001-12-27 Akim Demaille <akim@epita.fr>
3900
3901 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
3902 * src/reader.c (symbol_list): `guard' and `guard_line' are new
3903 members.
3904 (symbol_list_new): Adjust.
3905 (copy_action): action_line is the first line, not the last.
3906 (copy_guard): Just as for actions, store the `action' only, not
3907 the switch/case/break flesh.
3908 Don't parse the user action that might follow the guard, let...
3909 (readgram): do it, i.e., now, there can be an action after a
3910 guard.
3911 In other words the guard is just explicitly optional.
3912 (packgram): Adjust.
3913 * src/output.c (guards_output): New.
3914 (output_parser): Call it when needed.
3915 (output): Also free the guard and attrs obstacks.
3916 * src/files.c, src/files.h (obstack_save): Remove.
3917 (output_files): Remove.
3918 As a result, if one needs the former `.act' file, using an
3919 appropriate skeleton which requires actions and guards is now
3920 required.
3921 * src/main.c (main): Adjust.
3922 * tests/semantic.at: New.
3923 * tests/regression.at: Use `input.y' as input file name.
3924 Avoid 8+3 problems by requiring input.c when the test needs the
3925 parser.
3926
3927 2001-12-27 Akim Demaille <akim@epita.fr>
3928
3929 * src/reader.c (symbol_list_new): Be sure to initialize all the
3930 fields.
3931
3932 2001-12-27 Akim Demaille <akim@epita.fr>
3933
3934 All the hacks using a final pseudo state are now useless.
3935
3936 * src/LR0.c (set_state_table): state_table holds exactly nstates.
3937 * src/lalr.c (nLA): New.
3938 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
3939 instead of lookaheadsp from the pseudo state (nstate + 1).
3940
3941 2001-12-27 Akim Demaille <akim@epita.fr>
3942
3943 * src/output.c (action_row, token_actions): Use a state_t instead
3944 of a integer, and nlookaheads instead of the following state's
3945 lookaheadsp.
3946
3947 2001-12-27 Akim Demaille <akim@epita.fr>
3948
3949 * src/conflicts.c (log_resolution, flush_shift)
3950 (resolve_sr_conflict, set_conflicts, solve_conflicts)
3951 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
3952 (conflicts_print, print_reductions): Use a state_t instead of an
3953 integer when referring to a state.
3954 As much as possible, depend upon nlookaheads, instead of the
3955 `lookaheadsp' member of the following state (since lookaheads of
3956 successive states are successive, the difference between state n + 1
3957 and n served as the number of lookaheads for state n).
3958 * src/lalr.c (add_lookback_edge): Likewise.
3959 * src/print.c (print_core, print_actions, print_state)
3960 (print_results): Likewise.
3961 * src/print_graph.c (print_core, print_actions, print_state)
3962 (print_graph): Likewise.
3963 * src/conflicts.h: Adjust.
3964
3965 2001-12-27 Akim Demaille <akim@epita.fr>
3966
3967 * src/bison.hairy: Formatting/comment changes.
3968 ANSIfy.
3969 Remove `register' indications.
3970 Add plenty of `static'.
3971
3972 2001-12-27 Akim Demaille <akim@epita.fr>
3973
3974 * src/output.c (prepare): Drop the muscle `ntbase' which
3975 duplicates ntokens.
3976 * src/bison.simple: Formatting/comment changes.
3977 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
3978 is an undocumented synonym.
3979
3980 2001-12-22 Akim Demaille <akim@epita.fr>
3981
3982 * src/output.c (output_table_data): Change the prototype to use
3983 `int' for array ranges: some invocations do pass an int, not a
3984 short.
3985 Reported by Wayne Green.
3986
3987 2001-12-22 Akim Demaille <akim@epita.fr>
3988
3989 Some actions of web2c.y are improperly triggered.
3990 Reported by Mike Castle.
3991
3992 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
3993 * tests/regression.at (Web2c): Rename as...
3994 (Web2c Report): this.
3995 (Web2c Actions): New.
3996
3997 2001-12-22 Akim Demaille <akim@epita.fr>
3998
3999 Reductions in web2c.y are improperly reported.
4000 Reported by Mike Castle.
4001
4002 * src/conflicts.c (print_reductions): Fix.
4003 * tests/regression.at (Web2c): New.
4004
4005 2001-12-18 Akim Demaille <akim@epita.fr>
4006
4007 Some host fail on `assert (!"foo")', which expands to
4008 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
4009 Reported by Nelson Beebee.
4010
4011 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
4012 `#define it_succeeded 0' and `assert (it_succeeded)'.
4013
4014 2001-12-17 Marc Autret <autret_m@epita.fr>
4015
4016 * src/bison.simple: Don't hard code the skeleton line and filename.
4017 * src/output.c (output_parser): Rename 'line' as 'output_line'.
4018 New line counter 'skeleton_line' (skeleton-line muscle).
4019
4020 2001-12-17 Paul Eggert <eggert@twinsun.com>
4021
4022 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
4023 YYDEBUG must be defined to a nonzero value.
4024
4025 * src/bison.simple (yytname): Do not assume that the user defines
4026 YYDEBUG to a properly parenthesized expression.
4027
4028 2001-12-17 Akim Demaille <akim@epita.fr>
4029
4030 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
4031 nlookaheads is a new member.
4032 Adjust all users.
4033 * src/lalr.h (nlookaheads): Remove this orphan declaration.
4034 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
4035 state.
4036
4037 2001-12-17 Akim Demaille <akim@epita.fr>
4038
4039 * src/files.h, src/files.c (open_files, close_files): Remove.
4040 * src/main.c (main): Don't open/close files, nor invoke lex_free,
4041 let...
4042 * src/reader.c (reader): Do it.
4043
4044 2001-12-17 Akim Demaille <akim@epita.fr>
4045
4046 * src/conflicts.c (print_reductions): Formatting changes.
4047
4048 2001-12-17 Akim Demaille <akim@epita.fr>
4049
4050 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
4051 (flush_reduce): New.
4052 (resolve_sr_conflict): Adjust.
4053
4054 2001-12-17 Akim Demaille <akim@epita.fr>
4055
4056 * src/output.c (output_obstack): Be static and rename as...
4057 (format_obstack): this, to avoid any confusion with files.c's
4058 output_obstack.
4059 * src/reader.h (muscle_obstack): Move to...
4060 * src/output.h: here, since it's defined in output.c.
4061
4062 2001-12-17 Akim Demaille <akim@epita.fr>
4063
4064 * src/output.c (action_row, save_column, default_goto)
4065 (sort_actions, matching_state, pack_vector): Better variable
4066 locality.
4067
4068 2001-12-17 Akim Demaille <akim@epita.fr>
4069
4070 * src/output.c: Various formatting changes.
4071
4072 2001-12-17 Akim Demaille <akim@epita.fr>
4073
4074 * src/files.c (output_files): Free the output_obstack.
4075 * src/main.c (main): Call print and print_graph conditionally.
4076 * src/print.c (print): Work unconditionally.
4077 * src/print_graph.c (print_graph): Work unconditionally.
4078 * src/conflicts.c (log_resolution): Output only if verbose_flag.
4079
4080 2001-12-16 Marc Autret <autret_m@epita.fr>
4081
4082 * src/output.c (actions_output): Fix. When we use %no-lines,
4083 there is one less line per action.
4084
4085 2001-12-16 Marc Autret <autret_m@epita.fr>
4086
4087 * src/bison.simple: Remove a useless #line directive.
4088 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
4089 * src/output.c (get_lines_number): New.
4090 (output_parser): Adjust, now takes care about the lines of a
4091 output muscles.
4092 Fix line numbering.
4093 (actions_output): Computes the number of lines taken by actions.
4094 (output_master_parser): Insert new skeleton which is the name of
4095 the output parser file name.
4096
4097 2001-12-15 Marc Autret <autret_m@epita.fr>
4098
4099 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
4100
4101 2001-12-15 Marc Autret <autret_m@epita.fr>
4102
4103 * src/output.c (output_gram): Keep track of the hairy one.
4104
4105 2001-12-15 Akim Demaille <akim@epita.fr>
4106
4107 Make `make distcheck' work.
4108
4109 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
4110 system.h which uses libgettext.h.
4111
4112 2001-12-15 Akim Demaille <akim@epita.fr>
4113
4114 * src/nullable.c (set_nullable): Useless rules must be skipped,
4115 otherwise, since we range over their symbols, we might look at a
4116 nonterminal which no longer ``exists'', i.e., it is not counted in
4117 `nvars', hence we overflow our arrays.
4118
4119 2001-12-15 Akim Demaille <akim@epita.fr>
4120
4121 The header can also be produced directly, without any obstack!
4122 Yahoo!
4123
4124 * src/files.c, src/files.h (defines_obstack): Remove.
4125 (compute_header_macro): Global.
4126 (defines_obstack_save): Remove.
4127 * src/reader.c (parse_union_decl): No longer output to
4128 defines_obstack: its content can be found in the `stype' muscle
4129 anyway.
4130 (output_token_translations): Merge into...
4131 (symbols_output): this.
4132 Rename as...
4133 (symbols_save): this.
4134 (reader): Adjust.
4135 * src/output.c (header_output): New.
4136 (output): Call it.
4137
4138 2001-12-15 Akim Demaille <akim@epita.fr>
4139
4140 * src/reader.c (parse_union_decl): Instead of handling two obstack
4141 simultaneously, use one to define the `stype' muscle, and use the
4142 value of the latter to fill defines_obstack.
4143 (copy_comment): Remove.
4144 (copy_comment2): Work for a single obstack.
4145 Rename as...
4146 (copy_comment): this.
4147
4148 2001-12-15 Akim Demaille <akim@epita.fr>
4149
4150 * src/lex.c, src/lex.h (xgetc): No longer static.
4151 * src/reader.c (parse_union_decl): Revamp.
4152
4153 2001-12-15 Akim Demaille <akim@epita.fr>
4154
4155 Still making progress in separating Bison into (i) input, (ii)
4156 process, (iii) output: now we can directly output the parser file
4157 without using table_obstack at all.
4158
4159 * src/files.c, src/files.h (table_obstack): Bye bye.
4160 (parser_file_name): New.
4161 * src/files.c (compute_output_file_names): Compute it.
4162 * src/output.c (actions_output, output_parser)
4163 (output_master_parser): To a file instead of an obstack.
4164
4165 2001-12-15 Akim Demaille <akim@epita.fr>
4166
4167 Attach actions to rules, instead of pre-outputting them to
4168 actions_obstack.
4169
4170 * src/gram.h (rule_t): action and action_line are new members.
4171 * src/reader.c (symbol_list): Likewise.
4172 (copy_action): Save the actions within the rule.
4173 (packgram): Save them in rule_table.
4174 * src/output.c (actions_output): New.
4175 (output_parser): Use it on `%%actions'.
4176 (output_rule_data): Don't free rule_table.
4177 (output): Do it.
4178 (prepare): Don't save the `action' muscle.
4179 * src/bison.simple: s/%%action/%%actions/.
4180
4181 2001-12-15 Akim Demaille <akim@epita.fr>
4182
4183 * src/reader.c (copy_action): When --yacc, don't append a `;'
4184 to the user action: let it fail if lacking.
4185 Suggested by Arnold Robbins and Tom Tromey.
4186
4187 2001-12-14 Akim Demaille <akim@epita.fr>
4188
4189 * src/lex.c (literalchar): Simply return the char you decoded, non
4190 longer mess around with obstacks and int pointers.
4191 Adjust all callers.
4192
4193 2001-12-14 Akim Demaille <akim@epita.fr>
4194
4195 * src/lex.c (literalchar): Don't escape the special characters,
4196 just decode them, and keep them as char (before, eol was output as
4197 the 2 char string `\n' etc.).
4198 * src/output.c (output_rule_data): Use quotearg to output the
4199 token strings.
4200
4201 2001-12-13 Paul Eggert <eggert@twinsun.com>
4202
4203 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
4204 Do not infringe on the global user namespace when using C++.
4205 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
4206 All uses of `fprintf' and `stderr' changed.
4207
4208 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
4209
4210 2001-12-13 Akim Demaille <akim@epita.fr>
4211
4212 The computation of nullable is broken: it doesn't handle empty
4213 RHS's properly.
4214
4215 * tests/torture.at (GNU AWK Grammar): New.
4216 * tests/sets.at (Nullable): New.
4217 * src/nullable.c (set_nullable): Instead of blindly looping over
4218 `ritems', loop over the rules, and then over their rhs's.
4219
4220 Work around Autotest bugs.
4221
4222 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
4223 frame, because Autotest understand lines starting with a `+' as
4224 traces from the shell. Then, they are not processed properly.
4225 Admittedly an Autotest bug, but we don't have time to wait for
4226 Autotest to catch up.
4227 * tests/regression.at (Broken Closure): Adjust to the new table
4228 frames.
4229 Move to...
4230 * tests/sets.at: here.
4231
4232 2001-12-13 Akim Demaille <akim@epita.fr>
4233
4234 * src/closure.c (closure): Use nrules instead of playing tricks
4235 with BITS_PER_WORD.
4236
4237 2001-12-13 Akim Demaille <akim@epita.fr>
4238
4239 * src/print.c (print_actions): Output the handling of `$' as the
4240 traces do: shifting the token EOF. Before EOF was treated as a
4241 nonterminal.
4242 * tests/regression.at: Adjust some tests.
4243 * src/print_graph.c (print_core): Complete the set of items via
4244 closure. The next-to-final and final states are still unsatisfying,
4245 but that's to be addressed elsewhere.
4246 No longer output the rule numbers, but do output the state number.
4247 A single loop for the shifts + gotos is enough, but picked a
4248 distinct color for each.
4249 (print_graph): Initialize and finalize closure.
4250
4251 2001-12-13 Akim Demaille <akim@epita.fr>
4252
4253 * src/reader.c (readgram): Remove dead code, an strip useless
4254 braces.
4255 (get_type): Remove, unused.
4256
4257 2001-12-12 Akim Demaille <akim@epita.fr>
4258
4259 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
4260 on that of lib/error.c.
4261
4262 2001-12-12 Akim Demaille <akim@epita.fr>
4263
4264 Some hosts don't like `/' in includes.
4265
4266 * src/system.h: Include libgettext.h without qualifying the path.
4267 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
4268 $(top_srcdir).
4269
4270 2001-12-11 Marc Autret <autret_m@epita.fr>
4271
4272 * src/output.c (output_parser): Remove useless muscle.
4273
4274 2001-12-11 Marc Autret <autret_m@epita.fr>
4275
4276 * src/bison.simple: Remove #line just before %%epilogue. It
4277 is now handled in ...
4278 * src/reader.c (read_additionnal_code): Add the output of a
4279 #line for the epilogue.
4280
4281 2001-12-10 Marc Autret <autret_m@epita.fr>
4282
4283 * src/reader.c (copy_definition): Re-use CPP-outed code which
4284 replace precedent remove.
4285 * src/bison.simple: Remove #line before %%prologue because
4286 %%input-line is wrong at this time.
4287
4288 2001-12-10 Marc Autret <autret_m@epita.fr>
4289
4290 * src/reader.c (symbols_output): Clean up.
4291 * src/output.c (output_gram, output): Clean up.
4292
4293 2001-12-10 Akim Demaille <akim@epita.fr>
4294
4295 * src/lalr.c (initialize_lookaheads): New. Extracted from...
4296 * src/LR0.c (set_state_table): here.
4297 * src/lalr.c (lalr): Call it.
4298
4299 2001-12-10 Akim Demaille <akim@epita.fr>
4300
4301 * src/state.h (shifts): Remove the `number' member: shifts are
4302 attached to state, hence no longer need to be labelled with a
4303 state number.
4304
4305 2001-12-10 Akim Demaille <akim@epita.fr>
4306
4307 Now that states have a complete set of members, the linked list of
4308 shifts is useless: just fill directly the state's shifts member.
4309
4310 * src/state.h (shifts): Remove the `next' member.
4311 * src/LR0.c (first_state, last_state): Remove.
4312 Adjust the callers.
4313 (augment_automaton): Don't look for the shifts that must be added
4314 a shift on EOF: it is those of the state we looked for! But now,
4315 since shifts are attached, it is no longer needed to looking
4316 merely by its id: its number.
4317
4318 2001-12-10 Akim Demaille <akim@epita.fr>
4319
4320 * src/LR0.c (augment_automaton): Better variable locality.
4321 Remove an impossible branch: if there is a state corresponding to
4322 the start symbol being shifted, then there is shift for the start
4323 symbol from the initial state.
4324
4325 2001-12-10 Akim Demaille <akim@epita.fr>
4326
4327 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
4328 only when appropriate: when insert_start_shifting_state' is not
4329 invoked.
4330 * tests/regression.at (Rule Line Numbers): Adjust.
4331
4332 2001-12-10 Akim Demaille <akim@epita.fr>
4333
4334 * src/LR0.c (augment_automaton): Now that all states have shifts,
4335 merge the two cases addition shifts to the initial state.
4336
4337 2001-12-10 Akim Demaille <akim@epita.fr>
4338
4339 * src/lalr.c (set_state_table): Move to...
4340 * src/LR0.c: here.
4341 * src/lalr.c (lalr): Don't call it...
4342 * src/LR0.c (generate_states): do it.
4343 * src/LR0.h (first_state): Remove, only the table is used.
4344
4345 2001-12-10 Akim Demaille <akim@epita.fr>
4346
4347 * src/LR0.h (first_shift, first_reduction): Remove.
4348 * src/lalr.c: Don't use first_shift: find shifts through the
4349 states.
4350
4351 2001-12-10 Akim Demaille <akim@epita.fr>
4352
4353 * src/LR0.c: Attach shifts to states as soon as they are
4354 computed.
4355 * src/lalr.c (set_state_table): Instead of assigning shifts to
4356 state, just assert that the mapping was properly done.
4357
4358 2001-12-10 Akim Demaille <akim@epita.fr>
4359
4360 * src/LR0.c (insert_start_shift): Rename as...
4361 (insert_start_shifting_state): this.
4362 (insert_eof_shifting_state, insert_accepting_state): New.
4363 (augment_automaton): Adjust.
4364 Better locality of the variables.
4365 When looking if the start_symbol is shifted from the initial
4366 state, using `while (... symbol != start_symbol ...)' sounds
4367 better than `while (... symbol < start_symbol ...)': If fail
4368 to see how the order between symbols could be relevant!
4369
4370 2001-12-10 Akim Demaille <akim@epita.fr>
4371
4372 * src/getargs.h: Don't declare `spec_name_prefix' and
4373 `spec_file_prefix', declared by src/files.h.
4374 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
4375 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
4376 * src/output.c (prepare): Adjust.
4377 * src/reader.c (symbols_output): Likewise.
4378 * src/vmsgetargs.c: Vaguely adjust, but who cares?
4379
4380 2001-12-10 Akim Demaille <akim@epita.fr>
4381
4382 * src/muscle_tab.c (muscle_init): NULL is a better default than
4383 `"0"'.
4384
4385 2001-12-10 Akim Demaille <akim@epita.fr>
4386
4387 * src/reader.c (reader): Calling symbols_output once is enough.
4388
4389 2001-12-10 Akim Demaille <akim@epita.fr>
4390
4391 Now that states have a complete set of members, the linked list of
4392 reductions is useless: just fill directly the state's reductions
4393 member.
4394
4395 * src/state.h (struct reductions): Remove member `number' and
4396 `next'.
4397 * src/LR0.c (first_reduction, last_reduction): Remove.
4398 (save_reductions): Don't link the new reductions, store them in
4399 this_state.
4400 * src/lalr.c (set_state_table): No need to attach reductions to
4401 states, it's already done.
4402 * src/output.c (output_actions): No longer free the shifts, then
4403 the reductions, then the states: free all the states and their
4404 members.
4405
4406 2001-12-10 Akim Demaille <akim@epita.fr>
4407
4408 * src/options.c (OPTN, DRTV, BOTH): New.
4409 (option_table): Use them.
4410
4411 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
4412 the job of system.h.
4413 * src/options.c: Don't include stdio.h and xalloc.h for the same
4414 reasons.
4415
4416 2001-12-10 Akim Demaille <akim@epita.fr>
4417
4418 * src/output.c (output, prepare): Make sure the values of the
4419 muscles `action' and `prologue' are 0-terminated.
4420
4421 2001-12-10 Akim Demaille <akim@epita.fr>
4422
4423 Clean up GCC warnings.
4424
4425 * src/reader.c (copy_action): `buf' is not used.
4426 (parse_skel_decl): Be static.
4427 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
4428 * src/options.h (create_long_option_table): Have a real prototype.
4429 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
4430 (hash_delete_at): Return const void *.
4431 Adjust casts to preserve the const.
4432
4433 2001-12-10 Akim Demaille <akim@epita.fr>
4434
4435 * configure.in: Require 2.52g.
4436 M4 is not needed, but AUTOM4TE is.
4437 * m4/m4.m4: Remove.
4438 * tests/Makefile.am: Adjust.
4439
4440 2001-12-10 Akim Demaille <akim@epita.fr>
4441
4442 One structure for states is enough, even though theoretically
4443 there are LR(0) states and LALR(1) states.
4444
4445 * src/lalr.h (state_t): Remove.
4446 (state_table): Be state_t **, not state_t *.
4447 * src/state.h (core, CORE_ALLOC): Rename as...
4448 (state_t, STATE_ALLOC): this.
4449 Add the LALR(1) members: shifts, reductions, errs.
4450 * src/LR0.c (state_table): Rename as...
4451 (state_hash): this, to avoid name clashes with the global
4452 `state_table'.
4453 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
4454 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
4455
4456 2001-12-10 Akim Demaille <akim@epita.fr>
4457
4458 Bison dumps core on bash.y.
4459 Reported by Pascal Bart.
4460
4461 * src/warshall.c (bitmatrix_print): New.
4462 (TC): Use it.
4463 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
4464 j must be the outer loop.
4465 * tests/regression.at (Broken Closure): New.
4466
4467 2001-12-05 Akim Demaille <akim@epita.fr>
4468
4469 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
4470 its argument.
4471 Reported by Peter Hámorský.
4472
4473 2001-12-05 Akim Demaille <akim@epita.fr>
4474
4475 * src/conflicts.c (err_table): Remove.
4476 (resolve_sr_conflict): Adjust.
4477 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
4478 Rename as...
4479 (state_t.reductions, state_t.shifts): this.
4480
4481 2001-12-05 Akim Demaille <akim@epita.fr>
4482
4483 * src/reduce.c (reduce_grammar_tables): No longer disable the
4484 removal of useless rules via CPP but via `if (0)', so that the
4485 compiler still check the code is valid.
4486 For instance, it should have noticed `rline' no longer exists: use
4487 the `line' member of rule_t.
4488 * src/gram.c (dummy, rline): Remove, unused.
4489
4490 2001-12-05 Akim Demaille <akim@epita.fr>
4491
4492 * src/output.c (pack_vector): Use assert, not berror.
4493 * src/main.c (berror): Remove, unused.
4494
4495 2001-12-05 Akim Demaille <akim@epita.fr>
4496
4497 New experimental feature: if --verbose --trace output all the
4498 items of a state, not only its kernel.
4499
4500 * src/print.c (print_core): If `trace_flag', then invoke closure
4501 before outputting the items of the state (print_core is no longer
4502 a correct name them).
4503 (print_results): Invoke new_closure/free_closure if needed.
4504
4505 2001-12-05 Akim Demaille <akim@epita.fr>
4506
4507 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
4508 * src/closure.c, src/closure.h (itemsetsize): Rename as...
4509 (nitemset): for consistency with the rest of the project.
4510
4511 2001-12-05 Akim Demaille <akim@epita.fr>
4512
4513 * src/closure.c (print_closure): Improve.
4514 (closure): Use it for printing input and output.
4515
4516 2001-12-05 Akim Demaille <akim@epita.fr>
4517
4518 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
4519 indexed by nonterminals.
4520
4521 2001-12-05 Akim Demaille <akim@epita.fr>
4522
4523 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
4524 what it was!).
4525 * src/warshall.h: Remove accidental duplication of the content.
4526
4527 2001-12-05 Akim Demaille <akim@epita.fr>
4528
4529 * src/closure.c (set_fderives): De-obfuscate.
4530
4531 2001-12-05 Akim Demaille <akim@epita.fr>
4532
4533 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
4534
4535 2001-12-05 Akim Demaille <akim@epita.fr>
4536
4537 * src/closure.c (set_firsts): De-obfuscate.
4538
4539 2001-12-05 Akim Demaille <akim@epita.fr>
4540
4541 * src/output.c (action_row): De-obfuscate
4542 using the good o' techniques: arrays not pointers, variable
4543 locality, BITISSET, RESETBIT etc.
4544
4545 2001-12-05 Akim Demaille <akim@epita.fr>
4546
4547 Pessimize the code to simplify it: from now on, all the states
4548 have a valid SHIFTS, which NSHIFTS is possibly 0.
4549
4550 * src/LR0.c (shifts_new): Be global and move to..
4551 * src/state.c, src/state.h: here.
4552 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
4553 * src/print_graph: Adjust.
4554
4555 2001-12-05 Akim Demaille <akim@epita.fr>
4556
4557 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
4558 * src/conflicts.c: Use it.
4559 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
4560 incorrectly ``simplified''.
4561
4562 2001-12-05 Akim Demaille <akim@epita.fr>
4563
4564 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
4565 using the good o' techniques: arrays not pointers, variable
4566 locality, BITISSET, RESETBIT etc.
4567
4568 2001-12-05 Akim Demaille <akim@epita.fr>
4569
4570 * src/state.h (SHIFT_SYMBOL): New.
4571 * src/conflicts.c: Use it to deobfuscate.
4572
4573 2001-12-05 Akim Demaille <akim@epita.fr>
4574
4575 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
4576 (print_reductions): De-obfuscate using the good o' techniques:
4577 arrays not pointers, variable locality, BITISSET.
4578
4579 2001-12-05 Akim Demaille <akim@epita.fr>
4580
4581 * src/conflicts.c (print_reductions): Arrays, not pointers.
4582 Use BITISSET.
4583
4584 2001-12-05 Akim Demaille <akim@epita.fr>
4585
4586 * src/conflicts.c (print_reductions): Pessimize, but clarify.
4587
4588 2001-12-05 Akim Demaille <akim@epita.fr>
4589
4590 * src/conflicts.c (print_reductions): Improve variable locality.
4591
4592 2001-12-05 Akim Demaille <akim@epita.fr>
4593
4594 * src/conflicts.c (print_reductions): Pessimize, but clarify.
4595
4596 2001-12-05 Akim Demaille <akim@epita.fr>
4597
4598 * src/conflicts.c (print_reductions): Improve variable locality.
4599
4600 2001-12-05 Akim Demaille <akim@epita.fr>
4601
4602 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
4603 * src/lalr.c: Use them.
4604
4605 2001-12-05 Akim Demaille <akim@epita.fr>
4606
4607 * src/LR0.c (augment_automaton): Formatting changes.
4608 Better variable locality.
4609
4610 2001-12-05 Akim Demaille <akim@epita.fr>
4611
4612 * src/lalr.c (matrix_print): New.
4613 (transpose): Use it.
4614 Use arrays instead of pointers.
4615
4616 2001-12-05 Akim Demaille <akim@epita.fr>
4617
4618 * src/lalr.c (maxrhs): Move to...
4619 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
4620 * src/lalr.c (build_relations): Adjust.
4621
4622 2001-12-05 Akim Demaille <akim@epita.fr>
4623
4624 * src/lalr.c (transpose): Free the memory allocated to the
4625 argument, as it is replaced by the results by the unique caller.
4626 (build_relations): Merely invoke transpose: it handles the memory
4627 deallocation.
4628 Improve variable locality.
4629 Avoid variables used as mere abbreviations.
4630 (compute_lookaheads): Use arrays instead of pointers.
4631
4632 2001-12-05 Akim Demaille <akim@epita.fr>
4633
4634 * src/lalr.c (initialize_F): Improve variable locality.
4635 Avoid variables used as mere abbreviations.
4636
4637 2001-12-05 Akim Demaille <akim@epita.fr>
4638
4639 * src/derives.c (print_derives): Display the ruleno.
4640 * src/lalr.c (initialize_F, transpose): Better variable locality
4641 to improve readability.
4642 Avoid variables used as mere abbreviations.
4643
4644 2001-12-05 Akim Demaille <akim@epita.fr>
4645
4646 * src/lalr.c (traverse): Use arrays instead of pointers.
4647
4648 2001-12-05 Akim Demaille <akim@epita.fr>
4649
4650 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
4651 the handling of squeue.
4652 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
4653
4654 2001-12-05 Akim Demaille <akim@epita.fr>
4655
4656 Because useless nonterminals are now kept alive (instead of being
4657 `destroyed'), we now sometimes examine them, and store information
4658 related to them. Hence we need to know their number, and adjust
4659 memory allocations.
4660
4661 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
4662 static.
4663 * src/LR0.c (allocate_itemsets): The memory allocated to
4664 `symbol_count' was used for two different purpose: once to count
4665 the number of occurrences of each symbol, and later reassigned to
4666 `shift_symbol', containing the symbol that can be shifted from a
4667 given state.
4668 Deobfuscate, i.e., allocate, use and free `symbol_count' here
4669 only, and...
4670 (new_itemsets): Allocate `shift_symbol' here.
4671 (allocate_itemsets): symbol_count includes useless nonterminals.
4672 Make room for them.
4673 (free_storage): Use `free', not `XFREE', for pointers that cannot
4674 be null.
4675
4676 2001-12-05 Akim Demaille <akim@epita.fr>
4677
4678 * src/nullable.c (set_nullable): Deobfuscate the handling of
4679 ritem.
4680 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
4681
4682 2001-12-05 Akim Demaille <akim@epita.fr>
4683
4684 * src/gram.c, src/gram.h (ritem_print): New.
4685 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
4686 (This useless function was defined only to work around VMS linkers
4687 that can't handle compilation units with variables only).
4688 * src/reduce.c (dump_grammar): Use it to trace the construction of
4689 ritem.
4690
4691 2001-12-04 Paul Eggert <eggert@twinsun.com>
4692
4693 * src/bison.simple (union yyalloc): Change member names
4694 to be the same as the stack names.
4695 (yyparse): yyptr is now union yyalloc *, not char *.
4696 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
4697 and may generate better code on some machines.
4698 (yystpcpy): Use prototype if __STDC__ is defined, not just
4699 if __cplusplus is defined.
4700
4701 2001-11-30 Akim Demaille <akim@epita.fr>
4702
4703 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
4704 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
4705 Gettext doesn't compile cleanly, and dies with -Werror.
4706 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
4707 Include WARNING_CFLAGS here.
4708 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
4709 before being defined.
4710
4711 2001-11-27 Paul Eggert <eggert@twinsun.com>
4712
4713 * lib/quotearg.h (quotearg_n, quotearg_n_style):
4714 First arg is int, not unsigned.
4715 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
4716 (SIZE_MAX, UINT_MAX): New macros.
4717 (quotearg_n_options): Abort if N is negative.
4718 Avoid overflow check on hosts where size_t is 64 bits and int
4719 is 32 bits, as overflow is impossible there.
4720 Fix off-by-one typo that caused unnecessary reallocation.
4721
4722 2001-11-29 Paul Eggert <eggert@twinsun.com>
4723
4724 Name space cleanup in generated parser.
4725
4726 * doc/bison.texinfo (Bison Parser): Discuss system headers
4727 and their effect on the user name space.
4728
4729 * src/bison.simple:
4730 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
4731 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
4732 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
4733
4734 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
4735 on user names when possible.
4736
4737 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
4738 Simplify test for whather <alloca.h> exists.
4739
4740 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
4741
4742 (<stdio.h>): Include if YYDEBUG.
4743
4744 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
4745 ! defined (yyoverflow) && ! defined (yymemcpy).
4746
4747 (yymemcpy, yyparse): Rename local variables as needed so that
4748 they all begin with 'yy'.
4749
4750 (yystrlen, yystpcpy): New functions.
4751
4752 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
4753 All uses changed.
4754
4755 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
4756 instead of relying on string.h functions. Use YYSTACK_ALLOC
4757 and YYSTACK_FREE instead of malloc and free.
4758
4759 2001-11-30 Akim Demaille <akim@epita.fr>
4760
4761 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
4762 before their first uses.
4763 (YYBISON, YYPURE): Move to the top of the output.
4764
4765 2001-11-30 Akim Demaille <akim@epita.fr>
4766
4767 * tests/reduce.at (Useless Nonterminals): Fix.
4768
4769 2001-11-30 Akim Demaille <akim@epita.fr>
4770
4771 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
4772 if body instead of `;' to pacify GCC's warnings.
4773
4774 2001-11-30 Akim Demaille <akim@epita.fr>
4775
4776 Instead of mapping the LHS of unused rules to -1, keep the LHS
4777 valid, but flag the rules as invalid.
4778
4779 * src/gram.h (rule_t): `useful' is a new member.
4780 * src/print.c (print_grammar): Adjust.
4781 * src/derives.c (set_derives): Likewise.
4782 * src/reader.c (packgram, reduce_output): Likewise.
4783 * src/reduce.c (reduce_grammar_tables): Likewise.
4784 * tests/reduce.at (Underivable Rules, Useless Rules): New.
4785
4786 2001-11-30 Akim Demaille <akim@epita.fr>
4787
4788 * src/reduce.c (reduce_output): Formatting changes.
4789 * src/print.c (print_results, print_grammar): Likewise.
4790 * tests/regression.at (Rule Line Numbers)
4791 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
4792
4793 2001-11-30 Akim Demaille <akim@epita.fr>
4794
4795 * src/reduce.c (nonterminals_reduce): Instead of throwing away
4796 useless nonterminals, move them at the end of the symbol arrays.
4797 (reduce_output): Adjust.
4798 * tests/reduce.at (Useless Nonterminals): Adjust.
4799
4800 2001-11-30 Akim Demaille <akim@epita.fr>
4801
4802 * src/reduce.c: Various comment/formatting changes.
4803 (nonterminals_reduce): New, extracted from...
4804 (reduce_grammar_tables): here.
4805 (reduce_grammar): Call nonterminals_reduce.
4806
4807 2001-11-29 Paul Eggert <eggert@twinsun.com>
4808
4809 * src/bison.simple (YYSTACK_REALLOC): Remove.
4810 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
4811 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
4812 New macros.
4813 (union yyalloc): New type.
4814 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
4815 an arbitrary restriction on hosts where size_t is wider than int.
4816
4817 (yyparse): Don't dump core if alloca or malloc fails; instead, report
4818 a parser stack overflow. Allocate just one block of memory for all
4819 three stacks, instead of allocating three blocks; this typically is
4820 faster and reduces fragmentation.
4821
4822 Do not limit the number of items in the stack to a value that fits
4823 in 'int', as this is an arbitrary limit on hosts with 64-bit
4824 size_t and 32-bit int.
4825
4826 2001-11-29 Marc Autret <autret_m@epita.fr>
4827
4828 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
4829 of defining YYERROR_VERBOSE.
4830 [AT_DATA]: $4 is now out of C declarations in the prologue.
4831
4832 2001-11-28 Marc Autret <autret_m@epita.fr>
4833
4834 * src/reader.c (parse_dquoted_param): New.
4835 (parse_skel_decl): Use it.
4836 * src/lex.h: Add its prototype.
4837 * src/lex.c (literalchar): Become not static.
4838
4839 2001-11-28 Marc Autret <autret_m@epita.fr>
4840
4841 * src/output.h: And put its extern declaration here.
4842 * src/output.c (error_verbose): Define here.
4843 (prepare): Echo name modification.
4844 * src/getargs.h: Clean its extern declaration.
4845 * src/getargs.c (error_verbose_flag): Remove.
4846 (getargs): Remove case 'e'.
4847 * src/options.c (option_table): 'error-verbose' is now seen as simple
4848 percent option.
4849 Include output.h.
4850
4851 * src/reader.c (read_declarations): Remove case tok_include.
4852 (parse_include_decl): Remove.
4853 * src/lex.h (token_t): Remove tok_include.
4854 * src/options.c (option_table): 'include' is now a simple command line
4855 option.
4856
4857 2001-11-28 Marc Autret <autret_m@epita.fr>
4858
4859 * src/bison.simple: Adjust muscle names.
4860 * src/muscle_tab.c (muscle_init): Also rename the muscles.
4861 * src/output.c (prepare): s/_/-/ for the muscles names.
4862 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
4863
4864 2001-11-28 Marc Autret <autret_m@epita.fr>
4865
4866 * src/bison.simple: Fix debug.
4867 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
4868
4869 2001-11-28 Akim Demaille <akim@epita.fr>
4870
4871 * src/LR0.c (shifts_new): New.
4872 (save_shifts, insert_start_shift, augment_automaton): Use it.
4873
4874 2001-11-28 Akim Demaille <akim@epita.fr>
4875
4876 * src/closure.c (closure): `b' and `ruleno' denote the same value:
4877 keep ruleno only.
4878
4879 2001-11-28 Akim Demaille <akim@epita.fr>
4880
4881 * src/closure.c (closure): Instead of looping over word in array
4882 then bits in words, loop over bits in array.
4883
4884 2001-11-28 Akim Demaille <akim@epita.fr>
4885
4886 * src/closure.c (closure): No longer optimize the special case
4887 where all the bits of `ruleset[r]' are set to 0, to make the code
4888 clearer.
4889
4890 2001-11-28 Akim Demaille <akim@epita.fr>
4891
4892 * src/closure.c (closure): `r' and `c' are new variables, used to
4893 de-obfuscate accesses to RULESET and CORE.
4894
4895 2001-11-28 Akim Demaille <akim@epita.fr>
4896
4897 * src/reduce.c (reduce_print): Use ngettext.
4898 (dump_grammar): Improve the trace accuracy.
4899
4900 2001-11-28 Akim Demaille <akim@epita.fr>
4901
4902 * src/reduce.c (dump_grammar): Don't translate trace messages.
4903
4904 2001-11-28 Akim Demaille <akim@epita.fr>
4905
4906 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
4907 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
4908 as all tags are free'ed afterwards.
4909 From Enrico Scholz.
4910
4911 2001-11-27 Paul Eggert <eggert@twinsun.com>
4912
4913 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
4914 use alloca when we didn't want to, and vice versa.
4915
4916 2001-11-27 Marc Autret <autret_m@epita.fr>
4917
4918 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
4919 initialization.
4920 * src/output.c (prepare): Remove its update.
4921
4922 2001-11-27 Marc Autret <autret_m@epita.fr>
4923
4924 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
4925 Use %error-verbose.
4926
4927 2001-11-27 Marc Autret <autret_m@epita.fr>
4928
4929 * src/bison.simple: Remove YYERROR_VERBOSE using.
4930 Use %%error_verbose.
4931 (yyparse): Likewise.
4932 * src/output.c (prepare): Give its final value.
4933 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
4934 * src/getargs.h: Add its extern declaration.
4935 * src/getargs.c (error_verbose_flag): New int.
4936 (getargs): Update to catch new case.
4937 * src/options.c (option_table): 'error-verbose' is a new option.
4938 (shortopts): Update.
4939
4940 2001-11-27 Akim Demaille <akim@epita.fr>
4941
4942 * src/system.h: Use intl/libgettext.h.
4943 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
4944
4945 2001-11-27 Akim Demaille <akim@epita.fr>
4946
4947 * tests/torture.at (Exploding the Stack Size with Malloc):
4948 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
4949
4950 2001-11-27 Akim Demaille <akim@epita.fr>
4951
4952 * src/files.c: Include error.h.
4953 Reported by Hans Aberg.
4954
4955 2001-11-26 Marc Autret <autret_m@epita.fr>
4956
4957 * src/reader.c (parse_include_decl): New, not yet implemented.
4958 (read_declarations): Add case tok_include.
4959 * src/getargs.h (include): Add its extern definition.
4960 * src/getargs.c (include): New const char *.
4961 (getargs): Add case '-I'.
4962 * src/options.c (option_table): Add include as command line and
4963 percent option.
4964 * src/lex.h (token_t): Add tok_include.
4965
4966 2001-11-26 Akim Demaille <akim@epita.fr>
4967
4968 * src/reader.c (readgram): Make sure rules for mid-rule actions
4969 have a lineno equal to that of their host rule.
4970 Reported by Hans Aberg.
4971 * tests/regression.at (Rule Line Numbers): New.
4972
4973 2001-11-26 Akim Demaille <akim@epita.fr>
4974
4975 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
4976 size_ts.
4977
4978 2001-11-26 Akim Demaille <akim@epita.fr>
4979
4980 * src/complain.c, src/complain.h (error): Remove, provided by
4981 lib/error.[ch].
4982
4983 2001-11-26 Akim Demaille <akim@epita.fr>
4984
4985 * src/reader.c (read_declarations): Don't abort on tok_illegal,
4986 issue an error message.
4987 * tests/regression.at (Invalid %directive): New.
4988 Reported by Hans Aberg.
4989
4990 2001-11-26 Akim Demaille <akim@epita.fr>
4991
4992 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
4993 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
4994
4995 2001-11-26 Akim Demaille <akim@epita.fr>
4996
4997 * src/conflicts.c (conflicts_print): Don't complain at all when
4998 there are no reduce/reduce conflicts, and as many shift/reduce
4999 conflicts as expected.
5000 * tests/regression.at (%expect right): Adjust.
5001
5002 2001-11-23 Akim Demaille <akim@epita.fr>
5003
5004 * lib/alloca.c: Update, from fileutils.
5005
5006 2001-11-23 Akim Demaille <akim@epita.fr>
5007
5008 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
5009
5010 2001-11-23 Akim Demaille <akim@epita.fr>
5011
5012 * src/system.h: Include alloca.h.
5013 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
5014
5015 2001-11-23 Akim Demaille <akim@epita.fr>
5016
5017 * src/print_graph.c (print_actions): Remove `rule', unused.
5018 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
5019 pacify GCC's signed < unsigned warnings.
5020 * src/closure.c (itemsetsize): Likewise.
5021 * src/reader.c (symbol_list_new): Static.
5022
5023 2001-11-23 Akim Demaille <akim@epita.fr>
5024
5025 Attaching lineno to buckets is stupid, since only one copy of each
5026 symbol is kept, only the line of the first occurrence is kept too.
5027
5028 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
5029 * src/reader.c (rline_allocated): Remove, unused.
5030 (symbol_list): Have a `line' member.
5031 (symbol_list_new): New.
5032 (readgram): Use it.
5033 * src/print.c (print_grammar): Output the rule line numbers.
5034 * tests/regression.at (Solved SR Conflicts)
5035 (Unresolved SR Conflicts): Adjust.
5036 Reported by Hans Aberg.
5037
5038 2001-11-22 Marc Autret <autret_m@epita.fr>
5039
5040 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
5041
5042 2001-11-22 Marc Autret <autret_m@epita.fr>
5043
5044 * src/muscle_tab.c (muscle_init): Remove initialization of
5045 skeleton muscle.
5046 * src/output.c (output_master_parser): Do it here.
5047
5048 2001-11-20 Akim Demaille <akim@epita.fr>
5049
5050 * po/sv.po: New.
5051 * configure.in (ALL_LINGUAS): Adjust.
5052 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
5053 longer contains strings to translate.
5054
5055 2001-11-19 Akim Demaille <akim@epita.fr>
5056
5057 * src/conflicts.c (conflicts_print): Add a missing \n.
5058
5059 2001-11-19 Akim Demaille <akim@epita.fr>
5060
5061 * src/nullable.c (nullable_print): New.
5062 (set_nullable): Call it when tracing.
5063 Better locality of variables.
5064
5065 2001-11-19 Akim Demaille <akim@epita.fr>
5066
5067 * src/print.c (print_actions): Better locality of variables.
5068
5069 2001-11-19 Akim Demaille <akim@epita.fr>
5070
5071 * src/derives.c (print_derives): Fix and enrich.
5072 * src/closure.c (print_fderives): Likewise.
5073
5074 2001-11-19 Akim Demaille <akim@epita.fr>
5075
5076 * src/closure.c (itemsetend): Remove, replaced with...
5077 (itemsetsize): new.
5078
5079 2001-11-19 Akim Demaille <akim@epita.fr>
5080
5081 * src/LR0.c (kernel_end): Remove, replaced with...
5082 (kernel_size): new.
5083
5084 2001-11-19 Akim Demaille <akim@epita.fr>
5085
5086 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
5087 to clarify.
5088
5089 2001-11-19 Akim Demaille <akim@epita.fr>
5090
5091 * src/closure.c (closure): Use arrays instead of pointers to clarify.
5092
5093 2001-11-19 Akim Demaille <akim@epita.fr>
5094
5095 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
5096 trace messages.
5097 * src/LR0.c: Likewise.
5098 (allocate_itemsets): Use arrays instead of pointers to clarify.
5099
5100 2001-11-19 Akim Demaille <akim@epita.fr>
5101
5102 * src/getargs.c (statistics_flag): Replace with...
5103 (trace_flag): New.
5104 (longopts): Accept --trace instead of --statistics.
5105 * src/getargs.h, src/options.c: Adjust.
5106 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
5107 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
5108
5109 2001-11-19 Akim Demaille <akim@epita.fr>
5110
5111 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
5112 pointers to clarify the code.
5113 (save_reductions, save_shifts): Factor common parts of alternatives.
5114
5115 2001-11-19 Akim Demaille <akim@epita.fr>
5116
5117 * src/LR0.c (new_state, get_state): Complete TRACE code.
5118 * src/closure.c: Include `reader.h' to get `tags', needed by the
5119 trace code.
5120 Rename the conditional DEBUG as TRACE.
5121 Output consistently TRACEs to stderr, not stdout.
5122 * src/derives.c: Likewise.
5123 * src/reduce.c: (inaccessable_symbols): Using if is better style
5124 than goto.
5125 Use `#if TRACE' instead of `#if 0' for tracing code.
5126
5127 2001-11-19 Akim Demaille <akim@epita.fr>
5128
5129 * src/system.h (LIST_FREE, shortcpy): New.
5130 * src/LR0.c: Use them.
5131 * src/output.c (free_itemsets, free_reductions, free_shifts):
5132 Remove, replaced by LIST_FREE.
5133
5134 2001-11-19 Akim Demaille <akim@epita.fr>
5135
5136 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
5137 (REDUCTIONS_ALLOC): New.
5138 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
5139 allocation.
5140
5141 2001-11-19 Akim Demaille <akim@epita.fr>
5142
5143 * src/LR0.c (new_state): Complete trace code.
5144 * src/nullable.c (set_nullable): Don't translate traces.
5145
5146 2001-11-19 Akim Demaille <akim@epita.fr>
5147
5148 * src/print_graph.c (print_core): Better locality of variables.
5149 * src/print.c (print_core): Likewise.
5150
5151 2001-11-19 Akim Demaille <akim@epita.fr>
5152
5153 * src/vcg.c: You do the output, so you are responsible of the
5154 handling of VCG syntax, in particular: use quotearg.
5155 * src/print_graph.c: Don't.
5156 (print_actions): Don't output the actions as part of the nodes,
5157 since that's the job of the edges.
5158 (print_state): Don't output by hand: fill the node description,
5159 and ask for its output.
5160
5161 2001-11-19 Akim Demaille <akim@epita.fr>
5162
5163 * src/bison.simple (yyparse): When verbosely reporting an error,
5164 no longer put additional quotes around token names.
5165 * tests/calc.at: Adjust.
5166
5167 2001-11-19 Akim Demaille <akim@epita.fr>
5168
5169 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
5170 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
5171 * src/output.c: Adjust.
5172
5173 2001-11-19 Akim Demaille <akim@epita.fr>
5174
5175 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
5176 (rule_t): this.
5177 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
5178
5179 2001-11-19 Akim Demaille <akim@epita.fr>
5180
5181 * src/gram.h (rule_t): New.
5182 (rule_table): New.
5183 (rrhs, rlhs): Remove, part of state_t.
5184 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
5185 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
5186 * src/reader.c, src/reduce.c: Adjust.
5187
5188 2001-11-19 Akim Demaille <akim@epita.fr>
5189
5190 * src/reader.c (symbols_output): New, extracted from...
5191 (packsymbols): Here.
5192 (reader): Call it.
5193
5194 2001-11-19 Akim Demaille <akim@epita.fr>
5195
5196 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
5197 (maxrhs): this new function.
5198
5199 2001-11-19 Akim Demaille <akim@epita.fr>
5200
5201 * src/lalr.c (F): New macro to access the variable F.
5202 Adjust.
5203
5204 2001-11-19 Akim Demaille <akim@epita.fr>
5205
5206 * src/lalr.h (LA): New macro to access the variable LA.
5207 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
5208 * src/lalr.c: Adjust.
5209
5210 2001-11-19 Akim Demaille <akim@epita.fr>
5211
5212 * src/lalr.c (initialize_LA): Only initialize LA. Let...
5213 (set_state_table): handle the `lookaheads' members.
5214
5215 2001-11-19 Akim Demaille <akim@epita.fr>
5216
5217 * src/lalr.h (lookaheads): Removed array, whose contents is now
5218 a member of...
5219 (state_t): this structure.
5220 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
5221 Adjust.
5222
5223 2001-11-19 Akim Demaille <akim@epita.fr>
5224
5225 * src/lalr.h (consistent): Removed array, whose contents is now
5226 a member of...
5227 (state_t): this structure.
5228 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
5229 Adjust.
5230
5231 2001-11-19 Akim Demaille <akim@epita.fr>
5232
5233 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
5234 contents are now members of...
5235 (state_t): this structure.
5236 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
5237 Adjust.
5238
5239 2001-11-19 Akim Demaille <akim@epita.fr>
5240
5241 * src/lalr.h (state_t): New.
5242 (state_table): Be a state_t * instead of a core **.
5243 (accessing_symbol): Remove, part of state_t.
5244 * src/lalr.c: Adjust.
5245 (set_accessing_symbol): Merge into...
5246 (set_state_table): this.
5247 * src/print_graph.c, src/conflicts.c: Adjust.
5248
5249 2001-11-14 Akim Demaille <akim@epita.fr>
5250
5251 * tests/calc.at, tests/output.at, tests/regression.at,
5252 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
5253 now the tests are run in private dirs, therefore AC_CLEANUP and
5254 family can be simplified to 0-ary.
5255 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
5256 use abs. path to find config.h.
5257 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
5258 stderr, there can be way too much random noise.
5259 Instead pass -Werror to GCC and rely on the exit status.
5260 Reported by Wolfram Wagner.
5261
5262 2001-11-14 Akim Demaille <akim@epita.fr>
5263
5264 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
5265 defined only if yyoverflow is defined, to avoid `warning: unused
5266 variable `yyvs1''.
5267 Reported by The Test Suite.
5268
5269 2001-11-14 Akim Demaille <akim@epita.fr>
5270
5271 * src/print.c: Include reduce.h.
5272 Reported by Hans Aberg.
5273
5274 2001-11-14 Akim Demaille <akim@epita.fr>
5275
5276 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
5277 Revert a previous patch: these are really const.
5278 * src/conflicts.c (conflict_report): Additional useless pair of
5279 braces to pacify GCC's warnings for `if () if () {} else {}'.
5280 * src/lex.c (parse_percent_token): Replace equal_offset with
5281 arg_offset.
5282 arg is const.
5283 Be sure to strdup `arg' when used, since there is no reason for
5284 token_buffer not to change.
5285
5286 2001-11-14 Akim Demaille <akim@epita.fr>
5287
5288 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
5289 definition.
5290 * src/main.c (main): Use them.
5291 Suggested by Hans Aberg.
5292
5293 2001-11-12 Akim Demaille <akim@epita.fr>
5294
5295 * src/system.h (ngettext): Now that we use ngettext, be sure to
5296 provide a default definition when NLS are not used.
5297
5298 2001-11-12 Akim Demaille <akim@epita.fr>
5299
5300 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
5301 Use @kbd to denote user input.
5302 (Language and Grammar): ANSIfy the example.
5303 Adjust its layout for info/notinfo.
5304 (Location Tracking Calc): Output error messages to stderr.
5305 Output locations in a more GNUtically correct way.
5306 Fix a couple of Englishos.
5307 Adjust @group/@end group pairs.
5308
5309 2001-11-12 Akim Demaille <akim@epita.fr>
5310
5311 %expext was not functioning at all.
5312
5313 * src/conflicts.c (expected_conflicts): Set to -1.
5314 (conflict_report): Use ngettext.
5315 (conflicts_print): Check %expect and make its violation an error.
5316 * doc/bison.texinfo (Expect Decl): Adjust.
5317 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
5318 * tests/regression.at (%expect not enough, %expect right)
5319 (%expect too much): New.
5320
5321 2001-11-12 Akim Demaille <akim@epita.fr>
5322
5323 * tests/regression.at (Conflicts): Rename as...
5324 (Unresolved SR Conflicts): this.
5325 (Solved SR Conflicts): New.
5326
5327 2001-11-12 Akim Demaille <akim@epita.fr>
5328
5329 * src/reduce.c (print_results): Rename as...
5330 (reduce_output): This.
5331 Output to OUT, passed as argument, instead of output_obstack.
5332 (dump_grammar): Likewise.
5333 (reduce_free): New.
5334 Also free V1.
5335 (reduce_grammar): No longer call reduce_output, since...
5336 * src/print.c (print_results): do it.
5337 * src/main.c (main): Call reduce_free;
5338
5339 2001-11-12 Akim Demaille <akim@epita.fr>
5340
5341 * src/conflicts.c (print_reductions): Accept OUT as argument.
5342 Output to it, not to output_obstack.
5343 * src/print.c (print_actions): Adjust.
5344
5345 2001-11-12 Akim Demaille <akim@epita.fr>
5346
5347 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
5348 the result instead of using...
5349 (src_total, rrc_total, src_count, rrc_count): Remove.
5350 (any_conflicts): Remove.
5351 (print_conflicts): Split into...
5352 (conflicts_print, conflicts_output): New.
5353 * src/conflicts.h: Adjust.
5354 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
5355 * src/print.c (print_grammar): Issue `\n' between two rules.
5356 * tests/regression.at (Conflicts): New.
5357 Reported by Tom Lane.
5358
5359 2001-11-12 Akim Demaille <akim@epita.fr>
5360
5361 * tests/regression.at (Invalid input): Remove, duplicate with
5362 ``Invalid input: 1''.
5363
5364 2001-11-12 Akim Demaille <akim@epita.fr>
5365
5366 * tests/torture.at (AT_DATA_STACK_TORTURE)
5367 (Exploding the Stack Size with Alloca)
5368 (Exploding the Stack Size with Malloc): New.
5369
5370 2001-11-12 Akim Demaille <akim@epita.fr>
5371
5372 * src/bison.simple (YYSTACK_REALLOC): New.
5373 (yyparse) [!yyoverflow]: Use it and free the old stack.
5374 Reported by Per Allansson.
5375
5376 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
5377
5378 * src/bison.simple: Define type yystype instead of YYSTYPE, and
5379 define CPP macro, which substitute YYSTYPE by yystype.
5380 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
5381 with yyltype/YYLTYPE. This allows inclusion of the generated
5382 header within the parser if the compiler, such as GGC, accepts
5383 multiple equivalent #defines.
5384 From Akim.
5385
5386 2001-11-05 Akim Demaille <akim@epita.fr>
5387
5388 * src/reader.c (symbols_output): New, extracted from...
5389 (packsymbols): here.
5390 (reader): Adjust.
5391
5392 2001-11-05 Akim Demaille <akim@epita.fr>
5393
5394 * src/lex.c (parse_percent_token): s/quotearg/quote/.
5395
5396 2001-11-05 Akim Demaille <akim@epita.fr>
5397
5398 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
5399 pattern.
5400
5401 2001-11-05 Akim Demaille <akim@epita.fr>
5402
5403 * src/options.h (struct option_table_struct): set_flags is void*.
5404 * src/options.c (longopts): Support `--output' and `%output'.
5405 (usage): Adjust.
5406 * src/lex.h (tok_setopt): Remove, replaced with...
5407 (tok_intopt, tok_stropt): these new guys.
5408 * src/lex.c (getopt.h): Not needed.
5409 (token_buffer, unlexed_token_buffer): Not const.
5410 (percent_table): Promote `-' over `_' in directive names.
5411 Active `%name-prefix', `file-prefix', and `output'.
5412 (parse_percent_token): Accept possible arguments to directives.
5413 Promote `-' over `_' in directive names.
5414
5415 2001-11-04 Akim Demaille <akim@epita.fr>
5416
5417 * doc/bison.texinfo (Decl Summary): Split the list into
5418 `directives for grammars' and `directives for bison'.
5419 Sort'em.
5420 Add description of `%name-prefix', `file-prefix', and `output'.
5421 Promote `-' over `_' in directive names.
5422 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
5423 Simplify the description of `--name-prefix'.
5424 Promote `-' over `_' in directive names.
5425 Promote `--output' over `--output-file'.
5426 Fix the description of `--defines'.
5427 * tests/output.at: Exercise %file-prefix and %output.
5428
5429 2001-11-02 Akim Demaille <akim@epita.fr>
5430
5431 * doc/refcard.tex: Update.
5432
5433 2001-11-02 Akim Demaille <akim@epita.fr>
5434
5435 * src/symtab.h (SUNDEF): New.
5436 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
5437 stand for `uninitialized', instead of 0.
5438 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
5439 * src/lex.c (lex): Adjust.
5440
5441 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
5442 Number it 0.
5443 Let yylex return it instead of a plain 0.
5444 Reported by Dick Streefland.
5445
5446 2001-11-02 Akim Demaille <akim@epita.fr>
5447
5448 * tests/regression.at (Mixing %token styles): New test.
5449
5450 2001-11-02 Akim Demaille <akim@epita.fr>
5451
5452 * src/reader.c (parse_thong_decl): Formatting changes.
5453 (token_translations_init): New, extracted from...
5454 (packsymbols): Here.
5455 Adjust.
5456
5457 2001-11-01 Akim Demaille <akim@epita.fr>
5458
5459 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
5460 Check that `9foo.y' produces correct cpp guards.
5461 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
5462 guards.
5463 Reported by Wwp.
5464
5465 2001-11-01 Akim Demaille <akim@epita.fr>
5466
5467 * tests/regression.at (Invalid input: 2): New.
5468 * src/lex.c (unlexed_token_buffer): New.
5469 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
5470 too.
5471 Reported by Wwp.
5472
5473 2001-11-01 Akim Demaille <akim@epita.fr>
5474
5475 * tests/calc.at: Catch up with 1.30.
5476 * configure.in: Bump to 1.49a.
5477 Adjust to newer Autotest.
5478
5479 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
5480
5481 * src/conflicts.c: Move global variables rrc_total and src_total ...
5482 (print_conflicts): here.
5483 * src/output.c (output): Free global variable user_toknums.
5484 * src/lex.c (token_obstack): Become static.
5485
5486 2001-10-18 Akim Demaille <akim@epita.fr>
5487
5488 * tests/atlocal.in (GCC): Add.
5489 * tests/calc.at: s/m4_match/m4_bmatch/.
5490 s/m4_patsubst/m4_bpatsubst/.
5491 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
5492 * configure.in: AC_SUBST(GCC).
5493
5494 2001-10-14 Marc Autret <autret_m@epita.fr>
5495
5496 * src/options.c (create_long_option_table): Fix.
5497
5498 2001-10-10 Akim Demaille <akim@epita.fr>
5499
5500 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
5501
5502 2001-10-04 Akim Demaille <akim@epita.fr>
5503
5504 * src/reader.c (parse_union_decl): Push the caracters in
5505 union_obstack, not attrs_obstack.
5506
5507 2001-10-04 Akim Demaille <akim@epita.fr>
5508
5509 Merge in the branch 1.29.
5510
5511 * src/reader.c (packsymbols): Use a temporary obstack for
5512 `%%tokendef', since output_stack is already used elsewhere.
5513
5514 2001-10-02 Akim Demaille <akim@epita.fr>
5515
5516 Bump 1.29d.
5517
5518 2001-10-02 Akim Demaille <akim@epita.fr>
5519
5520 Version 1.29c.
5521
5522 2001-10-02 Akim Demaille <akim@epita.fr>
5523
5524 * tests/regression.at (Invalid CPP headers): New.
5525 From Alexander Belopolsky.
5526 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
5527
5528 2001-10-02 Akim Demaille <akim@epita.fr>
5529
5530 * tests/regression.at (Invalid input): New.
5531 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
5532 Reported by Shura.
5533
5534 2001-10-02 Akim Demaille <akim@epita.fr>
5535
5536 * tests/calc.at: Now that --debug works, the tests must be adjusted.
5537
5538 2001-10-02 Akim Demaille <akim@epita.fr>
5539
5540 * src/output.c (output_parser): Assert `skeleton'.
5541 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
5542 systems.
5543 From Shura.
5544
5545 2001-10-01 Marc Autret <autret_m@epita.fr>
5546
5547 * src/lex.h: Echo modifications.
5548 * src/lex.c (unlex): Parameter is now token_t.
5549 From Hans Aberg.
5550
5551 2001-10-01 Marc Autret <autret_m@epita.fr>
5552
5553 * src/main.c: Include lex.h.
5554 From Hans Aberg.
5555
5556 2001-09-29 Akim Demaille <akim@epita.fr>
5557
5558 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
5559
5560 2001-09-28 Akim Demaille <akim@epita.fr>
5561
5562 * tests/testsuite.at: Update to newer Autotest.
5563 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
5564
5565 2001-09-27 Akim Demaille <akim@epita.fr>
5566
5567 Position independent wrapper.
5568
5569 * tests/bison: Remove.
5570 * tests/bison.in: New.
5571 * configure.in: Adjust.
5572
5573 2001-09-27 Paul Eggert <eggert@twinsun.com>
5574
5575 Port quotearg fixes from tar 1.13.24.
5576
5577 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
5578 tm to be declared.
5579 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
5580 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
5581
5582 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
5583 * m4/mbrtowc.m4: New file.
5584 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
5585 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
5586
5587 2001-09-27 Akim Demaille <akim@epita.fr>
5588
5589 Bump to 1.29c.
5590
5591 2001-09-27 Akim Demaille <akim@epita.fr>
5592
5593 Version 1.29b.
5594
5595 2001-09-25 Akim Demaille <akim@epita.fr>
5596
5597 * src/system.h: Include `xalloc.h'.
5598 Remove it from the C files.
5599 * src/files.c (output_files): Free the obstacks.
5600 * src/lex.c (init_lex): Rename as...
5601 (lex_init): this.
5602 (lex_free): New.
5603 * src/main.c (main): Use it.
5604
5605 2001-09-24 Marc Autret <autret_m@epita.fr>
5606
5607 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
5608 to output informations in fout (FILE*).
5609 (open_graph, close_graph): Likewise.
5610 (output_graph, output_edge, output_node): Likewise.
5611 * src/vcg.h: Update function prototypes.
5612 * src/print_graph.c (print_graph): Open output graph file.
5613 (print_actions): Adjust.
5614 * src/files.h: Remove extern declaration.
5615 * src/files.c: Remove graph_obstack declaration.
5616 (open_files): Remove graph_obstack initialization.
5617 (output_files): Remove graph_obstack saving.
5618
5619 2001-09-24 Marc Autret <autret_m@epita.fr>
5620
5621 * src/files.c (compute_output_file_names): Fix.
5622
5623 2001-09-24 Marc Autret <autret_m@epita.fr>,
5624 Akim Demaille <akim@epita.fr>
5625
5626 * src/reader.c (reader): Remove call to free_symtab ().
5627 * src/main.c (main): Call it here.
5628 Include symtab.h.
5629 * src/conflicts.c (initialize_conflicts): Rename as...
5630 (solve_conflicts): this.
5631 * src/print.c (print_core, print_actions, print_state)
5632 (print_grammar): Dump to a file instead a `output_obstack'.
5633 (print_results): Dump `output_obstack', and then proceed with the
5634 FILE *.
5635 * src/files.c (compute_output_file_names, close_files): New.
5636 (output_files): Adjust.
5637 * src/main.c (main): Adjust.
5638
5639 2001-09-23 Marc Autret <autret_m@epita.fr>
5640
5641 * src/files.c (compute_header_macro): Computes header macro name
5642 from spec_defines_file when given.
5643
5644 2001-09-23 Marc Autret <autret_m@epita.fr>
5645
5646 * src/files.c (output_files): Add default extensions.
5647
5648 2001-09-22 Akim Demaille <akim@epita.fr>
5649
5650 * src/conflicts.c (finalize_conflicts): Rename as...
5651 (free_conflicts): this.
5652
5653 2001-09-22 Akim Demaille <akim@epita.fr>
5654
5655 * src/gram.c (gram_free): Rename back as...
5656 (dummy): this.
5657 (output_token_translations): Free `token_translations'.
5658 * src/symtab.c (free_symtab): Free the tag field.
5659
5660 2001-09-22 Akim Demaille <akim@epita.fr>
5661
5662 Remove `translations' as it is always set to true.
5663
5664 * src/gram.h: Adjust.
5665 * src/reader.c (packsymbols, parse_token_decl): Adjust
5666 * src/print.c (print_grammar): Adjust.
5667 * src/output.c (output_token_translations): Adjust.
5668 * src/lex.c (lex): Adjust.
5669 * src/gram.c: Be sure the set pointers to NULL.
5670 (dummy): Rename as...
5671 (gram_free): this.
5672
5673 2001-09-22 Akim Demaille <akim@epita.fr>
5674
5675 * configure.in: Invoke AM_LIB_DMALLOC.
5676 * src/system.h: Use dmalloc.
5677 * src/LR0.c: Be sure to have pointers initialized to NULL.
5678 (allocate_itemsets): Allocate kernel_items only if needed.
5679
5680 2001-09-22 Akim Demaille <akim@epita.fr>
5681
5682 * configure.in: Bump to 1.29b.
5683 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
5684 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
5685 need xmalloc.c in calc.y.
5686 From Pascal Bart.
5687
5688 2001-09-21 Akim Demaille <akim@epita.fr>
5689
5690 Version 1.29a.
5691 * Makefile.maint, config/config.guess, config/config.sub,
5692 * config/missing: Update from masters.
5693 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
5694 upon package.m4.
5695 * configure.in (ALL_LINGUAS): Add `tr'.
5696
5697 2001-09-21 Akim Demaille <akim@epita.fr>
5698
5699 * tests/Makefile.am (package.m4): Move to...
5700 ($(srcdir)/$(TESTSUITE)): here.
5701
5702 2001-09-20 Akim Demaille <akim@epita.fr>
5703
5704 * src/complain.c: No longer try to be standalone: use system.h.
5705 Don't assume __STDC__ is defined to 1. Just test if it is defined.
5706 * src/complain.h: Likewise.
5707 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
5708 Remove the unused variable `n'.
5709 From Albert Chin-A-Young.
5710
5711 2001-09-18 Marc Autret <autret_m@epita.fr>
5712
5713 * doc/bison.1: Update.
5714 * doc/bison.texinfo (Bison Options): Update --defines and --graph
5715 descriptions.
5716 (Option Cross Key): Update.
5717 Add --graph.
5718
5719 2001-09-18 Marc Autret <autret_m@epita.fr>
5720
5721 * tests/regression.at: New test (comment in %union).
5722
5723 2001-09-18 Marc Autret <autret_m@epita.fr>
5724
5725 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
5726 do that.
5727 Reported by Keith Browne.
5728
5729 2001-09-18 Marc Autret <autret_m@epita.fr>
5730
5731 * tests/output.at: Add tests for --defines and --graph.
5732
5733 2001-09-18 Marc Autret <autret_m@epita.fr>
5734
5735 * tests/output.at: Removes tests of %{header,src}_extension features.
5736
5737 2001-09-18 Akim Demaille <akim@epita.fr>
5738
5739 * tests/Makefile.am (package.m4): New.
5740 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
5741 (_AT_CHECK_CALC_ERROR): Likewise.
5742 Factor the `, ' part of verbose error messages.
5743
5744 2001-09-18 Marc Autret <autret_m@epita.fr>
5745
5746 * src/getargs.c (longopts): Declare --defines and --graph as options
5747 with optional arguments.
5748 * src/files.h: Add extern declarations.
5749 * src/files.c (spec_graph_file, spec_defines_file): New.
5750 (output_files): Update.
5751 Remove CPP-outed code.
5752
5753 2001-09-18 Marc Autret <autret_m@epita.fr>
5754
5755 Turn off %{source,header}_extension feature.
5756
5757 * src/files.c (compute_exts_from_gf): Update.
5758 (compute_exts_from_src): Update.
5759 (output_files): CPP-out useless code.
5760 * src/files.h: Remove {header,source}_extension extern declarations.
5761 * src/reader.c (parse_dquoted_param): CPP-out.
5762 (parse_header_extension_decl): Remove.
5763 (parse_source_extension_decl): Remove.
5764 (read_declarations): Remove cases tok_{hdrext,srcext}.
5765 * src/lex.c (percent_table): Remove {header,source}_extension entries.
5766 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
5767
5768 2001-09-10 Akim Demaille <akim@epita.fr>
5769
5770 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
5771 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
5772 (AT_CHECK_OUTPUT): this.
5773 Merely check ls' exit status, its output is useless.
5774
5775 2001-09-10 Akim Demaille <akim@epita.fr>
5776
5777 * tests/calc.at: Use m4_match.
5778 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
5779
5780 2001-09-10 Marc Autret <autret_m@epita.fr>,
5781 Akim Demaille <akim@epita.fr>
5782
5783 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
5784 enum color_e.
5785 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
5786 to `normal'.
5787 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
5788 * src/lex.h: Adjust prototype.
5789 (token_t): Add `tok_undef'.
5790 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
5791 (parse_percent_token): Now returns token_t.
5792 Add default statement in switch.
5793 (lex): Separate `c' as an input variable, from the token_t result
5794 part.
5795 (unlexed): Is a token_t.
5796
5797 2001-09-10 Akim Demaille <akim@epita.fr>
5798
5799 * configure.in: Bump to 1.29a.
5800
5801 2001-09-07 Akim Demaille <akim@epita.fr>
5802
5803 Version 1.29.
5804
5805 2001-08-30 Akim Demaille <akim@epita.fr>
5806
5807 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
5808 * m4/atconfig.m4: Remove.
5809 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
5810 * tests/bison: New.
5811 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
5812 m4_if, m4_patsubst, and m4_regexp.
5813 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
5814 `input' file instead of echo.
5815
5816 2001-08-29 Akim Demaille <akim@epita.fr>
5817
5818 Bump to 1.28e.
5819
5820 2001-08-29 Akim Demaille <akim@epita.fr>
5821
5822 Version 1.28d.
5823
5824 2001-08-29 Paul Eggert <eggert@twinsun.com>
5825
5826 * src/bison.simple (yyparse): Don't take the address of an
5827 item before the start of an array, as that doesn't conform to
5828 the C Standard.
5829
5830 2001-08-29 Robert Anisko <anisko_r@epita.fr>
5831
5832 * doc/bison.texinfo (Location Tracking Calc): New node.
5833
5834 2001-08-29 Paul Eggert <eggert@twinsun.com>
5835
5836 * src/output.c (output): Do not define const, as this now
5837 causes more problems than it cures.
5838
5839 2001-08-29 Akim Demaille <akim@epita.fr>
5840
5841 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
5842 the nodes.
5843 Be sure to tag the `detailmenu'.
5844
5845 2001-08-29 Akim Demaille <akim@epita.fr>
5846
5847 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
5848 download in a tmp dir.
5849
5850 2001-08-28 Marc Autret <autret_m@epita.fr>
5851
5852 * config/depcomp: New file.
5853
5854 2001-08-28 Marc Autret <autret_m@epita.fr>
5855
5856 * doc/bison.1 (mandoc): Adjust.
5857 From Juan Manuel Guerrero.
5858
5859 2001-08-28 Marc Autret <autret_m@epita.fr>
5860
5861 * src/print_graph.c (print_state): Fix.
5862
5863 2001-08-27 Marc Autret <autret_m@epita.fr>
5864
5865 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
5866 char * members.
5867 Echo modifications to the functions prototypes.
5868 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
5869
5870 2001-08-27 Marc Autret <autret_m@epita.fr>
5871
5872 * src/vcg.c: Include `xalloc.h'.
5873 (add_colorentry): New.
5874 (add_classname): New.
5875 (add_infoname): New.
5876 * src/vcg.h: Add new prototypes.
5877
5878 2001-08-27 Akim Demaille <akim@epita.fr>
5879
5880 * Makefile.maint: Sync. again with CVS Autoconf.
5881
5882 2001-08-27 Akim Demaille <akim@epita.fr>
5883
5884 * Makefile.maint: Formatting changes.
5885 (po-update, cvs-update, update): New targets.
5886 (AMTAR): Remove.
5887
5888 2001-08-27 Akim Demaille <akim@epita.fr>
5889
5890 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
5891 * Makefile.maint: Sync. with CVS Autoconf.
5892
5893 2001-08-27 Marc Autret <autret_m@epita.fr>
5894
5895 * src/vcg.h (struct infoname_s): New.
5896 (struct colorentry_s): New.
5897 (graph_s): New fields {vertical,horizontal}_order in structure.
5898 Add `infoname' field.
5899 Add `colorentry' field;
5900 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
5901 (G_HORIZONTAL_ORDER): New.
5902 (G_INFONAME): New.
5903 (G_COLORENTRY): New.
5904 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
5905 Add output of `infoname'.
5906 Add output of `colorentry'.
5907
5908 2001-08-27 Marc Autret <autret_m@epita.fr>
5909
5910 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
5911 This one shadowed a global parameter.
5912
5913 2001-08-24 Marc Autret <autret_m@epita.fr>
5914
5915 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
5916 instead of `unsigned'.
5917 (print_state): Do not call obstack_object_size () in obstack_grow ()
5918 to avoid macro variables shadowing.
5919
5920 2001-08-23 Marc Autret <autret_m@epita.fr>
5921
5922 * src/lex.c (percent_table): Typo: s/naem/name/.
5923 Add graph option.
5924 Normalize new options declarations.
5925
5926 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
5927
5928 * tests/suite.at: Exercise %header_extension and %source_extension.
5929
5930 2001-08-16 Marc Autret <autret_m@epita.fr>
5931
5932 * src/reader.c (parse_dquoted_param): New.
5933 (parse_header_extension_decl): Use it.
5934 (parse_source_extension_decl): Likewise.
5935
5936 2001-08-16 Marc Autret <autret_m@epita.fr>
5937
5938 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
5939 (get_xxxx_str): Use assert () instead of complain ().
5940 Remove return invokations in default cases.
5941 (get_decision_str): Modify default behaviour. Remove second argument.
5942 Echo modifications on calls.
5943 (output_graph): Fix.
5944
5945 2001-08-16 Marc Autret <autret_m@epita.fr>
5946
5947 * src/getargs.c (usage): Update with ``-g, --graph''.
5948
5949 2001-08-16 Marc Autret <autret_m@epita.fr>
5950
5951 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
5952 (Option Cross Key): Likewise.
5953 * doc/bison.1: Update.
5954
5955 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
5956
5957 * src/output.c (output_master_parser): Don't finish action_obstack.
5958 (output_parser): Don't care about the muscle action, here.
5959 (prepare): Copy the action_obstack in the action muscle.
5960 (output): Free action_obstack.
5961
5962 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
5963
5964 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
5965 will contain `%union' declaration.
5966 (parse_union_decl): Delete #line directive output.
5967 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
5968 informations about %union.
5969 (parse_union_decl): Copy the union_obstack in the muscle stype.
5970 * src/bison.simple: Add new #line directive.
5971 Add typdef %%stype YYSTYPE.
5972
5973 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
5974
5975 * src/bison.simple: Add new `#line' directive.
5976
5977 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
5978
5979 * src/bison.simple: New `#line' directive.
5980 * src/output.c (output_parser): Support new dynamic muscle input_line.
5981
5982 2001-09-22 Marc Autret <autret_m@epita.fr>
5983
5984 * src/output.c (output_master_parser): New.
5985 (output_parser): Be more re-entrant.
5986
5987 2001-09-21 Marc Autret <autret_m@epita.fr>
5988
5989 * src/reader.c (copy_definition, parse_union_decl): Update and use
5990 `linef' muscle.
5991 (copy_action): Likewise.
5992 Use obstack_1grow ().
5993 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
5994
5995 2001-09-21 Marc Autret <autret_m@epita.fr>
5996
5997 * src/options.c (option_table): Adjust.
5998 * src/lex.c (parse_percent_token): Fix.
5999
6000 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
6001
6002 * src/options.c (symtab.h): Include it, need by lex.h.
6003
6004 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
6005
6006 * src/lex.c (parse_percent_token): Change type of variable `tx', which
6007 is now an option_table_struct*.
6008 (option_strcmp): New function option_strcmp.
6009 (parse_percent_token): Call option_strcmp.
6010 * src/getargs.c (xalloc.h, options.h): Include it.
6011 (getargs): Call create_long_option_table.
6012 (getargs): Free longopts at the end of the function.
6013 (shortopts): Move in options.c.
6014 * src/options.c (create_long_option_table): New function. Convert
6015 information from option_table to option structure.
6016 * src/reader.c (options.h): Include it.
6017
6018 * src/Makefile.am: Adjust.
6019 * src/options.c (option_table): Create from longopts and percent_table.
6020 * src/getargs.c (longopts): Delete.
6021 * src/lex.c (struct percent_table_struct): Delete.
6022 (percent_table): Delete.
6023 (options.h): Include it.
6024 * src/options.c: Create.
6025 * src/options.h: Create.
6026 Declare enum opt_access_e.
6027 Define struct option_table_struct.
6028
6029 2001-09-20 Marc Autret <autret_m@epita.fr>
6030
6031 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
6032 sections of Bison.
6033
6034 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
6035
6036 * src/bison.simple: s/%%filename/%%skeleton.
6037 * src/muscle_tab.c (getargs.h): Include it.
6038 (muscle_init): Insert new muscle skeleton.
6039
6040 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
6041
6042 * src/output.c (output_parser): Delete unused variable actions_dumped.
6043
6044 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
6045
6046 * src/output.c (output): Delete call to reader_output_yylsp.
6047 * src/reader.c (reader): Likewise.
6048 * src/reader.h: Delete declaration of reader_output_yylsp.
6049
6050 2001-09-02 Marc Autret <autret_m@epita.fr>
6051
6052 * src/reader.c: Include muscle_tab.h.
6053 (parse_union_decl): Update.
6054 (parse_macro_decl): Rename parse_muscle_decl.
6055 Update to use renamed functions and variable.
6056 (read_declarations, copy_action, read_additionnal_code, : Updated
6057 with correct variables and functions names.
6058 (packsymbols, reader): Likewise.
6059
6060 * src/reader.h (muscle_obstack): Extern declaration update.
6061
6062 * src/output.c: Include muscle_tab.h
6063 In all functions using macro_insert, change by using muscle_insert ().
6064 (macro_obstack): Rename muscle_obstack.
6065 Echo modifications in the whole file.
6066 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
6067 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
6068 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
6069
6070 * src/muscle_tab.h: Update double inclusion macros.
6071 (macro_entry_s): Rename muscle_entry_s.
6072 Update prototypes.
6073
6074 * src/muscle_tab.c: Include muscle_tab.h.
6075 Rename macro_tabble to muscle_table.
6076 (mhash1, mhash2, mcmp): Use muscle_entry.
6077 (macro_init): Rename muscle_init. Update.
6078 (macro_insert): Rename muscle_insert. Update.
6079 (macro_find): Rename muscle_find. Update.
6080
6081 * src/main.c: Include muscle_tab.h.
6082 (main): Call muscle_init ().
6083 * src/Makefile.am (bison_SOURCES): Echo modifications.
6084
6085 2001-09-02 Marc Autret <autret_m@epita.fr>
6086
6087 Now the files macro_tab.[ch] are named muscle_tab.[ch].
6088
6089 * src/muscle_tab.c, src/muscle_tab.h: Add files.
6090
6091 2001-09-02 Marc Autret <autret_m@epita.fr>
6092
6093 * src/macrotab.c, src/macrotab.h: Remove.
6094
6095 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
6096
6097 * src/reader.c (copy_guard): Use muscle to specify the `#line'
6098 filename.
6099
6100 2001-09-01 Marc Autret <autret_m@epita.fr>
6101
6102 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
6103 to an explicit value to activate the feature. We do it here.
6104
6105 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
6106
6107 * src/output.c (prepare): Delete the `filename' muscule insertion.
6108 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
6109 (parse_union_decl): Likewise.
6110 * src/macrotab.c (macro_init): Initialize filename by infile.
6111
6112 2001-08-31 Marc Autret <autret_m@epita.fr>
6113
6114 * src/bison.simple (YYLSP_NEEDED): New definition.
6115 * src/output.c (prepare): Add macro insertion of `locations_flag'
6116
6117 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
6118
6119 * src/output.c (prepare): Delete insertion of previous muscles,
6120 and insert the `prefix' muscles.
6121 * src/macrotab.c (macro_init): Likewise.
6122 (macro_init): Initialization prefix directive by `yy'.
6123 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
6124 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
6125 yylval, yydebug, yyerror, yynerrs and yyparse.
6126 New directive `#define' to substitute yydebug, ... with option
6127 name_prefix.
6128
6129 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
6130
6131 * src/main.c (main): Standardize.
6132 * src/output.c (output_table_data, output_parser): Likewise.
6133 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
6134
6135 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
6136
6137 * src/reader.c (read_additionnal_code): Rename %%user_code to
6138 %%epilogue.
6139 * src/output.c (output): Rename %%declarations to %%prologue.
6140 * src/bison.simple: Echo modifications.
6141
6142 2001-08-31 Marc Autret <autret_m@epita.fr>
6143
6144 * src/reader.c (readgram): CleanUp.
6145 (output_token_defines): Likewise.
6146 (packsymbols): Likewise.
6147 (reader): Likewise.
6148 * src/output.c (output): CPP-out useless code.
6149
6150 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
6151
6152 * src/reader.c (reader): Delete obsolete call to function
6153 output_trailers and output_headers.
6154 * src/output.h: Remove obsolete functions prototypes of output_headers
6155 and output_trailers.
6156
6157 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
6158
6159 * src/main.c: Include macrotab.h.
6160 * src/macrotab.h (macro_entry_s): Constify fields.
6161 Adjust functions prototypes.
6162 * src/macrotab.c (macro_insert): Constify key and value.
6163 (macro_find): Constify key.
6164 (macro_insert): Include 'xalloc.h'
6165 (macro_insert): Use XMALLOC.
6166 (macro_find): Constify return value.
6167 * src/output.c (output_table_data): Rename table to table_data.
6168 (output_parser): Constify macro_key, macro_value.
6169
6170 2001-08-30 Marc Autret <autret_m@epita.fr>
6171
6172 * src/reader.c (parse_skel_decl): New.
6173 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
6174 * src/lex.h (token_t): New token `tok_skel'.
6175 * src/lex.c (percent_table): Add skeleton option entry.
6176 Standardize.
6177
6178 2001-08-29 Marc Autret <autret_m@epita.fr>
6179
6180 * src/bison.simple: Add %%user_code directive at the end.
6181 * src/reader.c (read_additionnal_code): New.
6182 (reader): Use it.
6183 * src/output.c (output_program): Remove.
6184 (output): Update.
6185
6186 2001-08-28 Marc Autret <autret_m@epita.fr>
6187
6188 * src/output.c (output_actions): Clean up.
6189 (output_gram): CPP-out useless code.
6190 * src/reader.c (reader): Clean up, CPP-out useless code.
6191
6192 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
6193
6194 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
6195 directive.
6196 * src/bison.simple: Add `%%definitions'.
6197
6198 2001-08-28 Marc Autret <autret_m@epita.fr>
6199
6200 * config/depcomp: New file.
6201
6202 2001-08-27 Paul Eggert <eggert@twinsun.com>
6203
6204 * src/bison.simple (yyparse): Don't take the address of an
6205 item before the start of an array, as that doesn't conform to
6206 the C Standard.
6207
6208 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
6209
6210 * src/output.c (output): Remove the initialization of the macro
6211 obstack. It was done too late here.
6212
6213 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
6214 completely wrong.
6215 (reader): Initialize the macro obstack here, since we need it to grow
6216 '%define' directives.
6217
6218 * src/reader.h: Declare the macro obstack as extern.
6219
6220 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
6221
6222 * src/output.c (output_parser): Fix. Store single '%' characters in
6223 the output obstack instead of throwing them away.
6224
6225 2001-08-27 Akim Demaille <akim@epita.fr>
6226
6227 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
6228
6229 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
6230
6231 * lib/Makefile.am: Adjust.
6232
6233 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
6234
6235 * src/bison.simple: Update and add '%%' directives.
6236
6237 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
6238
6239 * src/reader.c (reader): Remove calls to 'output_headers' and
6240 'output_trailers'. Remove some C output.
6241 (readgram): Disable a piece of code that was writing a default
6242 definition for 'YYSTYPE'.
6243 (reader_output_yylsp): Remove.
6244 (packsymbols): Output token defintions to a macro.
6245 (copy_definition): Disable C output.
6246
6247 * src/reader.c (parse_macro_decl): New function used to parse macro
6248 declarations.
6249 (copy_string2): Put the body of copy_string into this new function.
6250 Add a parameter to let the caller choose whether he wants to copy the
6251 string delimiters or not.
6252 (copy_string): Be a simple call to copy_string2 with the last argument
6253 bound to true.
6254 (read_declarations): Add case for macro definition.
6255 (copy_identifier): New.
6256 (parse_macro_decl): Read macro identifiers using copy_identifier
6257 rather than lex.
6258
6259 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
6260
6261 * src/output.c (prepare): Add prefixed names.
6262 (output_parser): Output semantic actions.
6263 (output_parser): Fix bug on '%%line' directives.
6264
6265 * src/output.c (output_headers): Remove. The C code printed by this
6266 function should now be in the skeletons.
6267 (output_trailers): Remove.
6268 (output): Disable call to 'reader_output_yylsp'.
6269 (output_rule_data): Do not output tables to the table obstack.
6270
6271 * src/output.c: Remove some C dedicated output.
6272 Improve the use of macro and output obstacks.
6273 (output_defines): Remove.
6274
6275 * src/output.c (output_token_translations): Associate 'translate'
6276 table with a macro. No output to the table obstack.
6277 (output_gram): Same for 'rhs' and 'prhs'.
6278 (output_stos): Same for 'stos'.
6279 (output_rule_data): Same for 'r1' and 'r2'.
6280 (token_actions): Same for 'defact'.
6281 (goto_actions): Same for 'defgoto'.
6282 (output_base): Same for 'pact' and 'pgoto'.
6283 (output_table): Same for 'table'.
6284 (output_check): Same for 'check'.
6285
6286 * src/output.c (output_table_data): New function.
6287 (output_short_table): Remove.
6288 (output_short_or_char_table): Remove.
6289
6290 * src/output.c (output_parser): Replace most of the skeleton copy code
6291 with something new. Skeletons are now processed character by character
6292 rather than line by line, and Bison looks for '%%' macros. This is the
6293 first step in making Bison's output process (a lot) more flexible.
6294 (output_parser): Use the macro table.
6295
6296 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
6297
6298 * src/main.c (main): Initialize the macro table.
6299
6300 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
6301
6302 * src/lex.c (percent_table): Add tok_define.
6303 * src/lex.h: Add tok_define.
6304
6305 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
6306
6307 * src/macrotab.c: New file.
6308 * src/macrotab.h: New file.
6309 * src/Makefile.am: Update.
6310
6311 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
6312
6313 * lib/hash.c: New file.
6314 * lib/hash.h: New file.
6315 * lib/Makefile.am: Update.
6316
6317 2001-08-15 Akim Demaille <akim@epita.fr>
6318
6319 Version 1.28c.
6320
6321 2001-08-15 Marc Autret <autret_m@epita.fr>
6322
6323 * src/reader.c (readgram): Indent output macro YYSTYPE.
6324 (packsymbols): Likewise.
6325 (output_token_defines): Likewise.
6326 * src/files.c: Standardize.
6327 (compute_header_macro): New.
6328 (defines_obstack_save): New. Use compute_header_macro.
6329 (output_files): Update. Use defines_obstack_save.
6330
6331 2001-08-15 Akim Demaille <akim@epita.fr>
6332
6333 * doc/bison.texinfo (Table of Symbols): Document
6334 YYSTACK_USE_ALLOCA.
6335
6336 2001-08-15 Akim Demaille <akim@epita.fr>
6337
6338 * missing: Update from CVS Automake.
6339 * config/config.guess, config/config.sub, config/texinfo.tex:
6340 Update from gnu.org.
6341
6342 2001-08-15 Akim Demaille <akim@epita.fr>
6343
6344 * Makefile.maint: Sync with CVS Autoconf.
6345
6346 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
6347
6348 * doc/bison.texinfo: Include GNU Free Documentation License from
6349 `fdl.texi'.
6350 * doc/fdl.texi: Add to package.
6351
6352 2001-08-14 Marc Autret <autret_m@epita.fr>
6353
6354 Turn on %{source,header}_extension features.
6355
6356 * src/lex.c (percent_table): Un-CPP out header_extension and
6357 source_extension.
6358 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
6359 (compute_exts_from_src): Remove conditions. It restores priorities
6360 between options.
6361
6362 2001-08-14 Marc Autret <autret_m@epita.fr>
6363
6364 * src/files.c (compute_base_names): Add extensions computing when
6365 `--file-prefix' used.
6366 Standardize function calls.
6367
6368 2001-08-13 Marc Autret <autret_m@epita.fr>
6369
6370 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
6371 defining it (defined but null disables alloca).
6372
6373 2001-08-13 Marc Autret <autret_m@epita.fr>
6374
6375 * src/bison.simple (_yy_memcpy): CPP reformat.
6376
6377 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
6378
6379 * tests/atconfig.in (CPPFLAGS): Fix.
6380
6381 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
6382
6383 * doc/bison.texinfo: Include GNU General Public License from
6384 `gpl.texi'.
6385 * doc/gpl.texi: Add to package.
6386
6387 2001-08-10 Marc Autret <autret_m@epita.fr>
6388
6389 * src/print_graph.h: Fix.
6390 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
6391
6392 2001-08-10 Akim Demaille <akim@epita.fr>
6393
6394 * src/system.h: Provide default declarations for stpcpy, strndup,
6395 and strnlen.
6396
6397 2001-08-10 Robert Anisko <anisko_r@epita.fr>
6398
6399 * doc/bison.texinfo (Locations): Update @$ stuff.
6400
6401 2001-08-09 Robert Anisko <anisko_r@epita.fr>
6402
6403 * src/bison.simple (YYLLOC_DEFAULT): Update.
6404 (yyparse): Adjust.
6405
6406 2001-08-08 Marc Autret <autret_m@epita.fr>
6407
6408 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
6409 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
6410 Reported by Fabrice Bauzac.
6411
6412 2001-08-08 Marc Autret <autret_m@epita.fr>
6413
6414 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
6415 * src/vcg.c (output_node): Fix.
6416 * src/vcg.h: Cleanup.
6417 * src/print_graph.c: Add comments.
6418 (node_output_size): New global variable. Simplify the formatting of
6419 the VCG graph output.
6420 (print_actions): Unused code is now used. It notifies the final state
6421 and no action states in the VCG graph. It also give the reduce actions.
6422 The `shift and goto' edges are red and the `go to state' edges are
6423 blue.
6424 Get the current node name and node_obstack by argument.
6425 (node_obstack): New variable.
6426 (print_state): Manage node_obstack.
6427 (print_core): Use node_obstack given by argument.
6428 A node is not only computed here but in print_actions also.
6429 (print_graph): CPP out useless code instead of commenting it.
6430
6431 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
6432
6433 * tests/atconfig.in (CPPFLAGS): Fix.
6434
6435 2001-08-07 Akim Demaille <akim@epita.fr>
6436
6437 * src/print_graph.c (quote): New.
6438 (print_core): Use it.
6439
6440 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
6441
6442 * src/vcg.c (complain.h): Include it.
6443 Unepitaize `return' invocations.
6444 [NDEBUG] (main): Remove.
6445 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
6446 * src/files.c (open_files): Initialize graph_obstack.
6447 * src/print_graph.c (print_actions): CPP out useless code.
6448 (print_core): Don't output the last `\n' in labels.
6449 Use `quote'.
6450 * src/files.c (output_files): Output the VCG file.
6451 * src/main.c (main): Invoke print_graph ();
6452
6453 2001-08-06 Marc Autret <autret_m@epita.fr>
6454
6455 Automaton VCG graph output.
6456 Using option ``-g'' or long option ``--graph'', you can generate
6457 a gram_filename.vcg file containing a VCG description of the LALR (1)
6458 automaton of your grammar.
6459
6460 * src/main.c: Call to print_graph() function.
6461 * src/getargs.h: Update.
6462 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
6463 (graph_flag): New flag.
6464 (longopts): Update.
6465 (getargs): Add case `g'.
6466 * src/files.c (graph_obstack): New obstack struct.
6467 (open_files): Initialize new obstack.
6468 (output_files): Saves graph_obstack if required.
6469 * src/files.h (graph_obstack): New extern declaration.
6470 * src/Makefile.am: Add new source files.
6471
6472 2001-08-06 Marc Autret <autret_m@epita.fr>
6473
6474 * src/print_graph.c, src/print_graph.h (graph): New.
6475 * src/vcg.h: New file.
6476 * src/vcg.c: New file, VCG graph handling.
6477
6478 2001-08-06 Marc Autret <autret_m@epita.fr>
6479
6480 Add of %source_extension and %header_extension which specify
6481 the source or/and the header output file extension.
6482
6483 * src/files.c (compute_base_names): Remove initialisation of
6484 src_extension and header_extension.
6485 (compute_exts_from_gf): Update.
6486 (compute_exts_from_src): Update.
6487 (output_files): Update.
6488 * src/reader.c (parse_header_extension_decl): New.
6489 (parse_source_extension_decl): New.
6490 (read_declarations): New case statements for the new tokens.
6491 * src/lex.c (percent_table): Add entries for %source_extension
6492 and %header_extension.
6493 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
6494
6495 2001-08-06 Marc Autret <autret_m@epita.fr>
6496
6497 * configure.in: Bump to 1.28c.
6498 * doc/bison.texinfo: Texinfo thingies.
6499
6500 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
6501
6502 * tests/atconfig.in (CPPFLAGS): Add.
6503 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
6504
6505 2001-08-03 Akim Demaille <akim@epita.fr>
6506
6507 Version 1.28b.
6508
6509 2001-08-03 Akim Demaille <akim@epita.fr>
6510
6511 * tests/Makefile.am (check-local): Ship testsuite.
6512 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
6513 Include `string.h'.
6514
6515 2001-08-03 Akim Demaille <akim@epita.fr>
6516
6517 * configure.in: Try using -Wformat when compiling.
6518
6519 2001-08-03 Akim Demaille <akim@epita.fr>
6520
6521 * configure.in: Bump to 1.28b.
6522
6523 2001-08-03 Akim Demaille <akim@epita.fr>
6524
6525 * src/complain.c: Adjust strerror_r portability issues.
6526
6527 2001-08-03 Akim Demaille <akim@epita.fr>
6528
6529 Version 1.28a.
6530
6531 2001-08-03 Akim Demaille <akim@epita.fr>
6532
6533 * src/getargs.c, src/getarg.h (skeleton)): Constify.
6534 * src/lex.c (literalchar): Avoid name clashes on `buf'.
6535 * src/getargs.c: Include complain.h.
6536 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
6537 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
6538
6539 2001-08-03 Akim Demaille <akim@epita.fr>
6540
6541 * src/reader.c (readgram): Display hidden chars in error messages.
6542
6543 2001-08-03 Akim Demaille <akim@epita.fr>
6544
6545 Update to gettext 0.10.39.
6546
6547 2001-08-03 Akim Demaille <akim@epita.fr>
6548
6549 * lib/strspn.c: New.
6550
6551 2001-08-01 Marc Autret <autret_m@epita.fr>
6552
6553 * doc/bison.texinfo: Update.
6554 * doc/bison.1 (mandoc): Update.
6555 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
6556 * src/files.c: Support output files extensions computing.
6557 (src_extension): New static variable.
6558 (header_extension): New static variable.
6559 (tr): New function.
6560 (get_extension_index): New function, gets the index of an extension
6561 filename in a string.
6562 (compute_exts_from_gf): New function, computes extensions from the
6563 grammar file extension.
6564 (compute_exts_from_src): New functions, computes extensions from the
6565 C source file extension, file given by ``-o'' option.
6566 (compute_base_names): Update.
6567 (output_files): Update.
6568
6569 2001-08-01 Robert Anisko <anisko_r@epita.fr>
6570
6571 * doc/bison.texi: Document @$.
6572 (Locations): New section.
6573
6574 2001-07-18 Akim Demaille <akim@epita.fr>
6575
6576 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
6577 * config/prev-version.txt, config/move-if-change: New.
6578 * Makefile.am: Adjust.
6579
6580 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
6581
6582 * src/bison.simple (yyparse): Suppress warning `comparaison
6583 between signed and unsigned'.
6584
6585 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
6586
6587 * src/getargs.h (raw_flag): Remove.
6588 * src/getargs.c: Die on `-r'/`--raw'.
6589 * src/lex.c (parse_percent_token): Die on `%raw'.
6590 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
6591 * tests/calc.at: Suppress test with option `--raw'.
6592
6593 2001-07-14 Akim Demaille <akim@epita.fr>
6594
6595 * config/: New.
6596 * configure.in: Require Autoconf 2.50.
6597 Update to gettext 0.10.38.
6598
6599 2001-03-16 Akim Demaille <akim@epita.fr>
6600
6601 * doc/bison.texinfo: ANSIfy the examples.
6602
6603 2001-03-16 Akim Demaille <akim@epita.fr>
6604
6605 * getargs.c (skeleton): New variable.
6606 (longopts): --skeleton is a new option.
6607 (shortopts, getargs): -S is a new option.
6608 * getargs.h: Declare skeleton.
6609 * output.c (output_parser): Use it.
6610
6611 2001-03-16 Akim Demaille <akim@epita.fr>
6612
6613 * m4/strerror_r.m4: New.
6614 * m4/error.m4: Run AC_FUNC_STRERROR_R.
6615 * lib/error.h, lib/error.c: Update.
6616
6617 2001-03-16 Akim Demaille <akim@epita.fr>
6618
6619 * src/getargs.c (longopts): Clean up.
6620
6621 2001-02-21 Akim Demaille <akim@epita.fr>
6622
6623 * src/reader.c (gensym): `gensym_count' is your own.
6624 Use a static buf to create the symbol name, as token_buffer is no
6625 longer a buffer.
6626
6627 2001-02-08 Akim Demaille <akim@epita.fr>
6628
6629 * src/conflicts.c (conflict_report): Be sure not to append to res
6630 between two calls, which could happen if both first sprintf were
6631 skipped, but not the first cp += strlen.
6632
6633 2001-02-08 Akim Demaille <akim@epita.fr>
6634
6635 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
6636 New, from fileutils 4.0.37.
6637 * configure.in: Require Autoconf 2.49c. I took some time before
6638 making this decision. This is the only way out for portability
6639 issues in Bison, it would mean way too much duplicate effort to
6640 import in Bison features implemented in 2.49c since 2.13.
6641 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
6642
6643 2001-02-02 Akim Demaille <akim@epita.fr>
6644
6645 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
6646 * lib/xalloc.h, lib/xmalloc.c: Update.
6647
6648 2001-01-19 Akim Demaille <akim@epita.fr>
6649
6650 Get rid of the ad hoc handling of token_buffer in the scanner: use
6651 the obstacks.
6652
6653 * src/lex.c (token_obstack): New.
6654 (init_lex): Initialize it. No longer call...
6655 (grow_token_buffer): this. Remove it.
6656 Adjust all the places which used it to use the obstack.
6657
6658 2001-01-19 Akim Demaille <akim@epita.fr>
6659
6660 * src/lex.h: Rename all the tokens:
6661 s/\bENDFILE\b/tok_eof/g;
6662 s/\bIDENTIFIER\b/tok_identifier/g;
6663 etc.
6664 Let them be enums, not #define, to ease debugging.
6665 Adjust all the code.
6666
6667 2001-01-18 Akim Demaille <akim@epita.fr>
6668
6669 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
6670 * src/lex.c (maxtoken, grow_token_buffer): Static.
6671
6672 2001-01-18 Akim Demaille <akim@epita.fr>
6673
6674 Since we now use obstacks, more % directives can be enabled.
6675
6676 * src/lex.c (percent_table): Also accept `%yacc',
6677 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
6678 `%debug'.
6679 Handle the actions for `%semantic_parser' and `%pure_parser' here,
6680 instead of returning a token.
6681 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
6682 * src/reader.c (read_declarations): Adjust.
6683 * src/files.c (open_files): Don't call `compute_base_names', don't
6684 compute `attrsfile' since they depend upon data which might be
6685 *in* the input file now.
6686 (output_files): Do it here.
6687 * src/output.c (output_headers): Document the fact that this patch
6688 introduces a guaranteed SEGV for semantic parsers.
6689 * doc/bison.texinfo: Document them.
6690 * tests/suite.at: Exercise these %options.
6691
6692 2000-12-20 Akim Demaille <akim@epita.fr>
6693
6694 Also handle the output file (--verbose) with obstacks.
6695
6696 * files.c (foutput): Remove.
6697 (output_obstack): New.
6698 Adjust all dependencies.
6699 * src/conflicts.c: Return a string.
6700 * src/system.h (obstack_grow_string): Rename as...
6701 (obstack_sgrow): this. Be ready to work with non literals.
6702 (obstack_fgrow4): New.
6703
6704 2000-12-20 Akim Demaille <akim@epita.fr>
6705
6706 * src/files.c (open_files): Fix the computation of short_base_name
6707 in the case of `-o foo.tab.c'.
6708
6709 2000-12-20 Akim Demaille <akim@epita.fr>
6710
6711 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
6712 (copy_dollar): Now that everything uses obstacks, get rid of the
6713 FILE * parameters.
6714
6715 2000-12-20 Akim Demaille <akim@epita.fr>
6716
6717 * src/files.c (open_files): Actually the `.output' file is based
6718 on the short_base_name, not base_name.
6719 * tests/suite.at (Checking output file names): Adjust.
6720
6721 2000-12-20 Akim Demaille <akim@epita.fr>
6722
6723 * src/bison.s1: Remove, we now use directly...
6724 * src/bison.simple: this.
6725 * src/Makefile.am: Use pkgdata instead of data.
6726
6727 2000-12-20 Akim Demaille <akim@epita.fr>
6728
6729 * src/files.c (guard_obstack): New.
6730 (open_files): Initialize it.
6731 (output_files): Dump it...
6732 * src/files.h: Export it.
6733 * src/reader.c (copy_guard): Use it.
6734
6735 2000-12-19 Akim Demaille <akim@epita.fr>
6736
6737 * src/files.c (outfile, defsfile, actfile): Removed as global
6738 vars.
6739 (open_files): Don't compute them.
6740 (output_files): Adjust.
6741 (base_name, short_base_name): Be global.
6742 Adjust dependencies.
6743
6744 2000-12-19 Akim Demaille <akim@epita.fr>
6745
6746 * src/files.c (strsuffix): New.
6747 (stringappend): Be just like strcat but allocate.
6748 (base_names): Eve out from open_files.
6749 Try to simplify the rather hairy computation of base_name and
6750 short_base_name.
6751 (open_files): Use it.
6752 * tests/suite.at (Checking output file names): New test.
6753
6754 2000-12-19 Akim Demaille <akim@epita.fr>
6755
6756 * src/system.h (obstack_grow_literal_string): Rename as...
6757 (obstack_grow_string): this.
6758 * src/output.c (output_parser): Recognize `%% actions' instead of
6759 `$'.
6760 * src/bison.s1: s/$/%% actions/.
6761 * src/bison.hairy: Likewise.
6762
6763 2000-12-19 Akim Demaille <akim@epita.fr>
6764
6765 * src/output.c (output_parser): Compute the `#line' lines when
6766 there are.
6767 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
6768 Suggested by Hans Aberg.
6769
6770 2000-12-19 Akim Demaille <akim@epita.fr>
6771
6772 Let the handling of the skeleton files be local to the procedures
6773 that use it.
6774
6775 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
6776 longer static.
6777 (fparser, open_extra_files): Remove.
6778 (open_files, output_files): Don't take care of fparser.
6779 * src/files.h: Adjust.
6780 * src/output.c (output_parser): Open and close the file to the
6781 skeleton.
6782 * src/reader.c (read_declarations): When %semantic_parser, open
6783 fguard.
6784
6785 2000-12-19 Akim Demaille <akim@epita.fr>
6786
6787 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
6788 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
6789
6790 2000-12-19 Akim Demaille <akim@epita.fr>
6791
6792 * src/files.c (open_files): Yipee! We no longer need all the code
6793 looking for `/tmp' since we have no tmp file.
6794
6795 2000-12-19 Akim Demaille <akim@epita.fr>
6796
6797 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
6798 New macros.
6799 * src/files.c (open_files): Less dependency on MSDOS etc.
6800
6801 2000-12-14 Akim Demaille <akim@epita.fr>
6802
6803 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
6804 Provide a default definition.
6805 Use it when executing the default @ action.
6806 * src/reader.c (reader_output_yylsp): No longer include
6807 `timestamp' and `text' in the default YYLTYPE.
6808
6809 2000-12-12 Akim Demaille <akim@epita.fr>
6810
6811 * src/reader.c (copy_definition, parse_union_decl, copy_action)
6812 (copy_guard): Quote the file names.
6813 Reported by Laurent Mascherpa.
6814
6815 2000-12-12 Akim Demaille <akim@epita.fr>
6816
6817 * src/output.c (output_headers, output_program, output): Be sure
6818 to escape special characters when outputting filenames.
6819 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
6820 (output_headers): Don't depend on them, Use ACTSTR.
6821
6822 2000-11-17 Akim Demaille <akim@epita.fr>
6823
6824 * lib/obstack.h: Formatting changes.
6825 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
6826 prevents type checking.
6827 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
6828 cast the value to (void *): assigning a `foo *' to a `void *'
6829 variable is valid.
6830 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
6831 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
6832 append characters.
6833
6834 2000-11-17 Akim Demaille <akim@epita.fr>
6835
6836 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
6837 as...
6838 (suite.m4, regression.m4, calc.m4): these.
6839 * tests/atgeneral.m4: Update from CVS Autoconf.
6840
6841 2000-11-17 Akim Demaille <akim@epita.fr>
6842
6843 * tests/regression.m4 (%union and --defines): New test,
6844 demonstrating a current bug in the obstack implementation.
6845
6846 2000-11-17 Akim Demaille <akim@epita.fr>
6847
6848 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
6849 macros.
6850 Use them to declare the variables which are global or local to
6851 `yyparse'.
6852
6853 2000-11-17 Akim Demaille <akim@epita.fr>
6854
6855 * acconfig.h: Remove, no longer used.
6856
6857 2000-11-07 Akim Demaille <akim@epita.fr>
6858
6859 * src: s/Copyright (C)/Copyright/g.
6860
6861 2000-11-07 Akim Demaille <akim@epita.fr>
6862
6863 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
6864 defining.
6865 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
6866
6867 2000-11-07 Akim Demaille <akim@epita.fr>
6868
6869 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
6870 Merge in a single CPP if/else.
6871
6872 2000-11-07 Akim Demaille <akim@epita.fr>
6873
6874 * src/output.c (output): Remove useless variables.
6875 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
6876 argument `data' for consistency with the prototypes.
6877 Qualify it `const'.
6878 (obstack_copy, obstack_copy0): Rename the second argument as
6879 `address' for consistency. Qualify it `const'.
6880 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
6881 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
6882 `const' their input argument (`data' or `address').
6883 Adjust the corresponding macros to include `const' in casts.
6884
6885 2000-11-03 Akim Demaille <akim@epita.fr>
6886
6887 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
6888 s/PFILE1/BISON_HAIRY/.
6889 Adjust dependencies.
6890
6891 2000-11-03 Akim Demaille <akim@epita.fr>
6892
6893 For some reason, this was not applied.
6894
6895 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
6896 `unlink': it's no longer used.
6897
6898 2000-11-03 Akim Demaille <akim@epita.fr>
6899
6900 * src/files.c (skeleton_find): New function, eved out of...
6901 (open_files, open_extra_files): here.
6902
6903 2000-11-03 Akim Demaille <akim@epita.fr>
6904
6905 Don't use `atexit'.
6906
6907 * src/files.c (obstack_save): New function.
6908 (done): Rename as...
6909 (output_files): this.
6910 Use `obstack_save'.
6911 * src/main.c (main): Don't use `atexit' to register `done', since
6912 it no longer has to remove tmp files, just call `output_files'
6913 when there are no errors.
6914
6915 2000-11-02 Akim Demaille <akim@epita.fr>
6916
6917 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
6918 `unlink': it's no longer used.
6919 * src/files.h: Formatting changes.
6920
6921 2000-11-02 Akim Demaille <akim@epita.fr>
6922
6923 Remove the last uses of mktemp and unlink/delete.
6924
6925 * src/files.c (fdefines, ftable): Removed.
6926 (defines_ostack, table_obstack): New.
6927 Adjust dependencies of the former into uses of the latter.
6928 * src/output.c (output_short_or_char_table, output_short_table):
6929 Convert to using obstacks.
6930 * src/reader.c (copy_comment2): Accept one FILE * and two
6931 obstacks.
6932 (output_token_defines, reader_output_yylsp): Use obstacks.
6933 * src/system.h (obstack_fgrow3): New.
6934
6935 2000-11-01 Akim Demaille <akim@epita.fr>
6936
6937 Change each use of `fattrs' into a use of `attrs_obstack'.
6938
6939 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
6940 * src/files.c (fattrs): Remove.
6941 (attrs_obstack): New.
6942 Adjust all dependencies.
6943 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
6944
6945 2000-11-01 Akim Demaille <akim@epita.fr>
6946
6947 Introduce obstacks.
6948 Change each use of `faction' into a use of `action_obstack'.
6949
6950 * lib/obstack.h, lib/obstack.c: New files.
6951 * src/files.c (faction): Remove.
6952 (action_obstack): New.
6953 Adjust all dependencies.
6954
6955 2000-10-20 Akim Demaille <akim@epita.fr>
6956
6957 * lib/quote.h (PARAMS): New macro. Use it.
6958
6959 2000-10-16 Akim Demaille <akim@epita.fr>
6960
6961 * src/output.c (output_short_or_char_table): New function.
6962 (output_short_table, output_token_translations): Use it.
6963 (goto_actions): Use output_short_table.
6964
6965 2000-10-16 Akim Demaille <akim@epita.fr>
6966
6967 * src/symtab.c (bucket_new): New function.
6968 (getsym): Use it.
6969
6970 * src/output.c (output_short_table): New argument to display the
6971 comment associated with the table.
6972 Adjust dependencies.
6973 (output_gram): Use it.
6974 (output_rule_data): Nicer output layout for YYTNAME.
6975
6976 2000-10-16 Akim Demaille <akim@epita.fr>
6977
6978 * src/lex.c (read_typename): New function.
6979 (lex): Use it.
6980 * src/reader.c (copy_dollar): Likewise.
6981
6982 2000-10-16 Akim Demaille <akim@epita.fr>
6983
6984 * src/reader.c (copy_comment2): Expect the input stream to be on
6985 the `/' which is suspected to open a comment, instead of being
6986 called after `//' or `/*' was read.
6987 (copy_comment, copy_definition, parse_union_decl, copy_action)
6988 (copy_guard): Adjust.
6989
6990 2000-10-16 Akim Demaille <akim@epita.fr>
6991
6992 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
6993 `read_signed_integer'.
6994
6995 2000-10-16 Akim Demaille <akim@epita.fr>
6996
6997 * src/reader.c (copy_dollar): New function.
6998 (copy_guard, copy_action): Use it.
6999
7000 2000-10-16 Akim Demaille <akim@epita.fr>
7001
7002 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
7003 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
7004 New files, from Fileutils 4.0.27.
7005 * src/main.c (printable_version): Remove.
7006 * src/lex.c, src/reader.c: Use `quote'.
7007
7008 2000-10-04 Akim Demaille <akim@epita.fr>
7009
7010 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
7011
7012 2000-10-04 Akim Demaille <akim@epita.fr>
7013
7014 * doc/bison.texinfo: Various typos spotted by Neil Booth.
7015
7016 2000-10-04 Akim Demaille <akim@epita.fr>
7017
7018 When a literal string is used to define two different tokens,
7019 `bison -v' segfaults.
7020 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
7021
7022 * tests/regression.m4: New file.
7023 Include the core of the sample provided by Piotr Gackiewicz.
7024 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
7025 properly.
7026
7027 2000-10-04 Akim Demaille <akim@epita.fr>
7028
7029 * src/reader.c (parse_expect_decl): Keep `count' within the size
7030 of `buffer'.
7031 From Neil Booth.
7032
7033 2000-10-02 Paul Eggert <eggert@twinsun.com>
7034
7035 * bison.s1 (yyparse): Assign the default value
7036 unconditionally, to avoid a GCC warning and make the parser a
7037 tad smaller.
7038
7039 2000-10-02 Akim Demaille <akim@epita.fr>
7040
7041 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
7042 options.
7043
7044 2000-10-02 Akim Demaille <akim@epita.fr>
7045
7046 * src/derives.c, src/print.c, src/reduce.c: To ease the
7047 translation, move some `\n' out of the translated strings.
7048
7049 2000-10-02 Akim Demaille <akim@epita.fr>
7050
7051 The location tracking mechanism is precious for parse error
7052 messages. Nevertheless, it is enabled only when `@n' is used in
7053 the grammar, which is a different issue (you can use it in error
7054 message, but not in the grammar per se). Therefore, there should
7055 be another means to enable it.
7056
7057 * src/getargs.c (getargs): Support `--locations'.
7058 (usage): Report it.
7059 * src/getargs.h (locationsflag): Export it.
7060 * src/lex.c (percent_table): Support `%locations'.
7061 * src/reader.c (yylsp_needed): Remove this variable, now replaced
7062 with `locationsflag'.
7063 * doc/bison.texinfo: Document `--locations' and `%locations'.
7064 Sort the options.
7065 * tests/calc.m4: Test it.
7066
7067 For regularity of the names, replace each
7068 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
7069 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
7070 In addition replace each `flag' with `_flag'.
7071
7072 2000-10-02 Akim Demaille <akim@epita.fr>
7073
7074 Also test parse error messages, including with YYERROR_VERBOSE.
7075
7076 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
7077 associative).
7078 Use it to check the computations.
7079 Use it to check `nonassoc' is honored.
7080 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
7081 `--yyerror-verbose'.
7082 (_AT_CHECK_CALC): Adjust to this option.
7083 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
7084
7085 2000-10-02 Akim Demaille <akim@epita.fr>
7086
7087 Test also `--verbose', `--defines' and `--name-prefix'. Testing
7088 the latter demonstrates a flaw in the handling of non debugging
7089 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
7090 was used in order to simplify:
7091
7092 #if YYDEBUG
7093 if (yydebug)
7094 {
7095 ...
7096 }
7097 #endif
7098
7099 into
7100
7101 if (yydebug)
7102 {
7103 ...
7104 }
7105
7106 unfortunately this leads to a CPP conflict when
7107 `--name-prefix=foo' is used since it produces `#define yydebug
7108 foodebug'.
7109
7110 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
7111 (YYDPRINTF): New macro.
7112 Spread its use.
7113 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
7114 the bison options.
7115 Also test `--verbose', `--defines' and `--name-prefix'.
7116
7117 2000-10-02 Akim Demaille <akim@epita.fr>
7118
7119 Improve the readability of the produced parsers.
7120
7121 * src/bison.s1: Formatting changes.
7122 Improve the comment related to the `$' mark.
7123 (yydefault): Don't fall through to `yyresume': `goto' there.
7124 * src/output.c (output_parser): When the `$' is met, skip the end
7125 of its line.
7126 New variable, `number_of_dollar_signs', to check there's exactly
7127 one `$' in the parser skeleton.
7128
7129 2000-10-02 Akim Demaille <akim@epita.fr>
7130
7131 * lib/xstrdup.c: New file, from the fileutils.
7132 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
7133 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
7134 instead of strlen + xmalloc + strcpy.
7135 * src/symtab.c (copys): Remove, use xstrdup instead.
7136
7137 2000-10-02 Akim Demaille <akim@epita.fr>
7138
7139 * src/gram.h (associativity): New enum type which replaces the
7140 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
7141 `right_assoc', `left_assoc' and `non_assoc'.
7142 Adjust all dependencies.
7143 * src/reader.c: Formatting changes.
7144 (LTYPESTR): Don't define it, use it as a literal in
7145 `reader_output_yylsp'.
7146 * src/symtab.h (symbol_class): New enum type which replaces the
7147 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
7148 `sunknown', `stoken and `snterm'.
7149
7150 2000-10-02 Akim Demaille <akim@epita.fr>
7151
7152 * src/getargs.c (fixed_outfiles): Rename as...
7153 (yaccflag): for consistency and accuracy.
7154 Adjust dependencies.
7155
7156 2000-10-02 Akim Demaille <akim@epita.fr>
7157
7158 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
7159 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
7160 difficult and introduced a lot of core dump. It turns out that
7161 Bison used an implementation of `xmalloc' based on `calloc', and
7162 at various places it does depend upon the initialization to 0. I
7163 have not tried to isolate the pertinent places, and all the former
7164 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
7165 someone should address this issue.
7166
7167 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
7168 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
7169 files.
7170 Adjust dependencies.
7171 * src/warshall.h: New file.
7172 Propagate.
7173
7174 2000-10-02 Akim Demaille <akim@epita.fr>
7175
7176 Various anti-`extern in *.c' changes.
7177
7178 * src/system.h: Include `assert.h'.
7179
7180 2000-10-02 Akim Demaille <akim@epita.fr>
7181
7182 * src/state.h (nstates, final_state, first_state, first_shift)
7183 (first_reduction): Move their exportation from here...
7184 * src/LR0.h: to here.
7185 Adjust dependencies.
7186 * src/getargs.c (statisticsflag): New variable.
7187 Add support for `--statistics'.
7188 Adjust dependencies.
7189
7190 Remove a lot of now useless `extern' statements in most files.
7191
7192 2000-10-02 Akim Demaille <akim@epita.fr>
7193
7194 * src/LR0.h: New file.
7195 Propagate its use.
7196
7197 2000-10-02 Akim Demaille <akim@epita.fr>
7198
7199 * src/print.h: New file.
7200 Propagate its use.
7201 * src/print.c: Formatting and ordering changes.
7202 (verbose, terse): Replace with...
7203 (print_results): this new function.
7204 Adjust dependencies.
7205
7206 2000-10-02 Akim Demaille <akim@epita.fr>
7207
7208 * src/conflicts.c (conflict_report): New function.
7209 (conflict_log, verbose_conflict_log): Replace with...
7210 (print_conflicts): this function.
7211 Adjust dependencies.
7212 * src/conflicts.h: New file.
7213 Propagate its inclusion.
7214
7215 2000-10-02 Akim Demaille <akim@epita.fr>
7216
7217 * src/nullable.h: New file.
7218 Propagate its inclusion.
7219 * src/nullable.c: Formatting changes.
7220
7221 2000-10-02 Akim Demaille <akim@epita.fr>
7222
7223 * src/reduce.h: New file.
7224 Propagate its inclusion.
7225 * src/reduce.c: Topological sort and other formatting changes.
7226 (bool, TRUE, FALSE): Move their definition to...
7227 * src/system.h: here.
7228
7229 2000-10-02 Akim Demaille <akim@epita.fr>
7230
7231 * src/files.c: Formatting changes.
7232 (tryopen, tryclose, openfiles): Rename as...
7233 (xfopen, xfclose, open_files): this.
7234 (stringappend): static.
7235 * src/files.h: Complete the list of exported symbols.
7236 Propagate its use.
7237
7238 2000-10-02 Akim Demaille <akim@epita.fr>
7239
7240 * src/reader.h: New file.
7241 Propagate its use instead of tedious list of `extern' and
7242 prototypes.
7243 * src/reader.c: Formatting changes, topological sort,
7244 s/register//.
7245
7246 2000-10-02 Akim Demaille <akim@epita.fr>
7247
7248 * src/lex.h: Prototype `lex.c' exported functions.
7249 * src/reader.c: Adjust.
7250 * src/lex.c: Formatting changes.
7251 (safegetc): Rename as...
7252 (xgetc): this.
7253
7254 2000-10-02 Akim Demaille <akim@epita.fr>
7255
7256 * src/lalr.h: New file.
7257 Propagate its inclusion instead of prototypes and `extern'.
7258 * src/lalr.c: Formatting changes, topological sorting etc.
7259
7260 2000-10-02 Akim Demaille <akim@epita.fr>
7261
7262 * src/output.c (token_actions): Introduce a temporary array,
7263 YYDEFACT, that makes it possible for this function to use
7264 output_short_table.
7265
7266 2000-10-02 Akim Demaille <akim@epita.fr>
7267
7268 `user_toknums' is output as a `short[]' in `output.c', while it is
7269 defined as a `int[]' in `reader.c'. For consistency with the
7270 other output tables, `user_toknums' is now defined as a table of
7271 shorts.
7272
7273 * src/reader.c (user_toknums): Be a short table instead of an int
7274 table.
7275 Adjust dependencies.
7276
7277 Factor the short table outputs.
7278
7279 * src/output.c (output_short_table): New function.
7280 * src/output.c (output_gram, output_stos, output_rule_data)
7281 (output_base, output_table, output_check): Use it.
7282
7283 2000-10-02 Akim Demaille <akim@epita.fr>
7284
7285 * src/output.c (output): Topological sort of the functions, in
7286 order to get rid of the `static' prototypes.
7287 No longer use `register'.
7288 * src/output.h: New file.
7289 Propagate its inclusion in files explicitly prototyping functions
7290 from output.c.
7291
7292 2000-09-21 Akim Demaille <akim@epita.fr>
7293
7294 * src/atgeneral.m4: Update from Autoconf.
7295
7296 2000-09-21 Akim Demaille <akim@epita.fr>
7297
7298 * src/closure.h: New file.
7299 * src/closure.c: Formatting changes, topological sort over the
7300 functions, use of closure.h.
7301 (initialize_closure, finalize_closure): Rename as...
7302 (new_closure, free_closure): these. Adjust dependencies.
7303 * src/LR0.c: Formatting changes, topological sort, use of
7304 cloture.h.
7305 (initialize_states): Rename as...
7306 (new_states): this.
7307 * src/Makefile.am (noinst_HEADERS): Adjust.
7308
7309 2000-09-20 Akim Demaille <akim@epita.fr>
7310
7311 * src/acconfig.h: Don't protect config.h against multiple
7312 inclusion.
7313 Don't define PARAMS.
7314 * src/system.h: Define PARAMS.
7315 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
7316 purpose of config.h. system.h must not try to fix wrong
7317 definitions in config.h.
7318
7319 2000-09-20 Akim Demaille <akim@epita.fr>
7320
7321 * src/derives.h: New file.
7322 * src/main.c, src/derives.h: Use it.
7323 Formatting changes.
7324 * src/Makefile.am (noinst_HEADERS): Adjust.
7325
7326 2000-09-20 Akim Demaille <akim@epita.fr>
7327
7328 * tests/atgeneral.m4: Update from Autoconf.
7329 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
7330 (AT_CHECK_CALC): New macros.
7331 Use these macros to test bison with options `', `--raw',
7332 `--debug', `--yacc', `--yacc --debug'.
7333
7334 2000-09-19 Akim Demaille <akim@epita.fr>
7335
7336 * src/output.c: Formatting changes.
7337 * src/machine.h: Remove, leaving its contents in...
7338 * src/system.h: here.
7339 Include stdio.h.
7340 Adjust all dependencies on stdio.h and machine.h.
7341 * src/getargs.h: New file.
7342 Let all `extern' declarations about getargs.c be replaced with
7343 inclusion of `getargs.h'.
7344 * src/Makefile.am (noinst_HEADERS): Adjust.
7345
7346 * tests/calc.m4 (yyin): Be initialized in main, not on the global
7347 scope.
7348 (yyerror): Returns void, not int.
7349 * doc/bison.texinfo: Formatting changes.
7350
7351 2000-09-19 Akim Demaille <akim@epita.fr>
7352
7353 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
7354 portable.
7355
7356 2000-09-18 Akim Demaille <akim@epita.fr>
7357
7358 * configure.in: Append WARNING_CFLAGS to CFLAGS.
7359 * src/Makefile.am (INCLUDES): Don't.
7360 Be ready to fetch headers in lib/.
7361
7362 2000-09-18 Akim Demaille <akim@epita.fr>
7363
7364 * doc/bison.texinfo: Update the copyright.
7365 ANSIfy and GNUify the examples.
7366 Remove the old menu.
7367
7368 2000-09-18 Akim Demaille <akim@epita.fr>
7369
7370 First set of tests: use the `calc' example from the documentation.
7371
7372 * src/bison.s1 (yyparse): Condition the code using `yytname' which
7373 is defined only when YYDEBUG is.
7374 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
7375 * src/files.c (tryopen, tryclose): Formatting changes.
7376 Move to the top and be static.
7377 * src/reader.c (read_signed_integer): Likewise.
7378 * tests/calc.m4: New file.
7379 * Makefile.am, suite.m4: Adjust.
7380 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
7381
7382 2000-09-18 Akim Demaille <akim@epita.fr>
7383
7384 Add support for an Autotest test suite for Bison.
7385
7386 * m4/m4.m4, m4/atconfig.m4: New files.
7387 * m4/Makefile.am (EXTRA_DIST): Adjust.
7388 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
7389 files.
7390 * src/getargs.c: Display a more standard --version message.
7391 * src/reader.c (reader): Formatting changes.
7392 No longer depend upon VERSION_STRING.
7393 * configure.in: No longer use `dnl'.
7394 Set up the test suite and the new directory `tests/.
7395 (VERSION_STRING): Remove.
7396
7397 2000-04-14 Akim Demaille <akim@epita.fr>
7398
7399 * src/reader.c (copy_comment2): New function, same as former
7400 `copy_comment', but outputs into two FILE *.
7401 (copy_comment): Use it.
7402 (parse_union_decl): Use it.
7403 (get_type, parse_start_decl): Use the same `invalid' message.
7404 (parse_start_decl, parse_union_decl): Use the same `multiple'
7405 message.
7406 (parse_union_decl, copy_guard, copy_action): Use the same
7407 `unmatched' message.
7408 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
7409
7410 2000-03-31 Akim Demaille <akim@epita.fr>
7411
7412 * src/files.c (tryopen, tryclose): Move to the top.
7413 Be static.
7414
7415 2000-03-31 Akim Demaille <akim@epita.fr>
7416
7417 * src/main.c (main): Don't call `done', exit does it.
7418
7419 2000-03-31 Akim Demaille <akim@epita.fr>
7420
7421 * allocate.c: s/return (foo)/return foo/.
7422 * lalr.c: Likewise.
7423 * LR0.c: Likewise.
7424 * output.c: Likewise.
7425 * reader.c: Likewise.
7426 * symtab.c: Likewise.
7427 * vmsgetargs.c: Likewise.
7428
7429 2000-03-31 Akim Demaille <akim@epita.fr>
7430
7431 Clean up the error reporting functions.
7432
7433 * src/report.c: New file.
7434 * src/report.h: Likewise.
7435 * src/Makefile.am: Adjust.
7436 * m4/error.m4: New file.
7437 * m4/Makefile.am: Adjust.
7438 * configure.in (jm_PREREQ_ERROR): Call it.
7439 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
7440 Remove.
7441 (fatal, fatals): Remove. All callers use complain.c::fatal.
7442 (warn, warni, warns, warnss, warnss): Remove. All callers use
7443 complain.c::complain.
7444 (toomany): Remove, use fatal instead.
7445 * src/files.c (done): No argument, use complain_message_count.
7446 * src/main.c (main): Register `done' to `atexit'.
7447
7448 * src/getargs.c (usage): More `fputs', less `fprintf'.
7449
7450 2000-03-28 Akim Demaille <akim@epita.fr>
7451
7452 * lib/: New directory.
7453 * Makefile.am (SUBDIRS): Adjust.
7454 * configure.in: Adjust.
7455 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
7456 useless.
7457 * src/alloca.c: Moved to lib/.
7458 * src/getopt.c: Likewise.
7459 * src/getopt1.c: Likewise.
7460 * src/getopt.h: Likewise.
7461 * src/ansi2knr.c: Likewise.
7462 * src/ansi2knr.1: Likewise.
7463 * src/Makefile.am: Adjust.
7464 * lib/Makefile.am: New file.
7465
7466 2000-03-28 Akim Demaille <akim@epita.fr>
7467
7468 * src/getargs.c (usage): Refresh the help message.
7469
7470 2000-03-17 Akim Demaille <akim@epita.fr>
7471
7472 * src/getopt1.c: Updated from textutils 2.0e
7473 * src/getopt.c: Likewise.
7474 * src/getopt.h: Likewise.
7475
7476 2000-03-17 Akim Demaille <akim@epita.fr>
7477
7478 * src/Makefile.am (bison.simple): Fix the awk program: quote only
7479 the file name, not the whole `#line LINE FILE'.
7480
7481 2000-03-17 Akim Demaille <akim@epita.fr>
7482
7483 On syntax errors, report the token on which we choked.
7484
7485 * src/bison.s1 (yyparse): In the label yyerrlab, when
7486 YYERROR_VERBOSE, add yychar in msg.
7487
7488 2000-03-17 Akim Demaille <akim@epita.fr>
7489
7490 * src/reader.c (copy_at): New function.
7491 (copy_guard): Use it.
7492 (copy_action): Use it.
7493
7494 2000-03-17 Akim Demaille <akim@epita.fr>
7495
7496 Be kind to translators, save some useless translations.
7497
7498 * src/main.c (banner): New function.
7499 (fatal_banner): Use it.
7500 (warn_banner): Use it.
7501
7502 2000-03-17 Akim Demaille <akim@epita.fr>
7503
7504 * src/reader.c (copy_definition): Use copy_string and
7505 copy_comment. Removed now unused `match', `ended',
7506 `cplus_comment'.
7507 (copy_comment, copy_string): Moved, to be visible from
7508 copy_definition.
7509
7510 2000-03-17 Akim Demaille <akim@epita.fr>
7511
7512 * src/reader.c (copy_string): Declare `static inline'. No
7513 problems with inline, since it is checked by configure.
7514 (copy_comment): Likewise.
7515
7516 2000-03-17 Akim Demaille <akim@epita.fr>
7517
7518 * src/reader.c (packsymbols): Formatting changes.
7519
7520 2000-03-17 Akim Demaille <akim@epita.fr>
7521
7522 * src/reader.c (copy_comment): New function, factored out from:
7523 (copy_action): Use it. Removed now unused `match', `ended',
7524 `cplus_comment'.
7525 (copy_guard): Likewise.
7526
7527 2000-03-17 Akim Demaille <akim@epita.fr>
7528
7529 * src/reader.c (copy_string): New function, factored out from:
7530 (copy_action): Use it.
7531 (copy_guard): Likewise.
7532
7533 2000-03-17 Akim Demaille <akim@epita.fr>
7534
7535 Change the handling of @s so that they behave exactly like $s.
7536 There is now a pseudo variable @$ (readble and writable), location
7537 of the lhs of the rule (by default ranging from the location of
7538 the first symbol of the rhs, to the location of the last symbol,
7539 or, if the rhs is empty, YYLLOC).
7540
7541 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
7542 yyval.
7543 (yyparse): When providing a default semantic action, provide a
7544 default location action.
7545 (after the $): No longer change `*YYLSP', just stack YYLOC the
7546 same way you stack YYVAL.
7547 * src/reader.c (read_declarations): Use warns.
7548 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
7549 (copy_action, case '@'): Likewise.
7550 Use a standard error message, to save useless work from
7551 translators.
7552
7553 2000-03-17 Akim Demaille <akim@epita.fr>
7554
7555 * src/bison.s1: Formatting and cosmetics changes.
7556 * src/reader.c: Likewise.
7557 Update the Copyright notice.
7558
7559 2000-03-17 Akim Demaille <akim@epita.fr>
7560
7561 * src/bison.s1 (#line): All set to `#line' only, since the
7562 Makefile now handles them.
7563
7564 2000-03-16 Akim Demaille <akim@epita.fr>
7565
7566 * src/output.c (output_rule_data): Output the documentation of
7567 some of the tables.
7568 (Copyright notice): Update.
7569 Formatting changes.
7570
7571 2000-03-16 Akim Demaille <akim@epita.fr>
7572
7573 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
7574 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
7575 One `#if YYDEBUG' remains, since it uses variables which are
7576 defined only if `YYDEBUG != 0'.
7577
7578 2000-03-16 Akim Demaille <akim@epita.fr>
7579
7580 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
7581 and related variables so that the similarities are highlighted.
7582
7583 2000-03-16 Akim Demaille <akim@epita.fr>
7584
7585 * src/bison.s1: Properly indent CPP directives.
7586
7587 2000-03-16 Akim Demaille <akim@epita.fr>
7588
7589 * src/bison.s1: Properly indent the `alloca' CPP section.
7590
7591 2000-03-16 Akim Demaille <akim@epita.fr>
7592
7593 Do not hard code values of directories in `configure.in'.
7594 Update the `configure' tool chain.
7595
7596 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
7597 src/makefile.am.
7598 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
7599 (AC_OUTPUT): Add m4/Makefile.
7600 Bump to bison 1.28a, 1.29 has never been released.
7601 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
7602 handled via src/Makefile.am.
7603 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
7604 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
7605 autoheader.
7606 * Makefile.am (SUBDIRS): Add m4.
7607 (ACLOCAL_AM_FLAGS): New variable.
7608 (AUTOMAKE_OPTIONS): Add check-news.
7609 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
7610 the proper line number and file name.
7611 (DEFS): Propagate the location of bison library files and of the
7612 locale files.
7613 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
7614 builddir.
7615 * acinclude.m4: Remove, replaced by the directory m4.
7616 * m4/Makefile.am (EXTRA_DIST): New variable.
7617 * m4/gettext.m4: New file, from the fileutils.
7618 * m4/lcmessage.m4: Likewise
7619 * m4/progtest.m4: Likewise.
7620 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
7621
7622 2000-03-10 Akim Demaille <akim@epita.fr>
7623
7624 * src/closure.c:
7625 Formatting changes of various comments.
7626 Respect the GNU coding standards at various places.
7627 Don't use `_()' when no translation is needed.
7628
7629 1999-12-13 Jesse Thilo <jthilo@gnu.org>
7630
7631 * src/files.c:
7632 OS/2 honors TMPDIR environment variable.
7633
7634 1999-12-13 Jesse Thilo <jthilo@gnu.org>
7635
7636 * doc/bison.texinfo: Tweaked spelling and grammar.
7637 Updated ISBN.
7638 Removed reference to price of printed copy.
7639 Mention BISON_SIMPLE and BISON_HAIRY.
7640
7641 1999-12-13 Jesse Thilo <jthilo@gnu.org>
7642
7643 * configure.in, NEWS:
7644 Bison 1.29 released.
7645
7646 1999-10-27 Jesse Thilo <jthilo@gnu.org>
7647
7648 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
7649 Added reference card.
7650
7651 1999-07-26 Jesse Thilo <jthilo@gnu.org>
7652
7653 * po/ru.po: Added Russian translation.
7654
7655 1999-07-26 Jesse Thilo <jthilo@gnu.org>
7656
7657 * configure.in: Added Russian translation.
7658
7659 1999-07-06 Jesse Thilo <jthilo@gnu.org>
7660
7661 * configure.in, NEWS, README:
7662 Released version 1.28.
7663
7664 1999-06-14 Jesse Thilo <jthilo@gnu.org>
7665
7666 * src/system.h:
7667 Squashed redefinition warning on some systems.
7668
7669 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
7670 Have configure build version string instead of relying on ANSI string
7671 concatentation.
7672
7673 1999-06-14 Jesse Thilo <jthilo@gnu.org>
7674
7675 * po/POTFILES.in: Got rid of version.c.
7676
7677 1999-06-14 Jesse Thilo <jthilo@gnu.org>
7678
7679 * acconfig.h, configure.in:
7680 Have configure build version string instead of relying on ANSI string
7681 concatentation.
7682
7683 1999-06-08 Jesse Thilo <jthilo@gnu.org>
7684
7685 * doc/bison.1:
7686 Dropped mention of `+' for long-named options.
7687
7688 1999-05-30 Jesse Thilo <jthilo@gnu.org>
7689
7690 * src/files.c: Added <unistd.h> for unlink().
7691
7692 * src/Makefile.am, src/system.h:
7693 I18n fixes.
7694
7695 1999-05-30 Jesse Thilo <jthilo@gnu.org>
7696
7697 * README: Added a FAQ list.
7698
7699 * configure.in, acconfig.h:
7700 I18n fixes.
7701
7702 1999-05-30 Jesse Thilo <jthilo@gnu.org>
7703
7704 * doc/FAQ, doc/Makefile.am:
7705 Added a FAQ list.
7706
7707 1999-05-19 Jesse Thilo <jthilo@gnu.org>
7708
7709 * src/alloc.h, src/symtab.h, src/version.c:
7710 Protected inclusion of "config.h" with HAVE_CONFIG_H.
7711
7712 1999-04-18 Jesse Thilo <jthilo@gnu.org>
7713
7714 * src/.cvsignore, src/Makefile.am:
7715 Reorganized: sources in `src', documentation in `doc'.
7716
7717 * src/lex.c (literalchar):
7718 fixed the code for escaping double quotes (thanks
7719 Jonathan Czisny.)
7720
7721 1999-04-18 Jesse Thilo <jthilo@gnu.org>
7722
7723 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
7724 Adjusted paths to reflect directory reorganization.
7725
7726 1999-04-18 Jesse Thilo <jthilo@gnu.org>
7727
7728 * doc/.cvsignore, doc/Makefile.am:
7729 Reorganized: sources in `src', documentation in `doc'.
7730
7731 1999-04-18 Jesse Thilo <jthilo@gnu.org>
7732
7733 * configure.in:
7734 Updated AC_INIT file to reflect directory reorganization.
7735
7736 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
7737 Reorganized: sources in `src', documentation in `doc'.
7738
7739 1999-04-13 Jesse Thilo <jthilo@gnu.org>
7740
7741 * src/allocate.c:
7742 Don't declare calloc() and realloc() if not necessary.
7743
7744 1999-04-13 Jesse Thilo <jthilo@gnu.org>
7745
7746 * configure.in, acconfig.h, acinclude.m4:
7747 Don't declare calloc() and realloc() if not necessary.
7748
7749 1999-03-23 Jesse Thilo <jthilo@gnu.org>
7750
7751 * po/.cvsignore: Added i18n support.
7752
7753 1999-03-23 Jesse Thilo <jthilo@gnu.org>
7754
7755 * acconfig.h, configure.in, Makefile.am:
7756 Added i18n support.
7757
7758 1999-03-22 Jesse Thilo <jthilo@gnu.org>
7759
7760 * src/bison.s1: Fixed #line numbers.
7761
7762 1999-03-15 Jesse Thilo <jthilo@gnu.org>
7763
7764 * po/es.po, po/fr.po, po/nl.po, po/de.po:
7765 Added PO files from Translation Project.
7766
7767 1999-03-03 Jesse Thilo <jthilo@gnu.org>
7768
7769 * Makefile.am:
7770 Added support for non-ANSI compilers (ansi2knr).
7771
7772 1999-02-16 Jesse Thilo <jthilo@gnu.org>
7773
7774 * configure.in: Bumped version number to 1.27.
7775
7776 * Makefile.am:
7777 Added `bison.simple' to list of files removed by `make distclean'.
7778
7779 1999-02-12 Jesse Thilo <jthilo@gnu.org>
7780
7781 * src/files.c, src/files.h:
7782 Defined locations of parser files in config.h instead of Makefile.
7783
7784 1999-02-12 Jesse Thilo <jthilo@gnu.org>
7785
7786 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
7787 Defined locations of parser files in config.h instead of Makefile.
7788
7789 1999-02-09 Jesse Thilo <jthilo@gnu.org>
7790
7791 * Makefile.am:
7792 Removed inappropriate use of $< macro.
7793
7794 1999-02-05 Jesse Thilo <jthilo@gnu.org>
7795
7796 * po/Makefile.in.in, po/POTFILES.in:
7797 Add `po' directory skeleton.
7798
7799 1999-01-27 Jesse Thilo <jthilo@gnu.org>
7800
7801 * README: Document help-bison list.
7802
7803 * configure.in: Add check for mkstemp().
7804
7805 1999-01-20 Jesse Thilo <jthilo@gnu.org>
7806
7807 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
7808 Hush a few compiler warnings.
7809
7810 * src/files.c:
7811 Add tryclose(), which verifies that fclose was successful.
7812 Hush a couple of compiler warnings.
7813
7814 1999-01-20 Jesse Thilo <jthilo@gnu.org>
7815
7816 * Makefile.am, OChangeLog:
7817 ChangeLog is now automatically generated. Include the old version as
7818 OChangeLog.
7819
7820 1999-01-14 Jesse Thilo <jthilo@gnu.org>
7821
7822 * 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:
7823 Update FSF address.
7824
7825 1999-01-14 Jesse Thilo <jthilo@gnu.org>
7826
7827 * doc/bison.texinfo: Fix formatting glitch.
7828
7829 * doc/bison.texinfo: Update FSF address.
7830
7831 1999-01-14 Jesse Thilo <jthilo@gnu.org>
7832
7833 * acconfig.h: Update FSF address.
7834
7835 1999-01-08 Jesse Thilo <jthilo@gnu.org>
7836
7837 * src/system.h:
7838 Don't define PACKAGE here, since config.h defines it.
7839
7840 1998-12-30 Jesse Thilo <jthilo@gnu.org>
7841
7842 * src/reader.c: Update copyright date.
7843
7844 * src/main.c:
7845 Ditch sprintf to statically-sized buffers in fatal/warn functions in
7846 favor of output directly to stderr (avoids buffer overruns).
7847
7848 * src/reader.c: Some checks for premature EOF.
7849
7850 * 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:
7851 Use prototypes if the compiler understands them.
7852
7853 * src/files.c: Honor TMPDIR on Unix hosts.
7854 Use prototypes if the compiler understands them.
7855
7856 * src/reader.c:
7857 Fix a couple of buffer overrun bugs.
7858 Use prototypes if the compiler understands them.
7859
7860 * src/system.h: Include unistd.h and ctype.h.
7861 Use #ifdef instead of #if for NLS symbols.
7862
7863 1998-12-30 Jesse Thilo <jthilo@gnu.org>
7864
7865 * doc/bison.texinfo:
7866 Delete comment "consider using @set for edition number, etc..." since
7867 we now are doing so.
7868
7869 1998-12-30 Jesse Thilo <jthilo@gnu.org>
7870
7871 * configure.in:
7872 Use prototypes if the compiler understands them.
7873
7874 * NEWS: Document 1.26 highlights.
7875
7876 * Makefile.am: Require Automake 1.3 or later.
7877
7878 * acconfig.h:
7879 Use prototypes if the compiler understands them.
7880
7881 1998-12-29 Jesse Thilo <jthilo@gnu.org>
7882
7883 * src/version.c:
7884 Use VERSION symbol from automake for version number.
7885
7886 1998-12-29 Jesse Thilo <jthilo@gnu.org>
7887
7888 * acconfig.h, configure.in, version.cin:
7889 Use VERSION symbol from automake for version number.
7890
7891 1998-11-28 Jesse Thilo <jthilo@gnu.org>
7892
7893 * Makefile.am:
7894 Distribute original version of simple parser (bison.s1), not built
7895 version (bison.simple).
7896
7897 1998-11-28 Jesse Thilo <jthilo@gnu.org>
7898
7899 * doc/bison.texinfo: Add info dir entry.
7900
7901 * doc/bison.texinfo:
7902 Let automake put version number into documentation.
7903
7904 1998-11-26 Jesse Thilo <jthilo@gnu.org>
7905
7906 * src/bison.cld, src/build.com, src/vmshlp.mar:
7907 Add non-RCS files from /gd/gnu/bison.
7908
7909 1998-11-26 Jesse Thilo <jthilo@gnu.org>
7910
7911 * doc/bison.1:
7912 Document the BISON_HAIRY and BISON_SIMPLE variables.
7913
7914 1998-11-25 Jesse Thilo <jthilo@gnu.org>
7915
7916 * src/version.c: Build version.c automatically.
7917
7918 * src/reader.c:
7919 Fix token numbering (used to start at 258, not 257).
7920
7921 * src/system.h: Include config.h.
7922
7923 * src/getargs.c: Update bug report address.
7924
7925 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
7926 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
7927
7928 1998-11-25 Jesse Thilo <jthilo@gnu.org>
7929
7930 * Makefile.am:
7931 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
7932
7933 * configure.in, version.cin:
7934 Build version.c automatically.
7935
7936 * AUTHORS: Add AUTHORS file.
7937
7938 * README: Update bug report address.
7939
7940 * bison.simple:
7941 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
7942
7943 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
7944 Add automake stuff.
7945
7946 1998-11-25 Jesse Thilo <jthilo@gnu.org>
7947
7948 * doc/bison.texinfo: Clean up some formatting.
7949
7950 1998-05-05 Richard Stallman <rms@gnu.org>
7951
7952 * doc/bison.texinfo:
7953 Explain better why to make a pure parser.
7954
7955 1998-01-05 Richard Stallman <rms@gnu.org>
7956
7957 * src/files.c (openfiles):
7958 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
7959 find a temporary directory, if possible. Do not unlink files while
7960 they are open.
7961
7962 1997-08-25 Richard Stallman <rms@gnu.org>
7963
7964 * src/reader.c (stack_offset;):
7965 Change some warni to warns.
7966
7967 * src/lex.c (literalchar): Use warns, not warni.
7968
7969 1997-06-28 Richard Stallman <rms@gnu.org>
7970
7971 * src/bison.s1: Add a Bison version comment.
7972
7973 * src/main.c (fatal, warn, berror):
7974 Use program_name.
7975
7976 1997-06-28 Richard Stallman <rms@gnu.org>
7977
7978 * Makefile.in (bison_version): New variable.
7979 (dist): Use that variable.
7980 (bison.s1): Substitute the Bison version into bison.simple.
7981
7982 * bison.simple: Add a Bison version comment.
7983
7984 1997-06-18 Richard Stallman <rms@gnu.org>
7985
7986 * src/main.c (fatal, warn, berror):
7987 Make error messages standard.
7988 (toomany): Improve error message text.
7989
7990 * 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:
7991 new.h renamed to alloc.h.
7992
7993 1997-06-18 Richard Stallman <rms@gnu.org>
7994
7995 * Makefile.in: new.h renamed to alloc.h.
7996
7997 1997-05-24 Richard Stallman <rms@gnu.org>
7998
7999 * src/lex.c (literalchar):
8000 Fix the code for escaping \, " and '.
8001
8002 (lex): Avoid trouble when there are many chars
8003 to discard in a char literal with just several chars in it.
8004
8005 1997-05-17 Richard Stallman <rms@gnu.org>
8006
8007 * src/bison.s1:
8008 Use malloc, if using alloca is troublesome.
8009 (YYSTACK_USE_ALLOCA): New flag macro.
8010 Define it for some systems and compilers.
8011 (YYSTACK_ALLOC): New macro.
8012 (yyparse): Use YYSTACK_ALLOC to allocate stack.
8013 If it was malloc'd, free it.
8014
8015 1997-05-17 Richard Stallman <rms@gnu.org>
8016
8017 * bison.simple:
8018 Use malloc, if using alloca is troublesome.
8019 (YYSTACK_USE_ALLOCA): New flag macro.
8020 Define it for some systems and compilers.
8021 (YYSTACK_ALLOC): New macro.
8022 (yyparse): Use YYSTACK_ALLOC to allocate stack.
8023 If it was malloc'd, free it.
8024
8025 1997-04-23 Richard Stallman <rms@gnu.org>
8026
8027 * src/bison.s1:
8028 (alloca) [__hpux]: Always define as __builtin_alloca.
8029
8030 1997-04-23 Richard Stallman <rms@gnu.org>
8031
8032 * bison.simple:
8033 (alloca) [__hpux]: Always define as __builtin_alloca.
8034
8035 1997-04-22 Richard Stallman <rms@gnu.org>
8036
8037 * src/bison.s1:
8038 [__hpux]: Include alloca.h (right for HPUX 10)
8039 instead of declaring alloca (right for HPUX 9).
8040
8041 * src/bison.s1 (__yy_memcpy):
8042 Declare arg `count' as unsigned int.
8043 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
8044
8045 1997-04-22 Richard Stallman <rms@gnu.org>
8046
8047 * bison.simple:
8048 [__hpux]: Include alloca.h (right for HPUX 10)
8049 instead of declaring alloca (right for HPUX 9).
8050
8051 * bison.simple (__yy_memcpy):
8052 Declare arg `count' as unsigned int.
8053 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
8054
8055 1997-01-03 Richard Stallman <rms@gnu.org>
8056
8057 * src/allocate.c: [__STDC__ or _MSC_VER]:
8058 Declare calloc and realloc to return void *.
8059
8060 1997-01-02 Richard Stallman <rms@gnu.org>
8061
8062 * src/system.h:
8063 [_MSC_VER]: Include stdlib.h and process.h.
8064 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
8065
8066 * src/main.c (main): Return FAILURE as a value.
8067 (printable_version): Declare arg as int, not char.
8068
8069 1997-01-02 Richard Stallman <rms@gnu.org>
8070
8071 * Makefile.in (dist):
8072 Explicitly check for symlinks, and copy them.
8073
8074 1996-12-19 Richard Stallman <rms@gnu.org>
8075
8076 * src/files.c:
8077 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
8078
8079 1996-12-18 Paul Eggert <eggert@gnu.org>
8080
8081 * src/bison.s1 (yyparse):
8082 If __GNUC__ and YYPARSE_PARAM are both defined,
8083 declare yyparse to have a void * argument.
8084
8085 1996-12-18 Paul Eggert <eggert@gnu.org>
8086
8087 * bison.simple (yyparse):
8088 If __GNUC__ and YYPARSE_PARAM are both defined,
8089 declare yyparse to have a void * argument.
8090
8091 1996-12-17 Richard Stallman <rms@gnu.org>
8092
8093 * src/reduce.c (nbits): Add some casts.
8094
8095 1996-08-12 Richard Stallman <rms@gnu.org>
8096
8097 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
8098
8099 1996-08-12 Richard Stallman <rms@gnu.org>
8100
8101 * bison.simple: Test _MSDOS as well as _MSDOS_.
8102
8103 1996-07-31 Richard Stallman <rms@gnu.org>
8104
8105 * src/bison.s1:
8106 [__sun && __i386]: Include alloca.h.
8107
8108 1996-07-31 Richard Stallman <rms@gnu.org>
8109
8110 * bison.simple:
8111 [__sun && __i386]: Include alloca.h.
8112
8113 1996-07-30 Richard Stallman <rms@gnu.org>
8114
8115 * src/bison.s1: Comment change.
8116
8117 * src/bison.s1: Test _MSDOS_, not MSDOS.
8118
8119 1996-07-30 Richard Stallman <rms@gnu.org>
8120
8121 * bison.simple: Comment change.
8122
8123 * bison.simple: Test _MSDOS_, not MSDOS.
8124
8125 1996-06-01 Richard Stallman <rms@gnu.org>
8126
8127 * 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:
8128 Insert `_' macro around many string constants.
8129
8130 * src/main.c:
8131 Insert `_' macro around many string constants.
8132
8133 (main): Call setlocale, bindtextdomain and textdomain.
8134
8135 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
8136 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
8137 [ENABLE_NLS]: Include libintl.h.
8138 [ENABLE_NLS] (gettext): Define.
8139 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
8140 (N_, PACKAGE, LOCALEDIR): New macros.
8141
8142 1996-06-01 Richard Stallman <rms@gnu.org>
8143
8144 * POTFILES.in: New file.
8145
8146 * Makefile.in (allocate.o):
8147 Define target explicitly.
8148
8149 * Makefile.in (CFLAGS): Set to @CFLAGS@.
8150 (LDFLAGS): Set to @LDFLAGS@.
8151 (configure): Run autoconf only if preceding `cd' succeeds.
8152 (bison.s1): Redirect output to temporary file then move the
8153 temporary to the target, rather than redirecting directly to bison.s1.
8154 (clean): Remove config.status and config.log.
8155 (distclean): Don't remove config.status here.
8156
8157 1996-05-12 Richard Stallman <rms@gnu.org>
8158
8159 * src/bison.s1:
8160 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
8161
8162 1996-05-12 Richard Stallman <rms@gnu.org>
8163
8164 * bison.simple:
8165 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
8166
8167 1996-05-11 Richard Stallman <rms@gnu.org>
8168
8169 * src/bison.s1 (__yy_memcpy):
8170 Really reorder the args, as was supposedly done on Feb 14 1995.
8171 (yyparse): Calls changed accordingly.
8172
8173 1996-05-11 Richard Stallman <rms@gnu.org>
8174
8175 * Makefile.in (dist): Don't use $(srcdir).
8176
8177 * bison.simple (__yy_memcpy):
8178 Really reorder the args, as was supposedly done on Feb 14 1995.
8179 (yyparse): Calls changed accordingly.
8180
8181 1996-01-27 Richard Stallman <rms@gnu.org>
8182
8183 * src/output.c (output_rule_data):
8184 Test YYERROR_VERBOSE in the conditional
8185 around the definition of ttyname.
8186
8187 1995-12-29 Richard Stallman <rms@gnu.org>
8188
8189 * src/bison.s1:
8190 Fix line numbers in #line commands.
8191
8192 1995-12-29 Richard Stallman <rms@gnu.org>
8193
8194 * bison.simple:
8195 Fix line numbers in #line commands.
8196
8197 1995-12-27 Richard Stallman <rms@gnu.org>
8198
8199 * src/bison.s1 (YYPARSE_PARAM_DECL):
8200 In C++, make it always null.
8201 (YYPARSE_PARAM_ARG): New macro.
8202 (yyparse): Use YYPARSE_PARAM_ARG.
8203
8204 1995-12-27 Richard Stallman <rms@gnu.org>
8205
8206 * bison.simple (YYPARSE_PARAM_DECL):
8207 In C++, make it always null.
8208 (YYPARSE_PARAM_ARG): New macro.
8209 (yyparse): Use YYPARSE_PARAM_ARG.
8210
8211 1995-11-29 Richard Stallman <rms@gnu.org>
8212
8213 * doc/bison.texinfo:
8214 Describe literal string tokens, %raw, %no_lines, %token_table.
8215
8216 1995-11-29 Daniel Hagerty <hag@gnu.org>
8217
8218 * doc/bison.texinfo: Fixed update date
8219
8220 1995-10-16 Richard Stallman <rms@gnu.org>
8221
8222 * src/version.c: Version 1.25.
8223
8224 1995-10-16 Richard Stallman <rms@gnu.org>
8225
8226 * NEWS: *** empty log message ***
8227
8228 1995-10-16 Richard Stallman <rms@gnu.org>
8229
8230 * doc/bison.1, doc/bison.rnh:
8231 Add new options.
8232
8233 1995-10-15 Richard Stallman <rms@gnu.org>
8234
8235 * src/vmsgetargs.c, src/getargs.c:
8236 Added -n, -k, and -raw switches.
8237 (noparserflag, toknumflag, rawtoknumflag): New variables.
8238
8239 * src/symtab.h (SALIAS):
8240 New #define for adding aliases to %token.
8241 (struct bucket): Added `alias' field.
8242
8243 * src/reduce.c (reduce_grammar):
8244 Revise error message.
8245 (print_notices): Remove final `.' from error message.
8246
8247 * src/reader.c (reader_output_yylsp):
8248 New function.
8249 (readgram): Use `#if 0' around code that accepted %command
8250 inside grammar rules: The documentation doesn't allow it,
8251 and it will fail since the %command processors scan for the next %.
8252 (parse_token_decl): Extended the %token
8253 declaration to allow a multi-character symbol as an alias.
8254 (parse_thong_decl): New function.
8255 (read_declarations): Added %thong declarations.
8256 (read_declarations): Handle NOOP to deal with allowing
8257 % declarations as another means to specify the flags.
8258 (readgram): Allow %prec prior to semantics embedded in a rule.
8259 (skip_to_char, read_declarations, copy_definition)
8260 (parse_token_decl, parse_start_decl, parse_type_decl)
8261 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
8262 (get_type_name, copy_guard, copy_action, readgram)
8263 (get_type, packsymbols): Revised most error messages.
8264 Changed `fatal' to `warnxxx' to avoid aborting for error.
8265 Revised and use multiple warnxxx functions to avoid using VARARGS1.
8266 (read_declarations): Improve the error message for
8267 an invalid character. Do not abort.
8268 (read_declarations, copy_guard, copy_action): Use
8269 printable_version to avoid unprintable characters in printed output.
8270 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
8271 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
8272 Allow the type of a non-terminal can be given
8273 more than once, as long as all specifications give the same type.
8274
8275 * src/output.c:
8276 (output_headers, output_trailers, output, output_gram)
8277 (output_rule_data): Implement noparserflag variable.
8278 Implement toknumflag variable.
8279 (output): Call reader_output_yylsp to output LTYPESTR.
8280
8281 * src/main.c (main):
8282 If reader sees an error, don't process the grammar.
8283 (fatals): Updated to not use VARARGS1.
8284 (printable_version, int_to_string, warn, warni, warns, warnss)
8285 (warnsss): New error reporting functions. Avoid abort for error.
8286
8287 * src/lex.h:
8288 Added THONG and NOOP for alias processing.
8289 Added SETOPT for the new code that allows setting options with %flags.
8290
8291 * src/lex.c:
8292 Include getopt.h. Add some extern decls.
8293 (safegetc): New function to deal with EOF gracefully.
8294 (literalchar); new function to deal with reading \ escapes.
8295 (lex): Use literalchar.
8296 (lex): Implemented "..." tokens.
8297 (literalchar, lex, parse_percent_token): Made tokenbuffer
8298 always contain the token. This includes growing the token
8299 buffer while reading an integer.
8300 (parse_percent_token): Replaced if-else statement with percent_table.
8301 (parse_percent_token): Added % declarations as another
8302 way to specify the flags -n, -l, and -r. Also added hooks for
8303 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
8304 major changes to files.c.
8305 (lex) Retain in the incoming stream a character following
8306 an incorrect '/'.
8307 (skip_white_space, lex): Revised most error messages
8308 and changed fatal to warn to avoid aborting.
8309 (percent_table): Added %thong declarations.
8310
8311 * src/gram.h: Comment changes.
8312
8313 * src/files.c (openfiles, open_extra_files, done):
8314 Add faction flag
8315 and actfile file. Handle noparserflag. Both for -n switch.
8316
8317 * src/conflicts.c (resolve_sr_conflict):
8318 Remove use of alloca.
8319
8320 1995-06-01 Jim Meyering <meyering@gnu.org>
8321
8322 * doc/bison.texinfo: *** empty log message ***
8323
8324 1995-05-06 Richard Stallman <rms@gnu.org>
8325
8326 * src/bison.s1: Comment change.
8327
8328 1995-05-06 Richard Stallman <rms@gnu.org>
8329
8330 * bison.simple: Comment change.
8331
8332 1995-05-03 Richard Stallman <rms@gnu.org>
8333
8334 * src/version.c: Version now 1.24.
8335
8336 * src/bison.s1: Change distribution terms.
8337
8338 * src/version.c: Version now 1.23.
8339
8340 1995-05-03 Richard Stallman <rms@gnu.org>
8341
8342 * doc/bison.texinfo:
8343 Rewrite "Conditions for Using Bison".
8344 Update version to 1.24.
8345
8346 1995-05-03 Richard Stallman <rms@gnu.org>
8347
8348 * bison.simple: Change distribution terms.
8349
8350 1995-02-23 Richard Stallman <rms@gnu.org>
8351
8352 * src/files.c: Test __VMS_POSIX as well as VMS.
8353
8354 1995-02-14 Jim Meyering <meyering@gnu.org>
8355
8356 * src/bison.s1 (__yy_memcpy):
8357 Renamed from __yy_bcopy to avoid
8358 confusion. Reverse FROM and TO arguments to be consistent with
8359 those of memcpy.
8360
8361 1995-02-14 Jim Meyering <meyering@gnu.org>
8362
8363 * bison.simple (__yy_memcpy):
8364 Renamed from __yy_bcopy to avoid
8365 confusion. Reverse FROM and TO arguments to be consistent with
8366 those of memcpy.
8367
8368 1994-11-10 David J. MacKenzie <djm@gnu.org>
8369
8370 * NEWS: reformat
8371
8372 * NEWS: New file.
8373
8374 * Makefile.in (DISTFILES): Include NEWS.
8375
8376 * Makefile.in (DISTFILES):
8377 Include install-sh, not install.sh.
8378
8379 * configure.in: Update to Autoconf v2 macro names.
8380
8381 1994-10-05 David J. MacKenzie <djm@gnu.org>
8382
8383 * Makefile.in: fix typo
8384
8385 * Makefile.in (prefix, exec_prefix):
8386 Let configure set them.
8387
8388 1994-09-28 David J. MacKenzie <djm@gnu.org>
8389
8390 * Makefile.in: Set datadir to $(prefix)/share.
8391
8392 1994-09-15 Richard Stallman <rms@gnu.org>
8393
8394 * src/bison.s1:
8395 Update copyright notice and GPL version.
8396
8397 1994-09-15 Richard Stallman <rms@gnu.org>
8398
8399 * bison.simple:
8400 Update copyright notice and GPL version.
8401
8402 1994-07-12 Richard Stallman <rms@gnu.org>
8403
8404 * src/reduce.c, src/reader.c:
8405 entered into RCS
8406
8407 1994-05-05 David J. MacKenzie <djm@gnu.org>
8408
8409 * Makefile.in: entered into RCS
8410
8411 1994-03-26 Richard Stallman <rms@gnu.org>
8412
8413 * src/bison.s1: entered into RCS
8414
8415 1994-03-26 Richard Stallman <rms@gnu.org>
8416
8417 * bison.simple: entered into RCS
8418
8419 1994-03-25 Richard Stallman <rms@gnu.org>
8420
8421 * src/main.c: entered into RCS
8422
8423 1994-03-24 Richard Stallman <rms@gnu.org>
8424
8425 * src/conflicts.c: entered into RCS
8426
8427 1994-01-02 Richard Stallman <rms@gnu.org>
8428
8429 * Makefile.in: *** empty log message ***
8430
8431 1993-11-21 Richard Stallman <rms@gnu.org>
8432
8433 * src/bison.s1: *** empty log message ***
8434
8435 1993-11-21 Richard Stallman <rms@gnu.org>
8436
8437 * doc/bison.texinfo: entered into RCS
8438
8439 * doc/bison.texinfo: *** empty log message ***
8440
8441 1993-11-21 Richard Stallman <rms@gnu.org>
8442
8443 * bison.simple: *** empty log message ***
8444
8445 1993-10-25 David J. MacKenzie <djm@gnu.org>
8446
8447 * doc/bison.texinfo: *** empty log message ***
8448
8449 1993-10-19 Richard Stallman <rms@gnu.org>
8450
8451 * src/bison.s1: *** empty log message ***
8452
8453 1993-10-19 Richard Stallman <rms@gnu.org>
8454
8455 * bison.simple: *** empty log message ***
8456
8457 1993-10-14 Richard Stallman <rms@gnu.org>
8458
8459 * src/bison.s1: *** empty log message ***
8460
8461 1993-10-14 Richard Stallman <rms@gnu.org>
8462
8463 * bison.simple: *** empty log message ***
8464
8465 1993-09-14 David J. MacKenzie <djm@gnu.org>
8466
8467 * doc/bison.texinfo: *** empty log message ***
8468
8469 1993-09-13 Noah Friedman <friedman@gnu.org>
8470
8471 * Makefile.in: *** empty log message ***
8472
8473 1993-09-10 Richard Stallman <rms@gnu.org>
8474
8475 * src/conflicts.c: *** empty log message ***
8476
8477 * src/system.h: entered into RCS
8478
8479 1993-09-10 Richard Stallman <rms@gnu.org>
8480
8481 * doc/bison.1: entered into RCS
8482
8483 1993-09-06 Noah Friedman <friedman@gnu.org>
8484
8485 * src/version.c: entered into RCS
8486
8487 1993-09-06 Noah Friedman <friedman@gnu.org>
8488
8489 * Makefile.in: *** empty log message ***
8490
8491 1993-07-30 David J. MacKenzie <djm@gnu.org>
8492
8493 * Makefile.in: *** empty log message ***
8494
8495 1993-07-24 Richard Stallman <rms@gnu.org>
8496
8497 * src/bison.s1: *** empty log message ***
8498
8499 1993-07-24 Richard Stallman <rms@gnu.org>
8500
8501 * bison.simple: *** empty log message ***
8502
8503 1993-07-08 David J. MacKenzie <djm@gnu.org>
8504
8505 * Makefile.in: *** empty log message ***
8506
8507 1993-07-04 Richard Stallman <rms@gnu.org>
8508
8509 * src/bison.s1: *** empty log message ***
8510
8511 1993-07-04 Richard Stallman <rms@gnu.org>
8512
8513 * bison.simple: *** empty log message ***
8514
8515 1993-06-26 David J. MacKenzie <djm@gnu.org>
8516
8517 * src/getargs.c: entered into RCS
8518
8519 1993-06-26 David J. MacKenzie <djm@gnu.org>
8520
8521 * doc/bison.texinfo: *** empty log message ***
8522
8523 * doc/bison.1: New file.
8524
8525 1993-06-25 Richard Stallman <rms@gnu.org>
8526
8527 * src/getargs.c: New file.
8528
8529 1993-06-16 Richard Stallman <rms@gnu.org>
8530
8531 * src/bison.s1: *** empty log message ***
8532
8533 1993-06-16 Richard Stallman <rms@gnu.org>
8534
8535 * bison.simple: *** empty log message ***
8536
8537 1993-06-03 Richard Stallman <rms@gnu.org>
8538
8539 * src/bison.s1: New file.
8540
8541 1993-06-03 Richard Stallman <rms@gnu.org>
8542
8543 * doc/bison.texinfo: *** empty log message ***
8544
8545 1993-06-03 Richard Stallman <rms@gnu.org>
8546
8547 * bison.simple: New file.
8548
8549 1993-05-19 Richard Stallman <rms@gnu.org>
8550
8551 * doc/bison.texinfo: New file.
8552
8553 1993-05-07 Noah Friedman <friedman@gnu.org>
8554
8555 * Makefile.in: *** empty log message ***
8556
8557 1993-04-28 Noah Friedman <friedman@gnu.org>
8558
8559 * src/reader.c: *** empty log message ***
8560
8561 1993-04-23 Noah Friedman <friedman@gnu.org>
8562
8563 * src/alloc.h: entered into RCS
8564
8565 1993-04-20 David J. MacKenzie <djm@gnu.org>
8566
8567 * src/version.c: *** empty log message ***
8568
8569 * src/files.c, src/allocate.c:
8570 entered into RCS
8571
8572 * src/reader.c: *** empty log message ***
8573
8574 * src/lex.c: entered into RCS
8575
8576 * src/conflicts.c: New file.
8577
8578 * src/symtab.c: entered into RCS
8579
8580 * src/alloc.h: New file.
8581
8582 * src/LR0.c: entered into RCS
8583
8584 1993-04-18 Noah Friedman <friedman@gnu.org>
8585
8586 * src/reader.c: New file.
8587
8588 * src/version.c: *** empty log message ***
8589
8590 1993-04-18 Noah Friedman <friedman@gnu.org>
8591
8592 * Makefile.in: *** empty log message ***
8593
8594 1993-04-17 Noah Friedman <friedman@gnu.org>
8595
8596 * Makefile.in: *** empty log message ***
8597
8598 1993-04-15 Richard Stallman <rms@gnu.org>
8599
8600 * src/main.c, src/files.c:
8601 New file.
8602
8603 1993-04-15 Noah Friedman <friedman@gnu.org>
8604
8605 * configure.in: entered into RCS
8606
8607 * configure.in: *** empty log message ***
8608
8609 * configure.in: New file.
8610
8611 1993-04-14 Richard Stallman <rms@gnu.org>
8612
8613 * Makefile.in: New file.
8614
8615 1993-04-13 Richard Stallman <rms@gnu.org>
8616
8617 * src/version.c: New file.
8618
8619 1993-03-25 Richard Stallman <rms@gnu.org>
8620
8621 * src/output.c: entered into RCS
8622
8623 1992-09-25 Richard Stallman <rms@gnu.org>
8624
8625 * configure.bat: entered into RCS
8626
8627 1992-06-22 Richard Stallman <rms@gnu.org>
8628
8629 * src/vmsgetargs.c: entered into RCS
8630
8631 1992-06-22 Richard Stallman <rms@gnu.org>
8632
8633 * doc/bison.rnh: entered into RCS
8634
8635 1992-04-20 David J. MacKenzie <djm@gnu.org>
8636
8637 * README: entered into RCS
8638
8639 1992-01-22 Richard Stallman <rms@gnu.org>
8640
8641 * src/machine.h: entered into RCS
8642
8643 1991-12-21 Richard Stallman <rms@gnu.org>
8644
8645 * src/lalr.c, src/closure.c:
8646 entered into RCS
8647
8648 1991-12-20 Richard Stallman <rms@gnu.org>
8649
8650 * src/state.h: entered into RCS
8651
8652 1991-12-18 Richard Stallman <rms@gnu.org>
8653
8654 * src/print.c, src/nullable.c, src/derives.c:
8655 entered into RCS
8656
8657 1991-11-03 David J. MacKenzie <djm@gnu.org>
8658
8659 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
8660 entered into RCS
8661
8662 1988-09-09 Richard Stallman <rms@gnu.org>
8663
8664 * src/bison.hairy: entered into RCS
8665
8666 1987-12-16 Richard Stallman <rms@gnu.org>
8667
8668 * REFERENCES: entered into RCS
8669 -----
8670
8671 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
8672
8673 This file is part of GNU Bison.
8674
8675 GNU Bison is free software; you can redistribute it and/or modify
8676 it under the terms of the GNU General Public License as published by
8677 the Free Software Foundation; either version 2, or (at your option)
8678 any later version.
8679
8680 GNU Bison is distributed in the hope that it will be useful,
8681 but WITHOUT ANY WARRANTY; without even the implied warranty of
8682 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8683 GNU General Public License for more details.
8684
8685 You should have received a copy of the GNU General Public License
8686 along with GNU Bison; see the file COPYING. If not, write to
8687 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
8688 Boston, MA 02111-1307, USA.