]> git.saurik.com Git - bison.git/blame - ChangeLog
* src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as MUSCLE_TAB_H.
[bison.git] / ChangeLog
CommitLineData
e76d2469
PE
12002-10-16 Paul Eggert <eggert@twinsun.com>
2
93e2236a
PE
3 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
4 MUSCLE_TAB_H.
5
e76d2469
PE
6 * NEWS: Officially drop support for building Bison with K&R C,
7 since it didn't work anyway and it's not worth worrying about.
8 * Makefile.maint (wget_files): Remove ansi2knr.c.
9 (ansi2knr.c-url_prefix): Remove.
10 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
11 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
12 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
13
5bd1c419
PE
142002-10-15 Paul Eggert <eggert@twinsun.com>
15
16 Stop using the "enum_" trick for K&R-style function definitions;
17 it confused me, and I was the author! Instead, assume that people
18 who want to use K&R C compilers (when using these modules in GCC,
19 perhaps?) will run ansi2knr.
20
21 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
22 All uses of "enum_" changed to "enum ".
23 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
24 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
e76d2469 25
5bd1c419
PE
26 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
27 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
28 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
29 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
30 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
31 abitset_not, abitset_ones, abitset_or, abitset_or_and,
32 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
33 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
34 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
35 Use function prototypes; this removes the need for declaring
36 static functions simply to provide their prototypes.
37 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
38 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
39 bitset_count_, bitset_create, bitset_dump, bitset_first,
40 bitset_free, bitset_init, bitset_last, bitset_next,
41 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
42 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
43 bitset_print, bitset_release_memory, bitset_toggle_,
44 bitset_type_choose, bitset_type_get, bitset_type_name_get,
45 debug_bitset): Likewise.
46 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
47 * lib/bitset_stats.c (bitset_log_histogram_print,
48 bitset_percent_histogram_print, bitset_stats_and,
49 bitset_stats_and_cmp, bitset_stats_and_or,
50 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
51 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
52 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
53 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
54 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
55 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
56 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
57 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
58 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
59 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
60 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
61 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
62 bitset_stats_zero): Likewise.
63 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
64 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
65 bitsetv_dump, debug_bitsetv): Likewise.
66 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
67 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
68 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
69 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
70 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
71 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
72 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
73 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
74 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
75 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
76 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
77 Likewise.
78 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
79 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
80 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
81 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
82 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
83 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
84 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
85 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
86 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
87 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
88 lbitset_xor_cmp, lbitset_zero): Likewise.
e76d2469 89
ae26e1f0
AD
902002-10-14 Akim Demaille <akim@epita.fr>
91
92 Version 1.75.
93
d43baf71
AD
942002-10-14 Akim Demaille <akim@epita.fr>
95
96 * tests/Makefile.am (maintainer-check-posix): New.
97
7ebc83e3
AD
982002-10-14 Akim Demaille <akim@epita.fr>
99
100 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
101 member.
102
05846dae
AD
1032002-10-14 Akim Demaille <akim@epita.fr>
104
105 * src/tables.c (table_ninf_remap): base -> tab.
106 Reported by Matt Rosing.
107
1318e37d
PE
1082002-10-14 Paul Eggert <eggert@twinsun.com>
109
447fbb17
PE
110 * tests/action.at, tests/calc.at, tests/conflicts.at,
111 tests/cxx-type.at, tests/headers.at, tests/input.at,
112 tests/regression.at, tests/synclines.at, tests/torture.at:
113 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
114 so that the tests still work even if POSIXLY_CORRECT is set.
115 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
05846dae 116
1318e37d
PE
117 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
118 for portability to K&R hosts. Fix typo: signed char is guaranteed
119 only to 127, not to 128.
120 * data/glr.c (yysigned_char): New type.
121 * data/yacc.c (yysigned_char): Likewise.
122 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
123
cc0f0794
PE
1242002-10-13 Paul Eggert <eggert@twinsun.com>
125
5038f418
PE
126 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
127 true due to limited range of data type" warning from GCC.
128
cc0f0794
PE
129 * data/c.m4 (b4_token_defines): Protect against double-inclusion
130 by wrapping enum yytokentype's definition inside #ifndef
131 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
132
6fed0802
AD
1332002-10-13 Akim Demaille <akim@epita.fr>
134
135 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
136 Un yy- yyrhs to avoid the name clash with the global YYRHS.
137
32f0598d
AD
1382002-10-13 Akim Demaille <akim@epita.fr>
139
140 * Makefile.maint: Update from Autoconf 2.54.
141 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
142
7ea9a33f
AD
1432002-10-13 Akim Demaille <akim@epita.fr>
144
145 * src/print.c (print_state): Separate the list of solved conflicts
146 from the other items.
147 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
148
ea99527d
AD
1492002-10-13 Akim Demaille <akim@epita.fr>
150
151 Let nondeterministic skeletons be usable with deterministic
152 tables.
153
154 With the patch, GAWK compiled by GCC without -O2 passes its test
155 suite using a GLR parser driven by LALR tables. It fails with -O2
156 because `struct stat' gives two different answers on my machine:
157 88 (definition of an auto var) and later 96 (memset on this var).
158 Hence the stack is badly corrumpted. The headers inclusion is to
159 blame: if I move the awk.h inclusion before GLR's system header
160 inclusion, the two struct stat have the same size.
161
162 * src/tables.c (pack_table): Always create conflict_table.
163 (token_actions): Always create conflict_list.
164 * data/glr.c (YYFLAG): Remove, unused.
165
f377f69f
AD
1662002-10-13 Akim Demaille <akim@epita.fr>
167
168 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
169 (O0FLAGS): New.
170 (VALGRIND, GXX): New.
171 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
172 * tests/bison.in: Run $PREBISON a pre-command.
173 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
174 (maintainer-check-g++): New.
175 * Makefile.am (maintainer-check): New.
176
2a1fe6ed
AD
1772002-10-13 Akim Demaille <akim@epita.fr>
178
179 * data/glr.c: Formatting changes.
180 Tweak some trace messages to match yacc.c's.
181
f50adbbd
AD
1822002-10-13 Akim Demaille <akim@epita.fr>
183
184 GLR parsers sometimes raise parse errors instead of performing the
185 default reduction.
186 Reported by Charles-Henry de Boysson.
187
188 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
189 check the length of the traces when %glr.
190 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
191 GLR's traces.
192 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
193 Test GLR parsers.
194 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
195 (yyltype): Remove the yy prefix from the member names.
196 (yytable): Complete its comment.
197 (yygetLRActions): Map error action number from YYTABLE from
198 YYTABLE_NINF to 0.
199 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
200 (which was a bug: it should have been YYTABEL_NINF, and yet it was
201 not satisfying as we could compare an YYACTION computed from
202 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
203 only value for error actions.
204 (yyreportParseError): In verbose parse error messages, don't issue
205 `error' in the list of expected tokens.
206 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
207 next action to perform to match glr.c's decoding.
208 (yytable): Complete its comment.
209
bcbad5b9
PE
2102002-10-13 Paul Eggert <eggert@twinsun.com>
211
212 Fix problem reported by Henrik Grubbstroem in
213 <http://mail.gnu.org/pipermail/bug-bison/2002-October/001670.html>:
214 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
215 because the Bison parser reads the second action before reducing
216 the first one.
217 * src/scan-gram.l (rule_length): New static var.
218 Use it to keep track of the rule length in the scanner, since
219 we can't expect the parser to be in lock-step sync with the scanner.
220 (handle_action_dollar, handle_action_at): Use this var.
221 * tests/actions.at (Exotic Dollars): Test for the problem.
05846dae 222
14904b89
PE
2232002-10-12 Paul Eggert <eggert@twinsun.com>
224
1fe611e5
PE
225 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
226 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
227 Include <sys/time.h> when checking for clock_t and struct tms.
228 Use same include order as source.
229 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
230 <http://mail.gnu.org/pipermail/bug-bison/2002-October/001674.html>.
05846dae 231
1fe611e5
PE
232 * lib/timevar.c: Update copyright date and clarify comments.
233 (get_time) [IN_GCC]: Keep the GCC version for reference.
05846dae 234
1fe611e5
PE
235 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
236 GCC version as of today, then merge Bison's changes.
237 Change "GCC" to "Bison" in copyright notice. timevar.def's
238 author is Akim, so change that too.
239
98194095
PE
240 * src/reader.c (grammar_current_rule_check):
241 Don't worry about the default action if $$ is untyped.
242 Prevents bogus warnings reported by Jim Gifford in
243 <http://mail.gnu.org/pipermail/bug-bison/2002-October/001673.html>.
244
14904b89
PE
245 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
246 * data/glr.c, data/lalr1.cc, data/yacc.c:
247 Output token definitions before the first part of user declarations.
248 Fixes compatibility problem reported by Jim Gifford for kbd in
249 <http://mail.gnu.org/pipermail/bug-bison/2002-October/001672.html>.
250
ff6dca18
PE
2512002-10-11 Paul Eggert <eggert@twinsun.com>
252
253 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
254 (yyparse): here. This undoes some of the 2002-07-25 change.
255 Compatibility problem reported by Ralf S. Engelschall with
256 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
257
eb714592
AD
2582002-10-11 Akim Demaille <akim@epita.fr>
259
260 * tests/regression.at Characters Escapes): New.
261 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
262 characters.
263 Reported by Jan Nieuwenhuizen.
264
b7195100
AD
2652002-10-11 Akim Demaille <akim@epita.fr>
266
267 * po/id.po: New.
268
f28a0f2d
PE
2692002-10-10 Paul Eggert <eggert@twinsun.com>
270
271 Portability fixes for bitsets; this also avoids several GCC
272 warnings.
273
274 * lib/abitset.c: Include <stddef.h>, for offsetof.
275 * lib/lbitset.c: Likewise.
276
277 * lib/abitset.c (abitset_bytes): Return a size that is aligned
278 properly for vectors of objects. Do not assume that adding a
279 header size to a multiple of a word size yields a value that is
280 properly aligned for the whole union.
281 * lib/bitsetv.c (bitsetv_alloc): Likewise.
282
283 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
284 unique names for structures.
285 * lib/ebitset.c (ebitset_bytes): Likewise.
286 * lib/lbitset.c (lbitset_bytes): Likewise.
287
288 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
289 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
290 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
291 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
292 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
293 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
294 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
295 to improve the type-checking that GCC can do.
296 * lib/bitset.c (bitset_op4_cmp): Likewise.
297 * lib/bitset_stats.c (bitset_stats_count,
298 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
299 bitset_stats_copy, bitset_stats_disjoint_p,
300 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
301 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
302 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
303 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
304 bitset_stats_and_or_cmp, bitset_stats_andn_or,
305 bitset_stats_andn_or_cmp, bitset_stats_or_and,
306 bitset_stats_or_and_cmp): Likewise.
307 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
308 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
309 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
310 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
311
312 * lib/abitset.h: Include bitset.h, not bbitset.h.
313 * lib/ebitset.h: Likewise.
314 * lib/lbitset.h: Likewise.
315
316 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
317 All instances of parameters of type enum bitset_opts are now of
318 type enum_bitset_opts, to conform to the C Standard, and similarly
319 for enum_bitset_type.
320 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
321 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
322
323 Do not use "struct bitset_struct" to mean different things in
324 different modules. Not only is this confusing, it violates
325 the C Standard, which requires that structure types in different
326 modules must be compatible if one is to be passed to the other.
327 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
328 All instances of "struct bitset_struct *" replaced with "bitset".
329 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
330 (union bitset_union, struct abitset_struct, struct ebitset_struct,
331 struct lbitset_struct, struct bitset_stats_struct): New types.
332 All uses of struct bitset_struct changed to union bitset_union,
333 etc.
334 * lib/abitset.c (struct abitset_struct, abitset,
335 struct bitset_struct): Remove.
336 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
337 struct bitset_struct): Remove.
338 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
339 bitset_struct): Remove.
340 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
341 Likewise.
342
343 Do not call a function of type T using a call that assumes the
344 function is of a different type U. Standard C requires that a
345 function must be called with a type that is compatible with its
346 definition.
347 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
348 New decls.
349 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
350 New functions.
351 * lib/ebitset.c (PFV): Remove.
352 * lib/lbitset.c (PFV): Likewise.
353 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
354 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
355 decls.
356 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
357 (ebitset_vtable): Use them.
358 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
359 lbitset_xor): New functions.
360 (lbitset_vtable): Use them.
361
362 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
363 Declare.
364
365 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
366 GCC warning.
367 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
368 Use offsetof, for simplicity.
369
6fbe4984
PE
3702002-10-06 Paul Eggert <eggert@twinsun.com>
371
372 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
373 the same width as int. This reapplies a hunk of the 2002-08-12 patch
374 <http://mail.gnu.org/pipermail/bison-patches/2002-August/001111.html>,
375 which was inadvertently undone by the 2002-09-30 patch.
376 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
377 the same width as int.
378
420f93c8
PE
3792002-10-04 Paul Eggert <eggert@twinsun.com>
380
381 Version 1.50.
382
383 * configure.ac (AC_INIT), NEWS: Increment version number.
384
385 * doc/bison.texinfo: Minor spelling, grammar, and white space
386 fixes.
387 (Symbols): Mention that any negative value returned from yylex
388 signifies end-of-input. Warn about negative chars. Mention
389 the portable Standard C character set.
390
391 The GNU coding standard says CFLAGS and YFLAGS are reserved
392 for the installer to set.
393 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
394 * src/Makefile.am (AM_CFLAGS): Likewise.
395 (AM_YFLAGS): Renamed from YFLAGS.
396
397 Fix some MAX and MIN problems.
398 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
399 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
400 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
401 * src/reader.c (reader): Use it.
402
403 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
404 POSIX 1003.1-2001 has removed fgrep.
405
4062002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
407
408 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
409 interpreted as signed.
410 * lib/ebitset.c (ebitset_list): Fix bug.
411
ff68026d
PE
4122002-10-01 Paul Eggert <eggert@twinsun.com>
413
414 More fixes for 64-bit hosts and large bitsets.
415
416 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
417 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
418 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
419 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
420 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
421 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
422 bitset_count_): Likewise.
423 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
424 bitset_first, bitset_last): Likewise.
425 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
426 bitset_stats_list_reverse, bitset_stats_size,
427 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
428 Likewise.
429 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
430 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
431 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
432 bitsetv_reflexive_transitive_closure): Likewise.
433 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
434 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
435 Likewise.
436 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
437 Likewise.
420f93c8 438
ff68026d
PE
439 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
440 Use size_t, not unsigned int, to count bytes.
441 * lib/abitset.h (abitset_bytes): Likewise.
442 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
443 Likewise.
444 * lib/bitset.h (bitset_bytes): Likewise.
445 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
446 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
447 * lib/bitsetv.c (bitsetv_alloc): Likewise.
448 * lib/ebitset.c (ebitset_bytes): Likewise.
449 * lib/ebitset.h (ebitset_bytes): Likewise.
450 * lib/lbitset.c (lbitset_bytes): Likewise.
451 * lib/lbitset.h (lbitset_bytes): Likewise.
420f93c8 452
ff68026d
PE
453 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
454 abitset_subset_p, abitset_disjoint_p, abitset_and,
455 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
456 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
457 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
458 abitset_or_and, abitset_or_and_cmp):
459 Use bitset_windex instead of unsigned int.
460 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
461 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
462 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
463 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
464 Likewise.
465 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
420f93c8 466
ff68026d
PE
467 * lib/bitset.c (bitset_print):
468 Use proper printf formats for widths of integer types.
469 * lib/bitset_stats.c (bitset_percent_histogram_print,
470 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
471 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
472 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
473 * lib/lbitset.c (lbitset_bytes): Likewise.
420f93c8 474
ff68026d
PE
475 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
476 BITSET_SIZE_MAX): New macros.
477 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
478 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
479 to BITSET_WINDEX_MAX.
480
481 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
482 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
483 since we now return the bitset_bindex type (not int).
484
485 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
486 when computing sizes.
487 * lib/ebitset.c (ebitset_elts_grow): Likewise.
488
489 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
490 and avoid cast to unsigned.
491
6aa452a6
AD
4922002-09-30 Akim Demaille <akim@epita.fr>
493
494 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
495 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
496 Updates from Michael Hayes.
497
927f7817
AD
4982002-09-30 Art Haas <ahaas@neosoft.com>
499
500 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
501 invocations.
502 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
503 defined.
504
9738f41e
AD
5052002-09-27 Akim Demaille <akim@epita.fr>
506
507 Version 1.49c.
508
a5c75d7f
AD
5092002-09-27 Akim Demaille <akim@epita.fr>
510
511 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
512 (Because of AC_LIBSOURCE).
513
8280e179
AD
5142002-09-27 Akim Demaille <akim@epita.fr>
515
516 Playing with Autoscan.
517
518 * configure.ac: Remove the old LIBOBJ tweaks.
519 (AC_REPLACE_FUNCS): Add strrchr and strtol.
520 * lib/strrchr.c: New.
521 * lib/strtol.c: New, from the Coreutils 4.5.1.
522
ae64af35
AD
5232002-09-27 Akim Demaille <akim@epita.fr>
524
525 Playing with Autoscan.
526
527 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
528 * lib/Makefile.am (libbison_a_SOURCES): No longer include
529 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
530 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
531 Coreutils 4.5.1.
532
d1a1114f
AD
5332002-09-24 Akim Demaille <akim@epita.fr>
534
535 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
536 (Frequently Asked Questions, Parser Stack Overflow): New.
537
b906441c
AD
5382002-09-13 Akim Demaille <akim@epita.fr>
539
540 Playing with autoscan.
541
542 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
543 * src/files.c (skeleton_find): Remove, unused.
544 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
545 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
546
bd701811
AD
5472002-09-13 Akim Demaille <akim@epita.fr>
548
549 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
550 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
551
e0a13e7b
AD
5522002-09-13 Akim Demaille <akim@epita.fr>
553
554 * configure.ac: Require 2.54.
555 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
556 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
557 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
558 Remove, provided by Autoconf macros.
559
c97011bf
AD
5602002-09-12 Akim Demaille <akim@epita.fr>
561
562 * m4/prereq.m4: Update, from Coreutils 4.5.1.
563
d862b1be
AD
5642002-09-12 Akim Demaille <akim@epita.fr>
565
566 * m4/prereq.m4: Update, from Fileutils 4.1.5.
567 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
568 Reported by Martin Mokrejs.
569
3d38c03a
AD
5702002-09-10 Akim Demaille <akim@epita.fr>
571
572 * src/parse-gram.y: Associate a human readable string to each
573 token type.
574 * tests/regression.at (Invalid inputs): Adjust.
575
b6347355
AD
5762002-09-10 Gary V. Vaughan <gary@gnu.org>
577
578 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
579 with an Autoconf-2.5x style configure.ac.
580
09ba4ab2
PE
5812002-09-06 Paul Eggert <eggert@twinsun.com>
582
583 * doc/bison.texinfo (Conditions): Make explicit that the GPL
584 exception applies only to yacc.c. This is a modification of a
585 patch originally suggested by Akim Demaille.
586
21846f69
AD
5872002-09-06 Akim Demaille <akim@epita.fr>
588
09ba4ab2
PE
589 * data/c.m4 (b4_copyright): Move the GPL exception comment from
590 here to...
591 * data/yacc.c: here.
592
21846f69
AD
593 * data/lalr1.cc (struct yyltype): Don't define it, since we use
594 LocationType.
595 (b4_ltype): Default to yy::Location from location.hh.
596
c0ad8bf3
AD
5972002-09-04 Jim Meyering <jim@meyering.net>
598
599 * data/yacc.c: Guard the declaration of yytoknum also with
600 `#ifdef YYPRINT', so it is declared only when used.
601
3a93251e
AD
6022002-09-04 Akim Demaille <akim@epita.fr>
603
604 * configure.in: Rename as...
605 * configure.ac: this.
606 Bump to 1.49c.
607
427c0dda
AD
6082002-09-04 Akim Demaille <akim@epita.fr>
609
610 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
611 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
612 translate maintainer only messages.
613
6a254321
PE
6142002-08-12 Paul Eggert <eggert@twinsun.com>
615
645e30d1
PE
616 Version 1.49b.
617
6a254321
PE
618 * Makefile.am (SUBDIRS): Remove intl.
619 (DISTCLEANFILES): Remove.
620 * NEWS: Mention that GNU M4 is now required. Clarify what is
621 meant by "larger grammars". Mention the pt_BR translation.
622 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
623 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
624 Bump version from 0.11.2 to 0.11.5.
625 (BISON_PREREQ_STAGE): Remove.
626 (AM_GNU_GETTEXT): Use external gettext.
627 (AC_OUTPUT): Remove intl/Makefile.
628
629 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
630
631 * data/glr.c: Include string.h, for strlen.
632 (yyreportParseError): Use size_t for yysize.
633 (yy_yypstack): No longer nested inside yypstates, as nested
634 functions are not portable. Do not assume size_t is the
635 same width as int.
636 (yypstates): Do not assume that ptrdiff_t is the same width
637 as int, and similarly for yyposn and YYINDEX.
638
639 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
640
641 * lib/Makefile.am (INCLUDES): Do not include from the intl
642 directory, which has been removed.
643 * src/Makefile.am (INCLUDES): Likewise.
644
645 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
646 (bitsets_sources, additional_bitsets_sources, timevars_sources):
647 New vars.
648
649 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
650 * tests/Makefile.am (EXTRA_DIST): Likewise.
651
652 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
653 Do not assume that bitset_windex is the same width as unsigned.
654
655 * lib/abitset.c (abitset_unused_clear): Do not assume that
656 bitset_word is the same width as int.
657 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
658 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
659 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
660 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
661 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
662
663 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
664 portability to one's complement hosts!).
665 * lib/ebitset.c (ebitset_op1): Likewise.
666 * lib/lbitset.c (lbitset_op1): Likewise.
667
668 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
669 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
670 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
671 Sync with fileutils.
672 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
673 lib/gettext.h: Sync with diffutils.
674
675 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
676 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
677
678 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
679 PROTOTYPES to check for prototypes, and "defined __STDC__" to
680 check for void *.
681
682 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
683 size_t; the old version tried to do this but casted improperly.
684 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
685 (bitset_test): Now returns int, not unsigned long.
686
687 * lib/bitset_stats.c: Include "gettext.h".
688 (_): New macro.
689 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
690 name locals "index", as it generates unnecessary warnings on some
691 hosts that have an "index" function.
692
693 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
694 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
695 they need translation.
696 * src/LR0.c (state_list_append, new_itemsets, get_state,
697 append_states, generate_states): Likewise.
698 * src/assoc.c (assoc_to_string): Likewise.
699 * src/closure.c (print_closure, set_firsts, closure): Likewise.
700 * src/gram.c (grammar_dump): Likewise.
701 * src/injections.c (injections_compute): Likewise.
702 * src/lalr.c (lookaheads_print): Likewise.
703 * src/relation.c (relation_transpose): Likewise.
704 * src/scan-gram.l: Likewise.
705 * src/tables.c (table_grow, pack_vector): Likewise.
706
707 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
708 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
709 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
710 * m4/mbstate_t.m4: Sync with fileutils.
711 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
712
713 * po/LINGUAS: Add pt_BR.
714 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
715 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
716 lib/timevar.c.
717 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
718 manual recommends.
719 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
720
721 * src/complain.c (strerror_r): Remove decl; not needed.
722 (strerror): Use same pattern as ../lib/error.c.
723
724 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
725
726 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
727
728 * src/main.c (main): Cast result of bindtextdomain and textdomain
729 to void, to avoid a GCC warning when --disable-nls is in effect.
730
731 * src/scan-gram.l: Use strings rather than escapes when possible,
732 to minimize the number of warnings from xgettext.
733 (handle_action_dollar, handle_action_at): Don't use isdigit,
734 as it mishandles negative chars and it may not work as expected
735 outside the C locale.
736
737 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
738 this is a GCC extension and is not portable to other compilers.
739
740 * src/system.h (alloca): Use same pattern as ../lib/error.c.
741 Do not include <ctype.h>; no longer needed.
742 Do not include <malloc.h>; no longer needed (and generates
743 warnings on OpenBSD 3.0).
744
745 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
746 it's not portable.
747
748 * tests/regression.at: Do not use 'cc -c input.c -o input';
749 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
750
751 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
752 exit status as failure, not just exit status 1. Sun C exits
753 with status 2 sometimes.
754
755 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
756 Use it for the two large tests.
757
c8f002c7
AD
7582002-08-02 Akim Demaille <akim@epita.fr>
759
760 * src/conflicts.c (conflicts_output): Don't output rules never
761 reduced here, since anyway that computation doesn't work.
762 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
763 (rule_useless_p, rule_never_reduced_p): New.
764 (grammar_rules_partial_print): Use a filter instead of a range.
765 Display the title only if needed.
766 (grammar_rules_print): Adjust.
767 (grammar_rules_never_reduced_report): New.
768 * src/tables.c (action_row): Move the computation of rules never
769 reduced to...
770 (token_actions): here.
771 * src/main.c (main): Make the parser before making the report, so
772 that rules never reduced are computed.
773 Call grammar_rules_never_reduced_report.
774 * src/print.c (print_results): Report rules never reduced.
775 * tests/conflicts.at, tests/reduce.at: Adjust.
776
cd08e51e
AD
7772002-08-01 Akim Demaille <akim@epita.fr>
778
779 Instead of attaching lookaheads and duplicating the rules being
780 reduced by a state, attach the lookaheads to the reductions.
781
782 * src/state.h (state_t): Remove the `lookaheads',
783 `lookaheads_rule' member.
784 (reductions_t): Add a `lookaheads' member.
785 Use a regular array for the `rules'.
786 * src/state.c (reductions_new): Initialize the lookaheads member
787 to 0.
788 (state_rule_lookaheads_print): Adjust.
789 * src/state.h, src/state.c (state_reductions_find): New.
790 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
791 (count_rr_conflicts): Adjust.
792 * src/lalr.c (LArule): Remove.
793 (add_lookback_edge): Adjust.
794 (state_lookaheads_count): New.
795 (states_lookaheads_initialize): Merge into...
796 (initialize_LA): this.
797 (lalr_free): Adjust.
798 * src/main.c (main): Don't free nullable and derives too early: it
799 is used by --verbose.
800 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
801
bb0027a9
AD
8022002-08-01 Akim Demaille <akim@epita.fr>
803
804 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
805 `rule_number_t**'.
806 (set_derives, free_derives): Rename as...
807 (derives_compute, derives_free): this.
808 Adjust all dependencies.
809 * src/nullable.c (set_nullable, free_nullable): Rename as...
810 (nullable_compute, nullable_free): these.
811 (rule_list_t): Store rule_t *, not rule_number_t.
812 * src/state.c (state_rule_lookaheads_print): Directly compare rule
813 pointers, instead of their numbers.
814 * src/main.c (main): Call nullable_free, and derives_free earlier,
815 as they were lo longer used.
816
3325ddc4
AD
8172002-08-01 Akim Demaille <akim@epita.fr>
818
819 * lib/timevar.c (get_time): Include children time.
820 * src/lalr.h (LA, LArule): Don't export them: used with the
821 state_t.
822 * src/lalr.c (LA, LArule): Static.
823 * src/lalr.h, src/lalr.c (lalr_free): New.
824 * src/main.c (main): Call it.
825 * src/tables.c (pack_vector): Check whether loc is >= to the
826 table_size, not >.
827 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
828 (tables_generate): do it, since that's also it which allocates
829 them.
830 Don't free LA and LArule, main does.
831
c6f1a33c
AD
8322002-07-31 Akim Demaille <akim@epita.fr>
833
834 Separate parser tables computation and output.
835
836 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
837 (conflict_list, conflict_list_cnt, table, check, table_ninf)
838 (yydefgoto, yydefact, high): Move to...
839 * src/tables.h, src/tables.c: here.
840 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
841 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
842 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
843 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
844 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
845 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
846 (action_row, save_row, token_actions, save_column, default_goto)
847 (goto_actions, sort_actions, matching_state, pack_vector)
848 (table_ninf_remap, pack_table, prepare_actions): Move to...
849 * src/tables.c: here.
850 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
851 * src/output.c (token_actions, output_base, output_conflicts)
852 (output_check): Merge into...
853 (prepare_actions): this.
854 (actions_output): Rename as...
855 (user_actions_output): this.
856 * src/main.c (main): Call tables_generate and tables_free.
857
1509d42f
AD
8582002-07-31 Akim Demaille <akim@epita.fr>
859
860 Steal GCC's --time-report support.
861
862 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
863 stolen/adjusted from GCC.
864 * m4/stage.m4: Remove time related checks.
865 * m4/timevar.m4: New.
866 * configure.in: Adjust.
867 * src/system.h: Adjust to using timevar.h.
868 * src/getargs.h, src/getargs.c: Support trace_time for
869 --trace=time.
870 * src/main.c (stage): Remove.
871 (main): Replace `stage' invocations with timevar calls.
872 * src/output.c: Insert pertinent timevar calls.
873
273a74fa
AD
8742002-07-31 Akim Demaille <akim@epita.fr>
875
876 Let --trace have arguments.
877
878 * src/getargs.h (enum trace_e): New.
879 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
880 (long_options, short_options): --trace/-T takes an optional
881 argument.
882 Change all the uses of trace_flag to reflect the new flags.
883 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
884
885 Strengthen `stage' portability.
886
887 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
888 * configure.in: Use it.
889 Don't check for malloc.h and sys/times.h.
890 * src/system.h: Include them when appropriate.
891 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
892 times and struct tms are available.
893
217598da
AD
8942002-07-30 Akim Demaille <akim@epita.fr>
895
896 In verbose parse error message, don't report `error' as an
897 expected token.
898 * tests/actions.at (Printers and Destructors): Adjust.
899 * tests/calc.at (Calculator $1): Adjust.
900 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
901 error message, do not report the parser accepts the error token in
902 that state.
903
52489d44
AD
9042002-07-30 Akim Demaille <akim@epita.fr>
905
906 Normalize conflict related messages.
907
908 * src/complain.h, src/complain.c (warn, complain): New.
909 * src/conflicts.c (conflicts_print): Use them.
910 (conflict_report_yacc): New, extracted from...
911 (conflicts_print): here.
912 * tests/conflicts.at, tests/existing.at: Adjust.
913
e8832397
AD
9142002-07-30 Akim Demaille <akim@epita.fr>
915
916 Report rules which are never reduced by the parser: those hidden
917 by conflicts.
918
919 * src/LR0.c (save_reductions): Don't make the final state too
920 different: save its reduction (accept) instead of having a state
921 without any action (no shift or goto, no reduce).
922 Note: the final state is now a ``regular'' state, i.e., the
923 parsers now contain `reduce 0' as default reduction.
924 Nevertheless, since they decide to `accept' when yystate =
925 final_state, they still will not reduce rule 0.
926 * src/print.c (print_actions, print_reduction): Adjust.
927 * src/output.c (action_row): Track reduced rules.
928 (token_actions): Report rules never reduced.
929 * tests/conflicts.at, tests/regression.at: Adjust.
930
caf23d24
AD
9312002-07-30 Akim Demaille <akim@epita.fr>
932
933 `stage' was accidently included in a previous patch.
934 Initiate its autoconfiscation.
935
936 * configure.in: Look for malloc.h and sys/times.h.
937 * src/main.c (stage): Adjust.
938 Report only when trace_flag.
939
640748ee
AD
9402002-07-29 Akim Demaille <akim@epita.fr>
941
942 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
943 state_number_t.
944 (errs_t): symbol_t*, not symbol_number_t.
945 (reductions_t): rule_t*, not rule_number_t.
946 (FOR_EACH_SHIFT): New.
947 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
948 * src/print.c, src/print_graph.c: Adjust.
949
88bce5a2
AD
9502002-07-29 Akim Demaille <akim@epita.fr>
951
952 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
953
954 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
955 (endtoken, accept): these.
956 * src/reader.c (reader): Set endtoken's default tag to "$end".
957 Set undeftoken's tag to "$undefined" instead of "$undefined.".
958 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
959 Adjust.
960
1bfb97db
AD
9612002-07-29 Akim Demaille <akim@epita.fr>
962
963 * src/reduce.c (reduce_grammar): When the language is empty,
964 complain about the start symbol, not the axiom.
965 Use its location.
966 * tests/reduce.at (Empty Language): New.
967
fc5734fe
AD
9682002-07-26 Akim Demaille <akim@epita.fr>
969
970 * src/reader.h, src/reader.c (gram_error): ... can't get
971 yycontrol without making too strong assumptions on the parser
972 itself.
973 * src/output.c (prepare_tokens): Use the real 0th value of
974 token_translations instead of `0'.
975 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
976 visible here.
977 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
978 for the time being: %locations ought to provide it to yyerror.
979
3650b4b8
AD
9802002-07-25 Akim Demaille <akim@epita.fr>
981
982 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
983 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
984 * tests/regression.at (Web2c Actions): Adjust.
985
4b3d3a8e
AD
9862002-07-25 Akim Demaille <akim@epita.fr>
987
988 Stop storing rules from 1 to nrules + 1.
989
990 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
991 * src/nullable.c, src/output.c, src/print.c, src/reader.c
992 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
993 Iterate from 0 to nrules.
994 Use rule_number_as_item_number and item_number_as_rule_number.
995 Adjust to `derive' now containing possibly 0.
996 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
997 Handle the `- 1' part in rule numbers from/to item numbers.
998 * src/conflicts.c (log_resolution): Fix the message which reversed
999 shift and reduce.
1000 * src/output.c (action_row): Initialize default_rule to -1.
1001 (token_actions): Adjust.
1002 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
1003 expected output.
1004 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
1005
4a2a22f4
AD
10062002-07-25 Akim Demaille <akim@epita.fr>
1007
1008 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
1009 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
1010 (b4_c_knr_arg_decl): New.
1011 * data/yacc.c: Use it to define yysymprint, yydestruct, and
1012 yyreport_parse_error.
1013
b8df3223
AD
10142002-07-25 Akim Demaille <akim@epita.fr>
1015
1016 * data/yacc.c (yyreport_parse_error): New, extracted from...
1017 (yyparse): here.
1018 (yydestruct, yysymprint): Move above yyparse.
1019 Be K&R compliant.
1020
a762e609
AD
10212002-07-25 Akim Demaille <akim@epita.fr>
1022
1023 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
1024 replace...
1025 (b4_sint_type, b4_uint_type): these.
1026 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
1027 * tests/regression.at (Web2c Actions): Adjust.
1028
12b0043a
AD
10292002-07-25 Akim Demaille <akim@epita.fr>
1030
1031 * src/gram.h (TIEM_NUMBER_MAX): New.
1032 (item_number_of_rule_number, rule_number_of_item_number): Rename
1033 as...
1034 (rule_number_as_item_number, item_number_as_rule_number): these.
1035 Adjust dependencies.
1036 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
1037 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
1038 (symbol_number_to_vector_number): New.
1039 (order): Of vector_number_t* type.
1040 (base_t, BASE_MAX, BASE_MIN): New.
1041 (froms, tos, width, pos, check): Of base_t type.
1042 (action_number_t, ACTION_MIN, ACTION_MAX): New.
1043 (actrow): Of action_number_t type.
1044 (conflrow): Of unsigned int type.
1045 (table_ninf, base_ninf): New.
1046 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
1047 (muscle_insert_int_table, muscle_insert_base_table)
1048 (muscle_insert_rule_number_table): New.
1049 (prepare_tokens): Output `toknum' as int_table.
1050 (action_row): Returns a rule_number_t.
1051 Use ACTION_MIN, not SHRT_MIN.
1052 (token_actions): yydefact is rule_number_t*.
1053 (table_ninf_remap): New.
1054 (pack_table): Use it for `base' and `table'.
1055 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
1056 replaced with...
1057 (YYPACT_NINF, YYTABLE_NINF): these.
1058 (yypact, yytable): Compute their types instead of hard-coded
1059 `short'.
1060 * tests/regression.at (Web2c Actions): Adjust.
1061
5dde258a
AD
10622002-07-19 Akim Demaille <akim@epita.fr>
1063
1064 * src/scan-gram.l (id): Can start with an underscore.
1065
a945ec39
AD
10662002-07-16 Akim Demaille <akim@epita.fr>
1067
1068 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
1069 Adjust all former `associativity' dependencies.
1070 * src/symtab.c (symbol_new): Default associativity is `undef', not
1071 `right'.
1072 (symbol_check_alias_consistence): Adjust.
1073
fae437e8
AD
10742002-07-09 Akim Demaille <akim@epita.fr>
1075
1076 * doc/bison.texinfo: Properly set the ``header'' part.
1077 Use @dircategory ``GNU programming tools'' as per Texinfo's
1078 documentation.
1079 Use @copying.
1080
1a715ef2
AD
10812002-07-09 Akim Demaille <akim@epita.fr>
1082
1083 * lib/quotearg.h: Protect against multiple inclusions.
1084 * src/location.h (location_t): Add a `file' member.
1085 (LOCATION_RESET, LOCATION_PRINT): Adjust.
1086 * src/complain.c (warn_at, complain_at, fatal_at): Drop
1087 `error_one_per_line' support.
1088
a5d50994
AD
10892002-07-09 Akim Demaille <akim@epita.fr>
1090
1091 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
1092 * src/reader.c (lineno): Remove.
1093 Adjust all dependencies.
1094 (get_merge_function): Take a location and use complain_at.
1095 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
1096 * tests/regression.at (Invalid inputs, Mixing %token styles):
1097 Adjust.
1098
b275314e
AD
10992002-07-09 Akim Demaille <akim@epita.fr>
1100
1101 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
1102 recovery rule, and forbid extensions when --yacc.
1103 (gram_error): Use complain_at.
1104 * src/reader.c (reader): Exit if there were parse errors.
1105
865b9df1
AD
11062002-07-09 Akim Demaille <akim@epita.fr>
1107
1108 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
1109 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
1110 Reported by R Blake <blakers@mac.com>.
1111
c76e14da
AD
11122002-07-09 Akim Demaille <akim@epita.fr>
1113
1114 * data/yacc.c: Output the copyright notive in the header.
1115
7db2ed2d
AD
11162002-07-03 Akim Demaille <akim@epita.fr>
1117
1118 * src/output.c (froms, tos): Are state_number_t.
1119 (save_column): sp, sp1, and sp2 are state_number_t.
1120 (prepare): Rename `final' as `final_state_number', `nnts' as
1121 `nterms_number', `nrules' as `rules_number', `nstates' as
1122 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
1123 unused.
1124 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
1125 * data/lalr1.cc (nsym_): Remove, unused.
1126
e68e0410
AD
11272002-07-03 Akim Demaille <akim@epita.fr>
1128
1129 * src/lalr.h, src/lalr.c (goto_number_t): New.
1130 * src/lalr.c (goto_list_t): New.
1131 Propagate them.
1132 * src/nullable.c (rule_list_t): New.
1133 Propagate.
1134 * src/types.h: Remove.
1135
e1a4f3a4
AD
11362002-07-03 Akim Demaille <akim@epita.fr>
1137
1138 * src/closure.c (print_fderives): Use rule_rhs_print.
1139 * src/derives.c (print_derives): Use rule_rhs_print.
1140 (rule_list_t): New, replaces `shorts'.
1141 (set_derives): Add comments.
1142 * tests/sets.at (Nullable, Firsts): Adjust.
1143
536545f3
AD
11442002-07-03 Akim Demaille <akim@epita.fr>
1145
1146 * src/output.c (prepare_actions): Free `tally' and `width'.
1147 (prepare_actions): Allocate and free `order'.
1148 * src/symtab.c (symbols_free): Free `symbols'.
1149 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
1150 * src/output.c (m4_invoke): Move to...
1151 * src/scan-skel.l: here.
1152 (<<EOF>>): Close yyout, and free its name.
1153
8b752b00
AD
11542002-07-03 Akim Demaille <akim@epita.fr>
1155
1156 Fix some memory leaks, and fix a bug: state 0 was examined twice.
1157
1158 * src/LR0.c (new_state): Merge into...
1159 (state_list_append): this.
1160 (new_states): Merge into...
1161 (generate_states): here.
1162 (set_states): Don't ensure a proper `errs' state member here, do it...
1163 * src/conflicts.c (conflicts_solve): here.
1164 * src/state.h, src/state.c: Comment changes.
1165 (state_t): Rename member `shifts' as `transitions'.
1166 Adjust all dependencies.
1167 (errs_new): For consistency, also take the values as argument.
1168 (errs_dup): Remove.
1169 (state_errs_set): New.
1170 (state_reductions_set, state_transitions_set): Assert that no
1171 previous value was assigned.
1172 (state_free): New.
1173 (states_free): Use it.
1174 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
1175 temporary storage: use `errs' and `nerrs' as elsewhere.
1176 (set_conflicts): Allocate and free this `errs'.
1177
613f5e1a
AD
11782002-07-02 Akim Demaille <akim@epita.fr>
1179
1180 * lib/libiberty.h: New.
1181 * lib: Update the bitset implementation from upstream.
1182 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
1183 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
1184 * src/main.c: Adjust bitset stats calls.
1185
26e0cadc
PE
11862002-07-01 Paul Eggert <eggert@twinsun.com>
1187
1188 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
1189 char, so that negative chars don't collide with $.
1190
1154cced
AD
11912002-06-30 Akim Demaille <akim@epita.fr>
1192
1193 Have the GLR tests be `warning' checked, and fix the warnings.
1194
1195 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
1196 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
1197 (yyremoveDeletes): `yyi' and `yyj' are size_t.
1198 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
1199 (yyaddDeferredAction): static.
1200 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
1201 (yyreportParseError): yyprefix is const.
1202 yytokenp is used only when verbose.
1203 (yy__GNUC__): Replace with __GNUC__.
1204 (yypdumpstack): yyi is size_t.
1205 (yypreference): Un-yy local variables and arguments, to avoid
1206 clashes with `yyr1'. Anyway, we are not in the user name space.
1207 (yytname_size): be an int, as is compared with ints.
1208 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
1209 Use them.
1210 * tests/cxx-gram.at: Use quotation to protect $1.
1211 Use AT_COMPILE to enable warnings hunts.
1212 Prototype yylex and yyerror.
1213 `Use' argc.
1214 Include `string.h', not `strings.h'.
1215 Produce and prototype stmtMerge only when used.
1216 yylex takes a location.
1217
97650f4e
AD
12182002-06-30 Akim Demaille <akim@epita.fr>
1219
1220 We spend a lot of time in quotearg, in particular when --verbose.
1221
1222 * src/symtab.c (symbol_get): Store a quoted version of the key.
1223 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
1224 Adjust all callers.
1225
d2576365
AD
12262002-06-30 Akim Demaille <akim@epita.fr>
1227
1228 * src/state.h (reductions_t): Rename member `nreds' as num.
1229 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
1230 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
1231
ccaf65bc
AD
12322002-06-30 Akim Demaille <akim@epita.fr>
1233
1234 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
1235 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
1236 (shifts_to): Rename as...
1237 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
1238 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
1239 (TRANSITION_IS_DISABLED, transitions_to): these.
1240
87675353
AD
12412002-06-30 Akim Demaille <akim@epita.fr>
1242
1243 * src/print.c (print_shifts, print_gotos): Merge into...
1244 (print_transitions): this.
1245 (print_transitions, print_errs, print_reductions): Align the
1246 lookaheads columns.
1247 (print_core, print_transitions, print_errs, print_state,
1248 print_grammar): Output empty lines separator before, not after.
1249 (state_default_rule_compute): Rename as...
1250 (state_default_rule): this.
1251 * tests/conflicts.at (Defaulted Conflicted Reduction),
1252 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
1253 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
1254
ce4ccb4b
AD
12552002-06-30 Akim Demaille <akim@epita.fr>
1256
1257 Display items as we display rules.
1258
1259 * src/gram.h, src/gram.c (rule_lhs_print): New.
1260 * src/gram.c (grammar_rules_partial_print): Use it.
1261 * src/print.c (print_core): Likewise.
1262 * tests/conflicts.at (Defaulted Conflicted Reduction),
1263 (Unresolved SR Conflicts): Adjust.
1264 (Unresolved SR Conflicts): Adjust and rename as...
1265 (Resolved SR Conflicts): this, as was meant.
1266 * tests/regression.at (Web2c Report): Adjust.
1267
bc933ef1
AD
12682002-06-30 Akim Demaille <akim@epita.fr>
1269
1270 * src/print.c (state_default_rule_compute): New, extracted from...
1271 (print_reductions): here.
1272 Pessimize, but clarify the code.
1273 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
1274
53d4308d
AD
12752002-06-30 Akim Demaille <akim@epita.fr>
1276
1277 * src/output.c (action_row): Let default_rule be always a rule
1278 number.
1279
574fb2d5
AD
12802002-06-30 Akim Demaille <akim@epita.fr>
1281
1282 * src/closure.c (print_firsts, print_fderives, closure):
1283 Use BITSET_EXECUTE.
1284 * src/lalr.c (lookaheads_print): Likewise.
1285 * src/state.c (state_rule_lookaheads_print): Likewise.
1286 * src/print_graph.c (print_core): Likewise.
1287 * src/print.c (print_reductions): Likewise.
1288 * src/output.c (action_row): Likewise.
1289 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
1290
05811fd7
AD
12912002-06-30 Akim Demaille <akim@epita.fr>
1292
1293 * src/print_graph.c: Use report_flag.
1294
0e4d5753
AD
12952002-06-30 Akim Demaille <akim@epita.fr>
1296
1297 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
1298 to...
1299 * src/relation.h, src/relation.c (traverse, relation_digraph)
1300 (relation_print, relation_transpose): New.
1301
24c7d800
AD
13022002-06-30 Akim Demaille <akim@epita.fr>
1303
1304 * src/state.h, src/state.c (shifts_to): New.
1305 * src/lalr.c (build_relations): Use it.
1306
9222837b
AD
13072002-06-30 Akim Demaille <akim@epita.fr>
1308
1309 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
1310 (item_number_of_rule_number, rule_number_of_item_number): New.
1311 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
1312 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
1313 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
1314 Propagate their use.
1315 Much remains to be done, in particular wrt `shorts' from types.h.
1316
260008e5
AD
13172002-06-30 Akim Demaille <akim@epita.fr>
1318
1319 * src/symtab.c (symbol_new): Initialize the `printer' member.
1320
8a731ca8
AD
13212002-06-30 Akim Demaille <akim@epita.fr>
1322
1323 * src/LR0.c (save_reductions): Remove, replaced by...
1324 * src/state.h, src/state.c (state_reductions_set): New.
1325 (reductions, errs): Rename as...
1326 (reductions_t, errs_t): these.
1327 Adjust all dependencies.
1328
32e1e0a4
AD
13292002-06-30 Akim Demaille <akim@epita.fr>
1330
1331 * src/LR0.c (state_list_t, state_list_append): New.
1332 (first_state, last_state): Now symbol_list_t.
1333 (this_state): Remove.
1334 (new_itemsets, append_states, save_reductions): Take a state_t as
1335 argument.
1336 (set_states, generate_states): Adjust.
1337 (save_shifts): Remove, replaced by...
1338 * src/state.h, src/state.c (state_shifts_set): New.
1339 (shifts): Rename as...
1340 (shifts_t): this.
1341 Adjust all dependencies.
1342 * src/state.h (state_t): Remove the `next' member.
1343
e5fb6710
AD
13442002-06-30 Akim Demaille <akim@epita.fr>
1345
1346 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
1347 escaped in slot 0.
1348
c7ca99d4
AD
13492002-06-30 Akim Demaille <akim@epita.fr>
1350
1351 Use hash.h for the state hash table.
1352
1353 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
1354 (allocate_storage): Use state_hash_new.
1355 (free_storage): Use state_hash_free.
1356 (new_state, get_state): Adjust.
1357 * src/lalr.h, src/lalr.c (states): Move to...
1358 * src/states.h (state_t): Remove the `link' member, no longer
1359 used.
1360 * src/states.h, src/states.c: here.
1361 (state_hash_new, state_hash_free, state_hash_lookup)
1362 (state_hash_insert, states_free): New.
1363 * src/states.c (state_table, state_compare, state_hash): New.
1364 * src/output.c (output_actions): Do not free states now, since we
1365 still need to know the final_state number in `prepare', called
1366 afterwards. Do it...
1367 * src/main.c (main): here: call states_free after `output'.
1368
df0e7316
AD
13692002-06-30 Akim Demaille <akim@epita.fr>
1370
1371 * src/state.h, src/state.c (state_new): New, extracted from...
1372 * src/LR0.c (new_state): here.
1373 * src/state.h (STATE_ALLOC): Move to...
1374 * src/state.c: here.
1375 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
1376 * src/state.h, src/state.c: here.
1377
39f41916
AD
13782002-06-30 Akim Demaille <akim@epita.fr>
1379
1380 * src/reader.c (gensym): Rename as...
1381 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
1382 (getsym): Rename as...
1383 (symbol_get): this.
1384
d57650a5
AD
13852002-06-30 Akim Demaille <akim@epita.fr>
1386
1387 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
1388 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
1389 * src/output.c, src/print.c, src/print_graph.c: Propagate.
1390 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
1391
5a08f1ce
AD
13922002-06-30 Akim Demaille <akim@epita.fr>
1393
1394 Make the test suite pass with warnings checked.
1395
1396 * tests/actions.at (Printers and Destructors): Improve.
1397 Avoid unsigned vs. signed issues.
1398 * tests/calc.at: Don't exercise the scanner here, do it...
1399 * tests/input.at (Torturing the Scanner): here.
1400
720623af
PH
14012002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1402
88e7e941 1403 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
720623af
PH
1404 reorganize first lines parallel to yacc.c.
1405
fb8135fa
AD
14062002-06-28 Akim Demaille <akim@epita.fr>
1407
1408 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
1409 (b4_token_enum, b4_token_defines): New, factored from...
1410 * data/lalr1.cc, data/yacc.c, glr.c: here.
1411
41442480
AD
14122002-06-28 Akim Demaille <akim@epita.fr>
1413
1414 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
1415 unused variables.
1416 * src/output.c (merger_output): static.
1417
e0e5bf84
AD
14182002-06-28 Akim Demaille <akim@epita.fr>
1419
1420 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
1421 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
1422 pacify GCC.
1423 * src/output.c (save_row): Initialize all the variables to pacify GCC.
e0e5bf84 1424
676385e2
PH
14252002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1426
1427 Accumulated changelog for new GLR parsing features.
1428
6a254321 1429 * src/conflicts.c (count_total_conflicts): Change name to
676385e2
PH
1430 conflicts_total_count.
1431 * src/conflicts.h: Ditto.
1432 * src/output.c (token_actions): Use the new name.
1433 (output_conflicts): Change conflp => conflict_list_heads, and
1434 confl => conflict_list for better readability.
1435 * data/glr.c: Use the new names.
1436 * NEWS: Add self to GLR announcement.
e0e5bf84 1437
676385e2
PH
1438 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
1439
1440 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
1441 Akim Demaille.
1442
1443 * data/bison.glr: Change name to glr.c
1444 * data/glr.c: Renamed from bison.glr.
1445 * data/Makefile.am: Add glr.c
e0e5bf84
AD
1446
1447 * src/getargs.c:
1448
676385e2
PH
1449 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
1450 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
e0e5bf84 1451
676385e2
PH
1452 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1453
1454 * data/bison.glr: Be sure to restore the
1455 current #line when returning to the skeleton contents after having
1456 exposed the input file's #line.
1457
1458 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1459
1460 * data/bison.glr: Bring up to date with changes to bison.simple.
1461
1462 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1463
1464 * data/bison.glr: Correct definitions that use b4_prefix.
1465 Various reformatting.
1466 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
1467 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
1468 yytokenp argument; now part of stack.
1469 (yychar): Define to behave as documented.
1470 (yyclearin): Ditto.
e0e5bf84 1471
676385e2
PH
1472 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1473
1474 * src/reader.h: Add declaration for free_merger_functions.
1475
1476 * src/reader.c (merge_functions): New variable.
1477 (get_merge_function): New function.
1478 (free_merger_functions): New function.
1479 (readgram): Check for %prec that is not followed by a symbol.
1480 Handle %dprec and %merge declarations.
1481 (packgram): Initialize dprec and merger fields in rules array.
1482
1483 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
1484 conflict_list_cnt, conflict_list_free): New variables.
1485 (table_grow): Also grow conflict_table.
e0e5bf84 1486 (prepare_rules): Output dprec and merger tables.
676385e2 1487 (conflict_row): New function.
e0e5bf84 1488 (action_row): Output conflict lists for GLR parser. Don't use
676385e2
PH
1489 default reduction in conflicted states for GLR parser so that there
1490 are spaces for the conflict lists.
1491 (save_row): Also save conflict information.
1492 (token_actions): Allocate conflict list.
1493 (merger_output): New function.
1494 (pack_vector): Pack conflict table, too.
1495 (output_conflicts): New function to output yyconflp and yyconfl.
1496 (output_check): Allocate conflict_tos.
1497 (output_actions): Output conflict tables, also.
1498 (output_skeleton): Output b4_mergers definition.
1499 (prepare): Output b4_max_rhs_length definition.
1500 Use 'bison.glr' as default skeleton for GLR parsers.
1501
1502 * src/gram.c (glr_parser): New flag.
1503 (grammar_free): Call free_merger_functions.
1504
1505 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
1506 all pairs of conflicting reductions, rather than just all tokens
1507 causing conflicts. Needed to size conflict tables.
e0e5bf84 1508 (conflicts_output): Modify call to count_rr_conflicts for new
676385e2
PH
1509 interface.
1510 (conflicts_print): Ditto.
1511 (count_total_conflicts): New function.
1512
1513 * src/reader.h (merger_list): New type.
1514 (merge_functions): New variable.
1515
1516 * src/lex.h (tok_dprec, tok_merge): New token types.
1517
1518 * src/gram.h (rule_s): Add dprec and merger fields.
1519 (glr_parser): New flag.
1520
1521 * src/conflicts.h (count_total_conflicts): New function.
1522
1523 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
1524
1525 * doc/bison.texinfo (Generalized LR Parsing): New section.
1526 (GLR Parsers): New section.
1527 (Language and Grammar): Mention GLR parsing.
1528 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
1529 Correct typo ("tge" -> "the").
1530
1531 * data/bison.glr: New skeleton for GLR parsing.
1532
1533 * tests/cxx-gram.at: New tests for GLR parsing.
1534
1535 * tests/testsuite.at: Include cxx-gram.at.
1536
1537 * tests/Makefile.am: Add cxx-gram.at.
e0e5bf84 1538
676385e2
PH
1539 * src/parse-gram.y:
1540
1541 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
1542
1543 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
e0e5bf84 1544
b5480d74 15452002-06-27 Akim Demaille <akim@epita.fr>
e2aaf4c4
AD
1546
1547 * src/options.h, src/options.c: Remove.
1548 * src/getargs.c (short_options, long_options): New.
1549
60491a94
AD
15502002-06-27 Akim Demaille <akim@epita.fr>
1551
1552 * data/bison.simple, data/bison.c++: Rename as...
1553 * data/yacc.c, data/lalr1.cc: these.
1554 * doc/bison.texinfo (Environment Variables): Remove.
1555
9be0c25b
AD
15562002-06-25 Raja R Harinath <harinath@cs.umn.edu>
1557
1558 * src/getargs.c (report_argmatch): Initialize strtok().
1559
1ae72863
AD
15602002-06-20 Akim Demaille <akim@epita.fr>
1561
1562 * data/bison.simple (b4_symbol_actions): New, replaces...
1563 (b4_symbol_destructor, b4_symbol_printer): these.
1564 (yysymprint): Be sure to call YYPRINT only for tokens, and using
1565 user token numbers.
1566
87542d29
AD
15672002-06-20 Akim Demaille <akim@epita.fr>
1568
1569 * data/bison.simple (yydestructor): Rename as...
1570 (yydestruct): this.
1571
1a31ed21
AD
15722002-06-20 Akim Demaille <akim@epita.fr>
1573
1574 * src/symtab.h, src/symtab.c (symbol_type_set)
1575 (symbol_destructor_set, symbol_precedence_set): The location is
1576 the last argument.
1577 Adjust all callers.
1578
e776192e
AD
15792002-06-20 Akim Demaille <akim@epita.fr>
1580
1581 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
1582 internals.
1583 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
1584 Takes a location.
1585 * src/symtab.h, src/symtab.c (symbol_class_set)
1586 (symbol_user_token_number_set): Likewise.
1587 Adjust all callers.
1588 Promote complain_at.
1589 * tests/input.at (Type Clashes): Adjust.
1590
5c1180b3
AD
15912002-06-20 Akim Demaille <akim@epita.fr>
1592
1593 * data/bison.simple (YYLEX): Fix the declaration when
1594 %pure-parser.
1595
e3170060
AD
15962002-06-20 Akim Demaille <akim@epita.fr>
1597
1598 * data/bison.simple (yysymprint): Don't print the token number,
1599 just its name.
1600 * tests/actions.at (Destructors): Rename as...
1601 (Printers and Destructors): this.
1602 Also exercise %printer.
1603
253862fd
AD
16042002-06-20 Akim Demaille <akim@epita.fr>
1605
1606 * data/bison.simple (YYDSYMPRINT): New.
1607 Use it to remove many of the #if YYDEBUG/if (yydebug).
1608
366eea36
AD
16092002-06-20 Akim Demaille <akim@epita.fr>
1610
1611 * src/symtab.h, src/symtab.c (symbol_t): printer and
1612 printer_location are new members.
1613 (symbol_printer_set): New.
1614 * src/parse-gram.y (PERCENT_PRINTER): New token.
1615 Handle its associated rule.
1616 * src/scan-gram.l: Adjust.
1617 (handle_destructor_at, handle_destructor_dollar): Rename as...
1618 (handle_symbol_code_at, handle_symbol_code_dollar): these.
1619 * src/output.c (symbol_printers_output): New.
1620 (output_skeleton): Call it.
1621 * data/bison.simple (yysymprint): New. Cannot be named yyprint
1622 since there are already many grammar files with a user `yyprint'.
1623 Replace the calls to YYPRINT to calls to yysymprint.
1624 * tests/calc.at: Adjust.
1625 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
1626 taking advantage of parser very internal details (stack size!).
1627
4f25ebb0
AD
16282002-06-20 Akim Demaille <akim@epita.fr>
1629
1630 * src/scan-gram.l: Complete the scanner with the missing patterns
1631 to pacify Flex.
1632 Use `quote' and `symbol_tag_get' where appropriate.
1633
93b68a0e
AD
16342002-06-19 Akim Demaille <akim@epita.fr>
1635
1636 * tests/actions.at (Destructors): Augment to test locations.
1637 * data/bison.simple (yydestructor): Pass it the current location
1638 if locations are enabled.
1639 Prototype only when __STDC__ or C++.
1640 Change the argument names to move into the yy name space: there is
1641 user code here.
1642
58612f1d
AD
16432002-06-19 Akim Demaille <akim@epita.fr>
1644
74310291
AD
1645 * data/bison.simple (b4_pure_if): New.
1646 Use it instead of #ifdef YYPURE.
1647
16482002-06-19 Akim Demaille <akim@epita.fr>
1649
1650 * data/bison.simple (b4_location_if): New.
58612f1d
AD
1651 Use it instead of #ifdef YYLSP_NEEDED.
1652
f25bfb75
AD
16532002-06-19 Akim Demaille <akim@epita.fr>
1654
1655 Prepare @$ in %destructor, but currently don't bind it in the
1656 skeleton, as %location use is not cleaned up yet.
1657
1658 * src/scan-gram.l (handle_dollar, handle_destructor_at)
1659 (handle_action_at): New.
1660 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
1661 a braced_code_t and a location as additional arguments.
1662 (handle_destructor_dollar): Instead of requiring `b4_eval', just
1663 unquote one when outputting `b4_dollar_dollar'.
1664 Adjust callers.
1665 * data/bison.simple (b4_eval): Remove.
1666 (b4_symbol_destructor): Adjust.
1667 * tests/input.at (Invalid @n): Adjust.
1668
c732d2c6
AD
16692002-06-19 Zack Weinberg <zack@codesourcery.com>
1670
1671 * doc/bison.texinfo: Document ability to have multiple
1672 prologue sections.
1673
8c165d89
AD
16742002-06-18 Akim Demaille <akim@epita.fr>
1675
1676 * src/files.c (compute_base_names): When computing the output file
1677 names from the input file name, strip the directory part.
1678
ca98bf57
AD
16792002-06-18 Akim Demaille <akim@epita.fr>
1680
1681 * data/bison.simple.new: Comment changes.
1682 Reported by Andreas Schwab.
1683
0bfb02ff
AD
16842002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
1685
1686 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
1687 there are no `label `yyoverflowlab' defined but not used' warnings
1688 when yyoverflow is defined.
1689
24c0aad7
AD
16902002-06-18 Akim Demaille <akim@epita.fr>
1691
1692 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
1693 new member.
1694 (symbol_destructor_set): Adjust.
1695 * src/output.c (symbol_destructors_output): Output the destructor
1696 locations.
1697 Output the symbol name.
1698 * data/bison.simple (b4_symbol_destructor): Adjust.
1699
5719c109
AD
17002002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
1701 and Akim Demaille <akim@epita.fr>
1702
1703 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
1704 what's left on the stack when the error recovery hits EOF.
1705 * tests/actions.at (Destructors): Complete to exercise this case.
1706
9280d3ef
AD
17072002-06-17 Akim Demaille <akim@epita.fr>
1708
1709 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
1710 arguments is really empty, not only equal to `[]'.
1711 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
1712 member.
1713 (symbol_destructor_set): New.
1714 * src/output.c (symbol_destructors_output): New.
1715 * src/reader.h (brace_code_t, current_braced_code): New.
1716 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
1717 (handle_dollar): Rename as...
1718 (handle_action_dollar): this.
1719 (handle_destructor_dollar): New.
1720 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
1721 (grammar_declaration): Use it.
1722 * data/bison.simple (yystos): Is always defined.
1723 (yydestructor): New.
1724 * tests/actions.at (Destructors): New.
1725 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
1726
dafdc66f
AD
17272002-06-17 Akim Demaille <akim@epita.fr>
1728
1729 * src/symlist.h, src/symlist.c (symbol_list_length): New.
1730 * src/scan-gram.l (handle_dollar, handle_at): Compute the
1731 rule_length only when needed.
1732 * src/output.c (actions_output, token_definitions_output): Output
1733 the full M4 block.
1734 * src/symtab.c: Don't access directly to the symbol tag, use
1735 symbol_tag_get.
1736 * src/parse-gram.y: Use symbol_list_free.
1737
56c47203
AD
17382002-06-17 Akim Demaille <akim@epita.fr>
1739
1740 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
1741 (symbol_list_prepend, get_type_name): Move to...
1742 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
1743 (symbol_list_prepend, symbol_list_n_type_name_get): here.
1744 Adjust all callers.
1745 (symbol_list_free): New.
1746 * src/scan-gram.l (handle_dollar): Takes a location.
1747 * tests/input.at (Invalid $n): Adjust.
1748
1e0bab92
AD
17492002-06-17 Akim Demaille <akim@epita.fr>
1750
1751 * src/reader.h, src/reader.c (symbol_list_new): Export it.
1752 (symbol_list_prepend): New.
1753 * src/parse-gram.y (%union): `list' is a new member.
1754 (symbols.1): New, replaces...
1755 (terms_to_prec.1, nterms_to_type.1): these.
1756 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
1757 Take a location as additional argument.
1758 Adjust all callers.
1759
04e60654
AD
17602002-06-15 Akim Demaille <akim@epita.fr>
1761
1762 * src/parse-gram.y: Move %token in the declaration section so that
1763 we don't depend upon CVS Bison.
1764
10e5b8bd
AD
17652002-06-15 Akim Demaille <akim@epita.fr>
1766
1767 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
1768 * src/print.c (print_core): Use it.
1769
9801d40c
AD
17702002-06-15 Akim Demaille <akim@epita.fr>
1771
1772 * src/conflicts.c (log_resolution): Accept the rule involved in
1773 the sr conflicts instead of the lookahead number that points to
1774 that rule.
1775 (flush_reduce): Accept the current lookahead vector as argument,
1776 instead of the index in LA.
1777 (resolve_sr_conflict): Accept the current number of lookahead
1778 bitset to consider for the STATE, instead of the index in LA.
1779 (set_conflicts): Adjust.
1780 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
1781
c0263492
AD
17822002-06-15 Akim Demaille <akim@epita.fr>
1783
1784 * src/state.h (state_t): Replace the `lookaheadsp' member, a
1785 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
1786 Adjust all dependencies.
1787 * src/lalr.c (initialize_lookaheads): Split into...
1788 (states_lookaheads_count, states_lookaheads_initialize): these.
1789 (lalr): Adjust.
1790
9757c359
AD
17912002-06-15 Akim Demaille <akim@epita.fr>
1792
1793 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
1794 out of...
1795 (grammar_rules_print): here.
1796 * src/reduce.c (reduce_output): Use it.
1797 * tests/reduce.at (Useless Rules, Reduced Automaton)
1798 (Underivable Rules): Adjust.
1799
6b98e4b5
AD
18002002-06-15 Akim Demaille <akim@epita.fr>
1801
1802 Copy BYacc's nice way to report the grammar.
1803
1804 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
1805 New.
1806 Don't print the rules' location, it is confusing and useless.
1807 (rule_print): Use grammar_rhs_print.
1808 * src/print.c (print_grammar): Use grammar_rules_print.
1809
6b98e4b5
AD
18102002-06-15 Akim Demaille <akim@epita.fr>
1811
1812 Complete and rationalize `useless thing' warnings.
1813
1814 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
1815 (symbol_tag_print): New.
1816 Use them everywhere in place of accessing directly the tag member.
1817 * src/gram.h, src/gram.c (rule_print): New.
1818 Use it where a rule used to be printed `by hand'.
1819 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
1820 (reduce_grammar_tables): Report the useless rules.
1821 (reduce_print): Useless things are a warning, not an error.
1822 Report it as such.
1823 * tests/reduce.at (Useless Nonterminals, Useless Rules):
1824 (Reduced Automaton, Underivable Rules): Adjust.
1825 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
1826 * tests/conflicts.at (Unresolved SR Conflicts)
1827 (Solved SR Conflicts): Adjust.
1828
ee000ba4
AD
18292002-06-15 Akim Demaille <akim@epita.fr>
1830
1831 Let symbols have a location.
1832
1833 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
1834 (getsym): Adjust.
1835 Adjust all callers.
1836 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
1837 Use location_t, not int.
1838 * src/symtab.c (symbol_check_defined): Take advantage of the
1839 location.
1840 * tests/regression.at (Invalid inputs): Adjust.
1841
8efe435c
AD
18422002-06-15 Akim Demaille <akim@epita.fr>
1843
1844 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
1845 (input): Don't try to initialize yylloc here, do it in the
1846 scanner.
1847 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
1848 * src/gram.h (rule_t): Change line and action_line into location
1849 and action_location, of location_t type.
1850 Adjust all dependencies.
1851 * src/location.h, src/location.c (empty_location): New.
1852 * src/reader.h, src/reader.c (grammar_start_symbol_set)
1853 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
1854 (grammar_current_rule_symbol_append)
1855 (grammar_current_rule_action_append): Expect a location as argument.
1856 * src/reader.c (grammar_midrule_action): Adjust to attach an
1857 action's location as dummy symbol location.
1858 * src/symtab.h, src/symtab.c (startsymbol_location): New.
1859 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
1860 the line numbers.
1861
1921f1d7
AD
18622002-06-14 Akim Demaille <akim@epita.fr>
1863
1864 Grammar declarations may be found in the grammar section.
1865
1866 * src/parse-gram.y (rules_or_grammar_declaration): New.
1867 (declarations): Each declaration may end with a semicolon, not
1868 just...
1869 (grammar_declaration): `"%union"'.
1870 (grammar): Branch to rules_or_grammar_declaration.
1871
4515534c
AD
18722002-06-14 Akim Demaille <akim@epita.fr>
1873
1874 * src/main.c (main): Invoke scanner_free.
1875
f958596b
AD
18762002-06-14 Akim Demaille <akim@epita.fr>
1877
1878 * src/output.c (m4_invoke): Extracted from...
1879 (output_skeleton): here.
1880 Free tempfile.
1881
2c569025
AD
18822002-06-14 Akim Demaille <akim@epita.fr>
1883
1884 * src/parse-gram.y (directives, directive, gram)
1885 (grammar_directives, precedence_directives, precedence_directive):
1886 Rename as...
1887 (declarations, declaration, grammar, grammar_declaration)
1888 (precedence_declaration, precedence_declarator): these.
1889 (symbol_declaration): New.
1890
592e8d4d
AD
18912002-06-14 Akim Demaille <akim@epita.fr>
1892
1893 * src/files.c (action_obstack): Remove, unused.
1894 (output_obstack): Remove it, and all its dependencies, as it is no
1895 longer needed.
1896 * src/reader.c (epilogue_set): Build the epilogue in the
1897 muscle_obstack.
1898 * src/output.h, src/output.c (muscle_obstack): Move to...
1899 * src/muscle_tab.h, src/muscle_tab.h: here.
1900 (muscle_init): Initialize muscle_obstack.
1901 (muscle_free): New.
1902 * src/main.c (main): Call it.
1903
0c15323d
AD
19042002-06-14 Akim Demaille <akim@epita.fr>
1905
1906 * src/location.h: New, extracted from...
1907 * src/reader.h: here.
1908 * src/Makefile.am (noinst_HEADERS): Merge into
1909 (bison_SOURCES): this.
1910 Add location.h.
1911 * src/parse-gram.y: Use location_t instead of Bison's.
1912 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
1913 Use location_t instead of ints.
1914
e96c9728
AD
19152002-06-14 Akim Demaille <akim@epita.fr>
1916
1917 * data/bison.simple, data/bison.c++: Be sure to restore the
1918 current #line when returning to the skeleton contents after having
1919 exposed the input file's #line.
1920
75d1fe16
AD
19212002-06-12 Akim Demaille <akim@epita.fr>
1922
1923 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
1924 eager.
1925 * tests/actions.at (Exotic Dollars): New.
1926
6c35d22c
AD
19272002-06-12 Akim Demaille <akim@epita.fr>
1928
1929 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
1930 ['"/] too eagerly.
1931 * tests/input.at (Torturing the Scanner): New.
1932
1d6412ad
AD
19332002-06-11 Akim Demaille <akim@epita.fr>
1934
1935 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
1936 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
1937 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
1938 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
1939 * src/reader.c (reader): Use it.
1940
4cdb01db
AD
19412002-06-11 Akim Demaille <akim@epita.fr>
1942
1943 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
1944 Adjust all callers.
1945 (scanner_last_string_free): New.
1946
44995b2e
AD
19472002-06-11 Akim Demaille <akim@epita.fr>
1948
1949 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
1950 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
1951 (last_string, YY_OBS_FREE): New.
1952 Use them when returning an ID.
1953
e9955c83
AD
19542002-06-11 Akim Demaille <akim@epita.fr>
1955
1956 Have Bison grammars parsed by a Bison grammar.
1957
1958 * src/reader.c, src/reader.h (prologue_augment): New.
1959 * src/reader.c (copy_definition): Remove.
1960
1961 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
1962 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
1963 (grammar_current_rule_prec_set, grammar_current_rule_check)
1964 (grammar_current_rule_symbol_append)
1965 (grammar_current_rule_action_append): Export.
1966 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
1967 (symbol_list_action_append): Remove.
1968 Hook the routines from reader.
1969 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
1970 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
1971
1972 * src/reader.c (read_declarations): Remove, unused.
1973
1974 * src/parse-gram.y: Handle the epilogue.
1975 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
1976 (grammar_start_symbol_set): this.
1977 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
1978 * src/reader.c (readgram): Remove, unused.
1979 (reader): Adjust to insert eoftoken and axiom where appropriate.
1980
1981 * src/reader.c (copy_dollar): Replace with...
1982 * src/scan-gram.h (handle_dollar): this.
1983 * src/parse-gram.y: Remove `%thong'.
1984
1985 * src/reader.c (copy_at): Replace with...
1986 * src/scan-gram.h (handle_at): this.
1987
1988 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
1989 New.
1990
1991 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
1992 time being.
1993
1994 * src/reader.h, src/reader.c (grammar_rule_end): New.
1995
1996 * src/parse.y (current_type, current_class): New.
1997 Implement `%nterm', `%token' support.
1998 Merge `%term' into `%token'.
1999 (string_as_id): New.
2000 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
2001 type name.
2002
2003 * src/parse-gram.y: Be sure to handle properly the beginning of
2004 rules.
2005
2006 * src/parse-gram.y: Handle %type.
2007 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
2008
2009 * src/parse-gram.y: More directives support.
2010 * src/options.c: No longer handle source directives.
2011
2012 * src/parse-gram.y: Fix %output.
2013
2014 * src/parse-gram.y: Handle %union.
2015 Use the prologue locations.
2016 * src/reader.c (parse_union_decl): Remove.
2017
2018 * src/reader.h, src/reader.c (epilogue_set): New.
2019 * src/parse-gram.y: Use it.
2020
2021 * data/bison.simple, data/bison.c++: b4_stype is now either not
2022 defined, then default to int, or to the contents of %union,
2023 without `union' itself.
2024 Adjust.
2025 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
2026
2027 * src/output.c (actions_output): Don't output braces, as they are
2028 already handled by the scanner.
2029
2030 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
2031 characters to themselves.
2032
2033 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
2034 that the epilogue has a proper #line.
2035
2036 * src/parse-gram.y: Handle precedence/associativity.
2037
2038 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
2039 a terminal.
2040 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
2041 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
2042 at all to define terminals that cannot be emitted.
2043
2044 * src/scan-gram.l: Escape M4 characters.
2045
2046 * src/scan-gram.l: Working properly with escapes in user
2047 strings/characters.
2048
2049 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
2050 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
2051 grammar.
2052 Use more modest sizes, as for the time being the parser does not
2053 release memory, and therefore the process swallows a huge amount
2054 of memory.
2055
2056 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
2057 stricter %token grammar.
2058
2059 * src/symtab.h (associativity): Add `undef_assoc'.
2060 (symbol_precedence_set): Do nothing when passed an undef_assoc.
2061 * src/symtab.c (symbol_check_alias_consistence): Adjust.
2062
2063 * tests/regression.at (Invalid %directive): Remove, as it is now
2064 meaningless.
2065 (Invalid inputs): Adjust to the new error messages.
2066 (Token definitions): The new grammar doesn't allow too many
2067 eccentricities.
2068
2069 * src/lex.h, src/lex.c: Remove.
2070 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
2071 (copy_character, copy_string2, copy_string, copy_identifier)
2072 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
2073 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
2074 (parse_action): Remove.
2075 * po/POTFILES.in: Adjust.
2076
2e047461
AD
20772002-06-11 Akim Demaille <akim@epita.fr>
2078
2079 * src/reader.c (parse_action): Don't store directly into the
2080 rule's action member: return the action as a string.
2081 Don't require `rule_length' as an argument: compute it.
2082 (grammar_current_rule_symbol_append)
2083 (grammar_current_rule_action_append): New, eved out from
2084 (readgram): here.
2085 Remove `action_flag', `rulelength', unused now.
2086
9af3fbce
AD
20872002-06-11 Akim Demaille <akim@epita.fr>
2088
2089 * src/reader.c (grammar_current_rule_prec_set).
2090 (grammar_current_rule_check): New, eved out from...
2091 (readgram): here.
2092 Remove `xaction', `first_rhs': useless.
2093 * tests/input.at (Type clashes): New.
2094 * tests/existing.at (GNU Cim Grammar): Adjust.
2095
1485e106
AD
20962002-06-11 Akim Demaille <akim@epita.fr>
2097
2098 * src/reader.c (grammar_midrule_action): New, Eved out from
2099 (readgram): here.
2100
da4160c3
AD
21012002-06-11 Akim Demaille <akim@epita.fr>
2102
2103 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
2104 New.
2105 (readgram): Use them as replacement of inlined code, crule and
2106 crule1.
2107
f6d0f937
AD
21082002-06-11 Akim Demaille <akim@epita.fr>
2109
2110 * src/reader.c (grammar_end, grammar_symbol_append): New.
2111 (readgram): Use them.
2112 Make the use of `p' as local as possible.
2113
69078d4b
AD
21142002-06-10 Akim Demaille <akim@epita.fr>
2115
2116 GCJ's parser requires the tokens to be defined before the prologue.
2117
2118 * data/bison.simple: Output the token definition before the user's
2119 prologue.
2120 * tests/regression.at (Braces parsing, Duplicate string)
2121 (Mixing %token styles): Check the output from bison.
2122 (Early token definitions): New.
2123
5e424082
AD
21242002-06-10 Akim Demaille <akim@epita.fr>
2125
2126 * src/symtab.c (symbol_user_token_number_set): Don't complain when
2127 assigning twice the same user number to a token, so that we can
2128 use it in...
2129 * src/lex.c (lex): here.
2130 Also use `symbol_class_set' instead of hand written code.
2131 * src/reader.c (parse_assoc_decl): Likewise.
2132
44536b35
AD
21332002-06-10 Akim Demaille <akim@epita.fr>
2134
2135 * src/symtab.c, src/symtab.c (symbol_class_set)
2136 (symbol_user_token_number_set): New.
2137 * src/reader.c (parse_token_decl): Use them.
2138 Use a switch instead of ifs.
2139 Use a single argument.
2140
8b9f2372
AD
21412002-06-10 Akim Demaille <akim@epita.fr>
2142
2143 Remove `%thong' support as it is undocumented, unused, duplicates
2144 `%token's job, and creates useless e-mail traffic with people who
2145 want to know what it is, why it is undocumented, unused, and
2146 duplicates `%token's job.
2147
2148 * src/reader.c (parse_thong_decl): Remove.
2149 * src/options.c (option_table): Remove "thong".
2150 * src/lex.h (tok_thong): Remove.
2151
3ae2b51f
AD
21522002-06-10 Akim Demaille <akim@epita.fr>
2153
2154 * src/symtab.c, src/symtab.c (symbol_type_set)
2155 (symbol_precedence_set): New.
2156 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
2157 (value_components_used): Remove, unused.
2158
2f1afb73
AD
21592002-06-09 Akim Demaille <akim@epita.fr>
2160
2161 Move symbols handling code out of the reader.
2162
2163 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
2164 (axiom): Move to...
2165 * src/symtab.h, src/symtab.c: here.
2166
2167 * src/gram.c (start_symbol): Remove: use startsymbol->number.
2168 * src/reader.c (startval): Rename as...
2169 * src/symtab.h, src/symtab.c (startsymbol): this.
2170 * src/reader.c: Adjust.
2171
2172 * src/reader.c (symbol_check_defined, symbol_make_alias)
2173 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
2174 (token_translations_init)
2175 Move to...
2176 * src/symtab.c: here.
2177 * src/reader.c (packsymbols): Move to...
2178 * src/symtab.h, src/symtab.c (symbols_pack): here.
2179 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
2180 argument.
2181
e9bca3ad
AD
21822002-06-03 Akim Demaille <akim@epita.fr>
2183
2184 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
2185 then statements.
2186
86eff183
AD
21872002-06-03 Akim Demaille <akim@epita.fr>
2188
2189 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
2190 structs with non literals.
2191 * src/scan-skel.l: never-interactive.
2192 * src/conflicts.c (enum conflict_resolution_e): No trailing
2193 comma.
2194 * src/getargs.c (usage): Split long literal strings.
2195 Reported by Hans Aberg.
2196
717be197
AD
21972002-05-28 Akim Demaille <akim@epita.fr>
2198
2199 * data/bison.c++: Use C++ ostreams.
2200 (cdebug_): New member.
2201
670ddffd
AD
22022002-05-28 Akim Demaille <akim@epita.fr>
2203
2204 * src/output.c (output_skeleton): Be sure to allocate enough room
2205 for `/' _and_ for `\0' in full_skeleton.
2206
769b430f
AD
22072002-05-28 Akim Demaille <akim@epita.fr>
2208
2209 * data/bison.c++: Catch up with bison.simple:
2210 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2211 and Paul Eggert <eggert@twinsun.com>: `error' handing.
2212 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
2213 and popping traces.
2214
7067cb36
PH
22152002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2216
2217 * src/output.c (output_skeleton): Put an explicit path in front of
2218 the skeleton file name, rather than relying on the -I directory,
2219 to partially alleviate effects of having a skeleton file lying around
2220 in the current directory.
769b430f 2221
4a713ec2
PH
22222002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2223
769b430f 2224 * src/conflicts.c (log_resolution): Correct typo:
4a713ec2
PH
2225 obstack_printf should be obstack_fgrow1.
2226
b408954b
AD
22272002-05-26 Akim Demaille <akim@epita.fr>
2228
2229 * src/state.h (state_t): `solved_conflicts' is a new member.
2230 * src/LR0.c (new_state): Set it to 0.
2231 * src/conflicts.h, src/conflicts.c (print_conflicts)
2232 (free_conflicts, solve_conflicts): Rename as...
2233 (conflicts_print, conflicts_free, conflicts_solve): these.
2234 Adjust callers.
2235 * src/conflicts.c (enum conflict_resolution_e)
2236 (solved_conflicts_obstack): New, used by...
2237 (log_resolution): this.
2238 Adjust to attach the conflict resolution to each state.
2239 Complete the description with the precedence/associativity
2240 information.
2241 (resolve_sr_conflict): Adjust.
2242 * src/print.c (print_state): Output its solved_conflicts.
2243 * tests/conflicts.at (Unresolved SR Conflicts)
2244 (Solved SR Conflicts): Exercise --report=all.
2245
a49aecd5
AD
22462002-05-26 Akim Demaille <akim@epita.fr>
2247
2248 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
2249 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
2250 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
2251 (token_number_t, item_number_as_token_number)
2252 (token_number_as_item_number, muscle_insert_token_number_table):
2253 Rename as...
2254 (symbol_number_t, item_number_as_symbol_number)
2255 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
2256 these, since it is more appropriate.
2257
5504898e
AD
22582002-05-26 Akim Demaille <akim@epita.fr>
2259
2260 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
2261 `Error:' lines.
2262 * data/bison.simple (yystos) [YYDEBUG]: New.
2263 (yyparse) [YYDEBUG]: Display the symbols which are popped during
2264 error recovery.
2265 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
2266
ec3bc396
AD
22672002-05-25 Akim Demaille <akim@epita.fr>
2268
2269 * doc/bison.texinfo (Debugging): Split into...
2270 (Tracing): this new section, its former contents, and...
2271 (Understanding): this new section.
2272 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
2273 by...
2274 (report_flag): this.
2275 Adjust all dependencies.
2276 (report_args, report_types, report_argmatch): New.
2277 (usage, getargs): Report/support -r, --report.
2278 * src/options.h
2279 (struct option_table_struct): Rename as..,
2280 (struct option_table_s): this.
2281 Rename the `set_flag' member to `flag' to match with getopt_long's
2282 struct.
2283 * src/options.c (option_table): Split verbose into an entry for
2284 %verbose, and another for --verbose.
2285 Support --report/-r, so remove -r from the obsolete --raw.
2286 * src/print.c: Attach full item sets and lookaheads reports to
2287 report_flag instead of trace_flag.
2288 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
2289
78df8250
PE
22902002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2291 and Paul Eggert <eggert@twinsun.com>
769b430f 2292
78df8250
PE
2293 * data/bison.simple (yyparse): Correct error handling to conform to
2294 POSIX and yacc. Specifically, after syntax error is discovered,
2295 do not reduce further before shifting the error token.
2296 Clean up the code a bit by removing the labels yyerrdefault,
2297 yyerrhandle, yyerrpop.
2298 * NEWS: Document the above.
2299
c0c9ea05
PH
23002002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2301
2302 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
2303 type; it isn't always big enough, since it doesn't necessarily
2304 include non-terminals.
769b430f 2305 (yytranslate): Expand definition of yy_token_number_type, so that
c0c9ea05
PH
2306 the latter can be removed.
2307 (yy_token_number_type): Remove, only one use.
2308 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
2309 don't use TokenNumberType as element type.
769b430f 2310
c0c9ea05
PH
2311 * tests/regression.at: Modify expected output to agree with change
2312 to yyr1 and yytranslate.
769b430f 2313
6390a83f
FK
23142002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
2315
2316 * src/reader.c (parse_action): Use copy_character instead of
2317 obstack_1grow.
2318
db7c8e9a
AD
23192002-05-13 Akim Demaille <akim@epita.fr>
2320
2321 * tests/regression.at (Token definitions): Prototype yylex and
2322 yyerror.
2323
fcc61800
PH
23242002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2325
158c687b 2326 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
fcc61800
PH
2327 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
2328 32-bit arithmetic.
2329 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
2330
5683e9b2
AD
23312002-05-07 Akim Demaille <akim@epita.fr>
2332
2333 * tests/synclines.at: Be sure to prototype yylex and yyerror to
2334 avoid GCC warnings.
2335
0c2d3f4c
AD
23362002-05-07 Akim Demaille <akim@epita.fr>
2337
2338 Kill GCC warnings.
2339
2340 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
2341 over the RHS of each rule.
2342 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
2343 * src/state.h (state_t): Member `nitems' is unsigned short.
2344 * src/LR0.c (get_state): Adjust.
2345 * src/reader.c (packgram): Likewise.
2346 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
2347 `Type'.
2348 (muscle_insert_int_table): Remove, unused.
2349 (prepare_rules): Remove `max'.
2350
1565b720
AD
23512002-05-06 Akim Demaille <akim@epita.fr>
2352
2353 * src/closure.c (print_firsts): Display of the symbol tags.
2354 (bitmatrix_print): Move to...
2355 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
2356 here.
2357 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
2358
cfaee611
AD
23592002-05-06 Akim Demaille <akim@epita.fr>
2360
2361 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
2362 hash_do_for_each.
2363
458be8e0
AD
23642002-05-06 Akim Demaille <akim@epita.fr>
2365
2366 * src/LR0.c (new_state, get_state): Instead of using the global
2367 `kernel_size' and `kernel_base', have two new arguments:
2368 `core_size' and `core'.
2369 Adjust callers.
2370
a900a624
AD
23712002-05-06 Akim Demaille <akim@epita.fr>
2372
2373 * src/reader.c (packgram): No longer end `ritem' with a 0
2374 sentinel: it is not used.
2375
d4e7d3a1
AD
23762002-05-05 Akim Demaille <akim@epita.fr>
2377
2378 New experimental feature: display the lookaheads in the report and
2379 graph.
2380
2381 * src/print (print_core): When --trace-flag, display the rules
2382 lookaheads.
2383 * src/print_graph.c (print_core): Likewise.
2384 Swap the arguments.
2385 Adjust caller.
2386
39ceb25b
AD
23872002-05-05 Akim Demaille <akim@epita.fr>
2388
2389 * tests/torture.at (Many lookaheads): New test.
2390
5372019f
AD
23912002-05-05 Akim Demaille <akim@epita.fr>
2392
2393 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
2394 (GENERATE_MUSCLE_INSERT_TABLE): this.
2395 (output_int_table, output_unsigned_int_table, output_short_table)
2396 (output_token_number_table, output_item_number_table): Replace with...
2397 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
2398 (muscle_insert_short_table, muscle_insert_token_number_table)
2399 (muscle_insert_item_number_table): these.
2400 Adjust all callers.
2401 (prepare_tokens): Don't free `translations', since...
2402 * src/reader.h, src/reader.c (grammar_free): do it.
2403 Move to...
2404 * src/gram.h, src/gram.c (grammar_free): here.
2405 * data/bison.simple, data/bison.c++: b4_token_number_max is now
2406 b4_translate_max.
2407
5df5f6d5
AD
24082002-05-05 Akim Demaille <akim@epita.fr>
2409
2410 * src/output.c (output_unsigned_int_table): New.
2411 (prepare_rules): `i' is unsigned.
2412 `prhs', `rline', `r2' are unsigned int.
2413 Rename muscle `rhs_number_max' as `rhs_max'.
2414 Output muscles `prhs_max', `rline_max', and `r2_max'.
2415 Free rline and r1.
2416 * data/bison.simple, data/bison.c++: Adjust to use these muscles
2417 to compute types instead of constant types.
2418 * tests/regression.at (Web2c Actions): Adjust.
2419
b87f8b21
AD
24202002-05-04 Akim Demaille <akim@epita.fr>
2421
2422 * src/symtab.h (SALIAS, SUNDEF): Rename as...
2423 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
2424 Adjust dependencies.
2425 * src/output.c (token_definitions_output): Be sure not to output a
2426 `#define 'a'' when fed with `%token 'a' "a"'.
2427 * tests/regression.at (Token definitions): New.
2428
8bb936e4
PE
24292002-05-03 Paul Eggert <eggert@twinsun.com>
2430
2431 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
2432 for K&R C.
2433
24342002-05-03 gettextize <bug-gnu-gettext@gnu.org>
2435
2436 * Makefile.am (SUBDIRS): Remove intl.
2437 (EXTRA_DIST): Add config/config.rpath.
2438
53c71a12
AD
24392002-05-03 Akim Demaille <akim@epita.fr>
2440
2441 * data/bison.simple (m4_if): Don't output empty enums.
2442 And actually, output valid enum definitions :(.
2443
289dd0cf
AD
24442002-05-03 Akim Demaille <akim@epita.fr>
2445
2446 * configure.bat: Remove, completely obsolete.
2447 * Makefile.am (EXTRA_DIST): Adjust.
2448 Don't distribute config.rpath...
2449 * config/Makefile.am (EXTRA_DIST): Do it.
2450
db85e524
AD
24512002-05-03 Akim Demaille <akim@epita.fr>
2452
2453 * configure.in (GETTEXT_VERSION): New.
2454 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
2455
83ccf991
AD
24562002-05-03 Akim Demaille <akim@epita.fr>
2457
2458 * data/bison.simple (b4_token_enum): New.
2459 (b4_token_defines): Use it to output tokens both as #define and
2460 enums.
2461 Suggested by Paul Eggert.
2462 * src/output.c (token_definitions_output): Don't output spurious
2463 white spaces.
2464
1f418995
AD
24652002-05-03 Akim Demaille <akim@epita.fr>
2466
2467 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
2468
45119f04
RA
24692002-05-02 Robert Anisko <robert@lrde.epita.fr>
2470
2471 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
2472 Update the stack class, give a try to deque as the default container.
2473
b2d52318
AD
24742002-05-02 Akim Demaille <akim@epita.fr>
2475
2476 * data/bison.simple (yyparse): Do not implement @$ = @1.
2477 (YYLLOC_DEFAULT): Adjust to do it.
2478 * doc/bison.texinfo (Location Default Action): Fix.
2479
3a8b4109
AD
24802002-05-02 Akim Demaille <akim@epita.fr>
2481
2482 * src/reader.c (parse_braces): Merge into...
2483 (parse_action): this.
2484
84614e13
AD
24852002-05-02 Akim Demaille <akim@epita.fr>
2486
2487 * configure.in (ALL_LINGUAS): Remove.
2488 * po/LINGUAS, hr.po: New.
2489
fdbcd8e2
AD
24902002-05-02 Akim Demaille <akim@epita.fr>
2491
2492 Remove the so called hairy (semantic) parsers.
2493
2494 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
2495 * src/gram.h, src/gram.c (semantic_parser): Remove.
2496 (rule_t): Remove the guard and guard_line members.
2497 * src/lex.h (token_t): remove tok_guard.
2498 * src/options.c (option_table): Remove %guard and %semantic_parser
2499 support.
2500 * src/output.c, src/output.h (guards_output): Remove.
2501 (prepare): Adjust.
2502 (token_definitions_output): Don't output the `T'
2503 tokens (???).
2504 (output_skeleton): Don't output the guards.
2505 * src/files.c, src/files.c (attrsfile): Remove.
2506 * src/reader.c (symbol_list): Remove the guard and guard_line
2507 members.
2508 Adjust dependencies.
2509 (parse_guard): Remove.
2510 * data/bison.hairy: Remove.
2511 * doc/bison.texinfo (Environment Variables): Remove occurrences of
2512 BISON_HAIRY.
2513
82b6cb3f
AD
25142002-05-02 Akim Demaille <akim@epita.fr>
2515
2516 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
2517 (parse_guard): Rename the formal argument `stack_offset' as
2518 `rule_length', which is more readable.
2519 Adjust callers.
2520 (copy_at, copy_dollar): Instead of outputting the hard coded
2521 values of $$, $n and so forth, output invocation to b4_lhs_value,
2522 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
2523 Note: this patch partially drops `semantic-parser' support: it
2524 always does `rule_length - n', where semantic parsers ought to
2525 always use `-n'.
82b6cb3f
AD
2526 * data/bison.simple, data/bison.c++ (b4_lhs_value)
2527 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
2528
6cbfbcc5
AD
25292002-05-02 Akim Demaille <akim@epita.fr>
2530
2531 * configure.in (AC_INIT): Bump to 1.49b.
2532 (AM_INIT_AUTOMAKE): Short invocation.
2533
b8548114
AD
25342002-05-02 Akim Demaille <akim@epita.fr>
2535
2536 Version 1.49a.
2537
c20cd1fa
AD
25382002-05-01 Akim Demaille <akim@epita.fr>
2539
2540 * src/skeleton.h: Remove.
2541
8a9566d4
AD
25422002-05-01 Akim Demaille <akim@epita.fr>
2543
2544 * src/skeleton.h: Fix the #endif.
2545 Reported by Magnus Fromreide.
2546
8c6d399a
PE
25472002-04-26 Paul Eggert <eggert@twinsun.com>
2548
2549 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
2550 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 2551 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 2552
2b7ed18a
RA
25532002-04-25 Robert Anisko <robert@lrde.epita.fr>
2554
2555 * src/scan-skel.l: Postprocess quadrigraphs.
2556
2557 * src/reader.c (copy_character): New function, used to output
2558 single characters while replacing `[' and `]' with quadrigraphs, to
2559 avoid troubles with M4 quotes.
2560 (copy_comment): Output characters with copy_character.
2561 (read_additionnal_code): Likewise.
2562 (copy_string2): Likewise.
2563 (copy_definition): Likewise.
2564
2565 * tests/calc.at: Exercise M4 quoting.
2566
34a89c50
AD
25672002-04-25 Akim Demaille <akim@epita.fr>
2568
2569 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
2570 between `!' and the command.
2571 Reported by Paul Eggert.
2572
0dd1580a
RA
25732002-04-24 Robert Anisko <robert@lrde.epita.fr>
2574
2575 * tests/calc.at: Exercise prologue splitting.
2576
2577 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
2578 `b4_post_prologue' instead of `b4_prologue'.
2579
2580 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
2581 muscles.
2582 (output): Free pre_prologue_obstack and post_prologue_obstack.
2583 * src/files.h, src/files.c (attrs_obstack): Remove.
2584 (pre_prologue_obstack, post_prologue_obstack): New.
2585 * src/reader.c (copy_definition): Add a parameter to specify the
2586 obstack to fill, instead of using attrs_obstack unconditionally.
2587 (read_declarations): Pass pre_prologue_obstack to copy_definition if
2588 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
2589
83c1796f
PE
25902002-04-23 Paul Eggert <eggert@twinsun.com>
2591
2592 * data/bison.simple: Remove unnecessary commentary and white
2593 space differences from 1_29-branch.
2594 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
2595
2596 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
2597 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
2598 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
2599 constructors or destructors.
2600
2601 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
2602
1207eeac
AD
26032002-04-23 Akim Demaille <akim@epita.fr>
2604
2605 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
2606 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
2607 location with columns.
2608 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
2609 All reported by Paul Eggert.
2610
78ab8f67
AD
26112002-04-22 Akim Demaille <akim@epita.fr>
2612
2613 * src/reduce.c (dump_grammar): Move to...
2614 * src/gram.h, src/gram.c (grammar_dump): here.
2615 Be sure to separate long item numbers.
2616 Don't read the members of a rule's prec if its nil.
2617
133c20e2
AD
26182002-04-22 Akim Demaille <akim@epita.fr>
2619
2620 * src/output.c (table_size, table_grow): New.
2621 (MAXTABLE): Remove, replace uses with table_size.
2622 (pack_vector): Instead of dying when the table is too big, grow it.
2623
9515e8a7
AD
26242002-04-22 Akim Demaille <akim@epita.fr>
2625
2626 * data/bison.simple (yyr1): Its type is that of a token number.
2627 * data/bison.c++ (r1_): Likewise.
2628 * tests/regression.at (Web2c Actions): Adjust.
2629
23c5a174
AD
26302002-04-22 Akim Demaille <akim@epita.fr>
2631
2632 * src/reader.c (token_translations_init): 256 is now the default
2633 value for the error token, i.e., it will be assigned another
2634 number if the user assigned 256 to one of her tokens.
2635 (reader): Don't force 256 to error.
2636 * doc/bison.texinfo (Symbols): Adjust.
2637 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
2638 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
2639 etc. instead of 10, 20, 30 (which was used to `jump' over error
2640 (256) and undefined (2)).
2641
5fbb0954
AD
26422002-04-22 Akim Demaille <akim@epita.fr>
2643
2644 Propagate more token_number_t.
2645
2646 * src/gram.h (token_number_as_item_number)
2647 (item_number_as_token_number): New.
2648 * src/output.c (GENERATE_OUTPUT_TABLE): New.
2649 Use it to create output_item_number_table and
2650 output_token_number_table.
2651 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
2652 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
2653 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
2654 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
2655
4f940944
AD
26562002-04-22 Akim Demaille <akim@epita.fr>
2657
2658 * src/output.h, src/output.c (get_lines_number): Remove.
2659
3ded9a63
AD
26602002-04-19 Akim Demaille <akim@epita.fr>
2661
2662 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
2663 as Lex/Flex'.
2664 (Debugging): More details about enabling the debugging features.
2665 (Table of Symbols): Describe $$, $n, @$, and @n.
2666 Suggested by Tim Josling.
2667
e0c471a9
AD
26682002-04-19 Akim Demaille <akim@epita.fr>
2669
2670 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
2671
fecc10cd
AD
26722002-04-10 Akim Demaille <akim@epita.fr>
2673
2674 * src/system.h: Rely on HAVE_LIMITS_H.
2675 Suggested by Paul Eggert.
2676
51dec47b
AD
26772002-04-09 Akim Demaille <akim@epita.fr>
2678
2679 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
2680 full stderr, and strip it according to the bison options, instead
2681 of composing the error message from different bits.
2682 This makes it easier to check for several error messages.
2683 Adjust all the invocations.
2684 Add an invocation exercising the error token.
2685 Add an invocation demonstrating a stupid error message.
2686 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
2687 Adjust the tests.
2688 Error message are for stderr, not stdout.
2689
007a50a4
AD
26902002-04-09 Akim Demaille <akim@epita.fr>
2691
2692 * src/gram.h, src/gram.c (error_token_number): Remove, use
2693 errtoken->number.
2694 * src/reader.c (reader): Don't specify the user token number (2)
2695 for $undefined, as it uselessly prevents using it.
2696 * src/gram.h (token_number_t): Move to...
2697 * src/symtab.h: here.
2698 (state_t.number): Is a token_number_t.
2699 * src/print.c, src/reader.c: Use undeftoken->number instead of
2700 hard coded 2.
2701 (Even though this 2 is not the same as above: the number of the
2702 undeftoken remains being 2, it is its user token number which
2703 might not be 2).
2704 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
2705 `user_token_number_max'.
2706 Output `undef_token_number'.
2707 * data/bison.simple, data/bison.c++: Use them.
2708 Be sure to map invalid yylex return values to
2709 `undef_token_number'. This saves us from gratuitous SEGV.
2710
2711 * tests/conflicts.at (Solved SR Conflicts)
2712 (Unresolved SR Conflicts): Adjust.
2713 * tests/regression.at (Web2c Actions): Adjust.
2714
06446ccf
AD
27152002-04-08 Akim Demaille <akim@epita.fr>
2716
2717 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
2718 Adding #line.
2719 Remove the duplicate `typedefs'.
2720 (RhsNumberType): Fix the declaration and various other typos.
2721 Use __ofile__.
2722 * data/bison.simple: Use __ofile__.
2723 * src/scan-skel.l: Handle __ofile__.
2724
62a3e4f0
AD
27252002-04-08 Akim Demaille <akim@epita.fr>
2726
2727 * src/gram.h (item_number_t): New, the type of item numbers in
2728 RITEM. Note that it must be able to code symbol numbers as
2729 positive number, and the negation of rule numbers as negative
2730 numbers.
2731 Adjust all dependencies (pretty many).
2732 * src/reduce.c (rule): Remove this `short *' pointer: use
2733 item_number_t.
2734 * src/system.h (MINSHORT, MAXSHORT): Remove.
2735 Include `limits.h'.
2736 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
2737 (shortcpy): Remove.
2738 (MAXTABLE): Move to...
2739 * src/output.c (MAXTABLE): here.
2740 (prepare_rules): Use output_int_table to output rhs.
2741 * data/bison.simple, data/bison.c++: Adjust.
2742 * tests/torture.at (Big triangle): Move the limit from 254 to
2743 500.
2744 * tests/regression.at (Web2c Actions): Ajust.
2745
2746 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
2747 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
2748 passes, but produces negative #line number, once fixed, GCC is
2749 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
2750 C), it passes.
2751 * src/state.h (state_h): Code input lines on ints, not shorts.
2752
bb88b0fc
AD
27532002-04-08 Akim Demaille <akim@epita.fr>
2754
2755 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
2756 and then the grammar.
2757
9a636f47
AD
27582002-04-08 Akim Demaille <akim@epita.fr>
2759
2760 * src/system.h: No longer using strndup.
2761
680e8701
AD
27622002-04-07 Akim Demaille <akim@epita.fr>
2763
2764 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
2765 * src/output.c (output_table_data): Return the longest number.
2766 (prepare_tokens): Output `token_number_max').
2767 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
2768 New.
2769 Use them to define yy_token_number_type/TokenNumberType.
2770 Use this type for yytranslate.
2771 * tests/torture.at (Big triangle): Push the limit from 124 to
2772 253.
2773 * tests/regression.at (Web2c Actions): Adjust.
2774
817e9f41
AD
27752002-04-07 Akim Demaille <akim@epita.fr>
2776
2777 * tests/torture.at (Big triangle): New.
2778 (GNU AWK Grammar, GNU Cim Grammar): Move to...
2779 * tests/existing.at: here.
2780
5123689b
AD
27812002-04-07 Akim Demaille <akim@epita.fr>
2782
2783 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
2784 nritems.
2785 Adjust dependencies.
2786
f3849179
AD
27872002-04-07 Akim Demaille <akim@epita.fr>
2788
2789 * src/reader.c: Normalize increments to prefix form.
2790
bd02036a
AD
27912002-04-07 Akim Demaille <akim@epita.fr>
2792
2793 * src/reader.c, symtab.c: Remove debugging code.
2794
db8837cb
AD
27952002-04-07 Akim Demaille <akim@epita.fr>
2796
2797 Rename all the `bucket's as `symbol_t'.
2798
2799 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
2800 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
2801 * src/symtab.c, src/symtab.h (bucket): Rename as...
2802 (symbol_t): this.
2803 (symbol_list_new, bucket_check_defined, bucket_make_alias)
2804 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
2805 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
2806 (buckets_new, buckets_free, buckets_do): Rename as...
2807 (symbol_list_new, symbol_check_defined, symbol_make_alias)
2808 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
2809 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
2810 (symbols_new, symbols_free, symbols_do): these.
2811
72a23c97
AD
28122002-04-07 Akim Demaille <akim@epita.fr>
2813
2814 Use lib/hash for the symbol table.
2815
2816 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
2817 EOF.
2818 * src/lex.c (lex): Set the `number' member of new terminals.
2819 * src/reader.c (bucket_check_defined, bucket_make_alias)
2820 (bucket_check_alias_consistence, bucket_translation): New.
2821 (reader, grammar_free, readgram, token_translations_init)
2822 (packsymbols): Adjust.
2823 (reader): Number the predefined tokens.
2824 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
2825 for predefined tokens.
2826 * src/symtab.h (bucket): Remove all the hash table related
2827 members.
2828 * src/symtab.c (symtab): Replace by...
2829 (bucket_table): this.
2830 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
2831 (buckets_new, buckets_do): New.
2832
280a38c3
AD
28332002-04-07 Akim Demaille <akim@epita.fr>
2834
2835 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
2836 (start_symbol, max_user_token_number, semantic_parser)
2837 (error_token_number): Initialize.
2838 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
2839 Initialize.
2840 (reader): Don't.
2841 (errtoken, eoftoken, undeftoken, axiom): Extern.
2842
03b31c0c
AD
28432002-04-07 Akim Demaille <akim@epita.fr>
2844
2845 * src/gram.h (rule_s): prec and precsym are now pointers
2846 to the bucket giving the priority/associativity.
2847 Member `associativity' removed: useless.
2848 * src/reduce.c, src/conflicts.c: Adjust.
2849
8b3df748
AD
28502002-04-07 Akim Demaille <akim@epita.fr>
2851
2852 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
2853 Properly escape the symbols' TAG when outputting them.
2854
e601aa1d
AD
28552002-04-07 Akim Demaille <akim@epita.fr>
2856
2857 * src/lalr.h (LA): Is a bitsetv, not bitset*.
2858
b0299a2e
AD
28592002-04-07 Akim Demaille <akim@epita.fr>
2860
2861 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
2862 (LArule): this, which is an array to rule_t*.
2863 * src/print.c, src/conflicts.c: Adjust.
2864
d7e1f00c
AD
28652002-04-07 Akim Demaille <akim@epita.fr>
2866
2867 * src/gram.h (rule_t): Rename `number' as `user_number'.
2868 `number' is a new member.
2869 Adjust dependencies.
2870 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
2871
cc9305dd
AD
28722002-04-07 Akim Demaille <akim@epita.fr>
2873
2874 As a result of the previous patch, it is no longer needed
2875 to reorder ritem itself.
2876
2877 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
2878
b0940840
AD
28792002-04-07 Akim Demaille <akim@epita.fr>
2880
2881 Be sure never to walk through RITEMS, but use only data related to
2882 the rules themselves. RITEMS should be banished.
2883
2884 * src/output.c (output_token_translations): Rename as...
2885 (prepare_tokens): this.
2886 In addition to `translate', prepare the muscles `tname' and
2887 `toknum', which were handled by...
2888 (output_rule_data): this.
2889 Remove, and move the remainder of its outputs into...
2890 (prepare_rules): this new routines, which also merges content from
2891 (output_gram): this.
2892 (prepare_rules): Be sure never to walk through RITEMS.
2893 (output_stos): Rename as...
2894 (prepare_stos): this.
2895 (output): Always invoke prepare_states, after all, just don't use it
2896 in the output if you don't need it.
2897
643a5994
AD
28982002-04-07 Akim Demaille <akim@epita.fr>
2899
2900 * src/LR0.c (new_state): Display `nstates' as the name of the
2901 newly created state.
2902 Adjust to initialize first_state and last_state if needed.
2903 Be sure to distinguish the initial from the final state.
2904 (new_states): Create the itemset of the initial state, and use
2905 new_state.
2906 * src/closure.c (closure): Now that the initial state has its
2907 items properly set, there is no need for a special case when
2908 creating `ruleset'.
2909
2910 As a result, now the rule 0, reducing to $axiom, is visible in the
2911 outputs. Adjust the test suite.
2912
2913 * tests/conflicts.at (Solved SR Conflicts)
2914 (Unresolved SR Conflicts): Adjust.
2915 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
2916 * tests/conflicts.at (S/R in initial): New.
2917
b4c4ccc2
AD
29182002-04-07 Akim Demaille <akim@epita.fr>
2919
2920 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
2921 the RHS of the rules.
2922 * src/output.c (output_gram): Likewise.
2923
bba97eb2
AD
29242002-04-07 Akim Demaille <akim@epita.fr>
2925
2926 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
2927 bucket.
2928 Adjust all dependencies.
2929 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
2930 `number' of the buckets too.
2931 * src/gram.h: Include `symtab.h'.
2932 (associativity): Move to...
2933 * src/symtab.h: here.
2934 No longer include `gram.h'.
2935
c3b407f4
AD
29362002-04-07 Akim Demaille <akim@epita.fr>
2937
2938 * src/gram.h, src/gram.c (rules_rhs_length): New.
2939 (ritem_longest_rhs): Use it.
2940 * src/gram.h (rule_t): `number' is a new member.
2941 * src/reader.c (packgram): Set it.
2942 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
2943 the end of `rules', and count them out of `nrules'.
2944 (reduce_output, dump_grammar): Adjust.
2945 * src/print.c (print_grammar): It is no longer needed to check for
2946 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
2947 * tests/reduce.at (Reduced Automaton): New test.
2948
11652ab3
AD
29492002-04-07 Akim Demaille <akim@epita.fr>
2950
2951 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
2952 lacking `+ 1' to nrules, Bison reported as useless a token if it
2953 was used solely to set the precedence of the last rule...
2954
26b23c1a
AD
29552002-04-07 Akim Demaille <akim@epita.fr>
2956
2957 * data/bison.c++, data/bison.simple: Don't output the current file
2958 name in #line, to avoid useless diffs between two identical
2959 outputs under different names.
2960
18bcecb0
AD
29612002-04-07 Akim Demaille <akim@epita.fr>
2962
2963 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
2964 Normalize loops to using `< nrules + 1', not `<= nrules'.
2965
fa770c86
AD
29662002-04-07 Akim Demaille <akim@epita.fr>
2967
2968 * TODO: Update.
2969
d9b739c3
AD
29702002-04-07 Akim Demaille <akim@epita.fr>
2971
2972 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
2973 bucket.value as bucket.number.
2974
99013900
AD
29752002-04-07 Akim Demaille <akim@epita.fr>
2976
2977 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
2978 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
2979 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
2980 RHS, instead of being an index in RITEMS.
2981
e966383b
PE
29822002-04-04 Paul Eggert <eggert@twinsun.com>
2983
2984 * doc/bison.texinfo: Update copyright date.
2985 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
2986 (Symbols): Warn about running Bison in one character set,
2987 but compiling and/or running in an incompatible one.
2988 Warn about character code 256, too.
2989
29902002-04-03 Paul Eggert <eggert@twinsun.com>
2991
2992 * src/bison.data (YYSTACK_ALLOC): Depend on whether
2993 YYERROR_VERBOSE is nonzero, not whether it is defined.
2994
2995 Merge changes from bison-1_29-branch.
c307773e 2996
8d6c48b9
PE
29972002-03-20 Paul Eggert <eggert@twinsun.com>
2998
2999 Merge fixes from Debian bison_1.34-1.diff.
3000
3001 * configure.in (AC_PREREQ): 2.53.
3002
e53c6322
AD
30032002-03-20 Akim Demaille <akim@epita.fr>
3004
3005 * src/conflicts.c (log_resolution): Argument `resolution' is const.
3006
9ffbeca7
PE
30072002-03-19 Paul Eggert <eggert@twinsun.com>
3008
21db0b2a
PE
3009 * src/bison.simple (YYCOPY): New macro.
3010 (YYSTACK_RELOCATE): Use it.
3011 Remove Type arg; no longer needed. All callers changed.
3012 (yymemcpy): Remove; no longer needed.
3013
9ffbeca7
PE
3014 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
3015 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
3016
642cb8f8
AD
30172002-03-19 Akim Demaille <akim@epita.fr>
3018
3019 Test and fix the #line outputs.
3020
3021 * tests/atlocal.at (GCC): New.
3022 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
3023 (Prologue synch line, ,%union synch line, Postprologue synch line)
3024 (Action synch line, Epilogue synch line): New tests.
3025 * src/reader.c (parse_union_decl): Define the muscle stype_line.
3026 * data/bison.simple, data/bison.c++: Use it.
3027
3c31a486
AD
30282002-03-19 Akim Demaille <akim@epita.fr>
3029
3030 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
3031 (Solved SR Conflicts, %expect not enough, %expect right)
3032 (%expect too much): Move to...
3033 * tests/conflicts.at: this new file.
3034
0d8bed56
AD
30352002-03-19 Akim Demaille <akim@epita.fr>
3036
3037 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
3038 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
3039 that we can move to enums for instance.
3040 * src/output.c (token_definitions_output): Output a list of
3041 `token-name, token-number' instead of the #define.
3042 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
3043
9208d17f
AD
30442002-03-14 Akim Demaille <akim@epita.fr>
3045
3046 Use Gettext 0.11.1.
3047
af27eacb
RA
30482002-03-09 Robert Anisko <robert@lrde.epita.fr>
3049
3050 * data/bison.c++: Make the user able to add members to the generated
3051 parser by subclassing.
3052
9101a310
RA
30532002-03-05 Robert Anisko <robert@lrde.epita.fr>
3054
3055 * src/reader.c (read_additionnal_code): `c' should be an integer, not
3056 a character.
3057 Reported by Nicolas Tisserand and Nicolas Burrus.
3058
fff9bf0b
RA
30592002-03-04 Robert Anisko <robert@lrde.epita.fr>
3060
3061 * src/reader.c: Warn about lacking semi-colons, do not complain.
3062
64dba31e
RA
30632002-03-04 Robert Anisko <robert@lrde.epita.fr>
3064
3065 * data/bison.c++: Remove a debug line.
3066
374f5a14
RA
30672002-03-04 Robert Anisko <robert@lrde.epita.fr>
3068
3069 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
3070 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
3071 provide a default implementation.
3072
bfcf1f3a
AD
30732002-03-04 Akim Demaille <akim@epita.fr>
3074
3075 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
3076 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
3077 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
3078 * tests/semantic.at (Parsing Guards): Similarly.
3079 * src/reader.at (readgram): Complain if the last rule is not ended
3080 with a semi-colon.
3081
65ccf9fc
AD
30822002-03-04 Akim Demaille <akim@epita.fr>
3083
3084 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
3085 * src/closure.c: here.
3086 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
3087 RTC.
3088 * src/warshall.h, src/warshall.c: Remove.
3089 * tests/sets.at (Broken Closure): Adjust.
3090
d0039cbc
AD
30912002-03-04 Akim Demaille <akim@epita.fr>
3092
3093 * src/output.c (output_skeleton): tempdir is const.
3094 bytes_read is unused.
3095
345cea78
AD
30962002-03-04 Akim Demaille <akim@epita.fr>
3097
3098 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
3099 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
3100 Update.
3101 From Michael Hayes.
3102
564801f7
AD
31032002-03-04 Akim Demaille <akim@epita.fr>
3104
3105 * src/closure.c (closure): `r' is unused.
3106
e5352bc7
AD
31072002-03-04 Akim Demaille <akim@epita.fr>
3108
3109 * tests/sets.at (Broken Closure): Add the ending `;'.
3110 * src/reader.at (readgram): Complain if a rule is not ended with a
3111 semi-colon.
3112
914feea9
AD
31132002-03-04 Akim Demaille <akim@epita.fr>
3114
3115 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
3116 (count_sr_conflicts): Use bitset_count.
3117 * src/reduce.c (inaccessable_symbols): Ditto.
3118 (bits_size): Remove.
3119 * src/warshall.h, src/warshall.c: Convert to bitsetv.
3120
f0250de6
AD
31212002-03-04 Akim Demaille <akim@epita.fr>
3122
3123 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
3124 * src/reduce.c: Remove the `bitset_zero's following the
3125 `bitset_create's, as now it is performed by the latter.
3126
ef017502
AD
31272002-03-04 Akim Demaille <akim@epita.fr>
3128
3129 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
3130 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
3131 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
3132 latest sources from Michael.
3133
76514394
AD
31342002-03-04 Akim Demaille <akim@epita.fr>
3135
3136 * src/output.c (output): Don't free the grammar.
3137 * src/reader.c (grammar_free): New.
3138 * src/main.c (main): Call it and don't free symtab here.
3139
55024580
AD
31402002-03-04 Akim Demaille <akim@epita.fr>
3141
3142 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
3143 before returning.
3144 Reported by Benoit Perrot.
3145
f9abaa2c
AD
31462002-03-04 Akim Demaille <akim@epita.fr>
3147
3148 Use bitset operations when possible, not loops over bits.
3149
3150 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
3151 bitset_or.
3152 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
3153 * src/reduce.c (useless_nonterminals): Formatting changes.
3154 * src/warshall.c (TC): Use bitset_or.
3155
0e721e75
AD
31562002-03-04 Akim Demaille <akim@epita.fr>
3157
3158 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
3159 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
3160 Ditto.
3161
0fb1ffb1
AD
31622002-03-04 Akim Demaille <akim@epita.fr>
3163
3164 * src/lalr.c (F): Now a bitset*.
3165 Adjust all dependencies.
3166
b86796bf
AD
31672002-03-04 Akim Demaille <akim@epita.fr>
3168
3169 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
3170 Adjust all dependencies.
3171
602bbf31
AD
31722002-03-04 Akim Demaille <akim@epita.fr>
3173
3174 * src/L0.c, src/LR0.h (nstates): Be size_t.
3175 Adjust comparisons (signed vs unsigned).
3176 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
3177 bitset*.
3178 Adjust all dependencies.
3179
d8a0245c
AD
31802002-03-04 Akim Demaille <akim@epita.fr>
3181
3182 * src/closure.c (firsts): Now, also a bitset.
3183 Adjust all dependencies.
3184 (varsetsize): Remove, now unused.
3185 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
3186
34ba9743
AD
31872002-03-04 Akim Demaille <akim@epita.fr>
3188
3189 * src/print.c: Convert to use bitset.h, not hand coded iterations
3190 over ints.
3191
ed86e78c
AD
31922002-03-04 Akim Demaille <akim@epita.fr>
3193
3194 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
3195
dfdb1797
AD
31962002-03-04 Akim Demaille <akim@epita.fr>
3197
3198 * src/closure.c (ruleset): Be a bitset.
3199 (rulesetsize): Remove.
3200
7086e707
AD
32012002-03-04 Akim Demaille <akim@epita.fr>
3202
3203 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
3204 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
3205 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
3206 * src/closure.c (fderives): Be an array of bitsets.
3207
98254360
RA
32082002-02-28 Robert Anisko <robert@lrde.epita.fr>
3209
3210 * data/bison.c++: Merge the two generated headers. Insert a copyright
3211 notice in each output file.
3212
a75c057f
AD
32132002-02-28 Akim Demaille <akim@epita.fr>
3214
3215 * data/bison.c++: Copy the prologue of bison.simple to fetch
3216 useful M4 definitions, such as b4_header_guard.
3217
06b00abc
AD
32182002-02-25 Akim Demaille <akim@epita.fr>
3219
3220 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
3221 translator friendly scheme for the bgr
3222 copyright notice.
06b00abc 3223
70e7d534
AD
32242002-02-25 Akim Demaille <akim@epita.fr>
3225
3226 * src/output.c (header_output): Remove, now handled completely via
3227 M4.
3228
abe017f6
AD
32292002-02-25 Akim Demaille <akim@epita.fr>
3230
3231 * m4/m4.m4: New, from CVS Autoconf.
3232 * configure.in: Invoke it.
3233 * src/output.c (output_skeleton): Use its result instead of the
3234 hard coded name.
3235
381fb12e
AD
32362002-02-25 Akim Demaille <akim@epita.fr>
3237
3238 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
3239 Fileutils 4.1.5.
3240 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
3241 * src/output.c (output_skeleton): Use mkstemp to create a real
3242 temporary file.
3243 Move the filling of `skeleton' and its muscle to...
3244 (prepare): here.
3245 (output): Move the definition of the prologue muscle to...
3246 (prepare): here.
3247 * src/system.h (DEFAULT_TMPDIR): New.
3248
6f38107f
PE
32492002-02-14 Paul Eggert <eggert@twinsun.com>
3250
3251 Remove the support for C++ namespace cleanliness; it was
3252 causing more problems than it was curing, since it didn't work
3253 properly on some nonstandard C++ compilers. This can wait
3254 for a proper C++ parser.
3255
3256 * NEWS: Document this.
3257 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
3258 of C++, as it's treated like C now.
3259 * src/bison.simple (YYSTD): Remove.
3260 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
3261 Treat C++ just like Standard C instead of trying to support
3262 namespace cleanliness.
3263
80cce3da
AD
32642002-02-14 Akim Demaille <akim@epita.fr>
3265
3266 * tests/regression.at (else): Adjust to Andreas' change.
3267
842e8679
AD
32682002-02-14 Akim Demaille <akim@epita.fr>
3269
3270 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
3271
4bda3f10
AD
32722002-02-13 Andreas Schwab <schwab@suse.de>
3273
3274 * src/output.c (output_rule_data): Don't output NULL, it might
3275 not be defined yet.
3276
4162fa07 32772002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 3278
4162fa07
RA
3279 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
3280 (Copyright notice): Update.
b418ecd8 3281
bd16a5dc
AD
32822002-02-11 Akim Demaille <akim@epita.fr>
3283
3284 * tests/regression.at (%nonassoc and eof): Don't include
3285 nonportable headers.
3286
8d69a1a3
RA
32872002-02-08 Robert Anisko <robert@lrde.epita.fr>
3288
3289 * data/bison.c++: Correct error recovery. Make the user able to
3290 initialize the starting location.
3291
9b2d0677
AD
32922002-02-07 Akim Demaille <akim@epita.fr>
3293
3294 * tests/input.at: New.
3295
69e2658b
RA
32962002-02-07 Robert Anisko <robert@lrde.epita.fr>
3297
3298 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 3299 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
3300 directives around tables only needed for debugging.
3301
4aacc3a7
RA
33022002-02-07 Robert Anisko <robert@lrde.epita.fr>
3303
3304 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
3305 C++ parsers.
3306 (yy::b4_name::parse): Use print_.
3307
762a801e
RA
33082002-02-07 Robert Anisko <robert@lrde.epita.fr>
3309
3310 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
3311
4bb2bc3f
RA
33122002-02-07 Robert Anisko <robert@lrde.epita.fr>
3313
3314 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
3315 C++ parsers.
3316 (yy::b4_name::parse): Build verbose error messages, and use error_.
3317
6b45a3ca
RA
33182002-02-06 Robert Anisko <robert@lrde.epita.fr>
3319
3320 * data/bison.c++: Fix m4 quoting in comments.
3321
50997c6e
RA
33222002-02-06 Robert Anisko <robert@lrde.epita.fr>
3323
3324 * data/bison.c++: Adjust the parser code. Fix some muscles that were
3325 not expanded by m4.
3326
3f3eed27
AD
33272002-02-05 Akim Demaille <akim@epita.fr>
3328
3329 * data/bison.c++: Adjust to the M4 back end.
3330 More is certainly needed.
3331
be2a1a68
AD
33322002-02-05 Akim Demaille <akim@epita.fr>
3333
3334 Give a try to M4 as a back end.
3335
3336 * lib/readpipe.c: New, from wdiff.
3337 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
3338 BISON_HAIRY.
3339 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
3340 specific values. Now it is m4 that performs the lookup.
3341 * src/parse-skel.y: Remove.
3342 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
3343 * src/output.c (actions_output, guards_output)
3344 (token_definitions_output): No longer keeps track of the output
3345 line number, hence remove the second argument.
3346 (guards_output): Check against the guard member of a rule, not the
3347 action member.
3348 Adjust callers.
3349 (output_skeleton): Don't look for the skeleton location, let m4 do
3350 that.
3351 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
3352 file will be used.
3353 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
3354 (prepare): Given that for the time being changesyntax is not
3355 usable in M4, rename the muscles using `-' to `_'.
3356 Define `defines_flag', `output_parser_name' and `output_header_name'.
3357 * src/output.h (actions_output, guards_output)
3358 (token_definitions_output): Adjust prototypes.
3359 * src/scan-skel.l: Instead of scanning the skeletons, it now
3360 processes the output of m4: `__oline__' and `#output'.
3361 * data/bison.simple: Adjust to be used by M4(sugar).
3362 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
3363 to date.
3364 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
3365 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
3366 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
3367 shamelessly stolen from CVS Autoconf.
3368
beda758b
AD
33692002-02-05 Akim Demaille <akim@epita.fr>
3370
3371 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
3372 * configure.in: Check for the declarations of free and malloc.
3373 * src/muscle_tab.c: Adjust.
3374
5ece6d43
AD
33752002-02-05 Akim Demaille <akim@epita.fr>
3376
3377 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
3378 which have no values.
3379
5bb18f9a
AD
33802002-02-05 Akim Demaille <akim@epita.fr>
3381
3382 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
3383 * data/: here.
3384
894dd62e
PE
33852002-01-29 Paul Eggert <eggert@twinsun.com>
3386
3387 * src/bison.simple (YYSIZE_T): Do not define merely because
3388 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
3389 On some platforms, <alloca.h> does not declare YYSTD (size_t).
3390
82841af7
AD
33912002-01-27 Akim Demaille <akim@epita.fr>
3392
3393 Fix `%nonassoc and eof'.
3394
3395 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
3396 which were not properly copied! Replace
3397 memcpy (res->errs, src->errs, src->nerrs);
3398 with
3399 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
3400 !!!
3401 * tests/regression.at (%nonassoc and eof): Adjust to newest
3402 Autotest: `.' is not in the PATH.
3403
318b76e9
AD
34042002-01-27 Akim Demaille <akim@epita.fr>
3405
3406 * tests/sets.at (AT_EXTRACT_SETS): New.
3407 (Nullable): Use it.
3408 (Firsts): New.
3409
30d2f3d5
AD
34102002-01-26 Akim Demaille <akim@epita.fr>
3411
3412 * tests/actions.at, tests/calc.at, tests/headers.at,
3413 * tests/torture.at: Adjust to the newest Autotest which no longer
3414 forces `.' in the PATH.
3415
30f8c395
AD
34162002-01-25 Akim Demaille <akim@epita.fr>
3417
3418 * tests/regression.at (%nonassoc and eof): New.
3419 Suggested by Robert Anisko.
3420
29ae55f1
AD
34212002-01-24 Akim Demaille <akim@epita.fr>
3422
3423 Bison dumps core when trying to complain about broken input files.
3424 Reported by Cris van Pelt.
3425
3426 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
3427 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
3428 into...
3429 (Invalid inputs): Strengthen: exercise parse_percent_token.
3430
2b548aa6
RA
34312002-01-24 Robert Anisko <robert.anisko@epita.fr>
3432
3433 * src/Makefile.am: Add bison.c++.
3434 * src/bison.c++: New skeleton.
3435
bb0146c2
AD
34362002-01-21 Paolo Bonzini <bonzini@gnu.org>
3437
3438 * po/it.po: New.
3439
bec30531
AD
34402002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
3441
3442 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
3443
fc6edc45
MA
34442002-01-20 Marc Autret <marc@gnu.org>
3445
3446 * src/files.c (compute_output_file_names): Fix
3447
5e5d5415
MA
34482002-01-20 Marc Autret <marc@gnu.org>
3449
3450 * tests/output.at: New test.
3451 * src/files.c (compute_base_names): Don't map extensions when
3452 the YACC flag is set, use defaults.
3453 Reported by Evgeny Stambulchik.
3454
44ea3fbd
MA
34552002-01-20 Marc Autret <marc@gnu.org>
3456
bb0146c2 3457 * src/system.h: Need to define __attribute__ away for non-GCC
44ea3fbd
MA
3458 compilers as well (i.e. the vendor C compiler).
3459 Suggested by Albert Chin-A-Young.
3460
338963d1
TVH
34612002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
3462
3463 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
3464 canonical definition.
3465 * src/system.h: Use the canonical definition for PARAMS (avoids
3466 a conflict with the macro from lib/hash.h).
3467
c57b2479
AD
34682002-01-11 Akim Demaille <akim@epita.fr>
3469
3470 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 3471 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 3472
b85810ae
AD
34732002-01-09 Akim Demaille <akim@epita.fr>
3474
3475 * src/files.c, src/files.h (output_infix): New.
3476 (tab_extension): Remove.
3477 (compute_base_names): Compute the former, drop the latter.
3478 * src/output.c (prepare): Insert the muscles `output-infix', and
3479 `output-suffix'.
3480 * src/parse-skel.y (string, string.1): New.
3481 (section.header): Use it.
3482 (section.yacc): Remove.
3483 (prefix): Remove too.
3484 * src/scan-skel.l: Adjust.
3485 * src/bison.simple, src/bison.hairy: Adjust.
3486
cae60122
AD
34872002-01-09 Akim Demaille <akim@epita.fr>
3488
3489 * configure.in (WERROR_CFLAGS): Compute it.
3490 * src/Makefile.am (CFLAGS): Pass it.
3491 * tests/atlocal.in (CFLAGS): Idem.
3492 * src/files.c: Fix a few warnings.
3493 (get_extension_index): Remove, unused.
3494
ae404801
AD
34952002-01-08 Akim Demaille <akim@epita.fr>
3496
3497 * src/getargs.c (AS_FILE_NAME): New.
3498 (getargs): Use it to convert DOSish file names.
3499 * src/files.c (base_name): Rename as full_base_name to avoid
3500 clashes with `base_name ()'.
3501 (filename_split): New.
3502 (compute_base_names): N-th rewrite, using filename_split.
3503
22312b71
AD
35042002-01-08 Akim Demaille <akim@epita.fr>
3505
3506 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
3507 New, stolen from the Fileutils 4.1.
3508 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
3509 * configure.in: Check for the presence of memrchr, and of its
3510 prototype.
3511
a67cef01
TVH
35122002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
3513
3514 * lib/hash.h (__P): Added definition for this macro.
3515 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
3516 BUILT_SOURCES, to ensure they are generated first.
3517 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
3518 %error-verbose to allow bootstrapping with bison 1.30x.
3519
2b25d624
AD
35202002-01-06 Akim Demaille <akim@epita.fr>
3521
3522 * src/reader.c (parse_braces): Don't fetch the next char, the
3523 convention is to fetch on entry.
3524 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
3525 'switch' without a following semicolon.
3526 * tests/regression.at (braces parsing): New.
3527
3460813b
AD
35282002-01-06 Akim Demaille <akim@epita.fr>
3529
3530 Bison is dead wrong in its RR conflict reports.
3531
3532 * tests/torture.at (GNU Cim Grammar): New.
3533 * src/conflicts.c (count_rr_conflicts): Fix.
3534
73784c64
AD
35352002-01-06 Akim Demaille <akim@epita.fr>
3536
3537 Creating package.m4 from configure.ac causes too many problems.
3538
3539 * tests/Makefile.am (package.m4): Create it by hand,
3540 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
3541
25d81090
AD
35422002-01-06 Akim Demaille <akim@epita.fr>
3543
3544 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
3545 skeleton.h.
3546
a9b8959e
PE
35472002-01-04 Paul Eggert <eggert@twinsun.com>
3548
3549 * doc/bison.texinfo (Debugging):
3550 Remove YYSTDERR; it's no longer defined or used.
3551 Also, s/cstdio.h/cstdio/.
3552
25d81090
AD
35532002-01-03 Akim Demaille <akim@epita.fr>
3554
3555 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
3556
1109455c
AD
35572002-01-03 Akim Demaille <akim@epita.fr>
3558
3559 * src/parse-skel.y (process_skeleton): Don't bind the parser's
3560 tracing code to --trace, wait for a better --trace option, with
3561 args.
3562
7ea5e977
AD
35632002-01-03 Akim Demaille <akim@epita.fr>
3564
3565 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
3566 The ISO C++ standard is extremely clear about it: stderr is
3567 considered a macro, not a regular symbol (see table 94 `Header
3568 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
3569 Therefore std:: does not apply to it. It still does with fprintf.
3570 Also, s/cstdio.h/cstdio/.
3571
fab5b110
AD
35722002-01-03 Akim Demaille <akim@epita.fr>
3573
3574 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
3575 for non system headers.
3576
aed7fd9b
AD
35772002-01-02 Akim Demaille <akim@epita.fr>
3578
3579 Equip the skeleton chain with location tracking, runtime trace,
3580 pure parser and scanner.
3581
3582 * src/parse-skel.y: Request a pure parser, locations, and prefix
3583 renaming.
3584 (%union): Having several members with the same type does not help
3585 type mismatches, simplify.
3586 (YYPRINT, yyprint): New.
3587 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
3588 (skel_error): this.
3589 Handle locations.
3590 * src/scan-skel.l: Adjust to these changes.
3591 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
3592 (LOCATION_PRINT, skel_control_t): New.
3593
24fad99e
AD
35942001-12-30 Akim Demaille <akim@epita.fr>
3595
3596 * src/parse-skel.y: Get rid of the shift/reduce conflict:
3597 replace `gb' with BLANKS.
3598 * src/scan-skel.l: Adjust.
3599
a4b36db4
AD
36002001-12-30 Akim Demaille <akim@epita.fr>
3601
3602 * src/system.h: We don't need nor want bcopy.
3603 Throw away MS-DOS crap: we don't need getpid.
3604 * configure.in: We don't need strndup. It was even causing
3605 problems: because Flex includes the headers *before* us,
3606 _GNU_SOURCE is not defined by config.h, and therefore strndup was
3607 not visible.
3608 * lib/xstrndup.c: New.
3609 * src/scan-skel.l: Use it.
3610 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
3611 * src/parse-skel.y: Use %directives instead of #defines.
3612
1239777d
AD
36132001-12-30 Akim Demaille <akim@epita.fr>
3614
3615 * src/skeleton.h: New.
3616 * src/output.c (output_parser, output_master_parser): Remove, dead
3617 code.
3618 * src/output.h (get_lines_number, actions_output, guards_output)
3619 (token_definitions_output): Prototype them.
3620 * src/parse-skel.y: Add the license notice.
3621 Include output.h and skeleton.h.
3622 (process_skeleton): Returns void, and takes a single parameter.
3623 * src/scan-skel.l: Add the license notice.
3624 Include skeleton.h.
3625 Don't use %option yylineno: it seems that then Flex imagines
3626 REJECT has been used, and therefore it won't reallocate its
3627 buffers (which makes no other sense to me than a bug). It results
3628 in warnings for `unused: yy_flex_realloc'.
3629
9b3add5b
RA
36302001-12-30 Robert Anisko <robert.anisko@epita.fr>
3631
3632 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
3633 (MUSCLE_INSERT_PREFIX): ...to there.
3634 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
3635 (MUSCLE_INSERT_PREFIX): Move from here...
3636
3637 * src/bison.hairy: Add a section directive. Put braces around muscle
3638 names. This parser skeleton is still broken, but Bison should not
3639 choke on a bad muscle 'syntax'.
3640 * src/bison.simple: Add a section directive. Put braces around muscle
3641 names.
3642
3643 * src/files.h (strsuffix, stringappend): Add declarations.
3644 (tab_extension): Add declaration.
3645 (short_base_name): Add declaration.
3646
3647 * src/files.c (strsuffix, stringappend): No longer static. These
3648 functions are used in the skeleton parser.
3649 (tab_extension): New.
3650 (compute_base_names): Use the computations done in this function
fab5b110 3651 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
3652 names.
3653 (short_base_name): No longer static.
3654
3655 * src/output.c (output_skeleton): New.
3656 (output): Disable call to output_master_parser, and give a try to
3657 a new skeleton handling system.
3658 (guards_output, actions_output): No longer static.
3659 (token_definitions_output, get_lines_number): No longer static.
3660
3661 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
3662
fab5b110 3663 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
3664 parse-skel.y.
3665
3666 * src/parse-skel.y: New file.
3667 * src/scan-skel.l: New file.
3668
b5b61c61
AD
36692001-12-29 Akim Demaille <akim@epita.fr>
3670
3671 %name-prefix is broken.
3672
3673 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
3674 Adjust all dependencies.
3675 * tests/headers.at (export YYLTYPE): Strengthen this test: use
3676 %name-prefix.
3677
3678 Renaming yylval but not yylloc is not consistent. Now we do.
3679
3680 * src/bison.simple: Prefix yylloc if used.
3681 * doc/bison.texinfo (Decl Summary): Document that.
3682
8c9a50be
AD
36832001-12-29 Akim Demaille <akim@epita.fr>
3684
3685 * doc/bison.texinfo: Promote `%long-directive' over
3686 `%long_directive'.
3687 Remove all references to fixed-output-files, yacc is enough.
3688
d99361e6
AD
36892001-12-29 Akim Demaille <akim@epita.fr>
3690
3691 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
3692 user prologue. These are defaults.
3693 * tests/actions.at (Mid-rule actions): Make sure the user can
3694 define YYDEBUG and YYERROR_VERBOSE.
3695
b9cecb91
AD
36962001-12-29 Akim Demaille <akim@epita.fr>
3697
3698 * src/output.c (header_output): Don't forget to export YYLTYPE and
3699 yylloc.
3700 * tests/headers.at (export YYLTYPE): New, make sure it does.
3701 * tests/regression.at (%union and --defines, Invalid CPP headers):
3702 Move to...
3703 * tests/headers.at: here.
3704
aea13e97
AD
37052001-12-29 Akim Demaille <akim@epita.fr>
3706
3707 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
3708
931394cb
AD
37092001-12-29 Akim Demaille <akim@epita.fr>
3710
3711 * tests/actions.at (Mid-rule actions): Output on a single line
3712 instead of several.
3713
704a47c4
AD
37142001-12-29 Akim Demaille <akim@epita.fr>
3715
3716 * doc/bison.texinfo: Formatting changes.
3717
091e20bb
AD
37182001-12-29 Akim Demaille <akim@epita.fr>
3719
3720 Don't store the token defs in a muscle, just be ready to output it
3721 on command. Now possible via `symbols'. Fixes a memory leak.
3722
3723 * src/output.c (token_definitions_output): New.
3724 (output_parser, header_output): Use it.
3725 * src/reader.c (symbols_save): Remove.
3726
cce71710
AD
37272001-12-29 Akim Demaille <akim@epita.fr>
3728
3729 * src/bison.simple: Do not provide a default for YYSTYPE and
3730 YYLTYPE before the user's prologue. Otherwise it's hardly... a
3731 default.
3732
82c035a8
AD
37332001-12-29 Akim Demaille <akim@epita.fr>
3734
3735 Mid-rule actions are simply... ignored!
3736
3737 * src/reader.c (readgram): Be sure to attach mid-rule actions to
3738 the empty-rule associated to the dummy symbol, not to the host
3739 rule.
3740 * tests/actions.at (Mid-rule actions): New.
3741
8419d367
AD
37422001-12-29 Akim Demaille <akim@epita.fr>
3743
3744 Memory leak.
3745
3746 * src/reader.c (reader): Free grammar.
3747
375d5806
AD
37482001-12-29 Akim Demaille <akim@epita.fr>
3749
3750 Memory leak.
3751
3752 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
3753 since it allocates it for each state, although only one is needed.
3754 (allocate_storage): Do it here.
3755
f51cb8ff
AD
37562001-12-29 Akim Demaille <akim@epita.fr>
3757
3758 * src/options.h, src/options.c (create_long_option_table): Rename
3759 as...
3760 (long_option_table_new): this, with a clearer prototype.
3761 (percent_table): Remove, unused,
3762 * src/getargs.c (getargs): Adjust.
3763
29e88316
AD
37642001-12-29 Akim Demaille <akim@epita.fr>
3765
3766 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
3767 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
3768 as states.
3769
b9f71f19
AD
37702001-12-29 Akim Demaille <akim@epita.fr>
3771
3772 * src/lalr.c (build_relations): Rename `states' as `states1'.
3773 Sorry, I don't understand exactly what it is, no better name...
3774
1a2b5d37
AD
37752001-12-29 Akim Demaille <akim@epita.fr>
3776
3777 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
3778 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
3779 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
3780 as rules.
3781
1cca533e
AD
37822001-12-29 Akim Demaille <akim@epita.fr>
3783
3784 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
3785 ago.
3786
c03ae966
AD
37872001-12-29 Akim Demaille <akim@epita.fr>
3788
3789 * src/reader.c, src/reader.h (user_toknums): Remove.
3790 Adjust all users to use symbols[i]->user_token_number.
3791
5a670b1e
AD
37922001-12-29 Akim Demaille <akim@epita.fr>
3793
3794 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
3795 Adjust all users to use symbols[i]->prec or ->assoc.
3796
ad949da9
AD
37972001-12-29 Akim Demaille <akim@epita.fr>
3798
3799 * src/reader.c, src/reader.h (tags): Remove.
3800 Adjust all users to use symbols[i]->tag.
3801
0e78e603
AD
38022001-12-29 Akim Demaille <akim@epita.fr>
3803
3804 * src/gram.h, src/gram.c (symbols): New, similar to state_table
3805 and rule_table.
3806 * src/reader.c (packsymbols): Fill this table.
3807 Drop sprec.
3808 * src/conflicts.c (resolve_sr_conflict): Adjust.
3809 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
3810 single table.
3811 Use symbols[i]->tag instead of tags[i].
3812
213e640e
AD
38132001-12-29 Akim Demaille <akim@epita.fr>
3814
3815 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
3816 In addition, put a comment in there, to replace...
3817 * tests/regression.at (%union and C comments): Remove.
3818
e7b8bef1
AD
38192001-12-29 Akim Demaille <akim@epita.fr>
3820
3821 * tests/regression.at (Web2c Actions): Blindly move the actual
3822 output as expected output. The contents *seem* right to me, but I
3823 can't pretend reading perfectly parser tables... Nonetheless, all
3824 the other tests pass correctly, the table look OK, even though the
3825 presence of `$axiom' is to be noted: AFAICS it is useless (but
3826 harmless).
3827
b68e7744
AD
38282001-12-29 Akim Demaille <akim@epita.fr>
3829
3830 * src/reader.c (readgram): Don't add the rule 0 if there were no
3831 rules read. In other words, add it _after_ having performed
3832 grammar sanity checks.
3833 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
3834
78d5bae9
AD
38352001-12-29 Akim Demaille <akim@epita.fr>
3836
3837 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
3838 visible, and some states have now a different number.
3839
ff442794
AD
38402001-12-29 Akim Demaille <akim@epita.fr>
3841
3842 * src/reader.c (readgram): Bind the initial rule's lineno to that
3843 of the first rule.
3844 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
3845 (Solved SR Conflicts): Adjust rule 0's line number.
3846
610ab194
AD
38472001-12-29 Akim Demaille <akim@epita.fr>
3848
3849 Fix the `GAWK Grammar' failure.
3850
3851 * src/LR0.c (final_state): Initialize to -1 so that we do compute
3852 the reductions of the first state which was mistakenly confused
3853 with the final state because precisely final_state was initialized
3854 to 0.
3855 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
3856 now noticed by Bison.
3857 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
3858 have a reduction on $default.
3859
29d29c8f
AD
38602001-12-29 Akim Demaille <akim@epita.fr>
3861
3862 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
3863 rule line numbers.
3864 * src/closure.c (print_closure): Likewise.
3865 * src/derives.c (print_derives): Likewise.
3866 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
3867 now.
3868
7c6b64d0
AD
38692001-12-29 Akim Demaille <akim@epita.fr>
3870
3871 * src/lalr.c (lookaheads_print): New.
3872 (lalr): Call it when --trace-flag.
3873 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
3874 are dumped.
3875
3d4daee3
AD
38762001-12-29 Akim Demaille <akim@epita.fr>
3877
3878 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
3879 when walking through ritem, even via rule->rhs.
3880 * src/reduce.c (dump_grammar, useful_production, reduce_output)
3881 (useful_production, useless_nonterminals): Likewise.
3882 (reduce_grammar_tables): Likewise, plus update nritems.
3883 * src/nullable.c (set_nullable): Likewise.
3884 * src/lalr.c (build_relations): Likewise.
3885 * tests/sets.at (Nullable): Adjust.
3886 Fortunately, now, the $axiom is no longer nullable.
3887
9e7f6bbd
AD
38882001-12-29 Akim Demaille <akim@epita.fr>
3889
3890 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
3891 the 0-sentinel.
3892 * src/gram.c (ritem_longest_rhs): Likewise.
3893 * src/reduce.c (nonterminals_reduce): Likewise.
3894 * src/print_graph.c (print_graph): Likewise.
3895 * src/output.c (output_rule_data): Likewise.
3896 * src/nullable.c (set_nullable): Likewise.
3897
255ef638
AD
38982001-12-29 Akim Demaille <akim@epita.fr>
3899
3900 * src/output.c: Comment changes.
3901
0d8a7363
AD
39022001-12-27 Paul Eggert <eggert@twinsun.com>
3903
3904 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
3905 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
3906 Sparc, as they were causing more porting problems than the
3907 (minor) performance improvement was worth.
3908
3909 Also, catch up with 1.31's YYSTD.
3910
3db472b9
AD
39112001-12-27 Akim Demaille <akim@epita.fr>
3912
3913 * src/output.c (output_gram): Rely on nritems, not the
3914 0-sentinel. See below.
3915 Use -1 as separator, not 0.
3916 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
3917 Rely on -1 as separator in yyrhs, instead of 0.
3918 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
3919 twice `Now at end of input', therefore there are two lines less to
3920 expect.
3921
b365aa05
AD
39222001-12-27 Akim Demaille <akim@epita.fr>
3923
3924 * tests/regression.at (Unresolved SR Conflicts):
3925 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
3926 below.
3927
30171f79
AD
39282001-12-27 Akim Demaille <akim@epita.fr>
3929
3930 * src/LR0.c (new_state): Recognize the final state by the fact it
3931 is reached by eoftoken.
3932 (insert_start_shifting_state, insert_eof_shifting_state)
3933 (insert_accepting_state, augment_automaton): Remove, since now
3934 these states are automatically computed from the initial state.
3935 (generate_states): Adjust.
3936 * src/print.c: When reporting a rule number to the user, substract
3937 1, so that the axiom rule is rule 0, and the first user rule is 1.
3938 * src/reduce.c: Likewise.
3939 * src/print_graph.c (print_core): For the time being, just as for
3940 the report, depend upon --trace-flags to dump the full set of
3941 items.
3942 * src/reader.c (readgram): Once the grammar read, insert the rule
3943 0: `$axiom: START-SYMBOL $'.
3944 * tests/set.at: Adjust: rule 0 is now displayed, and since the
3945 number of the states has changed (the final state is no longer
3946 necessarily the last), catch up.
3947
75142d45
AD
39482001-12-27 Akim Demaille <akim@epita.fr>
3949
3950 Try to make the use of the eoftoken valid. Given that its value
3951 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
3952 is used instead of > 0 where appropriate, (ii), depend upon nritems
3953 instead of the 0-sentinel.
3954
3955 * src/gram.h, src/gram.c (nritems): New.
3956 Expected to be duplication of nitems, but for the time being...
3957 * src/reader.c (packgram): Assert nritems and nitems are equal.
3958 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
3959 * src/closure.c (print_closure, print_fderives): Likewise.
3960 * src/gram.c (ritem_print): Likewise.
3961 * src/print.c (print_core, print_grammar): Likewise.
3962 * src/print_graph.c: Likewise.
3963
b7c49edf
AD
39642001-12-27 Akim Demaille <akim@epita.fr>
3965
3966 * src/main.c (main): If there are complains after grammar
3967 reductions, then output the report anyway if requested, then die.
3968 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
3969 * src/reader.c (eoftoken): New.
3970 (parse_token_decl): If the token being defined has value `0', it
3971 is the eoftoken.
3972 (packsymbols): No longer hack `tags' to insert `$' by hand.
3973 Be sure to preserve the value of the eoftoken.
3974 (reader): Make sure eoftoken is defined.
3975 Initialize nsyms to 0: now eoftoken is created just like the others.
3976 * src/print.c (print_grammar): Don't special case the eof token.
3977 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
3978 lie anyway, albeit pleasant.
3979 * tests/calc.at: Exercise error messages with eoftoken.
3980 Change the grammar so that empty input is invalid.
3981 Adjust expectations.
3982 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
3983
ec2da99f
AD
39842001-12-27 Akim Demaille <akim@epita.fr>
3985
3986 * configure.in: Check the protos of strchr ans strspn.
3987 Replace strchr if needed.
3988 * src/system.h: Provide the protos of strchr, strspn and memchr if
3989 missing.
3990 * lib/strchr.c: New.
3991 * src/reader.c (symbols_save): Use strchr.
3992
8adfa272
AD
39932001-12-27 Akim Demaille <akim@epita.fr>
3994
3995 * src/print.c, src/print_graph.c (escape): New.
3996 Use it to quote the TAGS outputs.
3997 * src/print_graph.c (print_state): Now errors are in red, and
3998 reductions in green.
3999 Prefer high to wide: output the state number on a line of its own.
4000
80dac38c
AD
40012001-12-27 Akim Demaille <akim@epita.fr>
4002
4003 * src/state.h, src/state.c (reductions_new): New.
4004 * src/LR0.c (set_state_table): Let all the states have a
4005 `reductions', even if reduced to 0.
4006 (save_reductions): Adjust.
4007 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
4008 * src/print.c (print_reductions, print_actions): Adjust.
4009 * src/output.c (action_row): Adjust.
4010
2cec70b9
AD
40112001-12-27 Akim Demaille <akim@epita.fr>
4012
4013 * src/state.h, src/state.c (errs_new, errs_dup): New.
4014 * src/LR0.c (set_state_table): Let all the states have an errs,
4015 even if reduced to 0.
4016 * src/print.c (print_errs, print_reductions): Adjust.
4017 * src/output.c (output_actions, action_row): Adjust.
4018 * src/conflicts.c (resolve_sr_conflict): Adjust.
4019
13ca549a
AD
40202001-12-27 Akim Demaille <akim@epita.fr>
4021
4022 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
4023
5092aba5
AD
40242001-12-27 Akim Demaille <akim@epita.fr>
4025
4026 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
4027 * src/print.c: here.
4028 (lookaheadset, shiftset): New, used as additional storage by
4029 print_reductions.
4030 (print_results): Adjust.
4031 (print_shifts, print_gotos, print_errs): New, extracted from...
4032 (print_actions): here.
4033 * src/print_graph.c (print_actions): Remove dead code.
4034
11e2beca
AD
40352001-12-27 Akim Demaille <akim@epita.fr>
4036
4037 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
4038 `$n' and `@n'.
4039
dac3c910
AD
40402001-12-27 Akim Demaille <akim@epita.fr>
4041
4042 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
4043 (build_relations): Adjust.
4044
d0b0fefa
AD
40452001-12-27 Akim Demaille <akim@epita.fr>
4046
4047 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
4048 duplication.
4049
adc8c848
AD
40502001-12-27 Akim Demaille <akim@epita.fr>
4051
4052 * src/reader.c (packgram): Catch nitems overflows.
4053
14d293ac
AD
40542001-12-27 Akim Demaille <akim@epita.fr>
4055
4056 * src/files.c, src/files.h (guard_obstack): Remove.
4057 * src/output.c (output): Adjust.
4058 * src/reader.c (parse_braces): New, factoring...
4059 (copy_action, copy_guard): these two which are renamed as...
4060 (parse_action, parse_guard): these.
4061 As a voluntary consequence, using braces around guards is now
4062 mandatory.
4063
f499b062
AD
40642001-12-27 Akim Demaille <akim@epita.fr>
4065
4066 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
4067 * src/reader.c (symbol_list): `guard' and `guard_line' are new
4068 members.
4069 (symbol_list_new): Adjust.
4070 (copy_action): action_line is the first line, not the last.
4071 (copy_guard): Just as for actions, store the `action' only, not
4072 the switch/case/break flesh.
4073 Don't parse the user action that might follow the guard, let...
4074 (readgram): do it, i.e., now, there can be an action after a
4075 guard.
4076 In other words the guard is just explicitly optional.
4077 (packgram): Adjust.
4078 * src/output.c (guards_output): New.
4079 (output_parser): Call it when needed.
4080 (output): Also free the guard and attrs obstacks.
4081 * src/files.c, src/files.h (obstack_save): Remove.
4082 (output_files): Remove.
4083 As a result, if one needs the former `.act' file, using an
4084 appropriate skeleton which requires actions and guards is now
4085 required.
4086 * src/main.c (main): Adjust.
4087 * tests/semantic.at: New.
4088 * tests/regression.at: Use `input.y' as input file name.
4089 Avoid 8+3 problems by requiring input.c when the test needs the
4090 parser.
4091
d945f5cd
AD
40922001-12-27 Akim Demaille <akim@epita.fr>
4093
4094 * src/reader.c (symbol_list_new): Be sure to initialize all the
4095 fields.
4096
d200e455
AD
40972001-12-27 Akim Demaille <akim@epita.fr>
4098
4099 All the hacks using a final pseudo state are now useless.
4100
4101 * src/LR0.c (set_state_table): state_table holds exactly nstates.
4102 * src/lalr.c (nLA): New.
4103 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
4104 instead of lookaheadsp from the pseudo state (nstate + 1).
4105
f9507c28
AD
41062001-12-27 Akim Demaille <akim@epita.fr>
4107
4108 * src/output.c (action_row, token_actions): Use a state_t instead
4109 of a integer, and nlookaheads instead of the following state's
4110 lookaheadsp.
4111
065fbd27
AD
41122001-12-27 Akim Demaille <akim@epita.fr>
4113
4114 * src/conflicts.c (log_resolution, flush_shift)
4115 (resolve_sr_conflict, set_conflicts, solve_conflicts)
4116 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
4117 (conflicts_print, print_reductions): Use a state_t instead of an
4118 integer when referring to a state.
4119 As much as possible, depend upon nlookaheads, instead of the
4120 `lookaheadsp' member of the following state (since lookaheads of
4121 successive states are successive, the difference between state n + 1
4122 and n served as the number of lookaheads for state n).
4123 * src/lalr.c (add_lookback_edge): Likewise.
4124 * src/print.c (print_core, print_actions, print_state)
4125 (print_results): Likewise.
4126 * src/print_graph.c (print_core, print_actions, print_state)
4127 (print_graph): Likewise.
4128 * src/conflicts.h: Adjust.
4129
1b177bd7
AD
41302001-12-27 Akim Demaille <akim@epita.fr>
4131
4132 * src/bison.hairy: Formatting/comment changes.
4133 ANSIfy.
4134 Remove `register' indications.
4135 Add plenty of `static'.
4136
7742ddeb
AD
41372001-12-27 Akim Demaille <akim@epita.fr>
4138
4139 * src/output.c (prepare): Drop the muscle `ntbase' which
4140 duplicates ntokens.
4141 * src/bison.simple: Formatting/comment changes.
4142 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
4143 is an undocumented synonym.
4144
1fa14068
AD
41452001-12-22 Akim Demaille <akim@epita.fr>
4146
4147 * src/output.c (output_table_data): Change the prototype to use
4148 `int' for array ranges: some invocations do pass an int, not a
4149 short.
4150 Reported by Wayne Green.
4151
b9752825
AD
41522001-12-22 Akim Demaille <akim@epita.fr>
4153
4154 Some actions of web2c.y are improperly triggered.
4155 Reported by Mike Castle.
4156
4157 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
4158 * tests/regression.at (Web2c): Rename as...
4159 (Web2c Report): this.
4160 (Web2c Actions): New.
4161
776209d6
AD
41622001-12-22 Akim Demaille <akim@epita.fr>
4163
4164 Reductions in web2c.y are improperly reported.
4165 Reported by Mike Castle.
4166
4167 * src/conflicts.c (print_reductions): Fix.
4168 * tests/regression.at (Web2c): New.
4169
275fc3ad
AD
41702001-12-18 Akim Demaille <akim@epita.fr>
4171
4172 Some host fail on `assert (!"foo")', which expands to
4173 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
4174 Reported by Nelson Beebee.
4175
4176 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
4177 `#define it_succeeded 0' and `assert (it_succeeded)'.
4178
897668ee
MA
41792001-12-17 Marc Autret <autret_m@epita.fr>
4180
4181 * src/bison.simple: Don't hard code the skeleton line and filename.
4182 * src/output.c (output_parser): Rename 'line' as 'output_line'.
4183 New line counter 'skeleton_line' (skeleton-line muscle).
4184
ab3399e0
PE
41852001-12-17 Paul Eggert <eggert@twinsun.com>
4186
4187 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
4188 YYDEBUG must be defined to a nonzero value.
4189
4190 * src/bison.simple (yytname): Do not assume that the user defines
4191 YYDEBUG to a properly parenthesized expression.
4192
3877f72b
AD
41932001-12-17 Akim Demaille <akim@epita.fr>
4194
4195 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
4196 nlookaheads is a new member.
4197 Adjust all users.
4198 * src/lalr.h (nlookaheads): Remove this orphan declaration.
4199 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
4200 state.
776209d6 4201
331dbc1b
AD
42022001-12-17 Akim Demaille <akim@epita.fr>
4203
4204 * src/files.h, src/files.c (open_files, close_files): Remove.
4205 * src/main.c (main): Don't open/close files, nor invoke lex_free,
4206 let...
4207 * src/reader.c (reader): Do it.
776209d6 4208
be750e4c
AD
42092001-12-17 Akim Demaille <akim@epita.fr>
4210
4211 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 4212
709ae8c6
AD
42132001-12-17 Akim Demaille <akim@epita.fr>
4214
4215 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
4216 (flush_reduce): New.
4217 (resolve_sr_conflict): Adjust.
776209d6 4218
f87685c3
AD
42192001-12-17 Akim Demaille <akim@epita.fr>
4220
4221 * src/output.c (output_obstack): Be static and rename as...
4222 (format_obstack): this, to avoid any confusion with files.c's
4223 output_obstack.
4224 * src/reader.h (muscle_obstack): Move to...
4225 * src/output.h: here, since it's defined in output.c.
4226
837491d8
AD
42272001-12-17 Akim Demaille <akim@epita.fr>
4228
4229 * src/output.c (action_row, save_column, default_goto)
4230 (sort_actions, matching_state, pack_vector): Better variable
4231 locality.
4232
796d61fb
AD
42332001-12-17 Akim Demaille <akim@epita.fr>
4234
4235 * src/output.c: Various formatting changes.
776209d6 4236
64d15509
AD
42372001-12-17 Akim Demaille <akim@epita.fr>
4238
4239 * src/files.c (output_files): Free the output_obstack.
4240 * src/main.c (main): Call print and print_graph conditionally.
4241 * src/print.c (print): Work unconditionally.
4242 * src/print_graph.c (print_graph): Work unconditionally.
4243 * src/conflicts.c (log_resolution): Output only if verbose_flag.
4244
fbc8ecb7
MA
42452001-12-16 Marc Autret <autret_m@epita.fr>
4246
4247 * src/output.c (actions_output): Fix. When we use %no-lines,
4248 there is one less line per action.
4249
f0440388
MA
42502001-12-16 Marc Autret <autret_m@epita.fr>
4251
4252 * src/bison.simple: Remove a useless #line directive.
4253 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
4254 * src/output.c (get_lines_number): New.
776209d6 4255 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
4256 output muscles.
4257 Fix line numbering.
4258 (actions_output): Computes the number of lines taken by actions.
4259 (output_master_parser): Insert new skeleton which is the name of
4260 the output parser file name.
4261
a79986b8
MA
42622001-12-15 Marc Autret <autret_m@epita.fr>
4263
4264 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
4265
4ec8e00f
MA
42662001-12-15 Marc Autret <autret_m@epita.fr>
4267
4268 * src/output.c (output_gram): Keep track of the hairy one.
4269
1a4648ff
AD
42702001-12-15 Akim Demaille <akim@epita.fr>
4271
4272 Make `make distcheck' work.
4273
4274 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
4275 system.h which uses libgettext.h.
4276
9c2c67e6
AD
42772001-12-15 Akim Demaille <akim@epita.fr>
4278
4279 * src/nullable.c (set_nullable): Useless rules must be skipped,
4280 otherwise, since we range over their symbols, we might look at a
4281 nonterminal which no longer ``exists'', i.e., it is not counted in
4282 `nvars', hence we overflow our arrays.
4283
93ede233
AD
42842001-12-15 Akim Demaille <akim@epita.fr>
4285
4286 The header can also be produced directly, without any obstack!
4287 Yahoo!
4288
4289 * src/files.c, src/files.h (defines_obstack): Remove.
4290 (compute_header_macro): Global.
4291 (defines_obstack_save): Remove.
4292 * src/reader.c (parse_union_decl): No longer output to
4293 defines_obstack: its content can be found in the `stype' muscle
4294 anyway.
4295 (output_token_translations): Merge into...
4296 (symbols_output): this.
4297 Rename as...
4298 (symbols_save): this.
4299 (reader): Adjust.
4300 * src/output.c (header_output): New.
4301 (output): Call it.
4302
2666f928
AD
43032001-12-15 Akim Demaille <akim@epita.fr>
4304
4305 * src/reader.c (parse_union_decl): Instead of handling two obstack
4306 simultaneously, use one to define the `stype' muscle, and use the
4307 value of the latter to fill defines_obstack.
4308 (copy_comment): Remove.
4309 (copy_comment2): Work for a single obstack.
4310 Rename as...
4311 (copy_comment): this.
4312
428046f8
AD
43132001-12-15 Akim Demaille <akim@epita.fr>
4314
4315 * src/lex.c, src/lex.h (xgetc): No longer static.
4316 * src/reader.c (parse_union_decl): Revamp.
4317
ea52d706
AD
43182001-12-15 Akim Demaille <akim@epita.fr>
4319
4320 Still making progress in separating Bison into (i) input, (ii)
4321 process, (iii) output: now we can directly output the parser file
4322 without using table_obstack at all.
4323
4324 * src/files.c, src/files.h (table_obstack): Bye bye.
4325 (parser_file_name): New.
4326 * src/files.c (compute_output_file_names): Compute it.
4327 * src/output.c (actions_output, output_parser)
4328 (output_master_parser): To a file instead of an obstack.
4329
3f96f4dc
AD
43302001-12-15 Akim Demaille <akim@epita.fr>
4331
4332 Attach actions to rules, instead of pre-outputting them to
4333 actions_obstack.
4334
4335 * src/gram.h (rule_t): action and action_line are new members.
4336 * src/reader.c (symbol_list): Likewise.
4337 (copy_action): Save the actions within the rule.
4338 (packgram): Save them in rule_table.
4339 * src/output.c (actions_output): New.
4340 (output_parser): Use it on `%%actions'.
4341 (output_rule_data): Don't free rule_table.
4342 (output): Do it.
4343 (prepare): Don't save the `action' muscle.
4344 * src/bison.simple: s/%%action/%%actions/.
4345
51576fb3
AD
43462001-12-15 Akim Demaille <akim@epita.fr>
4347
4348 * src/reader.c (copy_action): When --yacc, don't append a `;'
4349 to the user action: let it fail if lacking.
dee049eb 4350 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 4351
2648a72d
AD
43522001-12-14 Akim Demaille <akim@epita.fr>
4353
4354 * src/lex.c (literalchar): Simply return the char you decoded, non
4355 longer mess around with obstacks and int pointers.
4356 Adjust all callers.
4357
92790e5b
AD
43582001-12-14 Akim Demaille <akim@epita.fr>
4359
4360 * src/lex.c (literalchar): Don't escape the special characters,
4361 just decode them, and keep them as char (before, eol was output as
4362 the 2 char string `\n' etc.).
4363 * src/output.c (output_rule_data): Use quotearg to output the
4364 token strings.
4365
927c1557
PE
43662001-12-13 Paul Eggert <eggert@twinsun.com>
4367
4368 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
4369 Do not infringe on the global user namespace when using C++.
4370 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
4371 All uses of `fprintf' and `stderr' changed.
4372
4373 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
4374
ed8e1f68
AD
43752001-12-13 Akim Demaille <akim@epita.fr>
4376
4377 The computation of nullable is broken: it doesn't handle empty
4378 RHS's properly.
4379
4380 * tests/torture.at (GNU AWK Grammar): New.
4381 * tests/sets.at (Nullable): New.
4382 * src/nullable.c (set_nullable): Instead of blindly looping over
4383 `ritems', loop over the rules, and then over their rhs's.
4384
4385 Work around Autotest bugs.
4386
4387 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
4388 frame, because Autotest understand lines starting with a `+' as
4389 traces from the shell. Then, they are not processed properly.
4390 Admittedly an Autotest bug, but we don't have time to wait for
4391 Autotest to catch up.
4392 * tests/regression.at (Broken Closure): Adjust to the new table
4393 frames.
4394 Move to...
4395 * tests/sets.at: here.
4396
cb581495
AD
43972001-12-13 Akim Demaille <akim@epita.fr>
4398
4399 * src/closure.c (closure): Use nrules instead of playing tricks
4400 with BITS_PER_WORD.
4401
2e729273
AD
44022001-12-13 Akim Demaille <akim@epita.fr>
4403
4404 * src/print.c (print_actions): Output the handling of `$' as the
4405 traces do: shifting the token EOF. Before EOF was treated as a
4406 nonterminal.
4407 * tests/regression.at: Adjust some tests.
4408 * src/print_graph.c (print_core): Complete the set of items via
4409 closure. The next-to-final and final states are still unsatisfying,
4410 but that's to be addressed elsewhere.
4411 No longer output the rule numbers, but do output the state number.
4412 A single loop for the shifts + gotos is enough, but picked a
4413 distinct color for each.
4414 (print_graph): Initialize and finalize closure.
4415
107f7dfb
AD
44162001-12-13 Akim Demaille <akim@epita.fr>
4417
4418 * src/reader.c (readgram): Remove dead code, an strip useless
4419 braces.
4420 (get_type): Remove, unused.
4421
9b53a24f
AD
44222001-12-12 Akim Demaille <akim@epita.fr>
4423
4424 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
4425 on that of lib/error.c.
4426
dbfb6dcd
AD
44272001-12-12 Akim Demaille <akim@epita.fr>
4428
4429 Some hosts don't like `/' in includes.
4430
4431 * src/system.h: Include libgettext.h without qualifying the path.
4432 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
4433 $(top_srcdir).
4434
c25fb648
MA
44352001-12-11 Marc Autret <autret_m@epita.fr>
4436
4437 * src/output.c (output_parser): Remove useless muscle.
4438
710ddc4f
MA
44392001-12-11 Marc Autret <autret_m@epita.fr>
4440
4441 * src/bison.simple: Remove #line just before %%epilogue. It
4442 is now handled in ...
4443 * src/reader.c (read_additionnal_code): Add the output of a
4444 #line for the epilogue.
4445
e83d80b8
MA
44462001-12-10 Marc Autret <autret_m@epita.fr>
4447
927c1557 4448 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
4449 replace precedent remove.
4450 * src/bison.simple: Remove #line before %%prologue because
4451 %%input-line is wrong at this time.
4452
971d5158
MA
44532001-12-10 Marc Autret <autret_m@epita.fr>
4454
4455 * src/reader.c (symbols_output): Clean up.
927c1557 4456 * src/output.c (output_gram, output): Clean up.
971d5158 4457
5edafffd
AD
44582001-12-10 Akim Demaille <akim@epita.fr>
4459
4460 * src/lalr.c (initialize_lookaheads): New. Extracted from...
4461 * src/LR0.c (set_state_table): here.
4462 * src/lalr.c (lalr): Call it.
4463
0279f8e9
AD
44642001-12-10 Akim Demaille <akim@epita.fr>
4465
4466 * src/state.h (shifts): Remove the `number' member: shifts are
4467 attached to state, hence no longer need to be labelled with a
4468 state number.
4469
190c4f5f
AD
44702001-12-10 Akim Demaille <akim@epita.fr>
4471
4472 Now that states have a complete set of members, the linked list of
4473 shifts is useless: just fill directly the state's shifts member.
4474
4475 * src/state.h (shifts): Remove the `next' member.
4476 * src/LR0.c (first_state, last_state): Remove.
4477 Adjust the callers.
4478 (augment_automaton): Don't look for the shifts that must be added
4479 a shift on EOF: it is those of the state we looked for! But now,
4480 since shifts are attached, it is no longer needed to looking
4481 merely by its id: its number.
4482
2a73b93d
AD
44832001-12-10 Akim Demaille <akim@epita.fr>
4484
4485 * src/LR0.c (augment_automaton): Better variable locality.
4486 Remove an impossible branch: if there is a state corresponding to
4487 the start symbol being shifted, then there is shift for the start
4488 symbol from the initial state.
4489
74392f6a
AD
44902001-12-10 Akim Demaille <akim@epita.fr>
4491
4492 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
4493 only when appropriate: when insert_start_shifting_state' is not
4494 invoked.
4495 * tests/regression.at (Rule Line Numbers): Adjust.
4496
37c82725
AD
44972001-12-10 Akim Demaille <akim@epita.fr>
4498
4499 * src/LR0.c (augment_automaton): Now that all states have shifts,
4500 merge the two cases addition shifts to the initial state.
4501
6a164e0c
AD
45022001-12-10 Akim Demaille <akim@epita.fr>
4503
4504 * src/lalr.c (set_state_table): Move to...
4505 * src/LR0.c: here.
4506 * src/lalr.c (lalr): Don't call it...
4507 * src/LR0.c (generate_states): do it.
4508 * src/LR0.h (first_state): Remove, only the table is used.
4509
7215de24
AD
45102001-12-10 Akim Demaille <akim@epita.fr>
4511
4512 * src/LR0.h (first_shift, first_reduction): Remove.
4513 * src/lalr.c: Don't use first_shift: find shifts through the
4514 states.
4515
80e25d4d
AD
45162001-12-10 Akim Demaille <akim@epita.fr>
4517
4518 * src/LR0.c: Attach shifts to states as soon as they are
4519 computed.
4520 * src/lalr.c (set_state_table): Instead of assigning shifts to
4521 state, just assert that the mapping was properly done.
4522
0ab3728b
AD
45232001-12-10 Akim Demaille <akim@epita.fr>
4524
4525 * src/LR0.c (insert_start_shift): Rename as...
4526 (insert_start_shifting_state): this.
4527 (insert_eof_shifting_state, insert_accepting_state): New.
4528 (augment_automaton): Adjust.
4529 Better locality of the variables.
4530 When looking if the start_symbol is shifted from the initial
4531 state, using `while (... symbol != start_symbol ...)' sounds
4532 better than `while (... symbol < start_symbol ...)': If fail
4533 to see how the order between symbols could be relevant!
4534
78af9bbc
AD
45352001-12-10 Akim Demaille <akim@epita.fr>
4536
4537 * src/getargs.h: Don't declare `spec_name_prefix' and
4538 `spec_file_prefix', declared by src/files.h.
4539 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
4540 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
4541 * src/output.c (prepare): Adjust.
4542 * src/reader.c (symbols_output): Likewise.
4543 * src/vmsgetargs.c: Vaguely adjust, but who cares?
4544
bdef2a41
AD
45452001-12-10 Akim Demaille <akim@epita.fr>
4546
4547 * src/muscle_tab.c (muscle_init): NULL is a better default than
4548 `"0"'.
4549
3735969c
AD
45502001-12-10 Akim Demaille <akim@epita.fr>
4551
4552 * src/reader.c (reader): Calling symbols_output once is enough.
4553
49701457
AD
45542001-12-10 Akim Demaille <akim@epita.fr>
4555
4556 Now that states have a complete set of members, the linked list of
4557 reductions is useless: just fill directly the state's reductions
4558 member.
4559
4560 * src/state.h (struct reductions): Remove member `number' and
4561 `next'.
4562 * src/LR0.c (first_reduction, last_reduction): Remove.
4563 (save_reductions): Don't link the new reductions, store them in
4564 this_state.
4565 * src/lalr.c (set_state_table): No need to attach reductions to
4566 states, it's already done.
4567 * src/output.c (output_actions): No longer free the shifts, then
4568 the reductions, then the states: free all the states and their
4569 members.
4570
0edad749
AD
45712001-12-10 Akim Demaille <akim@epita.fr>
4572
4573 * src/options.c (OPTN, DRTV, BOTH): New.
4574 (option_table): Use them.
4575
0edad749
AD
4576 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
4577 the job of system.h.
4578 * src/options.c: Don't include stdio.h and xalloc.h for the same
4579 reasons.
4580
5449dd0f
AD
45812001-12-10 Akim Demaille <akim@epita.fr>
4582
4583 * src/output.c (output, prepare): Make sure the values of the
4584 muscles `action' and `prologue' are 0-terminated.
4585
a870c567
AD
45862001-12-10 Akim Demaille <akim@epita.fr>
4587
4588 Clean up GCC warnings.
4589
4590 * src/reader.c (copy_action): `buf' is not used.
4591 (parse_skel_decl): Be static.
4592 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
4593 * src/options.h (create_long_option_table): Have a real prototype.
4594 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
4595 (hash_delete_at): Return const void *.
4596 Adjust casts to preserve the const.
4597
80df8768
AD
45982001-12-10 Akim Demaille <akim@epita.fr>
4599
4600 * configure.in: Require 2.52g.
4601 M4 is not needed, but AUTOM4TE is.
4602 * m4/m4.m4: Remove.
4603 * tests/Makefile.am: Adjust.
4604
f693ad14
AD
46052001-12-10 Akim Demaille <akim@epita.fr>
4606
4607 One structure for states is enough, even though theoretically
4608 there are LR(0) states and LALR(1) states.
4609
4610 * src/lalr.h (state_t): Remove.
4611 (state_table): Be state_t **, not state_t *.
4612 * src/state.h (core, CORE_ALLOC): Rename as...
4613 (state_t, STATE_ALLOC): this.
4614 Add the LALR(1) members: shifts, reductions, errs.
4615 * src/LR0.c (state_table): Rename as...
4616 (state_hash): this, to avoid name clashes with the global
4617 `state_table'.
4618 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
4619 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
4620
74ffbcb6
AD
46212001-12-10 Akim Demaille <akim@epita.fr>
4622
4623 Bison dumps core on bash.y.
4624 Reported by Pascal Bart.
4625
4626 * src/warshall.c (bitmatrix_print): New.
4627 (TC): Use it.
4628 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
4629 j must be the outer loop.
4630 * tests/regression.at (Broken Closure): New.
4631
07708e19
AD
46322001-12-05 Akim Demaille <akim@epita.fr>
4633
4634 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
4635 its argument.
4636