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