]> git.saurik.com Git - bison.git/blob - ChangeLog
* src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as MUSCLE_TAB_H.
[bison.git] / ChangeLog
1 2002-10-16 Paul Eggert <eggert@twinsun.com>
2
3 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
4 MUSCLE_TAB_H.
5
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
14 2002-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.
25
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.
89
90 2002-10-14 Akim Demaille <akim@epita.fr>
91
92 Version 1.75.
93
94 2002-10-14 Akim Demaille <akim@epita.fr>
95
96 * tests/Makefile.am (maintainer-check-posix): New.
97
98 2002-10-14 Akim Demaille <akim@epita.fr>
99
100 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
101 member.
102
103 2002-10-14 Akim Demaille <akim@epita.fr>
104
105 * src/tables.c (table_ninf_remap): base -> tab.
106 Reported by Matt Rosing.
107
108 2002-10-14 Paul Eggert <eggert@twinsun.com>
109
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.
116
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
124 2002-10-13 Paul Eggert <eggert@twinsun.com>
125
126 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
127 true due to limited range of data type" warning from GCC.
128
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
133 2002-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
138 2002-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
143 2002-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
149 2002-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
166 2002-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
177 2002-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
182 2002-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
210 2002-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.
222
223 2002-10-12 Paul Eggert <eggert@twinsun.com>
224
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>.
231
232 * lib/timevar.c: Update copyright date and clarify comments.
233 (get_time) [IN_GCC]: Keep the GCC version for reference.
234
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
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
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
251 2002-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
258 2002-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
265 2002-10-11 Akim Demaille <akim@epita.fr>
266
267 * po/id.po: New.
268
269 2002-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
370 2002-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
379 2002-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
406 2002-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
412 2002-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.
438
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.
452
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.
466
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.
474
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
492 2002-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
498 2002-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
505 2002-09-27 Akim Demaille <akim@epita.fr>
506
507 Version 1.49c.
508
509 2002-09-27 Akim Demaille <akim@epita.fr>
510
511 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
512 (Because of AC_LIBSOURCE).
513
514 2002-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
523 2002-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
533 2002-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
538 2002-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
547 2002-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
552 2002-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
560 2002-09-12 Akim Demaille <akim@epita.fr>
561
562 * m4/prereq.m4: Update, from Coreutils 4.5.1.
563
564 2002-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
570 2002-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
576 2002-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
581 2002-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
587 2002-09-06 Akim Demaille <akim@epita.fr>
588
589 * data/c.m4 (b4_copyright): Move the GPL exception comment from
590 here to...
591 * data/yacc.c: here.
592
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
597 2002-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
602 2002-09-04 Akim Demaille <akim@epita.fr>
603
604 * configure.in: Rename as...
605 * configure.ac: this.
606 Bump to 1.49c.
607
608 2002-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
614 2002-08-12 Paul Eggert <eggert@twinsun.com>
615
616 Version 1.49b.
617
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
758 2002-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
777 2002-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
802 2002-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
817 2002-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
832 2002-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
858 2002-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
874 2002-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
894 2002-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
904 2002-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
914 2002-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
931 2002-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
940 2002-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
950 2002-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
961 2002-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
968 2002-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
980 2002-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
986 2002-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
1006 2002-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
1014 2002-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
1021 2002-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
1029 2002-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
1062 2002-07-19 Akim Demaille <akim@epita.fr>
1063
1064 * src/scan-gram.l (id): Can start with an underscore.
1065
1066 2002-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
1074 2002-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
1081 2002-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
1089 2002-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
1099 2002-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
1106 2002-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
1112 2002-07-09 Akim Demaille <akim@epita.fr>
1113
1114 * data/yacc.c: Output the copyright notive in the header.
1115
1116 2002-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
1127 2002-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
1136 2002-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
1144 2002-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
1154 2002-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
1178 2002-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
1186 2002-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
1191 2002-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
1218 2002-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
1226 2002-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
1232 2002-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
1241 2002-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
1255 2002-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
1268 2002-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
1275 2002-06-30 Akim Demaille <akim@epita.fr>
1276
1277 * src/output.c (action_row): Let default_rule be always a rule
1278 number.
1279
1280 2002-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
1291 2002-06-30 Akim Demaille <akim@epita.fr>
1292
1293 * src/print_graph.c: Use report_flag.
1294
1295 2002-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
1302 2002-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
1307 2002-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
1317 2002-06-30 Akim Demaille <akim@epita.fr>
1318
1319 * src/symtab.c (symbol_new): Initialize the `printer' member.
1320
1321 2002-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
1329 2002-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
1344 2002-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
1349 2002-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
1369 2002-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
1378 2002-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
1385 2002-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
1392 2002-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
1401 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1402
1403 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
1404 reorganize first lines parallel to yacc.c.
1405
1406 2002-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
1412 2002-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
1418 2002-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.
1424
1425 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1426
1427 Accumulated changelog for new GLR parsing features.
1428
1429 * src/conflicts.c (count_total_conflicts): Change name to
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.
1437
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
1446
1447 * src/getargs.c:
1448
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.
1451
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.
1471
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.
1486 (prepare_rules): Output dprec and merger tables.
1487 (conflict_row): New function.
1488 (action_row): Output conflict lists for GLR parser. Don't use
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.
1508 (conflicts_output): Modify call to count_rr_conflicts for new
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.
1538
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.
1544
1545 2002-06-27 Akim Demaille <akim@epita.fr>
1546
1547 * src/options.h, src/options.c: Remove.
1548 * src/getargs.c (short_options, long_options): New.
1549
1550 2002-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
1556 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
1557
1558 * src/getargs.c (report_argmatch): Initialize strtok().
1559
1560 2002-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
1567 2002-06-20 Akim Demaille <akim@epita.fr>
1568
1569 * data/bison.simple (yydestructor): Rename as...
1570 (yydestruct): this.
1571
1572 2002-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
1579 2002-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
1591 2002-06-20 Akim Demaille <akim@epita.fr>
1592
1593 * data/bison.simple (YYLEX): Fix the declaration when
1594 %pure-parser.
1595
1596 2002-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
1604 2002-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
1609 2002-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
1628 2002-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
1634 2002-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
1643 2002-06-19 Akim Demaille <akim@epita.fr>
1644
1645 * data/bison.simple (b4_pure_if): New.
1646 Use it instead of #ifdef YYPURE.
1647
1648 2002-06-19 Akim Demaille <akim@epita.fr>
1649
1650 * data/bison.simple (b4_location_if): New.
1651 Use it instead of #ifdef YYLSP_NEEDED.
1652
1653 2002-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
1669 2002-06-19 Zack Weinberg <zack@codesourcery.com>
1670
1671 * doc/bison.texinfo: Document ability to have multiple
1672 prologue sections.
1673
1674 2002-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
1679 2002-06-18 Akim Demaille <akim@epita.fr>
1680
1681 * data/bison.simple.new: Comment changes.
1682 Reported by Andreas Schwab.
1683
1684 2002-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
1690 2002-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
1700 2002-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
1707 2002-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
1727 2002-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
1738 2002-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
1749 2002-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
1760 2002-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
1765 2002-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
1770 2002-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
1782 2002-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
1791 2002-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
1800 2002-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
1810 2002-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
1829 2002-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
1842 2002-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
1862 2002-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
1872 2002-06-14 Akim Demaille <akim@epita.fr>
1873
1874 * src/main.c (main): Invoke scanner_free.
1875
1876 2002-06-14 Akim Demaille <akim@epita.fr>
1877
1878 * src/output.c (m4_invoke): Extracted from...
1879 (output_skeleton): here.
1880 Free tempfile.
1881
1882 2002-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
1891 2002-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
1904 2002-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
1915 2002-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
1921 2002-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
1927 2002-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
1933 2002-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
1941 2002-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
1947 2002-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
1954 2002-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
2077 2002-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
2087 2002-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
2096 2002-06-11 Akim Demaille <akim@epita.fr>
2097
2098 * src/reader.c (grammar_midrule_action): New, Eved out from
2099 (readgram): here.
2100
2101 2002-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
2108 2002-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
2114 2002-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
2124 2002-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
2133 2002-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
2141 2002-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
2152 2002-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
2159 2002-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
2182 2002-06-03 Akim Demaille <akim@epita.fr>
2183
2184 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
2185 then statements.
2186
2187 2002-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
2197 2002-05-28 Akim Demaille <akim@epita.fr>
2198
2199 * data/bison.c++: Use C++ ostreams.
2200 (cdebug_): New member.
2201
2202 2002-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
2207 2002-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
2215 2002-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.
2221
2222 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2223
2224 * src/conflicts.c (log_resolution): Correct typo:
2225 obstack_printf should be obstack_fgrow1.
2226
2227 2002-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
2246 2002-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
2258 2002-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
2267 2002-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
2290 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2291 and Paul Eggert <eggert@twinsun.com>
2292
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
2300 2002-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.
2305 (yytranslate): Expand definition of yy_token_number_type, so that
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.
2310
2311 * tests/regression.at: Modify expected output to agree with change
2312 to yyr1 and yytranslate.
2313
2314 2002-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
2319 2002-05-13 Akim Demaille <akim@epita.fr>
2320
2321 * tests/regression.at (Token definitions): Prototype yylex and
2322 yyerror.
2323
2324 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2325
2326 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
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
2331 2002-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
2336 2002-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
2351 2002-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
2359 2002-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
2364 2002-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
2371 2002-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
2376 2002-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
2387 2002-05-05 Akim Demaille <akim@epita.fr>
2388
2389 * tests/torture.at (Many lookaheads): New test.
2390
2391 2002-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
2408 2002-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
2420 2002-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
2429 2002-05-03 Paul Eggert <eggert@twinsun.com>
2430
2431 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
2432 for K&R C.
2433
2434 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
2435
2436 * Makefile.am (SUBDIRS): Remove intl.
2437 (EXTRA_DIST): Add config/config.rpath.
2438
2439 2002-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
2444 2002-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
2451 2002-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
2456 2002-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
2465 2002-05-03 Akim Demaille <akim@epita.fr>
2466
2467 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
2468
2469 2002-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
2474 2002-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
2480 2002-05-02 Akim Demaille <akim@epita.fr>
2481
2482 * src/reader.c (parse_braces): Merge into...
2483 (parse_action): this.
2484
2485 2002-05-02 Akim Demaille <akim@epita.fr>
2486
2487 * configure.in (ALL_LINGUAS): Remove.
2488 * po/LINGUAS, hr.po: New.
2489
2490 2002-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
2514 2002-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.
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'.
2526 * data/bison.simple, data/bison.c++ (b4_lhs_value)
2527 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
2528
2529 2002-05-02 Akim Demaille <akim@epita.fr>
2530
2531 * configure.in (AC_INIT): Bump to 1.49b.
2532 (AM_INIT_AUTOMAKE): Short invocation.
2533
2534 2002-05-02 Akim Demaille <akim@epita.fr>
2535
2536 Version 1.49a.
2537
2538 2002-05-01 Akim Demaille <akim@epita.fr>
2539
2540 * src/skeleton.h: Remove.
2541
2542 2002-05-01 Akim Demaille <akim@epita.fr>
2543
2544 * src/skeleton.h: Fix the #endif.
2545 Reported by Magnus Fromreide.
2546
2547 2002-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.
2551 (YYCOPY): Fix [] quoting problem in the non-GCC case.
2552
2553 2002-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
2567 2002-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
2573 2002-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
2590 2002-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
2603 2002-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
2611 2002-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
2618 2002-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
2624 2002-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
2630 2002-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
2642 2002-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
2656 2002-04-22 Akim Demaille <akim@epita.fr>
2657
2658 * src/output.h, src/output.c (get_lines_number): Remove.
2659
2660 2002-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
2668 2002-04-19 Akim Demaille <akim@epita.fr>
2669
2670 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
2671
2672 2002-04-10 Akim Demaille <akim@epita.fr>
2673
2674 * src/system.h: Rely on HAVE_LIMITS_H.
2675 Suggested by Paul Eggert.
2676
2677 2002-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
2690 2002-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
2715 2002-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
2725 2002-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
2753 2002-04-08 Akim Demaille <akim@epita.fr>
2754
2755 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
2756 and then the grammar.
2757
2758 2002-04-08 Akim Demaille <akim@epita.fr>
2759
2760 * src/system.h: No longer using strndup.
2761
2762 2002-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
2775 2002-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
2781 2002-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
2787 2002-04-07 Akim Demaille <akim@epita.fr>
2788
2789 * src/reader.c: Normalize increments to prefix form.
2790
2791 2002-04-07 Akim Demaille <akim@epita.fr>
2792
2793 * src/reader.c, symtab.c: Remove debugging code.
2794
2795 2002-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
2812 2002-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
2833 2002-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
2843 2002-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
2850 2002-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
2855 2002-04-07 Akim Demaille <akim@epita.fr>
2856
2857 * src/lalr.h (LA): Is a bitsetv, not bitset*.
2858
2859 2002-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
2865 2002-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
2872 2002-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
2879 2002-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
2898 2002-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
2918 2002-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
2924 2002-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
2936 2002-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
2949 2002-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
2955 2002-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
2961 2002-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
2966 2002-04-07 Akim Demaille <akim@epita.fr>
2967
2968 * TODO: Update.
2969
2970 2002-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
2975 2002-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
2982 2002-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
2990 2002-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.
2996
2997 2002-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
3003 2002-03-20 Akim Demaille <akim@epita.fr>
3004
3005 * src/conflicts.c (log_resolution): Argument `resolution' is const.
3006
3007 2002-03-19 Paul Eggert <eggert@twinsun.com>
3008
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
3014 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
3015 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
3016
3017 2002-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
3028 2002-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
3035 2002-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
3044 2002-03-14 Akim Demaille <akim@epita.fr>
3045
3046 Use Gettext 0.11.1.
3047
3048 2002-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
3053 2002-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
3059 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
3060
3061 * src/reader.c: Warn about lacking semi-colons, do not complain.
3062
3063 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
3064
3065 * data/bison.c++: Remove a debug line.
3066
3067 2002-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
3073 2002-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
3082 2002-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
3091 2002-03-04 Akim Demaille <akim@epita.fr>
3092
3093 * src/output.c (output_skeleton): tempdir is const.
3094 bytes_read is unused.
3095
3096 2002-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
3103 2002-03-04 Akim Demaille <akim@epita.fr>
3104
3105 * src/closure.c (closure): `r' is unused.
3106
3107 2002-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
3113 2002-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
3121 2002-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
3127 2002-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
3134 2002-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
3140 2002-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
3146 2002-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
3156 2002-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
3162 2002-03-04 Akim Demaille <akim@epita.fr>
3163
3164 * src/lalr.c (F): Now a bitset*.
3165 Adjust all dependencies.
3166
3167 2002-03-04 Akim Demaille <akim@epita.fr>
3168
3169 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
3170 Adjust all dependencies.
3171
3172 2002-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
3180 2002-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
3187 2002-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
3192 2002-03-04 Akim Demaille <akim@epita.fr>
3193
3194 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
3195
3196 2002-03-04 Akim Demaille <akim@epita.fr>
3197
3198 * src/closure.c (ruleset): Be a bitset.
3199 (rulesetsize): Remove.
3200
3201 2002-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
3208 2002-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
3213 2002-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
3218 2002-02-25 Akim Demaille <akim@epita.fr>
3219
3220 * src/getargs.c (version): Give the name of the authors, and use a
3221 translator friendly scheme for the bgr
3222 copyright notice.
3223
3224 2002-02-25 Akim Demaille <akim@epita.fr>
3225
3226 * src/output.c (header_output): Remove, now handled completely via
3227 M4.
3228
3229 2002-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
3236 2002-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
3249 2002-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
3264 2002-02-14 Akim Demaille <akim@epita.fr>
3265
3266 * tests/regression.at (else): Adjust to Andreas' change.
3267
3268 2002-02-14 Akim Demaille <akim@epita.fr>
3269
3270 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
3271
3272 2002-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
3277 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
3278
3279 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
3280 (Copyright notice): Update.
3281
3282 2002-02-11 Akim Demaille <akim@epita.fr>
3283
3284 * tests/regression.at (%nonassoc and eof): Don't include
3285 nonportable headers.
3286
3287 2002-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
3292 2002-02-07 Akim Demaille <akim@epita.fr>
3293
3294 * tests/input.at: New.
3295
3296 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
3297
3298 * data/bison.c++: Replace some direct m4 expansions by constants. Be
3299 more consistent when naming methods and variables. Put preprocessor
3300 directives around tables only needed for debugging.
3301
3302 2002-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
3308 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
3309
3310 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
3311
3312 2002-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
3318 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
3319
3320 * data/bison.c++: Fix m4 quoting in comments.
3321
3322 2002-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
3327 2002-02-05 Akim Demaille <akim@epita.fr>
3328
3329 * data/bison.c++: Adjust to the M4 back end.
3330 More is certainly needed.
3331
3332 2002-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
3369 2002-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
3375 2002-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
3380 2002-02-05 Akim Demaille <akim@epita.fr>
3381
3382 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
3383 * data/: here.
3384
3385 2002-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
3391 2002-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
3404 2002-01-27 Akim Demaille <akim@epita.fr>
3405
3406 * tests/sets.at (AT_EXTRACT_SETS): New.
3407 (Nullable): Use it.
3408 (Firsts): New.
3409
3410 2002-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
3416 2002-01-25 Akim Demaille <akim@epita.fr>
3417
3418 * tests/regression.at (%nonassoc and eof): New.
3419 Suggested by Robert Anisko.
3420
3421 2002-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
3431 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
3432
3433 * src/Makefile.am: Add bison.c++.
3434 * src/bison.c++: New skeleton.
3435
3436 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
3437
3438 * po/it.po: New.
3439
3440 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
3441
3442 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
3443
3444 2002-01-20 Marc Autret <marc@gnu.org>
3445
3446 * src/files.c (compute_output_file_names): Fix
3447
3448 2002-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
3455 2002-01-20 Marc Autret <marc@gnu.org>
3456
3457 * src/system.h: Need to define __attribute__ away for non-GCC
3458 compilers as well (i.e. the vendor C compiler).
3459 Suggested by Albert Chin-A-Young.
3460
3461 2002-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
3468 2002-01-11 Akim Demaille <akim@epita.fr>
3469
3470 * configure.in: Use AC_FUNC_STRNLEN.
3471 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
3472
3473 2002-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
3487 2002-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
3495 2002-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
3504 2002-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
3512 2002-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
3520 2002-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
3528 2002-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
3535 2002-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
3542 2002-01-06 Akim Demaille <akim@epita.fr>
3543
3544 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
3545 skeleton.h.
3546
3547 2002-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
3553 2002-01-03 Akim Demaille <akim@epita.fr>
3554
3555 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
3556
3557 2002-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
3563 2002-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
3572 2002-01-03 Akim Demaille <akim@epita.fr>
3573
3574 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
3575 for non system headers.
3576
3577 2002-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
3594 2001-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
3600 2001-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
3613 2001-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
3630 2001-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
3651 to guess if the generated parsers should have '.tab' in their
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
3663 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
3664 parse-skel.y.
3665
3666 * src/parse-skel.y: New file.
3667 * src/scan-skel.l: New file.
3668
3669 2001-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
3683 2001-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
3689 2001-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
3696 2001-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
3705 2001-12-29 Akim Demaille <akim@epita.fr>
3706
3707 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
3708
3709 2001-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
3714 2001-12-29 Akim Demaille <akim@epita.fr>
3715
3716 * doc/bison.texinfo: Formatting changes.
3717
3718 2001-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
3727 2001-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
3733 2001-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
3742 2001-12-29 Akim Demaille <akim@epita.fr>
3743
3744 Memory leak.
3745
3746 * src/reader.c (reader): Free grammar.
3747
3748 2001-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
3756 2001-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
3764 2001-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
3770 2001-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
3775 2001-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
3782 2001-12-29 Akim Demaille <akim@epita.fr>
3783
3784 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
3785 ago.
3786
3787 2001-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
3792 2001-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
3797 2001-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
3802 2001-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
3813 2001-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
3819 2001-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
3828 2001-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
3835 2001-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
3840 2001-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
3847 2001-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
3860 2001-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
3869 2001-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
3876 2001-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
3888 2001-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
3898 2001-12-29 Akim Demaille <akim@epita.fr>
3899
3900 * src/output.c: Comment changes.
3901
3902 2001-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
3911 2001-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
3922 2001-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
3928 2001-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
3948 2001-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
3964 2001-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
3984 2001-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
3993 2001-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
4001 2001-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
4011 2001-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
4020 2001-12-27 Akim Demaille <akim@epita.fr>
4021
4022 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
4023
4024 2001-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
4035 2001-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
4040 2001-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
4045 2001-12-27 Akim Demaille <akim@epita.fr>
4046
4047 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
4048 duplication.
4049
4050 2001-12-27 Akim Demaille <akim@epita.fr>
4051
4052 * src/reader.c (packgram): Catch nitems overflows.
4053
4054 2001-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
4064 2001-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
4092 2001-12-27 Akim Demaille <akim@epita.fr>
4093
4094 * src/reader.c (symbol_list_new): Be sure to initialize all the
4095 fields.
4096
4097 2001-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
4106 2001-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
4112 2001-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
4130 2001-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
4137 2001-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
4145 2001-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
4152 2001-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
4162 2001-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
4170 2001-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
4179 2001-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
4185 2001-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
4193 2001-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.
4201
4202 2001-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.
4208
4209 2001-12-17 Akim Demaille <akim@epita.fr>
4210
4211 * src/conflicts.c (print_reductions): Formatting changes.
4212
4213 2001-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.
4218
4219 2001-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
4227 2001-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
4233 2001-12-17 Akim Demaille <akim@epita.fr>
4234
4235 * src/output.c: Various formatting changes.
4236
4237 2001-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
4245 2001-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
4250 2001-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.
4255 (output_parser): Adjust, now takes care about the lines of a
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
4262 2001-12-15 Marc Autret <autret_m@epita.fr>
4263
4264 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
4265
4266 2001-12-15 Marc Autret <autret_m@epita.fr>
4267
4268 * src/output.c (output_gram): Keep track of the hairy one.
4269
4270 2001-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
4277 2001-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
4284 2001-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
4303 2001-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
4313 2001-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
4318 2001-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
4330 2001-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
4346 2001-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.
4350 Suggested by Arnold Robbins and Tom Tromey.
4351
4352 2001-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
4358 2001-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
4366 2001-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
4375 2001-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
4397 2001-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
4402 2001-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
4416 2001-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
4422 2001-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
4427 2001-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
4435 2001-12-11 Marc Autret <autret_m@epita.fr>
4436
4437 * src/output.c (output_parser): Remove useless muscle.
4438
4439 2001-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
4446 2001-12-10 Marc Autret <autret_m@epita.fr>
4447
4448 * src/reader.c (copy_definition): Re-use CPP-outed code which
4449 replace precedent remove.
4450 * src/bison.simple: Remove #line before %%prologue because
4451 %%input-line is wrong at this time.
4452
4453 2001-12-10 Marc Autret <autret_m@epita.fr>
4454
4455 * src/reader.c (symbols_output): Clean up.
4456 * src/output.c (output_gram, output): Clean up.
4457
4458 2001-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
4464 2001-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
4470 2001-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
4483 2001-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
4490 2001-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
4497 2001-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
4502 2001-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
4510 2001-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
4516 2001-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
4523 2001-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
4535 2001-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
4545 2001-12-10 Akim Demaille <akim@epita.fr>
4546
4547 * src/muscle_tab.c (muscle_init): NULL is a better default than
4548 `"0"'.
4549
4550 2001-12-10 Akim Demaille <akim@epita.fr>
4551
4552 * src/reader.c (reader): Calling symbols_output once is enough.
4553
4554 2001-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
4571 2001-12-10 Akim Demaille <akim@epita.fr>
4572
4573 * src/options.c (OPTN, DRTV, BOTH): New.
4574 (option_table): Use them.
4575
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
4581 2001-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
4586 2001-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
4598 2001-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
4605 2001-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
4621 2001-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
4632 2001-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 Reported by Peter Hámorský.
4637
4638 2001-12-05 Akim Demaille <akim@epita.fr>
4639
4640 * src/conflicts.c (err_table): Remove.
4641 (resolve_sr_conflict): Adjust.
4642 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
4643 Rename as...
4644 (state_t.reductions, state_t.shifts): this.
4645
4646 2001-12-05 Akim Demaille <akim@epita.fr>
4647
4648 * src/reduce.c (reduce_grammar_tables): No longer disable the
4649 removal of useless rules via CPP but via `if (0)', so that the
4650 compiler still check the code is valid.
4651 For instance, it should have noticed `rline' no longer exists: use
4652 the `line' member of rule_t.
4653 * src/gram.c (dummy, rline): Remove, unused.
4654
4655 2001-12-05 Akim Demaille <akim@epita.fr>
4656
4657 * src/output.c (pack_vector): Use assert, not berror.
4658 * src/main.c (berror): Remove, unused.
4659
4660 2001-12-05 Akim Demaille <akim@epita.fr>
4661
4662 New experimental feature: if --verbose --trace output all the
4663 items of a state, not only its kernel.
4664
4665 * src/print.c (print_core): If `trace_flag', then invoke closure
4666 before outputting the items of the state (print_core is no longer
4667 a correct name them).
4668 (print_results): Invoke new_closure/free_closure if needed.
4669
4670 2001-12-05 Akim Demaille <akim@epita.fr>
4671
4672 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
4673 * src/closure.c, src/closure.h (itemsetsize): Rename as...
4674 (nitemset): for consistency with the rest of the project.
4675
4676 2001-12-05 Akim Demaille <akim@epita.fr>
4677
4678 * src/closure.c (print_closure): Improve.
4679 (closure): Use it for printing input and output.
4680
4681 2001-12-05 Akim Demaille <akim@epita.fr>
4682
4683 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
4684 indexed by nonterminals.
4685
4686 2001-12-05 Akim Demaille <akim@epita.fr>
4687
4688 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
4689 what it was!).
4690 * src/warshall.h: Remove accidental duplication of the content.
4691
4692 2001-12-05 Akim Demaille <akim@epita.fr>
4693
4694 * src/closure.c (set_fderives): De-obfuscate.
4695
4696 2001-12-05 Akim Demaille <akim@epita.fr>
4697
4698 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
4699
4700 2001-12-05 Akim Demaille <akim@epita.fr>
4701
4702 * src/closure.c (set_firsts): De-obfuscate.
4703
4704 2001-12-05 Akim Demaille <akim@epita.fr>
4705
4706 * src/output.c (action_row): De-obfuscate
4707 using the good o' techniques: arrays not pointers, variable
4708 locality, BITISSET, RESETBIT etc.
4709
4710 2001-12-05 Akim Demaille <akim@epita.fr>
4711
4712 Pessimize the code to simplify it: from now on, all the states
4713 have a valid SHIFTS, which NSHIFTS is possibly 0.
4714
4715 * src/LR0.c (shifts_new): Be global and move to..
4716 * src/state.c, src/state.h: here.
4717 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
4718 * src/print_graph: Adjust.
4719
4720 2001-12-05 Akim Demaille <akim@epita.fr>
4721
4722 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
4723 * src/conflicts.c: Use it.
4724 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
4725 incorrectly ``simplified''.
4726
4727 2001-12-05 Akim Demaille <akim@epita.fr>
4728
4729 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
4730 using the good o' techniques: arrays not pointers, variable
4731 locality, BITISSET, RESETBIT etc.
4732
4733 2001-12-05 Akim Demaille <akim@epita.fr>
4734
4735 * src/state.h (SHIFT_SYMBOL): New.
4736 * src/conflicts.c: Use it to deobfuscate.
4737
4738 2001-12-05 Akim Demaille <akim@epita.fr>
4739
4740 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
4741 (print_reductions): De-obfuscate using the good o' techniques:
4742 arrays not pointers, variable locality, BITISSET.
4743
4744 2001-12-05 Akim Demaille <akim@epita.fr>
4745
4746 * src/conflicts.c (print_reductions): Arrays, not pointers.
4747 Use BITISSET.
4748
4749 2001-12-05 Akim Demaille <akim@epita.fr>
4750
4751 * src/conflicts.c (print_reductions): Pessimize, but clarify.
4752
4753 2001-12-05 Akim Demaille <akim@epita.fr>
4754
4755 * src/conflicts.c (print_reductions): Improve variable locality.
4756
4757 2001-12-05 Akim Demaille <akim@epita.fr>
4758
4759 * src/conflicts.c (print_reductions): Pessimize, but clarify.
4760
4761 2001-12-05 Akim Demaille <akim@epita.fr>
4762
4763 * src/conflicts.c (print_reductions): Improve variable locality.
4764
4765 2001-12-05 Akim Demaille <akim@epita.fr>
4766
4767 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
4768 * src/lalr.c: Use them.
4769
4770 2001-12-05 Akim Demaille <akim@epita.fr>
4771
4772 * src/LR0.c (augment_automaton): Formatting changes.
4773 Better variable locality.
4774
4775 2001-12-05 Akim Demaille <akim@epita.fr>
4776
4777 * src/lalr.c (matrix_print): New.
4778 (transpose): Use it.
4779 Use arrays instead of pointers.
4780
4781 2001-12-05 Akim Demaille <akim@epita.fr>
4782
4783 * src/lalr.c (maxrhs): Move to...
4784 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
4785 * src/lalr.c (build_relations): Adjust.
4786
4787 2001-12-05 Akim Demaille <akim@epita.fr>
4788
4789 * src/lalr.c (transpose): Free the memory allocated to the
4790 argument, as it is replaced by the results by the unique caller.
4791 (build_relations): Merely invoke transpose: it handles the memory
4792 deallocation.
4793 Improve variable locality.
4794 Avoid variables used as mere abbreviations.
4795 (compute_lookaheads): Use arrays instead of pointers.
4796
4797 2001-12-05 Akim Demaille <akim@epita.fr>
4798
4799 * src/lalr.c (initialize_F): Improve variable locality.
4800 Avoid variables used as mere abbreviations.
4801
4802 2001-12-05 Akim Demaille <akim@epita.fr>
4803
4804 * src/derives.c (print_derives): Display the ruleno.
4805 * src/lalr.c (initialize_F, transpose): Better variable locality
4806 to improve readability.
4807 Avoid variables used as mere abbreviations.
4808
4809 2001-12-05 Akim Demaille <akim@epita.fr>
4810
4811 * src/lalr.c (traverse): Use arrays instead of pointers.
4812
4813 2001-12-05 Akim Demaille <akim@epita.fr>
4814
4815 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
4816 the handling of squeue.
4817 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
4818
4819 2001-12-05 Akim Demaille <akim@epita.fr>
4820
4821 Because useless nonterminals are now kept alive (instead of being
4822 `destroyed'), we now sometimes examine them, and store information
4823 related to them. Hence we need to know their number, and adjust
4824 memory allocations.
4825
4826 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
4827 static.
4828 * src/LR0.c (allocate_itemsets): The memory allocated to
4829 `symbol_count' was used for two different purpose: once to count
4830 the number of occurrences of each symbol, and later reassigned to
4831 `shift_symbol', containing the symbol that can be shifted from a
4832 given state.
4833 Deobfuscate, i.e., allocate, use and free `symbol_count' here
4834 only, and...
4835 (new_itemsets): Allocate `shift_symbol' here.
4836 (allocate_itemsets): symbol_count includes useless nonterminals.
4837 Make room for them.
4838 (free_storage): Use `free', not `XFREE', for pointers that cannot
4839 be null.
4840
4841 2001-12-05 Akim Demaille <akim@epita.fr>
4842
4843 * src/nullable.c (set_nullable): Deobfuscate the handling of
4844 ritem.
4845 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
4846
4847 2001-12-05 Akim Demaille <akim@epita.fr>
4848
4849 * src/gram.c, src/gram.h (ritem_print): New.
4850 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
4851 (This useless function was defined only to work around VMS linkers
4852 that can't handle compilation units with variables only).
4853 * src/reduce.c (dump_grammar): Use it to trace the construction of
4854 ritem.
4855
4856 2001-12-04 Paul Eggert <eggert@twinsun.com>
4857
4858 * src/bison.simple (union yyalloc): Change member names
4859 to be the same as the stack names.
4860 (yyparse): yyptr is now union yyalloc *, not char *.
4861 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
4862 and may generate better code on some machines.
4863 (yystpcpy): Use prototype if __STDC__ is defined, not just
4864 if __cplusplus is defined.
4865
4866 2001-11-30 Akim Demaille <akim@epita.fr>
4867
4868 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
4869 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
4870 Gettext doesn't compile cleanly, and dies with -Werror.
4871 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
4872 Include WARNING_CFLAGS here.
4873 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
4874 before being defined.
4875
4876 2001-11-27 Paul Eggert <eggert@twinsun.com>
4877
4878 * lib/quotearg.h (quotearg_n, quotearg_n_style):
4879 First arg is int, not unsigned.
4880 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
4881 (SIZE_MAX, UINT_MAX): New macros.
4882 (quotearg_n_options): Abort if N is negative.
4883 Avoid overflow check on hosts where size_t is 64 bits and int
4884 is 32 bits, as overflow is impossible there.
4885 Fix off-by-one typo that caused unnecessary reallocation.
4886
4887 2001-11-29 Paul Eggert <eggert@twinsun.com>
4888
4889 Name space cleanup in generated parser.
4890
4891 * doc/bison.texinfo (Bison Parser): Discuss system headers
4892 and their effect on the user name space.
4893
4894 * src/bison.simple:
4895 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
4896 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
4897 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
4898
4899 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
4900 on user names when possible.
4901
4902 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
4903 Simplify test for whather <alloca.h> exists.
4904
4905 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
4906
4907 (<stdio.h>): Include if YYDEBUG.
4908
4909 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
4910 ! defined (yyoverflow) && ! defined (yymemcpy).
4911
4912 (yymemcpy, yyparse): Rename local variables as needed so that
4913 they all begin with 'yy'.
4914
4915 (yystrlen, yystpcpy): New functions.
4916
4917 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
4918 All uses changed.
4919
4920 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
4921 instead of relying on string.h functions. Use YYSTACK_ALLOC
4922 and YYSTACK_FREE instead of malloc and free.
4923
4924 2001-11-30 Akim Demaille <akim@epita.fr>
4925
4926 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
4927 before their first uses.
4928 (YYBISON, YYPURE): Move to the top of the output.
4929
4930 2001-11-30 Akim Demaille <akim@epita.fr>
4931
4932 * tests/reduce.at (Useless Nonterminals): Fix.
4933
4934 2001-11-30 Akim Demaille <akim@epita.fr>
4935
4936 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
4937 if body instead of `;' to pacify GCC's warnings.
4938
4939 2001-11-30 Akim Demaille <akim@epita.fr>
4940
4941 Instead of mapping the LHS of unused rules to -1, keep the LHS
4942 valid, but flag the rules as invalid.
4943
4944 * src/gram.h (rule_t): `useful' is a new member.
4945 * src/print.c (print_grammar): Adjust.
4946 * src/derives.c (set_derives): Likewise.
4947 * src/reader.c (packgram, reduce_output): Likewise.
4948 * src/reduce.c (reduce_grammar_tables): Likewise.
4949 * tests/reduce.at (Underivable Rules, Useless Rules): New.
4950
4951 2001-11-30 Akim Demaille <akim@epita.fr>
4952
4953 * src/reduce.c (reduce_output): Formatting changes.
4954 * src/print.c (print_results, print_grammar): Likewise.
4955 * tests/regression.at (Rule Line Numbers)
4956 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
4957
4958 2001-11-30 Akim Demaille <akim@epita.fr>
4959
4960 * src/reduce.c (nonterminals_reduce): Instead of throwing away
4961 useless nonterminals, move them at the end of the symbol arrays.
4962 (reduce_output): Adjust.
4963 * tests/reduce.at (Useless Nonterminals): Adjust.
4964
4965 2001-11-30 Akim Demaille <akim@epita.fr>
4966
4967 * src/reduce.c: Various comment/formatting changes.
4968 (nonterminals_reduce): New, extracted from...
4969 (reduce_grammar_tables): here.
4970 (reduce_grammar): Call nonterminals_reduce.
4971
4972 2001-11-29 Paul Eggert <eggert@twinsun.com>
4973
4974 * src/bison.simple (YYSTACK_REALLOC): Remove.
4975 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
4976 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
4977 New macros.
4978 (union yyalloc): New type.
4979 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
4980 an arbitrary restriction on hosts where size_t is wider than int.
4981
4982 (yyparse): Don't dump core if alloca or malloc fails; instead, report
4983 a parser stack overflow. Allocate just one block of memory for all
4984 three stacks, instead of allocating three blocks; this typically is
4985 faster and reduces fragmentation.
4986
4987 Do not limit the number of items in the stack to a value that fits
4988 in 'int', as this is an arbitrary limit on hosts with 64-bit
4989 size_t and 32-bit int.
4990
4991 2001-11-29 Marc Autret <autret_m@epita.fr>
4992
4993 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
4994 of defining YYERROR_VERBOSE.
4995 [AT_DATA]: $4 is now out of C declarations in the prologue.
4996
4997 2001-11-28 Marc Autret <autret_m@epita.fr>
4998
4999 * src/reader.c (parse_dquoted_param): New.
5000 (parse_skel_decl): Use it.
5001 * src/lex.h: Add its prototype.
5002 * src/lex.c (literalchar): Become not static.
5003
5004 2001-11-28 Marc Autret <autret_m@epita.fr>
5005
5006 * src/output.h: And put its extern declaration here.
5007 * src/output.c (error_verbose): Define here.
5008 (prepare): Echo name modification.
5009 * src/getargs.h: Clean its extern declaration.
5010 * src/getargs.c (error_verbose_flag): Remove.
5011 (getargs): Remove case 'e'.
5012 * src/options.c (option_table): 'error-verbose' is now seen as simple
5013 percent option.
5014 Include output.h.
5015
5016 * src/reader.c (read_declarations): Remove case tok_include.
5017 (parse_include_decl): Remove.
5018 * src/lex.h (token_t): Remove tok_include.
5019 * src/options.c (option_table): 'include' is now a simple command line
5020 option.
5021
5022 2001-11-28 Marc Autret <autret_m@epita.fr>
5023
5024 * src/bison.simple: Adjust muscle names.
5025 * src/muscle_tab.c (muscle_init): Also rename the muscles.
5026 * src/output.c (prepare): s/_/-/ for the muscles names.
5027 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
5028
5029 2001-11-28 Marc Autret <autret_m@epita.fr>
5030
5031 * src/bison.simple: Fix debug.
5032 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
5033
5034 2001-11-28 Akim Demaille <akim@epita.fr>
5035
5036 * src/LR0.c (shifts_new): New.
5037 (save_shifts, insert_start_shift, augment_automaton): Use it.
5038
5039 2001-11-28 Akim Demaille <akim@epita.fr>
5040
5041 * src/closure.c (closure): `b' and `ruleno' denote the same value:
5042 keep ruleno only.
5043
5044 2001-11-28 Akim Demaille <akim@epita.fr>
5045
5046 * src/closure.c (closure): Instead of looping over word in array
5047 then bits in words, loop over bits in array.
5048
5049 2001-11-28 Akim Demaille <akim@epita.fr>
5050
5051 * src/closure.c (closure): No longer optimize the special case
5052 where all the bits of `ruleset[r]' are set to 0, to make the code
5053 clearer.
5054
5055 2001-11-28 Akim Demaille <akim@epita.fr>
5056
5057 * src/closure.c (closure): `r' and `c' are new variables, used to
5058 de-obfuscate accesses to RULESET and CORE.
5059
5060 2001-11-28 Akim Demaille <akim@epita.fr>
5061
5062 * src/reduce.c (reduce_print): Use ngettext.
5063 (dump_grammar): Improve the trace accuracy.
5064
5065 2001-11-28 Akim Demaille <akim@epita.fr>
5066
5067 * src/reduce.c (dump_grammar): Don't translate trace messages.
5068
5069 2001-11-28 Akim Demaille <akim@epita.fr>
5070
5071 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
5072 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
5073 as all tags are free'ed afterwards.
5074 From Enrico Scholz.
5075
5076 2001-11-27 Paul Eggert <eggert@twinsun.com>
5077
5078 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
5079 use alloca when we didn't want to, and vice versa.
5080
5081 2001-11-27 Marc Autret <autret_m@epita.fr>
5082
5083 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
5084 initialization.
5085 * src/output.c (prepare): Remove its update.
5086
5087 2001-11-27 Marc Autret <autret_m@epita.fr>
5088
5089 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
5090 Use %error-verbose.
5091
5092 2001-11-27 Marc Autret <autret_m@epita.fr>
5093
5094 * src/bison.simple: Remove YYERROR_VERBOSE using.
5095 Use %%error_verbose.
5096 (yyparse): Likewise.
5097 * src/output.c (prepare): Give its final value.
5098 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
5099 * src/getargs.h: Add its extern declaration.
5100 * src/getargs.c (error_verbose_flag): New int.
5101 (getargs): Update to catch new case.
5102 * src/options.c (option_table): 'error-verbose' is a new option.
5103 (shortopts): Update.
5104
5105 2001-11-27 Akim Demaille <akim@epita.fr>
5106
5107 * src/system.h: Use intl/libgettext.h.
5108 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
5109
5110 2001-11-27 Akim Demaille <akim@epita.fr>
5111
5112 * tests/torture.at (Exploding the Stack Size with Malloc):
5113 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
5114
5115 2001-11-27 Akim Demaille <akim@epita.fr>
5116
5117 * src/files.c: Include error.h.
5118 Reported by Hans Aberg.
5119
5120 2001-11-26 Marc Autret <autret_m@epita.fr>
5121
5122 * src/reader.c (parse_include_decl): New, not yet implemented.
5123 (read_declarations): Add case tok_include.
5124 * src/getargs.h (include): Add its extern definition.
5125 * src/getargs.c (include): New const char *.
5126 (getargs): Add case '-I'.
5127 * src/options.c (option_table): Add include as command line and
5128 percent option.
5129 * src/lex.h (token_t): Add tok_include.
5130
5131 2001-11-26 Akim Demaille <akim@epita.fr>
5132
5133 * src/reader.c (readgram): Make sure rules for mid-rule actions
5134 have a lineno equal to that of their host rule.
5135 Reported by Hans Aberg.
5136 * tests/regression.at (Rule Line Numbers): New.
5137
5138 2001-11-26 Akim Demaille <akim@epita.fr>
5139
5140 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
5141 size_ts.
5142
5143 2001-11-26 Akim Demaille <akim@epita.fr>
5144
5145 * src/complain.c, src/complain.h (error): Remove, provided by
5146 lib/error.[ch].
5147
5148 2001-11-26 Akim Demaille <akim@epita.fr>
5149
5150 * src/reader.c (read_declarations): Don't abort on tok_illegal,
5151 issue an error message.
5152 * tests/regression.at (Invalid %directive): New.
5153 Reported by Hans Aberg.
5154
5155 2001-11-26 Akim Demaille <akim@epita.fr>
5156
5157 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
5158 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
5159
5160 2001-11-26 Akim Demaille <akim@epita.fr>
5161
5162 * src/conflicts.c (conflicts_print): Don't complain at all when
5163 there are no reduce/reduce conflicts, and as many shift/reduce
5164 conflicts as expected.
5165 * tests/regression.at (%expect right): Adjust.
5166
5167 2001-11-23 Akim Demaille <akim@epita.fr>
5168
5169 * lib/alloca.c: Update, from fileutils.
5170
5171 2001-11-23 Akim Demaille <akim@epita.fr>
5172
5173 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
5174
5175 2001-11-23 Akim Demaille <akim@epita.fr>
5176
5177 * src/system.h: Include alloca.h.
5178 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
5179
5180 2001-11-23 Akim Demaille <akim@epita.fr>
5181
5182 * src/print_graph.c (print_actions): Remove `rule', unused.
5183 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
5184 pacify GCC's signed < unsigned warnings.
5185 * src/closure.c (itemsetsize): Likewise.
5186 * src/reader.c (symbol_list_new): Static.
5187
5188 2001-11-23 Akim Demaille <akim@epita.fr>
5189
5190 Attaching lineno to buckets is stupid, since only one copy of each
5191 symbol is kept, only the line of the first occurrence is kept too.
5192
5193 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
5194 * src/reader.c (rline_allocated): Remove, unused.
5195 (symbol_list): Have a `line' member.
5196 (symbol_list_new): New.
5197 (readgram): Use it.
5198 * src/print.c (print_grammar): Output the rule line numbers.
5199 * tests/regression.at (Solved SR Conflicts)
5200 (Unresolved SR Conflicts): Adjust.
5201 Reported by Hans Aberg.
5202
5203 2001-11-22 Marc Autret <autret_m@epita.fr>
5204
5205 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
5206
5207 2001-11-22 Marc Autret <autret_m@epita.fr>
5208
5209 * src/muscle_tab.c (muscle_init): Remove initialization of
5210 skeleton muscle.
5211 * src/output.c (output_master_parser): Do it here.
5212
5213 2001-11-20 Akim Demaille <akim@epita.fr>
5214
5215 * po/sv.po: New.
5216 * configure.in (ALL_LINGUAS): Adjust.
5217 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
5218 longer contains strings to translate.
5219
5220 2001-11-19 Akim Demaille <akim@epita.fr>
5221
5222 * src/conflicts.c (conflicts_print): Add a missing \n.
5223
5224 2001-11-19 Akim Demaille <akim@epita.fr>
5225
5226 * src/nullable.c (nullable_print): New.
5227 (set_nullable): Call it when tracing.
5228 Better locality of variables.
5229
5230 2001-11-19 Akim Demaille <akim@epita.fr>
5231
5232 * src/print.c (print_actions): Better locality of variables.
5233
5234 2001-11-19 Akim Demaille <akim@epita.fr>
5235
5236 * src/derives.c (print_derives): Fix and enrich.
5237 * src/closure.c (print_fderives): Likewise.
5238
5239 2001-11-19 Akim Demaille <akim@epita.fr>
5240
5241 * src/closure.c (itemsetend): Remove, replaced with...
5242 (itemsetsize): new.
5243
5244 2001-11-19 Akim Demaille <akim@epita.fr>
5245
5246 * src/LR0.c (kernel_end): Remove, replaced with...
5247 (kernel_size): new.
5248
5249 2001-11-19 Akim Demaille <akim@epita.fr>
5250
5251 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
5252 to clarify.
5253
5254 2001-11-19 Akim Demaille <akim@epita.fr>
5255
5256 * src/closure.c (closure): Use arrays instead of pointers to clarify.
5257
5258 2001-11-19 Akim Demaille <akim@epita.fr>
5259
5260 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
5261 trace messages.
5262 * src/LR0.c: Likewise.
5263 (allocate_itemsets): Use arrays instead of pointers to clarify.
5264
5265 2001-11-19 Akim Demaille <akim@epita.fr>
5266
5267 * src/getargs.c (statistics_flag): Replace with...
5268 (trace_flag): New.
5269 (longopts): Accept --trace instead of --statistics.
5270 * src/getargs.h, src/options.c: Adjust.
5271 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
5272 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
5273
5274 2001-11-19 Akim Demaille <akim@epita.fr>
5275
5276 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
5277 pointers to clarify the code.
5278 (save_reductions, save_shifts): Factor common parts of alternatives.
5279
5280 2001-11-19 Akim Demaille <akim@epita.fr>
5281
5282 * src/LR0.c (new_state, get_state): Complete TRACE code.
5283 * src/closure.c: Include `reader.h' to get `tags', needed by the
5284 trace code.
5285 Rename the conditional DEBUG as TRACE.
5286 Output consistently TRACEs to stderr, not stdout.
5287 * src/derives.c: Likewise.
5288 * src/reduce.c: (inaccessable_symbols): Using if is better style
5289 than goto.
5290 Use `#if TRACE' instead of `#if 0' for tracing code.
5291
5292 2001-11-19 Akim Demaille <akim@epita.fr>
5293
5294 * src/system.h (LIST_FREE, shortcpy): New.
5295 * src/LR0.c: Use them.
5296 * src/output.c (free_itemsets, free_reductions, free_shifts):
5297 Remove, replaced by LIST_FREE.
5298
5299 2001-11-19 Akim Demaille <akim@epita.fr>
5300
5301 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
5302 (REDUCTIONS_ALLOC): New.
5303 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
5304 allocation.
5305
5306 2001-11-19 Akim Demaille <akim@epita.fr>
5307
5308 * src/LR0.c (new_state): Complete trace code.
5309 * src/nullable.c (set_nullable): Don't translate traces.
5310
5311 2001-11-19 Akim Demaille <akim@epita.fr>
5312
5313 * src/print_graph.c (print_core): Better locality of variables.
5314 * src/print.c (print_core): Likewise.
5315
5316 2001-11-19 Akim Demaille <akim@epita.fr>
5317
5318 * src/vcg.c: You do the output, so you are responsible of the
5319 handling of VCG syntax, in particular: use quotearg.
5320 * src/print_graph.c: Don't.
5321 (print_actions): Don't output the actions as part of the nodes,
5322 since that's the job of the edges.
5323 (print_state): Don't output by hand: fill the node description,
5324 and ask for its output.
5325
5326 2001-11-19 Akim Demaille <akim@epita.fr>
5327
5328 * src/bison.simple (yyparse): When verbosely reporting an error,
5329 no longer put additional quotes around token names.
5330 * tests/calc.at: Adjust.
5331
5332 2001-11-19 Akim Demaille <akim@epita.fr>
5333
5334 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
5335 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
5336 * src/output.c: Adjust.
5337
5338 2001-11-19 Akim Demaille <akim@epita.fr>
5339
5340 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
5341 (rule_t): this.
5342 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
5343
5344 2001-11-19 Akim Demaille <akim@epita.fr>
5345
5346 * src/gram.h (rule_t): New.
5347 (rule_table): New.
5348 (rrhs, rlhs): Remove, part of state_t.
5349 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
5350 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
5351 * src/reader.c, src/reduce.c: Adjust.
5352
5353 2001-11-19 Akim Demaille <akim@epita.fr>
5354
5355 * src/reader.c (symbols_output): New, extracted from...
5356 (packsymbols): Here.
5357 (reader): Call it.
5358
5359 2001-11-19 Akim Demaille <akim@epita.fr>
5360
5361 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
5362 (maxrhs): this new function.
5363
5364 2001-11-19 Akim Demaille <akim@epita.fr>
5365
5366 * src/lalr.c (F): New macro to access the variable F.
5367 Adjust.
5368
5369 2001-11-19 Akim Demaille <akim@epita.fr>
5370
5371 * src/lalr.h (LA): New macro to access the variable LA.
5372 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
5373 * src/lalr.c: Adjust.
5374
5375 2001-11-19 Akim Demaille <akim@epita.fr>
5376
5377 * src/lalr.c (initialize_LA): Only initialize LA. Let...
5378 (set_state_table): handle the `lookaheads' members.
5379
5380 2001-11-19 Akim Demaille <akim@epita.fr>
5381
5382 * src/lalr.h (lookaheads): Removed array, whose contents is now
5383 a member of...
5384 (state_t): this structure.
5385 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
5386 Adjust.
5387
5388 2001-11-19 Akim Demaille <akim@epita.fr>
5389
5390 * src/lalr.h (consistent): Removed array, whose contents is now
5391 a member of...
5392 (state_t): this structure.
5393 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
5394 Adjust.
5395
5396 2001-11-19 Akim Demaille <akim@epita.fr>
5397
5398 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
5399 contents are now members of...
5400 (state_t): this structure.
5401 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
5402 Adjust.
5403
5404 2001-11-19 Akim Demaille <akim@epita.fr>
5405
5406 * src/lalr.h (state_t): New.
5407 (state_table): Be a state_t * instead of a core **.
5408 (accessing_symbol): Remove, part of state_t.
5409 * src/lalr.c: Adjust.
5410 (set_accessing_symbol): Merge into...
5411 (set_state_table): this.
5412 * src/print_graph.c, src/conflicts.c: Adjust.
5413
5414 2001-11-14 Akim Demaille <akim@epita.fr>
5415
5416 * tests/calc.at, tests/output.at, tests/regression.at,
5417 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
5418 now the tests are run in private dirs, therefore AC_CLEANUP and
5419 family can be simplified to 0-ary.
5420 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
5421 use abs. path to find config.h.
5422 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
5423 stderr, there can be way too much random noise.
5424 Instead pass -Werror to GCC and rely on the exit status.
5425 Reported by Wolfram Wagner.
5426
5427 2001-11-14 Akim Demaille <akim@epita.fr>
5428
5429 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
5430 defined only if yyoverflow is defined, to avoid `warning: unused
5431 variable `yyvs1''.
5432 Reported by The Test Suite.
5433
5434 2001-11-14 Akim Demaille <akim@epita.fr>
5435
5436 * src/print.c: Include reduce.h.
5437 Reported by Hans Aberg.
5438
5439 2001-11-14 Akim Demaille <akim@epita.fr>
5440
5441 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
5442 Revert a previous patch: these are really const.
5443 * src/conflicts.c (conflict_report): Additional useless pair of
5444 braces to pacify GCC's warnings for `if () if () {} else {}'.
5445 * src/lex.c (parse_percent_token): Replace equal_offset with
5446 arg_offset.
5447 arg is const.
5448 Be sure to strdup `arg' when used, since there is no reason for
5449 token_buffer not to change.
5450
5451 2001-11-14 Akim Demaille <akim@epita.fr>
5452
5453 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
5454 definition.
5455 * src/main.c (main): Use them.
5456 Suggested by Hans Aberg.
5457
5458 2001-11-12 Akim Demaille <akim@epita.fr>
5459
5460 * src/system.h (ngettext): Now that we use ngettext, be sure to
5461 provide a default definition when NLS are not used.
5462
5463 2001-11-12 Akim Demaille <akim@epita.fr>
5464
5465 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
5466 Use @kbd to denote user input.
5467 (Language and Grammar): ANSIfy the example.
5468 Adjust its layout for info/notinfo.
5469 (Location Tracking Calc): Output error messages to stderr.
5470 Output locations in a more GNUtically correct way.
5471 Fix a couple of Englishos.
5472 Adjust @group/@end group pairs.
5473
5474 2001-11-12 Akim Demaille <akim@epita.fr>
5475
5476 %expext was not functioning at all.
5477
5478 * src/conflicts.c (expected_conflicts): Set to -1.
5479 (conflict_report): Use ngettext.
5480 (conflicts_print): Check %expect and make its violation an error.
5481 * doc/bison.texinfo (Expect Decl): Adjust.
5482 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
5483 * tests/regression.at (%expect not enough, %expect right)
5484 (%expect too much): New.
5485
5486 2001-11-12 Akim Demaille <akim@epita.fr>
5487
5488 * tests/regression.at (Conflicts): Rename as...
5489 (Unresolved SR Conflicts): this.
5490 (Solved SR Conflicts): New.
5491
5492 2001-11-12 Akim Demaille <akim@epita.fr>
5493
5494 * src/reduce.c (print_results): Rename as...
5495 (reduce_output): This.
5496 Output to OUT, passed as argument, instead of output_obstack.
5497 (dump_grammar): Likewise.
5498 (reduce_free): New.
5499 Also free V1.
5500 (reduce_grammar): No longer call reduce_output, since...
5501 * src/print.c (print_results): do it.
5502 * src/main.c (main): Call reduce_free;
5503
5504 2001-11-12 Akim Demaille <akim@epita.fr>
5505
5506 * src/conflicts.c (print_reductions): Accept OUT as argument.
5507 Output to it, not to output_obstack.
5508 * src/print.c (print_actions): Adjust.
5509
5510 2001-11-12 Akim Demaille <akim@epita.fr>
5511
5512 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
5513 the result instead of using...
5514 (src_total, rrc_total, src_count, rrc_count): Remove.
5515 (any_conflicts): Remove.
5516 (print_conflicts): Split into...
5517 (conflicts_print, conflicts_output): New.
5518 * src/conflicts.h: Adjust.
5519 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
5520 * src/print.c (print_grammar): Issue `\n' between two rules.
5521 * tests/regression.at (Conflicts): New.
5522 Reported by Tom Lane.
5523
5524 2001-11-12 Akim Demaille <akim@epita.fr>
5525
5526 * tests/regression.at (Invalid input): Remove, duplicate with
5527 ``Invalid input: 1''.
5528
5529 2001-11-12 Akim Demaille <akim@epita.fr>
5530
5531 * tests/torture.at (AT_DATA_STACK_TORTURE)
5532 (Exploding the Stack Size with Alloca)
5533 (Exploding the Stack Size with Malloc): New.
5534
5535 2001-11-12 Akim Demaille <akim@epita.fr>
5536
5537 * src/bison.simple (YYSTACK_REALLOC): New.
5538 (yyparse) [!yyoverflow]: Use it and free the old stack.
5539 Reported by Per Allansson.
5540
5541 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
5542
5543 * src/bison.simple: Define type yystype instead of YYSTYPE, and
5544 define CPP macro, which substitute YYSTYPE by yystype.
5545 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
5546 with yyltype/YYLTYPE. This allows inclusion of the generated
5547 header within the parser if the compiler, such as GGC, accepts
5548 multiple equivalent #defines.
5549 From Akim.
5550
5551 2001-11-05 Akim Demaille <akim@epita.fr>
5552
5553 * src/reader.c (symbols_output): New, extracted from...
5554 (packsymbols): here.
5555 (reader): Adjust.
5556
5557 2001-11-05 Akim Demaille <akim@epita.fr>
5558
5559 * src/lex.c (parse_percent_token): s/quotearg/quote/.
5560
5561 2001-11-05 Akim Demaille <akim@epita.fr>
5562
5563 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
5564 pattern.
5565
5566 2001-11-05 Akim Demaille <akim@epita.fr>
5567
5568 * src/options.h (struct option_table_struct): set_flags is void*.
5569 * src/options.c (longopts): Support `--output' and `%output'.
5570 (usage): Adjust.
5571 * src/lex.h (tok_setopt): Remove, replaced with...
5572 (tok_intopt, tok_stropt): these new guys.
5573 * src/lex.c (getopt.h): Not needed.
5574 (token_buffer, unlexed_token_buffer): Not const.
5575 (percent_table): Promote `-' over `_' in directive names.
5576 Active `%name-prefix', `file-prefix', and `output'.
5577 (parse_percent_token): Accept possible arguments to directives.
5578 Promote `-' over `_' in directive names.
5579
5580 2001-11-04 Akim Demaille <akim@epita.fr>
5581
5582 * doc/bison.texinfo (Decl Summary): Split the list into
5583 `directives for grammars' and `directives for bison'.
5584 Sort'em.
5585 Add description of `%name-prefix', `file-prefix', and `output'.
5586 Promote `-' over `_' in directive names.
5587 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
5588 Simplify the description of `--name-prefix'.
5589 Promote `-' over `_' in directive names.
5590 Promote `--output' over `--output-file'.
5591 Fix the description of `--defines'.
5592 * tests/output.at: Exercise %file-prefix and %output.
5593
5594 2001-11-02 Akim Demaille <akim@epita.fr>
5595
5596 * doc/refcard.tex: Update.
5597
5598 2001-11-02 Akim Demaille <akim@epita.fr>
5599
5600 * src/symtab.h (SUNDEF): New.
5601 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
5602 stand for `uninitialized', instead of 0.
5603 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
5604 * src/lex.c (lex): Adjust.
5605
5606 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
5607 Number it 0.
5608 Let yylex return it instead of a plain 0.
5609 Reported by Dick Streefland.
5610
5611 2001-11-02 Akim Demaille <akim@epita.fr>
5612
5613 * tests/regression.at (Mixing %token styles): New test.
5614
5615 2001-11-02 Akim Demaille <akim@epita.fr>
5616
5617 * src/reader.c (parse_thong_decl): Formatting changes.
5618 (token_translations_init): New, extracted from...
5619 (packsymbols): Here.
5620 Adjust.
5621
5622 2001-11-01 Akim Demaille <akim@epita.fr>
5623
5624 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
5625 Check that `9foo.y' produces correct cpp guards.
5626 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
5627 guards.
5628 Reported by Wwp.
5629
5630 2001-11-01 Akim Demaille <akim@epita.fr>
5631
5632 * tests/regression.at (Invalid input: 2): New.
5633 * src/lex.c (unlexed_token_buffer): New.
5634 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
5635 too.
5636 Reported by Wwp.
5637
5638 2001-11-01 Akim Demaille <akim@epita.fr>
5639
5640 * tests/calc.at: Catch up with 1.30.
5641 * configure.in: Bump to 1.49a.
5642 Adjust to newer Autotest.
5643
5644 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
5645
5646 * src/conflicts.c: Move global variables rrc_total and src_total ...
5647 (print_conflicts): here.
5648 * src/output.c (output): Free global variable user_toknums.
5649 * src/lex.c (token_obstack): Become static.
5650
5651 2001-10-18 Akim Demaille <akim@epita.fr>
5652
5653 * tests/atlocal.in (GCC): Add.
5654 * tests/calc.at: s/m4_match/m4_bmatch/.
5655 s/m4_patsubst/m4_bpatsubst/.
5656 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
5657 * configure.in: AC_SUBST(GCC).
5658
5659 2001-10-14 Marc Autret <autret_m@epita.fr>
5660
5661 * src/options.c (create_long_option_table): Fix.
5662
5663 2001-10-10 Akim Demaille <akim@epita.fr>
5664
5665 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
5666
5667 2001-10-04 Akim Demaille <akim@epita.fr>
5668
5669 * src/reader.c (parse_union_decl): Push the caracters in
5670 union_obstack, not attrs_obstack.
5671
5672 2001-10-04 Akim Demaille <akim@epita.fr>
5673
5674 Merge in the branch 1.29.
5675
5676 * src/reader.c (packsymbols): Use a temporary obstack for
5677 `%%tokendef', since output_stack is already used elsewhere.
5678
5679 2001-10-02 Akim Demaille <akim@epita.fr>
5680
5681 Bump 1.29d.
5682
5683 2001-10-02 Akim Demaille <akim@epita.fr>
5684
5685 Version 1.29c.
5686
5687 2001-10-02 Akim Demaille <akim@epita.fr>
5688
5689 * tests/regression.at (Invalid CPP headers): New.
5690 From Alexander Belopolsky.
5691 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
5692
5693 2001-10-02 Akim Demaille <akim@epita.fr>
5694
5695 * tests/regression.at (Invalid input): New.
5696 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
5697 Reported by Shura.
5698
5699 2001-10-02 Akim Demaille <akim@epita.fr>
5700
5701 * tests/calc.at: Now that --debug works, the tests must be adjusted.
5702
5703 2001-10-02 Akim Demaille <akim@epita.fr>
5704
5705 * src/output.c (output_parser): Assert `skeleton'.
5706 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
5707 systems.
5708 From Shura.
5709
5710 2001-10-01 Marc Autret <autret_m@epita.fr>
5711
5712 * src/lex.h: Echo modifications.
5713 * src/lex.c (unlex): Parameter is now token_t.
5714 From Hans Aberg.
5715
5716 2001-10-01 Marc Autret <autret_m@epita.fr>
5717
5718 * src/main.c: Include lex.h.
5719 From Hans Aberg.
5720
5721 2001-09-29 Akim Demaille <akim@epita.fr>
5722
5723 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
5724
5725 2001-09-28 Akim Demaille <akim@epita.fr>
5726
5727 * tests/testsuite.at: Update to newer Autotest.
5728 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
5729
5730 2001-09-27 Akim Demaille <akim@epita.fr>
5731
5732 Position independent wrapper.
5733
5734 * tests/bison: Remove.
5735 * tests/bison.in: New.
5736 * configure.in: Adjust.
5737
5738 2001-09-27 Paul Eggert <eggert@twinsun.com>
5739
5740 Port quotearg fixes from tar 1.13.24.
5741
5742 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
5743 tm to be declared.
5744 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
5745 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
5746
5747 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
5748 * m4/mbrtowc.m4: New file.
5749 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
5750 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
5751
5752 2001-09-27 Akim Demaille <akim@epita.fr>
5753
5754 Bump to 1.29c.
5755
5756 2001-09-27 Akim Demaille <akim@epita.fr>
5757
5758 Version 1.29b.
5759
5760 2001-09-25 Akim Demaille <akim@epita.fr>
5761
5762 * src/system.h: Include `xalloc.h'.
5763 Remove it from the C files.
5764 * src/files.c (output_files): Free the obstacks.
5765 * src/lex.c (init_lex): Rename as...
5766 (lex_init): this.
5767 (lex_free): New.
5768 * src/main.c (main): Use it.
5769
5770 2001-09-24 Marc Autret <autret_m@epita.fr>
5771
5772 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
5773 to output informations in fout (FILE*).
5774 (open_graph, close_graph): Likewise.
5775 (output_graph, output_edge, output_node): Likewise.
5776 * src/vcg.h: Update function prototypes.
5777 * src/print_graph.c (print_graph): Open output graph file.
5778 (print_actions): Adjust.
5779 * src/files.h: Remove extern declaration.
5780 * src/files.c: Remove graph_obstack declaration.
5781 (open_files): Remove graph_obstack initialization.
5782 (output_files): Remove graph_obstack saving.
5783
5784 2001-09-24 Marc Autret <autret_m@epita.fr>
5785
5786 * src/files.c (compute_output_file_names): Fix.
5787
5788 2001-09-24 Marc Autret <autret_m@epita.fr>,
5789 Akim Demaille <akim@epita.fr>
5790
5791 * src/reader.c (reader): Remove call to free_symtab ().
5792 * src/main.c (main): Call it here.
5793 Include symtab.h.
5794 * src/conflicts.c (initialize_conflicts): Rename as...
5795 (solve_conflicts): this.
5796 * src/print.c (print_core, print_actions, print_state)
5797 (print_grammar): Dump to a file instead a `output_obstack'.
5798 (print_results): Dump `output_obstack', and then proceed with the
5799 FILE *.
5800 * src/files.c (compute_output_file_names, close_files): New.
5801 (output_files): Adjust.
5802 * src/main.c (main): Adjust.
5803
5804 2001-09-23 Marc Autret <autret_m@epita.fr>
5805
5806 * src/files.c (compute_header_macro): Computes header macro name
5807 from spec_defines_file when given.
5808
5809 2001-09-23 Marc Autret <autret_m@epita.fr>
5810
5811 * src/files.c (output_files): Add default extensions.
5812
5813 2001-09-22 Akim Demaille <akim@epita.fr>
5814
5815 * src/conflicts.c (finalize_conflicts): Rename as...
5816 (free_conflicts): this.
5817
5818 2001-09-22 Akim Demaille <akim@epita.fr>
5819
5820 * src/gram.c (gram_free): Rename back as...
5821 (dummy): this.
5822 (output_token_translations): Free `token_translations'.
5823 * src/symtab.c (free_symtab): Free the tag field.
5824
5825 2001-09-22 Akim Demaille <akim@epita.fr>
5826
5827 Remove `translations' as it is always set to true.
5828
5829 * src/gram.h: Adjust.
5830 * src/reader.c (packsymbols, parse_token_decl): Adjust
5831 * src/print.c (print_grammar): Adjust.
5832 * src/output.c (output_token_translations): Adjust.
5833 * src/lex.c (lex): Adjust.
5834 * src/gram.c: Be sure the set pointers to NULL.
5835 (dummy): Rename as...
5836 (gram_free): this.
5837
5838 2001-09-22 Akim Demaille <akim@epita.fr>
5839
5840 * configure.in: Invoke AM_LIB_DMALLOC.
5841 * src/system.h: Use dmalloc.
5842 * src/LR0.c: Be sure to have pointers initialized to NULL.
5843 (allocate_itemsets): Allocate kernel_items only if needed.
5844
5845 2001-09-22 Akim Demaille <akim@epita.fr>
5846
5847 * configure.in: Bump to 1.29b.
5848 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
5849 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
5850 need xmalloc.c in calc.y.
5851 From Pascal Bart.
5852
5853 2001-09-21 Akim Demaille <akim@epita.fr>
5854
5855 Version 1.29a.
5856 * Makefile.maint, config/config.guess, config/config.sub,
5857 * config/missing: Update from masters.
5858 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
5859 upon package.m4.
5860 * configure.in (ALL_LINGUAS): Add `tr'.
5861
5862 2001-09-21 Akim Demaille <akim@epita.fr>
5863
5864 * tests/Makefile.am (package.m4): Move to...
5865 ($(srcdir)/$(TESTSUITE)): here.
5866
5867 2001-09-20 Akim Demaille <akim@epita.fr>
5868
5869 * src/complain.c: No longer try to be standalone: use system.h.
5870 Don't assume __STDC__ is defined to 1. Just test if it is defined.
5871 * src/complain.h: Likewise.
5872 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
5873 Remove the unused variable `n'.
5874 From Albert Chin-A-Young.
5875
5876 2001-09-18 Marc Autret <autret_m@epita.fr>
5877
5878 * doc/bison.1: Update.
5879 * doc/bison.texinfo (Bison Options): Update --defines and --graph
5880 descriptions.
5881 (Option Cross Key): Update.
5882 Add --graph.
5883
5884 2001-09-18 Marc Autret <autret_m@epita.fr>
5885
5886 * tests/regression.at: New test (comment in %union).
5887
5888 2001-09-18 Marc Autret <autret_m@epita.fr>
5889
5890 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
5891 do that.
5892 Reported by Keith Browne.
5893
5894 2001-09-18 Marc Autret <autret_m@epita.fr>
5895
5896 * tests/output.at: Add tests for --defines and --graph.
5897
5898 2001-09-18 Marc Autret <autret_m@epita.fr>
5899
5900 * tests/output.at: Removes tests of %{header,src}_extension features.
5901
5902 2001-09-18 Akim Demaille <akim@epita.fr>
5903
5904 * tests/Makefile.am (package.m4): New.
5905 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
5906 (_AT_CHECK_CALC_ERROR): Likewise.
5907 Factor the `, ' part of verbose error messages.
5908
5909 2001-09-18 Marc Autret <autret_m@epita.fr>
5910
5911 * src/getargs.c (longopts): Declare --defines and --graph as options
5912 with optional arguments.
5913 * src/files.h: Add extern declarations.
5914 * src/files.c (spec_graph_file, spec_defines_file): New.
5915 (output_files): Update.
5916 Remove CPP-outed code.
5917
5918 2001-09-18 Marc Autret <autret_m@epita.fr>
5919
5920 Turn off %{source,header}_extension feature.
5921
5922 * src/files.c (compute_exts_from_gf): Update.
5923 (compute_exts_from_src): Update.
5924 (output_files): CPP-out useless code.
5925 * src/files.h: Remove {header,source}_extension extern declarations.
5926 * src/reader.c (parse_dquoted_param): CPP-out.
5927 (parse_header_extension_decl): Remove.
5928 (parse_source_extension_decl): Remove.
5929 (read_declarations): Remove cases tok_{hdrext,srcext}.
5930 * src/lex.c (percent_table): Remove {header,source}_extension entries.
5931 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
5932
5933 2001-09-10 Akim Demaille <akim@epita.fr>
5934
5935 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
5936 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
5937 (AT_CHECK_OUTPUT): this.
5938 Merely check ls' exit status, its output is useless.
5939
5940 2001-09-10 Akim Demaille <akim@epita.fr>
5941
5942 * tests/calc.at: Use m4_match.
5943 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
5944
5945 2001-09-10 Marc Autret <autret_m@epita.fr>,
5946 Akim Demaille <akim@epita.fr>
5947
5948 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
5949 enum color_e.
5950 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
5951 to `normal'.
5952 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
5953 * src/lex.h: Adjust prototype.
5954 (token_t): Add `tok_undef'.
5955 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
5956 (parse_percent_token): Now returns token_t.
5957 Add default statement in switch.
5958 (lex): Separate `c' as an input variable, from the token_t result
5959 part.
5960 (unlexed): Is a token_t.
5961
5962 2001-09-10 Akim Demaille <akim@epita.fr>
5963
5964 * configure.in: Bump to 1.29a.
5965
5966 2001-09-07 Akim Demaille <akim@epita.fr>
5967
5968 Version 1.29.
5969
5970 2001-08-30 Akim Demaille <akim@epita.fr>
5971
5972 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
5973 * m4/atconfig.m4: Remove.
5974 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
5975 * tests/bison: New.
5976 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
5977 m4_if, m4_patsubst, and m4_regexp.
5978 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
5979 `input' file instead of echo.
5980
5981 2001-08-29 Akim Demaille <akim@epita.fr>
5982
5983 Bump to 1.28e.
5984
5985 2001-08-29 Akim Demaille <akim@epita.fr>
5986
5987 Version 1.28d.
5988
5989 2001-08-29 Paul Eggert <eggert@twinsun.com>
5990
5991 * src/bison.simple (yyparse): Don't take the address of an
5992 item before the start of an array, as that doesn't conform to
5993 the C Standard.
5994
5995 2001-08-29 Robert Anisko <anisko_r@epita.fr>
5996
5997 * doc/bison.texinfo (Location Tracking Calc): New node.
5998
5999 2001-08-29 Paul Eggert <eggert@twinsun.com>
6000
6001 * src/output.c (output): Do not define const, as this now
6002 causes more problems than it cures.
6003
6004 2001-08-29 Akim Demaille <akim@epita.fr>
6005
6006 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
6007 the nodes.
6008 Be sure to tag the `detailmenu'.
6009
6010 2001-08-29 Akim Demaille <akim@epita.fr>
6011
6012 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
6013 download in a tmp dir.
6014
6015 2001-08-28 Marc Autret <autret_m@epita.fr>
6016
6017 * config/depcomp: New file.
6018
6019 2001-08-28 Marc Autret <autret_m@epita.fr>
6020
6021 * doc/bison.1 (mandoc): Adjust.
6022 From Juan Manuel Guerrero.
6023
6024 2001-08-28 Marc Autret <autret_m@epita.fr>
6025
6026 * src/print_graph.c (print_state): Fix.
6027
6028 2001-08-27 Marc Autret <autret_m@epita.fr>
6029
6030 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
6031 char * members.
6032 Echo modifications to the functions prototypes.
6033 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
6034
6035 2001-08-27 Marc Autret <autret_m@epita.fr>
6036
6037 * src/vcg.c: Include `xalloc.h'.
6038 (add_colorentry): New.
6039 (add_classname): New.
6040 (add_infoname): New.
6041 * src/vcg.h: Add new prototypes.
6042
6043 2001-08-27 Akim Demaille <akim@epita.fr>
6044
6045 * Makefile.maint: Sync. again with CVS Autoconf.
6046
6047 2001-08-27 Akim Demaille <akim@epita.fr>
6048
6049 * Makefile.maint: Formatting changes.
6050 (po-update, cvs-update, update): New targets.
6051 (AMTAR): Remove.
6052
6053 2001-08-27 Akim Demaille <akim@epita.fr>
6054
6055 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
6056 * Makefile.maint: Sync. with CVS Autoconf.
6057
6058 2001-08-27 Marc Autret <autret_m@epita.fr>
6059
6060 * src/vcg.h (struct infoname_s): New.
6061 (struct colorentry_s): New.
6062 (graph_s): New fields {vertical,horizontal}_order in structure.
6063 Add `infoname' field.
6064 Add `colorentry' field;
6065 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
6066 (G_HORIZONTAL_ORDER): New.
6067 (G_INFONAME): New.
6068 (G_COLORENTRY): New.
6069 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
6070 Add output of `infoname'.
6071 Add output of `colorentry'.
6072
6073 2001-08-27 Marc Autret <autret_m@epita.fr>
6074
6075 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
6076 This one shadowed a global parameter.
6077
6078 2001-08-24 Marc Autret <autret_m@epita.fr>
6079
6080 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
6081 instead of `unsigned'.
6082 (print_state): Do not call obstack_object_size () in obstack_grow ()
6083 to avoid macro variables shadowing.
6084
6085 2001-08-23 Marc Autret <autret_m@epita.fr>
6086
6087 * src/lex.c (percent_table): Typo: s/naem/name/.
6088 Add graph option.
6089 Normalize new options declarations.
6090
6091 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
6092
6093 * tests/suite.at: Exercise %header_extension and %source_extension.
6094
6095 2001-08-16 Marc Autret <autret_m@epita.fr>
6096
6097 * src/reader.c (parse_dquoted_param): New.
6098 (parse_header_extension_decl): Use it.
6099 (parse_source_extension_decl): Likewise.
6100
6101 2001-08-16 Marc Autret <autret_m@epita.fr>
6102
6103 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
6104 (get_xxxx_str): Use assert () instead of complain ().
6105 Remove return invokations in default cases.
6106 (get_decision_str): Modify default behaviour. Remove second argument.
6107 Echo modifications on calls.
6108 (output_graph): Fix.
6109
6110 2001-08-16 Marc Autret <autret_m@epita.fr>
6111
6112 * src/getargs.c (usage): Update with ``-g, --graph''.
6113
6114 2001-08-16 Marc Autret <autret_m@epita.fr>
6115
6116 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
6117 (Option Cross Key): Likewise.
6118 * doc/bison.1: Update.
6119
6120 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
6121
6122 * src/output.c (output_master_parser): Don't finish action_obstack.
6123 (output_parser): Don't care about the muscle action, here.
6124 (prepare): Copy the action_obstack in the action muscle.
6125 (output): Free action_obstack.
6126
6127 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
6128
6129 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
6130 will contain `%union' declaration.
6131 (parse_union_decl): Delete #line directive output.
6132 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
6133 informations about %union.
6134 (parse_union_decl): Copy the union_obstack in the muscle stype.
6135 * src/bison.simple: Add new #line directive.
6136 Add typdef %%stype YYSTYPE.
6137
6138 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
6139
6140 * src/bison.simple: Add new `#line' directive.
6141
6142 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
6143
6144 * src/bison.simple: New `#line' directive.
6145 * src/output.c (output_parser): Support new dynamic muscle input_line.
6146
6147 2001-09-22 Marc Autret <autret_m@epita.fr>
6148
6149 * src/output.c (output_master_parser): New.
6150 (output_parser): Be more re-entrant.
6151
6152 2001-09-21 Marc Autret <autret_m@epita.fr>
6153
6154 * src/reader.c (copy_definition, parse_union_decl): Update and use
6155 `linef' muscle.
6156 (copy_action): Likewise.
6157 Use obstack_1grow ().
6158 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
6159
6160 2001-09-21 Marc Autret <autret_m@epita.fr>
6161
6162 * src/options.c (option_table): Adjust.
6163 * src/lex.c (parse_percent_token): Fix.
6164
6165 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
6166
6167 * src/options.c (symtab.h): Include it, need by lex.h.
6168
6169 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
6170
6171 * src/lex.c (parse_percent_token): Change type of variable `tx', which
6172 is now an option_table_struct*.
6173 (option_strcmp): New function option_strcmp.
6174 (parse_percent_token): Call option_strcmp.
6175 * src/getargs.c (xalloc.h, options.h): Include it.
6176 (getargs): Call create_long_option_table.
6177 (getargs): Free longopts at the end of the function.
6178 (shortopts): Move in options.c.
6179 * src/options.c (create_long_option_table): New function. Convert
6180 information from option_table to option structure.
6181 * src/reader.c (options.h): Include it.
6182
6183 * src/Makefile.am: Adjust.
6184 * src/options.c (option_table): Create from longopts and percent_table.
6185 * src/getargs.c (longopts): Delete.
6186 * src/lex.c (struct percent_table_struct): Delete.
6187 (percent_table): Delete.
6188 (options.h): Include it.
6189 * src/options.c: Create.
6190 * src/options.h: Create.
6191 Declare enum opt_access_e.
6192 Define struct option_table_struct.
6193
6194 2001-09-20 Marc Autret <autret_m@epita.fr>
6195
6196 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
6197 sections of Bison.
6198
6199 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
6200
6201 * src/bison.simple: s/%%filename/%%skeleton.
6202 * src/muscle_tab.c (getargs.h): Include it.
6203 (muscle_init): Insert new muscle skeleton.
6204
6205 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
6206
6207 * src/output.c (output_parser): Delete unused variable actions_dumped.
6208
6209 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
6210
6211 * src/output.c (output): Delete call to reader_output_yylsp.
6212 * src/reader.c (reader): Likewise.
6213 * src/reader.h: Delete declaration of reader_output_yylsp.
6214
6215 2001-09-02 Marc Autret <autret_m@epita.fr>
6216
6217 * src/reader.c: Include muscle_tab.h.
6218 (parse_union_decl): Update.
6219 (parse_macro_decl): Rename parse_muscle_decl.
6220 Update to use renamed functions and variable.
6221 (read_declarations, copy_action, read_additionnal_code, : Updated
6222 with correct variables and functions names.
6223 (packsymbols, reader): Likewise.
6224
6225 * src/reader.h (muscle_obstack): Extern declaration update.
6226
6227 * src/output.c: Include muscle_tab.h
6228 In all functions using macro_insert, change by using muscle_insert ().
6229 (macro_obstack): Rename muscle_obstack.
6230 Echo modifications in the whole file.
6231 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
6232 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
6233 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
6234
6235 * src/muscle_tab.h: Update double inclusion macros.
6236 (macro_entry_s): Rename muscle_entry_s.
6237 Update prototypes.
6238
6239 * src/muscle_tab.c: Include muscle_tab.h.
6240 Rename macro_tabble to muscle_table.
6241 (mhash1, mhash2, mcmp): Use muscle_entry.
6242 (macro_init): Rename muscle_init. Update.
6243 (macro_insert): Rename muscle_insert. Update.
6244 (macro_find): Rename muscle_find. Update.
6245
6246 * src/main.c: Include muscle_tab.h.
6247 (main): Call muscle_init ().
6248 * src/Makefile.am (bison_SOURCES): Echo modifications.
6249
6250 2001-09-02 Marc Autret <autret_m@epita.fr>
6251
6252 Now the files macro_tab.[ch] are named muscle_tab.[ch].
6253
6254 * src/muscle_tab.c, src/muscle_tab.h: Add files.
6255
6256 2001-09-02 Marc Autret <autret_m@epita.fr>
6257
6258 * src/macrotab.c, src/macrotab.h: Remove.
6259
6260 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
6261
6262 * src/reader.c (copy_guard): Use muscle to specify the `#line'
6263 filename.
6264
6265 2001-09-01 Marc Autret <autret_m@epita.fr>
6266
6267 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
6268 to an explicit value to activate the feature. We do it here.
6269
6270 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
6271
6272 * src/output.c (prepare): Delete the `filename' muscule insertion.
6273 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
6274 (parse_union_decl): Likewise.
6275 * src/macrotab.c (macro_init): Initialize filename by infile.
6276
6277 2001-08-31 Marc Autret <autret_m@epita.fr>
6278
6279 * src/bison.simple (YYLSP_NEEDED): New definition.
6280 * src/output.c (prepare): Add macro insertion of `locations_flag'
6281
6282 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
6283
6284 * src/output.c (prepare): Delete insertion of previous muscles,
6285 and insert the `prefix' muscles.
6286 * src/macrotab.c (macro_init): Likewise.
6287 (macro_init): Initialization prefix directive by `yy'.
6288 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
6289 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
6290 yylval, yydebug, yyerror, yynerrs and yyparse.
6291 New directive `#define' to substitute yydebug, ... with option
6292 name_prefix.
6293
6294 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
6295
6296 * src/main.c (main): Standardize.
6297 * src/output.c (output_table_data, output_parser): Likewise.
6298 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
6299
6300 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
6301
6302 * src/reader.c (read_additionnal_code): Rename %%user_code to
6303 %%epilogue.
6304 * src/output.c (output): Rename %%declarations to %%prologue.
6305 * src/bison.simple: Echo modifications.
6306
6307 2001-08-31 Marc Autret <autret_m@epita.fr>
6308
6309 * src/reader.c (readgram): CleanUp.
6310 (output_token_defines): Likewise.
6311 (packsymbols): Likewise.
6312 (reader): Likewise.
6313 * src/output.c (output): CPP-out useless code.
6314
6315 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
6316
6317 * src/reader.c (reader): Delete obsolete call to function
6318 output_trailers and output_headers.
6319 * src/output.h: Remove obsolete functions prototypes of output_headers
6320 and output_trailers.
6321
6322 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
6323
6324 * src/main.c: Include macrotab.h.
6325 * src/macrotab.h (macro_entry_s): Constify fields.
6326 Adjust functions prototypes.
6327 * src/macrotab.c (macro_insert): Constify key and value.
6328 (macro_find): Constify key.
6329 (macro_insert): Include 'xalloc.h'
6330 (macro_insert): Use XMALLOC.
6331 (macro_find): Constify return value.
6332 * src/output.c (output_table_data): Rename table to table_data.
6333 (output_parser): Constify macro_key, macro_value.
6334
6335 2001-08-30 Marc Autret <autret_m@epita.fr>
6336
6337 * src/reader.c (parse_skel_decl): New.
6338 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
6339 * src/lex.h (token_t): New token `tok_skel'.
6340 * src/lex.c (percent_table): Add skeleton option entry.
6341 Standardize.
6342
6343 2001-08-29 Marc Autret <autret_m@epita.fr>
6344
6345 * src/bison.simple: Add %%user_code directive at the end.
6346 * src/reader.c (read_additionnal_code): New.
6347 (reader): Use it.
6348 * src/output.c (output_program): Remove.
6349 (output): Update.
6350
6351 2001-08-28 Marc Autret <autret_m@epita.fr>
6352
6353 * src/output.c (output_actions): Clean up.
6354 (output_gram): CPP-out useless code.
6355 * src/reader.c (reader): Clean up, CPP-out useless code.
6356
6357 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
6358
6359 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
6360 directive.
6361 * src/bison.simple: Add `%%definitions'.
6362
6363 2001-08-28 Marc Autret <autret_m@epita.fr>
6364
6365 * config/depcomp: New file.
6366
6367 2001-08-27 Paul Eggert <eggert@twinsun.com>
6368
6369 * src/bison.simple (yyparse): Don't take the address of an
6370 item before the start of an array, as that doesn't conform to
6371 the C Standard.
6372
6373 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
6374
6375 * src/output.c (output): Remove the initialization of the macro
6376 obstack. It was done too late here.
6377
6378 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
6379 completely wrong.
6380 (reader): Initialize the macro obstack here, since we need it to grow
6381 '%define' directives.
6382
6383 * src/reader.h: Declare the macro obstack as extern.
6384
6385 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
6386
6387 * src/output.c (output_parser): Fix. Store single '%' characters in
6388 the output obstack instead of throwing them away.
6389
6390 2001-08-27 Akim Demaille <akim@epita.fr>
6391
6392 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
6393
6394 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
6395
6396 * lib/Makefile.am: Adjust.
6397
6398 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
6399
6400 * src/bison.simple: Update and add '%%' directives.
6401
6402 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
6403
6404 * src/reader.c (reader): Remove calls to 'output_headers' and
6405 'output_trailers'. Remove some C output.
6406 (readgram): Disable a piece of code that was writing a default
6407 definition for 'YYSTYPE'.
6408 (reader_output_yylsp): Remove.
6409 (packsymbols): Output token defintions to a macro.
6410 (copy_definition): Disable C output.
6411
6412 * src/reader.c (parse_macro_decl): New function used to parse macro
6413 declarations.
6414 (copy_string2): Put the body of copy_string into this new function.
6415 Add a parameter to let the caller choose whether he wants to copy the
6416 string delimiters or not.
6417 (copy_string): Be a simple call to copy_string2 with the last argument
6418 bound to true.
6419 (read_declarations): Add case for macro definition.
6420 (copy_identifier): New.
6421 (parse_macro_decl): Read macro identifiers using copy_identifier
6422 rather than lex.
6423
6424 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
6425
6426 * src/output.c (prepare): Add prefixed names.
6427 (output_parser): Output semantic actions.
6428 (output_parser): Fix bug on '%%line' directives.
6429
6430 * src/output.c (output_headers): Remove. The C code printed by this
6431 function should now be in the skeletons.
6432 (output_trailers): Remove.
6433 (output): Disable call to 'reader_output_yylsp'.
6434 (output_rule_data): Do not output tables to the table obstack.
6435
6436 * src/output.c: Remove some C dedicated output.
6437 Improve the use of macro and output obstacks.
6438 (output_defines): Remove.
6439
6440 * src/output.c (output_token_translations): Associate 'translate'
6441 table with a macro. No output to the table obstack.
6442 (output_gram): Same for 'rhs' and 'prhs'.
6443 (output_stos): Same for 'stos'.
6444 (output_rule_data): Same for 'r1' and 'r2'.
6445 (token_actions): Same for 'defact'.
6446 (goto_actions): Same for 'defgoto'.
6447 (output_base): Same for 'pact' and 'pgoto'.
6448 (output_table): Same for 'table'.
6449 (output_check): Same for 'check'.
6450
6451 * src/output.c (output_table_data): New function.
6452 (output_short_table): Remove.
6453 (output_short_or_char_table): Remove.
6454
6455 * src/output.c (output_parser): Replace most of the skeleton copy code
6456 with something new. Skeletons are now processed character by character
6457 rather than line by line, and Bison looks for '%%' macros. This is the
6458 first step in making Bison's output process (a lot) more flexible.
6459 (output_parser): Use the macro table.
6460
6461 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
6462
6463 * src/main.c (main): Initialize the macro table.
6464
6465 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
6466
6467 * src/lex.c (percent_table): Add tok_define.
6468 * src/lex.h: Add tok_define.
6469
6470 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
6471
6472 * src/macrotab.c: New file.
6473 * src/macrotab.h: New file.
6474 * src/Makefile.am: Update.
6475
6476 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
6477
6478 * lib/hash.c: New file.
6479 * lib/hash.h: New file.
6480 * lib/Makefile.am: Update.
6481
6482 2001-08-15 Akim Demaille <akim@epita.fr>
6483
6484 Version 1.28c.
6485
6486 2001-08-15 Marc Autret <autret_m@epita.fr>
6487
6488 * src/reader.c (readgram): Indent output macro YYSTYPE.
6489 (packsymbols): Likewise.
6490 (output_token_defines): Likewise.
6491 * src/files.c: Standardize.
6492 (compute_header_macro): New.
6493 (defines_obstack_save): New. Use compute_header_macro.
6494 (output_files): Update. Use defines_obstack_save.
6495
6496 2001-08-15 Akim Demaille <akim@epita.fr>
6497
6498 * doc/bison.texinfo (Table of Symbols): Document
6499 YYSTACK_USE_ALLOCA.
6500
6501 2001-08-15 Akim Demaille <akim@epita.fr>
6502
6503 * missing: Update from CVS Automake.
6504 * config/config.guess, config/config.sub, config/texinfo.tex:
6505 Update from gnu.org.
6506
6507 2001-08-15 Akim Demaille <akim@epita.fr>
6508
6509 * Makefile.maint: Sync with CVS Autoconf.
6510
6511 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
6512
6513 * doc/bison.texinfo: Include GNU Free Documentation License from
6514 `fdl.texi'.
6515 * doc/fdl.texi: Add to package.
6516
6517 2001-08-14 Marc Autret <autret_m@epita.fr>
6518
6519 Turn on %{source,header}_extension features.
6520
6521 * src/lex.c (percent_table): Un-CPP out header_extension and
6522 source_extension.
6523 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
6524 (compute_exts_from_src): Remove conditions. It restores priorities
6525 between options.
6526
6527 2001-08-14 Marc Autret <autret_m@epita.fr>
6528
6529 * src/files.c (compute_base_names): Add extensions computing when
6530 `--file-prefix' used.
6531 Standardize function calls.
6532
6533 2001-08-13 Marc Autret <autret_m@epita.fr>
6534
6535 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
6536 defining it (defined but null disables alloca).
6537
6538 2001-08-13 Marc Autret <autret_m@epita.fr>
6539
6540 * src/bison.simple (_yy_memcpy): CPP reformat.
6541
6542 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
6543
6544 * tests/atconfig.in (CPPFLAGS): Fix.
6545
6546 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
6547
6548 * doc/bison.texinfo: Include GNU General Public License from
6549 `gpl.texi'.
6550 * doc/gpl.texi: Add to package.
6551
6552 2001-08-10 Marc Autret <autret_m@epita.fr>
6553
6554 * src/print_graph.h: Fix.
6555 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
6556
6557 2001-08-10 Akim Demaille <akim@epita.fr>
6558
6559 * src/system.h: Provide default declarations for stpcpy, strndup,
6560 and strnlen.
6561
6562 2001-08-10 Robert Anisko <anisko_r@epita.fr>
6563
6564 * doc/bison.texinfo (Locations): Update @$ stuff.
6565
6566 2001-08-09 Robert Anisko <anisko_r@epita.fr>
6567
6568 * src/bison.simple (YYLLOC_DEFAULT): Update.
6569 (yyparse): Adjust.
6570
6571 2001-08-08 Marc Autret <autret_m@epita.fr>
6572
6573 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
6574 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
6575 Reported by Fabrice Bauzac.
6576
6577 2001-08-08 Marc Autret <autret_m@epita.fr>
6578
6579 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
6580 * src/vcg.c (output_node): Fix.
6581 * src/vcg.h: Cleanup.
6582 * src/print_graph.c: Add comments.
6583 (node_output_size): New global variable. Simplify the formatting of
6584 the VCG graph output.
6585 (print_actions): Unused code is now used. It notifies the final state
6586 and no action states in the VCG graph. It also give the reduce actions.
6587 The `shift and goto' edges are red and the `go to state' edges are
6588 blue.
6589 Get the current node name and node_obstack by argument.
6590 (node_obstack): New variable.
6591 (print_state): Manage node_obstack.
6592 (print_core): Use node_obstack given by argument.
6593 A node is not only computed here but in print_actions also.
6594 (print_graph): CPP out useless code instead of commenting it.
6595
6596 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
6597
6598 * tests/atconfig.in (CPPFLAGS): Fix.
6599
6600 2001-08-07 Akim Demaille <akim@epita.fr>
6601
6602 * src/print_graph.c (quote): New.
6603 (print_core): Use it.
6604
6605 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
6606
6607 * src/vcg.c (complain.h): Include it.
6608 Unepitaize `return' invocations.
6609 [NDEBUG] (main): Remove.
6610 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
6611 * src/files.c (open_files): Initialize graph_obstack.
6612 * src/print_graph.c (print_actions): CPP out useless code.
6613 (print_core): Don't output the last `\n' in labels.
6614 Use `quote'.
6615 * src/files.c (output_files): Output the VCG file.
6616 * src/main.c (main): Invoke print_graph ();
6617
6618 2001-08-06 Marc Autret <autret_m@epita.fr>
6619
6620 Automaton VCG graph output.
6621 Using option ``-g'' or long option ``--graph'', you can generate
6622 a gram_filename.vcg file containing a VCG description of the LALR (1)
6623 automaton of your grammar.
6624
6625 * src/main.c: Call to print_graph() function.
6626 * src/getargs.h: Update.
6627 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
6628 (graph_flag): New flag.
6629 (longopts): Update.
6630 (getargs): Add case `g'.
6631 * src/files.c (graph_obstack): New obstack struct.
6632 (open_files): Initialize new obstack.
6633 (output_files): Saves graph_obstack if required.
6634 * src/files.h (graph_obstack): New extern declaration.
6635 * src/Makefile.am: Add new source files.
6636
6637 2001-08-06 Marc Autret <autret_m@epita.fr>
6638
6639 * src/print_graph.c, src/print_graph.h (graph): New.
6640 * src/vcg.h: New file.
6641 * src/vcg.c: New file, VCG graph handling.
6642
6643 2001-08-06 Marc Autret <autret_m@epita.fr>
6644
6645 Add of %source_extension and %header_extension which specify
6646 the source or/and the header output file extension.
6647
6648 * src/files.c (compute_base_names): Remove initialisation of
6649 src_extension and header_extension.
6650 (compute_exts_from_gf): Update.
6651 (compute_exts_from_src): Update.
6652 (output_files): Update.
6653 * src/reader.c (parse_header_extension_decl): New.
6654 (parse_source_extension_decl): New.
6655 (read_declarations): New case statements for the new tokens.
6656 * src/lex.c (percent_table): Add entries for %source_extension
6657 and %header_extension.
6658 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
6659
6660 2001-08-06 Marc Autret <autret_m@epita.fr>
6661
6662 * configure.in: Bump to 1.28c.
6663 * doc/bison.texinfo: Texinfo thingies.
6664
6665 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
6666
6667 * tests/atconfig.in (CPPFLAGS): Add.
6668 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
6669
6670 2001-08-03 Akim Demaille <akim@epita.fr>
6671
6672 Version 1.28b.
6673
6674 2001-08-03 Akim Demaille <akim@epita.fr>
6675
6676 * tests/Makefile.am (check-local): Ship testsuite.
6677 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
6678 Include `string.h'.
6679
6680 2001-08-03 Akim Demaille <akim@epita.fr>
6681
6682 * configure.in: Try using -Wformat when compiling.
6683
6684 2001-08-03 Akim Demaille <akim@epita.fr>
6685
6686 * configure.in: Bump to 1.28b.
6687
6688 2001-08-03 Akim Demaille <akim@epita.fr>
6689
6690 * src/complain.c: Adjust strerror_r portability issues.
6691
6692 2001-08-03 Akim Demaille <akim@epita.fr>
6693
6694 Version 1.28a.
6695
6696 2001-08-03 Akim Demaille <akim@epita.fr>
6697
6698 * src/getargs.c, src/getarg.h (skeleton)): Constify.
6699 * src/lex.c (literalchar): Avoid name clashes on `buf'.
6700 * src/getargs.c: Include complain.h.
6701 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
6702 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
6703
6704 2001-08-03 Akim Demaille <akim@epita.fr>
6705
6706 * src/reader.c (readgram): Display hidden chars in error messages.
6707
6708 2001-08-03 Akim Demaille <akim@epita.fr>
6709
6710 Update to gettext 0.10.39.
6711
6712 2001-08-03 Akim Demaille <akim@epita.fr>
6713
6714 * lib/strspn.c: New.
6715
6716 2001-08-01 Marc Autret <autret_m@epita.fr>
6717
6718 * doc/bison.texinfo: Update.
6719 * doc/bison.1 (mandoc): Update.
6720 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
6721 * src/files.c: Support output files extensions computing.
6722 (src_extension): New static variable.
6723 (header_extension): New static variable.
6724 (tr): New function.
6725 (get_extension_index): New function, gets the index of an extension
6726 filename in a string.
6727 (compute_exts_from_gf): New function, computes extensions from the
6728 grammar file extension.
6729 (compute_exts_from_src): New functions, computes extensions from the
6730 C source file extension, file given by ``-o'' option.
6731 (compute_base_names): Update.
6732 (output_files): Update.
6733
6734 2001-08-01 Robert Anisko <anisko_r@epita.fr>
6735
6736 * doc/bison.texi: Document @$.
6737 (Locations): New section.
6738
6739 2001-07-18 Akim Demaille <akim@epita.fr>
6740
6741 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
6742 * config/prev-version.txt, config/move-if-change: New.
6743 * Makefile.am: Adjust.
6744
6745 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
6746
6747 * src/bison.simple (yyparse): Suppress warning `comparaison
6748 between signed and unsigned'.
6749
6750 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
6751
6752 * src/getargs.h (raw_flag): Remove.
6753 * src/getargs.c: Die on `-r'/`--raw'.
6754 * src/lex.c (parse_percent_token): Die on `%raw'.
6755 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
6756 * tests/calc.at: Suppress test with option `--raw'.
6757
6758 2001-07-14 Akim Demaille <akim@epita.fr>
6759
6760 * config/: New.
6761 * configure.in: Require Autoconf 2.50.
6762 Update to gettext 0.10.38.
6763
6764 2001-03-16 Akim Demaille <akim@epita.fr>
6765
6766 * doc/bison.texinfo: ANSIfy the examples.
6767
6768 2001-03-16 Akim Demaille <akim@epita.fr>
6769
6770 * getargs.c (skeleton): New variable.
6771 (longopts): --skeleton is a new option.
6772 (shortopts, getargs): -S is a new option.
6773 * getargs.h: Declare skeleton.
6774 * output.c (output_parser): Use it.
6775
6776 2001-03-16 Akim Demaille <akim@epita.fr>
6777
6778 * m4/strerror_r.m4: New.
6779 * m4/error.m4: Run AC_FUNC_STRERROR_R.
6780 * lib/error.h, lib/error.c: Update.
6781
6782 2001-03-16 Akim Demaille <akim@epita.fr>
6783
6784 * src/getargs.c (longopts): Clean up.
6785
6786 2001-02-21 Akim Demaille <akim@epita.fr>
6787
6788 * src/reader.c (gensym): `gensym_count' is your own.
6789 Use a static buf to create the symbol name, as token_buffer is no
6790 longer a buffer.
6791
6792 2001-02-08 Akim Demaille <akim@epita.fr>
6793
6794 * src/conflicts.c (conflict_report): Be sure not to append to res
6795 between two calls, which could happen if both first sprintf were
6796 skipped, but not the first cp += strlen.
6797
6798 2001-02-08 Akim Demaille <akim@epita.fr>
6799
6800 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
6801 New, from fileutils 4.0.37.
6802 * configure.in: Require Autoconf 2.49c. I took some time before
6803 making this decision. This is the only way out for portability
6804 issues in Bison, it would mean way too much duplicate effort to
6805 import in Bison features implemented in 2.49c since 2.13.
6806 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
6807
6808 2001-02-02 Akim Demaille <akim@epita.fr>
6809
6810 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
6811 * lib/xalloc.h, lib/xmalloc.c: Update.
6812
6813 2001-01-19 Akim Demaille <akim@epita.fr>
6814
6815 Get rid of the ad hoc handling of token_buffer in the scanner: use
6816 the obstacks.
6817
6818 * src/lex.c (token_obstack): New.
6819 (init_lex): Initialize it. No longer call...
6820 (grow_token_buffer): this. Remove it.
6821 Adjust all the places which used it to use the obstack.
6822
6823 2001-01-19 Akim Demaille <akim@epita.fr>
6824
6825 * src/lex.h: Rename all the tokens:
6826 s/\bENDFILE\b/tok_eof/g;
6827 s/\bIDENTIFIER\b/tok_identifier/g;
6828 etc.
6829 Let them be enums, not #define, to ease debugging.
6830 Adjust all the code.
6831
6832 2001-01-18 Akim Demaille <akim@epita.fr>
6833
6834 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
6835 * src/lex.c (maxtoken, grow_token_buffer): Static.
6836
6837 2001-01-18 Akim Demaille <akim@epita.fr>
6838
6839 Since we now use obstacks, more % directives can be enabled.
6840
6841 * src/lex.c (percent_table): Also accept `%yacc',
6842 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
6843 `%debug'.
6844 Handle the actions for `%semantic_parser' and `%pure_parser' here,
6845 instead of returning a token.
6846 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
6847 * src/reader.c (read_declarations): Adjust.
6848 * src/files.c (open_files): Don't call `compute_base_names', don't
6849 compute `attrsfile' since they depend upon data which might be
6850 *in* the input file now.
6851 (output_files): Do it here.
6852 * src/output.c (output_headers): Document the fact that this patch
6853 introduces a guaranteed SEGV for semantic parsers.
6854 * doc/bison.texinfo: Document them.
6855 * tests/suite.at: Exercise these %options.
6856
6857 2000-12-20 Akim Demaille <akim@epita.fr>
6858
6859 Also handle the output file (--verbose) with obstacks.
6860
6861 * files.c (foutput): Remove.
6862 (output_obstack): New.
6863 Adjust all dependencies.
6864 * src/conflicts.c: Return a string.
6865 * src/system.h (obstack_grow_string): Rename as...
6866 (obstack_sgrow): this. Be ready to work with non literals.
6867 (obstack_fgrow4): New.
6868
6869 2000-12-20 Akim Demaille <akim@epita.fr>
6870
6871 * src/files.c (open_files): Fix the computation of short_base_name
6872 in the case of `-o foo.tab.c'.
6873
6874 2000-12-20 Akim Demaille <akim@epita.fr>
6875
6876 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
6877 (copy_dollar): Now that everything uses obstacks, get rid of the
6878 FILE * parameters.
6879
6880 2000-12-20 Akim Demaille <akim@epita.fr>
6881
6882 * src/files.c (open_files): Actually the `.output' file is based
6883 on the short_base_name, not base_name.
6884 * tests/suite.at (Checking output file names): Adjust.
6885
6886 2000-12-20 Akim Demaille <akim@epita.fr>
6887
6888 * src/bison.s1: Remove, we now use directly...
6889 * src/bison.simple: this.
6890 * src/Makefile.am: Use pkgdata instead of data.
6891
6892 2000-12-20 Akim Demaille <akim@epita.fr>
6893
6894 * src/files.c (guard_obstack): New.
6895 (open_files): Initialize it.
6896 (output_files): Dump it...
6897 * src/files.h: Export it.
6898 * src/reader.c (copy_guard): Use it.
6899
6900 2000-12-19 Akim Demaille <akim@epita.fr>
6901
6902 * src/files.c (outfile, defsfile, actfile): Removed as global
6903 vars.
6904 (open_files): Don't compute them.
6905 (output_files): Adjust.
6906 (base_name, short_base_name): Be global.
6907 Adjust dependencies.
6908
6909 2000-12-19 Akim Demaille <akim@epita.fr>
6910
6911 * src/files.c (strsuffix): New.
6912 (stringappend): Be just like strcat but allocate.
6913 (base_names): Eve out from open_files.
6914 Try to simplify the rather hairy computation of base_name and
6915 short_base_name.
6916 (open_files): Use it.
6917 * tests/suite.at (Checking output file names): New test.
6918
6919 2000-12-19 Akim Demaille <akim@epita.fr>
6920
6921 * src/system.h (obstack_grow_literal_string): Rename as...
6922 (obstack_grow_string): this.
6923 * src/output.c (output_parser): Recognize `%% actions' instead of
6924 `$'.
6925 * src/bison.s1: s/$/%% actions/.
6926 * src/bison.hairy: Likewise.
6927
6928 2000-12-19 Akim Demaille <akim@epita.fr>
6929
6930 * src/output.c (output_parser): Compute the `#line' lines when
6931 there are.
6932 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
6933 Suggested by Hans Aberg.
6934
6935 2000-12-19 Akim Demaille <akim@epita.fr>
6936
6937 Let the handling of the skeleton files be local to the procedures
6938 that use it.
6939
6940 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
6941 longer static.
6942 (fparser, open_extra_files): Remove.
6943 (open_files, output_files): Don't take care of fparser.
6944 * src/files.h: Adjust.
6945 * src/output.c (output_parser): Open and close the file to the
6946 skeleton.
6947 * src/reader.c (read_declarations): When %semantic_parser, open
6948 fguard.
6949
6950 2000-12-19 Akim Demaille <akim@epita.fr>
6951
6952 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
6953 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
6954
6955 2000-12-19 Akim Demaille <akim@epita.fr>
6956
6957 * src/files.c (open_files): Yipee! We no longer need all the code
6958 looking for `/tmp' since we have no tmp file.
6959
6960 2000-12-19 Akim Demaille <akim@epita.fr>
6961
6962 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
6963 New macros.
6964 * src/files.c (open_files): Less dependency on MSDOS etc.
6965
6966 2000-12-14 Akim Demaille <akim@epita.fr>
6967
6968 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
6969 Provide a default definition.
6970 Use it when executing the default @ action.
6971 * src/reader.c (reader_output_yylsp): No longer include
6972 `timestamp' and `text' in the default YYLTYPE.
6973
6974 2000-12-12 Akim Demaille <akim@epita.fr>
6975
6976 * src/reader.c (copy_definition, parse_union_decl, copy_action)
6977 (copy_guard): Quote the file names.
6978 Reported by Laurent Mascherpa.
6979
6980 2000-12-12 Akim Demaille <akim@epita.fr>
6981
6982 * src/output.c (output_headers, output_program, output): Be sure
6983 to escape special characters when outputting filenames.
6984 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
6985 (output_headers): Don't depend on them, Use ACTSTR.
6986
6987 2000-11-17 Akim Demaille <akim@epita.fr>
6988
6989 * lib/obstack.h: Formatting changes.
6990 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
6991 prevents type checking.
6992 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
6993 cast the value to (void *): assigning a `foo *' to a `void *'
6994 variable is valid.
6995 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
6996 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
6997 append characters.
6998
6999 2000-11-17 Akim Demaille <akim@epita.fr>
7000
7001 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
7002 as...
7003 (suite.m4, regression.m4, calc.m4): these.
7004 * tests/atgeneral.m4: Update from CVS Autoconf.
7005
7006 2000-11-17 Akim Demaille <akim@epita.fr>
7007
7008 * tests/regression.m4 (%union and --defines): New test,
7009 demonstrating a current bug in the obstack implementation.
7010
7011 2000-11-17 Akim Demaille <akim@epita.fr>
7012
7013 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
7014 macros.
7015 Use them to declare the variables which are global or local to
7016 `yyparse'.
7017
7018 2000-11-17 Akim Demaille <akim@epita.fr>
7019
7020 * acconfig.h: Remove, no longer used.
7021
7022 2000-11-07 Akim Demaille <akim@epita.fr>
7023
7024 * src: s/Copyright (C)/Copyright/g.
7025
7026 2000-11-07 Akim Demaille <akim@epita.fr>
7027
7028 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
7029 defining.
7030 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
7031
7032 2000-11-07 Akim Demaille <akim@epita.fr>
7033
7034 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
7035 Merge in a single CPP if/else.
7036
7037 2000-11-07 Akim Demaille <akim@epita.fr>
7038
7039 * src/output.c (output): Remove useless variables.
7040 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
7041 argument `data' for consistency with the prototypes.
7042 Qualify it `const'.
7043 (obstack_copy, obstack_copy0): Rename the second argument as
7044 `address' for consistency. Qualify it `const'.
7045 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
7046 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
7047 `const' their input argument (`data' or `address').
7048 Adjust the corresponding macros to include `const' in casts.
7049
7050 2000-11-03 Akim Demaille <akim@epita.fr>
7051
7052 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
7053 s/PFILE1/BISON_HAIRY/.
7054 Adjust dependencies.
7055
7056 2000-11-03 Akim Demaille <akim@epita.fr>
7057
7058 For some reason, this was not applied.
7059
7060 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
7061 `unlink': it's no longer used.
7062
7063 2000-11-03 Akim Demaille <akim@epita.fr>
7064
7065 * src/files.c (skeleton_find): New function, eved out of...
7066 (open_files, open_extra_files): here.
7067
7068 2000-11-03 Akim Demaille <akim@epita.fr>
7069
7070 Don't use `atexit'.
7071
7072 * src/files.c (obstack_save): New function.
7073 (done): Rename as...
7074 (output_files): this.
7075 Use `obstack_save'.
7076 * src/main.c (main): Don't use `atexit' to register `done', since
7077 it no longer has to remove tmp files, just call `output_files'
7078 when there are no errors.
7079
7080 2000-11-02 Akim Demaille <akim@epita.fr>
7081
7082 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
7083 `unlink': it's no longer used.
7084 * src/files.h: Formatting changes.
7085
7086 2000-11-02 Akim Demaille <akim@epita.fr>
7087
7088 Remove the last uses of mktemp and unlink/delete.
7089
7090 * src/files.c (fdefines, ftable): Removed.
7091 (defines_ostack, table_obstack): New.
7092 Adjust dependencies of the former into uses of the latter.
7093 * src/output.c (output_short_or_char_table, output_short_table):
7094 Convert to using obstacks.
7095 * src/reader.c (copy_comment2): Accept one FILE * and two
7096 obstacks.
7097 (output_token_defines, reader_output_yylsp): Use obstacks.
7098 * src/system.h (obstack_fgrow3): New.
7099
7100 2000-11-01 Akim Demaille <akim@epita.fr>
7101
7102 Change each use of `fattrs' into a use of `attrs_obstack'.
7103
7104 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
7105 * src/files.c (fattrs): Remove.
7106 (attrs_obstack): New.
7107 Adjust all dependencies.
7108 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
7109
7110 2000-11-01 Akim Demaille <akim@epita.fr>
7111
7112 Introduce obstacks.
7113 Change each use of `faction' into a use of `action_obstack'.
7114
7115 * lib/obstack.h, lib/obstack.c: New files.
7116 * src/files.c (faction): Remove.
7117 (action_obstack): New.
7118 Adjust all dependencies.
7119
7120 2000-10-20 Akim Demaille <akim@epita.fr>
7121
7122 * lib/quote.h (PARAMS): New macro. Use it.
7123
7124 2000-10-16 Akim Demaille <akim@epita.fr>
7125
7126 * src/output.c (output_short_or_char_table): New function.
7127 (output_short_table, output_token_translations): Use it.
7128 (goto_actions): Use output_short_table.
7129
7130 2000-10-16 Akim Demaille <akim@epita.fr>
7131
7132 * src/symtab.c (bucket_new): New function.
7133 (getsym): Use it.
7134
7135 * src/output.c (output_short_table): New argument to display the
7136 comment associated with the table.
7137 Adjust dependencies.
7138 (output_gram): Use it.
7139 (output_rule_data): Nicer output layout for YYTNAME.
7140
7141 2000-10-16 Akim Demaille <akim@epita.fr>
7142
7143 * src/lex.c (read_typename): New function.
7144 (lex): Use it.
7145 * src/reader.c (copy_dollar): Likewise.
7146
7147 2000-10-16 Akim Demaille <akim@epita.fr>
7148
7149 * src/reader.c (copy_comment2): Expect the input stream to be on
7150 the `/' which is suspected to open a comment, instead of being
7151 called after `//' or `/*' was read.
7152 (copy_comment, copy_definition, parse_union_decl, copy_action)
7153 (copy_guard): Adjust.
7154
7155 2000-10-16 Akim Demaille <akim@epita.fr>
7156
7157 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
7158 `read_signed_integer'.
7159
7160 2000-10-16 Akim Demaille <akim@epita.fr>
7161
7162 * src/reader.c (copy_dollar): New function.
7163 (copy_guard, copy_action): Use it.
7164
7165 2000-10-16 Akim Demaille <akim@epita.fr>
7166
7167 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
7168 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
7169 New files, from Fileutils 4.0.27.
7170 * src/main.c (printable_version): Remove.
7171 * src/lex.c, src/reader.c: Use `quote'.
7172
7173 2000-10-04 Akim Demaille <akim@epita.fr>
7174
7175 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
7176
7177 2000-10-04 Akim Demaille <akim@epita.fr>
7178
7179 * doc/bison.texinfo: Various typos spotted by Neil Booth.
7180
7181 2000-10-04 Akim Demaille <akim@epita.fr>
7182
7183 When a literal string is used to define two different tokens,
7184 `bison -v' segfaults.
7185 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
7186
7187 * tests/regression.m4: New file.
7188 Include the core of the sample provided by Piotr Gackiewicz.
7189 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
7190 properly.
7191
7192 2000-10-04 Akim Demaille <akim@epita.fr>
7193
7194 * src/reader.c (parse_expect_decl): Keep `count' within the size
7195 of `buffer'.
7196 From Neil Booth.
7197
7198 2000-10-02 Paul Eggert <eggert@twinsun.com>
7199
7200 * bison.s1 (yyparse): Assign the default value
7201 unconditionally, to avoid a GCC warning and make the parser a
7202 tad smaller.
7203
7204 2000-10-02 Akim Demaille <akim@epita.fr>
7205
7206 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
7207 options.
7208
7209 2000-10-02 Akim Demaille <akim@epita.fr>
7210
7211 * src/derives.c, src/print.c, src/reduce.c: To ease the
7212 translation, move some `\n' out of the translated strings.
7213
7214 2000-10-02 Akim Demaille <akim@epita.fr>
7215
7216 The location tracking mechanism is precious for parse error
7217 messages. Nevertheless, it is enabled only when `@n' is used in
7218 the grammar, which is a different issue (you can use it in error
7219 message, but not in the grammar per se). Therefore, there should
7220 be another means to enable it.
7221
7222 * src/getargs.c (getargs): Support `--locations'.
7223 (usage): Report it.
7224 * src/getargs.h (locationsflag): Export it.
7225 * src/lex.c (percent_table): Support `%locations'.
7226 * src/reader.c (yylsp_needed): Remove this variable, now replaced
7227 with `locationsflag'.
7228 * doc/bison.texinfo: Document `--locations' and `%locations'.
7229 Sort the options.
7230 * tests/calc.m4: Test it.
7231
7232 For regularity of the names, replace each
7233 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
7234 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
7235 In addition replace each `flag' with `_flag'.
7236
7237 2000-10-02 Akim Demaille <akim@epita.fr>
7238
7239 Also test parse error messages, including with YYERROR_VERBOSE.
7240
7241 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
7242 associative).
7243 Use it to check the computations.
7244 Use it to check `nonassoc' is honored.
7245 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
7246 `--yyerror-verbose'.
7247 (_AT_CHECK_CALC): Adjust to this option.
7248 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
7249
7250 2000-10-02 Akim Demaille <akim@epita.fr>
7251
7252 Test also `--verbose', `--defines' and `--name-prefix'. Testing
7253 the latter demonstrates a flaw in the handling of non debugging
7254 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
7255 was used in order to simplify:
7256
7257 #if YYDEBUG
7258 if (yydebug)
7259 {
7260 ...
7261 }
7262 #endif
7263
7264 into
7265
7266 if (yydebug)
7267 {
7268 ...
7269 }
7270
7271 unfortunately this leads to a CPP conflict when
7272 `--name-prefix=foo' is used since it produces `#define yydebug
7273 foodebug'.
7274
7275 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
7276 (YYDPRINTF): New macro.
7277 Spread its use.
7278 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
7279 the bison options.
7280 Also test `--verbose', `--defines' and `--name-prefix'.
7281
7282 2000-10-02 Akim Demaille <akim@epita.fr>
7283
7284 Improve the readability of the produced parsers.
7285
7286 * src/bison.s1: Formatting changes.
7287 Improve the comment related to the `$' mark.
7288 (yydefault): Don't fall through to `yyresume': `goto' there.
7289 * src/output.c (output_parser): When the `$' is met, skip the end
7290 of its line.
7291 New variable, `number_of_dollar_signs', to check there's exactly
7292 one `$' in the parser skeleton.
7293
7294 2000-10-02 Akim Demaille <akim@epita.fr>
7295
7296 * lib/xstrdup.c: New file, from the fileutils.
7297 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
7298 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
7299 instead of strlen + xmalloc + strcpy.
7300 * src/symtab.c (copys): Remove, use xstrdup instead.
7301
7302 2000-10-02 Akim Demaille <akim@epita.fr>
7303
7304 * src/gram.h (associativity): New enum type which replaces the
7305 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
7306 `right_assoc', `left_assoc' and `non_assoc'.
7307 Adjust all dependencies.
7308 * src/reader.c: Formatting changes.
7309 (LTYPESTR): Don't define it, use it as a literal in
7310 `reader_output_yylsp'.
7311 * src/symtab.h (symbol_class): New enum type which replaces the
7312 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
7313 `sunknown', `stoken and `snterm'.
7314
7315 2000-10-02 Akim Demaille <akim@epita.fr>
7316
7317 * src/getargs.c (fixed_outfiles): Rename as...
7318 (yaccflag): for consistency and accuracy.
7319 Adjust dependencies.
7320
7321 2000-10-02 Akim Demaille <akim@epita.fr>
7322
7323 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
7324 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
7325 difficult and introduced a lot of core dump. It turns out that
7326 Bison used an implementation of `xmalloc' based on `calloc', and
7327 at various places it does depend upon the initialization to 0. I
7328 have not tried to isolate the pertinent places, and all the former
7329 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
7330 someone should address this issue.
7331
7332 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
7333 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
7334 files.
7335 Adjust dependencies.
7336 * src/warshall.h: New file.
7337 Propagate.
7338
7339 2000-10-02 Akim Demaille <akim@epita.fr>
7340
7341 Various anti-`extern in *.c' changes.
7342
7343 * src/system.h: Include `assert.h'.
7344
7345 2000-10-02 Akim Demaille <akim@epita.fr>
7346
7347 * src/state.h (nstates, final_state, first_state, first_shift)
7348 (first_reduction): Move their exportation from here...
7349 * src/LR0.h: to here.
7350 Adjust dependencies.
7351 * src/getargs.c (statisticsflag): New variable.
7352 Add support for `--statistics'.
7353 Adjust dependencies.
7354
7355 Remove a lot of now useless `extern' statements in most files.
7356
7357 2000-10-02 Akim Demaille <akim@epita.fr>
7358
7359 * src/LR0.h: New file.
7360 Propagate its use.
7361
7362 2000-10-02 Akim Demaille <akim@epita.fr>
7363
7364 * src/print.h: New file.
7365 Propagate its use.
7366 * src/print.c: Formatting and ordering changes.
7367 (verbose, terse): Replace with...
7368 (print_results): this new function.
7369 Adjust dependencies.
7370
7371 2000-10-02 Akim Demaille <akim@epita.fr>
7372
7373 * src/conflicts.c (conflict_report): New function.
7374 (conflict_log, verbose_conflict_log): Replace with...
7375 (print_conflicts): this function.
7376 Adjust dependencies.
7377 * src/conflicts.h: New file.
7378 Propagate its inclusion.
7379
7380 2000-10-02 Akim Demaille <akim@epita.fr>
7381
7382 * src/nullable.h: New file.
7383 Propagate its inclusion.
7384 * src/nullable.c: Formatting changes.
7385
7386 2000-10-02 Akim Demaille <akim@epita.fr>
7387
7388 * src/reduce.h: New file.
7389 Propagate its inclusion.
7390 * src/reduce.c: Topological sort and other formatting changes.
7391 (bool, TRUE, FALSE): Move their definition to...
7392 * src/system.h: here.
7393
7394 2000-10-02 Akim Demaille <akim@epita.fr>
7395
7396 * src/files.c: Formatting changes.
7397 (tryopen, tryclose, openfiles): Rename as...
7398 (xfopen, xfclose, open_files): this.
7399 (stringappend): static.
7400 * src/files.h: Complete the list of exported symbols.
7401 Propagate its use.
7402
7403 2000-10-02 Akim Demaille <akim@epita.fr>
7404
7405 * src/reader.h: New file.
7406 Propagate its use instead of tedious list of `extern' and
7407 prototypes.
7408 * src/reader.c: Formatting changes, topological sort,
7409 s/register//.
7410
7411 2000-10-02 Akim Demaille <akim@epita.fr>
7412
7413 * src/lex.h: Prototype `lex.c' exported functions.
7414 * src/reader.c: Adjust.
7415 * src/lex.c: Formatting changes.
7416 (safegetc): Rename as...
7417 (xgetc): this.
7418
7419 2000-10-02 Akim Demaille <akim@epita.fr>
7420
7421 * src/lalr.h: New file.
7422 Propagate its inclusion instead of prototypes and `extern'.
7423 * src/lalr.c: Formatting changes, topological sorting etc.
7424
7425 2000-10-02 Akim Demaille <akim@epita.fr>
7426
7427 * src/output.c (token_actions): Introduce a temporary array,
7428 YYDEFACT, that makes it possible for this function to use
7429 output_short_table.
7430
7431 2000-10-02 Akim Demaille <akim@epita.fr>
7432
7433 `user_toknums' is output as a `short[]' in `output.c', while it is
7434 defined as a `int[]' in `reader.c'. For consistency with the
7435 other output tables, `user_toknums' is now defined as a table of
7436 shorts.
7437
7438 * src/reader.c (user_toknums): Be a short table instead of an int
7439 table.
7440 Adjust dependencies.
7441
7442 Factor the short table outputs.
7443
7444 * src/output.c (output_short_table): New function.
7445 * src/output.c (output_gram, output_stos, output_rule_data)
7446 (output_base, output_table, output_check): Use it.
7447
7448 2000-10-02 Akim Demaille <akim@epita.fr>
7449
7450 * src/output.c (output): Topological sort of the functions, in
7451 order to get rid of the `static' prototypes.
7452 No longer use `register'.
7453 * src/output.h: New file.
7454 Propagate its inclusion in files explicitly prototyping functions
7455 from output.c.
7456
7457 2000-09-21 Akim Demaille <akim@epita.fr>
7458
7459 * src/atgeneral.m4: Update from Autoconf.
7460
7461 2000-09-21 Akim Demaille <akim@epita.fr>
7462
7463 * src/closure.h: New file.
7464 * src/closure.c: Formatting changes, topological sort over the
7465 functions, use of closure.h.
7466 (initialize_closure, finalize_closure): Rename as...
7467 (new_closure, free_closure): these. Adjust dependencies.
7468 * src/LR0.c: Formatting changes, topological sort, use of
7469 cloture.h.
7470 (initialize_states): Rename as...
7471 (new_states): this.
7472 * src/Makefile.am (noinst_HEADERS): Adjust.
7473
7474 2000-09-20 Akim Demaille <akim@epita.fr>
7475
7476 * src/acconfig.h: Don't protect config.h against multiple
7477 inclusion.
7478 Don't define PARAMS.
7479 * src/system.h: Define PARAMS.
7480 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
7481 purpose of config.h. system.h must not try to fix wrong
7482 definitions in config.h.
7483
7484 2000-09-20 Akim Demaille <akim@epita.fr>
7485
7486 * src/derives.h: New file.
7487 * src/main.c, src/derives.h: Use it.
7488 Formatting changes.
7489 * src/Makefile.am (noinst_HEADERS): Adjust.
7490
7491 2000-09-20 Akim Demaille <akim@epita.fr>
7492
7493 * tests/atgeneral.m4: Update from Autoconf.
7494 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
7495 (AT_CHECK_CALC): New macros.
7496 Use these macros to test bison with options `', `--raw',
7497 `--debug', `--yacc', `--yacc --debug'.
7498
7499 2000-09-19 Akim Demaille <akim@epita.fr>
7500
7501 * src/output.c: Formatting changes.
7502 * src/machine.h: Remove, leaving its contents in...
7503 * src/system.h: here.
7504 Include stdio.h.
7505 Adjust all dependencies on stdio.h and machine.h.
7506 * src/getargs.h: New file.
7507 Let all `extern' declarations about getargs.c be replaced with
7508 inclusion of `getargs.h'.
7509 * src/Makefile.am (noinst_HEADERS): Adjust.
7510
7511 * tests/calc.m4 (yyin): Be initialized in main, not on the global
7512 scope.
7513 (yyerror): Returns void, not int.
7514 * doc/bison.texinfo: Formatting changes.
7515
7516 2000-09-19 Akim Demaille <akim@epita.fr>
7517
7518 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
7519 portable.
7520
7521 2000-09-18 Akim Demaille <akim@epita.fr>
7522
7523 * configure.in: Append WARNING_CFLAGS to CFLAGS.
7524 * src/Makefile.am (INCLUDES): Don't.
7525 Be ready to fetch headers in lib/.
7526
7527 2000-09-18 Akim Demaille <akim@epita.fr>
7528
7529 * doc/bison.texinfo: Update the copyright.
7530 ANSIfy and GNUify the examples.
7531 Remove the old menu.
7532
7533 2000-09-18 Akim Demaille <akim@epita.fr>
7534
7535 First set of tests: use the `calc' example from the documentation.
7536
7537 * src/bison.s1 (yyparse): Condition the code using `yytname' which
7538 is defined only when YYDEBUG is.
7539 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
7540 * src/files.c (tryopen, tryclose): Formatting changes.
7541 Move to the top and be static.
7542 * src/reader.c (read_signed_integer): Likewise.
7543 * tests/calc.m4: New file.
7544 * Makefile.am, suite.m4: Adjust.
7545 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
7546
7547 2000-09-18 Akim Demaille <akim@epita.fr>
7548
7549 Add support for an Autotest test suite for Bison.
7550
7551 * m4/m4.m4, m4/atconfig.m4: New files.
7552 * m4/Makefile.am (EXTRA_DIST): Adjust.
7553 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
7554 files.
7555 * src/getargs.c: Display a more standard --version message.
7556 * src/reader.c (reader): Formatting changes.
7557 No longer depend upon VERSION_STRING.
7558 * configure.in: No longer use `dnl'.
7559 Set up the test suite and the new directory `tests/.
7560 (VERSION_STRING): Remove.
7561
7562 2000-04-14 Akim Demaille <akim@epita.fr>
7563
7564 * src/reader.c (copy_comment2): New function, same as former
7565 `copy_comment', but outputs into two FILE *.
7566 (copy_comment): Use it.
7567 (parse_union_decl): Use it.
7568 (get_type, parse_start_decl): Use the same `invalid' message.
7569 (parse_start_decl, parse_union_decl): Use the same `multiple'
7570 message.
7571 (parse_union_decl, copy_guard, copy_action): Use the same
7572 `unmatched' message.
7573 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
7574
7575 2000-03-31 Akim Demaille <akim@epita.fr>
7576
7577 * src/files.c (tryopen, tryclose): Move to the top.
7578 Be static.
7579
7580 2000-03-31 Akim Demaille <akim@epita.fr>
7581
7582 * src/main.c (main): Don't call `done', exit does it.
7583
7584 2000-03-31 Akim Demaille <akim@epita.fr>
7585
7586 * allocate.c: s/return (foo)/return foo/.
7587 * lalr.c: Likewise.
7588 * LR0.c: Likewise.
7589 * output.c: Likewise.
7590 * reader.c: Likewise.
7591 * symtab.c: Likewise.
7592 * vmsgetargs.c: Likewise.
7593
7594 2000-03-31 Akim Demaille <akim@epita.fr>
7595
7596 Clean up the error reporting functions.
7597
7598 * src/report.c: New file.
7599 * src/report.h: Likewise.
7600 * src/Makefile.am: Adjust.
7601 * m4/error.m4: New file.
7602 * m4/Makefile.am: Adjust.
7603 * configure.in (jm_PREREQ_ERROR): Call it.
7604 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
7605 Remove.
7606 (fatal, fatals): Remove. All callers use complain.c::fatal.
7607 (warn, warni, warns, warnss, warnss): Remove. All callers use
7608 complain.c::complain.
7609 (toomany): Remove, use fatal instead.
7610 * src/files.c (done): No argument, use complain_message_count.
7611 * src/main.c (main): Register `done' to `atexit'.
7612
7613 * src/getargs.c (usage): More `fputs', less `fprintf'.
7614
7615 2000-03-28 Akim Demaille <akim@epita.fr>
7616
7617 * lib/: New directory.
7618 * Makefile.am (SUBDIRS): Adjust.
7619 * configure.in: Adjust.
7620 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
7621 useless.
7622 * src/alloca.c: Moved to lib/.
7623 * src/getopt.c: Likewise.
7624 * src/getopt1.c: Likewise.
7625 * src/getopt.h: Likewise.
7626 * src/ansi2knr.c: Likewise.
7627 * src/ansi2knr.1: Likewise.
7628 * src/Makefile.am: Adjust.
7629 * lib/Makefile.am: New file.
7630
7631 2000-03-28 Akim Demaille <akim@epita.fr>
7632
7633 * src/getargs.c (usage): Refresh the help message.
7634
7635 2000-03-17 Akim Demaille <akim@epita.fr>
7636
7637 * src/getopt1.c: Updated from textutils 2.0e
7638 * src/getopt.c: Likewise.
7639 * src/getopt.h: Likewise.
7640
7641 2000-03-17 Akim Demaille <akim@epita.fr>
7642
7643 * src/Makefile.am (bison.simple): Fix the awk program: quote only
7644 the file name, not the whole `#line LINE FILE'.
7645
7646 2000-03-17 Akim Demaille <akim@epita.fr>
7647
7648 On syntax errors, report the token on which we choked.
7649
7650 * src/bison.s1 (yyparse): In the label yyerrlab, when
7651 YYERROR_VERBOSE, add yychar in msg.
7652
7653 2000-03-17 Akim Demaille <akim@epita.fr>
7654
7655 * src/reader.c (copy_at): New function.
7656 (copy_guard): Use it.
7657 (copy_action): Use it.
7658
7659 2000-03-17 Akim Demaille <akim@epita.fr>
7660
7661 Be kind to translators, save some useless translations.
7662
7663 * src/main.c (banner): New function.
7664 (fatal_banner): Use it.
7665 (warn_banner): Use it.
7666
7667 2000-03-17 Akim Demaille <akim@epita.fr>
7668
7669 * src/reader.c (copy_definition): Use copy_string and
7670 copy_comment. Removed now unused `match', `ended',
7671 `cplus_comment'.
7672 (copy_comment, copy_string): Moved, to be visible from
7673 copy_definition.
7674
7675 2000-03-17 Akim Demaille <akim@epita.fr>
7676
7677 * src/reader.c (copy_string): Declare `static inline'. No
7678 problems with inline, since it is checked by configure.
7679 (copy_comment): Likewise.
7680
7681 2000-03-17 Akim Demaille <akim@epita.fr>
7682
7683 * src/reader.c (packsymbols): Formatting changes.
7684
7685 2000-03-17 Akim Demaille <akim@epita.fr>
7686
7687 * src/reader.c (copy_comment): New function, factored out from:
7688 (copy_action): Use it. Removed now unused `match', `ended',
7689 `cplus_comment'.
7690 (copy_guard): Likewise.
7691
7692 2000-03-17 Akim Demaille <akim@epita.fr>
7693
7694 * src/reader.c (copy_string): New function, factored out from:
7695 (copy_action): Use it.
7696 (copy_guard): Likewise.
7697
7698 2000-03-17 Akim Demaille <akim@epita.fr>
7699
7700 Change the handling of @s so that they behave exactly like $s.
7701 There is now a pseudo variable @$ (readble and writable), location
7702 of the lhs of the rule (by default ranging from the location of
7703 the first symbol of the rhs, to the location of the last symbol,
7704 or, if the rhs is empty, YYLLOC).
7705
7706 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
7707 yyval.
7708 (yyparse): When providing a default semantic action, provide a
7709 default location action.
7710 (after the $): No longer change `*YYLSP', just stack YYLOC the
7711 same way you stack YYVAL.
7712 * src/reader.c (read_declarations): Use warns.
7713 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
7714 (copy_action, case '@'): Likewise.
7715 Use a standard error message, to save useless work from
7716 translators.
7717
7718 2000-03-17 Akim Demaille <akim@epita.fr>
7719
7720 * src/bison.s1: Formatting and cosmetics changes.
7721 * src/reader.c: Likewise.
7722 Update the Copyright notice.
7723
7724 2000-03-17 Akim Demaille <akim@epita.fr>
7725
7726 * src/bison.s1 (#line): All set to `#line' only, since the
7727 Makefile now handles them.
7728
7729 2000-03-16 Akim Demaille <akim@epita.fr>
7730
7731 * src/output.c (output_rule_data): Output the documentation of
7732 some of the tables.
7733 (Copyright notice): Update.
7734 Formatting changes.
7735
7736 2000-03-16 Akim Demaille <akim@epita.fr>
7737
7738 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
7739 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
7740 One `#if YYDEBUG' remains, since it uses variables which are
7741 defined only if `YYDEBUG != 0'.
7742
7743 2000-03-16 Akim Demaille <akim@epita.fr>
7744
7745 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
7746 and related variables so that the similarities are highlighted.
7747
7748 2000-03-16 Akim Demaille <akim@epita.fr>
7749
7750 * src/bison.s1: Properly indent CPP directives.
7751
7752 2000-03-16 Akim Demaille <akim@epita.fr>
7753
7754 * src/bison.s1: Properly indent the `alloca' CPP section.
7755
7756 2000-03-16 Akim Demaille <akim@epita.fr>
7757
7758 Do not hard code values of directories in `configure.in'.
7759 Update the `configure' tool chain.
7760
7761 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
7762 src/makefile.am.
7763 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
7764 (AC_OUTPUT): Add m4/Makefile.
7765 Bump to bison 1.28a, 1.29 has never been released.
7766 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
7767 handled via src/Makefile.am.
7768 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
7769 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
7770 autoheader.
7771 * Makefile.am (SUBDIRS): Add m4.
7772 (ACLOCAL_AM_FLAGS): New variable.
7773 (AUTOMAKE_OPTIONS): Add check-news.
7774 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
7775 the proper line number and file name.
7776 (DEFS): Propagate the location of bison library files and of the
7777 locale files.
7778 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
7779 builddir.
7780 * acinclude.m4: Remove, replaced by the directory m4.
7781 * m4/Makefile.am (EXTRA_DIST): New variable.
7782 * m4/gettext.m4: New file, from the fileutils.
7783 * m4/lcmessage.m4: Likewise
7784 * m4/progtest.m4: Likewise.
7785 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
7786
7787 2000-03-10 Akim Demaille <akim@epita.fr>
7788
7789 * src/closure.c:
7790 Formatting changes of various comments.
7791 Respect the GNU coding standards at various places.
7792 Don't use `_()' when no translation is needed.
7793
7794 1999-12-13 Jesse Thilo <jthilo@gnu.org>
7795
7796 * src/files.c:
7797 OS/2 honors TMPDIR environment variable.
7798
7799 1999-12-13 Jesse Thilo <jthilo@gnu.org>
7800
7801 * doc/bison.texinfo: Tweaked spelling and grammar.
7802 Updated ISBN.
7803 Removed reference to price of printed copy.
7804 Mention BISON_SIMPLE and BISON_HAIRY.
7805
7806 1999-12-13 Jesse Thilo <jthilo@gnu.org>
7807
7808 * configure.in, NEWS:
7809 Bison 1.29 released.
7810
7811 1999-10-27 Jesse Thilo <jthilo@gnu.org>
7812
7813 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
7814 Added reference card.
7815
7816 1999-07-26 Jesse Thilo <jthilo@gnu.org>
7817
7818 * po/ru.po: Added Russian translation.
7819
7820 1999-07-26 Jesse Thilo <jthilo@gnu.org>
7821
7822 * configure.in: Added Russian translation.
7823
7824 1999-07-06 Jesse Thilo <jthilo@gnu.org>
7825
7826 * configure.in, NEWS, README:
7827 Released version 1.28.
7828
7829 1999-06-14 Jesse Thilo <jthilo@gnu.org>
7830
7831 * src/system.h:
7832 Squashed redefinition warning on some systems.
7833
7834 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
7835 Have configure build version string instead of relying on ANSI string
7836 concatentation.
7837
7838 1999-06-14 Jesse Thilo <jthilo@gnu.org>
7839
7840 * po/POTFILES.in: Got rid of version.c.
7841
7842 1999-06-14 Jesse Thilo <jthilo@gnu.org>
7843
7844 * acconfig.h, configure.in:
7845 Have configure build version string instead of relying on ANSI string
7846 concatentation.
7847
7848 1999-06-08 Jesse Thilo <jthilo@gnu.org>
7849
7850 * doc/bison.1:
7851 Dropped mention of `+' for long-named options.
7852
7853 1999-05-30 Jesse Thilo <jthilo@gnu.org>
7854
7855 * src/files.c: Added <unistd.h> for unlink().
7856
7857 * src/Makefile.am, src/system.h:
7858 I18n fixes.
7859
7860 1999-05-30 Jesse Thilo <jthilo@gnu.org>
7861
7862 * README: Added a FAQ list.
7863
7864 * configure.in, acconfig.h:
7865 I18n fixes.
7866
7867 1999-05-30 Jesse Thilo <jthilo@gnu.org>
7868
7869 * doc/FAQ, doc/Makefile.am:
7870 Added a FAQ list.
7871
7872 1999-05-19 Jesse Thilo <jthilo@gnu.org>
7873
7874 * src/alloc.h, src/symtab.h, src/version.c:
7875 Protected inclusion of "config.h" with HAVE_CONFIG_H.
7876
7877 1999-04-18 Jesse Thilo <jthilo@gnu.org>
7878
7879 * src/.cvsignore, src/Makefile.am:
7880 Reorganized: sources in `src', documentation in `doc'.
7881
7882 * src/lex.c (literalchar):
7883 fixed the code for escaping double quotes (thanks
7884 Jonathan Czisny.)
7885
7886 1999-04-18 Jesse Thilo <jthilo@gnu.org>
7887
7888 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
7889 Adjusted paths to reflect directory reorganization.
7890
7891 1999-04-18 Jesse Thilo <jthilo@gnu.org>
7892
7893 * doc/.cvsignore, doc/Makefile.am:
7894 Reorganized: sources in `src', documentation in `doc'.
7895
7896 1999-04-18 Jesse Thilo <jthilo@gnu.org>
7897
7898 * configure.in:
7899 Updated AC_INIT file to reflect directory reorganization.
7900
7901 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
7902 Reorganized: sources in `src', documentation in `doc'.
7903
7904 1999-04-13 Jesse Thilo <jthilo@gnu.org>
7905
7906 * src/allocate.c:
7907 Don't declare calloc() and realloc() if not necessary.
7908
7909 1999-04-13 Jesse Thilo <jthilo@gnu.org>
7910
7911 * configure.in, acconfig.h, acinclude.m4:
7912 Don't declare calloc() and realloc() if not necessary.
7913
7914 1999-03-23 Jesse Thilo <jthilo@gnu.org>
7915
7916 * po/.cvsignore: Added i18n support.
7917
7918 1999-03-23 Jesse Thilo <jthilo@gnu.org>
7919
7920 * acconfig.h, configure.in, Makefile.am:
7921 Added i18n support.
7922
7923 1999-03-22 Jesse Thilo <jthilo@gnu.org>
7924
7925 * src/bison.s1: Fixed #line numbers.
7926
7927 1999-03-15 Jesse Thilo <jthilo@gnu.org>
7928
7929 * po/es.po, po/fr.po, po/nl.po, po/de.po:
7930 Added PO files from Translation Project.
7931
7932 1999-03-03 Jesse Thilo <jthilo@gnu.org>
7933
7934 * Makefile.am:
7935 Added support for non-ANSI compilers (ansi2knr).
7936
7937 1999-02-16 Jesse Thilo <jthilo@gnu.org>
7938
7939 * configure.in: Bumped version number to 1.27.
7940
7941 * Makefile.am:
7942 Added `bison.simple' to list of files removed by `make distclean'.
7943
7944 1999-02-12 Jesse Thilo <jthilo@gnu.org>
7945
7946 * src/files.c, src/files.h:
7947 Defined locations of parser files in config.h instead of Makefile.
7948
7949 1999-02-12 Jesse Thilo <jthilo@gnu.org>
7950
7951 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
7952 Defined locations of parser files in config.h instead of Makefile.
7953
7954 1999-02-09 Jesse Thilo <jthilo@gnu.org>
7955
7956 * Makefile.am:
7957 Removed inappropriate use of $< macro.
7958
7959 1999-02-05 Jesse Thilo <jthilo@gnu.org>
7960
7961 * po/Makefile.in.in, po/POTFILES.in:
7962 Add `po' directory skeleton.
7963
7964 1999-01-27 Jesse Thilo <jthilo@gnu.org>
7965
7966 * README: Document help-bison list.
7967
7968 * configure.in: Add check for mkstemp().
7969
7970 1999-01-20 Jesse Thilo <jthilo@gnu.org>
7971
7972 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
7973 Hush a few compiler warnings.
7974
7975 * src/files.c:
7976 Add tryclose(), which verifies that fclose was successful.
7977 Hush a couple of compiler warnings.
7978
7979 1999-01-20 Jesse Thilo <jthilo@gnu.org>
7980
7981 * Makefile.am, OChangeLog:
7982 ChangeLog is now automatically generated. Include the old version as
7983 OChangeLog.
7984
7985 1999-01-14 Jesse Thilo <jthilo@gnu.org>
7986
7987 * src/gram.h, src/lalr.c, src/lex.c, src/lex.h, src/machine.h, src/main.c, src/nullable.c, src/output.c, src/print.c, src/reader.c, src/reduce.c, src/state.h, src/symtab.c, src/symtab.h, src/types.h, src/vmsgetargs.c, src/warshall.c, src/allocate.c, src/alloc.h, src/bison.s1, src/closure.c, src/conflicts.c, src/derives.c, src/files.c, src/files.h, src/getargs.c, src/gram.c, src/LR0.c:
7988 Update FSF address.
7989
7990 1999-01-14 Jesse Thilo <jthilo@gnu.org>
7991
7992 * doc/bison.texinfo: Fix formatting glitch.
7993
7994 * doc/bison.texinfo: Update FSF address.
7995
7996 1999-01-14 Jesse Thilo <jthilo@gnu.org>
7997
7998 * acconfig.h: Update FSF address.
7999
8000 1999-01-08 Jesse Thilo <jthilo@gnu.org>
8001
8002 * src/system.h:
8003 Don't define PACKAGE here, since config.h defines it.
8004
8005 1998-12-30 Jesse Thilo <jthilo@gnu.org>
8006
8007 * src/reader.c: Update copyright date.
8008
8009 * src/main.c:
8010 Ditch sprintf to statically-sized buffers in fatal/warn functions in
8011 favor of output directly to stderr (avoids buffer overruns).
8012
8013 * src/reader.c: Some checks for premature EOF.
8014
8015 * src/allocate.c, src/alloc.h, src/closure.c, src/conflicts.c, src/derives.c, src/getargs.c, src/gram.c, src/lalr.c, src/lex.c, src/LR0.c, src/main.c, src/nullable.c, src/output.c, src/print.c, src/reduce.c, src/symtab.c, src/symtab.h, src/warshall.c:
8016 Use prototypes if the compiler understands them.
8017
8018 * src/files.c: Honor TMPDIR on Unix hosts.
8019 Use prototypes if the compiler understands them.
8020
8021 * src/reader.c:
8022 Fix a couple of buffer overrun bugs.
8023 Use prototypes if the compiler understands them.
8024
8025 * src/system.h: Include unistd.h and ctype.h.
8026 Use #ifdef instead of #if for NLS symbols.
8027
8028 1998-12-30 Jesse Thilo <jthilo@gnu.org>
8029
8030 * doc/bison.texinfo:
8031 Delete comment "consider using @set for edition number, etc..." since
8032 we now are doing so.
8033
8034 1998-12-30 Jesse Thilo <jthilo@gnu.org>
8035
8036 * configure.in:
8037 Use prototypes if the compiler understands them.
8038
8039 * NEWS: Document 1.26 highlights.
8040
8041 * Makefile.am: Require Automake 1.3 or later.
8042
8043 * acconfig.h:
8044 Use prototypes if the compiler understands them.
8045
8046 1998-12-29 Jesse Thilo <jthilo@gnu.org>
8047
8048 * src/version.c:
8049 Use VERSION symbol from automake for version number.
8050
8051 1998-12-29 Jesse Thilo <jthilo@gnu.org>
8052
8053 * acconfig.h, configure.in, version.cin:
8054 Use VERSION symbol from automake for version number.
8055
8056 1998-11-28 Jesse Thilo <jthilo@gnu.org>
8057
8058 * Makefile.am:
8059 Distribute original version of simple parser (bison.s1), not built
8060 version (bison.simple).
8061
8062 1998-11-28 Jesse Thilo <jthilo@gnu.org>
8063
8064 * doc/bison.texinfo: Add info dir entry.
8065
8066 * doc/bison.texinfo:
8067 Let automake put version number into documentation.
8068
8069 1998-11-26 Jesse Thilo <jthilo@gnu.org>
8070
8071 * src/bison.cld, src/build.com, src/vmshlp.mar:
8072 Add non-RCS files from /gd/gnu/bison.
8073
8074 1998-11-26 Jesse Thilo <jthilo@gnu.org>
8075
8076 * doc/bison.1:
8077 Document the BISON_HAIRY and BISON_SIMPLE variables.
8078
8079 1998-11-25 Jesse Thilo <jthilo@gnu.org>
8080
8081 * src/version.c: Build version.c automatically.
8082
8083 * src/reader.c:
8084 Fix token numbering (used to start at 258, not 257).
8085
8086 * src/system.h: Include config.h.
8087
8088 * src/getargs.c: Update bug report address.
8089
8090 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
8091 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
8092
8093 1998-11-25 Jesse Thilo <jthilo@gnu.org>
8094
8095 * Makefile.am:
8096 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
8097
8098 * configure.in, version.cin:
8099 Build version.c automatically.
8100
8101 * AUTHORS: Add AUTHORS file.
8102
8103 * README: Update bug report address.
8104
8105 * bison.simple:
8106 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
8107
8108 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
8109 Add automake stuff.
8110
8111 1998-11-25 Jesse Thilo <jthilo@gnu.org>
8112
8113 * doc/bison.texinfo: Clean up some formatting.
8114
8115 1998-05-05 Richard Stallman <rms@gnu.org>
8116
8117 * doc/bison.texinfo:
8118 Explain better why to make a pure parser.
8119
8120 1998-01-05 Richard Stallman <rms@gnu.org>
8121
8122 * src/files.c (openfiles):
8123 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
8124 find a temporary directory, if possible. Do not unlink files while
8125 they are open.
8126
8127 1997-08-25 Richard Stallman <rms@gnu.org>
8128
8129 * src/reader.c (stack_offset;):
8130 Change some warni to warns.
8131
8132 * src/lex.c (literalchar): Use warns, not warni.
8133
8134 1997-06-28 Richard Stallman <rms@gnu.org>
8135
8136 * src/bison.s1: Add a Bison version comment.
8137
8138 * src/main.c (fatal, warn, berror):
8139 Use program_name.
8140
8141 1997-06-28 Richard Stallman <rms@gnu.org>
8142
8143 * Makefile.in (bison_version): New variable.
8144 (dist): Use that variable.
8145 (bison.s1): Substitute the Bison version into bison.simple.
8146
8147 * bison.simple: Add a Bison version comment.
8148
8149 1997-06-18 Richard Stallman <rms@gnu.org>
8150
8151 * src/main.c (fatal, warn, berror):
8152 Make error messages standard.
8153 (toomany): Improve error message text.
8154
8155 * src/LR0.c, src/closure.c, src/conflicts.c, src/derives.c, src/files.c, src/lalr.c, src/lex.c, src/nullable.c, src/output.c, src/print.c, src/reader.c, src/reduce.c, src/symtab.c:
8156 new.h renamed to alloc.h.
8157
8158 1997-06-18 Richard Stallman <rms@gnu.org>
8159
8160 * Makefile.in: new.h renamed to alloc.h.
8161
8162 1997-05-24 Richard Stallman <rms@gnu.org>
8163
8164 * src/lex.c (literalchar):
8165 Fix the code for escaping \, " and '.
8166
8167 (lex): Avoid trouble when there are many chars
8168 to discard in a char literal with just several chars in it.
8169
8170 1997-05-17 Richard Stallman <rms@gnu.org>
8171
8172 * src/bison.s1:
8173 Use malloc, if using alloca is troublesome.
8174 (YYSTACK_USE_ALLOCA): New flag macro.
8175 Define it for some systems and compilers.
8176 (YYSTACK_ALLOC): New macro.
8177 (yyparse): Use YYSTACK_ALLOC to allocate stack.
8178 If it was malloc'd, free it.
8179
8180 1997-05-17 Richard Stallman <rms@gnu.org>
8181
8182 * bison.simple:
8183 Use malloc, if using alloca is troublesome.
8184 (YYSTACK_USE_ALLOCA): New flag macro.
8185 Define it for some systems and compilers.
8186 (YYSTACK_ALLOC): New macro.
8187 (yyparse): Use YYSTACK_ALLOC to allocate stack.
8188 If it was malloc'd, free it.
8189
8190 1997-04-23 Richard Stallman <rms@gnu.org>
8191
8192 * src/bison.s1:
8193 (alloca) [__hpux]: Always define as __builtin_alloca.
8194
8195 1997-04-23 Richard Stallman <rms@gnu.org>
8196
8197 * bison.simple:
8198 (alloca) [__hpux]: Always define as __builtin_alloca.
8199
8200 1997-04-22 Richard Stallman <rms@gnu.org>
8201
8202 * src/bison.s1:
8203 [__hpux]: Include alloca.h (right for HPUX 10)
8204 instead of declaring alloca (right for HPUX 9).
8205
8206 * src/bison.s1 (__yy_memcpy):
8207 Declare arg `count' as unsigned int.
8208 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
8209
8210 1997-04-22 Richard Stallman <rms@gnu.org>
8211
8212 * bison.simple:
8213 [__hpux]: Include alloca.h (right for HPUX 10)
8214 instead of declaring alloca (right for HPUX 9).
8215
8216 * bison.simple (__yy_memcpy):
8217 Declare arg `count' as unsigned int.
8218 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
8219
8220 1997-01-03 Richard Stallman <rms@gnu.org>
8221
8222 * src/allocate.c: [__STDC__ or _MSC_VER]:
8223 Declare calloc and realloc to return void *.
8224
8225 1997-01-02 Richard Stallman <rms@gnu.org>
8226
8227 * src/system.h:
8228 [_MSC_VER]: Include stdlib.h and process.h.
8229 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
8230
8231 * src/main.c (main): Return FAILURE as a value.
8232 (printable_version): Declare arg as int, not char.
8233
8234 1997-01-02 Richard Stallman <rms@gnu.org>
8235
8236 * Makefile.in (dist):
8237 Explicitly check for symlinks, and copy them.
8238
8239 1996-12-19 Richard Stallman <rms@gnu.org>
8240
8241 * src/files.c:
8242 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
8243
8244 1996-12-18 Paul Eggert <eggert@gnu.org>
8245
8246 * src/bison.s1 (yyparse):
8247 If __GNUC__ and YYPARSE_PARAM are both defined,
8248 declare yyparse to have a void * argument.
8249
8250 1996-12-18 Paul Eggert <eggert@gnu.org>
8251
8252 * bison.simple (yyparse):
8253 If __GNUC__ and YYPARSE_PARAM are both defined,
8254 declare yyparse to have a void * argument.
8255
8256 1996-12-17 Richard Stallman <rms@gnu.org>
8257
8258 * src/reduce.c (nbits): Add some casts.
8259
8260 1996-08-12 Richard Stallman <rms@gnu.org>
8261
8262 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
8263
8264 1996-08-12 Richard Stallman <rms@gnu.org>
8265
8266 * bison.simple: Test _MSDOS as well as _MSDOS_.
8267
8268 1996-07-31 Richard Stallman <rms@gnu.org>
8269
8270 * src/bison.s1:
8271 [__sun && __i386]: Include alloca.h.
8272
8273 1996-07-31 Richard Stallman <rms@gnu.org>
8274
8275 * bison.simple:
8276 [__sun && __i386]: Include alloca.h.
8277
8278 1996-07-30 Richard Stallman <rms@gnu.org>
8279
8280 * src/bison.s1: Comment change.
8281
8282 * src/bison.s1: Test _MSDOS_, not MSDOS.
8283
8284 1996-07-30 Richard Stallman <rms@gnu.org>
8285
8286 * bison.simple: Comment change.
8287
8288 * bison.simple: Test _MSDOS_, not MSDOS.
8289
8290 1996-06-01 Richard Stallman <rms@gnu.org>
8291
8292 * src/reduce.c, src/reader.c, src/print.c, src/output.c, src/nullable.c, src/lex.c, src/lalr.c, src/getargs.c, src/derives.c, src/conflicts.c, src/closure.c, src/allocate.c:
8293 Insert `_' macro around many string constants.
8294
8295 * src/main.c:
8296 Insert `_' macro around many string constants.
8297
8298 (main): Call setlocale, bindtextdomain and textdomain.
8299
8300 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
8301 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
8302 [ENABLE_NLS]: Include libintl.h.
8303 [ENABLE_NLS] (gettext): Define.
8304 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
8305 (N_, PACKAGE, LOCALEDIR): New macros.
8306
8307 1996-06-01 Richard Stallman <rms@gnu.org>
8308
8309 * POTFILES.in: New file.
8310
8311 * Makefile.in (allocate.o):
8312 Define target explicitly.
8313
8314 * Makefile.in (CFLAGS): Set to @CFLAGS@.
8315 (LDFLAGS): Set to @LDFLAGS@.
8316 (configure): Run autoconf only if preceding `cd' succeeds.
8317 (bison.s1): Redirect output to temporary file then move the
8318 temporary to the target, rather than redirecting directly to bison.s1.
8319 (clean): Remove config.status and config.log.
8320 (distclean): Don't remove config.status here.
8321
8322 1996-05-12 Richard Stallman <rms@gnu.org>
8323
8324 * src/bison.s1:
8325 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
8326
8327 1996-05-12 Richard Stallman <rms@gnu.org>
8328
8329 * bison.simple:
8330 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
8331
8332 1996-05-11 Richard Stallman <rms@gnu.org>
8333
8334 * src/bison.s1 (__yy_memcpy):
8335 Really reorder the args, as was supposedly done on Feb 14 1995.
8336 (yyparse): Calls changed accordingly.
8337
8338 1996-05-11 Richard Stallman <rms@gnu.org>
8339
8340 * Makefile.in (dist): Don't use $(srcdir).
8341
8342 * bison.simple (__yy_memcpy):
8343 Really reorder the args, as was supposedly done on Feb 14 1995.
8344 (yyparse): Calls changed accordingly.
8345
8346 1996-01-27 Richard Stallman <rms@gnu.org>
8347
8348 * src/output.c (output_rule_data):
8349 Test YYERROR_VERBOSE in the conditional
8350 around the definition of ttyname.
8351
8352 1995-12-29 Richard Stallman <rms@gnu.org>
8353
8354 * src/bison.s1:
8355 Fix line numbers in #line commands.
8356
8357 1995-12-29 Richard Stallman <rms@gnu.org>
8358
8359 * bison.simple:
8360 Fix line numbers in #line commands.
8361
8362 1995-12-27 Richard Stallman <rms@gnu.org>
8363
8364 * src/bison.s1 (YYPARSE_PARAM_DECL):
8365 In C++, make it always null.
8366 (YYPARSE_PARAM_ARG): New macro.
8367 (yyparse): Use YYPARSE_PARAM_ARG.
8368
8369 1995-12-27 Richard Stallman <rms@gnu.org>
8370
8371 * bison.simple (YYPARSE_PARAM_DECL):
8372 In C++, make it always null.
8373 (YYPARSE_PARAM_ARG): New macro.
8374 (yyparse): Use YYPARSE_PARAM_ARG.
8375
8376 1995-11-29 Richard Stallman <rms@gnu.org>
8377
8378 * doc/bison.texinfo:
8379 Describe literal string tokens, %raw, %no_lines, %token_table.
8380
8381 1995-11-29 Daniel Hagerty <hag@gnu.org>
8382
8383 * doc/bison.texinfo: Fixed update date
8384
8385 1995-10-16 Richard Stallman <rms@gnu.org>
8386
8387 * src/version.c: Version 1.25.
8388
8389 1995-10-16 Richard Stallman <rms@gnu.org>
8390
8391 * NEWS: *** empty log message ***
8392
8393 1995-10-16 Richard Stallman <rms@gnu.org>
8394
8395 * doc/bison.1, doc/bison.rnh:
8396 Add new options.
8397
8398 1995-10-15 Richard Stallman <rms@gnu.org>
8399
8400 * src/vmsgetargs.c, src/getargs.c:
8401 Added -n, -k, and -raw switches.
8402 (noparserflag, toknumflag, rawtoknumflag): New variables.
8403
8404 * src/symtab.h (SALIAS):
8405 New #define for adding aliases to %token.
8406 (struct bucket): Added `alias' field.
8407
8408 * src/reduce.c (reduce_grammar):
8409 Revise error message.
8410 (print_notices): Remove final `.' from error message.
8411
8412 * src/reader.c (reader_output_yylsp):
8413 New function.
8414 (readgram): Use `#if 0' around code that accepted %command
8415 inside grammar rules: The documentation doesn't allow it,
8416 and it will fail since the %command processors scan for the next %.
8417 (parse_token_decl): Extended the %token
8418 declaration to allow a multi-character symbol as an alias.
8419 (parse_thong_decl): New function.
8420 (read_declarations): Added %thong declarations.
8421 (read_declarations): Handle NOOP to deal with allowing
8422 % declarations as another means to specify the flags.
8423 (readgram): Allow %prec prior to semantics embedded in a rule.
8424 (skip_to_char, read_declarations, copy_definition)
8425 (parse_token_decl, parse_start_decl, parse_type_decl)
8426 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
8427 (get_type_name, copy_guard, copy_action, readgram)
8428 (get_type, packsymbols): Revised most error messages.
8429 Changed `fatal' to `warnxxx' to avoid aborting for error.
8430 Revised and use multiple warnxxx functions to avoid using VARARGS1.
8431 (read_declarations): Improve the error message for
8432 an invalid character. Do not abort.
8433 (read_declarations, copy_guard, copy_action): Use
8434 printable_version to avoid unprintable characters in printed output.
8435 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
8436 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
8437 Allow the type of a non-terminal can be given
8438 more than once, as long as all specifications give the same type.
8439
8440 * src/output.c:
8441 (output_headers, output_trailers, output, output_gram)
8442 (output_rule_data): Implement noparserflag variable.
8443 Implement toknumflag variable.
8444 (output): Call reader_output_yylsp to output LTYPESTR.
8445
8446 * src/main.c (main):
8447 If reader sees an error, don't process the grammar.
8448 (fatals): Updated to not use VARARGS1.
8449 (printable_version, int_to_string, warn, warni, warns, warnss)
8450 (warnsss): New error reporting functions. Avoid abort for error.
8451
8452 * src/lex.h:
8453 Added THONG and NOOP for alias processing.
8454 Added SETOPT for the new code that allows setting options with %flags.
8455
8456 * src/lex.c:
8457 Include getopt.h. Add some extern decls.
8458 (safegetc): New function to deal with EOF gracefully.
8459 (literalchar); new function to deal with reading \ escapes.
8460 (lex): Use literalchar.
8461 (lex): Implemented "..." tokens.
8462 (literalchar, lex, parse_percent_token): Made tokenbuffer
8463 always contain the token. This includes growing the token
8464 buffer while reading an integer.
8465 (parse_percent_token): Replaced if-else statement with percent_table.
8466 (parse_percent_token): Added % declarations as another
8467 way to specify the flags -n, -l, and -r. Also added hooks for
8468 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
8469 major changes to files.c.
8470 (lex) Retain in the incoming stream a character following
8471 an incorrect '/'.
8472 (skip_white_space, lex): Revised most error messages
8473 and changed fatal to warn to avoid aborting.
8474 (percent_table): Added %thong declarations.
8475
8476 * src/gram.h: Comment changes.
8477
8478 * src/files.c (openfiles, open_extra_files, done):
8479 Add faction flag
8480 and actfile file. Handle noparserflag. Both for -n switch.
8481
8482 * src/conflicts.c (resolve_sr_conflict):
8483 Remove use of alloca.
8484
8485 1995-06-01 Jim Meyering <meyering@gnu.org>
8486
8487 * doc/bison.texinfo: *** empty log message ***
8488
8489 1995-05-06 Richard Stallman <rms@gnu.org>
8490
8491 * src/bison.s1: Comment change.
8492
8493 1995-05-06 Richard Stallman <rms@gnu.org>
8494
8495 * bison.simple: Comment change.
8496
8497 1995-05-03 Richard Stallman <rms@gnu.org>
8498
8499 * src/version.c: Version now 1.24.
8500
8501 * src/bison.s1: Change distribution terms.
8502
8503 * src/version.c: Version now 1.23.
8504
8505 1995-05-03 Richard Stallman <rms@gnu.org>
8506
8507 * doc/bison.texinfo:
8508 Rewrite "Conditions for Using Bison".
8509 Update version to 1.24.
8510
8511 1995-05-03 Richard Stallman <rms@gnu.org>
8512
8513 * bison.simple: Change distribution terms.
8514
8515 1995-02-23 Richard Stallman <rms@gnu.org>
8516
8517 * src/files.c: Test __VMS_POSIX as well as VMS.
8518
8519 1995-02-14 Jim Meyering <meyering@gnu.org>
8520
8521 * src/bison.s1 (__yy_memcpy):
8522 Renamed from __yy_bcopy to avoid
8523 confusion. Reverse FROM and TO arguments to be consistent with
8524 those of memcpy.
8525
8526 1995-02-14 Jim Meyering <meyering@gnu.org>
8527
8528 * bison.simple (__yy_memcpy):
8529 Renamed from __yy_bcopy to avoid
8530 confusion. Reverse FROM and TO arguments to be consistent with
8531 those of memcpy.
8532
8533 1994-11-10 David J. MacKenzie <djm@gnu.org>
8534
8535 * NEWS: reformat
8536
8537 * NEWS: New file.
8538
8539 * Makefile.in (DISTFILES): Include NEWS.
8540
8541 * Makefile.in (DISTFILES):
8542 Include install-sh, not install.sh.
8543
8544 * configure.in: Update to Autoconf v2 macro names.
8545
8546 1994-10-05 David J. MacKenzie <djm@gnu.org>
8547
8548 * Makefile.in: fix typo
8549
8550 * Makefile.in (prefix, exec_prefix):
8551 Let configure set them.
8552
8553 1994-09-28 David J. MacKenzie <djm@gnu.org>
8554
8555 * Makefile.in: Set datadir to $(prefix)/share.
8556
8557 1994-09-15 Richard Stallman <rms@gnu.org>
8558
8559 * src/bison.s1:
8560 Update copyright notice and GPL version.
8561
8562 1994-09-15 Richard Stallman <rms@gnu.org>
8563
8564 * bison.simple:
8565 Update copyright notice and GPL version.
8566
8567 1994-07-12 Richard Stallman <rms@gnu.org>
8568
8569 * src/reduce.c, src/reader.c:
8570 entered into RCS
8571
8572 1994-05-05 David J. MacKenzie <djm@gnu.org>
8573
8574 * Makefile.in: entered into RCS
8575
8576 1994-03-26 Richard Stallman <rms@gnu.org>
8577
8578 * src/bison.s1: entered into RCS
8579
8580 1994-03-26 Richard Stallman <rms@gnu.org>
8581
8582 * bison.simple: entered into RCS
8583
8584 1994-03-25 Richard Stallman <rms@gnu.org>
8585
8586 * src/main.c: entered into RCS
8587
8588 1994-03-24 Richard Stallman <rms@gnu.org>
8589
8590 * src/conflicts.c: entered into RCS
8591
8592 1994-01-02 Richard Stallman <rms@gnu.org>
8593
8594 * Makefile.in: *** empty log message ***
8595
8596 1993-11-21 Richard Stallman <rms@gnu.org>
8597
8598 * src/bison.s1: *** empty log message ***
8599
8600 1993-11-21 Richard Stallman <rms@gnu.org>
8601
8602 * doc/bison.texinfo: entered into RCS
8603
8604 * doc/bison.texinfo: *** empty log message ***
8605
8606 1993-11-21 Richard Stallman <rms@gnu.org>
8607
8608 * bison.simple: *** empty log message ***
8609
8610 1993-10-25 David J. MacKenzie <djm@gnu.org>
8611
8612 * doc/bison.texinfo: *** empty log message ***
8613
8614 1993-10-19 Richard Stallman <rms@gnu.org>
8615
8616 * src/bison.s1: *** empty log message ***
8617
8618 1993-10-19 Richard Stallman <rms@gnu.org>
8619
8620 * bison.simple: *** empty log message ***
8621
8622 1993-10-14 Richard Stallman <rms@gnu.org>
8623
8624 * src/bison.s1: *** empty log message ***
8625
8626 1993-10-14 Richard Stallman <rms@gnu.org>
8627
8628 * bison.simple: *** empty log message ***
8629
8630 1993-09-14 David J. MacKenzie <djm@gnu.org>
8631
8632 * doc/bison.texinfo: *** empty log message ***
8633
8634 1993-09-13 Noah Friedman <friedman@gnu.org>
8635
8636 * Makefile.in: *** empty log message ***
8637
8638 1993-09-10 Richard Stallman <rms@gnu.org>
8639
8640 * src/conflicts.c: *** empty log message ***
8641
8642 * src/system.h: entered into RCS
8643
8644 1993-09-10 Richard Stallman <rms@gnu.org>
8645
8646 * doc/bison.1: entered into RCS
8647
8648 1993-09-06 Noah Friedman <friedman@gnu.org>
8649
8650 * src/version.c: entered into RCS
8651
8652 1993-09-06 Noah Friedman <friedman@gnu.org>
8653
8654 * Makefile.in: *** empty log message ***
8655
8656 1993-07-30 David J. MacKenzie <djm@gnu.org>
8657
8658 * Makefile.in: *** empty log message ***
8659
8660 1993-07-24 Richard Stallman <rms@gnu.org>
8661
8662 * src/bison.s1: *** empty log message ***
8663
8664 1993-07-24 Richard Stallman <rms@gnu.org>
8665
8666 * bison.simple: *** empty log message ***
8667
8668 1993-07-08 David J. MacKenzie <djm@gnu.org>
8669
8670 * Makefile.in: *** empty log message ***
8671
8672 1993-07-04 Richard Stallman <rms@gnu.org>
8673
8674 * src/bison.s1: *** empty log message ***
8675
8676 1993-07-04 Richard Stallman <rms@gnu.org>
8677
8678 * bison.simple: *** empty log message ***
8679
8680 1993-06-26 David J. MacKenzie <djm@gnu.org>
8681
8682 * src/getargs.c: entered into RCS
8683
8684 1993-06-26 David J. MacKenzie <djm@gnu.org>
8685
8686 * doc/bison.texinfo: *** empty log message ***
8687
8688 * doc/bison.1: New file.
8689
8690 1993-06-25 Richard Stallman <rms@gnu.org>
8691
8692 * src/getargs.c: New file.
8693
8694 1993-06-16 Richard Stallman <rms@gnu.org>
8695
8696 * src/bison.s1: *** empty log message ***
8697
8698 1993-06-16 Richard Stallman <rms@gnu.org>
8699
8700 * bison.simple: *** empty log message ***
8701
8702 1993-06-03 Richard Stallman <rms@gnu.org>
8703
8704 * src/bison.s1: New file.
8705
8706 1993-06-03 Richard Stallman <rms@gnu.org>
8707
8708 * doc/bison.texinfo: *** empty log message ***
8709
8710 1993-06-03 Richard Stallman <rms@gnu.org>
8711
8712 * bison.simple: New file.
8713
8714 1993-05-19 Richard Stallman <rms@gnu.org>
8715
8716 * doc/bison.texinfo: New file.
8717
8718 1993-05-07 Noah Friedman <friedman@gnu.org>
8719
8720 * Makefile.in: *** empty log message ***
8721
8722 1993-04-28 Noah Friedman <friedman@gnu.org>
8723
8724 * src/reader.c: *** empty log message ***
8725
8726 1993-04-23 Noah Friedman <friedman@gnu.org>
8727
8728 * src/alloc.h: entered into RCS
8729
8730 1993-04-20 David J. MacKenzie <djm@gnu.org>
8731
8732 * src/version.c: *** empty log message ***
8733
8734 * src/files.c, src/allocate.c:
8735 entered into RCS
8736
8737 * src/reader.c: *** empty log message ***
8738
8739 * src/lex.c: entered into RCS
8740
8741 * src/conflicts.c: New file.
8742
8743 * src/symtab.c: entered into RCS
8744
8745 * src/alloc.h: New file.
8746
8747 * src/LR0.c: entered into RCS
8748
8749 1993-04-18 Noah Friedman <friedman@gnu.org>
8750
8751 * src/reader.c: New file.
8752
8753 * src/version.c: *** empty log message ***
8754
8755 1993-04-18 Noah Friedman <friedman@gnu.org>
8756
8757 * Makefile.in: *** empty log message ***
8758
8759 1993-04-17 Noah Friedman <friedman@gnu.org>
8760
8761 * Makefile.in: *** empty log message ***
8762
8763 1993-04-15 Richard Stallman <rms@gnu.org>
8764
8765 * src/main.c, src/files.c:
8766 New file.
8767
8768 1993-04-15 Noah Friedman <friedman@gnu.org>
8769
8770 * configure.in: entered into RCS
8771
8772 * configure.in: *** empty log message ***
8773
8774 * configure.in: New file.
8775
8776 1993-04-14 Richard Stallman <rms@gnu.org>
8777
8778 * Makefile.in: New file.
8779
8780 1993-04-13 Richard Stallman <rms@gnu.org>
8781
8782 * src/version.c: New file.
8783
8784 1993-03-25 Richard Stallman <rms@gnu.org>
8785
8786 * src/output.c: entered into RCS
8787
8788 1992-09-25 Richard Stallman <rms@gnu.org>
8789
8790 * configure.bat: entered into RCS
8791
8792 1992-06-22 Richard Stallman <rms@gnu.org>
8793
8794 * src/vmsgetargs.c: entered into RCS
8795
8796 1992-06-22 Richard Stallman <rms@gnu.org>
8797
8798 * doc/bison.rnh: entered into RCS
8799
8800 1992-04-20 David J. MacKenzie <djm@gnu.org>
8801
8802 * README: entered into RCS
8803
8804 1992-01-22 Richard Stallman <rms@gnu.org>
8805
8806 * src/machine.h: entered into RCS
8807
8808 1991-12-21 Richard Stallman <rms@gnu.org>
8809
8810 * src/lalr.c, src/closure.c:
8811 entered into RCS
8812
8813 1991-12-20 Richard Stallman <rms@gnu.org>
8814
8815 * src/state.h: entered into RCS
8816
8817 1991-12-18 Richard Stallman <rms@gnu.org>
8818
8819 * src/print.c, src/nullable.c, src/derives.c:
8820 entered into RCS
8821
8822 1991-11-03 David J. MacKenzie <djm@gnu.org>
8823
8824 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
8825 entered into RCS
8826
8827 1988-09-09 Richard Stallman <rms@gnu.org>
8828
8829 * src/bison.hairy: entered into RCS
8830
8831 1987-12-16 Richard Stallman <rms@gnu.org>
8832
8833 * REFERENCES: entered into RCS
8834 -----
8835
8836 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
8837
8838 This file is part of GNU Bison.
8839
8840 GNU Bison is free software; you can redistribute it and/or modify
8841 it under the terms of the GNU General Public License as published by
8842 the Free Software Foundation; either version 2, or (at your option)
8843 any later version.
8844
8845 GNU Bison is distributed in the hope that it will be useful,
8846 but WITHOUT ANY WARRANTY; without even the implied warranty of
8847 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8848 GNU General Public License for more details.
8849
8850 You should have received a copy of the GNU General Public License
8851 along with GNU Bison; see the file COPYING. If not, write to
8852 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
8853 Boston, MA 02111-1307, USA.