]> git.saurik.com Git - bison.git/blame - ChangeLog
Invoke wget with -C off, to disable proxy caches.
[bison.git] / ChangeLog
CommitLineData
1ee6d2a0
PE
12003-01-08 Paul Eggert <eggert@twinsun.com>
2
3 * Makefile.maint (WGETFLAGS):
4 New macro, containing "-C off" to disable proxy caches.
5 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
6 (rel-check): Use $(WGET) instead of wget.
7
d4fd77c4
PE
82003-01-06 Paul Eggert <eggert@twinsun.com>
9
10 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
11 the GLR paper of Scott, Johnstone and Hussain.
12
464c6927
PE
132003-01-04 Paul Eggert <eggert@twinsun.com>
14
d600ee67
PE
15 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
16 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
17 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
18 (EXTRA_LIBRARIES): New var, for liby.a.
19 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
20 (EXTRA_SCRIPTS): New var, for yacc.
21
464c6927
PE
22 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
23 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
24 Problem reported by Nelson H. F. Beebe.
25
262003-01-03 Paul Eggert <eggert@twinsun.com>
27
28 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
29 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
30 when compiling Bison 1.875's `bitset bset = obstack_alloc
31 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
32
33 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
34 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
35 grow to a huge size with typical invocation.
d600ee67 36
464c6927
PE
37 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
38 Use the pattern recommended by Autoconf 2.57, except also protect
39 against double-definition.
40 * src/system.h: Likewise.
41 Portability issues reported by Nelson H. F. Beebe.
d600ee67 42
464c6927
PE
43 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
44 All uses changed. Provide a definition in both C and C++.
45 (yytrue, yyfalse): Define even if defined (__cplusplus).
46
47 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
48 Reported by Nelson H. F. Beebe.
d600ee67 49
464c6927
PE
50 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
51
0f42c7d5
PE
522003-01-02 Paul Eggert <eggert@twinsun.com>
53
54 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
55 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
56 Bug reported by Nelson H. F. Beebe.
57
dc546b0f
PE
582003-01-01 Paul Eggert <eggert@twinsun.com>
59
60 * Version 1.875.
61
2c09b6a7
PE
622002-12-30 Paul Eggert <eggert@twinsun.com>
63
64 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
65 Moved here from...
66 (<INITIAL>","): Here. This causes stray "," to be treated
67 more uniformly.
68
dc546b0f 69 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
2c09b6a7
PE
70 last brace in braced code when not in Yacc mode, for compatibility
71 with Bison 1.35. This resurrects the 2001-12-15 patch to
72 src/reader.c.
73
74 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
75 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
76
535c0f63
PE
772002-12-28 Paul Eggert <eggert@twinsun.com>
78
79 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
80 that of SYM's type. This fixes Debian bug 168069, reported by
81 Thomas Olsson.
d600ee67 82
963fcc17
PE
832002-12-28 Paul Eggert <eggert@twinsun.com>
84
85 Version 1.75f.
86
87 Switch back to the Yacc style of conflict reports, undoing some
88 of the 2002-07-30 change.
89 * doc/bison.texinfo (Understanding): Use Yacc style for
90 conflict reports. Also, use new way of locating rules.
91 * src/conflicts.c (conflict_report):
92 Renamed from conflict_report_yacc, removing the old
93 'conflict_report'. Translate the entire conflict report at once,
94 so that we don't assume that "," has the same interpretation in
95 all languages.
96 (conflicts_output): Use Yacc-style conflict report for each state,
97 instead of our more-complicated style.
98 (conflicts_print): Use Yacc-style conflict report, except print
99 the input file name when not emulating Yacc.
100 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
101 Conflicted Reduction, %expect not enough, %expect too much,
102 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
103 * tests/existing.at (GNU Cim Grammar): Likewise.
104 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
105
106 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
107 fatal): Don't invoke fflush; it's not needed and it might even be
108 harmful for stdout, as stdout might not be open.
109 * src/reduce.c (reduce_print): Likewise.
110
b1efe548
PE
1112002-12-27 Paul Eggert <eggert@twinsun.com>
112
113 Fix a bug where error locations were not being recorded correctly.
114 This problem was originally reported by Paul Hilfinger in
115 <http://mail.gnu.org/pipermail/bug-bison/2002-November/001901.html>.
116
117 * data/yacc.c (yyparse): New local var yylerrsp, to record the
118 top of the location stack's error locations.
119 (yyerrlab): Set it. When discarding a token, push its location
120 onto yylerrsp so that we don't lose track of the error's end.
121 (yyerrlab1): Now is only the target of YYERROR, so that we can
122 properly record the location of the action that failed. For GCC
123 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
124 GCC warning about yyerrlab1 being unused if YYERROR is unused.
125 (yyerrlab2): New label, which yyerrlab now falls through to.
126 Compute the error's location by applying YYLLOC_DEFAULT to
127 the locations of all the symbols that went into the error.
128 * doc/bison.texinfo (Location Default Action): Mention that
129 YYLLOC_DEFAULT is also invoked for syntax errors.
130 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
131 Error locations include the locations of all the tokens that were
132 discarded, not just the last token.
d600ee67 133
983c5c2c
PE
1342002-12-26 Paul Eggert <eggert@twinsun.com>
135
b1efe548
PE
136 * src/files.c: Include quote.h.
137 (compute_output_file_names): Warn if we detect conflicting
138 outputs to the same file. This should catch the misunderstanding
139 exemplified by Debian Bug 165349, reported by Bruce Stephens..
140
141 * src/conflicts.c (conflicts_print): If the user specifies
142 "%expect N", report an error if there are any reduce/reduce
143 conflicts. This is what the manual says should happen.
144 This fixes Debian bug 130890, reported by Anthony DeRobertis.
145 * tests/conflicts.at (%expect with reduce conflicts): New test.
146
983c5c2c
PE
147 Don't use m4_include on relative file names, as it doesn't work as
148 desired if there happens to be a file with that name under ".".
d600ee67 149
983c5c2c
PE
150 * m4sugar/version.m4: Remove; it was included but it wasn't used.
151 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
152 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
153 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
154 * src/output.c (output_skeleton): Use full path names when
155 specifying a file to include; don't rely on include path, as
156 it's unreliable when the working file contains a file with
157 that name.
d600ee67 158
983c5c2c
PE
1592002-12-25 Paul Eggert <eggert@twinsun.com>
160
161 Remove obsolete references to bison.simple and bison.hairy.
162 Problem mentioned by Aubin Mahe in
163 <http://mail.gnu.org/pipermail/help-bison/2002-December/001765.html>.
164 * data/glr.c: Comment fix.
165 * doc/bison.1: Remove references. Also, mention "yacc".
166
167 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
168 with -g option.
169
170 * src/parse-gram.y (declaration): Use enum "report_states" rather
171 than its numeric value 1.
172
173 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
174 opening a new one. This fixes Debian bug 165349, reported by
175 Bruce Stephens.
176
23f2d9dc
PE
1772002-12-24 Paul Eggert <eggert@twinsun.com>
178
179 Version 1.75e.
180
181 * Makefile.maint (cvs-update): Don't assume that the shell
182 supports $(...), as Solaris sh doesn't.
183
184 * src/parse-gram.y (lloc_default): Remove test for empty
185 nonterminals at the end, since it didn't change the result.
186
1872002-12-24 Paul Eggert <eggert@twinsun.com>
33167b8b
PE
188
189 If the user does not define YYSTYPE as a macro, Bison now declares it
190 using typedef instead of defining it as a macro. POSIX requires this.
191 For consistency, YYLTYPE is also declared instead of defined.
192
193 %union directives can now have a tag before the `{', e.g., the
194 directive `%union foo {...}' now generates the C code
195 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
196 The default union tag is `YYSTYPE', for compatibility with Solaris 9
197 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
198 instead of `yyltype'.
199
200 `yystype' and `yyltype' are now obsolescent macros instead of being
201 typedefs or tags; they are no longer documented and will be
202 withdrawn in a future release.
203
204 * data/glr.c (b4_location_type): Remove.
205 (YYSTYPE): Renamed from yystype.
206 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
207 (struct YYLTYPE): Renamed from struct yyltype.
208 (YYLTYPE): Renamed from yyltype.
209 (yyltype, yystype): New (and obsolescent) macros,
210 for backward compatibility.
211 * data/yacc.c: Likewise.
212
213 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
214 does not specify a union tag. This is for compatibility with
215 Solaris 9 yacc.
216
217 * src/parse-gram.y (add_param): 2nd arg is now char * not char
218 const *, since it is now modified by stripping surrounding { }.
219 (current_braced_code): Remove.
220 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
221 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
222 trailing " {...}". Now of type <chars>.
223 (grammar_declaration): Adjust to bundled tokens.
224 (code_content): Remove; stripping is now done by add_param.
225 (print_token_value): Print contents of bundled tokens.
226 (token_name): New function.
227
228 * src/reader.h (braced_code, current_braced_code): Remove.
229 (token_name): New decl.
230
231 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
232 token_type, not braced_code code_kind. All uses changed.
233 (SC_PRE_CODE): New state, for scanning after a keyword that
234 has (or usually has) an immediately-following braced code.
235 (token_type): New local var, to keep track of which token type
236 to return when scanning braced code.
237 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
dc546b0f 238 <INITIAL>"%parse-param", <INITIAL>"%printer",
33167b8b
PE
239 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
240 instead of returning a token type immediately.
241 (<INITIAL>"{"): Set token type.
242 (<SC_BRACED_CODE>"}"): Use it.
243 (handle_action_dollar, handle_action_at): Now returns bool
244 indicating success. Fail if ! current_rule; this prevents a core dump.
245 (handle_symbol_code_dollar, handle_symbol_code_at):
246 Remove; merge body into caller.
247 (handle_dollar, handle_at): Complain in invalid contexts.
248
249 * NEWS, doc/bison.texinfo: Document the above.
250 * NEWS: Fix years and program names in copyright notice.
251
879ca4f8
PE
2522002-12-17 Paul Eggert <eggert@twinsun.com>
253
254 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
255 Reporting, Table of Symbols): Omit mentions of %lex-param and
256 %parse-param from the documentation for now.
257
1c5fe69d
PE
2582002-12-15 Paul Eggert <eggert@twinsun.com>
259
260 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
261 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
262 lookahead symbol, and which sets yychar in parser actions) and it
7ea9026a
PE
263 disagreed with the Bison documentation. Bug
264 reported by Andrew Walrond.
d600ee67 265
1c5fe69d
PE
266 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
267 as the caller now does that.
268 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
269 (YYEMPTY): Parenthesize right hand side, since others use it.
270 (yyparse): Don't assume that our generated code is the only code
271 that sets yychar.
272
d1de5372
PE
2732002-12-13 Paul Eggert <eggert@twinsun.com>
274
275 Version 1.75d.
276
277 POSIX requires a "yacc" command.
278 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
279 (MOSTLYCLEANFILES): Add yacc.
280 (yacc): New rule.
1c5fe69d 281 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
d1de5372
PE
282 as an alias for bison y.
283
284 * po/LINGUAS: Add da.
d600ee67 285
d1de5372
PE
286 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
287 problem with latest <getopt.h>.
288 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
289
290 * doc/fdl.texi: Upgrade to 1.2.
291 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
292 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
293 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
294 gnulib.
295 * config/install-sh: Sync with autotools.
296
297 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
298 <http://mail.gnu.org/pipermail/bug-bison/2002-November/001929.html>.
299 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
300 locations are requested.
301 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
302 locations are requested.
303
d0f3fe23
PE
3042002-12-12 Paul Eggert <eggert@twinsun.com>
305
306 Remove unportable casts and storage allocation tricks.
307 While we're at it, remove almost all casts, since they
308 usually aren't needed and are a sign of trouble.
309
310 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
311
312 * src/derives.c (derives_compute): Do not subtract NTOKENS from
313 the pointer DSET returned by malloc; this isn't portable.
314 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
315 Similarly for DERIVES.
316 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
317 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
318 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
319
320 * src/derives.c (derives_compute): Do not bother invoking
321 int_of_rule_number, since rule numbers are integers.
322
323 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
324 rather than XMALLOC (char, N).
325
326 * src/files.c (filename_split): Rewrite to avoid cast.
327
328 * src/gram.h (symbol_number_as_item_number,
329 item_number_as_symbol_number, rule_number_as_item_number,
330 item_number_as_rule_number):
331 Now inline functions rather than macros, to avoid casts.
332 * src/state.h (state_number_as_int): Likewise.
333 * src/tables.c (state_number_to_vector_number,
334 symbol_number_to_vector_number): Likewise.
335
336 * src/gram.h (int_of_rule_number): Remove; no longer used.
337
338 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
339 since the resulting storage is always stored into.
340
341 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
342 where it's needed.
343
344 * src/muscle_tab.c (muscle_m4_output):
345 Now inline. Return bool, not int.
346 * src/state.c (state_compare): Likewise.
347 * src/symtab.c (symbol_check_defined,
348 symbol_check_alias_consistency, symbol_pack, symbol_translation,
349 hash_compare_symbol, hash_symbol):
350 Likewise.
351 * src/uniqstr.c (uniqstr_print): Likewise.
352 * src/muscle_tab.c (muscle_m4_output_processor):
353 New function, to avoid casts.
354 * src/state.c (state_comparator, stage_hasher): Likewise.
355 * src/symtab.c (symbol_check_defined_processor,
356 symbol_check_alias_consistency_processor, symbol_pack_processor,
357 symbol_translation_processor, hash_symbol_comparator,
358 hash_symbol_hasher): Likewise.
359 * src/uniqstr.c (uniqstr_print_processor): Likewise.
360 * src/muscle_tab.c (muscles_m4_output):
361 Use new functions instead of casting old functions unportably.
362 * src/state.c (state_hash_new): Likewise.
363 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
364 symbols_token_translations_init):
365 Likewise.
366 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
367
368 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
369 var instead of casting to long, to avoid casts.
370 (prepare_states): Use MALLOC rather than alloca, so that we don't
371 have to worry about alloca.
372 * src/state.c (state_hash_lookup): Likewise.
373
374 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
375 local var instead of casting to unsigned char, to avoid casts.
376
377 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
378 STATE_ALLOC): Remove.
379 (transitions_new, errs_new, reductions_new, state_new): Use malloc
380 rather than calloc, and use offsetof to avoid allocating slightly
381 too much storage.
382 (state_new): Initialize all members.
383
384 * src/state.c (state_hash): Use unsigned accumulator, not signed.
385
386 * src/symtab.c (symbol_free): Remove; unused.
387 (symbol_get): Remove cast in lhs of assignment.
388 (symbols_do): Now static. Accept generic arguments, not
389 hashing-related ones.
390
391 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
392 (symbol_processor): Remove.
393 (symbols_do): Remove decl; now static.
394
395 * src/system.h (alloca): Remove; decl no longer needed.
396 (<stddef.h>): Include, for offsetof.
397 (<inttypes.>, <stdint.h>): Include if available.
398 (uintptr_t): New type, if system lacks it.
399 (CALLOC, MALLOC, REALLOC): New macros.
400 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
401 new macros.
402
403 * src/tables.c (table_size): Now int, to pacify GCC.
404 (table_grow, table_ninf_remap): Use signed table size.
405 (save_row): Don't bother initializing locals when not needed.
406 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
407 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
408
409 * src/vcg.h: Correct misspellings.
410
411 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
412
413
414 * src/getargs.c (getargs): Don't assume EOF == -1.
415
26b4a969
PE
4162002-12-09 Paul Eggert <eggert@twinsun.com>
417
418 Change identifier spellings to avoid collisions with names
419 that are reserved by POSIX.
420
421 Don't use names ending in _t, since POSIX reserves them.
422 For consistency, remove _e and _s endings -- they're weren't
423 needed to remove ambiguity. All uses changed.
424 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
425 turn was just renamed from struniq_t.
426 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
427 which in turn was just renamed from struniq_processor_t.
428 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
429 in turn was renamed from hash_compare_struniq_t.
430 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
431 (state_list): Renamed from state_list_t.
432 * src/assoc.h (assoc): Renamed from assoc_t.
433 * src/conflicts.c (enum conflict_resolution): Renamed from
434 enum conflict_resolution_e.
435 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
436 (rule_list): Renamed from rule_list_t.
437 * src/getargs.h (enum trace): Renamed from enum trace_e.
438 (enum report): Renamed from enum report_e.
439 * src/gram.h (item_number): Renamed from item_number_t.
440 (rule_number): Renamed from rule_number_t.
441 (struct rule_s): Remove the "rule_s" part; not used.
442 (rule): Renamed from rule_t.
443 (rule_filter): Renamed from rule_filter_t.
444 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
445 (goto_list): Renamed from goto_list_t.
446 * src/lalr.h (goto_number): Renamed from goto_number_t.
447 * src/location.h (location): Renamed from location_t.
448 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
449 and moved here from:
450 * src/muscle_tab.h (muscle_entry_t): here.
451 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
452 (rule_list): Renamed from rule_list_t.
453 * src/print_graph.c (static_graph): Renamed from graph.
454 * src/reader.h (braced_code): Renamed from braced_code_t.
455 Remove brace_code_e tag.
456 * src/relation.h (relation_node): Renamed from relation_node_t.
457 (relation_nodes): Renamed from relation_nodes_t.
458 (relation): Renamed from relation_t.
459 * src/state.h (state_number): Renamed from state_number_t.
460 (struct state): Renamed from struct state_s.
461 (state): Renamed from state_t.
462 (transitions): Renamed from transitions_t. Unused (and
463 misspelled) transtion_s tag removed.
464 (errs): Renamed from errs_t. Unused errs_s tag removed.
465 (reductions): Renamed from reductions_t. Unused tag
466 reductions_s removed.
467 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
468 (struct symbol_list): Renamed from struct symbol_list_s.
469 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
470 (struct symbol): Renamed from struct symbol_s.
471 (symbol): Renamed from symbol_t.
472 * src/tables.c (vector_number): Renamed from vector_number_t.
473 (action_number): Renamed from action_t.
474 * src/tables.h (base_number): Renamed from base_t.
475 * src/vcg.h (enum color): Renamed from enum color_e.
476 (enum textmode): Renamed from enum textmode_e.
477 (enum shape): Renamed from enum shape_e.
478 (struct colorentry): Renamed from struct colorentry_s.
479 (struct classname): Renamed from struct classname_s.
480 (struct infoname): Renamed from struct infoname_s.
481 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
482 (enum decision): Renamed from enum decision_e.
483 (enum orientation): Renamed from enum orientation_e.
484 (enum alignment): Renamed from enum alignment_e.
485 (enum arrow_mode): Renamed from enum arrow_mode_e.
486 (enum crossing_type): Renamed from enum crossing_type_e.
487 (enum view): Renamed from enum view_e.
488 (struct node): Renamed from struct node_s.
489 (node): Renamed from node_t.
490 (enum linestyle): Renamed from enum linestyle_e.
491 (enum arrowstyle): Renamed from enum arrowstyle_e.
492 (struct edge): Renamed from struct edge.
493 (edge): Renamed from edge_t.
494 (struct graph): Renamed from struct graph_s.
495 (graph): Renamed from graph_t.
496 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
497 Rename value_t -> value.
498 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
499 value_t_as_yystype -> value_as_yystype.
500
501 Don't include <errno.h> in the mainstream code, since it
502 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
503 * lib/get-errno.c, lib/get-errno.h: New files.
504 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
505 get-errno.c.
506 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
507 * src/output.c (output_skeleton): Likewise.
508 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
509 instead of errno.
510 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
511 Likewise.
512 (handle_action_dollar, handle_action_at): Likewise.
513 * src/system.h: Do not include <errno.h>.
514 (TAB_EXT): Renamed from EXT_TAB.
515 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
516
517 Avoid str[a-z]*, since <string.h> reserves that name space.
518 Change all instances of "struniq" in names to "uniqstr", and
519 likewise for "STRUNIQ" and "UNIQSTR".
520 * src/uniqstr.c: Renamed from src/struniq.c.
521 * src/uniqstr.h: Renamed from src/struniq.h.
522 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
523 * src/files.c (strsuffix): Remove; unused.
524 (concat2): Renamed from stringappend. Now static.
525 * src/files.h (strsuffix, stringappend): Remove; unused.
526 * src/parse-gram.y (<chars>): Renamed from <string>.
527 (<uniqstr>): Renamed from <struniq>.
528 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
529 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
530 (struct graph_s.expand): Renamed from struct graph_s.stretch.
531 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
532 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
533 (N_EXPAND): Renamed from N_STRETCH.
534
535 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
536 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
537 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
538 Remove; unused.
539 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
540 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
541 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
542 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
543 (BASE_MAXIMUM): Renamed from BASE_MAX.
544 (BASE_MINIMUM): Renamed from BASE_MIN.
545 (ACTION_MAX): Remove; unused.
546 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
547 Unnecessary casts removed from above defines.
548
549
550 Fix misspelling in names.
551 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
552 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
553 G_NODE_ALIGNEMENT.
554
555
556 * lib/timevar.c (timevar_report): Renamed from time_report,
557 for consistency with other names.
558 * lib/timevar.h (timevar_report): New decl.
559 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
560
561
562 Sort include-file uses.
563
564 Reorder all include files under src to be in the order "system.h".
565 then the ../lib include files in angle brackets (alphabetized),
566 then the . include files in double-quotes (alphabetized). Fix
567 dependency breakages encountered in this process, as follows:
568 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
569 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
570 * src/state.h: Include "symtab.h".
571
996b1c7e
PE
5722002-12-08 Paul Eggert <eggert@twinsun.com>
573
574 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
575 since this causes problems when __file__ contains character
576 sequences like "@" that are treated specially by src/scan-skel.l.
577 Instead, just use the file's basename. This fixes the bug
578 reported by Martin Mokrejs in
26b4a969 579 <http://mail.gnu.org/pipermail/bug-bison/2002-December/001945.html>.
996b1c7e 580
e19c4e5d
PE
5812002-12-06 Paul Eggert <eggert@twinsun.com>
582
583 Add support for rules that do not have trailing semicolons, as
584 POSIX requires. Improve the quality of locations in Bison
585 diagnostics.
26b4a969 586
e19c4e5d
PE
587 * src/location.c: Include <quotearg.h>.
588 (empty_location): Now const.
589 (location_print): New function. Follow the recommendation of the
590 GNU Coding Standards for locations that span file boundaries.
591 * src/location.h: Do not include <quotearg.h>; no longer needed.
592 (boundary): New type.
593 (location_t): Use it. This allows locations to span file boundaries.
594 All member uses changed: file -> start.file or end.file (as needed),
595 first_line -> start.line, first_column -> start.column,
596 last_line -> end.line, last_column -> end.column.
597 (equal_boundaries): New function.
598 (LOCATION_RESET, LOCATION_STEP): Remove.
599 (LOCATION_PRINT): Remove. All callers changed to use location_print.
600 (empty_location): Now const.
601 (location_print): New decl.
602 * src/parse-gram.y (lloc_default): New function, which handles
603 empty locations more accurately.
604 (YYLLOC_DEFAULT): Use it.
605 (%token COLON): Remove.
606 (%token ID_COLON): New token.
26b4a969 607 (rules): Use it.
e19c4e5d
PE
608 (declarations, rules): Remove trailing semicolon.
609 (declaration, rules_or_grammar_declaration):
610 Allow empty (";") declaration.
611 (symbol_def): Remove empty actions; no longer needed.
612 (rules_or_grammar_declaration): Remove trailing semicolon.
613 (semi_colon.opt): Remove.
614 * src/reader.h: Include location.h.
615 (scanner_cursor): New decl.
616 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
617 rolling our own.
618 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
619 of *loc.
620 (STEP): Remove. No longer needed, now that adjust_location does
621 the work. All uses removed.
622 (scanner_cursor): New var.
623 (adjust_location): Renamed from extend_location. It now sets
624 *loc and adjusts the scanner cursor. All uses changed.
625 Don't bother testing for CR.
626 (handle_syncline): Remove location arg; now updates scanner cursor.
627 All callers changed.
628 (unexpected_end_of_file): Now accepts start boundary of token or
629 comment, not location. All callers changed. Update scanner cursor,
630 not the location.
631 (SC_AFTER_IDENTIFIER): New state.
632 (context_state): Renamed from c_context. All uses changed.
633 (id_loc, code_start, token_start): New local vars.
634 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
635 processing of Yacc white space and equivalents here.
636 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
637 instead of returning ID immediately, since we need to search for
638 a subsequent colon.
639 (<INITIAL>"'", "\""): Save token_start.
640 (<INITIAL>"%{", "{", "%%"): Save code_start.
641 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
642 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
643 BEGIN context_state at end, not INITIAL.
644 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
645 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
646 Return correct token start.
647 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
648 the start of a character, string or multiline comment is found.
649 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
650 Reduction): Adjust reported locations to match the more-precise
651 results now expected.
652 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
653 * tests/reduce.at (Useless Rules, Reduced Automaton,
654 Underivable Rules): Likewise.
655 * tests/regression.at (Invalid inputs): No longer `expecting ";"
656 or "|"' now that so many other tokens are allowed by the new grammar.
657
658 * src/complain.h (current_file): Remove duplicate decl;
659 current_file is now owned by files.h.
660 * src/complain.c, src/scan-gram.l: Include files.h.
661
6622002-12-06 Paul Eggert <eggert@twinsun.com>
26b4a969 663
e19c4e5d
PE
664 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
665 promotes to int; it might be unsigned int.
666 * data/yacc.c (yy_reduce_print): Likewise.
667
668 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
669 be #defined in the prologue, not in the Bison declarations.
670 This fixes Debian Bug 102878, reported by Shaul Karl.
26b4a969 671
b64755e3
PE
6722002-12-02 Paul Eggert <eggert@twinsun.com>
673
674 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
675 * lib/strtoul.c: New file, from gnulib.
676 This fixes a porting bug reported by Peter Klein in
677 <http://mail.gnu.org/pipermail/bug-bison/2002-December/001944.html>.
678
6e746484
PE
6792002-11-30 Paul Eggert <eggert@twinsun.com>
680
b64755e3
PE
681 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
682 and put only a forward declaration in the prologue. This is for
683 consistency with the other scanner helper functions.
684
6ba55592
PE
685 Type clashes now generate warnings, not errors, since it
686 appears that POSIX may allow some grammars with type clashes.
687 * src/reader.c (grammar_current_rule_check): Warn about
688 type clashes instead of complaining.
689 * tests/input.at (Type Clashes): Expect warnings, not complaints.
690
6e746484
PE
691 Add Yacc library, since POSIX requires it.
692 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
693 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
694 * lib/main.c, lib/yyerror.c: New files.
695
696 gram_error can be static; it need not be extern.
697 * src/reader.h (gram_error): Remove decl.
698 * src/parse-gram.y (gram_error): Now static. Add static decl.
699 (print_token_value): Omit parameter names from forward decl,
700 for consistency.
701
88510f9c
PE
7022002-11-29 Paul Eggert <eggert@twinsun.com>
703
6e746484
PE
704 * doc/bison.texinfo: Emphasize that yylex and yyerror must
705 be declared before being used. E.g., one should typically
706 declare them in the prologue. Use GNU coding style in examples.
707 Put "const" consistently after the type it modifies. Mention
708 that C99 supports "inline". Mention that yyerror traditionally
709 returns "int".
710
88510f9c
PE
711 %parse-param and %lex-param now take just one argument, the
712 declaration; the argument name is deduced from the declaration.
713
714 * doc/bison.texinfo (Parser Function, Pure Calling, Error
715 Reporting, Table of Symbols): Document this.
716 * src/parse-gram.y (add_param): New function.
717 (COMMA): Remove.
718 (declaration): Implement new rule for %parse-param and %lex-param.
719 * src/scan-gram.l: "," now elicits a warning, rather than being
720 a token; this is more compatible with byacc.
721 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
722
bb92250c
PE
7232002-11-27 Paul Eggert <eggert@twinsun.com>
724
725 Rename identifiers to avoid real and potential collisions.
726
727 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
728 to avoid collision with lex macro described by Bruce Lilly in
729 <http://mail.gnu.org/pipermail/bug-bison/2002-November/001929.html>.
730 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
731 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
732 * src/parse-gram.y (print_token_value): Renamed from yyprint.
733 All uses changed.
734 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
735 The name "yycontrol" violates the name space rules, and this stuff
736 wasn't being used anyway.
737 (input): Remove action; this stuff wasn't being used.
738 (gram_error): Rename local variable yylloc -> loc.
739 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
740 (YY_DECL): Don't use "yy" at start of local variables.
741 All uses changed, e.g., yylloc -> loc.
742 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
743 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
744 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
745 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
746
747 * src/parse-gram.y (gram_error): loc is now const *.
748 * src/reader.h (gram_error): Likewise.
749
3af4feb2
PE
7502002-11-24 Paul Eggert <eggert@twinsun.com>
751
752 Version 1.75c.
753
754 * tests/actions.at (Actions after errors): Use an output format
755 more similar to that of the Printers and Destructors test.
756 Test the position of the ';' token too.
757 (Printers and Destructors): Likewise.
758 (Printers and Destructors: %glr-parser): Remove for now, to avoid
759 unnecessarily alarming people when the test fails.
760
761 * data/yacc.c (yyerrlab1): Move this label down, so that the
762 parser does not discard the lookahead token if the user code
763 invokes YYERROR. This change is required for POSIX conformance.
764
765 * lib/error.c: Sync with gnulib.
766
7672002-11-22 Paul Eggert <eggert@twinsun.com>
768
769 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
770 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
771 * lib/xmalloc.c: Likewise.
26b4a969 772
58004308
PE
7732002-11-20 Paul Eggert <eggert@twinsun.com>
774
775 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
776
7772002-11-20 Paul Eggert <eggert@twinsun.com>
26b4a969 778
58004308
PE
779 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
780 should use `if (! x) abort ();' rather than `assert (x);', and
781 anyway it's one less thing to worry about configuring.
782
783 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
784 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
785 and replace all instances of assert with abort.
786 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
787 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
788
789 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
790 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
791 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
792 hash_find_entry, hash_rehash, hash_insert): Likewise.
793 * src/conflicts.c (resolve_sr_conflict): Likewise.
794 * src/lalr.c (set_goto_map, map_goto): Likewise.
795 * src/nullable.c (nullable_compute): Likewise.
796 * src/output.c (prepare_rules, token_definitions_output): Likewise.
797 * src/reader.c (packgram, reader): Likewise.
798 * src/state.c (state_new, state_free, state_transitions_set,
799 state_reduction_find): Likewise.
800 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
801 symbol_pack): Likewise.
802 * src/tables.c (conflict_row, pack_vector): Likewise.
803 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
804 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
805 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
806 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
807
808 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
809 (ARGMATCH_CONSTRAINT): New macro.
810 (ARGMATCH_ASSERT): Use it.
811
812 * src/system.h (verify): New macro.
813 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
814 rather than assert.
815 * src/tables.c (tables_generate): Likewise.
816
817 * src/struniq.c (struniq_assert): Now returns void, and aborts
818 if the assertion is false.
819 (struniq_assert_p): Remove.
820 * src/struniq.h: Likewise.
821
76ae8198
PE
8222002-11-18 Paul Eggert <eggert@twinsun.com>
823
824 * data/glr.c (yygetLRActions): Replace `yyindex' with
825 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
826 This fixes the regression with Sun ONE Studio 7 cc that I reported in
827 <http://mail.gnu.org/pipermail/bug-bison/2002-November/001892.html>.
828
d3c4e709
AD
8292002-11-18 Akim Demaille <akim@epita.fr>
830
831 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
832 space.
833 From Tim Van Holder.
834
8d8a7238
PE
8352002-11-17 Paul Eggert <eggert@twinsun.com>
836
837 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
838 to "SyntaxError" for consistency with my 2002-11-15 change.
839
840 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
841 not define to {}, since this breaks the common use of `YYDPRINTF
842 ((...));' if a single statement is desired (e.g. before `else').
843 Work around GCC warnings by surrounding corresponding calls with
844 {} if needed.
845 (yyhasResolvedValue): Remove unused function.
846 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
847 loop body.
848 (yyreportSyntaxError): Renamed from yyreportParseError.
849 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
850 All uses changed.
851 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
852 extern when possible. Remove unused initializations.
853
b0937b22
AD
8542002-11-16 Akim Demaille <akim@epita.fr>
855
856 Augment the similarity between GLR and LALR traces.
857
858 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
859 (YY_REDUCE_PRINT): New.
860 (yyparse): Use them.
861 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
862 YYDPRINT here.
863 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
864 state reached after the reduction/recovery, since...
865 (yyparse, yyprocessOneStack): Report the state we are entering in.
866
c5e3e510
AD
8672002-11-16 Akim Demaille <akim@epita.fr>
868
869 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
870 Add support for --trace=skeleton.
871 * src/scan-skel.l: %option debug.
872 Scan strings of non-@ or \n instead of character by character.
873 (scan_skel): Handle trace_skeleton.
874 (QPUTS): New.
875 (@output_parser_name@, @output_header_name@): ``Restore'' their
876 support (used to be M4 macros).
877 * data/yacc.c: Quote larger chunks, a la glr.c.
878 * data/lalr1.cc: Likewise.
879 The header guards are no longer available, so use some other
880 string than `YYLSP_NEEDED'.
881
4c6cc1db
AD
8822002-11-16 Akim Demaille <akim@epita.fr>
883
884 Make the ``Printers and Destructors'' test more verbose, taking
885 `yacc.c''s behavior as (possibly wrong) reference.
886
887 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
888 instead of fprint on stdout.
889 Set and report the last_line of the symbols.
890 Consistently display values and locations.
891
6d9e8019
PE
8922002-11-16 Paul Eggert <eggert@twinsun.com>
893
894 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
895
6e649e65
PE
8962002-11-15 Paul Eggert <eggert@twinsun.com>
897
b25d88f6
PE
898 * tests/actions.at (Actions after errors): New test case.
899
6e649e65
PE
900 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
901 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
902 tests/action.at, tests/calc.at, tests/conflicts.at,
903 tests/cxx-type.at, tests/regression.at:
904 "parse error" -> "syntax error" for POSIX compatibility.
905 "parsing stack overflow..." -> "parser stack overflow" so
906 that code matches Bison documentation.
907
0f39aab9
AD
9082002-11-15 Akim Demaille <akim@epita.fr>
909
910 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
911 take two BRACED_CODE, not two string_content.
912 Free the scanner's obstack when we are done.
913 (code_content): New.
914 * tests/calc.at: Adjust.
915 * doc/bison.texinfo: Adjust.
916 Also, make sure to include the `,' for these declarations.
917
761c1926
AD
9182002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
919
920 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
921 definition; avoids potential autoreconf problems.
922
b0f98b10
AD
9232002-11-15 Akim Demaille <akim@epita.fr>
924
925 Always check the value returned by yyparse.
926
927 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
928 returned by yyparse.
929 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
930 Adjust calls.
931 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
932 returned by yyparse.
933
970785f1
PH
9342002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
935
936 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
937 on input.at test.
938
8fcc7db1
PE
9392002-11-14 Paul Eggert <eggert@twinsun.com>
940
7ec1b48e
PE
941 * src/output.c (output_skeleton): Call xfopen instead of
942 duplicating xfopen's body.
943
cfff7583
PE
944 Fix bugs reported by Nelson H. F. Beebe in
945 <http://mail.gnu.org/pipermail/bug-bison/2002-November/001893.html>.
946
8fcc7db1
PE
947 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
948 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
949 Group compiler. Instead, use "$CC -E bar.c". Include the .h
950 file twice in the grammar, as an extra check.
951
952 * tests/input.at (Torturing the Scanner): Surround the
953 backslash-newline tests with "#if 0", to make it less likely that
954 we'll run into compiler bugs. Bring back solitary \ inside
955 comment, but add a closing comment to work around HP C bug. Don't
956 test backslash-newline in C character constant. This should fix
957 the input.at bug reported by Nelson H. F. Beebe in
958 <http://mail.gnu.org/pipermail/bug-bison/2002-November/001893.html>.
959
4e8d992c
AD
9602002-11-14 Akim Demaille <akim@epita.fr>
961
962 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
963 status of the compiler.
f32b346d 964 Calling `exit 1' is no longer needed.
4e8d992c
AD
965 Reported by Nelson H. F. Beebe.
966
9501dc6e
AD
9672002-11-14 Akim Demaille <akim@epita.fr>
968
969 * tests/atlocal.in (CPPFLAGS): We have config.h.
970 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
971 New.
972 * tests/actions.at, tests/calc.at, tests/conflicts.at,
973 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
974 * tests/regression.at, tests/torture.at: Use them for all the
975 grammars that are to be compiled.
976 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
977 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
978 * doc/bison.texinfo (GLR Parsers): Document `inline'.
979
18b519c0
AD
9802002-11-14 Akim Demaille <akim@epita.fr>
981
982 * doc/bison.texinfo: Various formatting changes (alignments in
983 samples, additional @group/@end group, GCS in samples.
984 Use @deffn instead of simple @table to define the directives,
985 macros, variables etc.
986
9a86cdb9
PE
9872002-11-13 Paul Eggert <eggert@twinsun.com>
988
daa33def
PE
989 Fix some bugs reported by Albert Chin-A-Young in
990 <http://mail.gnu.org/pipermail/bug-bison/2002-November/001881.html>.
18b519c0 991
daa33def 992 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
8fcc7db1 993 -o c"; the HP C compiler chatters during compilation.
daa33def
PE
994 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
995 * tests/headers.at (export YYLTYPE): Likewise.
996
997 * tests/input.at (Torturing the Scanner): Remove lines containing
8fcc7db1 998 solitary backslashes, as they tickle a bug in the HP C compiler.
daa33def 999
9a86cdb9
PE
1000 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
1001 comments, since they're not portable. Use GNU coding style.
1002
9c1e26bd
AD
10032002-11-13 Akim Demaille <akim@epita.fr>
1004
1005 * data/yacc.c: Leave bigger chunks of quoted text.
1006 (YYDSYMPRINTF): New.
1007 Use it to report symbol activities.
1008 * data/glr.c (YYDSYMPRINTF): New.
1009 Use it.
1010
87f721cc
PE
10112002-11-12 Paul Eggert <eggert@twinsun.com>
1012
1013 Version 1.75b.
1014
1015 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
1016 (yyglrReduce): Return yyok, not 0.
1017 This should avoid the enumerated-type warnings reported
464c6927 1018 by Nelson H. F. Beebe in
87f721cc
PE
1019 <http://mail.gnu.org/pipermail/bug-bison/2002-November/001872.html>.
1020
1021 * lib/bbitset.h (BITSET_INLINE): Remove.
1022 * lib/bitset.h [! BITSET_INLINE]: Remove.
1023 (bitset_set, bitset_reset, bitset_test): Rename local vars
1024 to avoid shadowing warnings by GCC.
1025
1026 * data/glr.c (inline): Remove #define. It's the user's
1027 responsibility to #define it away, just like 'const'.
464c6927 1028 This fixes one of the bugs reported by Nelson H. F. Beebe in
87f721cc 1029 <http://mail.gnu.org/pipermail/bug-bison/2002-November/001873.html>.
18b519c0 1030
87f721cc
PE
1031 * Makefile.maint (po-check): Scan .l and .y files instead of the
1032 .c and the .h files that they generate. This fixes the bug
1033 reported by Tim Van Holder in:
1034 <http://mail.gnu.org/pipermail/bison-patches/2002-November/001352.html>
1035 Look for N_ as well as for _. Try to avoid matching #define for
1036 N_ and _.
1037 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
1038 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
1039 * src/scan-gram.l: Revamp regular expressions so that " and '
1040 do not confuse xgettext.
1041
1042 * src/struniq.h (struniq_new): Do not declare the return type
1043 to be 'const'; this violates the C standard.
1044 * src/struniq.c (struniq_new): Likewise.
1045
be14ade5
AD
10462002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
1047
1048 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
1049 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
1050 linker.
1051
05291fbc
AD
10522002-11-12 Akim Demaille <akim@epita.fr>
1053
1054 * Makefile.maint: Sync with Autoconf:
1055 (local_updates): New.
1056
1f5fd52e
AD
10572002-11-12 Akim Demaille <akim@epita.fr>
1058
1059 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
1060
283f1e64
AD
10612002-11-12 Akim Demaille <akim@epita.fr>
1062
1063 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
1064 locations.
1065
886b69d1
AD
10662002-11-12 Akim Demaille <akim@epita.fr>
1067
1068 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
1069 not yyvalue.
1070
3df37415
AD
10712002-11-12 Akim Demaille <akim@epita.fr>
1072
1073 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
1074 Use it to test the GLR parser.
1075
7bd6c77e
AD
10762002-11-12 Akim Demaille <akim@epita.fr>
1077
1078 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
1079 defines it.
1080 * data/glr.c (yystos): New.
1081 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
1082 (YYDSYMPRINT): New.
1083 (yyval): Don't define it, it is handled via M4.
1084 (yyrecoverParseError): Free verbosely the discarded symbols.
1085 * data/yacc.c (yysymprint): Remove, rather...
1086 (b4_yysymprint_generate): invoke.
1087 * data/c.m4 (b4_yysymprint_generate): New.
1088 Accept pointers as arguments, as opposed to the version from
1089 yacc.c.
1090 (b4_yydestruct_generate): Likewise.
1091 * tests/cations.at (Printers and Destructors): Use Bison directives
1092 instead of CPP macros.
1093 Don't rely on internal details.
1094
b0400cc6
AD
10952002-11-12 Akim Demaille <akim@epita.fr>
1096
1097 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
1098 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
1099 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
1100 it against YYEMPTY and so forth), work on yytoken (i.e., set
1101 it to YYEMPTY etc.).
1102 (yydestruct): Replace with a b4_yydestruct_generate invocation.
1103 (b4_symbol_actions): Remove.
1104 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
1105 for 0, end-of-input.
1106
72f889cc
AD
11072002-11-12 Akim Demaille <akim@epita.fr>
1108
1109 * doc/bison.texinfo (Destructor Decl): New.
1110
b1ae9233
AD
11112002-11-12 Akim Demaille <akim@epita.fr>
1112
1113 * src/tables.c (tables_generate): Use free for pointers that
1114 cannot be NULL, not XFREE.
1115 (pack_vector): Use assert, not fatal, for bound violations.
1116 * src/state.c (state_new): Likewise.
1117 * src/reader.c (reader): Likewise.
1118 * src/lalr.c (set_goto_map): Likewise.
72f889cc 1119 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
b1ae9233
AD
1120 the file name.
1121
7ec2d4cd
AD
11222002-11-12 Akim Demaille <akim@epita.fr>
1123
1124 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
1125 Restore.
1126 * src/scan-gram.l (last_string): Is global to the file, not to
1127 yylex.
1128 * src/parse-gram.y (input): Don't append the epilogue here,
1129 (epilogue.opt): do it here, and free the scanner's obstack.
1130 * src/reader.c (epilogue_set): Rename as...
1131 (epilogue_augment): this.
1132 * data/c.m4 (b4_epilogue): Defaults to empty.
1133
573a6cd3
AD
11342002-11-12 Akim Demaille <akim@epita.fr>
1135
1136 * src/getargs.c (long_options): Remove duplicates.
1137 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
1138 Remove.
1139 * doc/bison.rnh: Remove.
1140 * doc/bison.texinfo (VMS Invocation): Remove.
1141
95612cfa
AD
11422002-11-12 Akim Demaille <akim@epita.fr>
1143
1144 * src/struniq.h, src/struniq.c (struniq_t): Is const.
1145 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
1146
1147 Use struniq for symbols.
1148
1149 * src/symtab.h (symbol_t): The tag member is a struniq.
1150 (symbol_type_set): Adjust.
1151 * src/symtab.c (symbol_new): Takes a struniq.
1152 (symbol_free): Don't free the tag member.
1153 (hash_compare_symbol_t, hash_symbol_t): Rename as...
1154 (hash_compare_symbol, hash_symbol): these.
1155 Use the fact that tags as struniqs.
1156 (symbol_get): Use struniq_new.
1157 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
1158 Returns a strniq.
1159 * src/reader.h (merger_list, grammar_currentmerge_set): The name
1160 and type members are struniqs.
1161 * src/reader.c (get_merge_function)
1162 (grammar_current_rule_merge_set): Adjust.
1163 (TYPE, current_type): Are struniq.
1164
1165 Use struniq for file names.
1166
1167 * src/files.h, src/files.c (infile): Split into...
1168 (grammar_file, current_file): these.
1169 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
1170 * src/reduce.c (reduce_print): Likewise.
1171 * src/getargs.c (getargs): Likewise.
1172 * src/complain.h, src/complain.c: Likewise.
1173 * src/main.c (main): Call struniqs_new early enough to use it for
1174 file names.
1175 Don't free the input file name.
1176
3e6656f9
AD
11772002-11-12 Akim Demaille <akim@epita.fr>
1178
1179 * src/symtab.c (symbol_free): Remove dead deactivated code:
1180 type_name are properly removed.
1181 Don't use XFREE to free items that cannot be NULL.
1182 * src/struniq.h, src/struniq.c: New.
1183 * src/main.c (main): Initialize/free struniqs.
1184 * src/parse-gram.y (%union): Add astruniq member.
1185 (yyprint): Adjust.
1186 * src/scan-gram.l (<{tag}>): Return a struniq.
1187 Free the obstack bit that used to store it.
1188 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
1189
7672019c
PE
11902002-11-11 Paul Eggert <eggert@twinsun.com>
1191
1192 Revamp to fix many (but not all) of the C- and M4-related quoting
1193 problems. Among other things, this fixes the Bison bug reported
1194 by Jan Hubicka when processing the Bash grammar; see:
1195 <http://mail.gnu.org/pipermail/bison-patches/2002-November/001329.html>
1196
1197 Use new @ escapes consistently. Represent brackets with @{ and @}
1198 rather than @<:@ and @:>@, since this works a bit better with dumb
1199 editors like vi. Represent @ with @@, since @ is now consistently
1200 an escape. Use @oline@ and @ofile@ rather than __oline__ and
1201 __ofile__, to avoid unexpected expansions. Similarly, use @output
1202 rather than #output.
1203
1204 * data/c.m4 (b4_copyright): Omit file name from comment, since
1205 the file name could contain "*/".
1206 (b4_synclines_flag): Don't quote the 2nd argument; it should already
1207 be quoted. All uses changed.
1208
1209 * data/glr.c: Use new @ escapes consistently.
1210 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
1211 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
1212 Remove, since they couldn't handle arbitrary characters in file
1213 names.
1214 * data/lalr1.cc: Likewise.
1215 * data/yacc.c: Likewise.
1216
1217 * src/files.c (output_infix): Remove; all uses removed.
1218 * src/files.h: Likewise.
1219
1220 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
1221 mishandled funny characters in file names, and anyway it isn't
1222 needed any more.
1223 * data/yacc.c: Likewise.
1224 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
1225
1226 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
1227 * data/yacc.c: Likewise.
1228
1229 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
1230 strings now.
1231 (muscle_init): Quote filename as a C string.
1232 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
1233 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
1234 * src/output.c (escaped_file_name_output): New function.
1235 (prepare_symbols): Quote tokens for M4.
1236 (prepare): Don't insert output_infix, output_prefix,
1237 output_parser_name, output_header_name; this is now down by scan-skel.
1238 Insert skeleton as a C string.
1239
1240 * src/output.c (user_actions_output, symbol_destructors_output,
1241 symbol_printers_output): Quote filenames for C and M4.
1242 * src/reader.c (prologue_augment, epilogue_set): Likewise.
1243
1244 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
1245 escapes other than \\ and \'; this simplifies the code.
1246 (<SC_STRING>): Likewise, for \\ and \".
1247 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
1248 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
1249 Use new escapes @{ and @} for [ and ].
1250
1251 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
1252 them with auto vars.
1253 Switch to new escape scheme, where @ is the escape character uniformly.
1254 Abort if a stray escape character is found. Avoid unbounded input
1255 buffer when parsing non-escaped text.
1256
1257 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
1258 __oline__, #output, $@, and @{ do not have unintended meanings.
1259
acea4f3b
PE
12602002-11-09 Paul Eggert <eggert@twinsun.com>
1261
1262 Fix the test failure due to GCC warnings described in
1263 <http://mail.gnu.org/pipermail/bug-bison/2002-November/001815.html>.
1264 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
1265 evaluate to 0 if it's impossible for NINF to be in the respective
1266 table.
1267 (yygetLRActions, yyrecoverParseError): Use them.
1268
1269 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
1270 counted in the token inserted at end of file. Now takes
1271 location_t *, not location_t, so that the location can be
1272 adjusted. All uses changed.
1273
1274 * tests/regression.at (Invalid inputs): Adjust wording in
1275 diagnostic to match the new behavior.
1276
1277 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
1278 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
1279 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
1280 abort ();'. This reduces the runtime of the "Many lookaheads"
1281 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
1282 GCC 3.2.
1283
20ef1ad5
PE
12842002-11-07 Paul Eggert <eggert@twinsun.com>
1285
1286 * src/parse-gram.y (CHARACTER): Remove unused token.
1287 All uses removed.
1288
1289 * src/scan-gram.l: Remove stack option. We no longer use the
1290 stack, since the stack was never deeper than 1; instead, use the
1291 new auto var c_context to record the stacked value.
1292
1293 Remove nounput option. At an unexpected end of file, we now unput
1294 the minimal input necessary to end cleanly; this simplifies the
1295 code.
1296
1297 Avoid unbounded token sizes where this is easy.
1298
1299 (unexpected_end_of_file): New function.
1300 Use it to systematize the error message on unexpected EOF.
1301 (last-string): Now auto, not static.
1302 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
1303 (scanner_last_string_free): Remove; not used.
1304 (percent_percent_count): Move decl to just before use.
1305 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
1306 not the (never otherwised-used) CHARACTER.
1307
93724f13
AD
13082002-11-07 Akim Demaille <akim@epita.fr>
1309
1310 Let yyerror always receive the msg as last argument, so that
1311 yyerror can be variadic.
1312
1313 * data/yacc.c (b4_yyerror_args): New.
1314 Use it when calling yyerror.
1315 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
1316 Use it when calling yyerror.
1317 * doc/bison.texinfo (Error Reporting): Adjust.
1318 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
1319 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
1320
6e40b4eb
AD
13212002-11-06 Akim Demaille <akim@epita.fr>
1322
1323 #line should have quoted strings.
1324 Ideally, this should be done by m4_quotearg.
1325
1326 * src/scan-skel.l: Include quotearg.h.
1327 Quote __ofile__.
1328 * src/output.c (symbol_printers_output)
1329 (symbol_destructors_output): Quote the file name.
1330
2dfbfc12
AD
13312002-11-06 Akim Demaille <akim@epita.fr>
1332
1333 * tests/regression.at (Invalid inputs): Adjust to the recent
1334 messages.
1335
437c2d80
AD
13362002-11-06 Akim Demaille <akim@epita.fr>
1337
1338 Restore --no-lines.
1339 Reported by Jim Kent.
1340
1341 * data/c.m4 (b4_syncline): New.
1342 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
1343 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
1344 * src/output.c (user_actions_output): Likewise.
1345 (prepare): Define 'b4_synclines_flag'.
2dfbfc12 1346 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
437c2d80 1347
900c5db5
AD
13482002-11-06 Akim Demaille <akim@epita.fr>
1349
1350 * src/main.c (main): Free `infile'.
1351 * src/scan-gram.l (handle_syncline): New.
1352 Recognize `#line'.
1353 * src/output.c (user_actions_output, symbol_destructors_output)
1354 (symbol_printers_output): Use the location's file name, not
1355 infile.
1356 * src/reader.c (prologue_augment, epilogue_set): Likewise.
1357
e183b123 13582002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
51b4a04c 1359
e183b123 1360 * src/tables.c (matching_state): Don't allow states to match if
51b4a04c 1361 either has GLR conflict entries.
e183b123 1362
193eb6b7
PE
13632002-11-05 Paul Eggert <eggert@twinsun.com>
1364
e183b123
PE
1365 * src/scan-gram.l: Use more accurate diagnostics, e.g.
1366 "integer out of range" rather than "invalid value".
1367 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
1368 accordingly.
1369
193eb6b7
PE
1370 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
1371 Also, remove one static variable in the scanner.
1372
1373 * src/scan-gram.l (braces_level): Now auto, not static.
1374 Initialize to zero if the compiler is being picky.
1375 (INITIAL): Clear braces_level instead of incrementing it.
1376 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
1377 as POSIX 1003.1-2001 requires.
1378 * src/system.h (IF_LINT): New macro, taken from coreutils.
1379 * configure.ac: Define "lint" if --enable-gcc-warnings.
1380
29c01725
AD
13812002-11-05 Akim Demaille <akim@epita.fr>
1382
1383 * src/scan-gram.l: When it starts with `%', complain about the
1384 whole directive, not just that `invalid character: %'.
1385
8aeac3ca
AD
13862002-11-04 Akim Demaille <akim@epita.fr>
1387
1388 * Makefile.maint: Update from Autoconf.
1389 (update, cvs-update, po-update, do-po-update): New.
1390
793a58bb
AD
13912002-11-04 Akim Demaille <akim@epita.fr>
1392
1393 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
1394 and yyerror.
1395 Have yyerror `use' its arguments.
1396 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
1397 returns true when location & yacc & pure & parse-param.
1398 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
1399
c4d720cd
AD
14002002-11-04 Akim Demaille <akim@epita.fr>
1401
1402 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
1403 clashes.
1404 * src/scan-gram.l: Use [\'] instead of ['] to pacify
1405 font-lock-mode.
1406 Use complain_at.
1407 Use quote, not quote_n since LOCATION_PRINT no longer uses the
1408 slot 0.
1409
613a0dc5
PE
14102002-11-03 Paul Eggert <eggert@twinsun.com>
1411
1412 * src/reader.c (get_merge_function, grammar_current_rule_check):
1413 Use consistent diagnostics for reporting type name clashes.
1414 Quote the types with <>, for consistency with Yacc.
1415 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
1416
2a8d363a
AD
14172002-11-03 Akim Demaille <akim@epita.fr>
1418
1419 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
1420 New.
1421 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
1422 (b4_parse_param): Remove.
1423 Use b4_identification.
1424 Propagate b4_pure_args where needed to pass them to yyerror.
1425 * data/glr.m4 (b4_parse_param): Remove.
1426 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
1427 (b4_lpure_formals): New.
1428 Use b4_identification.
1429 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
1430 b4_user_formals and b4_user_args.
1431 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
1432 (yyreportAmbiguity): When using a pure parser, also need
1433 the location, and the parse-params.
1434 Adjust callers.
1435 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
1436 When using a pure parser, also need the parse-params.
1437 Adjust callers.
1438 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
1439 (%pure-parser + %parse-param) LALR and GLR parsers.
1440 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
1441 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
1442 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
1443 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
1444 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
1445 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
1446 * doc/bison.texinfo: Untabify the whole file.
1447 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
1448 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
1449 (Error Reporting): Adjust to these new directives.
1450 Document %error-verbose, deprecate YYERROR_VERBOSE.
1451
9e32add8
AD
14522002-11-03 Akim Demaille <akim@epita.fr>
1453
1454 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
1455 AT_CHECK_CALC_GLR invocations to use % directives, instead of
1456 command line options.
1457 * tests/cxx-type.at: Formatting changes.
1458
b02d90a5
PE
14592002-11-03 Paul Eggert <eggert@twinsun.com>
1460
1461 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
1462 to count columns correctly, and to check for invalid inputs.
9e32add8 1463
b02d90a5
PE
1464 Use mbsnwidth to count columns correctly. Account for tabs, too.
1465 Include mbswidth.h.
1466 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
1467 (extend_location): New function.
1468 (YY_LINES): Remove.
1469
1470 Handle CRLF in C code rather than in Lex code.
1471 (YY_INPUT): New macro.
1472 (no_cr_read): New function.
1473
1474 Scan UCNs, even though we don't fully handle them yet.
1475 (convert_ucn_to_byte): New function.
1476
1477 Handle backslash-newline correctly in C code.
1478 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
1479 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
1480 all uses changed.
1481 (tag, splice): New EREs. Do not allow NUL or newline in tags.
1482 Use {splice} wherever C allows backslash-newline.
1483 YY_STEP after space, newline, vertical-tab.
1484 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
9e32add8 1485
b02d90a5
PE
1486 (letter, id): Don't assume ASCII; e.g., spell out a-z.
1487
1488 ({int}, handle_action_dollar, handle_action_at): Check for integer
1489 overflow.
9e32add8 1490
b02d90a5
PE
1491 (YY_STEP): Omit trailing semicolon, so that it's more like C.
1492
1493 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
1494 as well as \000. Check for UCHAR_MAX, not 255.
1495 Allow \x with an arbitrary positive number of digits, as in C.
1496 Check for overflow here.
1497 Allow \? and UCNs, for compatibility with C.
1498
1499 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
1500 with quote slot used by complain_at.
1501
1502 * tests/input.at: Add tests for backslash-newline, m4 quotes
1503 in symbols, long literals, and funny escapes in strings.
1504
1505 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
1506 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
1507 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
1508 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
1509 * m4/mbswidth.m4: New file, from GNU coreutils.
1510
1511 * doc/bison.texinfo (Grammar Outline): Document // comments.
1512 (Symbols): Document that trigraphs have no special meaning in Bison,
1513 nor is backslash-newline allowed.
1514 (Actions): Document that trigraphs have no special meaning.
1515
1516 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
1517 no longer used.
1518
15192002-11-02 Paul Eggert <eggert@twinsun.com>
1520
1521 * src/reader.c: Don't include quote.h; not needed.
1522 (get_merge_function): Reword warning to be consistent with
1523 type clash diagnostic in grammar_current_rule_check.
1524
1525 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
1526 bug in trigraph handling.
1527
1528 * src/output.c (prepare_symbols): When printing token names,
1529 escape "[" as "@<:@" and likewise for "]".
1530
1531 * src/system.h (errno): Remove declaration, as we are now
1532 assuming C89 or better, and C89 guarantees errno.
1533
762b212b
PE
15342002-10-30 Paul Eggert <eggert@twinsun.com>
1535
1536 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
1537 Check for close failures.
1538 * src/files.h (xfclose): Return void, not int, since it always
1539 returned zero.
1540 * src/files.c (xfclose): Likewise. Report I/O error if ferror
1541 indicates one.
1542 * src/output.c (output_skeleton): Use xfclose rather than fclose
1543 and ferror. xfclose now checks ferror.
1544
1545 * data/glr.c (YYLEFTMOST_STATE): Remove.
1546 (yyreportTree): Use a stack-based leftmost state. This avoids
1547 our continuing battles with bogus warnings about initializers.
1548
56100c60
AD
15492002-10-30 Akim Demaille <akim@epita.fr>
1550
1551 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
1552 #if.
1553
51b4a04c
PH
15542002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1555
1556 * tests/glr-regr1.at: New test for reported regressions.
1557 * tests/testsuite.at: Add glr-regr1.at test.
1558 * tests/Makefile.am: Add glr-regr1.at test.
e183b123 1559
bf1ebda2
PE
15602002-10-24 Paul Eggert <eggert@twinsun.com>
1561
5c16c6b1
PE
1562 Version 1.75a.
1563
bf1ebda2
PE
1564 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
1565 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
1566 we use malloc. Don't assume 'A' through 'Z' are contiguous.
1567 Don't assume strdup exists; POSIX says its an XSI extension.
1568 Check for buffer overflow on input.
1569
b526ee61
AD
15702002-10-24 Akim Demaille <akim@epita.fr>
1571
1572 * src/output.c (output_skeleton): Don't disable M4sugar comments
1573 too soon: it results in comments being expanded.
1574 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
1575 first output.
1576
f1886bb2
AD
15772002-10-24 Akim Demaille <akim@epita.fr>
1578
1579 * data/yacc.c (m4_int_type): New.
1580 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
1581 char' as only yacc.c wants K&R portability.
1582 * data/glr.c (yysigned_char): Remove.
1583 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
1584 Reported by Quoc Peyrot.
1585
c5576256
PE
15862002-10-23 Paul Eggert <eggert@twinsun.com>
1587
1588 * src/main.c (main): With --trace=time, report times even if a
1589 non-fatal error occurs. Formerly, the times were reported in some
1590 such cases but not in others.
1591 * src/reader.c (reader): Just return if a complaint has been issued,
1592 instead of exiting, so that 'main' can report times.
1593
27b0ffea
AD
15942002-10-22 Akim Demaille <akim@epita.fr>
1595
1596 * src/system.h: Include sys/types.
1597 Reported by Bert Deknuydt.
1598
223a7883
PE
15992002-10-23 Paul Eggert <eggert@twinsun.com>
1600
1601 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
1602 Suggested by Art Haas.
1603
16042002-10-22 Paul Eggert <eggert@twinsun.com>
1605
1606 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
1607 decl; not needed any more.
1608 * src/main.c (main): Use return to exit, undoing yesterday's change.
1609 The last OS that we could find where this wouldn't work is
1610 SunOS 3.5, and that's too old to worry about now.
1611
1612 * data/glr.c (struct yyltype): Define members even when not
1613 doing locations. This is more consistent with yacc.c, and it
1614 works around the following bug reports:
1615 http://mail.gnu.org/pipermail/bug-bison/2002-October/001764.html
1616 http://mail.gnu.org/pipermail/bug-bison/2002-October/001769.html
1617 and I hope it also fixes this bug report:
1618 http://mail.gnu.org/pipermail/bug-bison/2002-October/001748.html
27b0ffea 1619
223a7883
PE
1620 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
1621 @acronym consistently. Standardize on "Yacc" instead of "YACC",
1622 "Algol" instead of "ALGOL". Give a bit more history about BNF.
1623
8b76775a
AD
16242002-10-22 Akim Demaille <akim@epita.fr>
1625
1626 * data/README: New.
1627
6db10d14
PE
16282002-10-21 Paul Eggert <eggert@twinsun.com>
1629
1630 Be consistent about 'bool'; the old code used an enum in one
1631 module and an int in another, and this violates the C standard.
1632 * m4/stdbool.m4: New file, from coreutils 4.5.3.
1633 * configure.ac (AC_HEADER_STDBOOL): Add.
1634 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
1635 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
1636 * src/symtab.c (hash_compare_symbol_t): Likewise.
1637 * src/system.h (bool, false, true): Use a definition consistent
1638 with ../lib/hash.c. All uses changed.
1639
1640 * src/complain.c (warning_issued): Renamed from warn_message_count,
1641 so that we needn't worry about integer overflow (!).
1642 Now of type bool. All uses changed.
1643 (complaint_issued): Renamed from complain_message_count; likewise.
1644
1645 * src/main.c (main): Use exit to exit with failure.
27b0ffea 1646
6db10d14
PE
1647 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
1648 rather than 1 and 0.
1649 * src/main.c (main): Likewise.
1650 * src/getargs.c (getargs): Likewise.
1651 * src/reader.c (reader): Likewise.
1652
1653 * src/getarg.c (getargs): Remove duplicate code for
1654 "Try `bison --help'".
1655
1656 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
1657 What was that "2" for?
1658
1659 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
1660 * src/getargs.c (usage): Likewise.
1661
1662 * src/getargs.c (getargs): When there are too few operands, report
1663 the last one. When there are too many, report the first extra
1664 one. This is how diffutils does it.
1665
92a060fd
PE
16662002-10-20 Paul Eggert <eggert@twinsun.com>
1667
1668 Remove K&R vestiges.
1669 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
1670 * src/complain.c (VA_START): Remove. Assume prototypes.
1671 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
1672 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
1673 fatal): Assume prototypes.
1674 * src/complain.h: Assume prototypes.
1675 * src/system.h (PARAMS): Remove.
1676 Include <limits.h> unconditionally, since it's guaranteeed even
1677 for a freestanding C89 compiler.
1678 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
1679 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
8b76775a 1680
e7cb57c0
AD
16812002-10-20 Akim Demaille <akim@epita.fr>
1682
1683 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
1684 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
1685 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
1686 (yyresolveStates, yyresolveAction, yyresolveStack)
1687 (yyprocessOneStack): Use them.
1688 (yy_reduce_print): New.
1689 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
1690
0245f82d
AD
16912002-10-20 Akim Demaille <akim@epita.fr>
1692
1693 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
1694 arguments and output `void'.
1695 (b4_c_function): Rename as...
1696 (b4_c_function_def): this.
1697 (b4_c_function_decl, b4_c_ansi_function_def)
1698 (b4_c_ansi_function_decl): New.
1699 Change the interpretation of the arguments: before `int, foo', now
1700 `int foo, foo'.
1701 * data/yacc.c (yyparse): Prototype and define thanks to these.
1702 Adjust b4_c_function_def uses.
1703 * data/glr.c (yyparse): Likewise, but ANSI only.
1704
39912f52
AD
17052002-10-20 Akim Demaille <akim@epita.fr>
1706
1707 * src/output.c (prepare): Move the definition of `tokens_number',
1708 `nterms_number', `undef_token_number', `user_token_number_max'
1709 to...
1710 (prepare_tokens): Here.
1711 (prepare_tokens): Rename as...
1712 (prepare_symbols): this.
1713 (prepare): Move the definition of `rules_number' to...
1714 (prepare_rules): here.
1715 (prepare): Move the definition of `last', `final_state_number',
1716 `states_number' to...
1717 (prepare_states): here.
1718 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
1719
20c1e2ad
AD
17202002-10-20 Akim Demaille <akim@epita.fr>
1721
1722 * src/tables.h, src/tables.c, src/output.c: Comment changes.
1723
21964f43
AD
17242002-10-20 Akim Demaille <akim@epita.fr>
1725
1726 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
1727 * data/c.m4: here.
1728
66d30cd4
AD
17292002-10-20 Akim Demaille <akim@epita.fr>
1730
1731 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
1732 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
1733 `pair'.
1734 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
1735 `name' to...
1736 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
1737 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
1738 These.
1739
95f2c9fe
PE
17402002-10-19 Paul Eggert <eggert@twinsun.com>
1741
1742 Do not create a temporary file, as that involves security and
1743 cleanup headaches. Instead, use a pair of pipes.
1744 Derived from a suggestion by Florian Krohm.
1745 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
1746 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
1747 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
1748 (BISON_PREREQ_SUBPIPE): Add.
1749 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
1750 Add subpipe.h, subpipe.c.
1751 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
1752 * po/POTFILES.in: Add lib/subpipe.c.
1753 * src/output.c: Include "subpipe.h".
1754 (m4_invoke): Remove decl.
1755 (scan_skel): New decl.
1756 (output_skeleton): Use pipe rather than temporary file for m4 input.
1757 Check that m4sugar.m4 is readable, to avoid deadlock.
1758 Check for pipe I/O error.
1759 * src/scan-skel.l (readpipe): Remove decl.
1760 (scan_skel): New function, to be used in place of m4_invoke.
1761 Read from stream rather than file.
66d30cd4 1762
95f2c9fe
PE
1763 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
1764 float, as this generates a warning on Solaris 8 + GCC 3.2 with
1765 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
1766 this generates a more-accurate value anyway.
1767
1768 * lib/timevar.c (timervar_accumulate): Rename locals to
1769 avoid confusion with similarly-named more-global.
1770 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
1771
1772 * src/output.c (prepare): Use xstrdup to convert char const *
1773 to char *, to avoid GCC warning.
1774
c19988b7
AD
17752002-10-19 Akim Demaille <akim@epita.fr>
1776
1777 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
1778 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
1779 Use them to have `calc.y' ready for %pure-parser.
1780 * data/yacc.c (YYLEX): Pass a yylex return type to
1781 b4_c_function_call.
1782
ae7453f2
AD
17832002-10-19 Akim Demaille <akim@epita.fr>
1784
1785 Prototype support of %lex-param and %parse-param.
1786
1787 * src/parse-gram.y: Add the definition of the %lex-param and
1788 %parse-param tokens, plus their rules.
1789 Drop the `_' version of %glr-parser.
1790 Add the "," token.
1791 * src/scan-gram.l (INITIAL): Scan them.
1792 * src/muscle_tab.c: Comment changes.
1793 (muscle_insert, muscle_find): Rename `pair' as `probe'.
1794 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
1795 (muscle_entry_s): The `value' member is no longer const.
1796 Adjust all dependencies.
1797 * src/muscle_tab.c (muscle_init): Adjust: use
1798 MUSCLE_INSERT_STRING.
1799 Initialize the obstack earlier.
1800 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
1801 (muscle_pair_list_grow): New.
1802 * data/c.m4 (b4_c_function_call, b4_c_args): New.
1803 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
1804 * tests/calc.at: Use %locations, not --locations.
1805 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
1806
0e575721
AD
18072002-10-19 Akim Demaille <akim@epita.fr>
1808
1809 * src/getargs.c (usage): Take status as argument and exit
1810 accordingly.
1811 Report the traditional `Try ... --help' message when status != 0.
1812 (usage, version): Don't take a FILE * as arg, it is pointless.
1813 (getargs): When there is an incorrect number of arguments, make it
1814 an error, and report it GNUlically thanks to `usage ()'.
1815
724ce7f5
PE
18162002-10-18 Paul Eggert <eggert@twinsun.com>
1817
3a781eb2
PE
1818 * data/glr.c (yyreportParseError): Don't assume that sprintf
1819 yields the length of the printed string, as this is not true
1820 on SunOS 4.1.4. Reported by Peter Klein.
1821
724ce7f5
PE
1822 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
1823 * tests/conflicts.at (%nonassoc and eof): Likewise.
1824 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
1825
473d0a75
AD
18262002-10-17 Akim Demaille <akim@epita.fr>
1827
1828 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
1829 * src/getargs.c (trace_types, trace_args): Adjust.
1830 * src/reader.c (grammar_current_rule_prec_set)
1831 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
1832 Standardize error messages.
1833 And s/@prec/%prec/!
1834 (reader): Use trace_flag to enable scanner/parser debugging,
1835 instead of an adhoc scheme.
1836 * src/scan-gram.l: Remove trailing debugging code.
1837
e76d2469
PE
18382002-10-16 Paul Eggert <eggert@twinsun.com>
1839
93e2236a
PE
1840 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
1841 MUSCLE_TAB_H.
1842
e76d2469
PE
1843 * NEWS: Officially drop support for building Bison with K&R C,
1844 since it didn't work anyway and it's not worth worrying about.
1845 * Makefile.maint (wget_files): Remove ansi2knr.c.
1846 (ansi2knr.c-url_prefix): Remove.
1847 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
1848 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
1849 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
1850
5bd1c419
PE
18512002-10-15 Paul Eggert <eggert@twinsun.com>
1852
1853 Stop using the "enum_" trick for K&R-style function definitions;
1854 it confused me, and I was the author! Instead, assume that people
1855 who want to use K&R C compilers (when using these modules in GCC,
1856 perhaps?) will run ansi2knr.
1857
1858 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
1859 All uses of "enum_" changed to "enum ".
1860 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
1861 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
e76d2469 1862
5bd1c419
PE
1863 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
1864 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
1865 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
1866 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
1867 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
1868 abitset_not, abitset_ones, abitset_or, abitset_or_and,
1869 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
1870 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
1871 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
1872 Use function prototypes; this removes the need for declaring
1873 static functions simply to provide their prototypes.
1874 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
1875 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
1876 bitset_count_, bitset_create, bitset_dump, bitset_first,
1877 bitset_free, bitset_init, bitset_last, bitset_next,
1878 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
1879 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
1880 bitset_print, bitset_release_memory, bitset_toggle_,
1881 bitset_type_choose, bitset_type_get, bitset_type_name_get,
1882 debug_bitset): Likewise.
1883 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
1884 * lib/bitset_stats.c (bitset_log_histogram_print,
1885 bitset_percent_histogram_print, bitset_stats_and,
1886 bitset_stats_and_cmp, bitset_stats_and_or,
1887 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
1888 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
1889 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
1890 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
1891 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
1892 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
1893 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
1894 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
1895 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
1896 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
1897 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
1898 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
1899 bitset_stats_zero): Likewise.
1900 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
1901 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
1902 bitsetv_dump, debug_bitsetv): Likewise.
1903 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
1904 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
1905 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
1906 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
1907 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
1908 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
1909 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
1910 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
1911 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
1912 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
1913 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
1914 Likewise.
1915 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
1916 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
1917 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
1918 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
1919 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
1920 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
1921 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
1922 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
1923 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
1924 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
1925 lbitset_xor_cmp, lbitset_zero): Likewise.
e76d2469 1926
ae26e1f0
AD
19272002-10-14 Akim Demaille <akim@epita.fr>
1928
1929 Version 1.75.
1930
d43baf71
AD
19312002-10-14 Akim Demaille <akim@epita.fr>
1932
1933 * tests/Makefile.am (maintainer-check-posix): New.
1934
7ebc83e3
AD
19352002-10-14 Akim Demaille <akim@epita.fr>
1936
1937 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
1938 member.
1939
05846dae
AD
19402002-10-14 Akim Demaille <akim@epita.fr>
1941
1942 * src/tables.c (table_ninf_remap): base -> tab.
1943 Reported by Matt Rosing.
1944
1318e37d
PE
19452002-10-14 Paul Eggert <eggert@twinsun.com>
1946
447fbb17
PE
1947 * tests/action.at, tests/calc.at, tests/conflicts.at,
1948 tests/cxx-type.at, tests/headers.at, tests/input.at,
1949 tests/regression.at, tests/synclines.at, tests/torture.at:
1950 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
1951 so that the tests still work even if POSIXLY_CORRECT is set.
1952 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
05846dae 1953
1318e37d
PE
1954 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
1955 for portability to K&R hosts. Fix typo: signed char is guaranteed
1956 only to 127, not to 128.
1957 * data/glr.c (yysigned_char): New type.
1958 * data/yacc.c (yysigned_char): Likewise.
1959 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
1960
cc0f0794
PE
19612002-10-13 Paul Eggert <eggert@twinsun.com>
1962
5038f418
PE
1963 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
1964 true due to limited range of data type" warning from GCC.
1965
cc0f0794
PE
1966 * data/c.m4 (b4_token_defines): Protect against double-inclusion
1967 by wrapping enum yytokentype's definition inside #ifndef
1968 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
1969
6fed0802
AD
19702002-10-13 Akim Demaille <akim@epita.fr>
1971
1972 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
1973 Un yy- yyrhs to avoid the name clash with the global YYRHS.
1974
32f0598d
AD
19752002-10-13 Akim Demaille <akim@epita.fr>
1976
1977 * Makefile.maint: Update from Autoconf 2.54.
1978 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
1979
7ea9a33f
AD
19802002-10-13 Akim Demaille <akim@epita.fr>
1981
1982 * src/print.c (print_state): Separate the list of solved conflicts
1983 from the other items.
1984 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
1985
ea99527d
AD
19862002-10-13 Akim Demaille <akim@epita.fr>
1987
1988 Let nondeterministic skeletons be usable with deterministic
1989 tables.
1990
1991 With the patch, GAWK compiled by GCC without -O2 passes its test
1992 suite using a GLR parser driven by LALR tables. It fails with -O2
1993 because `struct stat' gives two different answers on my machine:
1994 88 (definition of an auto var) and later 96 (memset on this var).
1995 Hence the stack is badly corrumpted. The headers inclusion is to
1996 blame: if I move the awk.h inclusion before GLR's system header
1997 inclusion, the two struct stat have the same size.
1998
1999 * src/tables.c (pack_table): Always create conflict_table.
2000 (token_actions): Always create conflict_list.
2001 * data/glr.c (YYFLAG): Remove, unused.
2002
f377f69f
AD
20032002-10-13 Akim Demaille <akim@epita.fr>
2004
2005 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
2006 (O0FLAGS): New.
2007 (VALGRIND, GXX): New.
2008 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
2009 * tests/bison.in: Run $PREBISON a pre-command.
2010 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
2011 (maintainer-check-g++): New.
2012 * Makefile.am (maintainer-check): New.
2013
2a1fe6ed
AD
20142002-10-13 Akim Demaille <akim@epita.fr>
2015
2016 * data/glr.c: Formatting changes.
2017 Tweak some trace messages to match yacc.c's.
2018
f50adbbd
AD
20192002-10-13 Akim Demaille <akim@epita.fr>
2020
2021 GLR parsers sometimes raise parse errors instead of performing the
2022 default reduction.
2023 Reported by Charles-Henry de Boysson.
2024
2025 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
2026 check the length of the traces when %glr.
2027 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
2028 GLR's traces.
2029 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
2030 Test GLR parsers.
2031 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
2032 (yyltype): Remove the yy prefix from the member names.
2033 (yytable): Complete its comment.
2034 (yygetLRActions): Map error action number from YYTABLE from
2035 YYTABLE_NINF to 0.
2036 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
2037 (which was a bug: it should have been YYTABEL_NINF, and yet it was
2038 not satisfying as we could compare an YYACTION computed from
2039 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
2040 only value for error actions.
2041 (yyreportParseError): In verbose parse error messages, don't issue
2042 `error' in the list of expected tokens.
2043 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
2044 next action to perform to match glr.c's decoding.
2045 (yytable): Complete its comment.
2046
bcbad5b9
PE
20472002-10-13 Paul Eggert <eggert@twinsun.com>
2048
2049 Fix problem reported by Henrik Grubbstroem in
2050 <http://mail.gnu.org/pipermail/bug-bison/2002-October/001670.html>:
2051 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
2052 because the Bison parser reads the second action before reducing
2053 the first one.
2054 * src/scan-gram.l (rule_length): New static var.
2055 Use it to keep track of the rule length in the scanner, since
2056 we can't expect the parser to be in lock-step sync with the scanner.
2057 (handle_action_dollar, handle_action_at): Use this var.
2058 * tests/actions.at (Exotic Dollars): Test for the problem.
05846dae 2059
14904b89
PE
20602002-10-12 Paul Eggert <eggert@twinsun.com>
2061
1fe611e5
PE
2062 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
2063 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
2064 Include <sys/time.h> when checking for clock_t and struct tms.
2065 Use same include order as source.
2066 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
2067 <http://mail.gnu.org/pipermail/bug-bison/2002-October/001674.html>.
05846dae 2068
1fe611e5
PE
2069 * lib/timevar.c: Update copyright date and clarify comments.
2070 (get_time) [IN_GCC]: Keep the GCC version for reference.
05846dae 2071
1fe611e5
PE
2072 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
2073 GCC version as of today, then merge Bison's changes.
2074 Change "GCC" to "Bison" in copyright notice. timevar.def's
2075 author is Akim, so change that too.
2076
98194095
PE
2077 * src/reader.c (grammar_current_rule_check):
2078 Don't worry about the default action if $$ is untyped.
2079 Prevents bogus warnings reported by Jim Gifford in
2080 <http://mail.gnu.org/pipermail/bug-bison/2002-October/001673.html>.
2081
14904b89
PE
2082 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
2083 * data/glr.c, data/lalr1.cc, data/yacc.c:
2084 Output token definitions before the first part of user declarations.
2085 Fixes compatibility problem reported by Jim Gifford for kbd in
2086 <http://mail.gnu.org/pipermail/bug-bison/2002-October/001672.html>.
2087
ff6dca18
PE
20882002-10-11 Paul Eggert <eggert@twinsun.com>
2089
2090 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
2091 (yyparse): here. This undoes some of the 2002-07-25 change.
2092 Compatibility problem reported by Ralf S. Engelschall with
2093 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
2094
eb714592
AD
20952002-10-11 Akim Demaille <akim@epita.fr>
2096
2097 * tests/regression.at Characters Escapes): New.
2098 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
2099 characters.
2100 Reported by Jan Nieuwenhuizen.
2101
b7195100
AD
21022002-10-11 Akim Demaille <akim@epita.fr>
2103
2104 * po/id.po: New.
2105
f28a0f2d
PE
21062002-10-10 Paul Eggert <eggert@twinsun.com>
2107
2108 Portability fixes for bitsets; this also avoids several GCC
2109 warnings.
2110
2111 * lib/abitset.c: Include <stddef.h>, for offsetof.
2112 * lib/lbitset.c: Likewise.
2113
2114 * lib/abitset.c (abitset_bytes): Return a size that is aligned
2115 properly for vectors of objects. Do not assume that adding a
2116 header size to a multiple of a word size yields a value that is
2117 properly aligned for the whole union.
2118 * lib/bitsetv.c (bitsetv_alloc): Likewise.
2119
2120 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
2121 unique names for structures.
2122 * lib/ebitset.c (ebitset_bytes): Likewise.
2123 * lib/lbitset.c (lbitset_bytes): Likewise.
2124
2125 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
2126 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
2127 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
2128 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
2129 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
2130 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
2131 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
2132 to improve the type-checking that GCC can do.
2133 * lib/bitset.c (bitset_op4_cmp): Likewise.
2134 * lib/bitset_stats.c (bitset_stats_count,
2135 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
2136 bitset_stats_copy, bitset_stats_disjoint_p,
2137 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
2138 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
2139 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
2140 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
2141 bitset_stats_and_or_cmp, bitset_stats_andn_or,
2142 bitset_stats_andn_or_cmp, bitset_stats_or_and,
2143 bitset_stats_or_and_cmp): Likewise.
2144 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
2145 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
2146 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
2147 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
2148
2149 * lib/abitset.h: Include bitset.h, not bbitset.h.
2150 * lib/ebitset.h: Likewise.
2151 * lib/lbitset.h: Likewise.
2152
2153 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
2154 All instances of parameters of type enum bitset_opts are now of
2155 type enum_bitset_opts, to conform to the C Standard, and similarly
2156 for enum_bitset_type.
2157 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
2158 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
2159
2160 Do not use "struct bitset_struct" to mean different things in
2161 different modules. Not only is this confusing, it violates
2162 the C Standard, which requires that structure types in different
2163 modules must be compatible if one is to be passed to the other.
2164 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
2165 All instances of "struct bitset_struct *" replaced with "bitset".
2166 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
2167 (union bitset_union, struct abitset_struct, struct ebitset_struct,
2168 struct lbitset_struct, struct bitset_stats_struct): New types.
2169 All uses of struct bitset_struct changed to union bitset_union,
2170 etc.
2171 * lib/abitset.c (struct abitset_struct, abitset,
2172 struct bitset_struct): Remove.
2173 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
2174 struct bitset_struct): Remove.
2175 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
2176 bitset_struct): Remove.
2177 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
2178 Likewise.
2179
2180 Do not call a function of type T using a call that assumes the
2181 function is of a different type U. Standard C requires that a
2182 function must be called with a type that is compatible with its
2183 definition.
2184 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
2185 New decls.
2186 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
2187 New functions.
2188 * lib/ebitset.c (PFV): Remove.
2189 * lib/lbitset.c (PFV): Likewise.
2190 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
2191 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
2192 decls.
2193 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
2194 (ebitset_vtable): Use them.
2195 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
2196 lbitset_xor): New functions.
2197 (lbitset_vtable): Use them.
2198
2199 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
2200 Declare.
2201
2202 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
2203 GCC warning.
2204 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
2205 Use offsetof, for simplicity.
2206
6fbe4984
PE
22072002-10-06 Paul Eggert <eggert@twinsun.com>
2208
2209 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
2210 the same width as int. This reapplies a hunk of the 2002-08-12 patch
2211 <http://mail.gnu.org/pipermail/bison-patches/2002-August/001111.html>,
2212 which was inadvertently undone by the 2002-09-30 patch.
2213 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
2214 the same width as int.
2215
420f93c8
PE
22162002-10-04 Paul Eggert <eggert@twinsun.com>
2217
2218 Version 1.50.
2219
2220 * configure.ac (AC_INIT), NEWS: Increment version number.
2221
2222 * doc/bison.texinfo: Minor spelling, grammar, and white space
2223 fixes.
2224 (Symbols): Mention that any negative value returned from yylex
2225 signifies end-of-input. Warn about negative chars. Mention
2226 the portable Standard C character set.
2227
2228 The GNU coding standard says CFLAGS and YFLAGS are reserved
2229 for the installer to set.
2230 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
2231 * src/Makefile.am (AM_CFLAGS): Likewise.
2232 (AM_YFLAGS): Renamed from YFLAGS.
2233
2234 Fix some MAX and MIN problems.
2235 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
2236 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
2237 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
2238 * src/reader.c (reader): Use it.
2239
2240 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
2241 POSIX 1003.1-2001 has removed fgrep.
2242
22432002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
2244
2245 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
2246 interpreted as signed.
2247 * lib/ebitset.c (ebitset_list): Fix bug.
2248
ff68026d
PE
22492002-10-01 Paul Eggert <eggert@twinsun.com>
2250
2251 More fixes for 64-bit hosts and large bitsets.
2252
2253 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
2254 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
2255 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
2256 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
2257 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
2258 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
2259 bitset_count_): Likewise.
2260 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
2261 bitset_first, bitset_last): Likewise.
2262 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
2263 bitset_stats_list_reverse, bitset_stats_size,
2264 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
2265 Likewise.
2266 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
2267 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
2268 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
2269 bitsetv_reflexive_transitive_closure): Likewise.
2270 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
2271 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
2272 Likewise.
2273 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
2274 Likewise.
420f93c8 2275
ff68026d
PE
2276 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
2277 Use size_t, not unsigned int, to count bytes.
2278 * lib/abitset.h (abitset_bytes): Likewise.
2279 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
2280 Likewise.
2281 * lib/bitset.h (bitset_bytes): Likewise.
2282 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
2283 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
2284 * lib/bitsetv.c (bitsetv_alloc): Likewise.
2285 * lib/ebitset.c (ebitset_bytes): Likewise.
2286 * lib/ebitset.h (ebitset_bytes): Likewise.
2287 * lib/lbitset.c (lbitset_bytes): Likewise.
2288 * lib/lbitset.h (lbitset_bytes): Likewise.
420f93c8 2289
ff68026d
PE
2290 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
2291 abitset_subset_p, abitset_disjoint_p, abitset_and,
2292 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
2293 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
2294 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
2295 abitset_or_and, abitset_or_and_cmp):
2296 Use bitset_windex instead of unsigned int.
2297 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
2298 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
2299 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
2300 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
2301 Likewise.
2302 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
420f93c8 2303
ff68026d
PE
2304 * lib/bitset.c (bitset_print):
2305 Use proper printf formats for widths of integer types.
2306 * lib/bitset_stats.c (bitset_percent_histogram_print,
2307 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
2308 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
2309 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
2310 * lib/lbitset.c (lbitset_bytes): Likewise.
420f93c8 2311
ff68026d
PE
2312 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
2313 BITSET_SIZE_MAX): New macros.
2314 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
2315 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
2316 to BITSET_WINDEX_MAX.
2317
2318 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
2319 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
2320 since we now return the bitset_bindex type (not int).
2321
2322 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
2323 when computing sizes.
2324 * lib/ebitset.c (ebitset_elts_grow): Likewise.
2325
2326 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
2327 and avoid cast to unsigned.
2328
6aa452a6
AD
23292002-09-30 Akim Demaille <akim@epita.fr>
2330
2331 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
2332 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
2333 Updates from Michael Hayes.
2334
927f7817
AD
23352002-09-30 Art Haas <ahaas@neosoft.com>
2336
2337 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
2338 invocations.
2339 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
2340 defined.
2341
9738f41e
AD
23422002-09-27 Akim Demaille <akim@epita.fr>
2343
2344 Version 1.49c.
2345
a5c75d7f
AD
23462002-09-27 Akim Demaille <akim@epita.fr>
2347
2348 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
2349 (Because of AC_LIBSOURCE).
2350
8280e179
AD
23512002-09-27 Akim Demaille <akim@epita.fr>
2352
2353 Playing with Autoscan.
2354
2355 * configure.ac: Remove the old LIBOBJ tweaks.
2356 (AC_REPLACE_FUNCS): Add strrchr and strtol.
2357 * lib/strrchr.c: New.
2358 * lib/strtol.c: New, from the Coreutils 4.5.1.
2359
ae64af35
AD
23602002-09-27 Akim Demaille <akim@epita.fr>
2361
2362 Playing with Autoscan.
2363
2364 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
2365 * lib/Makefile.am (libbison_a_SOURCES): No longer include
2366 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
2367 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
2368 Coreutils 4.5.1.
2369
d1a1114f
AD
23702002-09-24 Akim Demaille <akim@epita.fr>
2371
2372 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
2373 (Frequently Asked Questions, Parser Stack Overflow): New.
2374
b906441c
AD
23752002-09-13 Akim Demaille <akim@epita.fr>
2376
2377 Playing with autoscan.
2378
2379 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
2380 * src/files.c (skeleton_find): Remove, unused.
2381 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
2382 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
2383
bd701811
AD
23842002-09-13 Akim Demaille <akim@epita.fr>
2385
2386 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
2387 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
2388
e0a13e7b
AD
23892002-09-13 Akim Demaille <akim@epita.fr>
2390
2391 * configure.ac: Require 2.54.
2392 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
2393 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
2394 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
2395 Remove, provided by Autoconf macros.
2396
c97011bf
AD
23972002-09-12 Akim Demaille <akim@epita.fr>
2398
2399 * m4/prereq.m4: Update, from Coreutils 4.5.1.
2400
d862b1be
AD
24012002-09-12 Akim Demaille <akim@epita.fr>
2402
2403 * m4/prereq.m4: Update, from Fileutils 4.1.5.
2404 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
2405 Reported by Martin Mokrejs.
2406
3d38c03a
AD
24072002-09-10 Akim Demaille <akim@epita.fr>
2408
2409 * src/parse-gram.y: Associate a human readable string to each
2410 token type.
2411 * tests/regression.at (Invalid inputs): Adjust.
2412
b6347355
AD
24132002-09-10 Gary V. Vaughan <gary@gnu.org>
2414
2415 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
2416 with an Autoconf-2.5x style configure.ac.
2417
09ba4ab2
PE
24182002-09-06 Paul Eggert <eggert@twinsun.com>
2419
2420 * doc/bison.texinfo (Conditions): Make explicit that the GPL
2421 exception applies only to yacc.c. This is a modification of a
2422 patch originally suggested by Akim Demaille.
2423
21846f69
AD
24242002-09-06 Akim Demaille <akim@epita.fr>
2425
09ba4ab2
PE
2426 * data/c.m4 (b4_copyright): Move the GPL exception comment from
2427 here to...
2428 * data/yacc.c: here.
2429
21846f69
AD
2430 * data/lalr1.cc (struct yyltype): Don't define it, since we use
2431 LocationType.
2432 (b4_ltype): Default to yy::Location from location.hh.
2433
c0ad8bf3
AD
24342002-09-04 Jim Meyering <jim@meyering.net>
2435
2436 * data/yacc.c: Guard the declaration of yytoknum also with
2437 `#ifdef YYPRINT', so it is declared only when used.
2438
3a93251e
AD
24392002-09-04 Akim Demaille <akim@epita.fr>
2440
2441 * configure.in: Rename as...
2442 * configure.ac: this.
2443 Bump to 1.49c.
2444
427c0dda
AD
24452002-09-04 Akim Demaille <akim@epita.fr>
2446
2447 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
2448 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
2449 translate maintainer only messages.
2450
6a254321
PE
24512002-08-12 Paul Eggert <eggert@twinsun.com>
2452
645e30d1
PE
2453 Version 1.49b.
2454
6a254321
PE
2455 * Makefile.am (SUBDIRS): Remove intl.
2456 (DISTCLEANFILES): Remove.
2457 * NEWS: Mention that GNU M4 is now required. Clarify what is
2458 meant by "larger grammars". Mention the pt_BR translation.
2459 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
2460 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
2461 Bump version from 0.11.2 to 0.11.5.
2462 (BISON_PREREQ_STAGE): Remove.
2463 (AM_GNU_GETTEXT): Use external gettext.
2464 (AC_OUTPUT): Remove intl/Makefile.
2465
2466 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
2467
2468 * data/glr.c: Include string.h, for strlen.
2469 (yyreportParseError): Use size_t for yysize.
2470 (yy_yypstack): No longer nested inside yypstates, as nested
2471 functions are not portable. Do not assume size_t is the
2472 same width as int.
2473 (yypstates): Do not assume that ptrdiff_t is the same width
2474 as int, and similarly for yyposn and YYINDEX.
2475
2476 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
2477
2478 * lib/Makefile.am (INCLUDES): Do not include from the intl
2479 directory, which has been removed.
2480 * src/Makefile.am (INCLUDES): Likewise.
2481
2482 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
2483 (bitsets_sources, additional_bitsets_sources, timevars_sources):
2484 New vars.
2485
2486 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
2487 * tests/Makefile.am (EXTRA_DIST): Likewise.
2488
2489 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
2490 Do not assume that bitset_windex is the same width as unsigned.
2491
2492 * lib/abitset.c (abitset_unused_clear): Do not assume that
2493 bitset_word is the same width as int.
2494 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
2495 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
2496 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
2497 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
2498 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
2499
2500 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
2501 portability to one's complement hosts!).
2502 * lib/ebitset.c (ebitset_op1): Likewise.
2503 * lib/lbitset.c (lbitset_op1): Likewise.
2504
2505 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
2506 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
2507 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
2508 Sync with fileutils.
2509 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
2510 lib/gettext.h: Sync with diffutils.
2511
2512 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
2513 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
2514
2515 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
2516 PROTOTYPES to check for prototypes, and "defined __STDC__" to
2517 check for void *.
2518
2519 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
2520 size_t; the old version tried to do this but casted improperly.
2521 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
2522 (bitset_test): Now returns int, not unsigned long.
2523
2524 * lib/bitset_stats.c: Include "gettext.h".
2525 (_): New macro.
2526 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
2527 name locals "index", as it generates unnecessary warnings on some
2528 hosts that have an "index" function.
2529
2530 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
2531 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
2532 they need translation.
2533 * src/LR0.c (state_list_append, new_itemsets, get_state,
2534 append_states, generate_states): Likewise.
2535 * src/assoc.c (assoc_to_string): Likewise.
2536 * src/closure.c (print_closure, set_firsts, closure): Likewise.
2537 * src/gram.c (grammar_dump): Likewise.
2538 * src/injections.c (injections_compute): Likewise.
2539 * src/lalr.c (lookaheads_print): Likewise.
2540 * src/relation.c (relation_transpose): Likewise.
2541 * src/scan-gram.l: Likewise.
2542 * src/tables.c (table_grow, pack_vector): Likewise.
2543
2544 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
2545 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
2546 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
2547 * m4/mbstate_t.m4: Sync with fileutils.
2548 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
2549
2550 * po/LINGUAS: Add pt_BR.
2551 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
2552 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
2553 lib/timevar.c.
2554 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
2555 manual recommends.
2556 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
2557
2558 * src/complain.c (strerror_r): Remove decl; not needed.
2559 (strerror): Use same pattern as ../lib/error.c.
2560
2561 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
2562
2563 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
2564
2565 * src/main.c (main): Cast result of bindtextdomain and textdomain
2566 to void, to avoid a GCC warning when --disable-nls is in effect.
2567
2568 * src/scan-gram.l: Use strings rather than escapes when possible,
2569 to minimize the number of warnings from xgettext.
2570 (handle_action_dollar, handle_action_at): Don't use isdigit,
2571 as it mishandles negative chars and it may not work as expected
2572 outside the C locale.
2573
2574 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
2575 this is a GCC extension and is not portable to other compilers.
2576
2577 * src/system.h (alloca): Use same pattern as ../lib/error.c.
2578 Do not include <ctype.h>; no longer needed.
2579 Do not include <malloc.h>; no longer needed (and generates
2580 warnings on OpenBSD 3.0).
2581
2582 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
2583 it's not portable.
2584
2585 * tests/regression.at: Do not use 'cc -c input.c -o input';
2586 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
2587
2588 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
2589 exit status as failure, not just exit status 1. Sun C exits
2590 with status 2 sometimes.
2591
2592 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
2593 Use it for the two large tests.
2594
c8f002c7
AD
25952002-08-02 Akim Demaille <akim@epita.fr>
2596
2597 * src/conflicts.c (conflicts_output): Don't output rules never
2598 reduced here, since anyway that computation doesn't work.
2599 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
2600 (rule_useless_p, rule_never_reduced_p): New.
2601 (grammar_rules_partial_print): Use a filter instead of a range.
2602 Display the title only if needed.
2603 (grammar_rules_print): Adjust.
2604 (grammar_rules_never_reduced_report): New.
2605 * src/tables.c (action_row): Move the computation of rules never
2606 reduced to...
2607 (token_actions): here.
2608 * src/main.c (main): Make the parser before making the report, so
2609 that rules never reduced are computed.
2610 Call grammar_rules_never_reduced_report.
2611 * src/print.c (print_results): Report rules never reduced.
2612 * tests/conflicts.at, tests/reduce.at: Adjust.
2613
cd08e51e
AD
26142002-08-01 Akim Demaille <akim@epita.fr>
2615
2616 Instead of attaching lookaheads and duplicating the rules being
2617 reduced by a state, attach the lookaheads to the reductions.
2618
2619 * src/state.h (state_t): Remove the `lookaheads',
2620 `lookaheads_rule' member.
2621 (reductions_t): Add a `lookaheads' member.
2622 Use a regular array for the `rules'.
2623 * src/state.c (reductions_new): Initialize the lookaheads member
2624 to 0.
2625 (state_rule_lookaheads_print): Adjust.
2626 * src/state.h, src/state.c (state_reductions_find): New.
2627 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
2628 (count_rr_conflicts): Adjust.
2629 * src/lalr.c (LArule): Remove.
2630 (add_lookback_edge): Adjust.
2631 (state_lookaheads_count): New.
2632 (states_lookaheads_initialize): Merge into...
2633 (initialize_LA): this.
2634 (lalr_free): Adjust.
2635 * src/main.c (main): Don't free nullable and derives too early: it
2636 is used by --verbose.
2637 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
2638
bb0027a9
AD
26392002-08-01 Akim Demaille <akim@epita.fr>
2640
2641 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
2642 `rule_number_t**'.
2643 (set_derives, free_derives): Rename as...
2644 (derives_compute, derives_free): this.
2645 Adjust all dependencies.
2646 * src/nullable.c (set_nullable, free_nullable): Rename as...
2647 (nullable_compute, nullable_free): these.
2648 (rule_list_t): Store rule_t *, not rule_number_t.
2649 * src/state.c (state_rule_lookaheads_print): Directly compare rule
2650 pointers, instead of their numbers.
2651 * src/main.c (main): Call nullable_free, and derives_free earlier,
2652 as they were lo longer used.
2653
3325ddc4
AD
26542002-08-01 Akim Demaille <akim@epita.fr>
2655
2656 * lib/timevar.c (get_time): Include children time.
2657 * src/lalr.h (LA, LArule): Don't export them: used with the
2658 state_t.
2659 * src/lalr.c (LA, LArule): Static.
2660 * src/lalr.h, src/lalr.c (lalr_free): New.
2661 * src/main.c (main): Call it.
2662 * src/tables.c (pack_vector): Check whether loc is >= to the
2663 table_size, not >.
2664 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
2665 (tables_generate): do it, since that's also it which allocates
2666 them.
2667 Don't free LA and LArule, main does.
2668
c6f1a33c
AD
26692002-07-31 Akim Demaille <akim@epita.fr>
2670
2671 Separate parser tables computation and output.
2672
2673 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
2674 (conflict_list, conflict_list_cnt, table, check, table_ninf)
2675 (yydefgoto, yydefact, high): Move to...
2676 * src/tables.h, src/tables.c: here.
2677 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
2678 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
2679 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
2680 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
2681 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
2682 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
2683 (action_row, save_row, token_actions, save_column, default_goto)
2684 (goto_actions, sort_actions, matching_state, pack_vector)
2685 (table_ninf_remap, pack_table, prepare_actions): Move to...
2686 * src/tables.c: here.
2687 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
2688 * src/output.c (token_actions, output_base, output_conflicts)
2689 (output_check): Merge into...
2690 (prepare_actions): this.
2691 (actions_output): Rename as...
2692 (user_actions_output): this.
2693 * src/main.c (main): Call tables_generate and tables_free.
2694
1509d42f
AD
26952002-07-31 Akim Demaille <akim@epita.fr>
2696
2697 Steal GCC's --time-report support.
2698
2699 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
2700 stolen/adjusted from GCC.
2701 * m4/stage.m4: Remove time related checks.
2702 * m4/timevar.m4: New.
2703 * configure.in: Adjust.
2704 * src/system.h: Adjust to using timevar.h.
2705 * src/getargs.h, src/getargs.c: Support trace_time for
2706 --trace=time.
2707 * src/main.c (stage): Remove.
2708 (main): Replace `stage' invocations with timevar calls.
2709 * src/output.c: Insert pertinent timevar calls.
2710
273a74fa
AD
27112002-07-31 Akim Demaille <akim@epita.fr>
2712
2713 Let --trace have arguments.
2714
2715 * src/getargs.h (enum trace_e): New.
2716 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
2717 (long_options, short_options): --trace/-T takes an optional
2718 argument.
2719 Change all the uses of trace_flag to reflect the new flags.
2720 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
2721
2722 Strengthen `stage' portability.
2723
2724 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
2725 * configure.in: Use it.
2726 Don't check for malloc.h and sys/times.h.
2727 * src/system.h: Include them when appropriate.
2728 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
2729 times and struct tms are available.
2730
217598da
AD
27312002-07-30 Akim Demaille <akim@epita.fr>
2732
2733 In verbose parse error message, don't report `error' as an
2734 expected token.
2735 * tests/actions.at (Printers and Destructors): Adjust.
2736 * tests/calc.at (Calculator $1): Adjust.
2737 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
2738 error message, do not report the parser accepts the error token in
2739 that state.
2740
52489d44
AD
27412002-07-30 Akim Demaille <akim@epita.fr>
2742
2743 Normalize conflict related messages.
2744
2745 * src/complain.h, src/complain.c (warn, complain): New.
2746 * src/conflicts.c (conflicts_print): Use them.
2747 (conflict_report_yacc): New, extracted from...
2748 (conflicts_print): here.
2749 * tests/conflicts.at, tests/existing.at: Adjust.
2750
e8832397
AD
27512002-07-30 Akim Demaille <akim@epita.fr>
2752
2753 Report rules which are never reduced by the parser: those hidden
2754 by conflicts.
2755
2756 * src/LR0.c (save_reductions): Don't make the final state too
2757 different: save its reduction (accept) instead of having a state
2758 without any action (no shift or goto, no reduce).
2759 Note: the final state is now a ``regular'' state, i.e., the
2760 parsers now contain `reduce 0' as default reduction.
2761 Nevertheless, since they decide to `accept' when yystate =
2762 final_state, they still will not reduce rule 0.
2763 * src/print.c (print_actions, print_reduction): Adjust.
2764 * src/output.c (action_row): Track reduced rules.
2765 (token_actions): Report rules never reduced.
2766 * tests/conflicts.at, tests/regression.at: Adjust.
2767
caf23d24
AD
27682002-07-30 Akim Demaille <akim@epita.fr>
2769
2770 `stage' was accidently included in a previous patch.
2771 Initiate its autoconfiscation.
2772
2773 * configure.in: Look for malloc.h and sys/times.h.
2774 * src/main.c (stage): Adjust.
2775 Report only when trace_flag.
2776
640748ee
AD
27772002-07-29 Akim Demaille <akim@epita.fr>
2778
2779 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
2780 state_number_t.
2781 (errs_t): symbol_t*, not symbol_number_t.
2782 (reductions_t): rule_t*, not rule_number_t.
2783 (FOR_EACH_SHIFT): New.
2784 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
2785 * src/print.c, src/print_graph.c: Adjust.
2786
88bce5a2
AD
27872002-07-29 Akim Demaille <akim@epita.fr>
2788
2789 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
2790
2791 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
2792 (endtoken, accept): these.
2793 * src/reader.c (reader): Set endtoken's default tag to "$end".
2794 Set undeftoken's tag to "$undefined" instead of "$undefined.".
2795 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
2796 Adjust.
2797
1bfb97db
AD
27982002-07-29 Akim Demaille <akim@epita.fr>
2799
2800 * src/reduce.c (reduce_grammar): When the language is empty,
2801 complain about the start symbol, not the axiom.
2802 Use its location.
2803 * tests/reduce.at (Empty Language): New.
2804
fc5734fe
AD
28052002-07-26 Akim Demaille <akim@epita.fr>
2806
2807 * src/reader.h, src/reader.c (gram_error): ... can't get
2808 yycontrol without making too strong assumptions on the parser
2809 itself.
2810 * src/output.c (prepare_tokens): Use the real 0th value of
2811 token_translations instead of `0'.
2812 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
2813 visible here.
2814 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
2815 for the time being: %locations ought to provide it to yyerror.
2816
3650b4b8
AD
28172002-07-25 Akim Demaille <akim@epita.fr>
2818
2819 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
2820 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
2821 * tests/regression.at (Web2c Actions): Adjust.
2822
4b3d3a8e
AD
28232002-07-25 Akim Demaille <akim@epita.fr>
2824
2825 Stop storing rules from 1 to nrules + 1.
2826
2827 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
2828 * src/nullable.c, src/output.c, src/print.c, src/reader.c
2829 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
2830 Iterate from 0 to nrules.
2831 Use rule_number_as_item_number and item_number_as_rule_number.
2832 Adjust to `derive' now containing possibly 0.
2833 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
2834 Handle the `- 1' part in rule numbers from/to item numbers.
2835 * src/conflicts.c (log_resolution): Fix the message which reversed
2836 shift and reduce.
2837 * src/output.c (action_row): Initialize default_rule to -1.
2838 (token_actions): Adjust.
2839 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
2840 expected output.
2841 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
2842
4a2a22f4
AD
28432002-07-25 Akim Demaille <akim@epita.fr>
2844
2845 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
2846 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
2847 (b4_c_knr_arg_decl): New.
2848 * data/yacc.c: Use it to define yysymprint, yydestruct, and
2849 yyreport_parse_error.
2850
b8df3223
AD
28512002-07-25 Akim Demaille <akim@epita.fr>
2852
2853 * data/yacc.c (yyreport_parse_error): New, extracted from...
2854 (yyparse): here.
2855 (yydestruct, yysymprint): Move above yyparse.
2856 Be K&R compliant.
2857
a762e609
AD
28582002-07-25 Akim Demaille <akim@epita.fr>
2859
2860 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
2861 replace...
2862 (b4_sint_type, b4_uint_type): these.
2863 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
2864 * tests/regression.at (Web2c Actions): Adjust.
2865
12b0043a
AD
28662002-07-25 Akim Demaille <akim@epita.fr>
2867
2868 * src/gram.h (TIEM_NUMBER_MAX): New.
2869 (item_number_of_rule_number, rule_number_of_item_number): Rename
2870 as...
2871 (rule_number_as_item_number, item_number_as_rule_number): these.
2872 Adjust dependencies.
2873 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
2874 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
2875 (symbol_number_to_vector_number): New.
2876 (order): Of vector_number_t* type.
2877 (base_t, BASE_MAX, BASE_MIN): New.
2878 (froms, tos, width, pos, check): Of base_t type.
2879 (action_number_t, ACTION_MIN, ACTION_MAX): New.
2880 (actrow): Of action_number_t type.
2881 (conflrow): Of unsigned int type.
2882 (table_ninf, base_ninf): New.
2883 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
2884 (muscle_insert_int_table, muscle_insert_base_table)
2885 (muscle_insert_rule_number_table): New.
2886 (prepare_tokens): Output `toknum' as int_table.
2887 (action_row): Returns a rule_number_t.
2888 Use ACTION_MIN, not SHRT_MIN.
2889 (token_actions): yydefact is rule_number_t*.
2890 (table_ninf_remap): New.
2891 (pack_table): Use it for `base' and `table'.
2892 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
2893 replaced with...
2894 (YYPACT_NINF, YYTABLE_NINF): these.
2895 (yypact, yytable): Compute their types instead of hard-coded
2896 `short'.
2897 * tests/regression.at (Web2c Actions): Adjust.
2898
5dde258a
AD
28992002-07-19 Akim Demaille <akim@epita.fr>
2900
2901 * src/scan-gram.l (id): Can start with an underscore.
2902
a945ec39
AD
29032002-07-16 Akim Demaille <akim@epita.fr>
2904
2905 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
2906 Adjust all former `associativity' dependencies.
2907 * src/symtab.c (symbol_new): Default associativity is `undef', not
2908 `right'.
2909 (symbol_check_alias_consistence): Adjust.
2910
fae437e8
AD
29112002-07-09 Akim Demaille <akim@epita.fr>
2912
2913 * doc/bison.texinfo: Properly set the ``header'' part.
2914 Use @dircategory ``GNU programming tools'' as per Texinfo's
2915 documentation.
2916 Use @copying.
2917
1a715ef2
AD
29182002-07-09 Akim Demaille <akim@epita.fr>
2919
2920 * lib/quotearg.h: Protect against multiple inclusions.
2921 * src/location.h (location_t): Add a `file' member.
2922 (LOCATION_RESET, LOCATION_PRINT): Adjust.
2923 * src/complain.c (warn_at, complain_at, fatal_at): Drop
2924 `error_one_per_line' support.
2925
a5d50994
AD
29262002-07-09 Akim Demaille <akim@epita.fr>
2927
2928 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
2929 * src/reader.c (lineno): Remove.
2930 Adjust all dependencies.
2931 (get_merge_function): Take a location and use complain_at.
2932 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
2933 * tests/regression.at (Invalid inputs, Mixing %token styles):
2934 Adjust.
2935
b275314e
AD
29362002-07-09 Akim Demaille <akim@epita.fr>
2937
2938 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
2939 recovery rule, and forbid extensions when --yacc.
2940 (gram_error): Use complain_at.
2941 * src/reader.c (reader): Exit if there were parse errors.
2942
865b9df1
AD
29432002-07-09 Akim Demaille <akim@epita.fr>
2944
2945 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
2946 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
2947 Reported by R Blake <blakers@mac.com>.
2948
c76e14da
AD
29492002-07-09 Akim Demaille <akim@epita.fr>
2950
2951 * data/yacc.c: Output the copyright notive in the header.
2952
7db2ed2d
AD
29532002-07-03 Akim Demaille <akim@epita.fr>
2954
2955 * src/output.c (froms, tos): Are state_number_t.
2956 (save_column): sp, sp1, and sp2 are state_number_t.
2957 (prepare): Rename `final' as `final_state_number', `nnts' as
2958 `nterms_number', `nrules' as `rules_number', `nstates' as
2959 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
2960 unused.
2961 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
2962 * data/lalr1.cc (nsym_): Remove, unused.
2963
e68e0410
AD
29642002-07-03 Akim Demaille <akim@epita.fr>
2965
2966 * src/lalr.h, src/lalr.c (goto_number_t): New.
2967 * src/lalr.c (goto_list_t): New.
2968 Propagate them.
2969 * src/nullable.c (rule_list_t): New.
2970 Propagate.
2971 * src/types.h: Remove.
2972
e1a4f3a4
AD
29732002-07-03 Akim Demaille <akim@epita.fr>
2974
2975 * src/closure.c (print_fderives): Use rule_rhs_print.
2976 * src/derives.c (print_derives): Use rule_rhs_print.
2977 (rule_list_t): New, replaces `shorts'.
2978 (set_derives): Add comments.
2979 * tests/sets.at (Nullable, Firsts): Adjust.
2980
536545f3
AD
29812002-07-03 Akim Demaille <akim@epita.fr>
2982
2983 * src/output.c (prepare_actions): Free `tally' and `width'.
2984 (prepare_actions): Allocate and free `order'.
2985 * src/symtab.c (symbols_free): Free `symbols'.
2986 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
2987 * src/output.c (m4_invoke): Move to...
2988 * src/scan-skel.l: here.
2989 (<<EOF>>): Close yyout, and free its name.
2990
8b752b00
AD
29912002-07-03 Akim Demaille <akim@epita.fr>
2992
2993 Fix some memory leaks, and fix a bug: state 0 was examined twice.
2994
2995 * src/LR0.c (new_state): Merge into...
2996 (state_list_append): this.
2997 (new_states): Merge into...
2998 (generate_states): here.
2999 (set_states): Don't ensure a proper `errs' state member here, do it...
3000 * src/conflicts.c (conflicts_solve): here.
3001 * src/state.h, src/state.c: Comment changes.
3002 (state_t): Rename member `shifts' as `transitions'.
3003 Adjust all dependencies.
3004 (errs_new): For consistency, also take the values as argument.
3005 (errs_dup): Remove.
3006 (state_errs_set): New.
3007 (state_reductions_set, state_transitions_set): Assert that no
3008 previous value was assigned.
3009 (state_free): New.
3010 (states_free): Use it.
3011 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
3012 temporary storage: use `errs' and `nerrs' as elsewhere.
3013 (set_conflicts): Allocate and free this `errs'.
3014
613f5e1a
AD
30152002-07-02 Akim Demaille <akim@epita.fr>
3016
3017 * lib/libiberty.h: New.
3018 * lib: Update the bitset implementation from upstream.
3019 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
3020 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
3021 * src/main.c: Adjust bitset stats calls.
3022
26e0cadc
PE
30232002-07-01 Paul Eggert <eggert@twinsun.com>
3024
3025 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
3026 char, so that negative chars don't collide with $.
3027
1154cced
AD
30282002-06-30 Akim Demaille <akim@epita.fr>
3029
3030 Have the GLR tests be `warning' checked, and fix the warnings.
3031
3032 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
3033 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
3034 (yyremoveDeletes): `yyi' and `yyj' are size_t.
3035 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
3036 (yyaddDeferredAction): static.
3037 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
3038 (yyreportParseError): yyprefix is const.
3039 yytokenp is used only when verbose.
3040 (yy__GNUC__): Replace with __GNUC__.
3041 (yypdumpstack): yyi is size_t.
3042 (yypreference): Un-yy local variables and arguments, to avoid
3043 clashes with `yyr1'. Anyway, we are not in the user name space.
3044 (yytname_size): be an int, as is compared with ints.
3045 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
3046 Use them.
3047 * tests/cxx-gram.at: Use quotation to protect $1.
3048 Use AT_COMPILE to enable warnings hunts.
3049 Prototype yylex and yyerror.
3050 `Use' argc.
3051 Include `string.h', not `strings.h'.
3052 Produce and prototype stmtMerge only when used.
3053 yylex takes a location.
3054
97650f4e
AD
30552002-06-30 Akim Demaille <akim@epita.fr>
3056
3057 We spend a lot of time in quotearg, in particular when --verbose.
3058
3059 * src/symtab.c (symbol_get): Store a quoted version of the key.
3060 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
3061 Adjust all callers.
3062
d2576365
AD
30632002-06-30 Akim Demaille <akim@epita.fr>
3064
3065 * src/state.h (reductions_t): Rename member `nreds' as num.
3066 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
3067 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
3068
ccaf65bc
AD
30692002-06-30 Akim Demaille <akim@epita.fr>
3070
3071 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
3072 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
3073 (shifts_to): Rename as...
3074 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
3075 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
3076 (TRANSITION_IS_DISABLED, transitions_to): these.
3077
87675353
AD
30782002-06-30 Akim Demaille <akim@epita.fr>
3079
3080 * src/print.c (print_shifts, print_gotos): Merge into...
3081 (print_transitions): this.
3082 (print_transitions, print_errs, print_reductions): Align the
3083 lookaheads columns.
3084 (print_core, print_transitions, print_errs, print_state,
3085 print_grammar): Output empty lines separator before, not after.
3086 (state_default_rule_compute): Rename as...
3087 (state_default_rule): this.
3088 * tests/conflicts.at (Defaulted Conflicted Reduction),
3089 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
3090 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
3091
ce4ccb4b
AD
30922002-06-30 Akim Demaille <akim@epita.fr>
3093
3094 Display items as we display rules.
3095
3096 * src/gram.h, src/gram.c (rule_lhs_print): New.
3097 * src/gram.c (grammar_rules_partial_print): Use it.
3098 * src/print.c (print_core): Likewise.
3099 * tests/conflicts.at (Defaulted Conflicted Reduction),
3100 (Unresolved SR Conflicts): Adjust.
3101 (Unresolved SR Conflicts): Adjust and rename as...
3102 (Resolved SR Conflicts): this, as was meant.
3103 * tests/regression.at (Web2c Report): Adjust.
3104
bc933ef1
AD
31052002-06-30 Akim Demaille <akim@epita.fr>
3106
3107 * src/print.c (state_default_rule_compute): New, extracted from...
3108 (print_reductions): here.
3109 Pessimize, but clarify the code.
3110 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
3111
53d4308d
AD
31122002-06-30 Akim Demaille <akim@epita.fr>
3113
3114 * src/output.c (action_row): Let default_rule be always a rule
3115 number.
3116
574fb2d5
AD
31172002-06-30 Akim Demaille <akim@epita.fr>
3118
3119 * src/closure.c (print_firsts, print_fderives, closure):
3120 Use BITSET_EXECUTE.
3121 * src/lalr.c (lookaheads_print): Likewise.
3122 * src/state.c (state_rule_lookaheads_print): Likewise.
3123 * src/print_graph.c (print_core): Likewise.
3124 * src/print.c (print_reductions): Likewise.
3125 * src/output.c (action_row): Likewise.
3126 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
3127
05811fd7
AD
31282002-06-30 Akim Demaille <akim@epita.fr>
3129
3130 * src/print_graph.c: Use report_flag.
3131
0e4d5753
AD
31322002-06-30 Akim Demaille <akim@epita.fr>
3133
3134 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
3135 to...
3136 * src/relation.h, src/relation.c (traverse, relation_digraph)
3137 (relation_print, relation_transpose): New.
3138
24c7d800
AD
31392002-06-30 Akim Demaille <akim@epita.fr>
3140
3141 * src/state.h, src/state.c (shifts_to): New.
3142 * src/lalr.c (build_relations): Use it.
3143
9222837b
AD
31442002-06-30 Akim Demaille <akim@epita.fr>
3145
3146 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
3147 (item_number_of_rule_number, rule_number_of_item_number): New.
3148 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
3149 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
3150 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
3151 Propagate their use.
3152 Much remains to be done, in particular wrt `shorts' from types.h.
3153
260008e5
AD
31542002-06-30 Akim Demaille <akim@epita.fr>
3155
3156 * src/symtab.c (symbol_new): Initialize the `printer' member.
3157
8a731ca8
AD
31582002-06-30 Akim Demaille <akim@epita.fr>
3159
3160 * src/LR0.c (save_reductions): Remove, replaced by...
3161 * src/state.h, src/state.c (state_reductions_set): New.
3162 (reductions, errs): Rename as...
3163 (reductions_t, errs_t): these.
3164 Adjust all dependencies.
3165
32e1e0a4
AD
31662002-06-30 Akim Demaille <akim@epita.fr>
3167
3168 * src/LR0.c (state_list_t, state_list_append): New.
3169 (first_state, last_state): Now symbol_list_t.
3170 (this_state): Remove.
3171 (new_itemsets, append_states, save_reductions): Take a state_t as
3172 argument.
3173 (set_states, generate_states): Adjust.
3174 (save_shifts): Remove, replaced by...
3175 * src/state.h, src/state.c (state_shifts_set): New.
3176 (shifts): Rename as...
3177 (shifts_t): this.
3178 Adjust all dependencies.
3179 * src/state.h (state_t): Remove the `next' member.
3180
e5fb6710
AD
31812002-06-30 Akim Demaille <akim@epita.fr>
3182
3183 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
3184 escaped in slot 0.
3185
c7ca99d4
AD
31862002-06-30 Akim Demaille <akim@epita.fr>
3187
3188 Use hash.h for the state hash table.
3189
3190 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
3191 (allocate_storage): Use state_hash_new.
3192 (free_storage): Use state_hash_free.
3193 (new_state, get_state): Adjust.
3194 * src/lalr.h, src/lalr.c (states): Move to...
3195 * src/states.h (state_t): Remove the `link' member, no longer
3196 used.
3197 * src/states.h, src/states.c: here.
3198 (state_hash_new, state_hash_free, state_hash_lookup)
3199 (state_hash_insert, states_free): New.
3200 * src/states.c (state_table, state_compare, state_hash): New.
3201 * src/output.c (output_actions): Do not free states now, since we
3202 still need to know the final_state number in `prepare', called
3203 afterwards. Do it...
3204 * src/main.c (main): here: call states_free after `output'.
3205
df0e7316
AD
32062002-06-30 Akim Demaille <akim@epita.fr>
3207
3208 * src/state.h, src/state.c (state_new): New, extracted from...
3209 * src/LR0.c (new_state): here.
3210 * src/state.h (STATE_ALLOC): Move to...
3211 * src/state.c: here.
3212 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
3213 * src/state.h, src/state.c: here.
3214
39f41916
AD
32152002-06-30 Akim Demaille <akim@epita.fr>
3216
3217 * src/reader.c (gensym): Rename as...
3218 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
3219 (getsym): Rename as...
3220 (symbol_get): this.
3221
d57650a5
AD
32222002-06-30 Akim Demaille <akim@epita.fr>
3223
3224 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
3225 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
3226 * src/output.c, src/print.c, src/print_graph.c: Propagate.
3227 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
3228
5a08f1ce
AD
32292002-06-30 Akim Demaille <akim@epita.fr>
3230
3231 Make the test suite pass with warnings checked.
3232
3233 * tests/actions.at (Printers and Destructors): Improve.
3234 Avoid unsigned vs. signed issues.
3235 * tests/calc.at: Don't exercise the scanner here, do it...
3236 * tests/input.at (Torturing the Scanner): here.
3237
720623af
PH
32382002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3239
88e7e941 3240 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
720623af
PH
3241 reorganize first lines parallel to yacc.c.
3242
fb8135fa
AD
32432002-06-28 Akim Demaille <akim@epita.fr>
3244
3245 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
3246 (b4_token_enum, b4_token_defines): New, factored from...
3247 * data/lalr1.cc, data/yacc.c, glr.c: here.
3248
41442480
AD
32492002-06-28 Akim Demaille <akim@epita.fr>
3250
3251 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
3252 unused variables.
3253 * src/output.c (merger_output): static.
3254
e0e5bf84
AD
32552002-06-28 Akim Demaille <akim@epita.fr>
3256
3257 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
3258 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
3259 pacify GCC.
3260 * src/output.c (save_row): Initialize all the variables to pacify GCC.
e0e5bf84 3261
676385e2
PH
32622002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3263
3264 Accumulated changelog for new GLR parsing features.
3265
6a254321 3266 * src/conflicts.c (count_total_conflicts): Change name to
676385e2
PH
3267 conflicts_total_count.
3268 * src/conflicts.h: Ditto.
3269 * src/output.c (token_actions): Use the new name.
3270 (output_conflicts): Change conflp => conflict_list_heads, and
3271 confl => conflict_list for better readability.
3272 * data/glr.c: Use the new names.
3273 * NEWS: Add self to GLR announcement.
e0e5bf84 3274
676385e2
PH
3275 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
3276
3277 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
3278 Akim Demaille.
3279
3280 * data/bison.glr: Change name to glr.c
3281 * data/glr.c: Renamed from bison.glr.
3282 * data/Makefile.am: Add glr.c
e0e5bf84
AD
3283
3284 * src/getargs.c:
3285
676385e2
PH
3286 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
3287 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
e0e5bf84 3288
676385e2
PH
3289 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3290
3291 * data/bison.glr: Be sure to restore the
3292 current #line when returning to the skeleton contents after having
3293 exposed the input file's #line.
3294
3295 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3296
3297 * data/bison.glr: Bring up to date with changes to bison.simple.
3298
3299 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3300
3301 * data/bison.glr: Correct definitions that use b4_prefix.
3302 Various reformatting.
3303 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
3304 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
3305 yytokenp argument; now part of stack.
3306 (yychar): Define to behave as documented.
3307 (yyclearin): Ditto.
e0e5bf84 3308
676385e2
PH
3309 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3310
3311 * src/reader.h: Add declaration for free_merger_functions.
3312
3313 * src/reader.c (merge_functions): New variable.
3314 (get_merge_function): New function.
3315 (free_merger_functions): New function.
3316 (readgram): Check for %prec that is not followed by a symbol.
3317 Handle %dprec and %merge declarations.
3318 (packgram): Initialize dprec and merger fields in rules array.
3319
3320 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
3321 conflict_list_cnt, conflict_list_free): New variables.
3322 (table_grow): Also grow conflict_table.
e0e5bf84 3323 (prepare_rules): Output dprec and merger tables.
676385e2 3324 (conflict_row): New function.
e0e5bf84 3325 (action_row): Output conflict lists for GLR parser. Don't use
676385e2
PH
3326 default reduction in conflicted states for GLR parser so that there
3327 are spaces for the conflict lists.
3328 (save_row): Also save conflict information.
3329 (token_actions): Allocate conflict list.
3330 (merger_output): New function.
3331 (pack_vector): Pack conflict table, too.
3332 (output_conflicts): New function to output yyconflp and yyconfl.
3333 (output_check): Allocate conflict_tos.
3334 (output_actions): Output conflict tables, also.
3335 (output_skeleton): Output b4_mergers definition.
3336 (prepare): Output b4_max_rhs_length definition.
3337 Use 'bison.glr' as default skeleton for GLR parsers.
3338
3339 * src/gram.c (glr_parser): New flag.
3340 (grammar_free): Call free_merger_functions.
3341
3342 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
3343 all pairs of conflicting reductions, rather than just all tokens
3344 causing conflicts. Needed to size conflict tables.
e0e5bf84 3345 (conflicts_output): Modify call to count_rr_conflicts for new
676385e2
PH
3346 interface.
3347 (conflicts_print): Ditto.
3348 (count_total_conflicts): New function.
3349
3350 * src/reader.h (merger_list): New type.
3351 (merge_functions): New variable.
3352
3353 * src/lex.h (tok_dprec, tok_merge): New token types.
3354
3355 * src/gram.h (rule_s): Add dprec and merger fields.
3356 (glr_parser): New flag.
3357
3358 * src/conflicts.h (count_total_conflicts): New function.
3359
3360 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
3361
3362 * doc/bison.texinfo (Generalized LR Parsing): New section.
3363 (GLR Parsers): New section.
3364 (Language and Grammar): Mention GLR parsing.
3365 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
3366 Correct typo ("tge" -> "the").
3367
3368 * data/bison.glr: New skeleton for GLR parsing.
3369
3370 * tests/cxx-gram.at: New tests for GLR parsing.
3371
3372 * tests/testsuite.at: Include cxx-gram.at.
3373
3374 * tests/Makefile.am: Add cxx-gram.at.
e0e5bf84 3375
676385e2
PH
3376 * src/parse-gram.y:
3377
3378 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
3379
3380 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
e0e5bf84 3381
b5480d74 33822002-06-27 Akim Demaille <akim@epita.fr>
e2aaf4c4
AD
3383
3384 * src/options.h, src/options.c: Remove.
3385 * src/getargs.c (short_options, long_options): New.
3386
60491a94
AD
33872002-06-27 Akim Demaille <akim@epita.fr>
3388
3389 * data/bison.simple, data/bison.c++: Rename as...
3390 * data/yacc.c, data/lalr1.cc: these.
3391 * doc/bison.texinfo (Environment Variables): Remove.
3392
9be0c25b
AD
33932002-06-25 Raja R Harinath <harinath@cs.umn.edu>
3394
3395 * src/getargs.c (report_argmatch): Initialize strtok().
3396
1ae72863
AD
33972002-06-20 Akim Demaille <akim@epita.fr>
3398
3399 * data/bison.simple (b4_symbol_actions): New, replaces...
3400 (b4_symbol_destructor, b4_symbol_printer): these.
3401 (yysymprint): Be sure to call YYPRINT only for tokens, and using
3402 user token numbers.
3403
87542d29
AD
34042002-06-20 Akim Demaille <akim@epita.fr>
3405
3406 * data/bison.simple (yydestructor): Rename as...
3407 (yydestruct): this.
3408
1a31ed21
AD
34092002-06-20 Akim Demaille <akim@epita.fr>
3410
3411 * src/symtab.h, src/symtab.c (symbol_type_set)
3412 (symbol_destructor_set, symbol_precedence_set): The location is
3413 the last argument.
3414 Adjust all callers.
3415
e776192e
AD
34162002-06-20 Akim Demaille <akim@epita.fr>
3417
3418 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
3419 internals.
3420 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
3421 Takes a location.
3422 * src/symtab.h, src/symtab.c (symbol_class_set)
3423 (symbol_user_token_number_set): Likewise.
3424 Adjust all callers.
3425 Promote complain_at.
3426 * tests/input.at (Type Clashes): Adjust.
3427
5c1180b3
AD
34282002-06-20 Akim Demaille <akim@epita.fr>
3429
3430 * data/bison.simple (YYLEX): Fix the declaration when
3431 %pure-parser.
3432
e3170060
AD
34332002-06-20 Akim Demaille <akim@epita.fr>
3434
3435 * data/bison.simple (yysymprint): Don't print the token number,
3436 just its name.
3437 * tests/actions.at (Destructors): Rename as...
3438 (Printers and Destructors): this.
3439 Also exercise %printer.
3440
253862fd
AD
34412002-06-20 Akim Demaille <akim@epita.fr>
3442
3443 * data/bison.simple (YYDSYMPRINT): New.
3444 Use it to remove many of the #if YYDEBUG/if (yydebug).
3445
366eea36
AD
34462002-06-20 Akim Demaille <akim@epita.fr>
3447
3448 * src/symtab.h, src/symtab.c (symbol_t): printer and
3449 printer_location are new members.
3450 (symbol_printer_set): New.
3451 * src/parse-gram.y (PERCENT_PRINTER): New token.
3452 Handle its associated rule.
3453 * src/scan-gram.l: Adjust.
3454 (handle_destructor_at, handle_destructor_dollar): Rename as...
3455 (handle_symbol_code_at, handle_symbol_code_dollar): these.
3456 * src/output.c (symbol_printers_output): New.
3457 (output_skeleton): Call it.
3458 * data/bison.simple (yysymprint): New. Cannot be named yyprint
3459 since there are already many grammar files with a user `yyprint'.
3460 Replace the calls to YYPRINT to calls to yysymprint.
3461 * tests/calc.at: Adjust.
3462 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
3463 taking advantage of parser very internal details (stack size!).
3464
4f25ebb0
AD
34652002-06-20 Akim Demaille <akim@epita.fr>
3466
3467 * src/scan-gram.l: Complete the scanner with the missing patterns
3468 to pacify Flex.
3469 Use `quote' and `symbol_tag_get' where appropriate.
3470
93b68a0e
AD
34712002-06-19 Akim Demaille <akim@epita.fr>
3472
3473 * tests/actions.at (Destructors): Augment to test locations.
3474 * data/bison.simple (yydestructor): Pass it the current location
3475 if locations are enabled.
3476 Prototype only when __STDC__ or C++.
3477 Change the argument names to move into the yy name space: there is
3478 user code here.
3479
58612f1d
AD
34802002-06-19 Akim Demaille <akim@epita.fr>
3481
74310291
AD
3482 * data/bison.simple (b4_pure_if): New.
3483 Use it instead of #ifdef YYPURE.
3484
34852002-06-19 Akim Demaille <akim@epita.fr>
3486
3487 * data/bison.simple (b4_location_if): New.
58612f1d
AD
3488 Use it instead of #ifdef YYLSP_NEEDED.
3489
f25bfb75
AD
34902002-06-19 Akim Demaille <akim@epita.fr>
3491
3492 Prepare @$ in %destructor, but currently don't bind it in the
3493 skeleton, as %location use is not cleaned up yet.
3494
3495 * src/scan-gram.l (handle_dollar, handle_destructor_at)
3496 (handle_action_at): New.
3497 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
3498 a braced_code_t and a location as additional arguments.
3499 (handle_destructor_dollar): Instead of requiring `b4_eval', just
3500 unquote one when outputting `b4_dollar_dollar'.
3501 Adjust callers.
3502 * data/bison.simple (b4_eval): Remove.
3503 (b4_symbol_destructor): Adjust.
3504 * tests/input.at (Invalid @n): Adjust.
3505
c732d2c6
AD
35062002-06-19 Zack Weinberg <zack@codesourcery.com>
3507
3508 * doc/bison.texinfo: Document ability to have multiple
3509 prologue sections.
3510
8c165d89
AD
35112002-06-18 Akim Demaille <akim@epita.fr>
3512
3513 * src/files.c (compute_base_names): When computing the output file
3514 names from the input file name, strip the directory part.
3515
ca98bf57
AD
35162002-06-18 Akim Demaille <akim@epita.fr>
3517
3518 * data/bison.simple.new: Comment changes.
3519 Reported by Andreas Schwab.
3520
0bfb02ff
AD
35212002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
3522
3523 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
3524 there are no `label `yyoverflowlab' defined but not used' warnings
3525 when yyoverflow is defined.
3526
24c0aad7
AD
35272002-06-18 Akim Demaille <akim@epita.fr>
3528
3529 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
3530 new member.
3531 (symbol_destructor_set): Adjust.
3532 * src/output.c (symbol_destructors_output): Output the destructor
3533 locations.
3534 Output the symbol name.
3535 * data/bison.simple (b4_symbol_destructor): Adjust.
3536
5719c109
AD
35372002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
3538 and Akim Demaille <akim@epita.fr>
3539
3540 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
3541 what's left on the stack when the error recovery hits EOF.
3542 * tests/actions.at (Destructors): Complete to exercise this case.
3543
9280d3ef
AD
35442002-06-17 Akim Demaille <akim@epita.fr>
3545
3546 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
3547 arguments is really empty, not only equal to `[]'.
3548 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
3549 member.
3550 (symbol_destructor_set): New.
3551 * src/output.c (symbol_destructors_output): New.
3552 * src/reader.h (brace_code_t, current_braced_code): New.
3553 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
3554 (handle_dollar): Rename as...
3555 (handle_action_dollar): this.
3556 (handle_destructor_dollar): New.
3557 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
3558 (grammar_declaration): Use it.
3559 * data/bison.simple (yystos): Is always defined.
3560 (yydestructor): New.
3561 * tests/actions.at (Destructors): New.
3562 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
3563
dafdc66f
AD
35642002-06-17 Akim Demaille <akim@epita.fr>
3565
3566 * src/symlist.h, src/symlist.c (symbol_list_length): New.
3567 * src/scan-gram.l (handle_dollar, handle_at): Compute the
3568 rule_length only when needed.
3569 * src/output.c (actions_output, token_definitions_output): Output
3570 the full M4 block.
3571 * src/symtab.c: Don't access directly to the symbol tag, use
3572 symbol_tag_get.
3573 * src/parse-gram.y: Use symbol_list_free.
3574
56c47203
AD
35752002-06-17 Akim Demaille <akim@epita.fr>
3576
3577 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
3578 (symbol_list_prepend, get_type_name): Move to...
3579 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
3580 (symbol_list_prepend, symbol_list_n_type_name_get): here.
3581 Adjust all callers.
3582 (symbol_list_free): New.
3583 * src/scan-gram.l (handle_dollar): Takes a location.
3584 * tests/input.at (Invalid $n): Adjust.
3585
1e0bab92
AD
35862002-06-17 Akim Demaille <akim@epita.fr>
3587
3588 * src/reader.h, src/reader.c (symbol_list_new): Export it.
3589 (symbol_list_prepend): New.
3590 * src/parse-gram.y (%union): `list' is a new member.
3591 (symbols.1): New, replaces...
3592 (terms_to_prec.1, nterms_to_type.1): these.
3593 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
3594 Take a location as additional argument.
3595 Adjust all callers.
3596
04e60654
AD
35972002-06-15 Akim Demaille <akim@epita.fr>
3598
3599 * src/parse-gram.y: Move %token in the declaration section so that
3600 we don't depend upon CVS Bison.
3601
10e5b8bd
AD
36022002-06-15 Akim Demaille <akim@epita.fr>
3603
3604 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
3605 * src/print.c (print_core): Use it.
3606
9801d40c
AD
36072002-06-15 Akim Demaille <akim@epita.fr>
3608
3609 * src/conflicts.c (log_resolution): Accept the rule involved in
3610 the sr conflicts instead of the lookahead number that points to
3611 that rule.
3612 (flush_reduce): Accept the current lookahead vector as argument,
3613 instead of the index in LA.
3614 (resolve_sr_conflict): Accept the current number of lookahead
3615 bitset to consider for the STATE, instead of the index in LA.
3616 (set_conflicts): Adjust.
3617 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
3618
c0263492
AD
36192002-06-15 Akim Demaille <akim@epita.fr>
3620
3621 * src/state.h (state_t): Replace the `lookaheadsp' member, a
3622 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
3623 Adjust all dependencies.
3624 * src/lalr.c (initialize_lookaheads): Split into...
3625 (states_lookaheads_count, states_lookaheads_initialize): these.
3626 (lalr): Adjust.
3627
9757c359
AD
36282002-06-15 Akim Demaille <akim@epita.fr>
3629
3630 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
3631 out of...
3632 (grammar_rules_print): here.
3633 * src/reduce.c (reduce_output): Use it.
3634 * tests/reduce.at (Useless Rules, Reduced Automaton)
3635 (Underivable Rules): Adjust.
3636
6b98e4b5
AD
36372002-06-15 Akim Demaille <akim@epita.fr>
3638
3639 Copy BYacc's nice way to report the grammar.
3640
3641 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
3642 New.
3643 Don't print the rules' location, it is confusing and useless.
3644 (rule_print): Use grammar_rhs_print.
3645 * src/print.c (print_grammar): Use grammar_rules_print.
3646
6b98e4b5
AD
36472002-06-15 Akim Demaille <akim@epita.fr>
3648
3649 Complete and rationalize `useless thing' warnings.
3650
3651 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
3652 (symbol_tag_print): New.
3653 Use them everywhere in place of accessing directly the tag member.
3654 * src/gram.h, src/gram.c (rule_print): New.
3655 Use it where a rule used to be printed `by hand'.
3656 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
3657 (reduce_grammar_tables): Report the useless rules.
3658 (reduce_print): Useless things are a warning, not an error.
3659 Report it as such.
3660 * tests/reduce.at (Useless Nonterminals, Useless Rules):
3661 (Reduced Automaton, Underivable Rules): Adjust.
3662 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
3663 * tests/conflicts.at (Unresolved SR Conflicts)
3664 (Solved SR Conflicts): Adjust.
3665
ee000ba4
AD
36662002-06-15 Akim Demaille <akim@epita.fr>
3667
3668 Let symbols have a location.
3669
3670 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
3671 (getsym): Adjust.
3672 Adjust all callers.
3673 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
3674 Use location_t, not int.
3675 * src/symtab.c (symbol_check_defined): Take advantage of the
3676 location.
3677 * tests/regression.at (Invalid inputs): Adjust.
3678
8efe435c
AD
36792002-06-15 Akim Demaille <akim@epita.fr>
3680
3681 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
3682 (input): Don't try to initialize yylloc here, do it in the
3683 scanner.
3684 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
3685 * src/gram.h (rule_t): Change line and action_line into location
3686 and action_location, of location_t type.
3687 Adjust all dependencies.
3688 * src/location.h, src/location.c (empty_location): New.
3689 * src/reader.h, src/reader.c (grammar_start_symbol_set)
3690 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
3691 (grammar_current_rule_symbol_append)
3692 (grammar_current_rule_action_append): Expect a location as argument.
3693 * src/reader.c (grammar_midrule_action): Adjust to attach an
3694 action's location as dummy symbol location.
3695 * src/symtab.h, src/symtab.c (startsymbol_location): New.
3696 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
3697 the line numbers.
3698
1921f1d7
AD
36992002-06-14 Akim Demaille <akim@epita.fr>
3700
3701 Grammar declarations may be found in the grammar section.
3702
3703 * src/parse-gram.y (rules_or_grammar_declaration): New.
3704 (declarations): Each declaration may end with a semicolon, not
3705 just...
3706 (grammar_declaration): `"%union"'.
3707 (grammar): Branch to rules_or_grammar_declaration.
3708
4515534c
AD
37092002-06-14 Akim Demaille <akim@epita.fr>
3710
3711 * src/main.c (main): Invoke scanner_free.
3712
f958596b
AD
37132002-06-14 Akim Demaille <akim@epita.fr>
3714
3715 * src/output.c (m4_invoke): Extracted from...
3716 (output_skeleton): here.
3717 Free tempfile.
3718
2c569025
AD
37192002-06-14 Akim Demaille <akim@epita.fr>
3720
3721 * src/parse-gram.y (directives, directive, gram)
3722 (grammar_directives, precedence_directives, precedence_directive):
3723 Rename as...
3724 (declarations, declaration, grammar, grammar_declaration)
3725 (precedence_declaration, precedence_declarator): these.
3726 (symbol_declaration): New.
3727
592e8d4d
AD
37282002-06-14 Akim Demaille <akim@epita.fr>
3729
3730 * src/files.c (action_obstack): Remove, unused.
3731 (output_obstack): Remove it, and all its dependencies, as it is no
3732 longer needed.
3733 * src/reader.c (epilogue_set): Build the epilogue in the
3734 muscle_obstack.
3735 * src/output.h, src/output.c (muscle_obstack): Move to...
3736 * src/muscle_tab.h, src/muscle_tab.h: here.
3737 (muscle_init): Initialize muscle_obstack.
3738 (muscle_free): New.
3739 * src/main.c (main): Call it.
3740
0c15323d
AD
37412002-06-14 Akim Demaille <akim@epita.fr>
3742
3743 * src/location.h: New, extracted from...
3744 * src/reader.h: here.
3745 * src/Makefile.am (noinst_HEADERS): Merge into
3746 (bison_SOURCES): this.
3747 Add location.h.
3748 * src/parse-gram.y: Use location_t instead of Bison's.
3749 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
3750 Use location_t instead of ints.
3751
e96c9728
AD
37522002-06-14 Akim Demaille <akim@epita.fr>
3753
3754 * data/bison.simple, data/bison.c++: Be sure to restore the
3755 current #line when returning to the skeleton contents after having
3756 exposed the input file's #line.
3757
75d1fe16
AD
37582002-06-12 Akim Demaille <akim@epita.fr>
3759
3760 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
3761 eager.
3762 * tests/actions.at (Exotic Dollars): New.
3763
6c35d22c
AD
37642002-06-12 Akim Demaille <akim@epita.fr>
3765
3766 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
3767 ['"/] too eagerly.
3768 * tests/input.at (Torturing the Scanner): New.
3769
1d6412ad
AD
37702002-06-11 Akim Demaille <akim@epita.fr>
3771
3772 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
3773 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
3774 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
3775 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
3776 * src/reader.c (reader): Use it.
3777
4cdb01db
AD
37782002-06-11 Akim Demaille <akim@epita.fr>
3779
3780 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
3781 Adjust all callers.
3782 (scanner_last_string_free): New.
3783
44995b2e
AD
37842002-06-11 Akim Demaille <akim@epita.fr>
3785
3786 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
3787 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
3788 (last_string, YY_OBS_FREE): New.
3789 Use them when returning an ID.
3790
e9955c83
AD
37912002-06-11 Akim Demaille <akim@epita.fr>
3792
3793 Have Bison grammars parsed by a Bison grammar.
3794
3795 * src/reader.c, src/reader.h (prologue_augment): New.
3796 * src/reader.c (copy_definition): Remove.
3797
3798 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
3799 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
3800 (grammar_current_rule_prec_set, grammar_current_rule_check)
3801 (grammar_current_rule_symbol_append)
3802 (grammar_current_rule_action_append): Export.
3803 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
3804 (symbol_list_action_append): Remove.
3805 Hook the routines from reader.
3806 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
3807 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
3808
3809 * src/reader.c (read_declarations): Remove, unused.
3810
3811 * src/parse-gram.y: Handle the epilogue.
3812 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
3813 (grammar_start_symbol_set): this.
3814 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
3815 * src/reader.c (readgram): Remove, unused.
3816 (reader): Adjust to insert eoftoken and axiom where appropriate.
3817
3818 * src/reader.c (copy_dollar): Replace with...
3819 * src/scan-gram.h (handle_dollar): this.
3820 * src/parse-gram.y: Remove `%thong'.
3821
3822 * src/reader.c (copy_at): Replace with...
3823 * src/scan-gram.h (handle_at): this.
3824
3825 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
3826 New.
3827
3828 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
3829 time being.
3830
3831 * src/reader.h, src/reader.c (grammar_rule_end): New.
3832
3833 * src/parse.y (current_type, current_class): New.
3834 Implement `%nterm', `%token' support.
3835 Merge `%term' into `%token'.
3836 (string_as_id): New.
3837 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
3838 type name.
3839
3840 * src/parse-gram.y: Be sure to handle properly the beginning of
3841 rules.
3842
3843 * src/parse-gram.y: Handle %type.
3844 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
3845
3846 * src/parse-gram.y: More directives support.
3847 * src/options.c: No longer handle source directives.
3848
3849 * src/parse-gram.y: Fix %output.
3850
3851 * src/parse-gram.y: Handle %union.
3852 Use the prologue locations.
3853 * src/reader.c (parse_union_decl): Remove.
3854
3855 * src/reader.h, src/reader.c (epilogue_set): New.
3856 * src/parse-gram.y: Use it.
3857
3858 * data/bison.simple, data/bison.c++: b4_stype is now either not
3859 defined, then default to int, or to the contents of %union,
3860 without `union' itself.
3861 Adjust.
3862 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
3863
3864 * src/output.c (actions_output): Don't output braces, as they are
3865 already handled by the scanner.
3866
3867 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
3868 characters to themselves.
3869
3870 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
3871 that the epilogue has a proper #line.
3872
3873 * src/parse-gram.y: Handle precedence/associativity.
3874
3875 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
3876 a terminal.
3877 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
3878 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
3879 at all to define terminals that cannot be emitted.
3880
3881 * src/scan-gram.l: Escape M4 characters.
3882
3883 * src/scan-gram.l: Working properly with escapes in user
3884 strings/characters.
3885
3886 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
3887 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
3888 grammar.
3889 Use more modest sizes, as for the time being the parser does not
3890 release memory, and therefore the process swallows a huge amount
3891 of memory.
3892
3893 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
3894 stricter %token grammar.
3895
3896 * src/symtab.h (associativity): Add `undef_assoc'.
3897 (symbol_precedence_set): Do nothing when passed an undef_assoc.
3898 * src/symtab.c (symbol_check_alias_consistence): Adjust.
3899
3900 * tests/regression.at (Invalid %directive): Remove, as it is now
3901 meaningless.
3902 (Invalid inputs): Adjust to the new error messages.
3903 (Token definitions): The new grammar doesn't allow too many
3904 eccentricities.
3905
3906 * src/lex.h, src/lex.c: Remove.
3907 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
3908 (copy_character, copy_string2, copy_string, copy_identifier)
3909 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
3910 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
3911 (parse_action): Remove.
3912 * po/POTFILES.in: Adjust.
3913
2e047461
AD
39142002-06-11 Akim Demaille <akim@epita.fr>
3915
3916 * src/reader.c (parse_action): Don't store directly into the
3917 rule's action member: return the action as a string.
3918 Don't require `rule_length' as an argument: compute it.
3919 (grammar_current_rule_symbol_append)
3920 (grammar_current_rule_action_append): New, eved out from
3921 (readgram): here.
3922 Remove `action_flag', `rulelength', unused now.
3923
9af3fbce
AD
39242002-06-11 Akim Demaille <akim@epita.fr>
3925
3926 * src/reader.c (grammar_current_rule_prec_set).
3927 (grammar_current_rule_check): New, eved out from...
3928 (readgram): here.
3929 Remove `xaction', `first_rhs': useless.
3930 * tests/input.at (Type clashes): New.
3931 * tests/existing.at (GNU Cim Grammar): Adjust.
3932
1485e106
AD
39332002-06-11 Akim Demaille <akim@epita.fr>
3934
3935 * src/reader.c (grammar_midrule_action): New, Eved out from
3936 (readgram): here.
3937
da4160c3
AD
39382002-06-11 Akim Demaille <akim@epita.fr>
3939
3940 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
3941 New.
3942 (readgram): Use them as replacement of inlined code, crule and
3943 crule1.
3944
f6d0f937
AD
39452002-06-11 Akim Demaille <akim@epita.fr>
3946
3947 * src/reader.c (grammar_end, grammar_symbol_append): New.
3948 (readgram): Use them.
3949 Make the use of `p' as local as possible.
3950
69078d4b
AD
39512002-06-10 Akim Demaille <akim@epita.fr>
3952
3953 GCJ's parser requires the tokens to be defined before the prologue.
3954
3955 * data/bison.simple: Output the token definition before the user's
3956 prologue.
3957 * tests/regression.at (Braces parsing, Duplicate string)
3958 (Mixing %token styles): Check the output from bison.
3959 (Early token definitions): New.
3960
5e424082
AD
39612002-06-10 Akim Demaille <akim@epita.fr>
3962
3963 * src/symtab.c (symbol_user_token_number_set): Don't complain when
3964 assigning twice the same user number to a token, so that we can
3965 use it in...
3966 * src/lex.c (lex): here.
3967 Also use `symbol_class_set' instead of hand written code.
3968 * src/reader.c (parse_assoc_decl): Likewise.
3969
44536b35
AD
39702002-06-10 Akim Demaille <akim@epita.fr>
3971
3972 * src/symtab.c, src/symtab.c (symbol_class_set)
3973 (symbol_user_token_number_set): New.
3974 * src/reader.c (parse_token_decl): Use them.
3975 Use a switch instead of ifs.
3976 Use a single argument.
3977
8b9f2372
AD
39782002-06-10 Akim Demaille <akim@epita.fr>
3979
3980 Remove `%thong' support as it is undocumented, unused, duplicates
3981 `%token's job, and creates useless e-mail traffic with people who
3982 want to know what it is, why it is undocumented, unused, and
3983 duplicates `%token's job.
3984
3985 * src/reader.c (parse_thong_decl): Remove.
3986 * src/options.c (option_table): Remove "thong".
3987 * src/lex.h (tok_thong): Remove.
3988
3ae2b51f
AD
39892002-06-10 Akim Demaille <akim@epita.fr>
3990
3991 * src/symtab.c, src/symtab.c (symbol_type_set)
3992 (symbol_precedence_set): New.
3993 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
3994 (value_components_used): Remove, unused.
3995
2f1afb73
AD
39962002-06-09 Akim Demaille <akim@epita.fr>
3997
3998 Move symbols handling code out of the reader.
3999
4000 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
4001 (axiom): Move to...
4002 * src/symtab.h, src/symtab.c: here.
4003
4004 * src/gram.c (start_symbol): Remove: use startsymbol->number.
4005 * src/reader.c (startval): Rename as...
4006 * src/symtab.h, src/symtab.c (startsymbol): this.
4007 * src/reader.c: Adjust.
4008
4009 * src/reader.c (symbol_check_defined, symbol_make_alias)
4010 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
4011 (token_translations_init)
4012 Move to...
4013 * src/symtab.c: here.
4014 * src/reader.c (packsymbols): Move to...
4015 * src/symtab.h, src/symtab.c (symbols_pack): here.
4016 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
4017 argument.
4018
e9bca3ad
AD
40192002-06-03 Akim Demaille <akim@epita.fr>
4020
4021 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
4022 then statements.
4023
86eff183
AD
40242002-06-03 Akim Demaille <akim@epita.fr>
4025
4026 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
4027 structs with non literals.
4028 * src/scan-skel.l: never-interactive.
4029 * src/conflicts.c (enum conflict_resolution_e): No trailing
4030 comma.
4031 * src/getargs.c (usage): Split long literal strings.
4032 Reported by Hans Aberg.
4033
717be197
AD
40342002-05-28 Akim Demaille <akim@epita.fr>
4035
4036 * data/bison.c++: Use C++ ostreams.
4037 (cdebug_): New member.
4038
670ddffd
AD
40392002-05-28 Akim Demaille <akim@epita.fr>
4040
4041 * src/output.c (output_skeleton): Be sure to allocate enough room
4042 for `/' _and_ for `\0' in full_skeleton.
4043
769b430f
AD
40442002-05-28 Akim Demaille <akim@epita.fr>
4045
4046 * data/bison.c++: Catch up with bison.simple:
4047 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4048 and Paul Eggert <eggert@twinsun.com>: `error' handing.
4049 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
4050 and popping traces.
4051
7067cb36
PH
40522002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4053
4054 * src/output.c (output_skeleton): Put an explicit path in front of
4055 the skeleton file name, rather than relying on the -I directory,
4056 to partially alleviate effects of having a skeleton file lying around
4057 in the current directory.
769b430f 4058
4a713ec2
PH
40592002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4060
769b430f 4061 * src/conflicts.c (log_resolution): Correct typo:
4a713ec2
PH
4062 obstack_printf should be obstack_fgrow1.
4063
b408954b
AD
40642002-05-26 Akim Demaille <akim@epita.fr>
4065
4066 * src/state.h (state_t): `solved_conflicts' is a new member.
4067 * src/LR0.c (new_state): Set it to 0.
4068 * src/conflicts.h, src/conflicts.c (print_conflicts)
4069 (free_conflicts, solve_conflicts): Rename as...
4070 (conflicts_print, conflicts_free, conflicts_solve): these.
4071 Adjust callers.
4072 * src/conflicts.c (enum conflict_resolution_e)
4073 (solved_conflicts_obstack): New, used by...
4074 (log_resolution): this.
4075 Adjust to attach the conflict resolution to each state.
4076 Complete the description with the precedence/associativity
4077 information.
4078 (resolve_sr_conflict): Adjust.
4079 * src/print.c (print_state): Output its solved_conflicts.
4080 * tests/conflicts.at (Unresolved SR Conflicts)
4081 (Solved SR Conflicts): Exercise --report=all.
4082
a49aecd5
AD
40832002-05-26 Akim Demaille <akim@epita.fr>
4084
4085 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
4086 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
4087 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
4088 (token_number_t, item_number_as_token_number)
4089 (token_number_as_item_number, muscle_insert_token_number_table):
4090 Rename as...
4091 (symbol_number_t, item_number_as_symbol_number)
4092 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
4093 these, since it is more appropriate.
4094
5504898e
AD
40952002-05-26 Akim Demaille <akim@epita.fr>
4096
4097 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
4098 `Error:' lines.
4099 * data/bison.simple (yystos) [YYDEBUG]: New.
4100 (yyparse) [YYDEBUG]: Display the symbols which are popped during
4101 error recovery.
4102 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
4103
ec3bc396
AD
41042002-05-25 Akim Demaille <akim@epita.fr>
4105
4106 * doc/bison.texinfo (Debugging): Split into...
4107 (Tracing): this new section, its former contents, and...
4108 (Understanding): this new section.
4109 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
4110 by...
4111 (report_flag): this.
4112 Adjust all dependencies.
4113 (report_args, report_types, report_argmatch): New.
4114 (usage, getargs): Report/support -r, --report.
4115 * src/options.h
4116 (struct option_table_struct): Rename as..,
4117 (struct option_table_s): this.
4118 Rename the `set_flag' member to `flag' to match with getopt_long's
4119 struct.
4120 * src/options.c (option_table): Split verbose into an entry for
4121 %verbose, and another for --verbose.
4122 Support --report/-r, so remove -r from the obsolete --raw.
4123 * src/print.c: Attach full item sets and lookaheads reports to
4124 report_flag instead of trace_flag.
4125 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
4126
78df8250
PE
41272002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4128 and Paul Eggert <eggert@twinsun.com>
769b430f 4129
78df8250
PE
4130 * data/bison.simple (yyparse): Correct error handling to conform to
4131 POSIX and yacc. Specifically, after syntax error is discovered,
4132 do not reduce further before shifting the error token.
4133 Clean up the code a bit by removing the labels yyerrdefault,
4134 yyerrhandle, yyerrpop.
4135 * NEWS: Document the above.
4136
c0c9ea05
PH
41372002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4138
4139 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
4140 type; it isn't always big enough, since it doesn't necessarily
4141 include non-terminals.
769b430f 4142 (yytranslate): Expand definition of yy_token_number_type, so that
c0c9ea05
PH
4143 the latter can be removed.
4144 (yy_token_number_type): Remove, only one use.
4145 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
4146 don't use TokenNumberType as element type.
769b430f 4147
c0c9ea05
PH
4148 * tests/regression.at: Modify expected output to agree with change
4149 to yyr1 and yytranslate.
769b430f 4150
6390a83f
FK
41512002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
4152
4153 * src/reader.c (parse_action): Use copy_character instead of
4154 obstack_1grow.
4155
db7c8e9a
AD
41562002-05-13 Akim Demaille <akim@epita.fr>
4157
4158 * tests/regression.at (Token definitions): Prototype yylex and
4159 yyerror.
4160
fcc61800
PH
41612002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4162
158c687b 4163 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
fcc61800
PH
4164 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
4165 32-bit arithmetic.
4166 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
4167
5683e9b2
AD
41682002-05-07 Akim Demaille <akim@epita.fr>
4169
4170 * tests/synclines.at: Be sure to prototype yylex and yyerror to
4171 avoid GCC warnings.
4172
0c2d3f4c
AD
41732002-05-07 Akim Demaille <akim@epita.fr>
4174
4175 Kill GCC warnings.
4176
4177 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
4178 over the RHS of each rule.
4179 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
4180 * src/state.h (state_t): Member `nitems' is unsigned short.
4181 * src/LR0.c (get_state): Adjust.
4182 * src/reader.c (packgram): Likewise.
4183 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
4184 `Type'.
4185 (muscle_insert_int_table): Remove, unused.
4186 (prepare_rules): Remove `max'.
4187
1565b720
AD
41882002-05-06 Akim Demaille <akim@epita.fr>
4189
4190 * src/closure.c (print_firsts): Display of the symbol tags.
4191 (bitmatrix_print): Move to...
4192 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
4193 here.
4194 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
4195
cfaee611
AD
41962002-05-06 Akim Demaille <akim@epita.fr>
4197
4198 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
4199 hash_do_for_each.
4200
458be8e0
AD
42012002-05-06 Akim Demaille <akim@epita.fr>
4202
4203 * src/LR0.c (new_state, get_state): Instead of using the global
4204 `kernel_size' and `kernel_base', have two new arguments:
4205 `core_size' and `core'.
4206 Adjust callers.
4207
a900a624
AD
42082002-05-06 Akim Demaille <akim@epita.fr>
4209
4210 * src/reader.c (packgram): No longer end `ritem' with a 0
4211 sentinel: it is not used.
4212
d4e7d3a1
AD
42132002-05-05 Akim Demaille <akim@epita.fr>
4214
4215 New experimental feature: display the lookaheads in the report and
4216 graph.
4217
4218 * src/print (print_core): When --trace-flag, display the rules
4219 lookaheads.
4220 * src/print_graph.c (print_core): Likewise.
4221 Swap the arguments.
4222 Adjust caller.
4223
39ceb25b
AD
42242002-05-05 Akim Demaille <akim@epita.fr>
4225
4226 * tests/torture.at (Many lookaheads): New test.
4227
5372019f
AD
42282002-05-05 Akim Demaille <akim@epita.fr>
4229
4230 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
4231 (GENERATE_MUSCLE_INSERT_TABLE): this.
4232 (output_int_table, output_unsigned_int_table, output_short_table)
4233 (output_token_number_table, output_item_number_table): Replace with...
4234 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
4235 (muscle_insert_short_table, muscle_insert_token_number_table)
4236 (muscle_insert_item_number_table): these.
4237 Adjust all callers.
4238 (prepare_tokens): Don't free `translations', since...
4239 * src/reader.h, src/reader.c (grammar_free): do it.
4240 Move to...
4241 * src/gram.h, src/gram.c (grammar_free): here.
4242 * data/bison.simple, data/bison.c++: b4_token_number_max is now
4243 b4_translate_max.
4244
5df5f6d5
AD
42452002-05-05 Akim Demaille <akim@epita.fr>
4246
4247 * src/output.c (output_unsigned_int_table): New.
4248 (prepare_rules): `i' is unsigned.
4249 `prhs', `rline', `r2' are unsigned int.
4250 Rename muscle `rhs_number_max' as `rhs_max'.
4251 Output muscles `prhs_max', `rline_max', and `r2_max'.
4252 Free rline and r1.
4253 * data/bison.simple, data/bison.c++: Adjust to use these muscles
4254 to compute types instead of constant types.
4255 * tests/regression.at (Web2c Actions): Adjust.
4256
b87f8b21
AD
42572002-05-04 Akim Demaille <akim@epita.fr>
4258
4259 * src/symtab.h (SALIAS, SUNDEF): Rename as...
4260 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
4261 Adjust dependencies.
4262 * src/output.c (token_definitions_output): Be sure not to output a
4263 `#define 'a'' when fed with `%token 'a' "a"'.
4264 * tests/regression.at (Token definitions): New.
4265
8bb936e4
PE
42662002-05-03 Paul Eggert <eggert@twinsun.com>
4267
4268 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
4269 for K&R C.
4270
42712002-05-03 gettextize <bug-gnu-gettext@gnu.org>
4272
4273 * Makefile.am (SUBDIRS): Remove intl.
4274 (EXTRA_DIST): Add config/config.rpath.
4275
53c71a12
AD
42762002-05-03 Akim Demaille <akim@epita.fr>
4277
4278 * data/bison.simple (m4_if): Don't output empty enums.
4279 And actually, output valid enum definitions :(.
4280
289dd0cf
AD
42812002-05-03 Akim Demaille <akim@epita.fr>
4282
4283 * configure.bat: Remove, completely obsolete.
4284 * Makefile.am (EXTRA_DIST): Adjust.
4285 Don't distribute config.rpath...
4286 * config/Makefile.am (EXTRA_DIST): Do it.
4287
db85e524
AD
42882002-05-03 Akim Demaille <akim@epita.fr>
4289
4290 * configure.in (GETTEXT_VERSION): New.
4291 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
4292
83ccf991
AD
42932002-05-03 Akim Demaille <akim@epita.fr>
4294
4295 * data/bison.simple (b4_token_enum): New.
4296 (b4_token_defines): Use it to output tokens both as #define and
4297 enums.
4298 Suggested by Paul Eggert.
4299 * src/output.c (token_definitions_output): Don't output spurious
4300 white spaces.
4301
1f418995
AD
43022002-05-03 Akim Demaille <akim@epita.fr>
4303
4304 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
4305
45119f04
RA
43062002-05-02 Robert Anisko <robert@lrde.epita.fr>
4307
4308 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
4309 Update the stack class, give a try to deque as the default container.
4310
b2d52318
AD
43112002-05-02 Akim Demaille <akim@epita.fr>
4312
4313 * data/bison.simple (yyparse): Do not implement @$ = @1.
4314 (YYLLOC_DEFAULT): Adjust to do it.
4315 * doc/bison.texinfo (Location Default Action): Fix.
4316
3a8b4109
AD
43172002-05-02 Akim Demaille <akim@epita.fr>
4318
4319 * src/reader.c (parse_braces): Merge into...
4320 (parse_action): this.
4321
84614e13
AD
43222002-05-02 Akim Demaille <akim@epita.fr>
4323
4324 * configure.in (ALL_LINGUAS): Remove.
4325 * po/LINGUAS, hr.po: New.
4326
fdbcd8e2
AD
43272002-05-02 Akim Demaille <akim@epita.fr>
4328
4329 Remove the so called hairy (semantic) parsers.
4330
4331 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
4332 * src/gram.h, src/gram.c (semantic_parser): Remove.
4333 (rule_t): Remove the guard and guard_line members.
4334 * src/lex.h (token_t): remove tok_guard.
4335 * src/options.c (option_table): Remove %guard and %semantic_parser
4336 support.
4337 * src/output.c, src/output.h (guards_output): Remove.
4338 (prepare): Adjust.
4339 (token_definitions_output): Don't output the `T'
4340 tokens (???).
4341 (output_skeleton): Don't output the guards.
4342 * src/files.c, src/files.c (attrsfile): Remove.
4343 * src/reader.c (symbol_list): Remove the guard and guard_line
4344 members.
4345 Adjust dependencies.
4346 (parse_guard): Remove.
4347 * data/bison.hairy: Remove.
4348 * doc/bison.texinfo (Environment Variables): Remove occurrences of
4349 BISON_HAIRY.
4350
82b6cb3f
AD
43512002-05-02 Akim Demaille <akim@epita.fr>
4352
4353 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
4354 (parse_guard): Rename the formal argument `stack_offset' as
4355 `rule_length', which is more readable.
4356 Adjust callers.
4357 (copy_at, copy_dollar): Instead of outputting the hard coded
4358 values of $$, $n and so forth, output invocation to b4_lhs_value,
4359 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
4360 Note: this patch partially drops `semantic-parser' support: it
4361 always does `rule_length - n', where semantic parsers ought to
4362 always use `-n'.
82b6cb3f
AD
4363 * data/bison.simple, data/bison.c++ (b4_lhs_value)
4364 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
4365
6cbfbcc5
AD
43662002-05-02 Akim Demaille <akim@epita.fr>
4367
4368 * configure.in (AC_INIT): Bump to 1.49b.
4369 (AM_INIT_AUTOMAKE): Short invocation.
4370
b8548114
AD
43712002-05-02 Akim Demaille <akim@epita.fr>
4372
4373 Version 1.49a.
4374
c20cd1fa
AD
43752002-05-01 Akim Demaille <akim@epita.fr>
4376
4377 * src/skeleton.h: Remove.
4378
8a9566d4
AD
43792002-05-01 Akim Demaille <akim@epita.fr>
4380
4381 * src/skeleton.h: Fix the #endif.
4382 Reported by Magnus Fromreide.
4383
8c6d399a
PE
43842002-04-26 Paul Eggert <eggert@twinsun.com>
4385
4386 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
4387 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 4388 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 4389
2b7ed18a
RA
43902002-04-25 Robert Anisko <robert@lrde.epita.fr>
4391
4392 * src/scan-skel.l: Postprocess quadrigraphs.
4393
4394 * src/reader.c (copy_character): New function, used to output
4395 single characters while replacing `[' and `]' with quadrigraphs, to
4396 avoid troubles with M4 quotes.
4397 (copy_comment): Output characters with copy_character.
4398 (read_additionnal_code): Likewise.
4399 (copy_string2): Likewise.
4400 (copy_definition): Likewise.
4401
4402 * tests/calc.at: Exercise M4 quoting.
4403
34a89c50
AD
44042002-04-25 Akim Demaille <akim@epita.fr>
4405
4406 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
4407 between `!' and the command.
4408 Reported by Paul Eggert.
4409
0dd1580a
RA
44102002-04-24 Robert Anisko <robert@lrde.epita.fr>
4411
4412 * tests/calc.at: Exercise prologue splitting.
4413
4414 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
4415 `b4_post_prologue' instead of `b4_prologue'.
4416
4417 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
4418 muscles.
4419 (output): Free pre_prologue_obstack and post_prologue_obstack.
4420 * src/files.h, src/files.c (attrs_obstack): Remove.
4421 (pre_prologue_obstack, post_prologue_obstack): New.
4422 * src/reader.c (copy_definition): Add a parameter to specify the
4423 obstack to fill, instead of using attrs_obstack unconditionally.
4424 (read_declarations): Pass pre_prologue_obstack to copy_definition if
4425 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
4426
83c1796f
PE
44272002-04-23 Paul Eggert <eggert@twinsun.com>
4428
4429 * data/bison.simple: Remove unnecessary commentary and white
4430 space differences from 1_29-branch.
4431 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
4432
4433 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
4434 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
4435 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
4436 constructors or destructors.
4437
4438 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
4439
1207eeac
AD
44402002-04-23 Akim Demaille <akim@epita.fr>
4441
4442 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
4443 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
4444 location with columns.
4445 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
4446 All reported by Paul Eggert.
4447
78ab8f67
AD
44482002-04-22 Akim Demaille <akim@epita.fr>
4449
4450 * src/reduce.c (dump_grammar): Move to...
4451 * src/gram.h, src/gram.c (grammar_dump): here.
4452 Be sure to separate long item numbers.
4453 Don't read the members of a rule's prec if its nil.
4454
133c20e2
AD
44552002-04-22 Akim Demaille <akim@epita.fr>
4456
4457 * src/output.c (table_size, table_grow): New.
4458 (MAXTABLE): Remove, replace uses with table_size.
4459 (pack_vector): Instead of dying when the table is too big, grow it.
4460
9515e8a7
AD
44612002-04-22 Akim Demaille <akim@epita.fr>
4462
4463 * data/bison.simple (yyr1): Its type is that of a token number.
4464 * data/bison.c++ (r1_): Likewise.
4465 * tests/regression.at (Web2c Actions): Adjust.
4466
23c5a174
AD
44672002-04-22 Akim Demaille <akim@epita.fr>
4468
4469 * src/reader.c (token_translations_init): 256 is now the default
4470 value for the error token, i.e., it will be assigned another
4471 number if the user assigned 256 to one of her tokens.
4472 (reader): Don't force 256 to error.
4473 * doc/bison.texinfo (Symbols): Adjust.
4474 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
4475 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
4476 etc. instead of 10, 20, 30 (which was used to `jump' over error
4477 (256) and undefined (2)).
4478
5fbb0954
AD
44792002-04-22 Akim Demaille <akim@epita.fr>
4480
4481 Propagate more token_number_t.
4482
4483 * src/gram.h (token_number_as_item_number)
4484 (item_number_as_token_number): New.
4485 * src/output.c (GENERATE_OUTPUT_TABLE): New.
4486 Use it to create output_item_number_table and
4487 output_token_number_table.
4488 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
4489 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
4490 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
4491 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
4492
4f940944
AD
44932002-04-22 Akim Demaille <akim@epita.fr>
4494
4495 * src/output.h, src/output.c (get_lines_number): Remove.
4496
3ded9a63
AD
44972002-04-19 Akim Demaille <akim@epita.fr>
4498
4499 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
4500 as Lex/Flex'.
4501 (Debugging): More details about enabling the debugging features.
4502 (Table of Symbols): Describe $$, $n, @$, and @n.
4503 Suggested by Tim Josling.
4504
e0c471a9
AD
45052002-04-19 Akim Demaille <akim@epita.fr>
4506
4507 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
4508
fecc10cd
AD
45092002-04-10 Akim Demaille <akim@epita.fr>
4510
4511 * src/system.h: Rely on HAVE_LIMITS_H.
4512 Suggested by Paul Eggert.
4513
51dec47b
AD
45142002-04-09 Akim Demaille <akim@epita.fr>
4515
4516 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
4517 full stderr, and strip it according to the bison options, instead
4518 of composing the error message from different bits.
4519 This makes it easier to check for several error messages.
4520 Adjust all the invocations.
4521 Add an invocation exercising the error token.
4522 Add an invocation demonstrating a stupid error message.
4523 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
4524 Adjust the tests.
4525 Error message are for stderr, not stdout.
4526
007a50a4
AD
45272002-04-09 Akim Demaille <akim@epita.fr>
4528
4529 * src/gram.h, src/gram.c (error_token_number): Remove, use
4530 errtoken->number.
4531 * src/reader.c (reader): Don't specify the user token number (2)
4532 for $undefined, as it uselessly prevents using it.
4533 * src/gram.h (token_number_t): Move to...
4534 * src/symtab.h: here.
4535 (state_t.number): Is a token_number_t.
4536 * src/print.c, src/reader.c: Use undeftoken->number instead of
4537 hard coded 2.
4538 (Even though this 2 is not the same as above: the number of the
4539 undeftoken remains being 2, it is its user token number which
4540 might not be 2).
4541 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
4542 `user_token_number_max'.
4543 Output `undef_token_number'.
4544 * data/bison.simple, data/bison.c++: Use them.
4545 Be sure to map invalid yylex return values to
4546 `undef_token_number'. This saves us from gratuitous SEGV.
4547
4548 * tests/conflicts.at (Solved SR Conflicts)
4549 (Unresolved SR Conflicts): Adjust.
4550 * tests/regression.at (Web2c Actions): Adjust.
4551
06446ccf
AD
45522002-04-08 Akim Demaille <akim@epita.fr>
4553
4554 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
4555 Adding #line.
4556 Remove the duplicate `typedefs'.
4557 (RhsNumberType): Fix the declaration and various other typos.
4558 Use __ofile__.
4559 * data/bison.simple: Use __ofile__.
4560 * src/scan-skel.l: Handle __ofile__.
4561
62a3e4f0
AD
45622002-04-08 Akim Demaille <akim@epita.fr>
4563
4564 * src/gram.h (item_number_t): New, the type of item numbers in
4565 RITEM. Note that it must be able to code symbol numbers as
4566 positive number, and the negation of rule numbers as negative
4567 numbers.
4568 Adjust all dependencies (pretty many).
4569 * src/reduce.c (rule): Remove this `short *' pointer: use
4570 item_number_t.
4571 * src/system.h (MINSHORT, MAXSHORT): Remove.
4572 Include `limits.h'.
4573 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
4574 (shortcpy): Remove.
4575 (MAXTABLE): Move to...
4576 * src/output.c (MAXTABLE): here.
4577 (prepare_rules): Use output_int_table to output rhs.
4578 * data/bison.simple, data/bison.c++: Adjust.
4579 * tests/torture.at (Big triangle): Move the limit from 254 to
4580 500.
4581 * tests/regression.at (Web2c Actions): Ajust.
4582
4583 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
4584 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
4585 passes, but produces negative #line number, once fixed, GCC is
4586 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
4587 C), it passes.
4588 * src/state.h (state_h): Code input lines on ints, not shorts.
4589
bb88b0fc
AD
45902002-04-08 Akim Demaille <akim@epita.fr>
4591
4592 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
4593 and then the grammar.
4594
9a636f47
AD
45952002-04-08 Akim Demaille <akim@epita.fr>
4596
4597 * src/system.h: No longer using strndup.
4598
680e8701
AD
45992002-04-07 Akim Demaille <akim@epita.fr>
4600
4601 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
4602 * src/output.c (output_table_data): Return the longest number.
4603 (prepare_tokens): Output `token_number_max').
4604 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
4605 New.
4606 Use them to define yy_token_number_type/TokenNumberType.
4607 Use this type for yytranslate.
4608 * tests/torture.at (Big triangle): Push the limit from 124 to
4609 253.
4610 * tests/regression.at (Web2c Actions): Adjust.
4611
817e9f41
AD
46122002-04-07 Akim Demaille <akim@epita.fr>
4613
4614 * tests/torture.at (Big triangle): New.
4615 (GNU AWK Grammar, GNU Cim Grammar): Move to...
4616 * tests/existing.at: here.
4617
5123689b
AD
46182002-04-07 Akim Demaille <akim@epita.fr>
4619
4620 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
4621 nritems.
4622 Adjust dependencies.
4623
f3849179
AD
46242002-04-07 Akim Demaille <akim@epita.fr>
4625
4626 * src/reader.c: Normalize increments to prefix form.
4627
bd02036a
AD
46282002-04-07 Akim Demaille <akim@epita.fr>
4629
4630 * src/reader.c, symtab.c: Remove debugging code.
4631
db8837cb
AD
46322002-04-07 Akim Demaille <akim@epita.fr>
4633
4634 Rename all the `bucket's as `symbol_t'.
4635
4636 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
4637 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
4638 * src/symtab.c, src/symtab.h (bucket): Rename as...
4639 (symbol_t): this.
4640 (symbol_list_new, bucket_check_defined, bucket_make_alias)
4641 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
4642 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
4643 (buckets_new, buckets_free, buckets_do): Rename as...
4644 (symbol_list_new, symbol_check_defined, symbol_make_alias)
4645 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
4646 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
4647 (symbols_new, symbols_free, symbols_do): these.
4648
72a23c97
AD
46492002-04-07 Akim Demaille <akim@epita.fr>
4650
4651 Use lib/hash for the symbol table.
4652
4653 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
4654 EOF.
4655 * src/lex.c (lex): Set the `number' member of new terminals.
4656 * src/reader.c (bucket_check_defined, bucket_make_alias)
4657 (bucket_check_alias_consistence, bucket_translation): New.
4658 (reader, grammar_free, readgram, token_translations_init)
4659 (packsymbols): Adjust.
4660 (reader): Number the predefined tokens.
4661 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
4662 for predefined tokens.
4663 * src/symtab.h (bucket): Remove all the hash table related
4664 members.
4665 * src/symtab.c (symtab): Replace by...
4666 (bucket_table): this.
4667 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
4668 (buckets_new, buckets_do): New.
4669
280a38c3
AD
46702002-04-07 Akim Demaille <akim@epita.fr>
4671
4672 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
4673 (start_symbol, max_user_token_number, semantic_parser)
4674 (error_token_number): Initialize.
4675 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
4676 Initialize.
4677 (reader): Don't.
4678 (errtoken, eoftoken, undeftoken, axiom): Extern.
4679
03b31c0c
AD
46802002-04-07 Akim Demaille <akim@epita.fr>
4681
4682 * src/gram.h (rule_s): prec and precsym are now pointers
4683 to the bucket giving the priority/associativity.
4684 Member `associativity' removed: useless.
4685 * src/reduce.c, src/conflicts.c: Adjust.
4686
8b3df748
AD
46872002-04-07 Akim Demaille <akim@epita.fr>
4688
4689 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
4690 Properly escape the symbols' TAG when outputting them.
4691
e601aa1d
AD
46922002-04-07 Akim Demaille <akim@epita.fr>
4693
4694 * src/lalr.h (LA): Is a bitsetv, not bitset*.
4695
b0299a2e
AD
46962002-04-07 Akim Demaille <akim@epita.fr>
4697
4698 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
4699 (LArule): this, which is an array to rule_t*.
4700 * src/print.c, src/conflicts.c: Adjust.
4701
d7e1f00c
AD
47022002-04-07 Akim Demaille <akim@epita.fr>
4703
4704 * src/gram.h (rule_t): Rename `number' as `user_number'.
4705 `number' is a new member.
4706 Adjust dependencies.
4707 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
4708
cc9305dd
AD
47092002-04-07 Akim Demaille <akim@epita.fr>
4710
4711 As a result of the previous patch, it is no longer needed
4712 to reorder ritem itself.
4713
4714 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
4715
b0940840
AD
47162002-04-07 Akim Demaille <akim@epita.fr>
4717
4718 Be sure never to walk through RITEMS, but use only data related to
4719 the rules themselves. RITEMS should be banished.
4720
4721 * src/output.c (output_token_translations): Rename as...
4722 (prepare_tokens): this.
4723 In addition to `translate', prepare the muscles `tname' and
4724 `toknum', which were handled by...
4725 (output_rule_data): this.
4726 Remove, and move the remainder of its outputs into...
4727 (prepare_rules): this new routines, which also merges content from
4728 (output_gram): this.
4729 (prepare_rules): Be sure never to walk through RITEMS.
4730 (output_stos): Rename as...
4731 (prepare_stos): this.
4732 (output): Always invoke prepare_states, after all, just don't use it
4733 in the output if you don't need it.
4734
643a5994
AD
47352002-04-07 Akim Demaille <akim@epita.fr>
4736
4737 * src/LR0.c (new_state): Display `nstates' as the name of the
4738 newly created state.
4739 Adjust to initialize first_state and last_state if needed.
4740 Be sure to distinguish the initial from the final state.
4741 (new_states): Create the itemset of the initial state, and use
4742 new_state.
4743 * src/closure.c (closure): Now that the initial state has its
4744 items properly set, there is no need for a special case when
4745 creating `ruleset'.
4746
4747 As a result, now the rule 0, reducing to $axiom, is visible in the
4748 outputs. Adjust the test suite.
4749
4750 * tests/conflicts.at (Solved SR Conflicts)
4751 (Unresolved SR Conflicts): Adjust.
4752 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
4753 * tests/conflicts.at (S/R in initial): New.
4754
b4c4ccc2
AD
47552002-04-07 Akim Demaille <akim@epita.fr>
4756
4757 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
4758 the RHS of the rules.
4759 * src/output.c (output_gram): Likewise.
4760
bba97eb2
AD
47612002-04-07 Akim Demaille <akim@epita.fr>
4762
4763 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
4764 bucket.
4765 Adjust all dependencies.
4766 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
4767 `number' of the buckets too.
4768 * src/gram.h: Include `symtab.h'.
4769 (associativity): Move to...
4770 * src/symtab.h: here.
4771 No longer include `gram.h'.
4772
c3b407f4
AD
47732002-04-07 Akim Demaille <akim@epita.fr>
4774
4775 * src/gram.h, src/gram.c (rules_rhs_length): New.
4776 (ritem_longest_rhs): Use it.
4777 * src/gram.h (rule_t): `number' is a new member.
4778 * src/reader.c (packgram): Set it.
4779 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
4780 the end of `rules', and count them out of `nrules'.
4781 (reduce_output, dump_grammar): Adjust.
4782 * src/print.c (print_grammar): It is no longer needed to check for
4783 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
4784 * tests/reduce.at (Reduced Automaton): New test.
4785
11652ab3
AD
47862002-04-07 Akim Demaille <akim@epita.fr>
4787
4788 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
4789 lacking `+ 1' to nrules, Bison reported as useless a token if it
4790 was used solely to set the precedence of the last rule...
4791
26b23c1a
AD
47922002-04-07 Akim Demaille <akim@epita.fr>
4793
4794 * data/bison.c++, data/bison.simple: Don't output the current file
4795 name in #line, to avoid useless diffs between two identical
4796 outputs under different names.
4797
18bcecb0
AD
47982002-04-07 Akim Demaille <akim@epita.fr>
4799
4800 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
4801 Normalize loops to using `< nrules + 1', not `<= nrules'.
4802
fa770c86
AD
48032002-04-07 Akim Demaille <akim@epita.fr>
4804
4805 * TODO: Update.
4806
d9b739c3
AD
48072002-04-07 Akim Demaille <akim@epita.fr>
4808
4809 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
4810 bucket.value as bucket.number.
4811
99013900
AD
48122002-04-07 Akim Demaille <akim@epita.fr>
4813
4814 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
4815 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
4816 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
4817 RHS, instead of being an index in RITEMS.
4818
e966383b
PE
48192002-04-04 Paul Eggert <eggert@twinsun.com>
4820
4821 * doc/bison.texinfo: Update copyright date.
4822 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
4823 (Symbols): Warn about running Bison in one character set,
4824 but compiling and/or running in an incompatible one.
4825 Warn about character code 256, too.
4826
48272002-04-03 Paul Eggert <eggert@twinsun.com>
4828
4829 * src/bison.data (YYSTACK_ALLOC): Depend on whether
4830 YYERROR_VERBOSE is nonzero, not whether it is defined.
4831
4832 Merge changes from bison-1_29-branch.
c307773e 4833
8d6c48b9
PE
48342002-03-20 Paul Eggert <eggert@twinsun.com>
4835
4836 Merge fixes from Debian bison_1.34-1.diff.
4837
4838 * configure.in (AC_PREREQ): 2.53.
4839
e53c6322
AD
48402002-03-20 Akim Demaille <akim@epita.fr>
4841
4842 * src/conflicts.c (log_resolution): Argument `resolution' is const.
4843
9ffbeca7
PE
48442002-03-19 Paul Eggert <eggert@twinsun.com>
4845
21db0b2a
PE
4846 * src/bison.simple (YYCOPY): New macro.
4847 (YYSTACK_RELOCATE): Use it.
4848 Remove Type arg; no longer needed. All callers changed.
4849 (yymemcpy): Remove; no longer needed.
4850
9ffbeca7
PE
4851 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
4852 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
4853
642cb8f8
AD
48542002-03-19 Akim Demaille <akim@epita.fr>
4855
4856 Test and fix the #line outputs.
4857
4858 * tests/atlocal.at (GCC): New.
4859 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
4860 (Prologue synch line, ,%union synch line, Postprologue synch line)
4861 (Action synch line, Epilogue synch line): New tests.
4862 * src/reader.c (parse_union_decl): Define the muscle stype_line.
4863 * data/bison.simple, data/bison.c++: Use it.
4864
3c31a486
AD
48652002-03-19 Akim Demaille <akim@epita.fr>
4866
4867 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
4868 (Solved SR Conflicts, %expect not enough, %expect right)
4869 (%expect too much): Move to...
4870 * tests/conflicts.at: this new file.
4871
0d8bed56
AD
48722002-03-19 Akim Demaille <akim@epita.fr>
4873
4874 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
4875 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
4876 that we can move to enums for instance.
4877 * src/output.c (token_definitions_output): Output a list of
4878 `token-name, token-number' instead of the #define.
4879 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
4880
9208d17f
AD
48812002-03-14 Akim Demaille <akim@epita.fr>
4882
4883 Use Gettext 0.11.1.
4884
af27eacb
RA
48852002-03-09 Robert Anisko <robert@lrde.epita.fr>
4886
4887 * data/bison.c++: Make the user able to add members to the generated
4888 parser by subclassing.
4889
9101a310
RA
48902002-03-05 Robert Anisko <robert@lrde.epita.fr>
4891
4892 * src/reader.c (read_additionnal_code): `c' should be an integer, not
4893 a character.
4894 Reported by Nicolas Tisserand and Nicolas Burrus.
4895
fff9bf0b
RA
48962002-03-04 Robert Anisko <robert@lrde.epita.fr>
4897
4898 * src/reader.c: Warn about lacking semi-colons, do not complain.
4899
64dba31e
RA
49002002-03-04 Robert Anisko <robert@lrde.epita.fr>
4901
4902 * data/bison.c++: Remove a debug line.
4903
374f5a14
RA
49042002-03-04 Robert Anisko <robert@lrde.epita.fr>
4905
4906 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
4907 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
4908 provide a default implementation.
4909
bfcf1f3a
AD
49102002-03-04 Akim Demaille <akim@epita.fr>
4911
4912 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
4913 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
4914 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
4915 * tests/semantic.at (Parsing Guards): Similarly.
4916 * src/reader.at (readgram): Complain if the last rule is not ended
4917 with a semi-colon.
4918
65ccf9fc
AD
49192002-03-04 Akim Demaille <akim@epita.fr>
4920
4921 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
4922 * src/closure.c: here.
4923 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
4924 RTC.
4925 * src/warshall.h, src/warshall.c: Remove.
4926 * tests/sets.at (Broken Closure): Adjust.
4927
d0039cbc
AD
49282002-03-04 Akim Demaille <akim@epita.fr>
4929
4930 * src/output.c (output_skeleton): tempdir is const.
4931 bytes_read is unused.
4932
345cea78
AD
49332002-03-04 Akim Demaille <akim@epita.fr>
4934
4935 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
4936 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
4937 Update.
4938 From Michael Hayes.
4939
564801f7
AD
49402002-03-04 Akim Demaille <akim@epita.fr>
4941
4942 * src/closure.c (closure): `r' is unused.
4943
e5352bc7
AD
49442002-03-04 Akim Demaille <akim@epita.fr>
4945
4946 * tests/sets.at (Broken Closure): Add the ending `;'.
4947 * src/reader.at (readgram): Complain if a rule is not ended with a
4948 semi-colon.
4949
914feea9
AD
49502002-03-04 Akim Demaille <akim@epita.fr>
4951
4952 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
4953 (count_sr_conflicts): Use bitset_count.
4954 * src/reduce.c (inaccessable_symbols): Ditto.
4955 (bits_size): Remove.
4956 * src/warshall.h, src/warshall.c: Convert to bitsetv.
4957
f0250de6
AD
49582002-03-04 Akim Demaille <akim@epita.fr>
4959
4960 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
4961 * src/reduce.c: Remove the `bitset_zero's following the
4962 `bitset_create's, as now it is performed by the latter.
4963
ef017502
AD
49642002-03-04 Akim Demaille <akim@epita.fr>
4965
4966 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
4967 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
4968 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
4969 latest sources from Michael.
4970
76514394
AD
49712002-03-04 Akim Demaille <akim@epita.fr>
4972
4973 * src/output.c (output): Don't free the grammar.
4974 * src/reader.c (grammar_free): New.
4975 * src/main.c (main): Call it and don't free symtab here.
4976
55024580
AD
49772002-03-04 Akim Demaille <akim@epita.fr>
4978
4979 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
4980 before returning.
4981 Reported by Benoit Perrot.
4982
f9abaa2c
AD
49832002-03-04 Akim Demaille <akim@epita.fr>
4984
4985 Use bitset operations when possible, not loops over bits.
4986
4987 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
4988 bitset_or.
4989 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
4990 * src/reduce.c (useless_nonterminals): Formatting changes.
4991 * src/warshall.c (TC): Use bitset_or.
4992
0e721e75
AD
49932002-03-04 Akim Demaille <akim@epita.fr>
4994
4995 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
4996 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
4997 Ditto.
4998
0fb1ffb1
AD
49992002-03-04 Akim Demaille <akim@epita.fr>
5000
5001 * src/lalr.c (F): Now a bitset*.
5002 Adjust all dependencies.
5003
b86796bf
AD
50042002-03-04 Akim Demaille <akim@epita.fr>
5005
5006 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
5007 Adjust all dependencies.
5008
602bbf31
AD
50092002-03-04 Akim Demaille <akim@epita.fr>
5010
5011 * src/L0.c, src/LR0.h (nstates): Be size_t.
5012 Adjust comparisons (signed vs unsigned).
5013 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
5014 bitset*.
5015 Adjust all dependencies.
5016
d8a0245c
AD
50172002-03-04 Akim Demaille <akim@epita.fr>
5018
5019 * src/closure.c (firsts): Now, also a bitset.
5020 Adjust all dependencies.
5021 (varsetsize): Remove, now unused.
5022 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
5023
34ba9743
AD
50242002-03-04 Akim Demaille <akim@epita.fr>
5025
5026 * src/print.c: Convert to use bitset.h, not hand coded iterations
5027 over ints.
5028
ed86e78c
AD
50292002-03-04 Akim Demaille <akim@epita.fr>
5030
5031 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
5032
dfdb1797
AD
50332002-03-04 Akim Demaille <akim@epita.fr>
5034
5035 * src/closure.c (ruleset): Be a bitset.
5036 (rulesetsize): Remove.
5037
7086e707
AD
50382002-03-04 Akim Demaille <akim@epita.fr>
5039
5040 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
5041 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
5042 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
5043 * src/closure.c (fderives): Be an array of bitsets.
5044
98254360
RA
50452002-02-28 Robert Anisko <robert@lrde.epita.fr>
5046
5047 * data/bison.c++: Merge the two generated headers. Insert a copyright
5048 notice in each output file.
5049
a75c057f
AD
50502002-02-28 Akim Demaille <akim@epita.fr>
5051
5052 * data/bison.c++: Copy the prologue of bison.simple to fetch
5053 useful M4 definitions, such as b4_header_guard.
5054
06b00abc
AD
50552002-02-25 Akim Demaille <akim@epita.fr>
5056
5057 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
5058 translator friendly scheme for the bgr
5059 copyright notice.
06b00abc 5060
70e7d534
AD
50612002-02-25 Akim Demaille <akim@epita.fr>
5062
5063 * src/output.c (header_output): Remove, now handled completely via
5064 M4.
5065
abe017f6
AD
50662002-02-25 Akim Demaille <akim@epita.fr>
5067
5068 * m4/m4.m4: New, from CVS Autoconf.
5069 * configure.in: Invoke it.
5070 * src/output.c (output_skeleton): Use its result instead of the
5071 hard coded name.
5072
381fb12e
AD
50732002-02-25 Akim Demaille <akim@epita.fr>
5074
5075 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
5076 Fileutils 4.1.5.
5077 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
5078 * src/output.c (output_skeleton): Use mkstemp to create a real
5079 temporary file.
5080 Move the filling of `skeleton' and its muscle to...
5081 (prepare): here.
5082 (output): Move the definition of the prologue muscle to...
5083 (prepare): here.
5084 * src/system.h (DEFAULT_TMPDIR): New.
5085
6f38107f
PE
50862002-02-14 Paul Eggert <eggert@twinsun.com>
5087
5088 Remove the support for C++ namespace cleanliness; it was
5089 causing more problems than it was curing, since it didn't work
5090 properly on some nonstandard C++ compilers. This can wait
5091 for a proper C++ parser.
5092
5093 * NEWS: Document this.
5094 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
5095 of C++, as it's treated like C now.
5096 * src/bison.simple (YYSTD): Remove.
5097 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
5098 Treat C++ just like Standard C instead of trying to support
5099 namespace cleanliness.
5100
80cce3da
AD
51012002-02-14 Akim Demaille <akim@epita.fr>
5102
5103 * tests/regression.at (else): Adjust to Andreas' change.
5104
842e8679
AD
51052002-02-14 Akim Demaille <akim@epita.fr>
5106
5107 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
5108
4bda3f10
AD
51092002-02-13 Andreas Schwab <schwab@suse.de>
5110
5111 * src/output.c (output_rule_data): Don't output NULL, it might
5112 not be defined yet.
5113
4162fa07 51142002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 5115
4162fa07
RA
5116 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
5117 (Copyright notice): Update.
b418ecd8 5118
bd16a5dc
AD
51192002-02-11 Akim Demaille <akim@epita.fr>
5120
5121 * tests/regression.at (%nonassoc and eof): Don't include
5122 nonportable headers.
5123
8d69a1a3
RA
51242002-02-08 Robert Anisko <robert@lrde.epita.fr>
5125
5126 * data/bison.c++: Correct error recovery. Make the user able to
5127 initialize the starting location.
5128
9b2d0677
AD
51292002-02-07 Akim Demaille <akim@epita.fr>
5130
5131 * tests/input.at: New.
5132
69e2658b
RA
51332002-02-07 Robert Anisko <robert@lrde.epita.fr>
5134
5135 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 5136 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
5137 directives around tables only needed for debugging.
5138
4aacc3a7
RA
51392002-02-07 Robert Anisko <robert@lrde.epita.fr>
5140
5141 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
5142 C++ parsers.
5143 (yy::b4_name::parse): Use print_.
5144
762a801e
RA
51452002-02-07 Robert Anisko <robert@lrde.epita.fr>
5146
5147 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
5148
4bb2bc3f
RA
51492002-02-07 Robert Anisko <robert@lrde.epita.fr>
5150
5151 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
5152 C++ parsers.
5153 (yy::b4_name::parse): Build verbose error messages, and use error_.
5154
6b45a3ca
RA
51552002-02-06 Robert Anisko <robert@lrde.epita.fr>
5156
5157 * data/bison.c++: Fix m4 quoting in comments.
5158
50997c6e
RA
51592002-02-06 Robert Anisko <robert@lrde.epita.fr>
5160
5161 * data/bison.c++: Adjust the parser code. Fix some muscles that were
5162 not expanded by m4.
5163
3f3eed27
AD
51642002-02-05 Akim Demaille <akim@epita.fr>
5165
5166 * data/bison.c++: Adjust to the M4 back end.
5167 More is certainly needed.
5168
be2a1a68
AD
51692002-02-05 Akim Demaille <akim@epita.fr>
5170
5171 Give a try to M4 as a back end.
5172
5173 * lib/readpipe.c: New, from wdiff.
5174 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
5175 BISON_HAIRY.
5176 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
5177 specific values. Now it is m4 that performs the lookup.
5178 * src/parse-skel.y: Remove.
5179 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
5180 * src/output.c (actions_output, guards_output)
5181 (token_definitions_output): No longer keeps track of the output
5182 line number, hence remove the second argument.
5183 (guards_output): Check against the guard member of a rule, not the
5184 action member.
5185 Adjust callers.
5186 (output_skeleton): Don't look for the skeleton location, let m4 do
5187 that.
5188 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
5189 file will be used.
5190 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
5191 (prepare): Given that for the time being changesyntax is not
5192 usable in M4, rename the muscles using `-' to `_'.
5193 Define `defines_flag', `output_parser_name' and `output_header_name'.
5194 * src/output.h (actions_output, guards_output)
5195 (token_definitions_output): Adjust prototypes.
5196 * src/scan-skel.l: Instead of scanning the skeletons, it now
5197 processes the output of m4: `__oline__' and `#output'.
5198 * data/bison.simple: Adjust to be used by M4(sugar).
5199 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
5200 to date.
5201 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
5202 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
5203 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
5204 shamelessly stolen from CVS Autoconf.
5205
beda758b
AD
52062002-02-05 Akim Demaille <akim@epita.fr>
5207
5208 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
5209 * configure.in: Check for the declarations of free and malloc.
5210 * src/muscle_tab.c: Adjust.
5211
5ece6d43
AD
52122002-02-05 Akim Demaille <akim@epita.fr>
5213
5214 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
5215 which have no values.
5216
5bb18f9a
AD
52172002-02-05 Akim Demaille <akim@epita.fr>
5218
5219 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
5220 * data/: here.
5221
894dd62e
PE
52222002-01-29 Paul Eggert <eggert@twinsun.com>
5223
5224 * src/bison.simple (YYSIZE_T): Do not define merely because
5225 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
5226 On some platforms, <alloca.h> does not declare YYSTD (size_t).
5227
82841af7
AD
52282002-01-27 Akim Demaille <akim@epita.fr>
5229
5230 Fix `%nonassoc and eof'.
5231
5232 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
5233 which were not properly copied! Replace
5234 memcpy (res->errs, src->errs, src->nerrs);
5235 with
5236 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
5237 !!!
5238 * tests/regression.at (%nonassoc and eof): Adjust to newest
5239 Autotest: `.' is not in the PATH.
5240
318b76e9
AD
52412002-01-27 Akim Demaille <akim@epita.fr>
5242
5243 * tests/sets.at (AT_EXTRACT_SETS): New.
5244 (Nullable): Use it.
5245 (Firsts): New.
5246
30d2f3d5
AD
52472002-01-26 Akim Demaille <akim@epita.fr>
5248
5249 * tests/actions.at, tests/calc.at, tests/headers.at,
5250 * tests/torture.at: Adjust to the newest Autotest which no longer
5251 forces `.' in the PATH.
5252
30f8c395
AD
52532002-01-25 Akim Demaille <akim@epita.fr>
5254
5255 * tests/regression.at (%nonassoc and eof): New.
5256 Suggested by Robert Anisko.
5257
29ae55f1
AD
52582002-01-24 Akim Demaille <akim@epita.fr>
5259
5260 Bison dumps core when trying to complain about broken input files.
5261 Reported by Cris van Pelt.
5262
5263 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
5264 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
5265 into...
5266 (Invalid inputs): Strengthen: exercise parse_percent_token.
5267
2b548aa6
RA
52682002-01-24 Robert Anisko <robert.anisko@epita.fr>
5269
5270 * src/Makefile.am: Add bison.c++.
5271 * src/bison.c++: New skeleton.
5272
bb0146c2
AD
52732002-01-21 Paolo Bonzini <bonzini@gnu.org>
5274
5275 * po/it.po: New.
5276
bec30531
AD
52772002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
5278
5279 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
5280
fc6edc45
MA
52812002-01-20 Marc Autret <marc@gnu.org>
5282
5283 * src/files.c (compute_output_file_names): Fix
5284
5e5d5415
MA
52852002-01-20 Marc Autret <marc@gnu.org>
5286
5287 * tests/output.at: New test.
5288 * src/files.c (compute_base_names): Don't map extensions when
5289 the YACC flag is set, use defaults.
5290 Reported by Evgeny Stambulchik.
5291
44ea3fbd
MA
52922002-01-20 Marc Autret <marc@gnu.org>
5293
bb0146c2 5294 * src/system.h: Need to define __attribute__ away for non-GCC
44ea3fbd
MA
5295 compilers as well (i.e. the vendor C compiler).
5296 Suggested by Albert Chin-A-Young.
5297
338963d1
TVH
52982002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
5299
5300 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
5301 canonical definition.
5302 * src/system.h: Use the canonical definition for PARAMS (avoids
5303 a conflict with the macro from lib/hash.h).
5304
c57b2479
AD
53052002-01-11 Akim Demaille <akim@epita.fr>
5306
5307 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 5308 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 5309
b85810ae
AD
53102002-01-09 Akim Demaille <akim@epita.fr>
5311
5312 * src/files.c, src/files.h (output_infix): New.
5313 (tab_extension): Remove.
5314 (compute_base_names): Compute the former, drop the latter.
5315 * src/output.c (prepare): Insert the muscles `output-infix', and
5316 `output-suffix'.
5317 * src/parse-skel.y (string, string.1): New.
5318 (section.header): Use it.
5319 (section.yacc): Remove.
5320 (prefix): Remove too.
5321 * src/scan-skel.l: Adjust.
5322 * src/bison.simple, src/bison.hairy: Adjust.
5323
cae60122
AD
53242002-01-09 Akim Demaille <akim@epita.fr>
5325
5326 * configure.in (WERROR_CFLAGS): Compute it.
5327 * src/Makefile.am (CFLAGS): Pass it.
5328 * tests/atlocal.in (CFLAGS): Idem.
5329 * src/files.c: Fix a few warnings.
5330 (get_extension_index): Remove, unused.
5331
ae404801
AD
53322002-01-08 Akim Demaille <akim@epita.fr>
5333
5334 * src/getargs.c (AS_FILE_NAME): New.
5335 (getargs): Use it to convert DOSish file names.
5336 * src/files.c (base_name): Rename as full_base_name to avoid
5337 clashes with `base_name ()'.
5338 (filename_split): New.
5339 (compute_base_names): N-th rewrite, using filename_split.
5340
22312b71
AD
53412002-01-08 Akim Demaille <akim@epita.fr>
5342
5343 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
5344 New, stolen from the Fileutils 4.1.
5345 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
5346 * configure.in: Check for the presence of memrchr, and of its
5347 prototype.
5348
a67cef01
TVH
53492002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
5350
5351 * lib/hash.h (__P): Added definition for this macro.
5352 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
5353 BUILT_SOURCES, to ensure they are generated first.
5354 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
5355 %error-verbose to allow bootstrapping with bison 1.30x.
5356
2b25d624
AD
53572002-01-06 Akim Demaille <akim@epita.fr>
5358
5359 * src/reader.c (parse_braces): Don't fetch the next char, the
5360 convention is to fetch on entry.
5361 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
5362 'switch' without a following semicolon.
5363 * tests/regression.at (braces parsing): New.
5364
3460813b
AD
53652002-01-06 Akim Demaille <akim@epita.fr>
5366
5367 Bison is dead wrong in its RR conflict reports.
5368
5369 * tests/torture.at (GNU Cim Grammar): New.
5370 * src/conflicts.c (count_rr_conflicts): Fix.
5371
73784c64
AD
53722002-01-06 Akim Demaille <akim@epita.fr>
5373
5374 Creating package.m4 from configure.ac causes too many problems.
5375
5376 * tests/Makefile.am (package.m4): Create it by hand,
5377 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
5378
25d81090
AD
53792002-01-06 Akim Demaille <akim@epita.fr>
5380
5381 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
5382 skeleton.h.
5383
a9b8959e
PE
53842002-01-04 Paul Eggert <eggert@twinsun.com>
5385
5386 * doc/bison.texinfo (Debugging):
5387 Remove YYSTDERR; it's no longer defined or used.
5388 Also, s/cstdio.h/cstdio/.
5389
25d81090
AD
53902002-01-03 Akim Demaille <akim@epita.fr>
5391
5392 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
5393
1109455c
AD
53942002-01-03 Akim Demaille <akim@epita.fr>
5395
5396 * src/parse-skel.y (process_skeleton): Don't bind the parser's
5397 tracing code to --trace, wait for a better --trace option, with
5398 args.
5399
7ea5e977
AD
54002002-01-03 Akim Demaille <akim@epita.fr>
5401
5402 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
5403 The ISO C++ standard is extremely clear about it: stderr is
5404 considered a macro, not a regular symbol (see table 94 `Header
5405 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
5406 Therefore std:: does not apply to it. It still does with fprintf.
5407 Also, s/cstdio.h/cstdio/.
5408
fab5b110
AD
54092002-01-03 Akim Demaille <akim@epita.fr>
5410
5411 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
5412 for non system headers.
5413
aed7fd9b
AD
54142002-01-02 Akim Demaille <akim@epita.fr>
5415
5416 Equip the skeleton chain with location tracking, runtime trace,
5417 pure parser and scanner.
5418
5419 * src/parse-skel.y: Request a pure parser, locations, and prefix
5420 renaming.
5421 (%union): Having several members with the same type does not help
5422 type mismatches, simplify.
5423 (YYPRINT, yyprint): New.
5424 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
5425 (skel_error): this.
5426 Handle locations.
5427 * src/scan-skel.l: Adjust to these changes.
5428 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
5429 (LOCATION_PRINT, skel_control_t): New.
5430
24fad99e
AD
54312001-12-30 Akim Demaille <akim@epita.fr>
5432
5433 * src/parse-skel.y: Get rid of the shift/reduce conflict:
5434 replace `gb' with BLANKS.
5435 * src/scan-skel.l: Adjust.
5436
a4b36db4
AD
54372001-12-30 Akim Demaille <akim@epita.fr>
5438
5439 * src/system.h: We don't need nor want bcopy.
5440 Throw away MS-DOS crap: we don't need getpid.
5441 * configure.in: We don't need strndup. It was even causing
5442 problems: because Flex includes the headers *before* us,
5443 _GNU_SOURCE is not defined by config.h, and therefore strndup was
5444 not visible.
5445 * lib/xstrndup.c: New.
5446 * src/scan-skel.l: Use it.
5447 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
5448 * src/parse-skel.y: Use %directives instead of #defines.
5449
1239777d
AD
54502001-12-30 Akim Demaille <akim@epita.fr>
5451
5452 * src/skeleton.h: New.
5453 * src/output.c (output_parser, output_master_parser): Remove, dead
5454 code.
5455 * src/output.h (get_lines_number, actions_output, guards_output)
5456 (token_definitions_output): Prototype them.
5457 * src/parse-skel.y: Add the license notice.
5458 Include output.h and skeleton.h.
5459 (process_skeleton): Returns void, and takes a single parameter.
5460 * src/scan-skel.l: Add the license notice.
5461 Include skeleton.h.
5462 Don't use %option yylineno: it seems that then Flex imagines
5463 REJECT has been used, and therefore it won't reallocate its
5464 buffers (which makes no other sense to me than a bug). It results
5465 in warnings for `unused: yy_flex_realloc'.
5466
9b3add5b
RA
54672001-12-30 Robert Anisko <robert.anisko@epita.fr>
5468
5469 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
5470 (MUSCLE_INSERT_PREFIX): ...to there.
5471 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
5472 (MUSCLE_INSERT_PREFIX): Move from here...
5473
5474 * src/bison.hairy: Add a section directive. Put braces around muscle
5475 names. This parser skeleton is still broken, but Bison should not
5476 choke on a bad muscle 'syntax'.
5477 * src/bison.simple: Add a section directive. Put braces around muscle
5478 names.
5479
5480 * src/files.h (strsuffix, stringappend): Add declarations.
5481 (tab_extension): Add declaration.
5482 (short_base_name): Add declaration.
5483
5484 * src/files.c (strsuffix, stringappend): No longer static. These
5485 functions are used in the skeleton parser.
5486 (tab_extension): New.
5487 (compute_base_names): Use the computations done in this function
fab5b110 5488 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
5489 names.
5490 (short_base_name): No longer static.
5491
5492 * src/output.c (output_skeleton): New.
5493 (output): Disable call to output_master_parser, and give a try to
5494 a new skeleton handling system.
5495 (guards_output, actions_output): No longer static.
5496 (token_definitions_output, get_lines_number): No longer static.
5497
5498 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
5499
fab5b110 5500 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
5501 parse-skel.y.
5502
5503 * src/parse-skel.y: New file.
5504 * src/scan-skel.l: New file.
5505
b5b61c61
AD
55062001-12-29 Akim Demaille <akim@epita.fr>
5507
5508 %name-prefix is broken.
5509
5510 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
5511 Adjust all dependencies.
5512 * tests/headers.at (export YYLTYPE): Strengthen this test: use
5513 %name-prefix.
5514
5515 Renaming yylval but not yylloc is not consistent. Now we do.
5516
5517 * src/bison.simple: Prefix yylloc if used.
5518 * doc/bison.texinfo (Decl Summary): Document that.
5519
8c9a50be
AD
55202001-12-29 Akim Demaille <akim@epita.fr>
5521
5522 * doc/bison.texinfo: Promote `%long-directive' over
5523 `%long_directive'.
5524 Remove all references to fixed-output-files, yacc is enough.
5525
d99361e6
AD
55262001-12-29 Akim Demaille <akim@epita.fr>
5527
5528 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
5529 user prologue. These are defaults.
5530 * tests/actions.at (Mid-rule actions): Make sure the user can
5531 define YYDEBUG and YYERROR_VERBOSE.
5532
b9cecb91
AD
55332001-12-29 Akim Demaille <akim@epita.fr>
5534
5535 * src/output.c (header_output): Don't forget to export YYLTYPE and
5536 yylloc.
5537 * tests/headers.at (export YYLTYPE): New, make sure it does.
5538 * tests/regression.at (%union and --defines, Invalid CPP headers):
5539 Move to...
5540 * tests/headers.at: here.
5541
aea13e97
AD
55422001-12-29 Akim Demaille <akim@epita.fr>
5543
5544 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
5545
931394cb
AD
55462001-12-29 Akim Demaille <akim@epita.fr>
5547
5548 * tests/actions.at (Mid-rule actions): Output on a single line
5549 instead of several.
5550
704a47c4
AD
55512001-12-29 Akim Demaille <akim@epita.fr>
5552
5553 * doc/bison.texinfo: Formatting changes.
5554
091e20bb
AD
55552001-12-29 Akim Demaille <akim@epita.fr>
5556
5557 Don't store the token defs in a muscle, just be ready to output it
5558 on command. Now possible via `symbols'. Fixes a memory leak.
5559
5560 * src/output.c (token_definitions_output): New.
5561 (output_parser, header_output): Use it.
5562 * src/reader.c (symbols_save): Remove.
5563
cce71710
AD
55642001-12-29 Akim Demaille <akim@epita.fr>
5565
5566 * src/bison.simple: Do not provide a default for YYSTYPE and
5567 YYLTYPE before the user's prologue. Otherwise it's hardly... a
5568 default.
5569
82c035a8
AD
55702001-12-29 Akim Demaille <akim@epita.fr>
5571
5572 Mid-rule actions are simply... ignored!
5573
5574 * src/reader.c (readgram): Be sure to attach mid-rule actions to
5575 the empty-rule associated to the dummy symbol, not to the host
5576 rule.
5577 * tests/actions.at (Mid-rule actions): New.
5578
8419d367
AD
55792001-12-29 Akim Demaille <akim@epita.fr>
5580
5581 Memory leak.
5582
5583 * src/reader.c (reader): Free grammar.
5584
375d5806
AD
55852001-12-29 Akim Demaille <akim@epita.fr>
5586
5587 Memory leak.
5588
5589 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
5590 since it allocates it for each state, although only one is needed.
5591 (allocate_storage): Do it here.
5592
f51cb8ff
AD
55932001-12-29 Akim Demaille <akim@epita.fr>
5594
5595 * src/options.h, src/options.c (create_long_option_table): Rename
5596 as...
5597 (long_option_table_new): this, with a clearer prototype.
5598 (percent_table): Remove, unused,
5599 * src/getargs.c (getargs): Adjust.
5600
29e88316
AD
56012001-12-29 Akim Demaille <akim@epita.fr>
5602
5603 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
5604 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
5605 as states.
5606
b9f71f19
AD
56072001-12-29 Akim Demaille <akim@epita.fr>
5608
5609 * src/lalr.c (build_relations): Rename `states' as `states1'.
5610 Sorry, I don't understand exactly what it is, no better name...
5611
1a2b5d37
AD
56122001-12-29 Akim Demaille <akim@epita.fr>
5613
5614 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
5615 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
5616 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
5617 as rules.
5618
1cca533e
AD
56192001-12-29 Akim Demaille <akim@epita.fr>
5620
5621 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
5622 ago.
5623
c03ae966
AD
56242001-12-29 Akim Demaille <akim@epita.fr>
5625
5626 * src/reader.c, src/reader.h (user_toknums): Remove.
5627 Adjust all users to use symbols[i]->user_token_number.
5628
5a670b1e
AD
56292001-12-29 Akim Demaille <akim@epita.fr>
5630
5631 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
5632 Adjust all users to use symbols[i]->prec or ->assoc.
5633
ad949da9
AD
56342001-12-29 Akim Demaille <akim@epita.fr>
5635
5636 * src/reader.c, src/reader.h (tags): Remove.
5637 Adjust all users to use symbols[i]->tag.
5638
0e78e603
AD
56392001-12-29 Akim Demaille <akim@epita.fr>
5640
5641 * src/gram.h, src/gram.c (symbols): New, similar to state_table
5642 and rule_table.
5643 * src/reader.c (packsymbols): Fill this table.
5644 Drop sprec.
5645 * src/conflicts.c (resolve_sr_conflict): Adjust.
5646 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
5647 single table.
5648 Use symbols[i]->tag instead of tags[i].
5649
213e640e
AD
56502001-12-29 Akim Demaille <akim@epita.fr>
5651
5652 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
5653 In addition, put a comment in there, to replace...
5654 * tests/regression.at (%union and C comments): Remove.
5655
e7b8bef1
AD
56562001-12-29 Akim Demaille <akim@epita.fr>
5657
5658 * tests/regression.at (Web2c Actions): Blindly move the actual
5659 output as expected output. The contents *seem* right to me, but I
5660 can't pretend reading perfectly parser tables... Nonetheless, all
5661 the other tests pass correctly, the table look OK, even though the
5662 presence of `$axiom' is to be noted: AFAICS it is useless (but
5663 harmless).
5664
b68e7744
AD
56652001-12-29 Akim Demaille <akim@epita.fr>
5666
5667 * src/reader.c (readgram): Don't add the rule 0 if there were no
5668 rules read. In other words, add it _after_ having performed
5669 grammar sanity checks.
5670 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
5671
78d5bae9
AD
56722001-12-29 Akim Demaille <akim@epita.fr>
5673
5674 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
5675 visible, and some states have now a different number.
5676
ff442794
AD
56772001-12-29 Akim Demaille <akim@epita.fr>
5678
5679 * src/reader.c (readgram): Bind the initial rule's lineno to that
5680 of the first rule.
5681 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
5682 (Solved SR Conflicts): Adjust rule 0's line number.
5683
610ab194
AD
56842001-12-29 Akim Demaille <akim@epita.fr>
5685
5686 Fix the `GAWK Grammar' failure.
5687
5688 * src/LR0.c (final_state): Initialize to -1 so that we do compute
5689 the reductions of the first state which was mistakenly confused
5690 with the final state because precisely final_state was initialized
5691 to 0.
5692 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
5693 now noticed by Bison.
5694 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
5695 have a reduction on $default.
5696
29d29c8f
AD
56972001-12-29 Akim Demaille <akim@epita.fr>
5698
5699 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
5700 rule line numbers.
5701 * src/closure.c (print_closure): Likewise.
5702 * src/derives.c (print_derives): Likewise.
5703 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
5704 now.
5705
7c6b64d0
AD
57062001-12-29 Akim Demaille <akim@epita.fr>
5707
5708 * src/lalr.c (lookaheads_print): New.
5709 (lalr): Call it when --trace-flag.
5710 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
5711 are dumped.
5712
3d4daee3
AD
57132001-12-29 Akim Demaille <akim@epita.fr>
5714
5715 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
5716 when walking through ritem, even via rule->rhs.
5717 * src/reduce.c (dump_grammar, useful_production, reduce_output)
5718 (useful_production, useless_nonterminals): Likewise.
5719 (reduce_grammar_tables): Likewise, plus update nritems.
5720 * src/nullable.c (set_nullable): Likewise.
5721 * src/lalr.c (build_relations): Likewise.
5722 * tests/sets.at (Nullable): Adjust.
5723 Fortunately, now, the $axiom is no longer nullable.
5724
9e7f6bbd
AD
57252001-12-29 Akim Demaille <akim@epita.fr>
5726
5727 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
5728 the 0-sentinel.
5729 * src/gram.c (ritem_longest_rhs): Likewise.
5730 * src/reduce.c (nonterminals_reduce): Likewise.
5731 * src/print_graph.c (print_graph): Likewise.
5732 * src/output.c (output_rule_data): Likewise.
5733 * src/nullable.c (set_nullable): Likewise.
5734
255ef638
AD
57352001-12-29 Akim Demaille <akim@epita.fr>
5736
5737 * src/output.c: Comment changes.
5738
0d8a7363
AD
57392001-12-27 Paul Eggert <eggert@twinsun.com>
5740
5741 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
5742 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
5743 Sparc, as they were causing more porting problems than the
5744 (minor) performance improvement was worth.
5745
5746 Also, catch up with 1.31's YYSTD.
5747
3db472b9
AD
57482001-12-27 Akim Demaille <akim@epita.fr>
5749
5750 * src/output.c (output_gram): Rely on nritems, not the
5751 0-sentinel. See below.
5752 Use -1 as separator, not 0.
5753 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
5754 Rely on -1 as separator in yyrhs, instead of 0.
5755 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
5756 twice `Now at end of input', therefore there are two lines less to
5757 expect.
5758
b365aa05
AD
57592001-12-27 Akim Demaille <akim@epita.fr>
5760
5761 * tests/regression.at (Unresolved SR Conflicts):
5762 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
5763 below.
5764
30171f79
AD
57652001-12-27 Akim Demaille <akim@epita.fr>
5766
5767 * src/LR0.c (new_state): Recognize the final state by the fact it
5768 is reached by eoftoken.
5769 (insert_start_shifting_state, insert_eof_shifting_state)
5770 (insert_accepting_state, augment_automaton): Remove, since now
5771 these states are automatically computed from the initial state.
5772 (generate_states): Adjust.
5773 * src/print.c: When reporting a rule number to the user, substract
5774 1, so that the axiom rule is rule 0, and the first user rule is 1.
5775 * src/reduce.c: Likewise.
5776 * src/print_graph.c (print_core): For the time being, just as for
5777 the report, depend upon --trace-flags to dump the full set of
5778 items.
5779 * src/reader.c (readgram): Once the grammar read, insert the rule
5780 0: `$axiom: START-SYMBOL $'.
5781 * tests/set.at: Adjust: rule 0 is now displayed, and since the
5782 number of the states has changed (the final state is no longer
5783 necessarily the last), catch up.
5784
75142d45
AD
57852001-12-27 Akim Demaille <akim@epita.fr>
5786
5787 Try to make the use of the eoftoken valid. Given that its value
5788 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
5789 is used instead of > 0 where appropriate, (ii), depend upon nritems
5790 instead of the 0-sentinel.
5791
5792 * src/gram.h, src/gram.c (nritems): New.
5793 Expected to be duplication of nitems, but for the time being...
5794 * src/reader.c (packgram): Assert nritems and nitems are equal.
5795 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
5796 * src/closure.c (print_closure, print_fderives): Likewise.
5797 * src/gram.c (ritem_print): Likewise.
5798 * src/print.c (print_core, print_grammar): Likewise.
5799 * src/print_graph.c: Likewise.
5800
b7c49edf
AD
58012001-12-27 Akim Demaille <akim@epita.fr>
5802
5803 * src/main.c (main): If there are complains after grammar
5804 reductions, then output the report anyway if requested, then die.
5805 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
5806 * src/reader.c (eoftoken): New.
5807 (parse_token_decl): If the token being defined has value `0', it
5808 is the eoftoken.
5809 (packsymbols): No longer hack `tags' to insert `$' by hand.
5810 Be sure to preserve the value of the eoftoken.
5811 (reader): Make sure eoftoken is defined.
5812 Initialize nsyms to 0: now eoftoken is created just like the others.
5813 * src/print.c (print_grammar): Don't special case the eof token.
5814 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
5815 lie anyway, albeit pleasant.
5816 * tests/calc.at: Exercise error messages with eoftoken.
5817 Change the grammar so that empty input is invalid.
5818 Adjust expectations.
5819 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
5820
ec2da99f
AD
58212001-12-27 Akim Demaille <akim@epita.fr>
5822
5823 * configure.in: Check the protos of strchr ans strspn.
5824 Replace strchr if needed.
5825 * src/system.h: Provide the protos of strchr, strspn and memchr if
5826 missing.
5827 * lib/strchr.c: New.
5828 * src/reader.c (symbols_save): Use strchr.
5829
8adfa272
AD
58302001-12-27 Akim Demaille <akim@epita.fr>
5831
5832 * src/print.c, src/print_graph.c (escape): New.
5833 Use it to quote the TAGS outputs.
5834 * src/print_graph.c (print_state): Now errors are in red, and
5835 reductions in green.
5836 Prefer high to wide: output the state number on a line of its own.
5837
80dac38c
AD
58382001-12-27 Akim Demaille <akim@epita.fr>
5839
5840 * src/state.h, src/state.c (reductions_new): New.
5841 * src/LR0.c (set_state_table): Let all the states have a
5842 `reductions', even if reduced to 0.
5843 (save_reductions): Adjust.
5844 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
5845 * src/print.c (print_reductions, print_actions): Adjust.
5846 * src/output.c (action_row): Adjust.
5847
2cec70b9
AD
58482001-12-27 Akim Demaille <akim@epita.fr>
5849
5850 * src/state.h, src/state.c (errs_new, errs_dup): New.
5851 * src/LR0.c (set_state_table): Let all the states have an errs,
5852 even if reduced to 0.
5853 * src/print.c (print_errs, print_reductions): Adjust.
5854 * src/output.c (output_actions, action_row): Adjust.
5855 * src/conflicts.c (resolve_sr_conflict): Adjust.
5856
13ca549a
AD
58572001-12-27 Akim Demaille <akim@epita.fr>
5858
5859 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
5860
5092aba5
AD
58612001-12-27 Akim Demaille <akim@epita.fr>
5862
5863 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
5864 * src/print.c: here.
5865 (lookaheadset, shiftset): New, used as additional storage by
5866 print_reductions.
5867 (print_results): Adjust.
5868 (print_shifts, print_gotos, print_errs): New, extracted from...
5869 (print_actions): here.
5870 * src/print_graph.c (print_actions): Remove dead code.
5871
11e2beca
AD
58722001-12-27 Akim Demaille <akim@epita.fr>
5873
5874 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
5875 `$n' and `@n'.
5876
dac3c910
AD
58772001-12-27 Akim Demaille <akim@epita.fr>
5878
5879 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
5880 (build_relations): Adjust.
5881
d0b0fefa
AD
58822001-12-27 Akim Demaille <akim@epita.fr>
5883
5884 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
5885 duplication.
5886
adc8c848
AD
58872001-12-27 Akim Demaille <akim@epita.fr>
5888
5889 * src/reader.c (packgram): Catch nitems overflows.
5890
14d293ac
AD
58912001-12-27 Akim Demaille <akim@epita.fr>
5892
5893 * src/files.c, src/files.h (guard_obstack): Remove.
5894 * src/output.c (output): Adjust.
5895 * src/reader.c (parse_braces): New, factoring...
5896 (copy_action, copy_guard): these two which are renamed as...
5897 (parse_action, parse_guard): these.
5898 As a voluntary consequence, using braces around guards is now
5899 mandatory.
5900
f499b062
AD
59012001-12-27 Akim Demaille <akim@epita.fr>
5902
5903 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
5904 * src/reader.c (symbol_list): `guard' and `guard_line' are new
5905 members.
5906 (symbol_list_new): Adjust.
5907 (copy_action): action_line is the first line, not the last.
5908 (copy_guard): Just as for actions, store the `action' only, not
5909 the switch/case/break flesh.
5910 Don't parse the user action that might follow the guard, let...
5911 (readgram): do it, i.e., now, there can be an action after a
5912 guard.
5913 In other words the guard is just explicitly optional.
5914 (packgram): Adjust.
5915 * src/output.c (guards_output): New.
5916 (output_parser): Call it when needed.
5917 (output): Also free the guard and attrs obstacks.
5918 * src/files.c, src/files.h (obstack_save): Remove.
5919 (output_files): Remove.
5920 As a result, if one needs the former `.act' file, using an
5921 appropriate skeleton which requires actions and guards is now
5922 required.
5923 * src/main.c (main): Adjust.
5924 * tests/semantic.at: New.
5925 * tests/regression.at: Use `input.y' as input file name.
5926 Avoid 8+3 problems by requiring input.c when the test needs the
5927 parser.
5928
d945f5cd
AD
59292001-12-27 Akim Demaille <akim@epita.fr>
5930
5931 * src/reader.c (symbol_list_new): Be sure to initialize all the
5932 fields.
5933
d200e455
AD
59342001-12-27 Akim Demaille <akim@epita.fr>
5935
5936 All the hacks using a final pseudo state are now useless.
5937
5938 * src/LR0.c (set_state_table): state_table holds exactly nstates.
5939 * src/lalr.c (nLA): New.
5940 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
5941 instead of lookaheadsp from the pseudo state (nstate + 1).
5942
f9507c28
AD
59432001-12-27 Akim Demaille <akim@epita.fr>
5944
5945 * src/output.c (action_row, token_actions): Use a state_t instead
5946 of a integer, and nlookaheads instead of the following state's
5947 lookaheadsp.
5948
065fbd27
AD
59492001-12-27 Akim Demaille <akim@epita.fr>
5950
5951 * src/conflicts.c (log_resolution, flush_shift)
5952 (resolve_sr_conflict, set_conflicts, solve_conflicts)
5953 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
5954 (conflicts_print, print_reductions): Use a state_t instead of an
5955 integer when referring to a state.
5956 As much as possible, depend upon nlookaheads, instead of the
5957 `lookaheadsp' member of the following state (since lookaheads of
5958 successive states are successive, the difference between state n + 1
5959 and n served as the number of lookaheads for state n).
5960 * src/lalr.c (add_lookback_edge): Likewise.
5961 * src/print.c (print_core, print_actions, print_state)
5962 (print_results): Likewise.
5963 * src/print_graph.c (print_core, print_actions, print_state)
5964 (print_graph): Likewise.
5965 * src/conflicts.h: Adjust.
5966
1b177bd7
AD
59672001-12-27 Akim Demaille <akim@epita.fr>
5968
5969 * src/bison.hairy: Formatting/comment changes.
5970 ANSIfy.
5971 Remove `register' indications.
5972 Add plenty of `static'.
5973
7742ddeb
AD
59742001-12-27 Akim Demaille <akim@epita.fr>
5975
5976 * src/output.c (prepare): Drop the muscle `ntbase' which
5977 duplicates ntokens.
5978 * src/bison.simple: Formatting/comment changes.
5979 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
5980 is an undocumented synonym.
5981
1fa14068
AD
59822001-12-22 Akim Demaille <akim@epita.fr>
5983
5984 * src/output.c (output_table_data): Change the prototype to use
5985 `int' for array ranges: some invocations do pass an int, not a
5986 short.
5987 Reported by Wayne Green.
5988
b9752825
AD
59892001-12-22 Akim Demaille <akim@epita.fr>
5990
5991 Some actions of web2c.y are improperly triggered.
5992 Reported by Mike Castle.
5993
5994 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
5995 * tests/regression.at (Web2c): Rename as...
5996 (Web2c Report): this.
5997 (Web2c Actions): New.
5998
776209d6
AD
59992001-12-22 Akim Demaille <akim@epita.fr>
6000
6001 Reductions in web2c.y are improperly reported.
6002 Reported by Mike Castle.
6003
6004 * src/conflicts.c (print_reductions): Fix.
6005 * tests/regression.at (Web2c): New.
6006
275fc3ad
AD
60072001-12-18 Akim Demaille <akim@epita.fr>
6008
6009 Some host fail on `assert (!"foo")', which expands to
6010 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
6011 Reported by Nelson Beebee.
6012
6013 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
6014 `#define it_succeeded 0' and `assert (it_succeeded)'.
6015
897668ee
MA
60162001-12-17 Marc Autret <autret_m@epita.fr>
6017
6018 * src/bison.simple: Don't hard code the skeleton line and filename.
6019 * src/output.c (output_parser): Rename 'line' as 'output_line'.
6020 New line counter 'skeleton_line' (skeleton-line muscle).
6021
ab3399e0
PE
60222001-12-17 Paul Eggert <eggert@twinsun.com>
6023
6024 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
6025 YYDEBUG must be defined to a nonzero value.
6026
6027 * src/bison.simple (yytname): Do not assume that the user defines
6028 YYDEBUG to a properly parenthesized expression.
6029
3877f72b
AD
60302001-12-17 Akim Demaille <akim@epita.fr>
6031
6032 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
6033 nlookaheads is a new member.
6034 Adjust all users.
6035 * src/lalr.h (nlookaheads): Remove this orphan declaration.
6036 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
6037 state.
776209d6 6038
331dbc1b
AD
60392001-12-17 Akim Demaille <akim@epita.fr>
6040
6041 * src/files.h, src/files.c (open_files, close_files): Remove.
6042 * src/main.c (main): Don't open/close files, nor invoke lex_free,
6043 let...
6044 * src/reader.c (reader): Do it.
776209d6 6045
be750e4c
AD
60462001-12-17 Akim Demaille <akim@epita.fr>
6047
6048 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 6049
709ae8c6
AD
60502001-12-17 Akim Demaille <akim@epita.fr>
6051
6052 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
6053 (flush_reduce): New.
6054 (resolve_sr_conflict): Adjust.
776209d6 6055
f87685c3
AD
60562001-12-17 Akim Demaille <akim@epita.fr>
6057
6058 * src/output.c (output_obstack): Be static and rename as...
6059 (format_obstack): this, to avoid any confusion with files.c's
6060 output_obstack.
6061 * src/reader.h (muscle_obstack): Move to...
6062 * src/output.h: here, since it's defined in output.c.
6063
837491d8
AD
60642001-12-17 Akim Demaille <akim@epita.fr>
6065
6066 * src/output.c (action_row, save_column, default_goto)
6067 (sort_actions, matching_state, pack_vector): Better variable
6068 locality.
6069
796d61fb
AD
60702001-12-17 Akim Demaille <akim@epita.fr>
6071
6072 * src/output.c: Various formatting changes.
776209d6 6073
64d15509
AD
60742001-12-17 Akim Demaille <akim@epita.fr>
6075
6076 * src/files.c (output_files): Free the output_obstack.
6077 * src/main.c (main): Call print and print_graph conditionally.
6078 * src/print.c (print): Work unconditionally.
6079 * src/print_graph.c (print_graph): Work unconditionally.
6080 * src/conflicts.c (log_resolution): Output only if verbose_flag.
6081
fbc8ecb7
MA
60822001-12-16 Marc Autret <autret_m@epita.fr>
6083
6084 * src/output.c (actions_output): Fix. When we use %no-lines,
6085 there is one less line per action.
6086
f0440388
MA
60872001-12-16 Marc Autret <autret_m@epita.fr>
6088
6089 * src/bison.simple: Remove a useless #line directive.
6090 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
6091 * src/output.c (get_lines_number): New.
776209d6 6092 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
6093 output muscles.
6094 Fix line numbering.
6095 (actions_output): Computes the number of lines taken by actions.
6096 (output_master_parser): Insert new skeleton which is the name of
6097 the output parser file name.
6098
a79986b8
MA
60992001-12-15 Marc Autret <autret_m@epita.fr>
6100
6101 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
6102
4ec8e00f
MA
61032001-12-15 Marc Autret <autret_m@epita.fr>
6104
6105 * src/output.c (output_gram): Keep track of the hairy one.
6106
1a4648ff
AD
61072001-12-15 Akim Demaille <akim@epita.fr>
6108
6109 Make `make distcheck' work.
6110
6111 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
6112 system.h which uses libgettext.h.
6113
9c2c67e6
AD
61142001-12-15 Akim Demaille <akim@epita.fr>
6115
6116 * src/nullable.c (set_nullable): Useless rules must be skipped,
6117 otherwise, since we range over their symbols, we might look at a
6118 nonterminal which no longer ``exists'', i.e., it is not counted in
6119 `nvars', hence we overflow our arrays.
6120
93ede233
AD
61212001-12-15 Akim Demaille <akim@epita.fr>
6122
6123 The header can also be produced directly, without any obstack!
6124 Yahoo!
6125
6126 * src/files.c, src/files.h (defines_obstack): Remove.
6127 (compute_header_macro): Global.
6128 (defines_obstack_save): Remove.
6129 * src/reader.c (parse_union_decl): No longer output to
6130 defines_obstack: its content can be found in the `stype' muscle
6131 anyway.
6132 (output_token_translations): Merge into...
6133 (symbols_output): this.
6134 Rename as...
6135 (symbols_save): this.
6136 (reader): Adjust.
6137 * src/output.c (header_output): New.
6138 (output): Call it.
6139
2666f928
AD
61402001-12-15 Akim Demaille <akim@epita.fr>
6141
6142 * src/reader.c (parse_union_decl): Instead of handling two obstack
6143 simultaneously, use one to define the `stype' muscle, and use the
6144 value of the latter to fill defines_obstack.
6145 (copy_comment): Remove.
6146 (copy_comment2): Work for a single obstack.
6147 Rename as...
6148 (copy_comment): this.
6149
428046f8
AD
61502001-12-15 Akim Demaille <akim@epita.fr>
6151
6152 * src/lex.c, src/lex.h (xgetc): No longer static.
6153 * src/reader.c (parse_union_decl): Revamp.
6154
ea52d706
AD
61552001-12-15 Akim Demaille <akim@epita.fr>
6156
6157 Still making progress in separating Bison into (i) input, (ii)
6158 process, (iii) output: now we can directly output the parser file
6159 without using table_obstack at all.
6160
6161 * src/files.c, src/files.h (table_obstack): Bye bye.
6162 (parser_file_name): New.
6163 * src/files.c (compute_output_file_names): Compute it.
6164 * src/output.c (actions_output, output_parser)
6165 (output_master_parser): To a file instead of an obstack.
6166
3f96f4dc
AD
61672001-12-15 Akim Demaille <akim@epita.fr>
6168
6169 Attach actions to rules, instead of pre-outputting them to
6170 actions_obstack.
6171
6172 * src/gram.h (rule_t): action and action_line are new members.
6173 * src/reader.c (symbol_list): Likewise.
6174 (copy_action): Save the actions within the rule.
6175 (packgram): Save them in rule_table.
6176 * src/output.c (actions_output): New.
6177 (output_parser): Use it on `%%actions'.
6178 (output_rule_data): Don't free rule_table.
6179 (output): Do it.
6180 (prepare): Don't save the `action' muscle.
6181 * src/bison.simple: s/%%action/%%actions/.
6182
51576fb3
AD
61832001-12-15 Akim Demaille <akim@epita.fr>
6184
6185 * src/reader.c (copy_action): When --yacc, don't append a `;'
6186 to the user action: let it fail if lacking.
dee049eb 6187 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 6188
2648a72d
AD
61892001-12-14 Akim Demaille <akim@epita.fr>
6190
6191 * src/lex.c (literalchar): Simply return the char you decoded, non
6192 longer mess around with obstacks and int pointers.
6193 Adjust all callers.
6194
92790e5b
AD
61952001-12-14 Akim Demaille <akim@epita.fr>
6196
6197 * src/lex.c (literalchar): Don't escape the special characters,
6198 just decode them, and keep them as char (before, eol was output as
6199 the 2 char string `\n' etc.).
6200 * src/output.c (output_rule_data): Use quotearg to output the
6201 token strings.
6202
927c1557
PE
62032001-12-13 Paul Eggert <eggert@twinsun.com>
6204
6205 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
6206 Do not infringe on the global user namespace when using C++.
6207 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
6208 All uses of `fprintf' and `stderr' changed.
6209
6210 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
6211
ed8e1f68
AD
62122001-12-13 Akim Demaille <akim@epita.fr>
6213
6214 The computation of nullable is broken: it doesn't handle empty
6215 RHS's properly.
6216
6217 * tests/torture.at (GNU AWK Grammar): New.
6218 * tests/sets.at (Nullable): New.
6219 * src/nullable.c (set_nullable): Instead of blindly looping over
6220 `ritems', loop over the rules, and then over their rhs's.
6221
6222 Work around Autotest bugs.
6223
6224 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
6225 frame, because Autotest understand lines starting with a `+' as
6226 traces from the shell. Then, they are not processed properly.
6227 Admittedly an Autotest bug, but we don't have time to wait for
6228 Autotest to catch up.
6229 * tests/regression.at (Broken Closure): Adjust to the new table
6230 frames.
6231 Move to...
6232 * tests/sets.at: here.
6233
cb581495
AD
62342001-12-13 Akim Demaille <akim@epita.fr>
6235
6236 * src/closure.c (closure): Use nrules instead of playing tricks
6237 with BITS_PER_WORD.
6238
2e729273
AD
62392001-12-13 Akim Demaille <akim@epita.fr>
6240
6241 * src/print.c (print_actions): Output the handling of `$' as the
6242 traces do: shifting the token EOF. Before EOF was treated as a
6243 nonterminal.
6244 * tests/regression.at: Adjust some tests.
6245 * src/print_graph.c (print_core): Complete the set of items via
6246 closure. The next-to-final and final states are still unsatisfying,
6247 but that's to be addressed elsewhere.
6248 No longer output the rule numbers, but do output the state number.
6249 A single loop for the shifts + gotos is enough, but picked a
6250 distinct color for each.
6251 (print_graph): Initialize and finalize closure.
6252
107f7dfb
AD
62532001-12-13 Akim Demaille <akim@epita.fr>
6254
6255 * src/reader.c (readgram): Remove dead code, an strip useless
6256 braces.
6257 (get_type): Remove, unused.
6258
9b53a24f
AD
62592001-12-12 Akim Demaille <akim@epita.fr>
6260
6261 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
6262 on that of lib/error.c.
6263
dbfb6dcd
AD
62642001-12-12 Akim Demaille <akim@epita.fr>
6265
6266 Some hosts don't like `/' in includes.
6267
6268 * src/system.h: Include libgettext.h without qualifying the path.
6269 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
6270 $(top_srcdir).
6271
c25fb648
MA
62722001-12-11 Marc Autret <autret_m@epita.fr>
6273
6274 * src/output.c (output_parser): Remove useless muscle.
6275
710ddc4f
MA
62762001-12-11 Marc Autret <autret_m@epita.fr>
6277
6278 * src/bison.simple: Remove #line just before %%epilogue. It
6279 is now handled in ...
6280 * src/reader.c (read_additionnal_code): Add the output of a
6281 #line for the epilogue.
6282
e83d80b8
MA
62832001-12-10 Marc Autret <autret_m@epita.fr>
6284
927c1557 6285 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
6286 replace precedent remove.
6287 * src/bison.simple: Remove #line before %%prologue because
6288 %%input-line is wrong at this time.
6289
971d5158
MA
62902001-12-10 Marc Autret <autret_m@epita.fr>
6291
6292 * src/reader.c (symbols_output): Clean up.
927c1557 6293 * src/output.c (output_gram, output): Clean up.
971d5158 6294
5edafffd
AD
62952001-12-10 Akim Demaille <akim@epita.fr>
6296
6297 * src/lalr.c (initialize_lookaheads): New. Extracted from...
6298 * src/LR0.c (set_state_table): here.
6299 * src/lalr.c (lalr): Call it.
6300
0279f8e9
AD
63012001-12-10 Akim Demaille <akim@epita.fr>
6302
6303 * src/state.h (shifts): Remove the `number' member: shifts are
6304 attached to state, hence no longer need to be labelled with a
6305 state number.
6306
190c4f5f
AD
63072001-12-10 Akim Demaille <akim@epita.fr>
6308
6309 Now that states have a complete set of members, the linked list of
6310 shifts is useless: just fill directly the state's shifts member.
6311
6312 * src/state.h (shifts): Remove the `next' member.
6313 * src/LR0.c (first_state, last_state): Remove.
6314 Adjust the callers.
6315 (augment_automaton): Don't look for the shifts that must be added
6316 a shift on EOF: it is those of the state we looked for! But now,
6317 since shifts are attached, it is no longer needed to looking
6318 merely by its id: its number.
6319
2a73b93d
AD
63202001-12-10 Akim Demaille <akim@epita.fr>
6321
6322 * src/LR0.c (augment_automaton): Better variable locality.
6323 Remove an impossible branch: if there is a state corresponding to
6324 the start symbol being shifted, then there is shift for the start
6325 symbol from the initial state.
6326
74392f6a
AD
63272001-12-10 Akim Demaille <akim@epita.fr>
6328
6329 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
6330 only when appropriate: when insert_start_shifting_state' is not
6331 invoked.
6332 * tests/regression.at (Rule Line Numbers): Adjust.
6333
37c82725
AD
63342001-12-10 Akim Demaille <akim@epita.fr>
6335
6336 * src/LR0.c (augment_automaton): Now that all states have shifts,
6337 merge the two cases addition shifts to the initial state.
6338
6a164e0c
AD
63392001-12-10 Akim Demaille <akim@epita.fr>
6340
6341 * src/lalr.c (set_state_table): Move to...
6342 * src/LR0.c: here.
6343 * src/lalr.c (lalr): Don't call it...
6344 * src/LR0.c (generate_states): do it.
6345 * src/LR0.h (first_state): Remove, only the table is used.
6346
7215de24
AD
63472001-12-10 Akim Demaille <akim@epita.fr>
6348
6349 * src/LR0.h (first_shift, first_reduction): Remove.
6350 * src/lalr.c: Don't use first_shift: find shifts through the
6351 states.
6352
80e25d4d
AD
63532001-12-10 Akim Demaille <akim@epita.fr>
6354
6355 * src/LR0.c: Attach shifts to states as soon as they are
6356 computed.
6357 * src/lalr.c (set_state_table): Instead of assigning shifts to
6358 state, just assert that the mapping was properly done.
6359
0ab3728b
AD
63602001-12-10 Akim Demaille <akim@epita.fr>
6361
6362 * src/LR0.c (insert_start_shift): Rename as...
6363 (insert_start_shifting_state): this.
6364 (insert_eof_shifting_state, insert_accepting_state): New.
6365 (augment_automaton): Adjust.
6366 Better locality of the variables.
6367 When looking if the start_symbol is shifted from the initial
6368 state, using `while (... symbol != start_symbol ...)' sounds
6369 better than `while (... symbol < start_symbol ...)': If fail
6370 to see how the order between symbols could be relevant!
6371
78af9bbc
AD
63722001-12-10 Akim Demaille <akim@epita.fr>
6373
6374 * src/getargs.h: Don't declare `spec_name_prefix' and
6375 `spec_file_prefix', declared by src/files.h.
6376 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
6377 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
6378 * src/output.c (prepare): Adjust.
6379 * src/reader.c (symbols_output): Likewise.
6380 * src/vmsgetargs.c: Vaguely adjust, but who cares?
6381
bdef2a41
AD
63822001-12-10 Akim Demaille <akim@epita.fr>
6383
6384 * src/muscle_tab.c (muscle_init): NULL is a better default than
6385 `"0"'.
6386
3735969c
AD
63872001-12-10 Akim Demaille <akim@epita.fr>
6388
6389 * src/reader.c (reader): Calling symbols_output once is enough.
6390
49701457
AD
63912001-12-10 Akim Demaille <akim@epita.fr>
6392
6393 Now that states have a complete set of members, the linked list of
6394 reductions is useless: just fill directly the state's reductions
6395 member.
6396
6397 * src/state.h (struct reductions): Remove member `number' and
6398 `next'.
6399 * src/LR0.c (first_reduction, last_reduction): Remove.
6400 (save_reductions): Don't link the new reductions, store them in
6401 this_state.
6402 * src/lalr.c (set_state_table): No need to attach reductions to
6403 states, it's already done.
6404 * src/output.c (output_actions): No longer free the shifts, then
6405 the reductions, then the states: free all the states and their
6406 members.
6407
0edad749
AD
64082001-12-10 Akim Demaille <akim@epita.fr>
6409
6410 * src/options.c (OPTN, DRTV, BOTH): New.
6411 (option_table): Use them.
6412
0edad749
AD
6413 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
6414 the job of system.h.
6415 * src/options.c: Don't include stdio.h and xalloc.h for the same
6416 reasons.
6417
5449dd0f
AD
64182001-12-10 Akim Demaille <akim@epita.fr>
6419
6420 * src/output.c (output, prepare): Make sure the values of the
6421 muscles `action' and `prologue' are 0-terminated.
6422
a870c567
AD
64232001-12-10 Akim Demaille <akim@epita.fr>
6424
6425 Clean up GCC warnings.
6426
6427 * src/reader.c (copy_action): `buf' is not used.
6428 (parse_skel_decl): Be static.
6429 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
6430 * src/options.h (create_long_option_table): Have a real prototype.
6431 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
6432 (hash_delete_at): Return const void *.
6433 Adjust casts to preserve the const.
6434
80df8768
AD
64352001-12-10 Akim Demaille <akim@epita.fr>
6436
6437 * configure.in: Require 2.52g.
6438 M4 is not needed, but AUTOM4TE is.
6439 * m4/m4.m4: Remove.
6440 * tests/Makefile.am: Adjust.
6441
f693ad14
AD
64422001-12-10 Akim Demaille <akim@epita.fr>
6443
6444 One structure for states is enough, even though theoretically
6445 there are LR(0) states and LALR(1) states.
6446
6447 * src/lalr.h (state_t): Remove.
6448 (state_table): Be state_t **, not state_t *.
6449 * src/state.h (core, CORE_ALLOC): Rename as...
6450 (state_t, STATE_ALLOC): this.
6451 Add the LALR(1) members: shifts, reductions, errs.
6452 * src/LR0.c (state_table): Rename as...
6453 (state_hash): this, to avoid name clashes with the global
6454 `state_table'.
6455 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
6456 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
6457
74ffbcb6
AD
64582001-12-10 Akim Demaille <akim@epita.fr>
6459
6460 Bison dumps core on bash.y.
6461 Reported by Pascal Bart.
6462
6463 * src/warshall.c (bitmatrix_print): New.
6464 (TC): Use it.
6465 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
6466 j must be the outer loop.
6467 * tests/regression.at (Broken Closure): New.
6468
07708e19
AD
64692001-12-05 Akim Demaille <akim@epita.fr>
6470
6471 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
6472 its argument.
6473