]> git.saurik.com Git - bison.git/blob - ChangeLog
Add --disable-yacc.
[bison.git] / ChangeLog
1 2003-01-04 Paul Eggert <eggert@twinsun.com>
2
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
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
14 2003-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.
24
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.
30
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.
37
38 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
39
40 2003-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
46 2003-01-01 Paul Eggert <eggert@twinsun.com>
47
48 * Version 1.875.
49
50 2002-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
57 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
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
65 2002-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.
70
71 2002-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
99 2002-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.
121
122 2002-12-26 Paul Eggert <eggert@twinsun.com>
123
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
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 ".".
137
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.
146
147 2002-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
165 2002-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
175 2002-12-24 Paul Eggert <eggert@twinsun.com>
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",
226 <INITIAL>"%parse-param", <INITIAL>"%printer",
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
240 2002-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
246 2002-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
251 disagreed with the Bison documentation. Bug
252 reported by Andrew Walrond.
253
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
261 2002-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.
269 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
270 as an alias for bison y.
271
272 * po/LINGUAS: Add da.
273
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
292 2002-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
404 2002-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
560 2002-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
567 <http://mail.gnu.org/pipermail/bug-bison/2002-December/001945.html>.
568
569 2002-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.
574
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.
595 (rules): Use it.
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
650 2002-12-06 Paul Eggert <eggert@twinsun.com>
651
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.
659
660 2002-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
667 2002-11-30 Paul Eggert <eggert@twinsun.com>
668
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
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
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
690 2002-11-29 Paul Eggert <eggert@twinsun.com>
691
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
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
711 2002-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
738 2002-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
755 2002-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.
760
761 2002-11-20 Paul Eggert <eggert@twinsun.com>
762
763 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
764
765 2002-11-20 Paul Eggert <eggert@twinsun.com>
766
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
810 2002-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
817 2002-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
823 2002-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
842 2002-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
855 2002-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
870 2002-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
880 2002-11-16 Paul Eggert <eggert@twinsun.com>
881
882 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
883
884 2002-11-15 Paul Eggert <eggert@twinsun.com>
885
886 * tests/actions.at (Actions after errors): New test case.
887
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
896 2002-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
906 2002-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
911 2002-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
922 2002-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
927 2002-11-14 Paul Eggert <eggert@twinsun.com>
928
929 * src/output.c (output_skeleton): Call xfopen instead of
930 duplicating xfopen's body.
931
932 Fix bugs reported by Nelson H. F. Beebe in
933 <http://mail.gnu.org/pipermail/bug-bison/2002-November/001893.html>.
934
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
948 2002-11-14 Akim Demaille <akim@epita.fr>
949
950 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
951 status of the compiler.
952 Calling `exit 1' is no longer needed.
953 Reported by Nelson H. F. Beebe.
954
955 2002-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
968 2002-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
975 2002-11-13 Paul Eggert <eggert@twinsun.com>
976
977 Fix some bugs reported by Albert Chin-A-Young in
978 <http://mail.gnu.org/pipermail/bug-bison/2002-November/001881.html>.
979
980 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
981 -o c"; the HP C compiler chatters during compilation.
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
986 solitary backslashes, as they tickle a bug in the HP C compiler.
987
988 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
989 comments, since they're not portable. Use GNU coding style.
990
991 2002-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
999 2002-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
1006 by Nelson H. F. Beebe in
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'.
1016 This fixes one of the bugs reported by Nelson H. F. Beebe in
1017 <http://mail.gnu.org/pipermail/bug-bison/2002-November/001873.html>.
1018
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
1034 2002-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
1040 2002-11-12 Akim Demaille <akim@epita.fr>
1041
1042 * Makefile.maint: Sync with Autoconf:
1043 (local_updates): New.
1044
1045 2002-11-12 Akim Demaille <akim@epita.fr>
1046
1047 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
1048
1049 2002-11-12 Akim Demaille <akim@epita.fr>
1050
1051 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
1052 locations.
1053
1054 2002-11-12 Akim Demaille <akim@epita.fr>
1055
1056 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
1057 not yyvalue.
1058
1059 2002-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
1064 2002-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
1083 2002-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
1095 2002-11-12 Akim Demaille <akim@epita.fr>
1096
1097 * doc/bison.texinfo (Destructor Decl): New.
1098
1099 2002-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.
1107 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
1108 the file name.
1109
1110 2002-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
1122 2002-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
1130 2002-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
1165 2002-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
1178 2002-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
1248 2002-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
1272 2002-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
1296 2002-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
1309 2002-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
1319 2002-11-06 Akim Demaille <akim@epita.fr>
1320
1321 * tests/regression.at (Invalid inputs): Adjust to the recent
1322 messages.
1323
1324 2002-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'.
1334 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
1335
1336 2002-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
1346 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1347
1348 * src/tables.c (matching_state): Don't allow states to match if
1349 either has GLR conflict entries.
1350
1351 2002-11-05 Paul Eggert <eggert@twinsun.com>
1352
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
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
1369 2002-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
1374 2002-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
1379 2002-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
1388 2002-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
1398 2002-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
1405 2002-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
1440 2002-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
1447 2002-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.
1451
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).
1473
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.
1478
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
1507 2002-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
1522 2002-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
1537 2002-10-30 Akim Demaille <akim@epita.fr>
1538
1539 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
1540 #if.
1541
1542 2002-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.
1547
1548 2002-10-24 Paul Eggert <eggert@twinsun.com>
1549
1550 Version 1.75a.
1551
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
1558 2002-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
1565 2002-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
1574 2002-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
1582 2002-10-22 Akim Demaille <akim@epita.fr>
1583
1584 * src/system.h: Include sys/types.
1585 Reported by Bert Deknuydt.
1586
1587 2002-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
1592 2002-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
1607
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
1612 2002-10-22 Akim Demaille <akim@epita.fr>
1613
1614 * data/README: New.
1615
1616 2002-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.
1634
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
1654 2002-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.
1668
1669 2002-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
1679 2002-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
1693 2002-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
1708 2002-10-20 Akim Demaille <akim@epita.fr>
1709
1710 * src/tables.h, src/tables.c, src/output.c: Comment changes.
1711
1712 2002-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
1717 2002-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
1728 2002-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.
1750
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
1763 2002-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
1771 2002-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
1795 2002-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
1804 2002-10-18 Paul Eggert <eggert@twinsun.com>
1805
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
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
1814 2002-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
1826 2002-10-16 Paul Eggert <eggert@twinsun.com>
1827
1828 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
1829 MUSCLE_TAB_H.
1830
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
1839 2002-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.
1850
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.
1914
1915 2002-10-14 Akim Demaille <akim@epita.fr>
1916
1917 Version 1.75.
1918
1919 2002-10-14 Akim Demaille <akim@epita.fr>
1920
1921 * tests/Makefile.am (maintainer-check-posix): New.
1922
1923 2002-10-14 Akim Demaille <akim@epita.fr>
1924
1925 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
1926 member.
1927
1928 2002-10-14 Akim Demaille <akim@epita.fr>
1929
1930 * src/tables.c (table_ninf_remap): base -> tab.
1931 Reported by Matt Rosing.
1932
1933 2002-10-14 Paul Eggert <eggert@twinsun.com>
1934
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.
1941
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
1949 2002-10-13 Paul Eggert <eggert@twinsun.com>
1950
1951 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
1952 true due to limited range of data type" warning from GCC.
1953
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
1958 2002-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
1963 2002-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
1968 2002-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
1974 2002-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
1991 2002-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
2002 2002-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
2007 2002-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
2035 2002-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.
2047
2048 2002-10-12 Paul Eggert <eggert@twinsun.com>
2049
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>.
2056
2057 * lib/timevar.c: Update copyright date and clarify comments.
2058 (get_time) [IN_GCC]: Keep the GCC version for reference.
2059
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
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
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
2076 2002-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
2083 2002-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
2090 2002-10-11 Akim Demaille <akim@epita.fr>
2091
2092 * po/id.po: New.
2093
2094 2002-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
2195 2002-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
2204 2002-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
2231 2002-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
2237 2002-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.
2263
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.
2277
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.
2291
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.
2299
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
2317 2002-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
2323 2002-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
2330 2002-09-27 Akim Demaille <akim@epita.fr>
2331
2332 Version 1.49c.
2333
2334 2002-09-27 Akim Demaille <akim@epita.fr>
2335
2336 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
2337 (Because of AC_LIBSOURCE).
2338
2339 2002-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
2348 2002-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
2358 2002-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
2363 2002-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
2372 2002-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
2377 2002-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
2385 2002-09-12 Akim Demaille <akim@epita.fr>
2386
2387 * m4/prereq.m4: Update, from Coreutils 4.5.1.
2388
2389 2002-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
2395 2002-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
2401 2002-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
2406 2002-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
2412 2002-09-06 Akim Demaille <akim@epita.fr>
2413
2414 * data/c.m4 (b4_copyright): Move the GPL exception comment from
2415 here to...
2416 * data/yacc.c: here.
2417
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
2422 2002-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
2427 2002-09-04 Akim Demaille <akim@epita.fr>
2428
2429 * configure.in: Rename as...
2430 * configure.ac: this.
2431 Bump to 1.49c.
2432
2433 2002-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
2439 2002-08-12 Paul Eggert <eggert@twinsun.com>
2440
2441 Version 1.49b.
2442
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
2583 2002-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
2602 2002-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
2627 2002-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
2642 2002-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
2657 2002-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
2683 2002-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
2699 2002-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
2719 2002-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
2729 2002-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
2739 2002-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
2756 2002-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
2765 2002-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
2775 2002-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
2786 2002-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
2793 2002-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
2805 2002-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
2811 2002-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
2831 2002-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
2839 2002-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
2846 2002-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
2854 2002-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
2887 2002-07-19 Akim Demaille <akim@epita.fr>
2888
2889 * src/scan-gram.l (id): Can start with an underscore.
2890
2891 2002-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
2899 2002-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
2906 2002-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
2914 2002-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
2924 2002-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
2931 2002-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
2937 2002-07-09 Akim Demaille <akim@epita.fr>
2938
2939 * data/yacc.c: Output the copyright notive in the header.
2940
2941 2002-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
2952 2002-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
2961 2002-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
2969 2002-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
2979 2002-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
3003 2002-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
3011 2002-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
3016 2002-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
3043 2002-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
3051 2002-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
3057 2002-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
3066 2002-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
3080 2002-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
3093 2002-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
3100 2002-06-30 Akim Demaille <akim@epita.fr>
3101
3102 * src/output.c (action_row): Let default_rule be always a rule
3103 number.
3104
3105 2002-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
3116 2002-06-30 Akim Demaille <akim@epita.fr>
3117
3118 * src/print_graph.c: Use report_flag.
3119
3120 2002-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
3127 2002-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
3132 2002-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
3142 2002-06-30 Akim Demaille <akim@epita.fr>
3143
3144 * src/symtab.c (symbol_new): Initialize the `printer' member.
3145
3146 2002-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
3154 2002-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
3169 2002-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
3174 2002-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
3194 2002-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
3203 2002-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
3210 2002-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
3217 2002-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
3226 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3227
3228 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
3229 reorganize first lines parallel to yacc.c.
3230
3231 2002-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
3237 2002-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
3243 2002-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.
3249
3250 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3251
3252 Accumulated changelog for new GLR parsing features.
3253
3254 * src/conflicts.c (count_total_conflicts): Change name to
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.
3262
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
3271
3272 * src/getargs.c:
3273
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.
3276
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.
3296
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.
3311 (prepare_rules): Output dprec and merger tables.
3312 (conflict_row): New function.
3313 (action_row): Output conflict lists for GLR parser. Don't use
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.
3333 (conflicts_output): Modify call to count_rr_conflicts for new
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.
3363
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.
3369
3370 2002-06-27 Akim Demaille <akim@epita.fr>
3371
3372 * src/options.h, src/options.c: Remove.
3373 * src/getargs.c (short_options, long_options): New.
3374
3375 2002-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
3381 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
3382
3383 * src/getargs.c (report_argmatch): Initialize strtok().
3384
3385 2002-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
3392 2002-06-20 Akim Demaille <akim@epita.fr>
3393
3394 * data/bison.simple (yydestructor): Rename as...
3395 (yydestruct): this.
3396
3397 2002-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
3404 2002-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
3416 2002-06-20 Akim Demaille <akim@epita.fr>
3417
3418 * data/bison.simple (YYLEX): Fix the declaration when
3419 %pure-parser.
3420
3421 2002-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
3429 2002-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
3434 2002-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
3453 2002-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
3459 2002-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
3468 2002-06-19 Akim Demaille <akim@epita.fr>
3469
3470 * data/bison.simple (b4_pure_if): New.
3471 Use it instead of #ifdef YYPURE.
3472
3473 2002-06-19 Akim Demaille <akim@epita.fr>
3474
3475 * data/bison.simple (b4_location_if): New.
3476 Use it instead of #ifdef YYLSP_NEEDED.
3477
3478 2002-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
3494 2002-06-19 Zack Weinberg <zack@codesourcery.com>
3495
3496 * doc/bison.texinfo: Document ability to have multiple
3497 prologue sections.
3498
3499 2002-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
3504 2002-06-18 Akim Demaille <akim@epita.fr>
3505
3506 * data/bison.simple.new: Comment changes.
3507 Reported by Andreas Schwab.
3508
3509 2002-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
3515 2002-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
3525 2002-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
3532 2002-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
3552 2002-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
3563 2002-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
3574 2002-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
3585 2002-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
3590 2002-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
3595 2002-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
3607 2002-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
3616 2002-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
3625 2002-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
3635 2002-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
3654 2002-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
3667 2002-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
3687 2002-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
3697 2002-06-14 Akim Demaille <akim@epita.fr>
3698
3699 * src/main.c (main): Invoke scanner_free.
3700
3701 2002-06-14 Akim Demaille <akim@epita.fr>
3702
3703 * src/output.c (m4_invoke): Extracted from...
3704 (output_skeleton): here.
3705 Free tempfile.
3706
3707 2002-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
3716 2002-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
3729 2002-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
3740 2002-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
3746 2002-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
3752 2002-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
3758 2002-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
3766 2002-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
3772 2002-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
3779 2002-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
3902 2002-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
3912 2002-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
3921 2002-06-11 Akim Demaille <akim@epita.fr>
3922
3923 * src/reader.c (grammar_midrule_action): New, Eved out from
3924 (readgram): here.
3925
3926 2002-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
3933 2002-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
3939 2002-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
3949 2002-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
3958 2002-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
3966 2002-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
3977 2002-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
3984 2002-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
4007 2002-06-03 Akim Demaille <akim@epita.fr>
4008
4009 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
4010 then statements.
4011
4012 2002-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
4022 2002-05-28 Akim Demaille <akim@epita.fr>
4023
4024 * data/bison.c++: Use C++ ostreams.
4025 (cdebug_): New member.
4026
4027 2002-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
4032 2002-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
4040 2002-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.
4046
4047 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4048
4049 * src/conflicts.c (log_resolution): Correct typo:
4050 obstack_printf should be obstack_fgrow1.
4051
4052 2002-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
4071 2002-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
4083 2002-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
4092 2002-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
4115 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4116 and Paul Eggert <eggert@twinsun.com>
4117
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
4125 2002-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.
4130 (yytranslate): Expand definition of yy_token_number_type, so that
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.
4135
4136 * tests/regression.at: Modify expected output to agree with change
4137 to yyr1 and yytranslate.
4138
4139 2002-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
4144 2002-05-13 Akim Demaille <akim@epita.fr>
4145
4146 * tests/regression.at (Token definitions): Prototype yylex and
4147 yyerror.
4148
4149 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4150
4151 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
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
4156 2002-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
4161 2002-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
4176 2002-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
4184 2002-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
4189 2002-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
4196 2002-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
4201 2002-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
4212 2002-05-05 Akim Demaille <akim@epita.fr>
4213
4214 * tests/torture.at (Many lookaheads): New test.
4215
4216 2002-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
4233 2002-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
4245 2002-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
4254 2002-05-03 Paul Eggert <eggert@twinsun.com>
4255
4256 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
4257 for K&R C.
4258
4259 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
4260
4261 * Makefile.am (SUBDIRS): Remove intl.
4262 (EXTRA_DIST): Add config/config.rpath.
4263
4264 2002-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
4269 2002-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
4276 2002-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
4281 2002-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
4290 2002-05-03 Akim Demaille <akim@epita.fr>
4291
4292 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
4293
4294 2002-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
4299 2002-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
4305 2002-05-02 Akim Demaille <akim@epita.fr>
4306
4307 * src/reader.c (parse_braces): Merge into...
4308 (parse_action): this.
4309
4310 2002-05-02 Akim Demaille <akim@epita.fr>
4311
4312 * configure.in (ALL_LINGUAS): Remove.
4313 * po/LINGUAS, hr.po: New.
4314
4315 2002-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
4339 2002-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.
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'.
4351 * data/bison.simple, data/bison.c++ (b4_lhs_value)
4352 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
4353
4354 2002-05-02 Akim Demaille <akim@epita.fr>
4355
4356 * configure.in (AC_INIT): Bump to 1.49b.
4357 (AM_INIT_AUTOMAKE): Short invocation.
4358
4359 2002-05-02 Akim Demaille <akim@epita.fr>
4360
4361 Version 1.49a.
4362
4363 2002-05-01 Akim Demaille <akim@epita.fr>
4364
4365 * src/skeleton.h: Remove.
4366
4367 2002-05-01 Akim Demaille <akim@epita.fr>
4368
4369 * src/skeleton.h: Fix the #endif.
4370 Reported by Magnus Fromreide.
4371
4372 2002-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.
4376 (YYCOPY): Fix [] quoting problem in the non-GCC case.
4377
4378 2002-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
4392 2002-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
4398 2002-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
4415 2002-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
4428 2002-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
4436 2002-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
4443 2002-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
4449 2002-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
4455 2002-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
4467 2002-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
4481 2002-04-22 Akim Demaille <akim@epita.fr>
4482
4483 * src/output.h, src/output.c (get_lines_number): Remove.
4484
4485 2002-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
4493 2002-04-19 Akim Demaille <akim@epita.fr>
4494
4495 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
4496
4497 2002-04-10 Akim Demaille <akim@epita.fr>
4498
4499 * src/system.h: Rely on HAVE_LIMITS_H.
4500 Suggested by Paul Eggert.
4501
4502 2002-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
4515 2002-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
4540 2002-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
4550 2002-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
4578 2002-04-08 Akim Demaille <akim@epita.fr>
4579
4580 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
4581 and then the grammar.
4582
4583 2002-04-08 Akim Demaille <akim@epita.fr>
4584
4585 * src/system.h: No longer using strndup.
4586
4587 2002-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
4600 2002-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
4606 2002-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
4612 2002-04-07 Akim Demaille <akim@epita.fr>
4613
4614 * src/reader.c: Normalize increments to prefix form.
4615
4616 2002-04-07 Akim Demaille <akim@epita.fr>
4617
4618 * src/reader.c, symtab.c: Remove debugging code.
4619
4620 2002-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
4637 2002-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
4658 2002-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
4668 2002-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
4675 2002-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
4680 2002-04-07 Akim Demaille <akim@epita.fr>
4681
4682 * src/lalr.h (LA): Is a bitsetv, not bitset*.
4683
4684 2002-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
4690 2002-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
4697 2002-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
4704 2002-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
4723 2002-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
4743 2002-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
4749 2002-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
4761 2002-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
4774 2002-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
4780 2002-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
4786 2002-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
4791 2002-04-07 Akim Demaille <akim@epita.fr>
4792
4793 * TODO: Update.
4794
4795 2002-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
4800 2002-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
4807 2002-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
4815 2002-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.
4821
4822 2002-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
4828 2002-03-20 Akim Demaille <akim@epita.fr>
4829
4830 * src/conflicts.c (log_resolution): Argument `resolution' is const.
4831
4832 2002-03-19 Paul Eggert <eggert@twinsun.com>
4833
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
4839 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
4840 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
4841
4842 2002-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
4853 2002-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
4860 2002-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
4869 2002-03-14 Akim Demaille <akim@epita.fr>
4870
4871 Use Gettext 0.11.1.
4872
4873 2002-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
4878 2002-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
4884 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
4885
4886 * src/reader.c: Warn about lacking semi-colons, do not complain.
4887
4888 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
4889
4890 * data/bison.c++: Remove a debug line.
4891
4892 2002-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
4898 2002-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
4907 2002-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
4916 2002-03-04 Akim Demaille <akim@epita.fr>
4917
4918 * src/output.c (output_skeleton): tempdir is const.
4919 bytes_read is unused.
4920
4921 2002-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
4928 2002-03-04 Akim Demaille <akim@epita.fr>
4929
4930 * src/closure.c (closure): `r' is unused.
4931
4932 2002-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
4938 2002-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
4946 2002-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
4952 2002-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
4959 2002-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
4965 2002-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
4971 2002-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
4981 2002-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
4987 2002-03-04 Akim Demaille <akim@epita.fr>
4988
4989 * src/lalr.c (F): Now a bitset*.
4990 Adjust all dependencies.
4991
4992 2002-03-04 Akim Demaille <akim@epita.fr>
4993
4994 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
4995 Adjust all dependencies.
4996
4997 2002-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
5005 2002-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
5012 2002-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
5017 2002-03-04 Akim Demaille <akim@epita.fr>
5018
5019 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
5020
5021 2002-03-04 Akim Demaille <akim@epita.fr>
5022
5023 * src/closure.c (ruleset): Be a bitset.
5024 (rulesetsize): Remove.
5025
5026 2002-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
5033 2002-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
5038 2002-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
5043 2002-02-25 Akim Demaille <akim@epita.fr>
5044
5045 * src/getargs.c (version): Give the name of the authors, and use a
5046 translator friendly scheme for the bgr
5047 copyright notice.
5048
5049 2002-02-25 Akim Demaille <akim@epita.fr>
5050
5051 * src/output.c (header_output): Remove, now handled completely via
5052 M4.
5053
5054 2002-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
5061 2002-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
5074 2002-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
5089 2002-02-14 Akim Demaille <akim@epita.fr>
5090
5091 * tests/regression.at (else): Adjust to Andreas' change.
5092
5093 2002-02-14 Akim Demaille <akim@epita.fr>
5094
5095 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
5096
5097 2002-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
5102 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
5103
5104 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
5105 (Copyright notice): Update.
5106
5107 2002-02-11 Akim Demaille <akim@epita.fr>
5108
5109 * tests/regression.at (%nonassoc and eof): Don't include
5110 nonportable headers.
5111
5112 2002-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
5117 2002-02-07 Akim Demaille <akim@epita.fr>
5118
5119 * tests/input.at: New.
5120
5121 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
5122
5123 * data/bison.c++: Replace some direct m4 expansions by constants. Be
5124 more consistent when naming methods and variables. Put preprocessor
5125 directives around tables only needed for debugging.
5126
5127 2002-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
5133 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
5134
5135 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
5136
5137 2002-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
5143 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
5144
5145 * data/bison.c++: Fix m4 quoting in comments.
5146
5147 2002-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
5152 2002-02-05 Akim Demaille <akim@epita.fr>
5153
5154 * data/bison.c++: Adjust to the M4 back end.
5155 More is certainly needed.
5156
5157 2002-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
5194 2002-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
5200 2002-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
5205 2002-02-05 Akim Demaille <akim@epita.fr>
5206
5207 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
5208 * data/: here.
5209
5210 2002-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
5216 2002-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
5229 2002-01-27 Akim Demaille <akim@epita.fr>
5230
5231 * tests/sets.at (AT_EXTRACT_SETS): New.
5232 (Nullable): Use it.
5233 (Firsts): New.
5234
5235 2002-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
5241 2002-01-25 Akim Demaille <akim@epita.fr>
5242
5243 * tests/regression.at (%nonassoc and eof): New.
5244 Suggested by Robert Anisko.
5245
5246 2002-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
5256 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
5257
5258 * src/Makefile.am: Add bison.c++.
5259 * src/bison.c++: New skeleton.
5260
5261 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
5262
5263 * po/it.po: New.
5264
5265 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
5266
5267 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
5268
5269 2002-01-20 Marc Autret <marc@gnu.org>
5270
5271 * src/files.c (compute_output_file_names): Fix
5272
5273 2002-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
5280 2002-01-20 Marc Autret <marc@gnu.org>
5281
5282 * src/system.h: Need to define __attribute__ away for non-GCC
5283 compilers as well (i.e. the vendor C compiler).
5284 Suggested by Albert Chin-A-Young.
5285
5286 2002-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
5293 2002-01-11 Akim Demaille <akim@epita.fr>
5294
5295 * configure.in: Use AC_FUNC_STRNLEN.
5296 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
5297
5298 2002-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
5312 2002-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
5320 2002-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
5329 2002-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
5337 2002-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
5345 2002-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
5353 2002-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
5360 2002-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
5367 2002-01-06 Akim Demaille <akim@epita.fr>
5368
5369 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
5370 skeleton.h.
5371
5372 2002-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
5378 2002-01-03 Akim Demaille <akim@epita.fr>
5379
5380 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
5381
5382 2002-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
5388 2002-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
5397 2002-01-03 Akim Demaille <akim@epita.fr>
5398
5399 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
5400 for non system headers.
5401
5402 2002-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
5419 2001-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
5425 2001-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
5438 2001-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
5455 2001-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
5476 to guess if the generated parsers should have '.tab' in their
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
5488 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
5489 parse-skel.y.
5490
5491 * src/parse-skel.y: New file.
5492 * src/scan-skel.l: New file.
5493
5494 2001-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
5508 2001-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
5514 2001-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
5521 2001-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
5530 2001-12-29 Akim Demaille <akim@epita.fr>
5531
5532 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
5533
5534 2001-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
5539 2001-12-29 Akim Demaille <akim@epita.fr>
5540
5541 * doc/bison.texinfo: Formatting changes.
5542
5543 2001-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
5552 2001-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
5558 2001-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
5567 2001-12-29 Akim Demaille <akim@epita.fr>
5568
5569 Memory leak.
5570
5571 * src/reader.c (reader): Free grammar.
5572
5573 2001-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
5581 2001-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
5589 2001-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
5595 2001-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
5600 2001-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
5607 2001-12-29 Akim Demaille <akim@epita.fr>
5608
5609 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
5610 ago.
5611
5612 2001-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
5617 2001-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
5622 2001-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
5627 2001-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
5638 2001-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
5644 2001-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
5653 2001-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
5660 2001-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
5665 2001-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
5672 2001-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
5685 2001-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
5694 2001-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
5701 2001-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
5713 2001-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
5723 2001-12-29 Akim Demaille <akim@epita.fr>
5724
5725 * src/output.c: Comment changes.
5726
5727 2001-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
5736 2001-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
5747 2001-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
5753 2001-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
5773 2001-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
5789 2001-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
5809 2001-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
5818 2001-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
5826 2001-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
5836 2001-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
5845 2001-12-27 Akim Demaille <akim@epita.fr>
5846
5847 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
5848
5849 2001-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
5860 2001-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
5865 2001-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
5870 2001-12-27 Akim Demaille <akim@epita.fr>
5871
5872 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
5873 duplication.
5874
5875 2001-12-27 Akim Demaille <akim@epita.fr>
5876
5877 * src/reader.c (packgram): Catch nitems overflows.
5878
5879 2001-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
5889 2001-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
5917 2001-12-27 Akim Demaille <akim@epita.fr>
5918
5919 * src/reader.c (symbol_list_new): Be sure to initialize all the
5920 fields.
5921
5922 2001-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
5931 2001-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
5937 2001-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
5955 2001-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
5962 2001-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
5970 2001-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
5977 2001-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
5987 2001-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
5995 2001-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
6004 2001-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
6010 2001-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
6018 2001-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.
6026
6027 2001-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.
6033
6034 2001-12-17 Akim Demaille <akim@epita.fr>
6035
6036 * src/conflicts.c (print_reductions): Formatting changes.
6037
6038 2001-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.
6043
6044 2001-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
6052 2001-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
6058 2001-12-17 Akim Demaille <akim@epita.fr>
6059
6060 * src/output.c: Various formatting changes.
6061
6062 2001-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
6070 2001-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
6075 2001-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.
6080 (output_parser): Adjust, now takes care about the lines of a
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
6087 2001-12-15 Marc Autret <autret_m@epita.fr>
6088
6089 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
6090
6091 2001-12-15 Marc Autret <autret_m@epita.fr>
6092
6093 * src/output.c (output_gram): Keep track of the hairy one.
6094
6095 2001-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
6102 2001-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
6109 2001-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
6128 2001-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
6138 2001-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
6143 2001-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
6155 2001-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
6171 2001-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.
6175 Suggested by Arnold Robbins and Tom Tromey.
6176
6177 2001-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
6183 2001-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
6191 2001-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
6200 2001-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
6222 2001-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
6227 2001-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
6241 2001-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
6247 2001-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
6252 2001-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
6260 2001-12-11 Marc Autret <autret_m@epita.fr>
6261
6262 * src/output.c (output_parser): Remove useless muscle.
6263
6264 2001-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
6271 2001-12-10 Marc Autret <autret_m@epita.fr>
6272
6273 * src/reader.c (copy_definition): Re-use CPP-outed code which
6274 replace precedent remove.
6275 * src/bison.simple: Remove #line before %%prologue because
6276 %%input-line is wrong at this time.
6277
6278 2001-12-10 Marc Autret <autret_m@epita.fr>
6279
6280 * src/reader.c (symbols_output): Clean up.
6281 * src/output.c (output_gram, output): Clean up.
6282
6283 2001-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
6289 2001-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
6295 2001-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
6308 2001-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
6315 2001-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
6322 2001-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
6327 2001-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
6335 2001-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
6341 2001-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
6348 2001-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
6360 2001-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
6370 2001-12-10 Akim Demaille <akim@epita.fr>
6371
6372 * src/muscle_tab.c (muscle_init): NULL is a better default than
6373 `"0"'.
6374
6375 2001-12-10 Akim Demaille <akim@epita.fr>
6376
6377 * src/reader.c (reader): Calling symbols_output once is enough.
6378
6379 2001-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
6396 2001-12-10 Akim Demaille <akim@epita.fr>
6397
6398 * src/options.c (OPTN, DRTV, BOTH): New.
6399 (option_table): Use them.
6400
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
6406 2001-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
6411 2001-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
6423 2001-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
6430 2001-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
6446 2001-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
6457 2001-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 Reported by Peter Hámorský.
6462
6463 2001-12-05 Akim Demaille <akim@epita.fr>
6464
6465 * src/conflicts.c (err_table): Remove.
6466 (resolve_sr_conflict): Adjust.
6467 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
6468 Rename as...
6469 (state_t.reductions, state_t.shifts): this.
6470
6471 2001-12-05 Akim Demaille <akim@epita.fr>
6472
6473 * src/reduce.c (reduce_grammar_tables): No longer disable the
6474 removal of useless rules via CPP but via `if (0)', so that the
6475 compiler still check the code is valid.
6476 For instance, it should have noticed `rline' no longer exists: use
6477 the `line' member of rule_t.
6478 * src/gram.c (dummy, rline): Remove, unused.
6479
6480 2001-12-05 Akim Demaille <akim@epita.fr>
6481
6482 * src/output.c (pack_vector): Use assert, not berror.
6483 * src/main.c (berror): Remove, unused.
6484
6485 2001-12-05 Akim Demaille <akim@epita.fr>
6486
6487 New experimental feature: if --verbose --trace output all the
6488 items of a state, not only its kernel.
6489
6490 * src/print.c (print_core): If `trace_flag', then invoke closure
6491 before outputting the items of the state (print_core is no longer
6492 a correct name them).
6493 (print_results): Invoke new_closure/free_closure if needed.
6494
6495 2001-12-05 Akim Demaille <akim@epita.fr>
6496
6497 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
6498 * src/closure.c, src/closure.h (itemsetsize): Rename as...
6499 (nitemset): for consistency with the rest of the project.
6500
6501 2001-12-05 Akim Demaille <akim@epita.fr>
6502
6503 * src/closure.c (print_closure): Improve.
6504 (closure): Use it for printing input and output.
6505
6506 2001-12-05 Akim Demaille <akim@epita.fr>
6507
6508 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
6509 indexed by nonterminals.
6510
6511 2001-12-05 Akim Demaille <akim@epita.fr>
6512
6513 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
6514 what it was!).
6515 * src/warshall.h: Remove accidental duplication of the content.
6516
6517 2001-12-05 Akim Demaille <akim@epita.fr>
6518
6519 * src/closure.c (set_fderives): De-obfuscate.
6520
6521 2001-12-05 Akim Demaille <akim@epita.fr>
6522
6523 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
6524
6525 2001-12-05 Akim Demaille <akim@epita.fr>
6526
6527 * src/closure.c (set_firsts): De-obfuscate.
6528
6529 2001-12-05 Akim Demaille <akim@epita.fr>
6530
6531 * src/output.c (action_row): De-obfuscate
6532 using the good o' techniques: arrays not pointers, variable
6533 locality, BITISSET, RESETBIT etc.
6534
6535 2001-12-05 Akim Demaille <akim@epita.fr>
6536
6537 Pessimize the code to simplify it: from now on, all the states
6538 have a valid SHIFTS, which NSHIFTS is possibly 0.
6539
6540 * src/LR0.c (shifts_new): Be global and move to..
6541 * src/state.c, src/state.h: here.
6542 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
6543 * src/print_graph: Adjust.
6544
6545 2001-12-05 Akim Demaille <akim@epita.fr>
6546
6547 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
6548 * src/conflicts.c: Use it.
6549 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
6550 incorrectly ``simplified''.
6551
6552 2001-12-05 Akim Demaille <akim@epita.fr>
6553
6554 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
6555 using the good o' techniques: arrays not pointers, variable
6556 locality, BITISSET, RESETBIT etc.
6557
6558 2001-12-05 Akim Demaille <akim@epita.fr>
6559
6560 * src/state.h (SHIFT_SYMBOL): New.
6561 * src/conflicts.c: Use it to deobfuscate.
6562
6563 2001-12-05 Akim Demaille <akim@epita.fr>
6564
6565 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
6566 (print_reductions): De-obfuscate using the good o' techniques:
6567 arrays not pointers, variable locality, BITISSET.
6568
6569 2001-12-05 Akim Demaille <akim@epita.fr>
6570
6571 * src/conflicts.c (print_reductions): Arrays, not pointers.
6572 Use BITISSET.
6573
6574 2001-12-05 Akim Demaille <akim@epita.fr>
6575
6576 * src/conflicts.c (print_reductions): Pessimize, but clarify.
6577
6578 2001-12-05 Akim Demaille <akim@epita.fr>
6579
6580 * src/conflicts.c (print_reductions): Improve variable locality.
6581
6582 2001-12-05 Akim Demaille <akim@epita.fr>
6583
6584 * src/conflicts.c (print_reductions): Pessimize, but clarify.
6585
6586 2001-12-05 Akim Demaille <akim@epita.fr>
6587
6588 * src/conflicts.c (print_reductions): Improve variable locality.
6589
6590 2001-12-05 Akim Demaille <akim@epita.fr>
6591
6592 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
6593 * src/lalr.c: Use them.
6594
6595 2001-12-05 Akim Demaille <akim@epita.fr>
6596
6597 * src/LR0.c (augment_automaton): Formatting changes.
6598 Better variable locality.
6599
6600 2001-12-05 Akim Demaille <akim@epita.fr>
6601
6602 * src/lalr.c (matrix_print): New.
6603 (transpose): Use it.
6604 Use arrays instead of pointers.
6605
6606 2001-12-05 Akim Demaille <akim@epita.fr>
6607
6608 * src/lalr.c (maxrhs): Move to...
6609 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
6610 * src/lalr.c (build_relations): Adjust.
6611
6612 2001-12-05 Akim Demaille <akim@epita.fr>
6613
6614 * src/lalr.c (transpose): Free the memory allocated to the
6615 argument, as it is replaced by the results by the unique caller.
6616 (build_relations): Merely invoke transpose: it handles the memory
6617 deallocation.
6618 Improve variable locality.
6619 Avoid variables used as mere abbreviations.
6620 (compute_lookaheads): Use arrays instead of pointers.
6621
6622 2001-12-05 Akim Demaille <akim@epita.fr>
6623
6624 * src/lalr.c (initialize_F): Improve variable locality.
6625 Avoid variables used as mere abbreviations.
6626
6627 2001-12-05 Akim Demaille <akim@epita.fr>
6628
6629 * src/derives.c (print_derives): Display the ruleno.
6630 * src/lalr.c (initialize_F, transpose): Better variable locality
6631 to improve readability.
6632 Avoid variables used as mere abbreviations.
6633
6634 2001-12-05 Akim Demaille <akim@epita.fr>
6635
6636 * src/lalr.c (traverse): Use arrays instead of pointers.
6637
6638 2001-12-05 Akim Demaille <akim@epita.fr>
6639
6640 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
6641 the handling of squeue.
6642 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
6643
6644 2001-12-05 Akim Demaille <akim@epita.fr>
6645
6646 Because useless nonterminals are now kept alive (instead of being
6647 `destroyed'), we now sometimes examine them, and store information
6648 related to them. Hence we need to know their number, and adjust
6649 memory allocations.
6650
6651 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
6652 static.
6653 * src/LR0.c (allocate_itemsets): The memory allocated to
6654 `symbol_count' was used for two different purpose: once to count
6655 the number of occurrences of each symbol, and later reassigned to
6656 `shift_symbol', containing the symbol that can be shifted from a
6657 given state.
6658 Deobfuscate, i.e., allocate, use and free `symbol_count' here
6659 only, and...
6660 (new_itemsets): Allocate `shift_symbol' here.
6661 (allocate_itemsets): symbol_count includes useless nonterminals.
6662 Make room for them.
6663 (free_storage): Use `free', not `XFREE', for pointers that cannot
6664 be null.
6665
6666 2001-12-05 Akim Demaille <akim@epita.fr>
6667
6668 * src/nullable.c (set_nullable): Deobfuscate the handling of
6669 ritem.
6670 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
6671
6672 2001-12-05 Akim Demaille <akim@epita.fr>
6673
6674 * src/gram.c, src/gram.h (ritem_print): New.
6675 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
6676 (This useless function was defined only to work around VMS linkers
6677 that can't handle compilation units with variables only).
6678 * src/reduce.c (dump_grammar): Use it to trace the construction of
6679 ritem.
6680
6681 2001-12-04 Paul Eggert <eggert@twinsun.com>
6682
6683 * src/bison.simple (union yyalloc): Change member names
6684 to be the same as the stack names.
6685 (yyparse): yyptr is now union yyalloc *, not char *.
6686 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
6687 and may generate better code on some machines.
6688 (yystpcpy): Use prototype if __STDC__ is defined, not just
6689 if __cplusplus is defined.
6690
6691 2001-11-30 Akim Demaille <akim@epita.fr>
6692
6693 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
6694 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
6695 Gettext doesn't compile cleanly, and dies with -Werror.
6696 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
6697 Include WARNING_CFLAGS here.
6698 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
6699 before being defined.
6700
6701 2001-11-27 Paul Eggert <eggert@twinsun.com>
6702
6703 * lib/quotearg.h (quotearg_n, quotearg_n_style):
6704 First arg is int, not unsigned.
6705 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
6706 (SIZE_MAX, UINT_MAX): New macros.
6707 (quotearg_n_options): Abort if N is negative.
6708 Avoid overflow check on hosts where size_t is 64 bits and int
6709 is 32 bits, as overflow is impossible there.
6710 Fix off-by-one typo that caused unnecessary reallocation.
6711
6712 2001-11-29 Paul Eggert <eggert@twinsun.com>
6713
6714 Name space cleanup in generated parser.
6715
6716 * doc/bison.texinfo (Bison Parser): Discuss system headers
6717 and their effect on the user name space.
6718
6719 * src/bison.simple:
6720 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
6721 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
6722 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
6723
6724 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
6725 on user names when possible.
6726
6727 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
6728 Simplify test for whather <alloca.h> exists.
6729
6730 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
6731
6732 (<stdio.h>): Include if YYDEBUG.
6733
6734 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
6735 ! defined (yyoverflow) && ! defined (yymemcpy).
6736
6737 (yymemcpy, yyparse): Rename local variables as needed so that
6738 they all begin with 'yy'.
6739
6740 (yystrlen, yystpcpy): New functions.
6741
6742 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
6743 All uses changed.
6744
6745 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
6746 instead of relying on string.h functions. Use YYSTACK_ALLOC
6747 and YYSTACK_FREE instead of malloc and free.
6748
6749 2001-11-30 Akim Demaille <akim@epita.fr>
6750
6751 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
6752 before their first uses.
6753 (YYBISON, YYPURE): Move to the top of the output.
6754
6755 2001-11-30 Akim Demaille <akim@epita.fr>
6756
6757 * tests/reduce.at (Useless Nonterminals): Fix.
6758
6759 2001-11-30 Akim Demaille <akim@epita.fr>
6760
6761 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
6762 if body instead of `;' to pacify GCC's warnings.
6763
6764 2001-11-30 Akim Demaille <akim@epita.fr>
6765
6766 Instead of mapping the LHS of unused rules to -1, keep the LHS
6767 valid, but flag the rules as invalid.
6768
6769 * src/gram.h (rule_t): `useful' is a new member.
6770 * src/print.c (print_grammar): Adjust.
6771 * src/derives.c (set_derives): Likewise.
6772 * src/reader.c (packgram, reduce_output): Likewise.
6773 * src/reduce.c (reduce_grammar_tables): Likewise.
6774 * tests/reduce.at (Underivable Rules, Useless Rules): New.
6775
6776 2001-11-30 Akim Demaille <akim@epita.fr>
6777
6778 * src/reduce.c (reduce_output): Formatting changes.
6779 * src/print.c (print_results, print_grammar): Likewise.
6780 * tests/regression.at (Rule Line Numbers)
6781 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
6782
6783 2001-11-30 Akim Demaille <akim@epita.fr>
6784
6785 * src/reduce.c (nonterminals_reduce): Instead of throwing away
6786 useless nonterminals, move them at the end of the symbol arrays.
6787 (reduce_output): Adjust.
6788 * tests/reduce.at (Useless Nonterminals): Adjust.
6789
6790 2001-11-30 Akim Demaille <akim@epita.fr>
6791
6792 * src/reduce.c: Various comment/formatting changes.
6793 (nonterminals_reduce): New, extracted from...
6794 (reduce_grammar_tables): here.
6795 (reduce_grammar): Call nonterminals_reduce.
6796
6797 2001-11-29 Paul Eggert <eggert@twinsun.com>
6798
6799 * src/bison.simple (YYSTACK_REALLOC): Remove.
6800 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
6801 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
6802 New macros.
6803 (union yyalloc): New type.
6804 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
6805 an arbitrary restriction on hosts where size_t is wider than int.
6806
6807 (yyparse): Don't dump core if alloca or malloc fails; instead, report
6808 a parser stack overflow. Allocate just one block of memory for all
6809 three stacks, instead of allocating three blocks; this typically is
6810 faster and reduces fragmentation.
6811
6812 Do not limit the number of items in the stack to a value that fits
6813 in 'int', as this is an arbitrary limit on hosts with 64-bit
6814 size_t and 32-bit int.
6815
6816 2001-11-29 Marc Autret <autret_m@epita.fr>
6817
6818 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
6819 of defining YYERROR_VERBOSE.
6820 [AT_DATA]: $4 is now out of C declarations in the prologue.
6821
6822 2001-11-28 Marc Autret <autret_m@epita.fr>
6823
6824 * src/reader.c (parse_dquoted_param): New.
6825 (parse_skel_decl): Use it.
6826 * src/lex.h: Add its prototype.
6827 * src/lex.c (literalchar): Become not static.
6828
6829 2001-11-28 Marc Autret <autret_m@epita.fr>
6830
6831 * src/output.h: And put its extern declaration here.
6832 * src/output.c (error_verbose): Define here.
6833 (prepare): Echo name modification.
6834 * src/getargs.h: Clean its extern declaration.
6835 * src/getargs.c (error_verbose_flag): Remove.
6836 (getargs): Remove case 'e'.
6837 * src/options.c (option_table): 'error-verbose' is now seen as simple
6838 percent option.
6839 Include output.h.
6840
6841 * src/reader.c (read_declarations): Remove case tok_include.
6842 (parse_include_decl): Remove.
6843 * src/lex.h (token_t): Remove tok_include.
6844 * src/options.c (option_table): 'include' is now a simple command line
6845 option.
6846
6847 2001-11-28 Marc Autret <autret_m@epita.fr>
6848
6849 * src/bison.simple: Adjust muscle names.
6850 * src/muscle_tab.c (muscle_init): Also rename the muscles.
6851 * src/output.c (prepare): s/_/-/ for the muscles names.
6852 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
6853
6854 2001-11-28 Marc Autret <autret_m@epita.fr>
6855
6856 * src/bison.simple: Fix debug.
6857 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
6858
6859 2001-11-28 Akim Demaille <akim@epita.fr>
6860
6861 * src/LR0.c (shifts_new): New.
6862 (save_shifts, insert_start_shift, augment_automaton): Use it.
6863
6864 2001-11-28 Akim Demaille <akim@epita.fr>
6865
6866 * src/closure.c (closure): `b' and `ruleno' denote the same value:
6867 keep ruleno only.
6868
6869 2001-11-28 Akim Demaille <akim@epita.fr>
6870
6871 * src/closure.c (closure): Instead of looping over word in array
6872 then bits in words, loop over bits in array.
6873
6874 2001-11-28 Akim Demaille <akim@epita.fr>
6875
6876 * src/closure.c (closure): No longer optimize the special case
6877 where all the bits of `ruleset[r]' are set to 0, to make the code
6878 clearer.
6879
6880 2001-11-28 Akim Demaille <akim@epita.fr>
6881
6882 * src/closure.c (closure): `r' and `c' are new variables, used to
6883 de-obfuscate accesses to RULESET and CORE.
6884
6885 2001-11-28 Akim Demaille <akim@epita.fr>
6886
6887 * src/reduce.c (reduce_print): Use ngettext.
6888 (dump_grammar): Improve the trace accuracy.
6889
6890 2001-11-28 Akim Demaille <akim@epita.fr>
6891
6892 * src/reduce.c (dump_grammar): Don't translate trace messages.
6893
6894 2001-11-28 Akim Demaille <akim@epita.fr>
6895
6896 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
6897 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
6898 as all tags are free'ed afterwards.
6899 From Enrico Scholz.
6900
6901 2001-11-27 Paul Eggert <eggert@twinsun.com>
6902
6903 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
6904 use alloca when we didn't want to, and vice versa.
6905
6906 2001-11-27 Marc Autret <autret_m@epita.fr>
6907
6908 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
6909 initialization.
6910 * src/output.c (prepare): Remove its update.
6911
6912 2001-11-27 Marc Autret <autret_m@epita.fr>
6913
6914 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
6915 Use %error-verbose.
6916
6917 2001-11-27 Marc Autret <autret_m@epita.fr>
6918
6919 * src/bison.simple: Remove YYERROR_VERBOSE using.
6920 Use %%error_verbose.
6921 (yyparse): Likewise.
6922 * src/output.c (prepare): Give its final value.
6923 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
6924 * src/getargs.h: Add its extern declaration.
6925 * src/getargs.c (error_verbose_flag): New int.
6926 (getargs): Update to catch new case.
6927 * src/options.c (option_table): 'error-verbose' is a new option.
6928 (shortopts): Update.
6929
6930 2001-11-27 Akim Demaille <akim@epita.fr>
6931
6932 * src/system.h: Use intl/libgettext.h.
6933 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
6934
6935 2001-11-27 Akim Demaille <akim@epita.fr>
6936
6937 * tests/torture.at (Exploding the Stack Size with Malloc):
6938 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
6939
6940 2001-11-27 Akim Demaille <akim@epita.fr>
6941
6942 * src/files.c: Include error.h.
6943 Reported by Hans Aberg.
6944
6945 2001-11-26 Marc Autret <autret_m@epita.fr>
6946
6947 * src/reader.c (parse_include_decl): New, not yet implemented.
6948 (read_declarations): Add case tok_include.
6949 * src/getargs.h (include): Add its extern definition.
6950 * src/getargs.c (include): New const char *.
6951 (getargs): Add case '-I'.
6952 * src/options.c (option_table): Add include as command line and
6953 percent option.
6954 * src/lex.h (token_t): Add tok_include.
6955
6956 2001-11-26 Akim Demaille <akim@epita.fr>
6957
6958 * src/reader.c (readgram): Make sure rules for mid-rule actions
6959 have a lineno equal to that of their host rule.
6960 Reported by Hans Aberg.
6961 * tests/regression.at (Rule Line Numbers): New.
6962
6963 2001-11-26 Akim Demaille <akim@epita.fr>
6964
6965 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
6966 size_ts.
6967
6968 2001-11-26 Akim Demaille <akim@epita.fr>
6969
6970 * src/complain.c, src/complain.h (error): Remove, provided by
6971 lib/error.[ch].
6972
6973 2001-11-26 Akim Demaille <akim@epita.fr>
6974
6975 * src/reader.c (read_declarations): Don't abort on tok_illegal,
6976 issue an error message.
6977 * tests/regression.at (Invalid %directive): New.
6978 Reported by Hans Aberg.
6979
6980 2001-11-26 Akim Demaille <akim@epita.fr>
6981
6982 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
6983 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
6984
6985 2001-11-26 Akim Demaille <akim@epita.fr>
6986
6987 * src/conflicts.c (conflicts_print): Don't complain at all when
6988 there are no reduce/reduce conflicts, and as many shift/reduce
6989 conflicts as expected.
6990 * tests/regression.at (%expect right): Adjust.
6991
6992 2001-11-23 Akim Demaille <akim@epita.fr>
6993
6994 * lib/alloca.c: Update, from fileutils.
6995
6996 2001-11-23 Akim Demaille <akim@epita.fr>
6997
6998 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
6999
7000 2001-11-23 Akim Demaille <akim@epita.fr>
7001
7002 * src/system.h: Include alloca.h.
7003 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
7004
7005 2001-11-23 Akim Demaille <akim@epita.fr>
7006
7007 * src/print_graph.c (print_actions): Remove `rule', unused.
7008 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
7009 pacify GCC's signed < unsigned warnings.
7010 * src/closure.c (itemsetsize): Likewise.
7011 * src/reader.c (symbol_list_new): Static.
7012
7013 2001-11-23 Akim Demaille <akim@epita.fr>
7014
7015 Attaching lineno to buckets is stupid, since only one copy of each
7016 symbol is kept, only the line of the first occurrence is kept too.
7017
7018 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
7019 * src/reader.c (rline_allocated): Remove, unused.
7020 (symbol_list): Have a `line' member.
7021 (symbol_list_new): New.
7022 (readgram): Use it.
7023 * src/print.c (print_grammar): Output the rule line numbers.
7024 * tests/regression.at (Solved SR Conflicts)
7025 (Unresolved SR Conflicts): Adjust.
7026 Reported by Hans Aberg.
7027
7028 2001-11-22 Marc Autret <autret_m@epita.fr>
7029
7030 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
7031
7032 2001-11-22 Marc Autret <autret_m@epita.fr>
7033
7034 * src/muscle_tab.c (muscle_init): Remove initialization of
7035 skeleton muscle.
7036 * src/output.c (output_master_parser): Do it here.
7037
7038 2001-11-20 Akim Demaille <akim@epita.fr>
7039
7040 * po/sv.po: New.
7041 * configure.in (ALL_LINGUAS): Adjust.
7042 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
7043 longer contains strings to translate.
7044
7045 2001-11-19 Akim Demaille <akim@epita.fr>
7046
7047 * src/conflicts.c (conflicts_print): Add a missing \n.
7048
7049 2001-11-19 Akim Demaille <akim@epita.fr>
7050
7051 * src/nullable.c (nullable_print): New.
7052 (set_nullable): Call it when tracing.
7053 Better locality of variables.
7054
7055 2001-11-19 Akim Demaille <akim@epita.fr>
7056
7057 * src/print.c (print_actions): Better locality of variables.
7058
7059 2001-11-19 Akim Demaille <akim@epita.fr>
7060
7061 * src/derives.c (print_derives): Fix and enrich.
7062 * src/closure.c (print_fderives): Likewise.
7063
7064 2001-11-19 Akim Demaille <akim@epita.fr>
7065
7066 * src/closure.c (itemsetend): Remove, replaced with...
7067 (itemsetsize): new.
7068
7069 2001-11-19 Akim Demaille <akim@epita.fr>
7070
7071 * src/LR0.c (kernel_end): Remove, replaced with...
7072 (kernel_size): new.
7073
7074 2001-11-19 Akim Demaille <akim@epita.fr>
7075
7076 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
7077 to clarify.
7078
7079 2001-11-19 Akim Demaille <akim@epita.fr>
7080
7081 * src/closure.c (closure): Use arrays instead of pointers to clarify.
7082
7083 2001-11-19 Akim Demaille <akim@epita.fr>
7084
7085 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
7086 trace messages.
7087 * src/LR0.c: Likewise.
7088 (allocate_itemsets): Use arrays instead of pointers to clarify.
7089
7090 2001-11-19 Akim Demaille <akim@epita.fr>
7091
7092 * src/getargs.c (statistics_flag): Replace with...
7093 (trace_flag): New.
7094 (longopts): Accept --trace instead of --statistics.
7095 * src/getargs.h, src/options.c: Adjust.
7096 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
7097 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
7098
7099 2001-11-19 Akim Demaille <akim@epita.fr>
7100
7101 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
7102 pointers to clarify the code.
7103 (save_reductions, save_shifts): Factor common parts of alternatives.
7104
7105 2001-11-19 Akim Demaille <akim@epita.fr>
7106
7107 * src/LR0.c (new_state, get_state): Complete TRACE code.
7108 * src/closure.c: Include `reader.h' to get `tags', needed by the
7109 trace code.
7110 Rename the conditional DEBUG as TRACE.
7111 Output consistently TRACEs to stderr, not stdout.
7112 * src/derives.c: Likewise.
7113 * src/reduce.c: (inaccessable_symbols): Using if is better style
7114 than goto.
7115 Use `#if TRACE' instead of `#if 0' for tracing code.
7116
7117 2001-11-19 Akim Demaille <akim@epita.fr>
7118
7119 * src/system.h (LIST_FREE, shortcpy): New.
7120 * src/LR0.c: Use them.
7121 * src/output.c (free_itemsets, free_reductions, free_shifts):
7122 Remove, replaced by LIST_FREE.
7123
7124 2001-11-19 Akim Demaille <akim@epita.fr>
7125
7126 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
7127 (REDUCTIONS_ALLOC): New.
7128 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
7129 allocation.
7130
7131 2001-11-19 Akim Demaille <akim@epita.fr>
7132
7133 * src/LR0.c (new_state): Complete trace code.
7134 * src/nullable.c (set_nullable): Don't translate traces.
7135
7136 2001-11-19 Akim Demaille <akim@epita.fr>
7137
7138 * src/print_graph.c (print_core): Better locality of variables.
7139 * src/print.c (print_core): Likewise.
7140
7141 2001-11-19 Akim Demaille <akim@epita.fr>
7142
7143 * src/vcg.c: You do the output, so you are responsible of the
7144 handling of VCG syntax, in particular: use quotearg.
7145 * src/print_graph.c: Don't.
7146 (print_actions): Don't output the actions as part of the nodes,
7147 since that's the job of the edges.
7148 (print_state): Don't output by hand: fill the node description,
7149 and ask for its output.
7150
7151 2001-11-19 Akim Demaille <akim@epita.fr>
7152
7153 * src/bison.simple (yyparse): When verbosely reporting an error,
7154 no longer put additional quotes around token names.
7155 * tests/calc.at: Adjust.
7156
7157 2001-11-19 Akim Demaille <akim@epita.fr>
7158
7159 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
7160 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
7161 * src/output.c: Adjust.
7162
7163 2001-11-19 Akim Demaille <akim@epita.fr>
7164
7165 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
7166 (rule_t): this.
7167 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
7168
7169 2001-11-19 Akim Demaille <akim@epita.fr>
7170
7171 * src/gram.h (rule_t): New.
7172 (rule_table): New.
7173 (rrhs, rlhs): Remove, part of state_t.
7174 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
7175 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
7176 * src/reader.c, src/reduce.c: Adjust.
7177
7178 2001-11-19 Akim Demaille <akim@epita.fr>
7179
7180 * src/reader.c (symbols_output): New, extracted from...
7181 (packsymbols): Here.
7182 (reader): Call it.
7183
7184 2001-11-19 Akim Demaille <akim@epita.fr>
7185
7186 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
7187 (maxrhs): this new function.
7188
7189 2001-11-19 Akim Demaille <akim@epita.fr>
7190
7191 * src/lalr.c (F): New macro to access the variable F.
7192 Adjust.
7193
7194 2001-11-19 Akim Demaille <akim@epita.fr>
7195
7196 * src/lalr.h (LA): New macro to access the variable LA.
7197 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
7198 * src/lalr.c: Adjust.
7199
7200 2001-11-19 Akim Demaille <akim@epita.fr>
7201
7202 * src/lalr.c (initialize_LA): Only initialize LA. Let...
7203 (set_state_table): handle the `lookaheads' members.
7204
7205 2001-11-19 Akim Demaille <akim@epita.fr>
7206
7207 * src/lalr.h (lookaheads): Removed array, whose contents is now
7208 a member of...
7209 (state_t): this structure.
7210 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
7211 Adjust.
7212
7213 2001-11-19 Akim Demaille <akim@epita.fr>
7214
7215 * src/lalr.h (consistent): Removed array, whose contents is now
7216 a member of...
7217 (state_t): this structure.
7218 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
7219 Adjust.
7220
7221 2001-11-19 Akim Demaille <akim@epita.fr>
7222
7223 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
7224 contents are now members of...
7225 (state_t): this structure.
7226 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
7227 Adjust.
7228
7229 2001-11-19 Akim Demaille <akim@epita.fr>
7230
7231 * src/lalr.h (state_t): New.
7232 (state_table): Be a state_t * instead of a core **.
7233 (accessing_symbol): Remove, part of state_t.
7234 * src/lalr.c: Adjust.
7235 (set_accessing_symbol): Merge into...
7236 (set_state_table): this.
7237 * src/print_graph.c, src/conflicts.c: Adjust.
7238
7239 2001-11-14 Akim Demaille <akim@epita.fr>
7240
7241 * tests/calc.at, tests/output.at, tests/regression.at,
7242 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
7243 now the tests are run in private dirs, therefore AC_CLEANUP and
7244 family can be simplified to 0-ary.
7245 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
7246 use abs. path to find config.h.
7247 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
7248 stderr, there can be way too much random noise.
7249 Instead pass -Werror to GCC and rely on the exit status.
7250 Reported by Wolfram Wagner.
7251
7252 2001-11-14 Akim Demaille <akim@epita.fr>
7253
7254 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
7255 defined only if yyoverflow is defined, to avoid `warning: unused
7256 variable `yyvs1''.
7257 Reported by The Test Suite.
7258
7259 2001-11-14 Akim Demaille <akim@epita.fr>
7260
7261 * src/print.c: Include reduce.h.
7262 Reported by Hans Aberg.
7263
7264 2001-11-14 Akim Demaille <akim@epita.fr>
7265
7266 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
7267 Revert a previous patch: these are really const.
7268 * src/conflicts.c (conflict_report): Additional useless pair of
7269 braces to pacify GCC's warnings for `if () if () {} else {}'.
7270 * src/lex.c (parse_percent_token): Replace equal_offset with
7271 arg_offset.
7272 arg is const.
7273 Be sure to strdup `arg' when used, since there is no reason for
7274 token_buffer not to change.
7275
7276 2001-11-14 Akim Demaille <akim@epita.fr>
7277
7278 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
7279 definition.
7280 * src/main.c (main): Use them.
7281 Suggested by Hans Aberg.
7282
7283 2001-11-12 Akim Demaille <akim@epita.fr>
7284
7285 * src/system.h (ngettext): Now that we use ngettext, be sure to
7286 provide a default definition when NLS are not used.
7287
7288 2001-11-12 Akim Demaille <akim@epita.fr>
7289
7290 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
7291 Use @kbd to denote user input.
7292 (Language and Grammar): ANSIfy the example.
7293 Adjust its layout for info/notinfo.
7294 (Location Tracking Calc): Output error messages to stderr.
7295 Output locations in a more GNUtically correct way.
7296 Fix a couple of Englishos.
7297 Adjust @group/@end group pairs.
7298
7299 2001-11-12 Akim Demaille <akim@epita.fr>
7300
7301 %expext was not functioning at all.
7302
7303 * src/conflicts.c (expected_conflicts): Set to -1.
7304 (conflict_report): Use ngettext.
7305 (conflicts_print): Check %expect and make its violation an error.
7306 * doc/bison.texinfo (Expect Decl): Adjust.
7307 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
7308 * tests/regression.at (%expect not enough, %expect right)
7309 (%expect too much): New.
7310
7311 2001-11-12 Akim Demaille <akim@epita.fr>
7312
7313 * tests/regression.at (Conflicts): Rename as...
7314 (Unresolved SR Conflicts): this.
7315 (Solved SR Conflicts): New.
7316
7317 2001-11-12 Akim Demaille <akim@epita.fr>
7318
7319 * src/reduce.c (print_results): Rename as...
7320 (reduce_output): This.
7321 Output to OUT, passed as argument, instead of output_obstack.
7322 (dump_grammar): Likewise.
7323 (reduce_free): New.
7324 Also free V1.
7325 (reduce_grammar): No longer call reduce_output, since...
7326 * src/print.c (print_results): do it.
7327 * src/main.c (main): Call reduce_free;
7328
7329 2001-11-12 Akim Demaille <akim@epita.fr>
7330
7331 * src/conflicts.c (print_reductions): Accept OUT as argument.
7332 Output to it, not to output_obstack.
7333 * src/print.c (print_actions): Adjust.
7334
7335 2001-11-12 Akim Demaille <akim@epita.fr>
7336
7337 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
7338 the result instead of using...
7339 (src_total, rrc_total, src_count, rrc_count): Remove.
7340 (any_conflicts): Remove.
7341 (print_conflicts): Split into...
7342 (conflicts_print, conflicts_output): New.
7343 * src/conflicts.h: Adjust.
7344 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
7345 * src/print.c (print_grammar): Issue `\n' between two rules.
7346 * tests/regression.at (Conflicts): New.
7347 Reported by Tom Lane.
7348
7349 2001-11-12 Akim Demaille <akim@epita.fr>
7350
7351 * tests/regression.at (Invalid input): Remove, duplicate with
7352 ``Invalid input: 1''.
7353
7354 2001-11-12 Akim Demaille <akim@epita.fr>
7355
7356 * tests/torture.at (AT_DATA_STACK_TORTURE)
7357 (Exploding the Stack Size with Alloca)
7358 (Exploding the Stack Size with Malloc): New.
7359
7360 2001-11-12 Akim Demaille <akim@epita.fr>
7361
7362 * src/bison.simple (YYSTACK_REALLOC): New.
7363 (yyparse) [!yyoverflow]: Use it and free the old stack.
7364 Reported by Per Allansson.
7365
7366 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
7367
7368 * src/bison.simple: Define type yystype instead of YYSTYPE, and
7369 define CPP macro, which substitute YYSTYPE by yystype.
7370 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
7371 with yyltype/YYLTYPE. This allows inclusion of the generated
7372 header within the parser if the compiler, such as GGC, accepts
7373 multiple equivalent #defines.
7374 From Akim.
7375
7376 2001-11-05 Akim Demaille <akim@epita.fr>
7377
7378 * src/reader.c (symbols_output): New, extracted from...
7379 (packsymbols): here.
7380 (reader): Adjust.
7381
7382 2001-11-05 Akim Demaille <akim@epita.fr>
7383
7384 * src/lex.c (parse_percent_token): s/quotearg/quote/.
7385
7386 2001-11-05 Akim Demaille <akim@epita.fr>
7387
7388 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
7389 pattern.
7390
7391 2001-11-05 Akim Demaille <akim@epita.fr>
7392
7393 * src/options.h (struct option_table_struct): set_flags is void*.
7394 * src/options.c (longopts): Support `--output' and `%output'.
7395 (usage): Adjust.
7396 * src/lex.h (tok_setopt): Remove, replaced with...
7397 (tok_intopt, tok_stropt): these new guys.
7398 * src/lex.c (getopt.h): Not needed.
7399 (token_buffer, unlexed_token_buffer): Not const.
7400 (percent_table): Promote `-' over `_' in directive names.
7401 Active `%name-prefix', `file-prefix', and `output'.
7402 (parse_percent_token): Accept possible arguments to directives.
7403 Promote `-' over `_' in directive names.
7404
7405 2001-11-04 Akim Demaille <akim@epita.fr>
7406
7407 * doc/bison.texinfo (Decl Summary): Split the list into
7408 `directives for grammars' and `directives for bison'.
7409 Sort'em.
7410 Add description of `%name-prefix', `file-prefix', and `output'.
7411 Promote `-' over `_' in directive names.
7412 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
7413 Simplify the description of `--name-prefix'.
7414 Promote `-' over `_' in directive names.
7415 Promote `--output' over `--output-file'.
7416 Fix the description of `--defines'.
7417 * tests/output.at: Exercise %file-prefix and %output.
7418
7419 2001-11-02 Akim Demaille <akim@epita.fr>
7420
7421 * doc/refcard.tex: Update.
7422
7423 2001-11-02 Akim Demaille <akim@epita.fr>
7424
7425 * src/symtab.h (SUNDEF): New.
7426 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
7427 stand for `uninitialized', instead of 0.
7428 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
7429 * src/lex.c (lex): Adjust.
7430
7431 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
7432 Number it 0.
7433 Let yylex return it instead of a plain 0.
7434 Reported by Dick Streefland.
7435
7436 2001-11-02 Akim Demaille <akim@epita.fr>
7437
7438 * tests/regression.at (Mixing %token styles): New test.
7439
7440 2001-11-02 Akim Demaille <akim@epita.fr>
7441
7442 * src/reader.c (parse_thong_decl): Formatting changes.
7443 (token_translations_init): New, extracted from...
7444 (packsymbols): Here.
7445 Adjust.
7446
7447 2001-11-01 Akim Demaille <akim@epita.fr>
7448
7449 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
7450 Check that `9foo.y' produces correct cpp guards.
7451 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
7452 guards.
7453 Reported by Wwp.
7454
7455 2001-11-01 Akim Demaille <akim@epita.fr>
7456
7457 * tests/regression.at (Invalid input: 2): New.
7458 * src/lex.c (unlexed_token_buffer): New.
7459 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
7460 too.
7461 Reported by Wwp.
7462
7463 2001-11-01 Akim Demaille <akim@epita.fr>
7464
7465 * tests/calc.at: Catch up with 1.30.
7466 * configure.in: Bump to 1.49a.
7467 Adjust to newer Autotest.
7468
7469 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
7470
7471 * src/conflicts.c: Move global variables rrc_total and src_total ...
7472 (print_conflicts): here.
7473 * src/output.c (output): Free global variable user_toknums.
7474 * src/lex.c (token_obstack): Become static.
7475
7476 2001-10-18 Akim Demaille <akim@epita.fr>
7477
7478 * tests/atlocal.in (GCC): Add.
7479 * tests/calc.at: s/m4_match/m4_bmatch/.
7480 s/m4_patsubst/m4_bpatsubst/.
7481 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
7482 * configure.in: AC_SUBST(GCC).
7483
7484 2001-10-14 Marc Autret <autret_m@epita.fr>
7485
7486 * src/options.c (create_long_option_table): Fix.
7487
7488 2001-10-10 Akim Demaille <akim@epita.fr>
7489
7490 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
7491
7492 2001-10-04 Akim Demaille <akim@epita.fr>
7493
7494 * src/reader.c (parse_union_decl): Push the caracters in
7495 union_obstack, not attrs_obstack.
7496
7497 2001-10-04 Akim Demaille <akim@epita.fr>
7498
7499 Merge in the branch 1.29.
7500
7501 * src/reader.c (packsymbols): Use a temporary obstack for
7502 `%%tokendef', since output_stack is already used elsewhere.
7503
7504 2001-10-02 Akim Demaille <akim@epita.fr>
7505
7506 Bump 1.29d.
7507
7508 2001-10-02 Akim Demaille <akim@epita.fr>
7509
7510 Version 1.29c.
7511
7512 2001-10-02 Akim Demaille <akim@epita.fr>
7513
7514 * tests/regression.at (Invalid CPP headers): New.
7515 From Alexander Belopolsky.
7516 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
7517
7518 2001-10-02 Akim Demaille <akim@epita.fr>
7519
7520 * tests/regression.at (Invalid input): New.
7521 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
7522 Reported by Shura.
7523
7524 2001-10-02 Akim Demaille <akim@epita.fr>
7525
7526 * tests/calc.at: Now that --debug works, the tests must be adjusted.
7527
7528 2001-10-02 Akim Demaille <akim@epita.fr>
7529
7530 * src/output.c (output_parser): Assert `skeleton'.
7531 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
7532 systems.
7533 From Shura.
7534
7535 2001-10-01 Marc Autret <autret_m@epita.fr>
7536
7537 * src/lex.h: Echo modifications.
7538 * src/lex.c (unlex): Parameter is now token_t.
7539 From Hans Aberg.
7540
7541 2001-10-01 Marc Autret <autret_m@epita.fr>
7542
7543 * src/main.c: Include lex.h.
7544 From Hans Aberg.
7545
7546 2001-09-29 Akim Demaille <akim@epita.fr>
7547
7548 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
7549
7550 2001-09-28 Akim Demaille <akim@epita.fr>
7551
7552 * tests/testsuite.at: Update to newer Autotest.
7553 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
7554
7555 2001-09-27 Akim Demaille <akim@epita.fr>
7556
7557 Position independent wrapper.
7558
7559 * tests/bison: Remove.
7560 * tests/bison.in: New.
7561 * configure.in: Adjust.
7562
7563 2001-09-27 Paul Eggert <eggert@twinsun.com>
7564
7565 Port quotearg fixes from tar 1.13.24.
7566
7567 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
7568 tm to be declared.
7569 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
7570 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
7571
7572 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
7573 * m4/mbrtowc.m4: New file.
7574 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
7575 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
7576
7577 2001-09-27 Akim Demaille <akim@epita.fr>
7578
7579 Bump to 1.29c.
7580
7581 2001-09-27 Akim Demaille <akim@epita.fr>
7582
7583 Version 1.29b.
7584
7585 2001-09-25 Akim Demaille <akim@epita.fr>
7586
7587 * src/system.h: Include `xalloc.h'.
7588 Remove it from the C files.
7589 * src/files.c (output_files): Free the obstacks.
7590 * src/lex.c (init_lex): Rename as...
7591 (lex_init): this.
7592 (lex_free): New.
7593 * src/main.c (main): Use it.
7594
7595 2001-09-24 Marc Autret <autret_m@epita.fr>
7596
7597 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
7598 to output informations in fout (FILE*).
7599 (open_graph, close_graph): Likewise.
7600 (output_graph, output_edge, output_node): Likewise.
7601 * src/vcg.h: Update function prototypes.
7602 * src/print_graph.c (print_graph): Open output graph file.
7603 (print_actions): Adjust.
7604 * src/files.h: Remove extern declaration.
7605 * src/files.c: Remove graph_obstack declaration.
7606 (open_files): Remove graph_obstack initialization.
7607 (output_files): Remove graph_obstack saving.
7608
7609 2001-09-24 Marc Autret <autret_m@epita.fr>
7610
7611 * src/files.c (compute_output_file_names): Fix.
7612
7613 2001-09-24 Marc Autret <autret_m@epita.fr>,
7614 Akim Demaille <akim@epita.fr>
7615
7616 * src/reader.c (reader): Remove call to free_symtab ().
7617 * src/main.c (main): Call it here.
7618 Include symtab.h.
7619 * src/conflicts.c (initialize_conflicts): Rename as...
7620 (solve_conflicts): this.
7621 * src/print.c (print_core, print_actions, print_state)
7622 (print_grammar): Dump to a file instead a `output_obstack'.
7623 (print_results): Dump `output_obstack', and then proceed with the
7624 FILE *.
7625 * src/files.c (compute_output_file_names, close_files): New.
7626 (output_files): Adjust.
7627 * src/main.c (main): Adjust.
7628
7629 2001-09-23 Marc Autret <autret_m@epita.fr>
7630
7631 * src/files.c (compute_header_macro): Computes header macro name
7632 from spec_defines_file when given.
7633
7634 2001-09-23 Marc Autret <autret_m@epita.fr>
7635
7636 * src/files.c (output_files): Add default extensions.
7637
7638 2001-09-22 Akim Demaille <akim@epita.fr>
7639
7640 * src/conflicts.c (finalize_conflicts): Rename as...
7641 (free_conflicts): this.
7642
7643 2001-09-22 Akim Demaille <akim@epita.fr>
7644
7645 * src/gram.c (gram_free): Rename back as...
7646 (dummy): this.
7647 (output_token_translations): Free `token_translations'.
7648 * src/symtab.c (free_symtab): Free the tag field.
7649
7650 2001-09-22 Akim Demaille <akim@epita.fr>
7651
7652 Remove `translations' as it is always set to true.
7653
7654 * src/gram.h: Adjust.
7655 * src/reader.c (packsymbols, parse_token_decl): Adjust
7656 * src/print.c (print_grammar): Adjust.
7657 * src/output.c (output_token_translations): Adjust.
7658 * src/lex.c (lex): Adjust.
7659 * src/gram.c: Be sure the set pointers to NULL.
7660 (dummy): Rename as...
7661 (gram_free): this.
7662
7663 2001-09-22 Akim Demaille <akim@epita.fr>
7664
7665 * configure.in: Invoke AM_LIB_DMALLOC.
7666 * src/system.h: Use dmalloc.
7667 * src/LR0.c: Be sure to have pointers initialized to NULL.
7668 (allocate_itemsets): Allocate kernel_items only if needed.
7669
7670 2001-09-22 Akim Demaille <akim@epita.fr>
7671
7672 * configure.in: Bump to 1.29b.
7673 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
7674 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
7675 need xmalloc.c in calc.y.
7676 From Pascal Bart.
7677
7678 2001-09-21 Akim Demaille <akim@epita.fr>
7679
7680 Version 1.29a.
7681 * Makefile.maint, config/config.guess, config/config.sub,
7682 * config/missing: Update from masters.
7683 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
7684 upon package.m4.
7685 * configure.in (ALL_LINGUAS): Add `tr'.
7686
7687 2001-09-21 Akim Demaille <akim@epita.fr>
7688
7689 * tests/Makefile.am (package.m4): Move to...
7690 ($(srcdir)/$(TESTSUITE)): here.
7691
7692 2001-09-20 Akim Demaille <akim@epita.fr>
7693
7694 * src/complain.c: No longer try to be standalone: use system.h.
7695 Don't assume __STDC__ is defined to 1. Just test if it is defined.
7696 * src/complain.h: Likewise.
7697 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
7698 Remove the unused variable `n'.
7699 From Albert Chin-A-Young.
7700
7701 2001-09-18 Marc Autret <autret_m@epita.fr>
7702
7703 * doc/bison.1: Update.
7704 * doc/bison.texinfo (Bison Options): Update --defines and --graph
7705 descriptions.
7706 (Option Cross Key): Update.
7707 Add --graph.
7708
7709 2001-09-18 Marc Autret <autret_m@epita.fr>
7710
7711 * tests/regression.at: New test (comment in %union).
7712
7713 2001-09-18 Marc Autret <autret_m@epita.fr>
7714
7715 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
7716 do that.
7717 Reported by Keith Browne.
7718
7719 2001-09-18 Marc Autret <autret_m@epita.fr>
7720
7721 * tests/output.at: Add tests for --defines and --graph.
7722
7723 2001-09-18 Marc Autret <autret_m@epita.fr>
7724
7725 * tests/output.at: Removes tests of %{header,src}_extension features.
7726
7727 2001-09-18 Akim Demaille <akim@epita.fr>
7728
7729 * tests/Makefile.am (package.m4): New.
7730 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
7731 (_AT_CHECK_CALC_ERROR): Likewise.
7732 Factor the `, ' part of verbose error messages.
7733
7734 2001-09-18 Marc Autret <autret_m@epita.fr>
7735
7736 * src/getargs.c (longopts): Declare --defines and --graph as options
7737 with optional arguments.
7738 * src/files.h: Add extern declarations.
7739 * src/files.c (spec_graph_file, spec_defines_file): New.
7740 (output_files): Update.
7741 Remove CPP-outed code.
7742
7743 2001-09-18 Marc Autret <autret_m@epita.fr>
7744
7745 Turn off %{source,header}_extension feature.
7746
7747 * src/files.c (compute_exts_from_gf): Update.
7748 (compute_exts_from_src): Update.
7749 (output_files): CPP-out useless code.
7750 * src/files.h: Remove {header,source}_extension extern declarations.
7751 * src/reader.c (parse_dquoted_param): CPP-out.
7752 (parse_header_extension_decl): Remove.
7753 (parse_source_extension_decl): Remove.
7754 (read_declarations): Remove cases tok_{hdrext,srcext}.
7755 * src/lex.c (percent_table): Remove {header,source}_extension entries.
7756 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
7757
7758 2001-09-10 Akim Demaille <akim@epita.fr>
7759
7760 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
7761 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
7762 (AT_CHECK_OUTPUT): this.
7763 Merely check ls' exit status, its output is useless.
7764
7765 2001-09-10 Akim Demaille <akim@epita.fr>
7766
7767 * tests/calc.at: Use m4_match.
7768 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
7769
7770 2001-09-10 Marc Autret <autret_m@epita.fr>,
7771 Akim Demaille <akim@epita.fr>
7772
7773 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
7774 enum color_e.
7775 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
7776 to `normal'.
7777 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
7778 * src/lex.h: Adjust prototype.
7779 (token_t): Add `tok_undef'.
7780 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
7781 (parse_percent_token): Now returns token_t.
7782 Add default statement in switch.
7783 (lex): Separate `c' as an input variable, from the token_t result
7784 part.
7785 (unlexed): Is a token_t.
7786
7787 2001-09-10 Akim Demaille <akim@epita.fr>
7788
7789 * configure.in: Bump to 1.29a.
7790
7791 2001-09-07 Akim Demaille <akim@epita.fr>
7792
7793 Version 1.29.
7794
7795 2001-08-30 Akim Demaille <akim@epita.fr>
7796
7797 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
7798 * m4/atconfig.m4: Remove.
7799 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
7800 * tests/bison: New.
7801 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
7802 m4_if, m4_patsubst, and m4_regexp.
7803 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
7804 `input' file instead of echo.
7805
7806 2001-08-29 Akim Demaille <akim@epita.fr>
7807
7808 Bump to 1.28e.
7809
7810 2001-08-29 Akim Demaille <akim@epita.fr>
7811
7812 Version 1.28d.
7813
7814 2001-08-29 Paul Eggert <eggert@twinsun.com>
7815
7816 * src/bison.simple (yyparse): Don't take the address of an
7817 item before the start of an array, as that doesn't conform to
7818 the C Standard.
7819
7820 2001-08-29 Robert Anisko <anisko_r@epita.fr>
7821
7822 * doc/bison.texinfo (Location Tracking Calc): New node.
7823
7824 2001-08-29 Paul Eggert <eggert@twinsun.com>
7825
7826 * src/output.c (output): Do not define const, as this now
7827 causes more problems than it cures.
7828
7829 2001-08-29 Akim Demaille <akim@epita.fr>
7830
7831 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
7832 the nodes.
7833 Be sure to tag the `detailmenu'.
7834
7835 2001-08-29 Akim Demaille <akim@epita.fr>
7836
7837 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
7838 download in a tmp dir.
7839
7840 2001-08-28 Marc Autret <autret_m@epita.fr>
7841
7842 * config/depcomp: New file.
7843
7844 2001-08-28 Marc Autret <autret_m@epita.fr>
7845
7846 * doc/bison.1 (mandoc): Adjust.
7847 From Juan Manuel Guerrero.
7848
7849 2001-08-28 Marc Autret <autret_m@epita.fr>
7850
7851 * src/print_graph.c (print_state): Fix.
7852
7853 2001-08-27 Marc Autret <autret_m@epita.fr>
7854
7855 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
7856 char * members.
7857 Echo modifications to the functions prototypes.
7858 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
7859
7860 2001-08-27 Marc Autret <autret_m@epita.fr>
7861
7862 * src/vcg.c: Include `xalloc.h'.
7863 (add_colorentry): New.
7864 (add_classname): New.
7865 (add_infoname): New.
7866 * src/vcg.h: Add new prototypes.
7867
7868 2001-08-27 Akim Demaille <akim@epita.fr>
7869
7870 * Makefile.maint: Sync. again with CVS Autoconf.
7871
7872 2001-08-27 Akim Demaille <akim@epita.fr>
7873
7874 * Makefile.maint: Formatting changes.
7875 (po-update, cvs-update, update): New targets.
7876 (AMTAR): Remove.
7877
7878 2001-08-27 Akim Demaille <akim@epita.fr>
7879
7880 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
7881 * Makefile.maint: Sync. with CVS Autoconf.
7882
7883 2001-08-27 Marc Autret <autret_m@epita.fr>
7884
7885 * src/vcg.h (struct infoname_s): New.
7886 (struct colorentry_s): New.
7887 (graph_s): New fields {vertical,horizontal}_order in structure.
7888 Add `infoname' field.
7889 Add `colorentry' field;
7890 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
7891 (G_HORIZONTAL_ORDER): New.
7892 (G_INFONAME): New.
7893 (G_COLORENTRY): New.
7894 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
7895 Add output of `infoname'.
7896 Add output of `colorentry'.
7897
7898 2001-08-27 Marc Autret <autret_m@epita.fr>
7899
7900 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
7901 This one shadowed a global parameter.
7902
7903 2001-08-24 Marc Autret <autret_m@epita.fr>
7904
7905 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
7906 instead of `unsigned'.
7907 (print_state): Do not call obstack_object_size () in obstack_grow ()
7908 to avoid macro variables shadowing.
7909
7910 2001-08-23 Marc Autret <autret_m@epita.fr>
7911
7912 * src/lex.c (percent_table): Typo: s/naem/name/.
7913 Add graph option.
7914 Normalize new options declarations.
7915
7916 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
7917
7918 * tests/suite.at: Exercise %header_extension and %source_extension.
7919
7920 2001-08-16 Marc Autret <autret_m@epita.fr>
7921
7922 * src/reader.c (parse_dquoted_param): New.
7923 (parse_header_extension_decl): Use it.
7924 (parse_source_extension_decl): Likewise.
7925
7926 2001-08-16 Marc Autret <autret_m@epita.fr>
7927
7928 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
7929 (get_xxxx_str): Use assert () instead of complain ().
7930 Remove return invokations in default cases.
7931 (get_decision_str): Modify default behaviour. Remove second argument.
7932 Echo modifications on calls.
7933 (output_graph): Fix.
7934
7935 2001-08-16 Marc Autret <autret_m@epita.fr>
7936
7937 * src/getargs.c (usage): Update with ``-g, --graph''.
7938
7939 2001-08-16 Marc Autret <autret_m@epita.fr>
7940
7941 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
7942 (Option Cross Key): Likewise.
7943 * doc/bison.1: Update.
7944
7945 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
7946
7947 * src/output.c (output_master_parser): Don't finish action_obstack.
7948 (output_parser): Don't care about the muscle action, here.
7949 (prepare): Copy the action_obstack in the action muscle.
7950 (output): Free action_obstack.
7951
7952 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
7953
7954 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
7955 will contain `%union' declaration.
7956 (parse_union_decl): Delete #line directive output.
7957 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
7958 informations about %union.
7959 (parse_union_decl): Copy the union_obstack in the muscle stype.
7960 * src/bison.simple: Add new #line directive.
7961 Add typdef %%stype YYSTYPE.
7962
7963 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
7964
7965 * src/bison.simple: Add new `#line' directive.
7966
7967 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
7968
7969 * src/bison.simple: New `#line' directive.
7970 * src/output.c (output_parser): Support new dynamic muscle input_line.
7971
7972 2001-09-22 Marc Autret <autret_m@epita.fr>
7973
7974 * src/output.c (output_master_parser): New.
7975 (output_parser): Be more re-entrant.
7976
7977 2001-09-21 Marc Autret <autret_m@epita.fr>
7978
7979 * src/reader.c (copy_definition, parse_union_decl): Update and use
7980 `linef' muscle.
7981 (copy_action): Likewise.
7982 Use obstack_1grow ().
7983 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
7984
7985 2001-09-21 Marc Autret <autret_m@epita.fr>
7986
7987 * src/options.c (option_table): Adjust.
7988 * src/lex.c (parse_percent_token): Fix.
7989
7990 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
7991
7992 * src/options.c (symtab.h): Include it, need by lex.h.
7993
7994 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
7995
7996 * src/lex.c (parse_percent_token): Change type of variable `tx', which
7997 is now an option_table_struct*.
7998 (option_strcmp): New function option_strcmp.
7999 (parse_percent_token): Call option_strcmp.
8000 * src/getargs.c (xalloc.h, options.h): Include it.
8001 (getargs): Call create_long_option_table.
8002 (getargs): Free longopts at the end of the function.
8003 (shortopts): Move in options.c.
8004 * src/options.c (create_long_option_table): New function. Convert
8005 information from option_table to option structure.
8006 * src/reader.c (options.h): Include it.
8007
8008 * src/Makefile.am: Adjust.
8009 * src/options.c (option_table): Create from longopts and percent_table.
8010 * src/getargs.c (longopts): Delete.
8011 * src/lex.c (struct percent_table_struct): Delete.
8012 (percent_table): Delete.
8013 (options.h): Include it.
8014 * src/options.c: Create.
8015 * src/options.h: Create.
8016 Declare enum opt_access_e.
8017 Define struct option_table_struct.
8018
8019 2001-09-20 Marc Autret <autret_m@epita.fr>
8020
8021 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
8022 sections of Bison.
8023
8024 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
8025
8026 * src/bison.simple: s/%%filename/%%skeleton.
8027 * src/muscle_tab.c (getargs.h): Include it.
8028 (muscle_init): Insert new muscle skeleton.
8029
8030 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
8031
8032 * src/output.c (output_parser): Delete unused variable actions_dumped.
8033
8034 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
8035
8036 * src/output.c (output): Delete call to reader_output_yylsp.
8037 * src/reader.c (reader): Likewise.
8038 * src/reader.h: Delete declaration of reader_output_yylsp.
8039
8040 2001-09-02 Marc Autret <autret_m@epita.fr>
8041
8042 * src/reader.c: Include muscle_tab.h.
8043 (parse_union_decl): Update.
8044 (parse_macro_decl): Rename parse_muscle_decl.
8045 Update to use renamed functions and variable.
8046 (read_declarations, copy_action, read_additionnal_code, : Updated
8047 with correct variables and functions names.
8048 (packsymbols, reader): Likewise.
8049
8050 * src/reader.h (muscle_obstack): Extern declaration update.
8051
8052 * src/output.c: Include muscle_tab.h
8053 In all functions using macro_insert, change by using muscle_insert ().
8054 (macro_obstack): Rename muscle_obstack.
8055 Echo modifications in the whole file.
8056 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
8057 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
8058 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
8059
8060 * src/muscle_tab.h: Update double inclusion macros.
8061 (macro_entry_s): Rename muscle_entry_s.
8062 Update prototypes.
8063
8064 * src/muscle_tab.c: Include muscle_tab.h.
8065 Rename macro_tabble to muscle_table.
8066 (mhash1, mhash2, mcmp): Use muscle_entry.
8067 (macro_init): Rename muscle_init. Update.
8068 (macro_insert): Rename muscle_insert. Update.
8069 (macro_find): Rename muscle_find. Update.
8070
8071 * src/main.c: Include muscle_tab.h.
8072 (main): Call muscle_init ().
8073 * src/Makefile.am (bison_SOURCES): Echo modifications.
8074
8075 2001-09-02 Marc Autret <autret_m@epita.fr>
8076
8077 Now the files macro_tab.[ch] are named muscle_tab.[ch].
8078
8079 * src/muscle_tab.c, src/muscle_tab.h: Add files.
8080
8081 2001-09-02 Marc Autret <autret_m@epita.fr>
8082
8083 * src/macrotab.c, src/macrotab.h: Remove.
8084
8085 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
8086
8087 * src/reader.c (copy_guard): Use muscle to specify the `#line'
8088 filename.
8089
8090 2001-09-01 Marc Autret <autret_m@epita.fr>
8091
8092 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
8093 to an explicit value to activate the feature. We do it here.
8094
8095 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
8096
8097 * src/output.c (prepare): Delete the `filename' muscule insertion.
8098 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
8099 (parse_union_decl): Likewise.
8100 * src/macrotab.c (macro_init): Initialize filename by infile.
8101
8102 2001-08-31 Marc Autret <autret_m@epita.fr>
8103
8104 * src/bison.simple (YYLSP_NEEDED): New definition.
8105 * src/output.c (prepare): Add macro insertion of `locations_flag'
8106
8107 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
8108
8109 * src/output.c (prepare): Delete insertion of previous muscles,
8110 and insert the `prefix' muscles.
8111 * src/macrotab.c (macro_init): Likewise.
8112 (macro_init): Initialization prefix directive by `yy'.
8113 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
8114 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
8115 yylval, yydebug, yyerror, yynerrs and yyparse.
8116 New directive `#define' to substitute yydebug, ... with option
8117 name_prefix.
8118
8119 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
8120
8121 * src/main.c (main): Standardize.
8122 * src/output.c (output_table_data, output_parser): Likewise.
8123 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
8124
8125 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
8126
8127 * src/reader.c (read_additionnal_code): Rename %%user_code to
8128 %%epilogue.
8129 * src/output.c (output): Rename %%declarations to %%prologue.
8130 * src/bison.simple: Echo modifications.
8131
8132 2001-08-31 Marc Autret <autret_m@epita.fr>
8133
8134 * src/reader.c (readgram): CleanUp.
8135 (output_token_defines): Likewise.
8136 (packsymbols): Likewise.
8137 (reader): Likewise.
8138 * src/output.c (output): CPP-out useless code.
8139
8140 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
8141
8142 * src/reader.c (reader): Delete obsolete call to function
8143 output_trailers and output_headers.
8144 * src/output.h: Remove obsolete functions prototypes of output_headers
8145 and output_trailers.
8146
8147 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
8148
8149 * src/main.c: Include macrotab.h.
8150 * src/macrotab.h (macro_entry_s): Constify fields.
8151 Adjust functions prototypes.
8152 * src/macrotab.c (macro_insert): Constify key and value.
8153 (macro_find): Constify key.
8154 (macro_insert): Include 'xalloc.h'
8155 (macro_insert): Use XMALLOC.
8156 (macro_find): Constify return value.
8157 * src/output.c (output_table_data): Rename table to table_data.
8158 (output_parser): Constify macro_key, macro_value.
8159
8160 2001-08-30 Marc Autret <autret_m@epita.fr>
8161
8162 * src/reader.c (parse_skel_decl): New.
8163 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
8164 * src/lex.h (token_t): New token `tok_skel'.
8165 * src/lex.c (percent_table): Add skeleton option entry.
8166 Standardize.
8167
8168 2001-08-29 Marc Autret <autret_m@epita.fr>
8169
8170 * src/bison.simple: Add %%user_code directive at the end.
8171 * src/reader.c (read_additionnal_code): New.
8172 (reader): Use it.
8173 * src/output.c (output_program): Remove.
8174 (output): Update.
8175
8176 2001-08-28 Marc Autret <autret_m@epita.fr>
8177
8178 * src/output.c (output_actions): Clean up.
8179 (output_gram): CPP-out useless code.
8180 * src/reader.c (reader): Clean up, CPP-out useless code.
8181
8182 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
8183
8184 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
8185 directive.
8186 * src/bison.simple: Add `%%definitions'.
8187
8188 2001-08-28 Marc Autret <autret_m@epita.fr>
8189
8190 * config/depcomp: New file.
8191
8192 2001-08-27 Paul Eggert <eggert@twinsun.com>
8193
8194 * src/bison.simple (yyparse): Don't take the address of an
8195 item before the start of an array, as that doesn't conform to
8196 the C Standard.
8197
8198 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
8199
8200 * src/output.c (output): Remove the initialization of the macro
8201 obstack. It was done too late here.
8202
8203 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
8204 completely wrong.
8205 (reader): Initialize the macro obstack here, since we need it to grow
8206 '%define' directives.
8207
8208 * src/reader.h: Declare the macro obstack as extern.
8209
8210 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
8211
8212 * src/output.c (output_parser): Fix. Store single '%' characters in
8213 the output obstack instead of throwing them away.
8214
8215 2001-08-27 Akim Demaille <akim@epita.fr>
8216
8217 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
8218
8219 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8220
8221 * lib/Makefile.am: Adjust.
8222
8223 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8224
8225 * src/bison.simple: Update and add '%%' directives.
8226
8227 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8228
8229 * src/reader.c (reader): Remove calls to 'output_headers' and
8230 'output_trailers'. Remove some C output.
8231 (readgram): Disable a piece of code that was writing a default
8232 definition for 'YYSTYPE'.
8233 (reader_output_yylsp): Remove.
8234 (packsymbols): Output token defintions to a macro.
8235 (copy_definition): Disable C output.
8236
8237 * src/reader.c (parse_macro_decl): New function used to parse macro
8238 declarations.
8239 (copy_string2): Put the body of copy_string into this new function.
8240 Add a parameter to let the caller choose whether he wants to copy the
8241 string delimiters or not.
8242 (copy_string): Be a simple call to copy_string2 with the last argument
8243 bound to true.
8244 (read_declarations): Add case for macro definition.
8245 (copy_identifier): New.
8246 (parse_macro_decl): Read macro identifiers using copy_identifier
8247 rather than lex.
8248
8249 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8250
8251 * src/output.c (prepare): Add prefixed names.
8252 (output_parser): Output semantic actions.
8253 (output_parser): Fix bug on '%%line' directives.
8254
8255 * src/output.c (output_headers): Remove. The C code printed by this
8256 function should now be in the skeletons.
8257 (output_trailers): Remove.
8258 (output): Disable call to 'reader_output_yylsp'.
8259 (output_rule_data): Do not output tables to the table obstack.
8260
8261 * src/output.c: Remove some C dedicated output.
8262 Improve the use of macro and output obstacks.
8263 (output_defines): Remove.
8264
8265 * src/output.c (output_token_translations): Associate 'translate'
8266 table with a macro. No output to the table obstack.
8267 (output_gram): Same for 'rhs' and 'prhs'.
8268 (output_stos): Same for 'stos'.
8269 (output_rule_data): Same for 'r1' and 'r2'.
8270 (token_actions): Same for 'defact'.
8271 (goto_actions): Same for 'defgoto'.
8272 (output_base): Same for 'pact' and 'pgoto'.
8273 (output_table): Same for 'table'.
8274 (output_check): Same for 'check'.
8275
8276 * src/output.c (output_table_data): New function.
8277 (output_short_table): Remove.
8278 (output_short_or_char_table): Remove.
8279
8280 * src/output.c (output_parser): Replace most of the skeleton copy code
8281 with something new. Skeletons are now processed character by character
8282 rather than line by line, and Bison looks for '%%' macros. This is the
8283 first step in making Bison's output process (a lot) more flexible.
8284 (output_parser): Use the macro table.
8285
8286 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8287
8288 * src/main.c (main): Initialize the macro table.
8289
8290 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8291
8292 * src/lex.c (percent_table): Add tok_define.
8293 * src/lex.h: Add tok_define.
8294
8295 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8296
8297 * src/macrotab.c: New file.
8298 * src/macrotab.h: New file.
8299 * src/Makefile.am: Update.
8300
8301 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8302
8303 * lib/hash.c: New file.
8304 * lib/hash.h: New file.
8305 * lib/Makefile.am: Update.
8306
8307 2001-08-15 Akim Demaille <akim@epita.fr>
8308
8309 Version 1.28c.
8310
8311 2001-08-15 Marc Autret <autret_m@epita.fr>
8312
8313 * src/reader.c (readgram): Indent output macro YYSTYPE.
8314 (packsymbols): Likewise.
8315 (output_token_defines): Likewise.
8316 * src/files.c: Standardize.
8317 (compute_header_macro): New.
8318 (defines_obstack_save): New. Use compute_header_macro.
8319 (output_files): Update. Use defines_obstack_save.
8320
8321 2001-08-15 Akim Demaille <akim@epita.fr>
8322
8323 * doc/bison.texinfo (Table of Symbols): Document
8324 YYSTACK_USE_ALLOCA.
8325
8326 2001-08-15 Akim Demaille <akim@epita.fr>
8327
8328 * missing: Update from CVS Automake.
8329 * config/config.guess, config/config.sub, config/texinfo.tex:
8330 Update from gnu.org.
8331
8332 2001-08-15 Akim Demaille <akim@epita.fr>
8333
8334 * Makefile.maint: Sync with CVS Autoconf.
8335
8336 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
8337
8338 * doc/bison.texinfo: Include GNU Free Documentation License from
8339 `fdl.texi'.
8340 * doc/fdl.texi: Add to package.
8341
8342 2001-08-14 Marc Autret <autret_m@epita.fr>
8343
8344 Turn on %{source,header}_extension features.
8345
8346 * src/lex.c (percent_table): Un-CPP out header_extension and
8347 source_extension.
8348 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
8349 (compute_exts_from_src): Remove conditions. It restores priorities
8350 between options.
8351
8352 2001-08-14 Marc Autret <autret_m@epita.fr>
8353
8354 * src/files.c (compute_base_names): Add extensions computing when
8355 `--file-prefix' used.
8356 Standardize function calls.
8357
8358 2001-08-13 Marc Autret <autret_m@epita.fr>
8359
8360 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
8361 defining it (defined but null disables alloca).
8362
8363 2001-08-13 Marc Autret <autret_m@epita.fr>
8364
8365 * src/bison.simple (_yy_memcpy): CPP reformat.
8366
8367 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
8368
8369 * tests/atconfig.in (CPPFLAGS): Fix.
8370
8371 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
8372
8373 * doc/bison.texinfo: Include GNU General Public License from
8374 `gpl.texi'.
8375 * doc/gpl.texi: Add to package.
8376
8377 2001-08-10 Marc Autret <autret_m@epita.fr>
8378
8379 * src/print_graph.h: Fix.
8380 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
8381
8382 2001-08-10 Akim Demaille <akim@epita.fr>
8383
8384 * src/system.h: Provide default declarations for stpcpy, strndup,
8385 and strnlen.
8386
8387 2001-08-10 Robert Anisko <anisko_r@epita.fr>
8388
8389 * doc/bison.texinfo (Locations): Update @$ stuff.
8390
8391 2001-08-09 Robert Anisko <anisko_r@epita.fr>
8392
8393 * src/bison.simple (YYLLOC_DEFAULT): Update.
8394 (yyparse): Adjust.
8395
8396 2001-08-08 Marc Autret <autret_m@epita.fr>
8397
8398 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
8399 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
8400 Reported by Fabrice Bauzac.
8401
8402 2001-08-08 Marc Autret <autret_m@epita.fr>
8403
8404 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
8405 * src/vcg.c (output_node): Fix.
8406 * src/vcg.h: Cleanup.
8407 * src/print_graph.c: Add comments.
8408 (node_output_size): New global variable. Simplify the formatting of
8409 the VCG graph output.
8410 (print_actions): Unused code is now used. It notifies the final state
8411 and no action states in the VCG graph. It also give the reduce actions.
8412 The `shift and goto' edges are red and the `go to state' edges are
8413 blue.
8414 Get the current node name and node_obstack by argument.
8415 (node_obstack): New variable.
8416 (print_state): Manage node_obstack.
8417 (print_core): Use node_obstack given by argument.
8418 A node is not only computed here but in print_actions also.
8419 (print_graph): CPP out useless code instead of commenting it.
8420
8421 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
8422
8423 * tests/atconfig.in (CPPFLAGS): Fix.
8424
8425 2001-08-07 Akim Demaille <akim@epita.fr>
8426
8427 * src/print_graph.c (quote): New.
8428 (print_core): Use it.
8429
8430 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
8431
8432 * src/vcg.c (complain.h): Include it.
8433 Unepitaize `return' invocations.
8434 [NDEBUG] (main): Remove.
8435 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
8436 * src/files.c (open_files): Initialize graph_obstack.
8437 * src/print_graph.c (print_actions): CPP out useless code.
8438 (print_core): Don't output the last `\n' in labels.
8439 Use `quote'.
8440 * src/files.c (output_files): Output the VCG file.
8441 * src/main.c (main): Invoke print_graph ();
8442
8443 2001-08-06 Marc Autret <autret_m@epita.fr>
8444
8445 Automaton VCG graph output.
8446 Using option ``-g'' or long option ``--graph'', you can generate
8447 a gram_filename.vcg file containing a VCG description of the LALR (1)
8448 automaton of your grammar.
8449
8450 * src/main.c: Call to print_graph() function.
8451 * src/getargs.h: Update.
8452 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
8453 (graph_flag): New flag.
8454 (longopts): Update.
8455 (getargs): Add case `g'.
8456 * src/files.c (graph_obstack): New obstack struct.
8457 (open_files): Initialize new obstack.
8458 (output_files): Saves graph_obstack if required.
8459 * src/files.h (graph_obstack): New extern declaration.
8460 * src/Makefile.am: Add new source files.
8461
8462 2001-08-06 Marc Autret <autret_m@epita.fr>
8463
8464 * src/print_graph.c, src/print_graph.h (graph): New.
8465 * src/vcg.h: New file.
8466 * src/vcg.c: New file, VCG graph handling.
8467
8468 2001-08-06 Marc Autret <autret_m@epita.fr>
8469
8470 Add of %source_extension and %header_extension which specify
8471 the source or/and the header output file extension.
8472
8473 * src/files.c (compute_base_names): Remove initialisation of
8474 src_extension and header_extension.
8475 (compute_exts_from_gf): Update.
8476 (compute_exts_from_src): Update.
8477 (output_files): Update.
8478 * src/reader.c (parse_header_extension_decl): New.
8479 (parse_source_extension_decl): New.
8480 (read_declarations): New case statements for the new tokens.
8481 * src/lex.c (percent_table): Add entries for %source_extension
8482 and %header_extension.
8483 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
8484
8485 2001-08-06 Marc Autret <autret_m@epita.fr>
8486
8487 * configure.in: Bump to 1.28c.
8488 * doc/bison.texinfo: Texinfo thingies.
8489
8490 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
8491
8492 * tests/atconfig.in (CPPFLAGS): Add.
8493 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
8494
8495 2001-08-03 Akim Demaille <akim@epita.fr>
8496
8497 Version 1.28b.
8498
8499 2001-08-03 Akim Demaille <akim@epita.fr>
8500
8501 * tests/Makefile.am (check-local): Ship testsuite.
8502 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
8503 Include `string.h'.
8504
8505 2001-08-03 Akim Demaille <akim@epita.fr>
8506
8507 * configure.in: Try using -Wformat when compiling.
8508
8509 2001-08-03 Akim Demaille <akim@epita.fr>
8510
8511 * configure.in: Bump to 1.28b.
8512
8513 2001-08-03 Akim Demaille <akim@epita.fr>
8514
8515 * src/complain.c: Adjust strerror_r portability issues.
8516
8517 2001-08-03 Akim Demaille <akim@epita.fr>
8518
8519 Version 1.28a.
8520
8521 2001-08-03 Akim Demaille <akim@epita.fr>
8522
8523 * src/getargs.c, src/getarg.h (skeleton)): Constify.
8524 * src/lex.c (literalchar): Avoid name clashes on `buf'.
8525 * src/getargs.c: Include complain.h.
8526 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
8527 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
8528
8529 2001-08-03 Akim Demaille <akim@epita.fr>
8530
8531 * src/reader.c (readgram): Display hidden chars in error messages.
8532
8533 2001-08-03 Akim Demaille <akim@epita.fr>
8534
8535 Update to gettext 0.10.39.
8536
8537 2001-08-03 Akim Demaille <akim@epita.fr>
8538
8539 * lib/strspn.c: New.
8540
8541 2001-08-01 Marc Autret <autret_m@epita.fr>
8542
8543 * doc/bison.texinfo: Update.
8544 * doc/bison.1 (mandoc): Update.
8545 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
8546 * src/files.c: Support output files extensions computing.
8547 (src_extension): New static variable.
8548 (header_extension): New static variable.
8549 (tr): New function.
8550 (get_extension_index): New function, gets the index of an extension
8551 filename in a string.
8552 (compute_exts_from_gf): New function, computes extensions from the
8553 grammar file extension.
8554 (compute_exts_from_src): New functions, computes extensions from the
8555 C source file extension, file given by ``-o'' option.
8556 (compute_base_names): Update.
8557 (output_files): Update.
8558
8559 2001-08-01 Robert Anisko <anisko_r@epita.fr>
8560
8561 * doc/bison.texi: Document @$.
8562 (Locations): New section.
8563
8564 2001-07-18 Akim Demaille <akim@epita.fr>
8565
8566 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
8567 * config/prev-version.txt, config/move-if-change: New.
8568 * Makefile.am: Adjust.
8569
8570 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
8571
8572 * src/bison.simple (yyparse): Suppress warning `comparaison
8573 between signed and unsigned'.
8574
8575 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
8576
8577 * src/getargs.h (raw_flag): Remove.
8578 * src/getargs.c: Die on `-r'/`--raw'.
8579 * src/lex.c (parse_percent_token): Die on `%raw'.
8580 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
8581 * tests/calc.at: Suppress test with option `--raw'.
8582
8583 2001-07-14 Akim Demaille <akim@epita.fr>
8584
8585 * config/: New.
8586 * configure.in: Require Autoconf 2.50.
8587 Update to gettext 0.10.38.
8588
8589 2001-03-16 Akim Demaille <akim@epita.fr>
8590
8591 * doc/bison.texinfo: ANSIfy the examples.
8592
8593 2001-03-16 Akim Demaille <akim@epita.fr>
8594
8595 * getargs.c (skeleton): New variable.
8596 (longopts): --skeleton is a new option.
8597 (shortopts, getargs): -S is a new option.
8598 * getargs.h: Declare skeleton.
8599 * output.c (output_parser): Use it.
8600
8601 2001-03-16 Akim Demaille <akim@epita.fr>
8602
8603 * m4/strerror_r.m4: New.
8604 * m4/error.m4: Run AC_FUNC_STRERROR_R.
8605 * lib/error.h, lib/error.c: Update.
8606
8607 2001-03-16 Akim Demaille <akim@epita.fr>
8608
8609 * src/getargs.c (longopts): Clean up.
8610
8611 2001-02-21 Akim Demaille <akim@epita.fr>
8612
8613 * src/reader.c (gensym): `gensym_count' is your own.
8614 Use a static buf to create the symbol name, as token_buffer is no
8615 longer a buffer.
8616
8617 2001-02-08 Akim Demaille <akim@epita.fr>
8618
8619 * src/conflicts.c (conflict_report): Be sure not to append to res
8620 between two calls, which could happen if both first sprintf were
8621 skipped, but not the first cp += strlen.
8622
8623 2001-02-08 Akim Demaille <akim@epita.fr>
8624
8625 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
8626 New, from fileutils 4.0.37.
8627 * configure.in: Require Autoconf 2.49c. I took some time before
8628 making this decision. This is the only way out for portability
8629 issues in Bison, it would mean way too much duplicate effort to
8630 import in Bison features implemented in 2.49c since 2.13.
8631 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
8632
8633 2001-02-02 Akim Demaille <akim@epita.fr>
8634
8635 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
8636 * lib/xalloc.h, lib/xmalloc.c: Update.
8637
8638 2001-01-19 Akim Demaille <akim@epita.fr>
8639
8640 Get rid of the ad hoc handling of token_buffer in the scanner: use
8641 the obstacks.
8642
8643 * src/lex.c (token_obstack): New.
8644 (init_lex): Initialize it. No longer call...
8645 (grow_token_buffer): this. Remove it.
8646 Adjust all the places which used it to use the obstack.
8647
8648 2001-01-19 Akim Demaille <akim@epita.fr>
8649
8650 * src/lex.h: Rename all the tokens:
8651 s/\bENDFILE\b/tok_eof/g;
8652 s/\bIDENTIFIER\b/tok_identifier/g;
8653 etc.
8654 Let them be enums, not #define, to ease debugging.
8655 Adjust all the code.
8656
8657 2001-01-18 Akim Demaille <akim@epita.fr>
8658
8659 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
8660 * src/lex.c (maxtoken, grow_token_buffer): Static.
8661
8662 2001-01-18 Akim Demaille <akim@epita.fr>
8663
8664 Since we now use obstacks, more % directives can be enabled.
8665
8666 * src/lex.c (percent_table): Also accept `%yacc',
8667 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
8668 `%debug'.
8669 Handle the actions for `%semantic_parser' and `%pure_parser' here,
8670 instead of returning a token.
8671 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
8672 * src/reader.c (read_declarations): Adjust.
8673 * src/files.c (open_files): Don't call `compute_base_names', don't
8674 compute `attrsfile' since they depend upon data which might be
8675 *in* the input file now.
8676 (output_files): Do it here.
8677 * src/output.c (output_headers): Document the fact that this patch
8678 introduces a guaranteed SEGV for semantic parsers.
8679 * doc/bison.texinfo: Document them.
8680 * tests/suite.at: Exercise these %options.
8681
8682 2000-12-20 Akim Demaille <akim@epita.fr>
8683
8684 Also handle the output file (--verbose) with obstacks.
8685
8686 * files.c (foutput): Remove.
8687 (output_obstack): New.
8688 Adjust all dependencies.
8689 * src/conflicts.c: Return a string.
8690 * src/system.h (obstack_grow_string): Rename as...
8691 (obstack_sgrow): this. Be ready to work with non literals.
8692 (obstack_fgrow4): New.
8693
8694 2000-12-20 Akim Demaille <akim@epita.fr>
8695
8696 * src/files.c (open_files): Fix the computation of short_base_name
8697 in the case of `-o foo.tab.c'.
8698
8699 2000-12-20 Akim Demaille <akim@epita.fr>
8700
8701 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
8702 (copy_dollar): Now that everything uses obstacks, get rid of the
8703 FILE * parameters.
8704
8705 2000-12-20 Akim Demaille <akim@epita.fr>
8706
8707 * src/files.c (open_files): Actually the `.output' file is based
8708 on the short_base_name, not base_name.
8709 * tests/suite.at (Checking output file names): Adjust.
8710
8711 2000-12-20 Akim Demaille <akim@epita.fr>
8712
8713 * src/bison.s1: Remove, we now use directly...
8714 * src/bison.simple: this.
8715 * src/Makefile.am: Use pkgdata instead of data.
8716
8717 2000-12-20 Akim Demaille <akim@epita.fr>
8718
8719 * src/files.c (guard_obstack): New.
8720 (open_files): Initialize it.
8721 (output_files): Dump it...
8722 * src/files.h: Export it.
8723 * src/reader.c (copy_guard): Use it.
8724
8725 2000-12-19 Akim Demaille <akim@epita.fr>
8726
8727 * src/files.c (outfile, defsfile, actfile): Removed as global
8728 vars.
8729 (open_files): Don't compute them.
8730 (output_files): Adjust.
8731 (base_name, short_base_name): Be global.
8732 Adjust dependencies.
8733
8734 2000-12-19 Akim Demaille <akim@epita.fr>
8735
8736 * src/files.c (strsuffix): New.
8737 (stringappend): Be just like strcat but allocate.
8738 (base_names): Eve out from open_files.
8739 Try to simplify the rather hairy computation of base_name and
8740 short_base_name.
8741 (open_files): Use it.
8742 * tests/suite.at (Checking output file names): New test.
8743
8744 2000-12-19 Akim Demaille <akim@epita.fr>
8745
8746 * src/system.h (obstack_grow_literal_string): Rename as...
8747 (obstack_grow_string): this.
8748 * src/output.c (output_parser): Recognize `%% actions' instead of
8749 `$'.
8750 * src/bison.s1: s/$/%% actions/.
8751 * src/bison.hairy: Likewise.
8752
8753 2000-12-19 Akim Demaille <akim@epita.fr>
8754
8755 * src/output.c (output_parser): Compute the `#line' lines when
8756 there are.
8757 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
8758 Suggested by Hans Aberg.
8759
8760 2000-12-19 Akim Demaille <akim@epita.fr>
8761
8762 Let the handling of the skeleton files be local to the procedures
8763 that use it.
8764
8765 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
8766 longer static.
8767 (fparser, open_extra_files): Remove.
8768 (open_files, output_files): Don't take care of fparser.
8769 * src/files.h: Adjust.
8770 * src/output.c (output_parser): Open and close the file to the
8771 skeleton.
8772 * src/reader.c (read_declarations): When %semantic_parser, open
8773 fguard.
8774
8775 2000-12-19 Akim Demaille <akim@epita.fr>
8776
8777 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
8778 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
8779
8780 2000-12-19 Akim Demaille <akim@epita.fr>
8781
8782 * src/files.c (open_files): Yipee! We no longer need all the code
8783 looking for `/tmp' since we have no tmp file.
8784
8785 2000-12-19 Akim Demaille <akim@epita.fr>
8786
8787 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
8788 New macros.
8789 * src/files.c (open_files): Less dependency on MSDOS etc.
8790
8791 2000-12-14 Akim Demaille <akim@epita.fr>
8792
8793 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
8794 Provide a default definition.
8795 Use it when executing the default @ action.
8796 * src/reader.c (reader_output_yylsp): No longer include
8797 `timestamp' and `text' in the default YYLTYPE.
8798
8799 2000-12-12 Akim Demaille <akim@epita.fr>
8800
8801 * src/reader.c (copy_definition, parse_union_decl, copy_action)
8802 (copy_guard): Quote the file names.
8803 Reported by Laurent Mascherpa.
8804
8805 2000-12-12 Akim Demaille <akim@epita.fr>
8806
8807 * src/output.c (output_headers, output_program, output): Be sure
8808 to escape special characters when outputting filenames.
8809 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
8810 (output_headers): Don't depend on them, Use ACTSTR.
8811
8812 2000-11-17 Akim Demaille <akim@epita.fr>
8813
8814 * lib/obstack.h: Formatting changes.
8815 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
8816 prevents type checking.
8817 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
8818 cast the value to (void *): assigning a `foo *' to a `void *'
8819 variable is valid.
8820 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
8821 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
8822 append characters.
8823
8824 2000-11-17 Akim Demaille <akim@epita.fr>
8825
8826 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
8827 as...
8828 (suite.m4, regression.m4, calc.m4): these.
8829 * tests/atgeneral.m4: Update from CVS Autoconf.
8830
8831 2000-11-17 Akim Demaille <akim@epita.fr>
8832
8833 * tests/regression.m4 (%union and --defines): New test,
8834 demonstrating a current bug in the obstack implementation.
8835
8836 2000-11-17 Akim Demaille <akim@epita.fr>
8837
8838 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
8839 macros.
8840 Use them to declare the variables which are global or local to
8841 `yyparse'.
8842
8843 2000-11-17 Akim Demaille <akim@epita.fr>
8844
8845 * acconfig.h: Remove, no longer used.
8846
8847 2000-11-07 Akim Demaille <akim@epita.fr>
8848
8849 * src: s/Copyright (C)/Copyright/g.
8850
8851 2000-11-07 Akim Demaille <akim@epita.fr>
8852
8853 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
8854 defining.
8855 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
8856
8857 2000-11-07 Akim Demaille <akim@epita.fr>
8858
8859 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
8860 Merge in a single CPP if/else.
8861
8862 2000-11-07 Akim Demaille <akim@epita.fr>
8863
8864 * src/output.c (output): Remove useless variables.
8865 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
8866 argument `data' for consistency with the prototypes.
8867 Qualify it `const'.
8868 (obstack_copy, obstack_copy0): Rename the second argument as
8869 `address' for consistency. Qualify it `const'.
8870 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
8871 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
8872 `const' their input argument (`data' or `address').
8873 Adjust the corresponding macros to include `const' in casts.
8874
8875 2000-11-03 Akim Demaille <akim@epita.fr>
8876
8877 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
8878 s/PFILE1/BISON_HAIRY/.
8879 Adjust dependencies.
8880
8881 2000-11-03 Akim Demaille <akim@epita.fr>
8882
8883 For some reason, this was not applied.
8884
8885 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
8886 `unlink': it's no longer used.
8887
8888 2000-11-03 Akim Demaille <akim@epita.fr>
8889
8890 * src/files.c (skeleton_find): New function, eved out of...
8891 (open_files, open_extra_files): here.
8892
8893 2000-11-03 Akim Demaille <akim@epita.fr>
8894
8895 Don't use `atexit'.
8896
8897 * src/files.c (obstack_save): New function.
8898 (done): Rename as...
8899 (output_files): this.
8900 Use `obstack_save'.
8901 * src/main.c (main): Don't use `atexit' to register `done', since
8902 it no longer has to remove tmp files, just call `output_files'
8903 when there are no errors.
8904
8905 2000-11-02 Akim Demaille <akim@epita.fr>
8906
8907 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
8908 `unlink': it's no longer used.
8909 * src/files.h: Formatting changes.
8910
8911 2000-11-02 Akim Demaille <akim@epita.fr>
8912
8913 Remove the last uses of mktemp and unlink/delete.
8914
8915 * src/files.c (fdefines, ftable): Removed.
8916 (defines_ostack, table_obstack): New.
8917 Adjust dependencies of the former into uses of the latter.
8918 * src/output.c (output_short_or_char_table, output_short_table):
8919 Convert to using obstacks.
8920 * src/reader.c (copy_comment2): Accept one FILE * and two
8921 obstacks.
8922 (output_token_defines, reader_output_yylsp): Use obstacks.
8923 * src/system.h (obstack_fgrow3): New.
8924
8925 2000-11-01 Akim Demaille <akim@epita.fr>
8926
8927 Change each use of `fattrs' into a use of `attrs_obstack'.
8928
8929 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
8930 * src/files.c (fattrs): Remove.
8931 (attrs_obstack): New.
8932 Adjust all dependencies.
8933 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
8934
8935 2000-11-01 Akim Demaille <akim@epita.fr>
8936
8937 Introduce obstacks.
8938 Change each use of `faction' into a use of `action_obstack'.
8939
8940 * lib/obstack.h, lib/obstack.c: New files.
8941 * src/files.c (faction): Remove.
8942 (action_obstack): New.
8943 Adjust all dependencies.
8944
8945 2000-10-20 Akim Demaille <akim@epita.fr>
8946
8947 * lib/quote.h (PARAMS): New macro. Use it.
8948
8949 2000-10-16 Akim Demaille <akim@epita.fr>
8950
8951 * src/output.c (output_short_or_char_table): New function.
8952 (output_short_table, output_token_translations): Use it.
8953 (goto_actions): Use output_short_table.
8954
8955 2000-10-16 Akim Demaille <akim@epita.fr>
8956
8957 * src/symtab.c (bucket_new): New function.
8958 (getsym): Use it.
8959
8960 * src/output.c (output_short_table): New argument to display the
8961 comment associated with the table.
8962 Adjust dependencies.
8963 (output_gram): Use it.
8964 (output_rule_data): Nicer output layout for YYTNAME.
8965
8966 2000-10-16 Akim Demaille <akim@epita.fr>
8967
8968 * src/lex.c (read_typename): New function.
8969 (lex): Use it.
8970 * src/reader.c (copy_dollar): Likewise.
8971
8972 2000-10-16 Akim Demaille <akim@epita.fr>
8973
8974 * src/reader.c (copy_comment2): Expect the input stream to be on
8975 the `/' which is suspected to open a comment, instead of being
8976 called after `//' or `/*' was read.
8977 (copy_comment, copy_definition, parse_union_decl, copy_action)
8978 (copy_guard): Adjust.
8979
8980 2000-10-16 Akim Demaille <akim@epita.fr>
8981
8982 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
8983 `read_signed_integer'.
8984
8985 2000-10-16 Akim Demaille <akim@epita.fr>
8986
8987 * src/reader.c (copy_dollar): New function.
8988 (copy_guard, copy_action): Use it.
8989
8990 2000-10-16 Akim Demaille <akim@epita.fr>
8991
8992 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
8993 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
8994 New files, from Fileutils 4.0.27.
8995 * src/main.c (printable_version): Remove.
8996 * src/lex.c, src/reader.c: Use `quote'.
8997
8998 2000-10-04 Akim Demaille <akim@epita.fr>
8999
9000 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
9001
9002 2000-10-04 Akim Demaille <akim@epita.fr>
9003
9004 * doc/bison.texinfo: Various typos spotted by Neil Booth.
9005
9006 2000-10-04 Akim Demaille <akim@epita.fr>
9007
9008 When a literal string is used to define two different tokens,
9009 `bison -v' segfaults.
9010 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
9011
9012 * tests/regression.m4: New file.
9013 Include the core of the sample provided by Piotr Gackiewicz.
9014 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
9015 properly.
9016
9017 2000-10-04 Akim Demaille <akim@epita.fr>
9018
9019 * src/reader.c (parse_expect_decl): Keep `count' within the size
9020 of `buffer'.
9021 From Neil Booth.
9022
9023 2000-10-02 Paul Eggert <eggert@twinsun.com>
9024
9025 * bison.s1 (yyparse): Assign the default value
9026 unconditionally, to avoid a GCC warning and make the parser a
9027 tad smaller.
9028
9029 2000-10-02 Akim Demaille <akim@epita.fr>
9030
9031 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
9032 options.
9033
9034 2000-10-02 Akim Demaille <akim@epita.fr>
9035
9036 * src/derives.c, src/print.c, src/reduce.c: To ease the
9037 translation, move some `\n' out of the translated strings.
9038
9039 2000-10-02 Akim Demaille <akim@epita.fr>
9040
9041 The location tracking mechanism is precious for parse error
9042 messages. Nevertheless, it is enabled only when `@n' is used in
9043 the grammar, which is a different issue (you can use it in error
9044 message, but not in the grammar per se). Therefore, there should
9045 be another means to enable it.
9046
9047 * src/getargs.c (getargs): Support `--locations'.
9048 (usage): Report it.
9049 * src/getargs.h (locationsflag): Export it.
9050 * src/lex.c (percent_table): Support `%locations'.
9051 * src/reader.c (yylsp_needed): Remove this variable, now replaced
9052 with `locationsflag'.
9053 * doc/bison.texinfo: Document `--locations' and `%locations'.
9054 Sort the options.
9055 * tests/calc.m4: Test it.
9056
9057 For regularity of the names, replace each
9058 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
9059 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
9060 In addition replace each `flag' with `_flag'.
9061
9062 2000-10-02 Akim Demaille <akim@epita.fr>
9063
9064 Also test parse error messages, including with YYERROR_VERBOSE.
9065
9066 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
9067 associative).
9068 Use it to check the computations.
9069 Use it to check `nonassoc' is honored.
9070 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
9071 `--yyerror-verbose'.
9072 (_AT_CHECK_CALC): Adjust to this option.
9073 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
9074
9075 2000-10-02 Akim Demaille <akim@epita.fr>
9076
9077 Test also `--verbose', `--defines' and `--name-prefix'. Testing
9078 the latter demonstrates a flaw in the handling of non debugging
9079 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
9080 was used in order to simplify:
9081
9082 #if YYDEBUG
9083 if (yydebug)
9084 {
9085 ...
9086 }
9087 #endif
9088
9089 into
9090
9091 if (yydebug)
9092 {
9093 ...
9094 }
9095
9096 unfortunately this leads to a CPP conflict when
9097 `--name-prefix=foo' is used since it produces `#define yydebug
9098 foodebug'.
9099
9100 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
9101 (YYDPRINTF): New macro.
9102 Spread its use.
9103 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
9104 the bison options.
9105 Also test `--verbose', `--defines' and `--name-prefix'.
9106
9107 2000-10-02 Akim Demaille <akim@epita.fr>
9108
9109 Improve the readability of the produced parsers.
9110
9111 * src/bison.s1: Formatting changes.
9112 Improve the comment related to the `$' mark.
9113 (yydefault): Don't fall through to `yyresume': `goto' there.
9114 * src/output.c (output_parser): When the `$' is met, skip the end
9115 of its line.
9116 New variable, `number_of_dollar_signs', to check there's exactly
9117 one `$' in the parser skeleton.
9118
9119 2000-10-02 Akim Demaille <akim@epita.fr>
9120
9121 * lib/xstrdup.c: New file, from the fileutils.
9122 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
9123 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
9124 instead of strlen + xmalloc + strcpy.
9125 * src/symtab.c (copys): Remove, use xstrdup instead.
9126
9127 2000-10-02 Akim Demaille <akim@epita.fr>
9128
9129 * src/gram.h (associativity): New enum type which replaces the
9130 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
9131 `right_assoc', `left_assoc' and `non_assoc'.
9132 Adjust all dependencies.
9133 * src/reader.c: Formatting changes.
9134 (LTYPESTR): Don't define it, use it as a literal in
9135 `reader_output_yylsp'.
9136 * src/symtab.h (symbol_class): New enum type which replaces the
9137 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
9138 `sunknown', `stoken and `snterm'.
9139
9140 2000-10-02 Akim Demaille <akim@epita.fr>
9141
9142 * src/getargs.c (fixed_outfiles): Rename as...
9143 (yaccflag): for consistency and accuracy.
9144 Adjust dependencies.
9145
9146 2000-10-02 Akim Demaille <akim@epita.fr>
9147
9148 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
9149 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
9150 difficult and introduced a lot of core dump. It turns out that
9151 Bison used an implementation of `xmalloc' based on `calloc', and
9152 at various places it does depend upon the initialization to 0. I
9153 have not tried to isolate the pertinent places, and all the former
9154 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
9155 someone should address this issue.
9156
9157 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
9158 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
9159 files.
9160 Adjust dependencies.
9161 * src/warshall.h: New file.
9162 Propagate.
9163
9164 2000-10-02 Akim Demaille <akim@epita.fr>
9165
9166 Various anti-`extern in *.c' changes.
9167
9168 * src/system.h: Include `assert.h'.
9169
9170 2000-10-02 Akim Demaille <akim@epita.fr>
9171
9172 * src/state.h (nstates, final_state, first_state, first_shift)
9173 (first_reduction): Move their exportation from here...
9174 * src/LR0.h: to here.
9175 Adjust dependencies.
9176 * src/getargs.c (statisticsflag): New variable.
9177 Add support for `--statistics'.
9178 Adjust dependencies.
9179
9180 Remove a lot of now useless `extern' statements in most files.
9181
9182 2000-10-02 Akim Demaille <akim@epita.fr>
9183
9184 * src/LR0.h: New file.
9185 Propagate its use.
9186
9187 2000-10-02 Akim Demaille <akim@epita.fr>
9188
9189 * src/print.h: New file.
9190 Propagate its use.
9191 * src/print.c: Formatting and ordering changes.
9192 (verbose, terse): Replace with...
9193 (print_results): this new function.
9194 Adjust dependencies.
9195
9196 2000-10-02 Akim Demaille <akim@epita.fr>
9197
9198 * src/conflicts.c (conflict_report): New function.
9199 (conflict_log, verbose_conflict_log): Replace with...
9200 (print_conflicts): this function.
9201 Adjust dependencies.
9202 * src/conflicts.h: New file.
9203 Propagate its inclusion.
9204
9205 2000-10-02 Akim Demaille <akim@epita.fr>
9206
9207 * src/nullable.h: New file.
9208 Propagate its inclusion.
9209 * src/nullable.c: Formatting changes.
9210
9211 2000-10-02 Akim Demaille <akim@epita.fr>
9212
9213 * src/reduce.h: New file.
9214 Propagate its inclusion.
9215 * src/reduce.c: Topological sort and other formatting changes.
9216 (bool, TRUE, FALSE): Move their definition to...
9217 * src/system.h: here.
9218
9219 2000-10-02 Akim Demaille <akim@epita.fr>
9220
9221 * src/files.c: Formatting changes.
9222 (tryopen, tryclose, openfiles): Rename as...
9223 (xfopen, xfclose, open_files): this.
9224 (stringappend): static.
9225 * src/files.h: Complete the list of exported symbols.
9226 Propagate its use.
9227
9228 2000-10-02 Akim Demaille <akim@epita.fr>
9229
9230 * src/reader.h: New file.
9231 Propagate its use instead of tedious list of `extern' and
9232 prototypes.
9233 * src/reader.c: Formatting changes, topological sort,
9234 s/register//.
9235
9236 2000-10-02 Akim Demaille <akim@epita.fr>
9237
9238 * src/lex.h: Prototype `lex.c' exported functions.
9239 * src/reader.c: Adjust.
9240 * src/lex.c: Formatting changes.
9241 (safegetc): Rename as...
9242 (xgetc): this.
9243
9244 2000-10-02 Akim Demaille <akim@epita.fr>
9245
9246 * src/lalr.h: New file.
9247 Propagate its inclusion instead of prototypes and `extern'.
9248 * src/lalr.c: Formatting changes, topological sorting etc.
9249
9250 2000-10-02 Akim Demaille <akim@epita.fr>
9251
9252 * src/output.c (token_actions): Introduce a temporary array,
9253 YYDEFACT, that makes it possible for this function to use
9254 output_short_table.
9255
9256 2000-10-02 Akim Demaille <akim@epita.fr>
9257
9258 `user_toknums' is output as a `short[]' in `output.c', while it is
9259 defined as a `int[]' in `reader.c'. For consistency with the
9260 other output tables, `user_toknums' is now defined as a table of
9261 shorts.
9262
9263 * src/reader.c (user_toknums): Be a short table instead of an int
9264 table.
9265 Adjust dependencies.
9266
9267 Factor the short table outputs.
9268
9269 * src/output.c (output_short_table): New function.
9270 * src/output.c (output_gram, output_stos, output_rule_data)
9271 (output_base, output_table, output_check): Use it.
9272
9273 2000-10-02 Akim Demaille <akim@epita.fr>
9274
9275 * src/output.c (output): Topological sort of the functions, in
9276 order to get rid of the `static' prototypes.
9277 No longer use `register'.
9278 * src/output.h: New file.
9279 Propagate its inclusion in files explicitly prototyping functions
9280 from output.c.
9281
9282 2000-09-21 Akim Demaille <akim@epita.fr>
9283
9284 * src/atgeneral.m4: Update from Autoconf.
9285
9286 2000-09-21 Akim Demaille <akim@epita.fr>
9287
9288 * src/closure.h: New file.
9289 * src/closure.c: Formatting changes, topological sort over the
9290 functions, use of closure.h.
9291 (initialize_closure, finalize_closure): Rename as...
9292 (new_closure, free_closure): these. Adjust dependencies.
9293 * src/LR0.c: Formatting changes, topological sort, use of
9294 cloture.h.
9295 (initialize_states): Rename as...
9296 (new_states): this.
9297 * src/Makefile.am (noinst_HEADERS): Adjust.
9298
9299 2000-09-20 Akim Demaille <akim@epita.fr>
9300
9301 * src/acconfig.h: Don't protect config.h against multiple
9302 inclusion.
9303 Don't define PARAMS.
9304 * src/system.h: Define PARAMS.
9305 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
9306 purpose of config.h. system.h must not try to fix wrong
9307 definitions in config.h.
9308
9309 2000-09-20 Akim Demaille <akim@epita.fr>
9310
9311 * src/derives.h: New file.
9312 * src/main.c, src/derives.h: Use it.
9313 Formatting changes.
9314 * src/Makefile.am (noinst_HEADERS): Adjust.
9315
9316 2000-09-20 Akim Demaille <akim@epita.fr>
9317
9318 * tests/atgeneral.m4: Update from Autoconf.
9319 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
9320 (AT_CHECK_CALC): New macros.
9321 Use these macros to test bison with options `', `--raw',
9322 `--debug', `--yacc', `--yacc --debug'.
9323
9324 2000-09-19 Akim Demaille <akim@epita.fr>
9325
9326 * src/output.c: Formatting changes.
9327 * src/machine.h: Remove, leaving its contents in...
9328 * src/system.h: here.
9329 Include stdio.h.
9330 Adjust all dependencies on stdio.h and machine.h.
9331 * src/getargs.h: New file.
9332 Let all `extern' declarations about getargs.c be replaced with
9333 inclusion of `getargs.h'.
9334 * src/Makefile.am (noinst_HEADERS): Adjust.
9335
9336 * tests/calc.m4 (yyin): Be initialized in main, not on the global
9337 scope.
9338 (yyerror): Returns void, not int.
9339 * doc/bison.texinfo: Formatting changes.
9340
9341 2000-09-19 Akim Demaille <akim@epita.fr>
9342
9343 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
9344 portable.
9345
9346 2000-09-18 Akim Demaille <akim@epita.fr>
9347
9348 * configure.in: Append WARNING_CFLAGS to CFLAGS.
9349 * src/Makefile.am (INCLUDES): Don't.
9350 Be ready to fetch headers in lib/.
9351
9352 2000-09-18 Akim Demaille <akim@epita.fr>
9353
9354 * doc/bison.texinfo: Update the copyright.
9355 ANSIfy and GNUify the examples.
9356 Remove the old menu.
9357
9358 2000-09-18 Akim Demaille <akim@epita.fr>
9359
9360 First set of tests: use the `calc' example from the documentation.
9361
9362 * src/bison.s1 (yyparse): Condition the code using `yytname' which
9363 is defined only when YYDEBUG is.
9364 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
9365 * src/files.c (tryopen, tryclose): Formatting changes.
9366 Move to the top and be static.
9367 * src/reader.c (read_signed_integer): Likewise.
9368 * tests/calc.m4: New file.
9369 * Makefile.am, suite.m4: Adjust.
9370 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
9371
9372 2000-09-18 Akim Demaille <akim@epita.fr>
9373
9374 Add support for an Autotest test suite for Bison.
9375
9376 * m4/m4.m4, m4/atconfig.m4: New files.
9377 * m4/Makefile.am (EXTRA_DIST): Adjust.
9378 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
9379 files.
9380 * src/getargs.c: Display a more standard --version message.
9381 * src/reader.c (reader): Formatting changes.
9382 No longer depend upon VERSION_STRING.
9383 * configure.in: No longer use `dnl'.
9384 Set up the test suite and the new directory `tests/.
9385 (VERSION_STRING): Remove.
9386
9387 2000-04-14 Akim Demaille <akim@epita.fr>
9388
9389 * src/reader.c (copy_comment2): New function, same as former
9390 `copy_comment', but outputs into two FILE *.
9391 (copy_comment): Use it.
9392 (parse_union_decl): Use it.
9393 (get_type, parse_start_decl): Use the same `invalid' message.
9394 (parse_start_decl, parse_union_decl): Use the same `multiple'
9395 message.
9396 (parse_union_decl, copy_guard, copy_action): Use the same
9397 `unmatched' message.
9398 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
9399
9400 2000-03-31 Akim Demaille <akim@epita.fr>
9401
9402 * src/files.c (tryopen, tryclose): Move to the top.
9403 Be static.
9404
9405 2000-03-31 Akim Demaille <akim@epita.fr>
9406
9407 * src/main.c (main): Don't call `done', exit does it.
9408
9409 2000-03-31 Akim Demaille <akim@epita.fr>
9410
9411 * allocate.c: s/return (foo)/return foo/.
9412 * lalr.c: Likewise.
9413 * LR0.c: Likewise.
9414 * output.c: Likewise.
9415 * reader.c: Likewise.
9416 * symtab.c: Likewise.
9417 * vmsgetargs.c: Likewise.
9418
9419 2000-03-31 Akim Demaille <akim@epita.fr>
9420
9421 Clean up the error reporting functions.
9422
9423 * src/report.c: New file.
9424 * src/report.h: Likewise.
9425 * src/Makefile.am: Adjust.
9426 * m4/error.m4: New file.
9427 * m4/Makefile.am: Adjust.
9428 * configure.in (jm_PREREQ_ERROR): Call it.
9429 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
9430 Remove.
9431 (fatal, fatals): Remove. All callers use complain.c::fatal.
9432 (warn, warni, warns, warnss, warnss): Remove. All callers use
9433 complain.c::complain.
9434 (toomany): Remove, use fatal instead.
9435 * src/files.c (done): No argument, use complain_message_count.
9436 * src/main.c (main): Register `done' to `atexit'.
9437
9438 * src/getargs.c (usage): More `fputs', less `fprintf'.
9439
9440 2000-03-28 Akim Demaille <akim@epita.fr>
9441
9442 * lib/: New directory.
9443 * Makefile.am (SUBDIRS): Adjust.
9444 * configure.in: Adjust.
9445 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
9446 useless.
9447 * src/alloca.c: Moved to lib/.
9448 * src/getopt.c: Likewise.
9449 * src/getopt1.c: Likewise.
9450 * src/getopt.h: Likewise.
9451 * src/ansi2knr.c: Likewise.
9452 * src/ansi2knr.1: Likewise.
9453 * src/Makefile.am: Adjust.
9454 * lib/Makefile.am: New file.
9455
9456 2000-03-28 Akim Demaille <akim@epita.fr>
9457
9458 * src/getargs.c (usage): Refresh the help message.
9459
9460 2000-03-17 Akim Demaille <akim@epita.fr>
9461
9462 * src/getopt1.c: Updated from textutils 2.0e
9463 * src/getopt.c: Likewise.
9464 * src/getopt.h: Likewise.
9465
9466 2000-03-17 Akim Demaille <akim@epita.fr>
9467
9468 * src/Makefile.am (bison.simple): Fix the awk program: quote only
9469 the file name, not the whole `#line LINE FILE'.
9470
9471 2000-03-17 Akim Demaille <akim@epita.fr>
9472
9473 On syntax errors, report the token on which we choked.
9474
9475 * src/bison.s1 (yyparse): In the label yyerrlab, when
9476 YYERROR_VERBOSE, add yychar in msg.
9477
9478 2000-03-17 Akim Demaille <akim@epita.fr>
9479
9480 * src/reader.c (copy_at): New function.
9481 (copy_guard): Use it.
9482 (copy_action): Use it.
9483
9484 2000-03-17 Akim Demaille <akim@epita.fr>
9485
9486 Be kind to translators, save some useless translations.
9487
9488 * src/main.c (banner): New function.
9489 (fatal_banner): Use it.
9490 (warn_banner): Use it.
9491
9492 2000-03-17 Akim Demaille <akim@epita.fr>
9493
9494 * src/reader.c (copy_definition): Use copy_string and
9495 copy_comment. Removed now unused `match', `ended',
9496 `cplus_comment'.
9497 (copy_comment, copy_string): Moved, to be visible from
9498 copy_definition.
9499
9500 2000-03-17 Akim Demaille <akim@epita.fr>
9501
9502 * src/reader.c (copy_string): Declare `static inline'. No
9503 problems with inline, since it is checked by configure.
9504 (copy_comment): Likewise.
9505
9506 2000-03-17 Akim Demaille <akim@epita.fr>
9507
9508 * src/reader.c (packsymbols): Formatting changes.
9509
9510 2000-03-17 Akim Demaille <akim@epita.fr>
9511
9512 * src/reader.c (copy_comment): New function, factored out from:
9513 (copy_action): Use it. Removed now unused `match', `ended',
9514 `cplus_comment'.
9515 (copy_guard): Likewise.
9516
9517 2000-03-17 Akim Demaille <akim@epita.fr>
9518
9519 * src/reader.c (copy_string): New function, factored out from:
9520 (copy_action): Use it.
9521 (copy_guard): Likewise.
9522
9523 2000-03-17 Akim Demaille <akim@epita.fr>
9524
9525 Change the handling of @s so that they behave exactly like $s.
9526 There is now a pseudo variable @$ (readble and writable), location
9527 of the lhs of the rule (by default ranging from the location of
9528 the first symbol of the rhs, to the location of the last symbol,
9529 or, if the rhs is empty, YYLLOC).
9530
9531 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
9532 yyval.
9533 (yyparse): When providing a default semantic action, provide a
9534 default location action.
9535 (after the $): No longer change `*YYLSP', just stack YYLOC the
9536 same way you stack YYVAL.
9537 * src/reader.c (read_declarations): Use warns.
9538 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
9539 (copy_action, case '@'): Likewise.
9540 Use a standard error message, to save useless work from
9541 translators.
9542
9543 2000-03-17 Akim Demaille <akim@epita.fr>
9544
9545 * src/bison.s1: Formatting and cosmetics changes.
9546 * src/reader.c: Likewise.
9547 Update the Copyright notice.
9548
9549 2000-03-17 Akim Demaille <akim@epita.fr>
9550
9551 * src/bison.s1 (#line): All set to `#line' only, since the
9552 Makefile now handles them.
9553
9554 2000-03-16 Akim Demaille <akim@epita.fr>
9555
9556 * src/output.c (output_rule_data): Output the documentation of
9557 some of the tables.
9558 (Copyright notice): Update.
9559 Formatting changes.
9560
9561 2000-03-16 Akim Demaille <akim@epita.fr>
9562
9563 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
9564 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
9565 One `#if YYDEBUG' remains, since it uses variables which are
9566 defined only if `YYDEBUG != 0'.
9567
9568 2000-03-16 Akim Demaille <akim@epita.fr>
9569
9570 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
9571 and related variables so that the similarities are highlighted.
9572
9573 2000-03-16 Akim Demaille <akim@epita.fr>
9574
9575 * src/bison.s1: Properly indent CPP directives.
9576
9577 2000-03-16 Akim Demaille <akim@epita.fr>
9578
9579 * src/bison.s1: Properly indent the `alloca' CPP section.
9580
9581 2000-03-16 Akim Demaille <akim@epita.fr>
9582
9583 Do not hard code values of directories in `configure.in'.
9584 Update the `configure' tool chain.
9585
9586 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
9587 src/makefile.am.
9588 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
9589 (AC_OUTPUT): Add m4/Makefile.
9590 Bump to bison 1.28a, 1.29 has never been released.
9591 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
9592 handled via src/Makefile.am.
9593 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
9594 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
9595 autoheader.
9596 * Makefile.am (SUBDIRS): Add m4.
9597 (ACLOCAL_AM_FLAGS): New variable.
9598 (AUTOMAKE_OPTIONS): Add check-news.
9599 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
9600 the proper line number and file name.
9601 (DEFS): Propagate the location of bison library files and of the
9602 locale files.
9603 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
9604 builddir.
9605 * acinclude.m4: Remove, replaced by the directory m4.
9606 * m4/Makefile.am (EXTRA_DIST): New variable.
9607 * m4/gettext.m4: New file, from the fileutils.
9608 * m4/lcmessage.m4: Likewise
9609 * m4/progtest.m4: Likewise.
9610 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
9611
9612 2000-03-10 Akim Demaille <akim@epita.fr>
9613
9614 * src/closure.c:
9615 Formatting changes of various comments.
9616 Respect the GNU coding standards at various places.
9617 Don't use `_()' when no translation is needed.
9618
9619 1999-12-13 Jesse Thilo <jthilo@gnu.org>
9620
9621 * src/files.c:
9622 OS/2 honors TMPDIR environment variable.
9623
9624 1999-12-13 Jesse Thilo <jthilo@gnu.org>
9625
9626 * doc/bison.texinfo: Tweaked spelling and grammar.
9627 Updated ISBN.
9628 Removed reference to price of printed copy.
9629 Mention BISON_SIMPLE and BISON_HAIRY.
9630
9631 1999-12-13 Jesse Thilo <jthilo@gnu.org>
9632
9633 * configure.in, NEWS:
9634 Bison 1.29 released.
9635
9636 1999-10-27 Jesse Thilo <jthilo@gnu.org>
9637
9638 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
9639 Added reference card.
9640
9641 1999-07-26 Jesse Thilo <jthilo@gnu.org>
9642
9643 * po/ru.po: Added Russian translation.
9644
9645 1999-07-26 Jesse Thilo <jthilo@gnu.org>
9646
9647 * configure.in: Added Russian translation.
9648
9649 1999-07-06 Jesse Thilo <jthilo@gnu.org>
9650
9651 * configure.in, NEWS, README:
9652 Released version 1.28.
9653
9654 1999-06-14 Jesse Thilo <jthilo@gnu.org>
9655
9656 * src/system.h:
9657 Squashed redefinition warning on some systems.
9658
9659 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
9660 Have configure build version string instead of relying on ANSI string
9661 concatentation.
9662
9663 1999-06-14 Jesse Thilo <jthilo@gnu.org>
9664
9665 * po/POTFILES.in: Got rid of version.c.
9666
9667 1999-06-14 Jesse Thilo <jthilo@gnu.org>
9668
9669 * acconfig.h, configure.in:
9670 Have configure build version string instead of relying on ANSI string
9671 concatentation.
9672
9673 1999-06-08 Jesse Thilo <jthilo@gnu.org>
9674
9675 * doc/bison.1:
9676 Dropped mention of `+' for long-named options.
9677
9678 1999-05-30 Jesse Thilo <jthilo@gnu.org>
9679
9680 * src/files.c: Added <unistd.h> for unlink().
9681
9682 * src/Makefile.am, src/system.h:
9683 I18n fixes.
9684
9685 1999-05-30 Jesse Thilo <jthilo@gnu.org>
9686
9687 * README: Added a FAQ list.
9688
9689 * configure.in, acconfig.h:
9690 I18n fixes.
9691
9692 1999-05-30 Jesse Thilo <jthilo@gnu.org>
9693
9694 * doc/FAQ, doc/Makefile.am:
9695 Added a FAQ list.
9696
9697 1999-05-19 Jesse Thilo <jthilo@gnu.org>
9698
9699 * src/alloc.h, src/symtab.h, src/version.c:
9700 Protected inclusion of "config.h" with HAVE_CONFIG_H.
9701
9702 1999-04-18 Jesse Thilo <jthilo@gnu.org>
9703
9704 * src/.cvsignore, src/Makefile.am:
9705 Reorganized: sources in `src', documentation in `doc'.
9706
9707 * src/lex.c (literalchar):
9708 fixed the code for escaping double quotes (thanks
9709 Jonathan Czisny.)
9710
9711 1999-04-18 Jesse Thilo <jthilo@gnu.org>
9712
9713 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
9714 Adjusted paths to reflect directory reorganization.
9715
9716 1999-04-18 Jesse Thilo <jthilo@gnu.org>
9717
9718 * doc/.cvsignore, doc/Makefile.am:
9719 Reorganized: sources in `src', documentation in `doc'.
9720
9721 1999-04-18 Jesse Thilo <jthilo@gnu.org>
9722
9723 * configure.in:
9724 Updated AC_INIT file to reflect directory reorganization.
9725
9726 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
9727 Reorganized: sources in `src', documentation in `doc'.
9728
9729 1999-04-13 Jesse Thilo <jthilo@gnu.org>
9730
9731 * src/allocate.c:
9732 Don't declare calloc() and realloc() if not necessary.
9733
9734 1999-04-13 Jesse Thilo <jthilo@gnu.org>
9735
9736 * configure.in, acconfig.h, acinclude.m4:
9737 Don't declare calloc() and realloc() if not necessary.
9738
9739 1999-03-23 Jesse Thilo <jthilo@gnu.org>
9740
9741 * po/.cvsignore: Added i18n support.
9742
9743 1999-03-23 Jesse Thilo <jthilo@gnu.org>
9744
9745 * acconfig.h, configure.in, Makefile.am:
9746 Added i18n support.
9747
9748 1999-03-22 Jesse Thilo <jthilo@gnu.org>
9749
9750 * src/bison.s1: Fixed #line numbers.
9751
9752 1999-03-15 Jesse Thilo <jthilo@gnu.org>
9753
9754 * po/es.po, po/fr.po, po/nl.po, po/de.po:
9755 Added PO files from Translation Project.
9756
9757 1999-03-03 Jesse Thilo <jthilo@gnu.org>
9758
9759 * Makefile.am:
9760 Added support for non-ANSI compilers (ansi2knr).
9761
9762 1999-02-16 Jesse Thilo <jthilo@gnu.org>
9763
9764 * configure.in: Bumped version number to 1.27.
9765
9766 * Makefile.am:
9767 Added `bison.simple' to list of files removed by `make distclean'.
9768
9769 1999-02-12 Jesse Thilo <jthilo@gnu.org>
9770
9771 * src/files.c, src/files.h:
9772 Defined locations of parser files in config.h instead of Makefile.
9773
9774 1999-02-12 Jesse Thilo <jthilo@gnu.org>
9775
9776 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
9777 Defined locations of parser files in config.h instead of Makefile.
9778
9779 1999-02-09 Jesse Thilo <jthilo@gnu.org>
9780
9781 * Makefile.am:
9782 Removed inappropriate use of $< macro.
9783
9784 1999-02-05 Jesse Thilo <jthilo@gnu.org>
9785
9786 * po/Makefile.in.in, po/POTFILES.in:
9787 Add `po' directory skeleton.
9788
9789 1999-01-27 Jesse Thilo <jthilo@gnu.org>
9790
9791 * README: Document help-bison list.
9792
9793 * configure.in: Add check for mkstemp().
9794
9795 1999-01-20 Jesse Thilo <jthilo@gnu.org>
9796
9797 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
9798 Hush a few compiler warnings.
9799
9800 * src/files.c:
9801 Add tryclose(), which verifies that fclose was successful.
9802 Hush a couple of compiler warnings.
9803
9804 1999-01-20 Jesse Thilo <jthilo@gnu.org>
9805
9806 * Makefile.am, OChangeLog:
9807 ChangeLog is now automatically generated. Include the old version as
9808 OChangeLog.
9809
9810 1999-01-14 Jesse Thilo <jthilo@gnu.org>
9811
9812 * src/gram.h, src/lalr.c, src/lex.c, src/lex.h, src/machine.h, src/main.c, src/nullable.c, src/output.c, src/print.c, src/reader.c, src/reduce.c, src/state.h, src/symtab.c, src/symtab.h, src/types.h, src/vmsgetargs.c, src/warshall.c, src/allocate.c, src/alloc.h, src/bison.s1, src/closure.c, src/conflicts.c, src/derives.c, src/files.c, src/files.h, src/getargs.c, src/gram.c, src/LR0.c:
9813 Update FSF address.
9814
9815 1999-01-14 Jesse Thilo <jthilo@gnu.org>
9816
9817 * doc/bison.texinfo: Fix formatting glitch.
9818
9819 * doc/bison.texinfo: Update FSF address.
9820
9821 1999-01-14 Jesse Thilo <jthilo@gnu.org>
9822
9823 * acconfig.h: Update FSF address.
9824
9825 1999-01-08 Jesse Thilo <jthilo@gnu.org>
9826
9827 * src/system.h:
9828 Don't define PACKAGE here, since config.h defines it.
9829
9830 1998-12-30 Jesse Thilo <jthilo@gnu.org>
9831
9832 * src/reader.c: Update copyright date.
9833
9834 * src/main.c:
9835 Ditch sprintf to statically-sized buffers in fatal/warn functions in
9836 favor of output directly to stderr (avoids buffer overruns).
9837
9838 * src/reader.c: Some checks for premature EOF.
9839
9840 * src/allocate.c, src/alloc.h, src/closure.c, src/conflicts.c, src/derives.c, src/getargs.c, src/gram.c, src/lalr.c, src/lex.c, src/LR0.c, src/main.c, src/nullable.c, src/output.c, src/print.c, src/reduce.c, src/symtab.c, src/symtab.h, src/warshall.c:
9841 Use prototypes if the compiler understands them.
9842
9843 * src/files.c: Honor TMPDIR on Unix hosts.
9844 Use prototypes if the compiler understands them.
9845
9846 * src/reader.c:
9847 Fix a couple of buffer overrun bugs.
9848 Use prototypes if the compiler understands them.
9849
9850 * src/system.h: Include unistd.h and ctype.h.
9851 Use #ifdef instead of #if for NLS symbols.
9852
9853 1998-12-30 Jesse Thilo <jthilo@gnu.org>
9854
9855 * doc/bison.texinfo:
9856 Delete comment "consider using @set for edition number, etc..." since
9857 we now are doing so.
9858
9859 1998-12-30 Jesse Thilo <jthilo@gnu.org>
9860
9861 * configure.in:
9862 Use prototypes if the compiler understands them.
9863
9864 * NEWS: Document 1.26 highlights.
9865
9866 * Makefile.am: Require Automake 1.3 or later.
9867
9868 * acconfig.h:
9869 Use prototypes if the compiler understands them.
9870
9871 1998-12-29 Jesse Thilo <jthilo@gnu.org>
9872
9873 * src/version.c:
9874 Use VERSION symbol from automake for version number.
9875
9876 1998-12-29 Jesse Thilo <jthilo@gnu.org>
9877
9878 * acconfig.h, configure.in, version.cin:
9879 Use VERSION symbol from automake for version number.
9880
9881 1998-11-28 Jesse Thilo <jthilo@gnu.org>
9882
9883 * Makefile.am:
9884 Distribute original version of simple parser (bison.s1), not built
9885 version (bison.simple).
9886
9887 1998-11-28 Jesse Thilo <jthilo@gnu.org>
9888
9889 * doc/bison.texinfo: Add info dir entry.
9890
9891 * doc/bison.texinfo:
9892 Let automake put version number into documentation.
9893
9894 1998-11-26 Jesse Thilo <jthilo@gnu.org>
9895
9896 * src/bison.cld, src/build.com, src/vmshlp.mar:
9897 Add non-RCS files from /gd/gnu/bison.
9898
9899 1998-11-26 Jesse Thilo <jthilo@gnu.org>
9900
9901 * doc/bison.1:
9902 Document the BISON_HAIRY and BISON_SIMPLE variables.
9903
9904 1998-11-25 Jesse Thilo <jthilo@gnu.org>
9905
9906 * src/version.c: Build version.c automatically.
9907
9908 * src/reader.c:
9909 Fix token numbering (used to start at 258, not 257).
9910
9911 * src/system.h: Include config.h.
9912
9913 * src/getargs.c: Update bug report address.
9914
9915 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
9916 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
9917
9918 1998-11-25 Jesse Thilo <jthilo@gnu.org>
9919
9920 * Makefile.am:
9921 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
9922
9923 * configure.in, version.cin:
9924 Build version.c automatically.
9925
9926 * AUTHORS: Add AUTHORS file.
9927
9928 * README: Update bug report address.
9929
9930 * bison.simple:
9931 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
9932
9933 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
9934 Add automake stuff.
9935
9936 1998-11-25 Jesse Thilo <jthilo@gnu.org>
9937
9938 * doc/bison.texinfo: Clean up some formatting.
9939
9940 1998-05-05 Richard Stallman <rms@gnu.org>
9941
9942 * doc/bison.texinfo:
9943 Explain better why to make a pure parser.
9944
9945 1998-01-05 Richard Stallman <rms@gnu.org>
9946
9947 * src/files.c (openfiles):
9948 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
9949 find a temporary directory, if possible. Do not unlink files while
9950 they are open.
9951
9952 1997-08-25 Richard Stallman <rms@gnu.org>
9953
9954 * src/reader.c (stack_offset;):
9955 Change some warni to warns.
9956
9957 * src/lex.c (literalchar): Use warns, not warni.
9958
9959 1997-06-28 Richard Stallman <rms@gnu.org>
9960
9961 * src/bison.s1: Add a Bison version comment.
9962
9963 * src/main.c (fatal, warn, berror):
9964 Use program_name.
9965
9966 1997-06-28 Richard Stallman <rms@gnu.org>
9967
9968 * Makefile.in (bison_version): New variable.
9969 (dist): Use that variable.
9970 (bison.s1): Substitute the Bison version into bison.simple.
9971
9972 * bison.simple: Add a Bison version comment.
9973
9974 1997-06-18 Richard Stallman <rms@gnu.org>
9975
9976 * src/main.c (fatal, warn, berror):
9977 Make error messages standard.
9978 (toomany): Improve error message text.
9979
9980 * src/LR0.c, src/closure.c, src/conflicts.c, src/derives.c, src/files.c, src/lalr.c, src/lex.c, src/nullable.c, src/output.c, src/print.c, src/reader.c, src/reduce.c, src/symtab.c:
9981 new.h renamed to alloc.h.
9982
9983 1997-06-18 Richard Stallman <rms@gnu.org>
9984
9985 * Makefile.in: new.h renamed to alloc.h.
9986
9987 1997-05-24 Richard Stallman <rms@gnu.org>
9988
9989 * src/lex.c (literalchar):
9990 Fix the code for escaping \, " and '.
9991
9992 (lex): Avoid trouble when there are many chars
9993 to discard in a char literal with just several chars in it.
9994
9995 1997-05-17 Richard Stallman <rms@gnu.org>
9996
9997 * src/bison.s1:
9998 Use malloc, if using alloca is troublesome.
9999 (YYSTACK_USE_ALLOCA): New flag macro.
10000 Define it for some systems and compilers.
10001 (YYSTACK_ALLOC): New macro.
10002 (yyparse): Use YYSTACK_ALLOC to allocate stack.
10003 If it was malloc'd, free it.
10004
10005 1997-05-17 Richard Stallman <rms@gnu.org>
10006
10007 * bison.simple:
10008 Use malloc, if using alloca is troublesome.
10009 (YYSTACK_USE_ALLOCA): New flag macro.
10010 Define it for some systems and compilers.
10011 (YYSTACK_ALLOC): New macro.
10012 (yyparse): Use YYSTACK_ALLOC to allocate stack.
10013 If it was malloc'd, free it.
10014
10015 1997-04-23 Richard Stallman <rms@gnu.org>
10016
10017 * src/bison.s1:
10018 (alloca) [__hpux]: Always define as __builtin_alloca.
10019
10020 1997-04-23 Richard Stallman <rms@gnu.org>
10021
10022 * bison.simple:
10023 (alloca) [__hpux]: Always define as __builtin_alloca.
10024
10025 1997-04-22 Richard Stallman <rms@gnu.org>
10026
10027 * src/bison.s1:
10028 [__hpux]: Include alloca.h (right for HPUX 10)
10029 instead of declaring alloca (right for HPUX 9).
10030
10031 * src/bison.s1 (__yy_memcpy):
10032 Declare arg `count' as unsigned int.
10033 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
10034
10035 1997-04-22 Richard Stallman <rms@gnu.org>
10036
10037 * bison.simple:
10038 [__hpux]: Include alloca.h (right for HPUX 10)
10039 instead of declaring alloca (right for HPUX 9).
10040
10041 * bison.simple (__yy_memcpy):
10042 Declare arg `count' as unsigned int.
10043 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
10044
10045 1997-01-03 Richard Stallman <rms@gnu.org>
10046
10047 * src/allocate.c: [__STDC__ or _MSC_VER]:
10048 Declare calloc and realloc to return void *.
10049
10050 1997-01-02 Richard Stallman <rms@gnu.org>
10051
10052 * src/system.h:
10053 [_MSC_VER]: Include stdlib.h and process.h.
10054 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
10055
10056 * src/main.c (main): Return FAILURE as a value.
10057 (printable_version): Declare arg as int, not char.
10058
10059 1997-01-02 Richard Stallman <rms@gnu.org>
10060
10061 * Makefile.in (dist):
10062 Explicitly check for symlinks, and copy them.
10063
10064 1996-12-19 Richard Stallman <rms@gnu.org>
10065
10066 * src/files.c:
10067 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
10068
10069 1996-12-18 Paul Eggert <eggert@gnu.org>
10070
10071 * src/bison.s1 (yyparse):
10072 If __GNUC__ and YYPARSE_PARAM are both defined,
10073 declare yyparse to have a void * argument.
10074
10075 1996-12-18 Paul Eggert <eggert@gnu.org>
10076
10077 * bison.simple (yyparse):
10078 If __GNUC__ and YYPARSE_PARAM are both defined,
10079 declare yyparse to have a void * argument.
10080
10081 1996-12-17 Richard Stallman <rms@gnu.org>
10082
10083 * src/reduce.c (nbits): Add some casts.
10084
10085 1996-08-12 Richard Stallman <rms@gnu.org>
10086
10087 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
10088
10089 1996-08-12 Richard Stallman <rms@gnu.org>
10090
10091 * bison.simple: Test _MSDOS as well as _MSDOS_.
10092
10093 1996-07-31 Richard Stallman <rms@gnu.org>
10094
10095 * src/bison.s1:
10096 [__sun && __i386]: Include alloca.h.
10097
10098 1996-07-31 Richard Stallman <rms@gnu.org>
10099
10100 * bison.simple:
10101 [__sun && __i386]: Include alloca.h.
10102
10103 1996-07-30 Richard Stallman <rms@gnu.org>
10104
10105 * src/bison.s1: Comment change.
10106
10107 * src/bison.s1: Test _MSDOS_, not MSDOS.
10108
10109 1996-07-30 Richard Stallman <rms@gnu.org>
10110
10111 * bison.simple: Comment change.
10112
10113 * bison.simple: Test _MSDOS_, not MSDOS.
10114
10115 1996-06-01 Richard Stallman <rms@gnu.org>
10116
10117 * src/reduce.c, src/reader.c, src/print.c, src/output.c, src/nullable.c, src/lex.c, src/lalr.c, src/getargs.c, src/derives.c, src/conflicts.c, src/closure.c, src/allocate.c:
10118 Insert `_' macro around many string constants.
10119
10120 * src/main.c:
10121 Insert `_' macro around many string constants.
10122
10123 (main): Call setlocale, bindtextdomain and textdomain.
10124
10125 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
10126 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
10127 [ENABLE_NLS]: Include libintl.h.
10128 [ENABLE_NLS] (gettext): Define.
10129 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
10130 (N_, PACKAGE, LOCALEDIR): New macros.
10131
10132 1996-06-01 Richard Stallman <rms@gnu.org>
10133
10134 * POTFILES.in: New file.
10135
10136 * Makefile.in (allocate.o):
10137 Define target explicitly.
10138
10139 * Makefile.in (CFLAGS): Set to @CFLAGS@.
10140 (LDFLAGS): Set to @LDFLAGS@.
10141 (configure): Run autoconf only if preceding `cd' succeeds.
10142 (bison.s1): Redirect output to temporary file then move the
10143 temporary to the target, rather than redirecting directly to bison.s1.
10144 (clean): Remove config.status and config.log.
10145 (distclean): Don't remove config.status here.
10146
10147 1996-05-12 Richard Stallman <rms@gnu.org>
10148
10149 * src/bison.s1:
10150 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
10151
10152 1996-05-12 Richard Stallman <rms@gnu.org>
10153
10154 * bison.simple:
10155 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
10156
10157 1996-05-11 Richard Stallman <rms@gnu.org>
10158
10159 * src/bison.s1 (__yy_memcpy):
10160 Really reorder the args, as was supposedly done on Feb 14 1995.
10161 (yyparse): Calls changed accordingly.
10162
10163 1996-05-11 Richard Stallman <rms@gnu.org>
10164
10165 * Makefile.in (dist): Don't use $(srcdir).
10166
10167 * bison.simple (__yy_memcpy):
10168 Really reorder the args, as was supposedly done on Feb 14 1995.
10169 (yyparse): Calls changed accordingly.
10170
10171 1996-01-27 Richard Stallman <rms@gnu.org>
10172
10173 * src/output.c (output_rule_data):
10174 Test YYERROR_VERBOSE in the conditional
10175 around the definition of ttyname.
10176
10177 1995-12-29 Richard Stallman <rms@gnu.org>
10178
10179 * src/bison.s1:
10180 Fix line numbers in #line commands.
10181
10182 1995-12-29 Richard Stallman <rms@gnu.org>
10183
10184 * bison.simple:
10185 Fix line numbers in #line commands.
10186
10187 1995-12-27 Richard Stallman <rms@gnu.org>
10188
10189 * src/bison.s1 (YYPARSE_PARAM_DECL):
10190 In C++, make it always null.
10191 (YYPARSE_PARAM_ARG): New macro.
10192 (yyparse): Use YYPARSE_PARAM_ARG.
10193
10194 1995-12-27 Richard Stallman <rms@gnu.org>
10195
10196 * bison.simple (YYPARSE_PARAM_DECL):
10197 In C++, make it always null.
10198 (YYPARSE_PARAM_ARG): New macro.
10199 (yyparse): Use YYPARSE_PARAM_ARG.
10200
10201 1995-11-29 Richard Stallman <rms@gnu.org>
10202
10203 * doc/bison.texinfo:
10204 Describe literal string tokens, %raw, %no_lines, %token_table.
10205
10206 1995-11-29 Daniel Hagerty <hag@gnu.org>
10207
10208 * doc/bison.texinfo: Fixed update date
10209
10210 1995-10-16 Richard Stallman <rms@gnu.org>
10211
10212 * src/version.c: Version 1.25.
10213
10214 1995-10-16 Richard Stallman <rms@gnu.org>
10215
10216 * NEWS: *** empty log message ***
10217
10218 1995-10-16 Richard Stallman <rms@gnu.org>
10219
10220 * doc/bison.1, doc/bison.rnh:
10221 Add new options.
10222
10223 1995-10-15 Richard Stallman <rms@gnu.org>
10224
10225 * src/vmsgetargs.c, src/getargs.c:
10226 Added -n, -k, and -raw switches.
10227 (noparserflag, toknumflag, rawtoknumflag): New variables.
10228
10229 * src/symtab.h (SALIAS):
10230 New #define for adding aliases to %token.
10231 (struct bucket): Added `alias' field.
10232
10233 * src/reduce.c (reduce_grammar):
10234 Revise error message.
10235 (print_notices): Remove final `.' from error message.
10236
10237 * src/reader.c (reader_output_yylsp):
10238 New function.
10239 (readgram): Use `#if 0' around code that accepted %command
10240 inside grammar rules: The documentation doesn't allow it,
10241 and it will fail since the %command processors scan for the next %.
10242 (parse_token_decl): Extended the %token
10243 declaration to allow a multi-character symbol as an alias.
10244 (parse_thong_decl): New function.
10245 (read_declarations): Added %thong declarations.
10246 (read_declarations): Handle NOOP to deal with allowing
10247 % declarations as another means to specify the flags.
10248 (readgram): Allow %prec prior to semantics embedded in a rule.
10249 (skip_to_char, read_declarations, copy_definition)
10250 (parse_token_decl, parse_start_decl, parse_type_decl)
10251 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
10252 (get_type_name, copy_guard, copy_action, readgram)
10253 (get_type, packsymbols): Revised most error messages.
10254 Changed `fatal' to `warnxxx' to avoid aborting for error.
10255 Revised and use multiple warnxxx functions to avoid using VARARGS1.
10256 (read_declarations): Improve the error message for
10257 an invalid character. Do not abort.
10258 (read_declarations, copy_guard, copy_action): Use
10259 printable_version to avoid unprintable characters in printed output.
10260 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
10261 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
10262 Allow the type of a non-terminal can be given
10263 more than once, as long as all specifications give the same type.
10264
10265 * src/output.c:
10266 (output_headers, output_trailers, output, output_gram)
10267 (output_rule_data): Implement noparserflag variable.
10268 Implement toknumflag variable.
10269 (output): Call reader_output_yylsp to output LTYPESTR.
10270
10271 * src/main.c (main):
10272 If reader sees an error, don't process the grammar.
10273 (fatals): Updated to not use VARARGS1.
10274 (printable_version, int_to_string, warn, warni, warns, warnss)
10275 (warnsss): New error reporting functions. Avoid abort for error.
10276
10277 * src/lex.h:
10278 Added THONG and NOOP for alias processing.
10279 Added SETOPT for the new code that allows setting options with %flags.
10280
10281 * src/lex.c:
10282 Include getopt.h. Add some extern decls.
10283 (safegetc): New function to deal with EOF gracefully.
10284 (literalchar); new function to deal with reading \ escapes.
10285 (lex): Use literalchar.
10286 (lex): Implemented "..." tokens.
10287 (literalchar, lex, parse_percent_token): Made tokenbuffer
10288 always contain the token. This includes growing the token
10289 buffer while reading an integer.
10290 (parse_percent_token): Replaced if-else statement with percent_table.
10291 (parse_percent_token): Added % declarations as another
10292 way to specify the flags -n, -l, and -r. Also added hooks for
10293 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
10294 major changes to files.c.
10295 (lex) Retain in the incoming stream a character following
10296 an incorrect '/'.
10297 (skip_white_space, lex): Revised most error messages
10298 and changed fatal to warn to avoid aborting.
10299 (percent_table): Added %thong declarations.
10300
10301 * src/gram.h: Comment changes.
10302
10303 * src/files.c (openfiles, open_extra_files, done):
10304 Add faction flag
10305 and actfile file. Handle noparserflag. Both for -n switch.
10306
10307 * src/conflicts.c (resolve_sr_conflict):
10308 Remove use of alloca.
10309
10310 1995-06-01 Jim Meyering <meyering@gnu.org>
10311
10312 * doc/bison.texinfo: *** empty log message ***
10313
10314 1995-05-06 Richard Stallman <rms@gnu.org>
10315
10316 * src/bison.s1: Comment change.
10317
10318 1995-05-06 Richard Stallman <rms@gnu.org>
10319
10320 * bison.simple: Comment change.
10321
10322 1995-05-03 Richard Stallman <rms@gnu.org>
10323
10324 * src/version.c: Version now 1.24.
10325
10326 * src/bison.s1: Change distribution terms.
10327
10328 * src/version.c: Version now 1.23.
10329
10330 1995-05-03 Richard Stallman <rms@gnu.org>
10331
10332 * doc/bison.texinfo:
10333 Rewrite "Conditions for Using Bison".
10334 Update version to 1.24.
10335
10336 1995-05-03 Richard Stallman <rms@gnu.org>
10337
10338 * bison.simple: Change distribution terms.
10339
10340 1995-02-23 Richard Stallman <rms@gnu.org>
10341
10342 * src/files.c: Test __VMS_POSIX as well as VMS.
10343
10344 1995-02-14 Jim Meyering <meyering@gnu.org>
10345
10346 * src/bison.s1 (__yy_memcpy):
10347 Renamed from __yy_bcopy to avoid
10348 confusion. Reverse FROM and TO arguments to be consistent with
10349 those of memcpy.
10350
10351 1995-02-14 Jim Meyering <meyering@gnu.org>
10352
10353 * bison.simple (__yy_memcpy):
10354 Renamed from __yy_bcopy to avoid
10355 confusion. Reverse FROM and TO arguments to be consistent with
10356 those of memcpy.
10357
10358 1994-11-10 David J. MacKenzie <djm@gnu.org>
10359
10360 * NEWS: reformat
10361
10362 * NEWS: New file.
10363
10364 * Makefile.in (DISTFILES): Include NEWS.
10365
10366 * Makefile.in (DISTFILES):
10367 Include install-sh, not install.sh.
10368
10369 * configure.in: Update to Autoconf v2 macro names.
10370
10371 1994-10-05 David J. MacKenzie <djm@gnu.org>
10372
10373 * Makefile.in: fix typo
10374
10375 * Makefile.in (prefix, exec_prefix):
10376 Let configure set them.
10377
10378 1994-09-28 David J. MacKenzie <djm@gnu.org>
10379
10380 * Makefile.in: Set datadir to $(prefix)/share.
10381
10382 1994-09-15 Richard Stallman <rms@gnu.org>
10383
10384 * src/bison.s1:
10385 Update copyright notice and GPL version.
10386
10387 1994-09-15 Richard Stallman <rms@gnu.org>
10388
10389 * bison.simple:
10390 Update copyright notice and GPL version.
10391
10392 1994-07-12 Richard Stallman <rms@gnu.org>
10393
10394 * src/reduce.c, src/reader.c:
10395 entered into RCS
10396
10397 1994-05-05 David J. MacKenzie <djm@gnu.org>
10398
10399 * Makefile.in: entered into RCS
10400
10401 1994-03-26 Richard Stallman <rms@gnu.org>
10402
10403 * src/bison.s1: entered into RCS
10404
10405 1994-03-26 Richard Stallman <rms@gnu.org>
10406
10407 * bison.simple: entered into RCS
10408
10409 1994-03-25 Richard Stallman <rms@gnu.org>
10410
10411 * src/main.c: entered into RCS
10412
10413 1994-03-24 Richard Stallman <rms@gnu.org>
10414
10415 * src/conflicts.c: entered into RCS
10416
10417 1994-01-02 Richard Stallman <rms@gnu.org>
10418
10419 * Makefile.in: *** empty log message ***
10420
10421 1993-11-21 Richard Stallman <rms@gnu.org>
10422
10423 * src/bison.s1: *** empty log message ***
10424
10425 1993-11-21 Richard Stallman <rms@gnu.org>
10426
10427 * doc/bison.texinfo: entered into RCS
10428
10429 * doc/bison.texinfo: *** empty log message ***
10430
10431 1993-11-21 Richard Stallman <rms@gnu.org>
10432
10433 * bison.simple: *** empty log message ***
10434
10435 1993-10-25 David J. MacKenzie <djm@gnu.org>
10436
10437 * doc/bison.texinfo: *** empty log message ***
10438
10439 1993-10-19 Richard Stallman <rms@gnu.org>
10440
10441 * src/bison.s1: *** empty log message ***
10442
10443 1993-10-19 Richard Stallman <rms@gnu.org>
10444
10445 * bison.simple: *** empty log message ***
10446
10447 1993-10-14 Richard Stallman <rms@gnu.org>
10448
10449 * src/bison.s1: *** empty log message ***
10450
10451 1993-10-14 Richard Stallman <rms@gnu.org>
10452
10453 * bison.simple: *** empty log message ***
10454
10455 1993-09-14 David J. MacKenzie <djm@gnu.org>
10456
10457 * doc/bison.texinfo: *** empty log message ***
10458
10459 1993-09-13 Noah Friedman <friedman@gnu.org>
10460
10461 * Makefile.in: *** empty log message ***
10462
10463 1993-09-10 Richard Stallman <rms@gnu.org>
10464
10465 * src/conflicts.c: *** empty log message ***
10466
10467 * src/system.h: entered into RCS
10468
10469 1993-09-10 Richard Stallman <rms@gnu.org>
10470
10471 * doc/bison.1: entered into RCS
10472
10473 1993-09-06 Noah Friedman <friedman@gnu.org>
10474
10475 * src/version.c: entered into RCS
10476
10477 1993-09-06 Noah Friedman <friedman@gnu.org>
10478
10479 * Makefile.in: *** empty log message ***
10480
10481 1993-07-30 David J. MacKenzie <djm@gnu.org>
10482
10483 * Makefile.in: *** empty log message ***
10484
10485 1993-07-24 Richard Stallman <rms@gnu.org>
10486
10487 * src/bison.s1: *** empty log message ***
10488
10489 1993-07-24 Richard Stallman <rms@gnu.org>
10490
10491 * bison.simple: *** empty log message ***
10492
10493 1993-07-08 David J. MacKenzie <djm@gnu.org>
10494
10495 * Makefile.in: *** empty log message ***
10496
10497 1993-07-04 Richard Stallman <rms@gnu.org>
10498
10499 * src/bison.s1: *** empty log message ***
10500
10501 1993-07-04 Richard Stallman <rms@gnu.org>
10502
10503 * bison.simple: *** empty log message ***
10504
10505 1993-06-26 David J. MacKenzie <djm@gnu.org>
10506
10507 * src/getargs.c: entered into RCS
10508
10509 1993-06-26 David J. MacKenzie <djm@gnu.org>
10510
10511 * doc/bison.texinfo: *** empty log message ***
10512
10513 * doc/bison.1: New file.
10514
10515 1993-06-25 Richard Stallman <rms@gnu.org>
10516
10517 * src/getargs.c: New file.
10518
10519 1993-06-16 Richard Stallman <rms@gnu.org>
10520
10521 * src/bison.s1: *** empty log message ***
10522
10523 1993-06-16 Richard Stallman <rms@gnu.org>
10524
10525 * bison.simple: *** empty log message ***
10526
10527 1993-06-03 Richard Stallman <rms@gnu.org>
10528
10529 * src/bison.s1: New file.
10530
10531 1993-06-03 Richard Stallman <rms@gnu.org>
10532
10533 * doc/bison.texinfo: *** empty log message ***
10534
10535 1993-06-03 Richard Stallman <rms@gnu.org>
10536
10537 * bison.simple: New file.
10538
10539 1993-05-19 Richard Stallman <rms@gnu.org>
10540
10541 * doc/bison.texinfo: New file.
10542
10543 1993-05-07 Noah Friedman <friedman@gnu.org>
10544
10545 * Makefile.in: *** empty log message ***
10546
10547 1993-04-28 Noah Friedman <friedman@gnu.org>
10548
10549 * src/reader.c: *** empty log message ***
10550
10551 1993-04-23 Noah Friedman <friedman@gnu.org>
10552
10553 * src/alloc.h: entered into RCS
10554
10555 1993-04-20 David J. MacKenzie <djm@gnu.org>
10556
10557 * src/version.c: *** empty log message ***
10558
10559 * src/files.c, src/allocate.c:
10560 entered into RCS
10561
10562 * src/reader.c: *** empty log message ***
10563
10564 * src/lex.c: entered into RCS
10565
10566 * src/conflicts.c: New file.
10567
10568 * src/symtab.c: entered into RCS
10569
10570 * src/alloc.h: New file.
10571
10572 * src/LR0.c: entered into RCS
10573
10574 1993-04-18 Noah Friedman <friedman@gnu.org>
10575
10576 * src/reader.c: New file.
10577
10578 * src/version.c: *** empty log message ***
10579
10580 1993-04-18 Noah Friedman <friedman@gnu.org>
10581
10582 * Makefile.in: *** empty log message ***
10583
10584 1993-04-17 Noah Friedman <friedman@gnu.org>
10585
10586 * Makefile.in: *** empty log message ***
10587
10588 1993-04-15 Richard Stallman <rms@gnu.org>
10589
10590 * src/main.c, src/files.c:
10591 New file.
10592
10593 1993-04-15 Noah Friedman <friedman@gnu.org>
10594
10595 * configure.in: entered into RCS
10596
10597 * configure.in: *** empty log message ***
10598
10599 * configure.in: New file.
10600
10601 1993-04-14 Richard Stallman <rms@gnu.org>
10602
10603 * Makefile.in: New file.
10604
10605 1993-04-13 Richard Stallman <rms@gnu.org>
10606
10607 * src/version.c: New file.
10608
10609 1993-03-25 Richard Stallman <rms@gnu.org>
10610
10611 * src/output.c: entered into RCS
10612
10613 1992-09-25 Richard Stallman <rms@gnu.org>
10614
10615 * configure.bat: entered into RCS
10616
10617 1992-06-22 Richard Stallman <rms@gnu.org>
10618
10619 * src/vmsgetargs.c: entered into RCS
10620
10621 1992-06-22 Richard Stallman <rms@gnu.org>
10622
10623 * doc/bison.rnh: entered into RCS
10624
10625 1992-04-20 David J. MacKenzie <djm@gnu.org>
10626
10627 * README: entered into RCS
10628
10629 1992-01-22 Richard Stallman <rms@gnu.org>
10630
10631 * src/machine.h: entered into RCS
10632
10633 1991-12-21 Richard Stallman <rms@gnu.org>
10634
10635 * src/lalr.c, src/closure.c:
10636 entered into RCS
10637
10638 1991-12-20 Richard Stallman <rms@gnu.org>
10639
10640 * src/state.h: entered into RCS
10641
10642 1991-12-18 Richard Stallman <rms@gnu.org>
10643
10644 * src/print.c, src/nullable.c, src/derives.c:
10645 entered into RCS
10646
10647 1991-11-03 David J. MacKenzie <djm@gnu.org>
10648
10649 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
10650 entered into RCS
10651
10652 1988-09-09 Richard Stallman <rms@gnu.org>
10653
10654 * src/bison.hairy: entered into RCS
10655
10656 1987-12-16 Richard Stallman <rms@gnu.org>
10657
10658 * REFERENCES: entered into RCS
10659
10660 -----
10661
10662 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
10663 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
10664
10665 This file is part of Bison, the GNU Compiler Compiler.
10666
10667 Bison is free software; you can redistribute it and/or modify
10668 it under the terms of the GNU General Public License as published by
10669 the Free Software Foundation; either version 2, or (at your option)
10670 any later version.
10671
10672 Bison is distributed in the hope that it will be useful,
10673 but WITHOUT ANY WARRANTY; without even the implied warranty of
10674 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10675 GNU General Public License for more details.
10676
10677 You should have received a copy of the GNU General Public License
10678 along with Bison; see the file COPYING. If not, write to
10679 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
10680 Boston, MA 02111-1307, USA.