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