]> git.saurik.com Git - bison.git/blob - ChangeLog
* data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
[bison.git] / ChangeLog
1 2003-01-21 Paul Eggert <eggert@twinsun.com>
2
3 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
4 we don't need to worry about yyerrlab1 being reported as an
5 "unused label" by non-GCC C compilers. The downside is that if
6 locations are used then a couple of statements are duplicated each
7 time YYERROR is invoked, but the upside is that the warnings
8 should vanish.
9 (yyerrlab1): Move code to YERROR.
10 (yyerrlab2): Remove. Change uses back to yyerrlab1.
11 This reverts some of the 2002-12-27 change.
12
13 2003-01-17 Paul Eggert <eggert@twinsun.com>
14
15 * src/output.c (symbol_printers_output): Fix typo that led
16 to core dump. Problem reported by Antonio Rus in
17 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
18
19 2003-01-13 Akim Demaille <akim@epita.fr>,
20 Quoc Peyrot <chojin@lrde.epita.fr>,
21 Robert Anisko <anisko_r@lrde.epita.fr>
22
23 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
24 when the stacks contain one element, as the loop would otherwise
25 free the last state, and then use the top state (the one we just
26 popped). This means that the initial elements will not be freed
27 explicitly, as is the case in yacc.c; it is not a problem, as
28 these elements have fake values.
29
30 2003-01-11 Paul Eggert <eggert@twinsun.com>
31
32 * NEWS: %expect-violations are now just warnings, reverting
33 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
34 bootstrapping problem reported by Matthias Klose; see
35 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
36 * src/conflicts.c (conflicts_print): Likewise.
37 * tests/conflicts.at (%expect not enough, %expect too much,
38 %expect with reduce conflicts): Likewise.
39 * doc/bison.texinfo (Expect Decl): Document this. Also mention
40 that the warning is enabled if the number of conflicts changes
41 (not necessarily increases).
42
43 * src/getargs.c (version): Update copyright year.
44
45 2003-01-09 Akim Demaille <akim@epita.fr>
46
47 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
48
49 2003-01-08 Paul Eggert <eggert@twinsun.com>
50
51 * Makefile.maint (WGETFLAGS):
52 New macro, containing "-C off" to disable proxy caches.
53 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
54 (rel-check): Use $(WGET) instead of wget.
55
56 2003-01-06 Paul Eggert <eggert@twinsun.com>
57
58 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
59 the GLR paper of Scott, Johnstone and Hussain.
60
61 2003-01-04 Paul Eggert <eggert@twinsun.com>
62
63 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
64 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
65 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
66 (EXTRA_LIBRARIES): New var, for liby.a.
67 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
68 (EXTRA_SCRIPTS): New var, for yacc.
69
70 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
71 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
72 Problem reported by Nelson H. F. Beebe.
73
74 2003-01-03 Paul Eggert <eggert@twinsun.com>
75
76 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
77 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
78 when compiling Bison 1.875's `bitset bset = obstack_alloc
79 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
80
81 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
82 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
83 grow to a huge size with typical invocation.
84
85 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
86 Use the pattern recommended by Autoconf 2.57, except also protect
87 against double-definition.
88 * src/system.h: Likewise.
89 Portability issues reported by Nelson H. F. Beebe.
90
91 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
92 All uses changed. Provide a definition in both C and C++.
93 (yytrue, yyfalse): Define even if defined (__cplusplus).
94
95 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
96 Reported by Nelson H. F. Beebe.
97
98 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
99
100 2003-01-02 Paul Eggert <eggert@twinsun.com>
101
102 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
103 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
104 Bug reported by Nelson H. F. Beebe.
105
106 2003-01-01 Paul Eggert <eggert@twinsun.com>
107
108 * Version 1.875.
109
110 2002-12-30 Paul Eggert <eggert@twinsun.com>
111
112 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
113 Moved here from...
114 (<INITIAL>","): Here. This causes stray "," to be treated
115 more uniformly.
116
117 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
118 last brace in braced code when not in Yacc mode, for compatibility
119 with Bison 1.35. This resurrects the 2001-12-15 patch to
120 src/reader.c.
121
122 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
123 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
124
125 2002-12-28 Paul Eggert <eggert@twinsun.com>
126
127 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
128 that of SYM's type. This fixes Debian bug 168069, reported by
129 Thomas Olsson.
130
131 2002-12-28 Paul Eggert <eggert@twinsun.com>
132
133 Version 1.75f.
134
135 Switch back to the Yacc style of conflict reports, undoing some
136 of the 2002-07-30 change.
137 * doc/bison.texinfo (Understanding): Use Yacc style for
138 conflict reports. Also, use new way of locating rules.
139 * src/conflicts.c (conflict_report):
140 Renamed from conflict_report_yacc, removing the old
141 'conflict_report'. Translate the entire conflict report at once,
142 so that we don't assume that "," has the same interpretation in
143 all languages.
144 (conflicts_output): Use Yacc-style conflict report for each state,
145 instead of our more-complicated style.
146 (conflicts_print): Use Yacc-style conflict report, except print
147 the input file name when not emulating Yacc.
148 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
149 Conflicted Reduction, %expect not enough, %expect too much,
150 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
151 * tests/existing.at (GNU Cim Grammar): Likewise.
152 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
153
154 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
155 fatal): Don't invoke fflush; it's not needed and it might even be
156 harmful for stdout, as stdout might not be open.
157 * src/reduce.c (reduce_print): Likewise.
158
159 2002-12-27 Paul Eggert <eggert@twinsun.com>
160
161 Fix a bug where error locations were not being recorded correctly.
162 This problem was originally reported by Paul Hilfinger in
163 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
164
165 * data/yacc.c (yyparse): New local var yylerrsp, to record the
166 top of the location stack's error locations.
167 (yyerrlab): Set it. When discarding a token, push its location
168 onto yylerrsp so that we don't lose track of the error's end.
169 (yyerrlab1): Now is only the target of YYERROR, so that we can
170 properly record the location of the action that failed. For GCC
171 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
172 GCC warning about yyerrlab1 being unused if YYERROR is unused.
173 (yyerrlab2): New label, which yyerrlab now falls through to.
174 Compute the error's location by applying YYLLOC_DEFAULT to
175 the locations of all the symbols that went into the error.
176 * doc/bison.texinfo (Location Default Action): Mention that
177 YYLLOC_DEFAULT is also invoked for syntax errors.
178 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
179 Error locations include the locations of all the tokens that were
180 discarded, not just the last token.
181
182 2002-12-26 Paul Eggert <eggert@twinsun.com>
183
184 * src/files.c: Include quote.h.
185 (compute_output_file_names): Warn if we detect conflicting
186 outputs to the same file. This should catch the misunderstanding
187 exemplified by Debian Bug 165349, reported by Bruce Stephens..
188
189 * src/conflicts.c (conflicts_print): If the user specifies
190 "%expect N", report an error if there are any reduce/reduce
191 conflicts. This is what the manual says should happen.
192 This fixes Debian bug 130890, reported by Anthony DeRobertis.
193 * tests/conflicts.at (%expect with reduce conflicts): New test.
194
195 Don't use m4_include on relative file names, as it doesn't work as
196 desired if there happens to be a file with that name under ".".
197
198 * m4sugar/version.m4: Remove; it was included but it wasn't used.
199 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
200 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
201 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
202 * src/output.c (output_skeleton): Use full path names when
203 specifying a file to include; don't rely on include path, as
204 it's unreliable when the working file contains a file with
205 that name.
206
207 2002-12-25 Paul Eggert <eggert@twinsun.com>
208
209 Remove obsolete references to bison.simple and bison.hairy.
210 Problem mentioned by Aubin Mahe in
211 <http://mail.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
212 * data/glr.c: Comment fix.
213 * doc/bison.1: Remove references. Also, mention "yacc".
214
215 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
216 with -g option.
217
218 * src/parse-gram.y (declaration): Use enum "report_states" rather
219 than its numeric value 1.
220
221 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
222 opening a new one. This fixes Debian bug 165349, reported by
223 Bruce Stephens.
224
225 2002-12-24 Paul Eggert <eggert@twinsun.com>
226
227 Version 1.75e.
228
229 * Makefile.maint (cvs-update): Don't assume that the shell
230 supports $(...), as Solaris sh doesn't.
231
232 * src/parse-gram.y (lloc_default): Remove test for empty
233 nonterminals at the end, since it didn't change the result.
234
235 2002-12-24 Paul Eggert <eggert@twinsun.com>
236
237 If the user does not define YYSTYPE as a macro, Bison now declares it
238 using typedef instead of defining it as a macro. POSIX requires this.
239 For consistency, YYLTYPE is also declared instead of defined.
240
241 %union directives can now have a tag before the `{', e.g., the
242 directive `%union foo {...}' now generates the C code
243 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
244 The default union tag is `YYSTYPE', for compatibility with Solaris 9
245 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
246 instead of `yyltype'.
247
248 `yystype' and `yyltype' are now obsolescent macros instead of being
249 typedefs or tags; they are no longer documented and will be
250 withdrawn in a future release.
251
252 * data/glr.c (b4_location_type): Remove.
253 (YYSTYPE): Renamed from yystype.
254 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
255 (struct YYLTYPE): Renamed from struct yyltype.
256 (YYLTYPE): Renamed from yyltype.
257 (yyltype, yystype): New (and obsolescent) macros,
258 for backward compatibility.
259 * data/yacc.c: Likewise.
260
261 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
262 does not specify a union tag. This is for compatibility with
263 Solaris 9 yacc.
264
265 * src/parse-gram.y (add_param): 2nd arg is now char * not char
266 const *, since it is now modified by stripping surrounding { }.
267 (current_braced_code): Remove.
268 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
269 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
270 trailing " {...}". Now of type <chars>.
271 (grammar_declaration): Adjust to bundled tokens.
272 (code_content): Remove; stripping is now done by add_param.
273 (print_token_value): Print contents of bundled tokens.
274 (token_name): New function.
275
276 * src/reader.h (braced_code, current_braced_code): Remove.
277 (token_name): New decl.
278
279 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
280 token_type, not braced_code code_kind. All uses changed.
281 (SC_PRE_CODE): New state, for scanning after a keyword that
282 has (or usually has) an immediately-following braced code.
283 (token_type): New local var, to keep track of which token type
284 to return when scanning braced code.
285 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
286 <INITIAL>"%parse-param", <INITIAL>"%printer",
287 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
288 instead of returning a token type immediately.
289 (<INITIAL>"{"): Set token type.
290 (<SC_BRACED_CODE>"}"): Use it.
291 (handle_action_dollar, handle_action_at): Now returns bool
292 indicating success. Fail if ! current_rule; this prevents a core dump.
293 (handle_symbol_code_dollar, handle_symbol_code_at):
294 Remove; merge body into caller.
295 (handle_dollar, handle_at): Complain in invalid contexts.
296
297 * NEWS, doc/bison.texinfo: Document the above.
298 * NEWS: Fix years and program names in copyright notice.
299
300 2002-12-17 Paul Eggert <eggert@twinsun.com>
301
302 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
303 Reporting, Table of Symbols): Omit mentions of %lex-param and
304 %parse-param from the documentation for now.
305
306 2002-12-15 Paul Eggert <eggert@twinsun.com>
307
308 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
309 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
310 lookahead symbol, and which sets yychar in parser actions) and it
311 disagreed with the Bison documentation. Bug
312 reported by Andrew Walrond.
313
314 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
315 as the caller now does that.
316 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
317 (YYEMPTY): Parenthesize right hand side, since others use it.
318 (yyparse): Don't assume that our generated code is the only code
319 that sets yychar.
320
321 2002-12-13 Paul Eggert <eggert@twinsun.com>
322
323 Version 1.75d.
324
325 POSIX requires a "yacc" command.
326 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
327 (MOSTLYCLEANFILES): Add yacc.
328 (yacc): New rule.
329 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
330 as an alias for bison y.
331
332 * po/LINGUAS: Add da.
333
334 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
335 problem with latest <getopt.h>.
336 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
337
338 * doc/fdl.texi: Upgrade to 1.2.
339 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
340 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
341 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
342 gnulib.
343 * config/install-sh: Sync with autotools.
344
345 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
346 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
347 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
348 locations are requested.
349 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
350 locations are requested.
351
352 2002-12-12 Paul Eggert <eggert@twinsun.com>
353
354 Remove unportable casts and storage allocation tricks.
355 While we're at it, remove almost all casts, since they
356 usually aren't needed and are a sign of trouble.
357
358 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
359
360 * src/derives.c (derives_compute): Do not subtract NTOKENS from
361 the pointer DSET returned by malloc; this isn't portable.
362 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
363 Similarly for DERIVES.
364 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
365 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
366 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
367
368 * src/derives.c (derives_compute): Do not bother invoking
369 int_of_rule_number, since rule numbers are integers.
370
371 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
372 rather than XMALLOC (char, N).
373
374 * src/files.c (filename_split): Rewrite to avoid cast.
375
376 * src/gram.h (symbol_number_as_item_number,
377 item_number_as_symbol_number, rule_number_as_item_number,
378 item_number_as_rule_number):
379 Now inline functions rather than macros, to avoid casts.
380 * src/state.h (state_number_as_int): Likewise.
381 * src/tables.c (state_number_to_vector_number,
382 symbol_number_to_vector_number): Likewise.
383
384 * src/gram.h (int_of_rule_number): Remove; no longer used.
385
386 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
387 since the resulting storage is always stored into.
388
389 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
390 where it's needed.
391
392 * src/muscle_tab.c (muscle_m4_output):
393 Now inline. Return bool, not int.
394 * src/state.c (state_compare): Likewise.
395 * src/symtab.c (symbol_check_defined,
396 symbol_check_alias_consistency, symbol_pack, symbol_translation,
397 hash_compare_symbol, hash_symbol):
398 Likewise.
399 * src/uniqstr.c (uniqstr_print): Likewise.
400 * src/muscle_tab.c (muscle_m4_output_processor):
401 New function, to avoid casts.
402 * src/state.c (state_comparator, stage_hasher): Likewise.
403 * src/symtab.c (symbol_check_defined_processor,
404 symbol_check_alias_consistency_processor, symbol_pack_processor,
405 symbol_translation_processor, hash_symbol_comparator,
406 hash_symbol_hasher): Likewise.
407 * src/uniqstr.c (uniqstr_print_processor): Likewise.
408 * src/muscle_tab.c (muscles_m4_output):
409 Use new functions instead of casting old functions unportably.
410 * src/state.c (state_hash_new): Likewise.
411 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
412 symbols_token_translations_init):
413 Likewise.
414 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
415
416 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
417 var instead of casting to long, to avoid casts.
418 (prepare_states): Use MALLOC rather than alloca, so that we don't
419 have to worry about alloca.
420 * src/state.c (state_hash_lookup): Likewise.
421
422 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
423 local var instead of casting to unsigned char, to avoid casts.
424
425 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
426 STATE_ALLOC): Remove.
427 (transitions_new, errs_new, reductions_new, state_new): Use malloc
428 rather than calloc, and use offsetof to avoid allocating slightly
429 too much storage.
430 (state_new): Initialize all members.
431
432 * src/state.c (state_hash): Use unsigned accumulator, not signed.
433
434 * src/symtab.c (symbol_free): Remove; unused.
435 (symbol_get): Remove cast in lhs of assignment.
436 (symbols_do): Now static. Accept generic arguments, not
437 hashing-related ones.
438
439 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
440 (symbol_processor): Remove.
441 (symbols_do): Remove decl; now static.
442
443 * src/system.h (alloca): Remove; decl no longer needed.
444 (<stddef.h>): Include, for offsetof.
445 (<inttypes.>, <stdint.h>): Include if available.
446 (uintptr_t): New type, if system lacks it.
447 (CALLOC, MALLOC, REALLOC): New macros.
448 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
449 new macros.
450
451 * src/tables.c (table_size): Now int, to pacify GCC.
452 (table_grow, table_ninf_remap): Use signed table size.
453 (save_row): Don't bother initializing locals when not needed.
454 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
455 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
456
457 * src/vcg.h: Correct misspellings.
458
459 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
460
461
462 * src/getargs.c (getargs): Don't assume EOF == -1.
463
464 2002-12-09 Paul Eggert <eggert@twinsun.com>
465
466 Change identifier spellings to avoid collisions with names
467 that are reserved by POSIX.
468
469 Don't use names ending in _t, since POSIX reserves them.
470 For consistency, remove _e and _s endings -- they're weren't
471 needed to remove ambiguity. All uses changed.
472 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
473 turn was just renamed from struniq_t.
474 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
475 which in turn was just renamed from struniq_processor_t.
476 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
477 in turn was renamed from hash_compare_struniq_t.
478 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
479 (state_list): Renamed from state_list_t.
480 * src/assoc.h (assoc): Renamed from assoc_t.
481 * src/conflicts.c (enum conflict_resolution): Renamed from
482 enum conflict_resolution_e.
483 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
484 (rule_list): Renamed from rule_list_t.
485 * src/getargs.h (enum trace): Renamed from enum trace_e.
486 (enum report): Renamed from enum report_e.
487 * src/gram.h (item_number): Renamed from item_number_t.
488 (rule_number): Renamed from rule_number_t.
489 (struct rule_s): Remove the "rule_s" part; not used.
490 (rule): Renamed from rule_t.
491 (rule_filter): Renamed from rule_filter_t.
492 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
493 (goto_list): Renamed from goto_list_t.
494 * src/lalr.h (goto_number): Renamed from goto_number_t.
495 * src/location.h (location): Renamed from location_t.
496 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
497 and moved here from:
498 * src/muscle_tab.h (muscle_entry_t): here.
499 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
500 (rule_list): Renamed from rule_list_t.
501 * src/print_graph.c (static_graph): Renamed from graph.
502 * src/reader.h (braced_code): Renamed from braced_code_t.
503 Remove brace_code_e tag.
504 * src/relation.h (relation_node): Renamed from relation_node_t.
505 (relation_nodes): Renamed from relation_nodes_t.
506 (relation): Renamed from relation_t.
507 * src/state.h (state_number): Renamed from state_number_t.
508 (struct state): Renamed from struct state_s.
509 (state): Renamed from state_t.
510 (transitions): Renamed from transitions_t. Unused (and
511 misspelled) transtion_s tag removed.
512 (errs): Renamed from errs_t. Unused errs_s tag removed.
513 (reductions): Renamed from reductions_t. Unused tag
514 reductions_s removed.
515 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
516 (struct symbol_list): Renamed from struct symbol_list_s.
517 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
518 (struct symbol): Renamed from struct symbol_s.
519 (symbol): Renamed from symbol_t.
520 * src/tables.c (vector_number): Renamed from vector_number_t.
521 (action_number): Renamed from action_t.
522 * src/tables.h (base_number): Renamed from base_t.
523 * src/vcg.h (enum color): Renamed from enum color_e.
524 (enum textmode): Renamed from enum textmode_e.
525 (enum shape): Renamed from enum shape_e.
526 (struct colorentry): Renamed from struct colorentry_s.
527 (struct classname): Renamed from struct classname_s.
528 (struct infoname): Renamed from struct infoname_s.
529 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
530 (enum decision): Renamed from enum decision_e.
531 (enum orientation): Renamed from enum orientation_e.
532 (enum alignment): Renamed from enum alignment_e.
533 (enum arrow_mode): Renamed from enum arrow_mode_e.
534 (enum crossing_type): Renamed from enum crossing_type_e.
535 (enum view): Renamed from enum view_e.
536 (struct node): Renamed from struct node_s.
537 (node): Renamed from node_t.
538 (enum linestyle): Renamed from enum linestyle_e.
539 (enum arrowstyle): Renamed from enum arrowstyle_e.
540 (struct edge): Renamed from struct edge.
541 (edge): Renamed from edge_t.
542 (struct graph): Renamed from struct graph_s.
543 (graph): Renamed from graph_t.
544 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
545 Rename value_t -> value.
546 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
547 value_t_as_yystype -> value_as_yystype.
548
549 Don't include <errno.h> in the mainstream code, since it
550 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
551 * lib/get-errno.c, lib/get-errno.h: New files.
552 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
553 get-errno.c.
554 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
555 * src/output.c (output_skeleton): Likewise.
556 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
557 instead of errno.
558 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
559 Likewise.
560 (handle_action_dollar, handle_action_at): Likewise.
561 * src/system.h: Do not include <errno.h>.
562 (TAB_EXT): Renamed from EXT_TAB.
563 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
564
565 Avoid str[a-z]*, since <string.h> reserves that name space.
566 Change all instances of "struniq" in names to "uniqstr", and
567 likewise for "STRUNIQ" and "UNIQSTR".
568 * src/uniqstr.c: Renamed from src/struniq.c.
569 * src/uniqstr.h: Renamed from src/struniq.h.
570 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
571 * src/files.c (strsuffix): Remove; unused.
572 (concat2): Renamed from stringappend. Now static.
573 * src/files.h (strsuffix, stringappend): Remove; unused.
574 * src/parse-gram.y (<chars>): Renamed from <string>.
575 (<uniqstr>): Renamed from <struniq>.
576 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
577 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
578 (struct graph_s.expand): Renamed from struct graph_s.stretch.
579 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
580 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
581 (N_EXPAND): Renamed from N_STRETCH.
582
583 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
584 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
585 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
586 Remove; unused.
587 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
588 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
589 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
590 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
591 (BASE_MAXIMUM): Renamed from BASE_MAX.
592 (BASE_MINIMUM): Renamed from BASE_MIN.
593 (ACTION_MAX): Remove; unused.
594 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
595 Unnecessary casts removed from above defines.
596
597
598 Fix misspelling in names.
599 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
600 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
601 G_NODE_ALIGNEMENT.
602
603
604 * lib/timevar.c (timevar_report): Renamed from time_report,
605 for consistency with other names.
606 * lib/timevar.h (timevar_report): New decl.
607 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
608
609
610 Sort include-file uses.
611
612 Reorder all include files under src to be in the order "system.h".
613 then the ../lib include files in angle brackets (alphabetized),
614 then the . include files in double-quotes (alphabetized). Fix
615 dependency breakages encountered in this process, as follows:
616 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
617 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
618 * src/state.h: Include "symtab.h".
619
620 2002-12-08 Paul Eggert <eggert@twinsun.com>
621
622 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
623 since this causes problems when __file__ contains character
624 sequences like "@" that are treated specially by src/scan-skel.l.
625 Instead, just use the file's basename. This fixes the bug
626 reported by Martin Mokrejs in
627 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
628
629 2002-12-06 Paul Eggert <eggert@twinsun.com>
630
631 Add support for rules that do not have trailing semicolons, as
632 POSIX requires. Improve the quality of locations in Bison
633 diagnostics.
634
635 * src/location.c: Include <quotearg.h>.
636 (empty_location): Now const.
637 (location_print): New function. Follow the recommendation of the
638 GNU Coding Standards for locations that span file boundaries.
639 * src/location.h: Do not include <quotearg.h>; no longer needed.
640 (boundary): New type.
641 (location_t): Use it. This allows locations to span file boundaries.
642 All member uses changed: file -> start.file or end.file (as needed),
643 first_line -> start.line, first_column -> start.column,
644 last_line -> end.line, last_column -> end.column.
645 (equal_boundaries): New function.
646 (LOCATION_RESET, LOCATION_STEP): Remove.
647 (LOCATION_PRINT): Remove. All callers changed to use location_print.
648 (empty_location): Now const.
649 (location_print): New decl.
650 * src/parse-gram.y (lloc_default): New function, which handles
651 empty locations more accurately.
652 (YYLLOC_DEFAULT): Use it.
653 (%token COLON): Remove.
654 (%token ID_COLON): New token.
655 (rules): Use it.
656 (declarations, rules): Remove trailing semicolon.
657 (declaration, rules_or_grammar_declaration):
658 Allow empty (";") declaration.
659 (symbol_def): Remove empty actions; no longer needed.
660 (rules_or_grammar_declaration): Remove trailing semicolon.
661 (semi_colon.opt): Remove.
662 * src/reader.h: Include location.h.
663 (scanner_cursor): New decl.
664 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
665 rolling our own.
666 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
667 of *loc.
668 (STEP): Remove. No longer needed, now that adjust_location does
669 the work. All uses removed.
670 (scanner_cursor): New var.
671 (adjust_location): Renamed from extend_location. It now sets
672 *loc and adjusts the scanner cursor. All uses changed.
673 Don't bother testing for CR.
674 (handle_syncline): Remove location arg; now updates scanner cursor.
675 All callers changed.
676 (unexpected_end_of_file): Now accepts start boundary of token or
677 comment, not location. All callers changed. Update scanner cursor,
678 not the location.
679 (SC_AFTER_IDENTIFIER): New state.
680 (context_state): Renamed from c_context. All uses changed.
681 (id_loc, code_start, token_start): New local vars.
682 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
683 processing of Yacc white space and equivalents here.
684 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
685 instead of returning ID immediately, since we need to search for
686 a subsequent colon.
687 (<INITIAL>"'", "\""): Save token_start.
688 (<INITIAL>"%{", "{", "%%"): Save code_start.
689 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
690 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
691 BEGIN context_state at end, not INITIAL.
692 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
693 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
694 Return correct token start.
695 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
696 the start of a character, string or multiline comment is found.
697 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
698 Reduction): Adjust reported locations to match the more-precise
699 results now expected.
700 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
701 * tests/reduce.at (Useless Rules, Reduced Automaton,
702 Underivable Rules): Likewise.
703 * tests/regression.at (Invalid inputs): No longer `expecting ";"
704 or "|"' now that so many other tokens are allowed by the new grammar.
705
706 * src/complain.h (current_file): Remove duplicate decl;
707 current_file is now owned by files.h.
708 * src/complain.c, src/scan-gram.l: Include files.h.
709
710 2002-12-06 Paul Eggert <eggert@twinsun.com>
711
712 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
713 promotes to int; it might be unsigned int.
714 * data/yacc.c (yy_reduce_print): Likewise.
715
716 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
717 be #defined in the prologue, not in the Bison declarations.
718 This fixes Debian Bug 102878, reported by Shaul Karl.
719
720 2002-12-02 Paul Eggert <eggert@twinsun.com>
721
722 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
723 * lib/strtoul.c: New file, from gnulib.
724 This fixes a porting bug reported by Peter Klein in
725 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
726
727 2002-11-30 Paul Eggert <eggert@twinsun.com>
728
729 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
730 and put only a forward declaration in the prologue. This is for
731 consistency with the other scanner helper functions.
732
733 Type clashes now generate warnings, not errors, since it
734 appears that POSIX may allow some grammars with type clashes.
735 * src/reader.c (grammar_current_rule_check): Warn about
736 type clashes instead of complaining.
737 * tests/input.at (Type Clashes): Expect warnings, not complaints.
738
739 Add Yacc library, since POSIX requires it.
740 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
741 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
742 * lib/main.c, lib/yyerror.c: New files.
743
744 gram_error can be static; it need not be extern.
745 * src/reader.h (gram_error): Remove decl.
746 * src/parse-gram.y (gram_error): Now static. Add static decl.
747 (print_token_value): Omit parameter names from forward decl,
748 for consistency.
749
750 2002-11-29 Paul Eggert <eggert@twinsun.com>
751
752 * doc/bison.texinfo: Emphasize that yylex and yyerror must
753 be declared before being used. E.g., one should typically
754 declare them in the prologue. Use GNU coding style in examples.
755 Put "const" consistently after the type it modifies. Mention
756 that C99 supports "inline". Mention that yyerror traditionally
757 returns "int".
758
759 %parse-param and %lex-param now take just one argument, the
760 declaration; the argument name is deduced from the declaration.
761
762 * doc/bison.texinfo (Parser Function, Pure Calling, Error
763 Reporting, Table of Symbols): Document this.
764 * src/parse-gram.y (add_param): New function.
765 (COMMA): Remove.
766 (declaration): Implement new rule for %parse-param and %lex-param.
767 * src/scan-gram.l: "," now elicits a warning, rather than being
768 a token; this is more compatible with byacc.
769 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
770
771 2002-11-27 Paul Eggert <eggert@twinsun.com>
772
773 Rename identifiers to avoid real and potential collisions.
774
775 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
776 to avoid collision with lex macro described by Bruce Lilly in
777 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
778 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
779 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
780 * src/parse-gram.y (print_token_value): Renamed from yyprint.
781 All uses changed.
782 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
783 The name "yycontrol" violates the name space rules, and this stuff
784 wasn't being used anyway.
785 (input): Remove action; this stuff wasn't being used.
786 (gram_error): Rename local variable yylloc -> loc.
787 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
788 (YY_DECL): Don't use "yy" at start of local variables.
789 All uses changed, e.g., yylloc -> loc.
790 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
791 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
792 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
793 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
794
795 * src/parse-gram.y (gram_error): loc is now const *.
796 * src/reader.h (gram_error): Likewise.
797
798 2002-11-24 Paul Eggert <eggert@twinsun.com>
799
800 Version 1.75c.
801
802 * tests/actions.at (Actions after errors): Use an output format
803 more similar to that of the Printers and Destructors test.
804 Test the position of the ';' token too.
805 (Printers and Destructors): Likewise.
806 (Printers and Destructors: %glr-parser): Remove for now, to avoid
807 unnecessarily alarming people when the test fails.
808
809 * data/yacc.c (yyerrlab1): Move this label down, so that the
810 parser does not discard the lookahead token if the user code
811 invokes YYERROR. This change is required for POSIX conformance.
812
813 * lib/error.c: Sync with gnulib.
814
815 2002-11-22 Paul Eggert <eggert@twinsun.com>
816
817 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
818 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
819 * lib/xmalloc.c: Likewise.
820
821 2002-11-20 Paul Eggert <eggert@twinsun.com>
822
823 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
824
825 2002-11-20 Paul Eggert <eggert@twinsun.com>
826
827 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
828 should use `if (! x) abort ();' rather than `assert (x);', and
829 anyway it's one less thing to worry about configuring.
830
831 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
832 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
833 and replace all instances of assert with abort.
834 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
835 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
836
837 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
838 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
839 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
840 hash_find_entry, hash_rehash, hash_insert): Likewise.
841 * src/conflicts.c (resolve_sr_conflict): Likewise.
842 * src/lalr.c (set_goto_map, map_goto): Likewise.
843 * src/nullable.c (nullable_compute): Likewise.
844 * src/output.c (prepare_rules, token_definitions_output): Likewise.
845 * src/reader.c (packgram, reader): Likewise.
846 * src/state.c (state_new, state_free, state_transitions_set,
847 state_reduction_find): Likewise.
848 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
849 symbol_pack): Likewise.
850 * src/tables.c (conflict_row, pack_vector): Likewise.
851 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
852 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
853 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
854 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
855
856 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
857 (ARGMATCH_CONSTRAINT): New macro.
858 (ARGMATCH_ASSERT): Use it.
859
860 * src/system.h (verify): New macro.
861 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
862 rather than assert.
863 * src/tables.c (tables_generate): Likewise.
864
865 * src/struniq.c (struniq_assert): Now returns void, and aborts
866 if the assertion is false.
867 (struniq_assert_p): Remove.
868 * src/struniq.h: Likewise.
869
870 2002-11-18 Paul Eggert <eggert@twinsun.com>
871
872 * data/glr.c (yygetLRActions): Replace `yyindex' with
873 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
874 This fixes the regression with Sun ONE Studio 7 cc that I reported in
875 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
876
877 2002-11-18 Akim Demaille <akim@epita.fr>
878
879 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
880 space.
881 From Tim Van Holder.
882
883 2002-11-17 Paul Eggert <eggert@twinsun.com>
884
885 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
886 to "SyntaxError" for consistency with my 2002-11-15 change.
887
888 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
889 not define to {}, since this breaks the common use of `YYDPRINTF
890 ((...));' if a single statement is desired (e.g. before `else').
891 Work around GCC warnings by surrounding corresponding calls with
892 {} if needed.
893 (yyhasResolvedValue): Remove unused function.
894 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
895 loop body.
896 (yyreportSyntaxError): Renamed from yyreportParseError.
897 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
898 All uses changed.
899 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
900 extern when possible. Remove unused initializations.
901
902 2002-11-16 Akim Demaille <akim@epita.fr>
903
904 Augment the similarity between GLR and LALR traces.
905
906 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
907 (YY_REDUCE_PRINT): New.
908 (yyparse): Use them.
909 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
910 YYDPRINT here.
911 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
912 state reached after the reduction/recovery, since...
913 (yyparse, yyprocessOneStack): Report the state we are entering in.
914
915 2002-11-16 Akim Demaille <akim@epita.fr>
916
917 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
918 Add support for --trace=skeleton.
919 * src/scan-skel.l: %option debug.
920 Scan strings of non-@ or \n instead of character by character.
921 (scan_skel): Handle trace_skeleton.
922 (QPUTS): New.
923 (@output_parser_name@, @output_header_name@): ``Restore'' their
924 support (used to be M4 macros).
925 * data/yacc.c: Quote larger chunks, a la glr.c.
926 * data/lalr1.cc: Likewise.
927 The header guards are no longer available, so use some other
928 string than `YYLSP_NEEDED'.
929
930 2002-11-16 Akim Demaille <akim@epita.fr>
931
932 Make the ``Printers and Destructors'' test more verbose, taking
933 `yacc.c''s behavior as (possibly wrong) reference.
934
935 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
936 instead of fprint on stdout.
937 Set and report the last_line of the symbols.
938 Consistently display values and locations.
939
940 2002-11-16 Paul Eggert <eggert@twinsun.com>
941
942 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
943
944 2002-11-15 Paul Eggert <eggert@twinsun.com>
945
946 * tests/actions.at (Actions after errors): New test case.
947
948 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
949 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
950 tests/action.at, tests/calc.at, tests/conflicts.at,
951 tests/cxx-type.at, tests/regression.at:
952 "parse error" -> "syntax error" for POSIX compatibility.
953 "parsing stack overflow..." -> "parser stack overflow" so
954 that code matches Bison documentation.
955
956 2002-11-15 Akim Demaille <akim@epita.fr>
957
958 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
959 take two BRACED_CODE, not two string_content.
960 Free the scanner's obstack when we are done.
961 (code_content): New.
962 * tests/calc.at: Adjust.
963 * doc/bison.texinfo: Adjust.
964 Also, make sure to include the `,' for these declarations.
965
966 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
967
968 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
969 definition; avoids potential autoreconf problems.
970
971 2002-11-15 Akim Demaille <akim@epita.fr>
972
973 Always check the value returned by yyparse.
974
975 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
976 returned by yyparse.
977 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
978 Adjust calls.
979 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
980 returned by yyparse.
981
982 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
983
984 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
985 on input.at test.
986
987 2002-11-14 Paul Eggert <eggert@twinsun.com>
988
989 * src/output.c (output_skeleton): Call xfopen instead of
990 duplicating xfopen's body.
991
992 Fix bugs reported by Nelson H. F. Beebe in
993 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
994
995 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
996 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
997 Group compiler. Instead, use "$CC -E bar.c". Include the .h
998 file twice in the grammar, as an extra check.
999
1000 * tests/input.at (Torturing the Scanner): Surround the
1001 backslash-newline tests with "#if 0", to make it less likely that
1002 we'll run into compiler bugs. Bring back solitary \ inside
1003 comment, but add a closing comment to work around HP C bug. Don't
1004 test backslash-newline in C character constant.
1005
1006 2002-11-14 Akim Demaille <akim@epita.fr>
1007
1008 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
1009 status of the compiler.
1010 Calling `exit 1' is no longer needed.
1011 Reported by Nelson H. F. Beebe.
1012
1013 2002-11-14 Akim Demaille <akim@epita.fr>
1014
1015 * tests/atlocal.in (CPPFLAGS): We have config.h.
1016 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
1017 New.
1018 * tests/actions.at, tests/calc.at, tests/conflicts.at,
1019 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
1020 * tests/regression.at, tests/torture.at: Use them for all the
1021 grammars that are to be compiled.
1022 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
1023 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
1024 * doc/bison.texinfo (GLR Parsers): Document `inline'.
1025
1026 2002-11-14 Akim Demaille <akim@epita.fr>
1027
1028 * doc/bison.texinfo: Various formatting changes (alignments in
1029 samples, additional @group/@end group, GCS in samples.
1030 Use @deffn instead of simple @table to define the directives,
1031 macros, variables etc.
1032
1033 2002-11-13 Paul Eggert <eggert@twinsun.com>
1034
1035 Fix some bugs reported by Albert Chin-A-Young in
1036 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
1037
1038 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
1039 -o c"; the HP C compiler chatters during compilation.
1040 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
1041 * tests/headers.at (export YYLTYPE): Likewise.
1042
1043 * tests/input.at (Torturing the Scanner): Remove lines containing
1044 solitary backslashes, as they tickle a bug in the HP C compiler.
1045
1046 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
1047 comments, since they're not portable. Use GNU coding style.
1048
1049 2002-11-13 Akim Demaille <akim@epita.fr>
1050
1051 * data/yacc.c: Leave bigger chunks of quoted text.
1052 (YYDSYMPRINTF): New.
1053 Use it to report symbol activities.
1054 * data/glr.c (YYDSYMPRINTF): New.
1055 Use it.
1056
1057 2002-11-12 Paul Eggert <eggert@twinsun.com>
1058
1059 Version 1.75b.
1060
1061 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
1062 (yyglrReduce): Return yyok, not 0.
1063 This should avoid the enumerated-type warnings reported
1064 by Nelson H. F. Beebe in
1065 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
1066
1067 * lib/bbitset.h (BITSET_INLINE): Remove.
1068 * lib/bitset.h [! BITSET_INLINE]: Remove.
1069 (bitset_set, bitset_reset, bitset_test): Rename local vars
1070 to avoid shadowing warnings by GCC.
1071
1072 * data/glr.c (inline): Remove #define. It's the user's
1073 responsibility to #define it away, just like 'const'.
1074 This fixes one of the bugs reported by Nelson H. F. Beebe in
1075 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
1076
1077 * Makefile.maint (po-check): Scan .l and .y files instead of the
1078 .c and the .h files that they generate. This fixes the bug
1079 reported by Tim Van Holder in:
1080 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
1081 Look for N_ as well as for _. Try to avoid matching #define for
1082 N_ and _.
1083 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
1084 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
1085 * src/scan-gram.l: Revamp regular expressions so that " and '
1086 do not confuse xgettext.
1087
1088 * src/struniq.h (struniq_new): Do not declare the return type
1089 to be 'const'; this violates the C standard.
1090 * src/struniq.c (struniq_new): Likewise.
1091
1092 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
1093
1094 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
1095 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
1096 linker.
1097
1098 2002-11-12 Akim Demaille <akim@epita.fr>
1099
1100 * Makefile.maint: Sync with Autoconf:
1101 (local_updates): New.
1102
1103 2002-11-12 Akim Demaille <akim@epita.fr>
1104
1105 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
1106
1107 2002-11-12 Akim Demaille <akim@epita.fr>
1108
1109 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
1110 locations.
1111
1112 2002-11-12 Akim Demaille <akim@epita.fr>
1113
1114 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
1115 not yyvalue.
1116
1117 2002-11-12 Akim Demaille <akim@epita.fr>
1118
1119 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
1120 Use it to test the GLR parser.
1121
1122 2002-11-12 Akim Demaille <akim@epita.fr>
1123
1124 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
1125 defines it.
1126 * data/glr.c (yystos): New.
1127 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
1128 (YYDSYMPRINT): New.
1129 (yyval): Don't define it, it is handled via M4.
1130 (yyrecoverParseError): Free verbosely the discarded symbols.
1131 * data/yacc.c (yysymprint): Remove, rather...
1132 (b4_yysymprint_generate): invoke.
1133 * data/c.m4 (b4_yysymprint_generate): New.
1134 Accept pointers as arguments, as opposed to the version from
1135 yacc.c.
1136 (b4_yydestruct_generate): Likewise.
1137 * tests/cations.at (Printers and Destructors): Use Bison directives
1138 instead of CPP macros.
1139 Don't rely on internal details.
1140
1141 2002-11-12 Akim Demaille <akim@epita.fr>
1142
1143 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
1144 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
1145 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
1146 it against YYEMPTY and so forth), work on yytoken (i.e., set
1147 it to YYEMPTY etc.).
1148 (yydestruct): Replace with a b4_yydestruct_generate invocation.
1149 (b4_symbol_actions): Remove.
1150 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
1151 for 0, end-of-input.
1152
1153 2002-11-12 Akim Demaille <akim@epita.fr>
1154
1155 * doc/bison.texinfo (Destructor Decl): New.
1156
1157 2002-11-12 Akim Demaille <akim@epita.fr>
1158
1159 * src/tables.c (tables_generate): Use free for pointers that
1160 cannot be NULL, not XFREE.
1161 (pack_vector): Use assert, not fatal, for bound violations.
1162 * src/state.c (state_new): Likewise.
1163 * src/reader.c (reader): Likewise.
1164 * src/lalr.c (set_goto_map): Likewise.
1165 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
1166 the file name.
1167
1168 2002-11-12 Akim Demaille <akim@epita.fr>
1169
1170 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
1171 Restore.
1172 * src/scan-gram.l (last_string): Is global to the file, not to
1173 yylex.
1174 * src/parse-gram.y (input): Don't append the epilogue here,
1175 (epilogue.opt): do it here, and free the scanner's obstack.
1176 * src/reader.c (epilogue_set): Rename as...
1177 (epilogue_augment): this.
1178 * data/c.m4 (b4_epilogue): Defaults to empty.
1179
1180 2002-11-12 Akim Demaille <akim@epita.fr>
1181
1182 * src/getargs.c (long_options): Remove duplicates.
1183 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
1184 Remove.
1185 * doc/bison.rnh: Remove.
1186 * doc/bison.texinfo (VMS Invocation): Remove.
1187
1188 2002-11-12 Akim Demaille <akim@epita.fr>
1189
1190 * src/struniq.h, src/struniq.c (struniq_t): Is const.
1191 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
1192
1193 Use struniq for symbols.
1194
1195 * src/symtab.h (symbol_t): The tag member is a struniq.
1196 (symbol_type_set): Adjust.
1197 * src/symtab.c (symbol_new): Takes a struniq.
1198 (symbol_free): Don't free the tag member.
1199 (hash_compare_symbol_t, hash_symbol_t): Rename as...
1200 (hash_compare_symbol, hash_symbol): these.
1201 Use the fact that tags as struniqs.
1202 (symbol_get): Use struniq_new.
1203 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
1204 Returns a strniq.
1205 * src/reader.h (merger_list, grammar_currentmerge_set): The name
1206 and type members are struniqs.
1207 * src/reader.c (get_merge_function)
1208 (grammar_current_rule_merge_set): Adjust.
1209 (TYPE, current_type): Are struniq.
1210
1211 Use struniq for file names.
1212
1213 * src/files.h, src/files.c (infile): Split into...
1214 (grammar_file, current_file): these.
1215 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
1216 * src/reduce.c (reduce_print): Likewise.
1217 * src/getargs.c (getargs): Likewise.
1218 * src/complain.h, src/complain.c: Likewise.
1219 * src/main.c (main): Call struniqs_new early enough to use it for
1220 file names.
1221 Don't free the input file name.
1222
1223 2002-11-12 Akim Demaille <akim@epita.fr>
1224
1225 * src/symtab.c (symbol_free): Remove dead deactivated code:
1226 type_name are properly removed.
1227 Don't use XFREE to free items that cannot be NULL.
1228 * src/struniq.h, src/struniq.c: New.
1229 * src/main.c (main): Initialize/free struniqs.
1230 * src/parse-gram.y (%union): Add astruniq member.
1231 (yyprint): Adjust.
1232 * src/scan-gram.l (<{tag}>): Return a struniq.
1233 Free the obstack bit that used to store it.
1234 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
1235
1236 2002-11-11 Paul Eggert <eggert@twinsun.com>
1237
1238 Revamp to fix many (but not all) of the C- and M4-related quoting
1239 problems. Among other things, this fixes the Bison bug reported
1240 by Jan Hubicka when processing the Bash grammar; see:
1241 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
1242
1243 Use new @ escapes consistently. Represent brackets with @{ and @}
1244 rather than @<:@ and @:>@, since this works a bit better with dumb
1245 editors like vi. Represent @ with @@, since @ is now consistently
1246 an escape. Use @oline@ and @ofile@ rather than __oline__ and
1247 __ofile__, to avoid unexpected expansions. Similarly, use @output
1248 rather than #output.
1249
1250 * data/c.m4 (b4_copyright): Omit file name from comment, since
1251 the file name could contain "*/".
1252 (b4_synclines_flag): Don't quote the 2nd argument; it should already
1253 be quoted. All uses changed.
1254
1255 * data/glr.c: Use new @ escapes consistently.
1256 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
1257 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
1258 Remove, since they couldn't handle arbitrary characters in file
1259 names.
1260 * data/lalr1.cc: Likewise.
1261 * data/yacc.c: Likewise.
1262
1263 * src/files.c (output_infix): Remove; all uses removed.
1264 * src/files.h: Likewise.
1265
1266 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
1267 mishandled funny characters in file names, and anyway it isn't
1268 needed any more.
1269 * data/yacc.c: Likewise.
1270 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
1271
1272 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
1273 * data/yacc.c: Likewise.
1274
1275 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
1276 strings now.
1277 (muscle_init): Quote filename as a C string.
1278 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
1279 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
1280 * src/output.c (escaped_file_name_output): New function.
1281 (prepare_symbols): Quote tokens for M4.
1282 (prepare): Don't insert output_infix, output_prefix,
1283 output_parser_name, output_header_name; this is now down by scan-skel.
1284 Insert skeleton as a C string.
1285
1286 * src/output.c (user_actions_output, symbol_destructors_output,
1287 symbol_printers_output): Quote filenames for C and M4.
1288 * src/reader.c (prologue_augment, epilogue_set): Likewise.
1289
1290 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
1291 escapes other than \\ and \'; this simplifies the code.
1292 (<SC_STRING>): Likewise, for \\ and \".
1293 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
1294 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
1295 Use new escapes @{ and @} for [ and ].
1296
1297 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
1298 them with auto vars.
1299 Switch to new escape scheme, where @ is the escape character uniformly.
1300 Abort if a stray escape character is found. Avoid unbounded input
1301 buffer when parsing non-escaped text.
1302
1303 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
1304 __oline__, #output, $@, and @{ do not have unintended meanings.
1305
1306 2002-11-09 Paul Eggert <eggert@twinsun.com>
1307
1308 Fix the test failure due to GCC warnings described in
1309 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
1310 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
1311 evaluate to 0 if it's impossible for NINF to be in the respective
1312 table.
1313 (yygetLRActions, yyrecoverParseError): Use them.
1314
1315 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
1316 counted in the token inserted at end of file. Now takes
1317 location_t *, not location_t, so that the location can be
1318 adjusted. All uses changed.
1319
1320 * tests/regression.at (Invalid inputs): Adjust wording in
1321 diagnostic to match the new behavior.
1322
1323 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
1324 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
1325 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
1326 abort ();'. This reduces the runtime of the "Many lookaheads"
1327 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
1328 GCC 3.2.
1329
1330 2002-11-07 Paul Eggert <eggert@twinsun.com>
1331
1332 * src/parse-gram.y (CHARACTER): Remove unused token.
1333 All uses removed.
1334
1335 * src/scan-gram.l: Remove stack option. We no longer use the
1336 stack, since the stack was never deeper than 1; instead, use the
1337 new auto var c_context to record the stacked value.
1338
1339 Remove nounput option. At an unexpected end of file, we now unput
1340 the minimal input necessary to end cleanly; this simplifies the
1341 code.
1342
1343 Avoid unbounded token sizes where this is easy.
1344
1345 (unexpected_end_of_file): New function.
1346 Use it to systematize the error message on unexpected EOF.
1347 (last-string): Now auto, not static.
1348 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
1349 (scanner_last_string_free): Remove; not used.
1350 (percent_percent_count): Move decl to just before use.
1351 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
1352 not the (never otherwised-used) CHARACTER.
1353
1354 2002-11-07 Akim Demaille <akim@epita.fr>
1355
1356 Let yyerror always receive the msg as last argument, so that
1357 yyerror can be variadic.
1358
1359 * data/yacc.c (b4_yyerror_args): New.
1360 Use it when calling yyerror.
1361 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
1362 Use it when calling yyerror.
1363 * doc/bison.texinfo (Error Reporting): Adjust.
1364 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
1365 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
1366
1367 2002-11-06 Akim Demaille <akim@epita.fr>
1368
1369 #line should have quoted strings.
1370 Ideally, this should be done by m4_quotearg.
1371
1372 * src/scan-skel.l: Include quotearg.h.
1373 Quote __ofile__.
1374 * src/output.c (symbol_printers_output)
1375 (symbol_destructors_output): Quote the file name.
1376
1377 2002-11-06 Akim Demaille <akim@epita.fr>
1378
1379 * tests/regression.at (Invalid inputs): Adjust to the recent
1380 messages.
1381
1382 2002-11-06 Akim Demaille <akim@epita.fr>
1383
1384 Restore --no-lines.
1385 Reported by Jim Kent.
1386
1387 * data/c.m4 (b4_syncline): New.
1388 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
1389 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
1390 * src/output.c (user_actions_output): Likewise.
1391 (prepare): Define 'b4_synclines_flag'.
1392 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
1393
1394 2002-11-06 Akim Demaille <akim@epita.fr>
1395
1396 * src/main.c (main): Free `infile'.
1397 * src/scan-gram.l (handle_syncline): New.
1398 Recognize `#line'.
1399 * src/output.c (user_actions_output, symbol_destructors_output)
1400 (symbol_printers_output): Use the location's file name, not
1401 infile.
1402 * src/reader.c (prologue_augment, epilogue_set): Likewise.
1403
1404 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1405
1406 * src/tables.c (matching_state): Don't allow states to match if
1407 either has GLR conflict entries.
1408
1409 2002-11-05 Paul Eggert <eggert@twinsun.com>
1410
1411 * src/scan-gram.l: Use more accurate diagnostics, e.g.
1412 "integer out of range" rather than "invalid value".
1413 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
1414 accordingly.
1415
1416 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
1417 Also, remove one static variable in the scanner.
1418
1419 * src/scan-gram.l (braces_level): Now auto, not static.
1420 Initialize to zero if the compiler is being picky.
1421 (INITIAL): Clear braces_level instead of incrementing it.
1422 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
1423 as POSIX 1003.1-2001 requires.
1424 * src/system.h (IF_LINT): New macro, taken from coreutils.
1425 * configure.ac: Define "lint" if --enable-gcc-warnings.
1426
1427 2002-11-05 Akim Demaille <akim@epita.fr>
1428
1429 * src/scan-gram.l: When it starts with `%', complain about the
1430 whole directive, not just that `invalid character: %'.
1431
1432 2002-11-04 Akim Demaille <akim@epita.fr>
1433
1434 * Makefile.maint: Update from Autoconf.
1435 (update, cvs-update, po-update, do-po-update): New.
1436
1437 2002-11-04 Akim Demaille <akim@epita.fr>
1438
1439 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
1440 and yyerror.
1441 Have yyerror `use' its arguments.
1442 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
1443 returns true when location & yacc & pure & parse-param.
1444 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
1445
1446 2002-11-04 Akim Demaille <akim@epita.fr>
1447
1448 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
1449 clashes.
1450 * src/scan-gram.l: Use [\'] instead of ['] to pacify
1451 font-lock-mode.
1452 Use complain_at.
1453 Use quote, not quote_n since LOCATION_PRINT no longer uses the
1454 slot 0.
1455
1456 2002-11-03 Paul Eggert <eggert@twinsun.com>
1457
1458 * src/reader.c (get_merge_function, grammar_current_rule_check):
1459 Use consistent diagnostics for reporting type name clashes.
1460 Quote the types with <>, for consistency with Yacc.
1461 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
1462
1463 2002-11-03 Akim Demaille <akim@epita.fr>
1464
1465 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
1466 New.
1467 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
1468 (b4_parse_param): Remove.
1469 Use b4_identification.
1470 Propagate b4_pure_args where needed to pass them to yyerror.
1471 * data/glr.m4 (b4_parse_param): Remove.
1472 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
1473 (b4_lpure_formals): New.
1474 Use b4_identification.
1475 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
1476 b4_user_formals and b4_user_args.
1477 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
1478 (yyreportAmbiguity): When using a pure parser, also need
1479 the location, and the parse-params.
1480 Adjust callers.
1481 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
1482 When using a pure parser, also need the parse-params.
1483 Adjust callers.
1484 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
1485 (%pure-parser + %parse-param) LALR and GLR parsers.
1486 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
1487 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
1488 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
1489 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
1490 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
1491 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
1492 * doc/bison.texinfo: Untabify the whole file.
1493 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
1494 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
1495 (Error Reporting): Adjust to these new directives.
1496 Document %error-verbose, deprecate YYERROR_VERBOSE.
1497
1498 2002-11-03 Akim Demaille <akim@epita.fr>
1499
1500 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
1501 AT_CHECK_CALC_GLR invocations to use % directives, instead of
1502 command line options.
1503 * tests/cxx-type.at: Formatting changes.
1504
1505 2002-11-03 Paul Eggert <eggert@twinsun.com>
1506
1507 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
1508 to count columns correctly, and to check for invalid inputs.
1509
1510 Use mbsnwidth to count columns correctly. Account for tabs, too.
1511 Include mbswidth.h.
1512 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
1513 (extend_location): New function.
1514 (YY_LINES): Remove.
1515
1516 Handle CRLF in C code rather than in Lex code.
1517 (YY_INPUT): New macro.
1518 (no_cr_read): New function.
1519
1520 Scan UCNs, even though we don't fully handle them yet.
1521 (convert_ucn_to_byte): New function.
1522
1523 Handle backslash-newline correctly in C code.
1524 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
1525 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
1526 all uses changed.
1527 (tag, splice): New EREs. Do not allow NUL or newline in tags.
1528 Use {splice} wherever C allows backslash-newline.
1529 YY_STEP after space, newline, vertical-tab.
1530 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
1531
1532 (letter, id): Don't assume ASCII; e.g., spell out a-z.
1533
1534 ({int}, handle_action_dollar, handle_action_at): Check for integer
1535 overflow.
1536
1537 (YY_STEP): Omit trailing semicolon, so that it's more like C.
1538
1539 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
1540 as well as \000. Check for UCHAR_MAX, not 255.
1541 Allow \x with an arbitrary positive number of digits, as in C.
1542 Check for overflow here.
1543 Allow \? and UCNs, for compatibility with C.
1544
1545 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
1546 with quote slot used by complain_at.
1547
1548 * tests/input.at: Add tests for backslash-newline, m4 quotes
1549 in symbols, long literals, and funny escapes in strings.
1550
1551 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
1552 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
1553 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
1554 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
1555 * m4/mbswidth.m4: New file, from GNU coreutils.
1556
1557 * doc/bison.texinfo (Grammar Outline): Document // comments.
1558 (Symbols): Document that trigraphs have no special meaning in Bison,
1559 nor is backslash-newline allowed.
1560 (Actions): Document that trigraphs have no special meaning.
1561
1562 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
1563 no longer used.
1564
1565 2002-11-02 Paul Eggert <eggert@twinsun.com>
1566
1567 * src/reader.c: Don't include quote.h; not needed.
1568 (get_merge_function): Reword warning to be consistent with
1569 type clash diagnostic in grammar_current_rule_check.
1570
1571 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
1572 bug in trigraph handling.
1573
1574 * src/output.c (prepare_symbols): When printing token names,
1575 escape "[" as "@<:@" and likewise for "]".
1576
1577 * src/system.h (errno): Remove declaration, as we are now
1578 assuming C89 or better, and C89 guarantees errno.
1579
1580 2002-10-30 Paul Eggert <eggert@twinsun.com>
1581
1582 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
1583 Check for close failures.
1584 * src/files.h (xfclose): Return void, not int, since it always
1585 returned zero.
1586 * src/files.c (xfclose): Likewise. Report I/O error if ferror
1587 indicates one.
1588 * src/output.c (output_skeleton): Use xfclose rather than fclose
1589 and ferror. xfclose now checks ferror.
1590
1591 * data/glr.c (YYLEFTMOST_STATE): Remove.
1592 (yyreportTree): Use a stack-based leftmost state. This avoids
1593 our continuing battles with bogus warnings about initializers.
1594
1595 2002-10-30 Akim Demaille <akim@epita.fr>
1596
1597 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
1598 #if.
1599
1600 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1601
1602 * tests/glr-regr1.at: New test for reported regressions.
1603 * tests/testsuite.at: Add glr-regr1.at test.
1604 * tests/Makefile.am: Add glr-regr1.at test.
1605
1606 2002-10-24 Paul Eggert <eggert@twinsun.com>
1607
1608 Version 1.75a.
1609
1610 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
1611 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
1612 we use malloc. Don't assume 'A' through 'Z' are contiguous.
1613 Don't assume strdup exists; POSIX says its an XSI extension.
1614 Check for buffer overflow on input.
1615
1616 2002-10-24 Akim Demaille <akim@epita.fr>
1617
1618 * src/output.c (output_skeleton): Don't disable M4sugar comments
1619 too soon: it results in comments being expanded.
1620 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
1621 first output.
1622
1623 2002-10-24 Akim Demaille <akim@epita.fr>
1624
1625 * data/yacc.c (m4_int_type): New.
1626 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
1627 char' as only yacc.c wants K&R portability.
1628 * data/glr.c (yysigned_char): Remove.
1629 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
1630 Reported by Quoc Peyrot.
1631
1632 2002-10-23 Paul Eggert <eggert@twinsun.com>
1633
1634 * src/main.c (main): With --trace=time, report times even if a
1635 non-fatal error occurs. Formerly, the times were reported in some
1636 such cases but not in others.
1637 * src/reader.c (reader): Just return if a complaint has been issued,
1638 instead of exiting, so that 'main' can report times.
1639
1640 2002-10-22 Akim Demaille <akim@epita.fr>
1641
1642 * src/system.h: Include sys/types.
1643 Reported by Bert Deknuydt.
1644
1645 2002-10-23 Paul Eggert <eggert@twinsun.com>
1646
1647 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
1648 Suggested by Art Haas.
1649
1650 2002-10-22 Paul Eggert <eggert@twinsun.com>
1651
1652 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
1653 decl; not needed any more.
1654 * src/main.c (main): Use return to exit, undoing yesterday's change.
1655 The last OS that we could find where this wouldn't work is
1656 SunOS 3.5, and that's too old to worry about now.
1657
1658 * data/glr.c (struct yyltype): Define members even when not
1659 doing locations. This is more consistent with yacc.c, and it
1660 works around the following bug reports:
1661 http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
1662 http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
1663
1664 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
1665 @acronym consistently. Standardize on "Yacc" instead of "YACC",
1666 "Algol" instead of "ALGOL". Give a bit more history about BNF.
1667
1668 2002-10-22 Akim Demaille <akim@epita.fr>
1669
1670 * data/README: New.
1671
1672 2002-10-21 Paul Eggert <eggert@twinsun.com>
1673
1674 Be consistent about 'bool'; the old code used an enum in one
1675 module and an int in another, and this violates the C standard.
1676 * m4/stdbool.m4: New file, from coreutils 4.5.3.
1677 * configure.ac (AC_HEADER_STDBOOL): Add.
1678 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
1679 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
1680 * src/symtab.c (hash_compare_symbol_t): Likewise.
1681 * src/system.h (bool, false, true): Use a definition consistent
1682 with ../lib/hash.c. All uses changed.
1683
1684 * src/complain.c (warning_issued): Renamed from warn_message_count,
1685 so that we needn't worry about integer overflow (!).
1686 Now of type bool. All uses changed.
1687 (complaint_issued): Renamed from complain_message_count; likewise.
1688
1689 * src/main.c (main): Use exit to exit with failure.
1690
1691 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
1692 rather than 1 and 0.
1693 * src/main.c (main): Likewise.
1694 * src/getargs.c (getargs): Likewise.
1695 * src/reader.c (reader): Likewise.
1696
1697 * src/getarg.c (getargs): Remove duplicate code for
1698 "Try `bison --help'".
1699
1700 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
1701 What was that "2" for?
1702
1703 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
1704 * src/getargs.c (usage): Likewise.
1705
1706 * src/getargs.c (getargs): When there are too few operands, report
1707 the last one. When there are too many, report the first extra
1708 one. This is how diffutils does it.
1709
1710 2002-10-20 Paul Eggert <eggert@twinsun.com>
1711
1712 Remove K&R vestiges.
1713 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
1714 * src/complain.c (VA_START): Remove. Assume prototypes.
1715 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
1716 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
1717 fatal): Assume prototypes.
1718 * src/complain.h: Assume prototypes.
1719 * src/system.h (PARAMS): Remove.
1720 Include <limits.h> unconditionally, since it's guaranteeed even
1721 for a freestanding C89 compiler.
1722 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
1723 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
1724
1725 2002-10-20 Akim Demaille <akim@epita.fr>
1726
1727 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
1728 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
1729 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
1730 (yyresolveStates, yyresolveAction, yyresolveStack)
1731 (yyprocessOneStack): Use them.
1732 (yy_reduce_print): New.
1733 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
1734
1735 2002-10-20 Akim Demaille <akim@epita.fr>
1736
1737 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
1738 arguments and output `void'.
1739 (b4_c_function): Rename as...
1740 (b4_c_function_def): this.
1741 (b4_c_function_decl, b4_c_ansi_function_def)
1742 (b4_c_ansi_function_decl): New.
1743 Change the interpretation of the arguments: before `int, foo', now
1744 `int foo, foo'.
1745 * data/yacc.c (yyparse): Prototype and define thanks to these.
1746 Adjust b4_c_function_def uses.
1747 * data/glr.c (yyparse): Likewise, but ANSI only.
1748
1749 2002-10-20 Akim Demaille <akim@epita.fr>
1750
1751 * src/output.c (prepare): Move the definition of `tokens_number',
1752 `nterms_number', `undef_token_number', `user_token_number_max'
1753 to...
1754 (prepare_tokens): Here.
1755 (prepare_tokens): Rename as...
1756 (prepare_symbols): this.
1757 (prepare): Move the definition of `rules_number' to...
1758 (prepare_rules): here.
1759 (prepare): Move the definition of `last', `final_state_number',
1760 `states_number' to...
1761 (prepare_states): here.
1762 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
1763
1764 2002-10-20 Akim Demaille <akim@epita.fr>
1765
1766 * src/tables.h, src/tables.c, src/output.c: Comment changes.
1767
1768 2002-10-20 Akim Demaille <akim@epita.fr>
1769
1770 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
1771 * data/c.m4: here.
1772
1773 2002-10-20 Akim Demaille <akim@epita.fr>
1774
1775 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
1776 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
1777 `pair'.
1778 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
1779 `name' to...
1780 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
1781 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
1782 These.
1783
1784 2002-10-19 Paul Eggert <eggert@twinsun.com>
1785
1786 Do not create a temporary file, as that involves security and
1787 cleanup headaches. Instead, use a pair of pipes.
1788 Derived from a suggestion by Florian Krohm.
1789 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
1790 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
1791 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
1792 (BISON_PREREQ_SUBPIPE): Add.
1793 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
1794 Add subpipe.h, subpipe.c.
1795 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
1796 * po/POTFILES.in: Add lib/subpipe.c.
1797 * src/output.c: Include "subpipe.h".
1798 (m4_invoke): Remove decl.
1799 (scan_skel): New decl.
1800 (output_skeleton): Use pipe rather than temporary file for m4 input.
1801 Check that m4sugar.m4 is readable, to avoid deadlock.
1802 Check for pipe I/O error.
1803 * src/scan-skel.l (readpipe): Remove decl.
1804 (scan_skel): New function, to be used in place of m4_invoke.
1805 Read from stream rather than file.
1806
1807 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
1808 float, as this generates a warning on Solaris 8 + GCC 3.2 with
1809 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
1810 this generates a more-accurate value anyway.
1811
1812 * lib/timevar.c (timervar_accumulate): Rename locals to
1813 avoid confusion with similarly-named more-global.
1814 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
1815
1816 * src/output.c (prepare): Use xstrdup to convert char const *
1817 to char *, to avoid GCC warning.
1818
1819 2002-10-19 Akim Demaille <akim@epita.fr>
1820
1821 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
1822 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
1823 Use them to have `calc.y' ready for %pure-parser.
1824 * data/yacc.c (YYLEX): Pass a yylex return type to
1825 b4_c_function_call.
1826
1827 2002-10-19 Akim Demaille <akim@epita.fr>
1828
1829 Prototype support of %lex-param and %parse-param.
1830
1831 * src/parse-gram.y: Add the definition of the %lex-param and
1832 %parse-param tokens, plus their rules.
1833 Drop the `_' version of %glr-parser.
1834 Add the "," token.
1835 * src/scan-gram.l (INITIAL): Scan them.
1836 * src/muscle_tab.c: Comment changes.
1837 (muscle_insert, muscle_find): Rename `pair' as `probe'.
1838 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
1839 (muscle_entry_s): The `value' member is no longer const.
1840 Adjust all dependencies.
1841 * src/muscle_tab.c (muscle_init): Adjust: use
1842 MUSCLE_INSERT_STRING.
1843 Initialize the obstack earlier.
1844 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
1845 (muscle_pair_list_grow): New.
1846 * data/c.m4 (b4_c_function_call, b4_c_args): New.
1847 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
1848 * tests/calc.at: Use %locations, not --locations.
1849 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
1850
1851 2002-10-19 Akim Demaille <akim@epita.fr>
1852
1853 * src/getargs.c (usage): Take status as argument and exit
1854 accordingly.
1855 Report the traditional `Try ... --help' message when status != 0.
1856 (usage, version): Don't take a FILE * as arg, it is pointless.
1857 (getargs): When there is an incorrect number of arguments, make it
1858 an error, and report it GNUlically thanks to `usage ()'.
1859
1860 2002-10-18 Paul Eggert <eggert@twinsun.com>
1861
1862 * data/glr.c (yyreportParseError): Don't assume that sprintf
1863 yields the length of the printed string, as this is not true
1864 on SunOS 4.1.4. Reported by Peter Klein.
1865
1866 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
1867 * tests/conflicts.at (%nonassoc and eof): Likewise.
1868 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
1869
1870 2002-10-17 Akim Demaille <akim@epita.fr>
1871
1872 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
1873 * src/getargs.c (trace_types, trace_args): Adjust.
1874 * src/reader.c (grammar_current_rule_prec_set)
1875 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
1876 Standardize error messages.
1877 And s/@prec/%prec/!
1878 (reader): Use trace_flag to enable scanner/parser debugging,
1879 instead of an adhoc scheme.
1880 * src/scan-gram.l: Remove trailing debugging code.
1881
1882 2002-10-16 Paul Eggert <eggert@twinsun.com>
1883
1884 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
1885 MUSCLE_TAB_H.
1886
1887 * NEWS: Officially drop support for building Bison with K&R C,
1888 since it didn't work anyway and it's not worth worrying about.
1889 * Makefile.maint (wget_files): Remove ansi2knr.c.
1890 (ansi2knr.c-url_prefix): Remove.
1891 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
1892 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
1893 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
1894
1895 2002-10-15 Paul Eggert <eggert@twinsun.com>
1896
1897 Stop using the "enum_" trick for K&R-style function definitions;
1898 it confused me, and I was the author! Instead, assume that people
1899 who want to use K&R C compilers (when using these modules in GCC,
1900 perhaps?) will run ansi2knr.
1901
1902 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
1903 All uses of "enum_" changed to "enum ".
1904 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
1905 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
1906
1907 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
1908 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
1909 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
1910 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
1911 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
1912 abitset_not, abitset_ones, abitset_or, abitset_or_and,
1913 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
1914 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
1915 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
1916 Use function prototypes; this removes the need for declaring
1917 static functions simply to provide their prototypes.
1918 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
1919 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
1920 bitset_count_, bitset_create, bitset_dump, bitset_first,
1921 bitset_free, bitset_init, bitset_last, bitset_next,
1922 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
1923 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
1924 bitset_print, bitset_release_memory, bitset_toggle_,
1925 bitset_type_choose, bitset_type_get, bitset_type_name_get,
1926 debug_bitset): Likewise.
1927 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
1928 * lib/bitset_stats.c (bitset_log_histogram_print,
1929 bitset_percent_histogram_print, bitset_stats_and,
1930 bitset_stats_and_cmp, bitset_stats_and_or,
1931 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
1932 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
1933 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
1934 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
1935 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
1936 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
1937 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
1938 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
1939 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
1940 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
1941 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
1942 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
1943 bitset_stats_zero): Likewise.
1944 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
1945 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
1946 bitsetv_dump, debug_bitsetv): Likewise.
1947 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
1948 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
1949 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
1950 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
1951 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
1952 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
1953 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
1954 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
1955 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
1956 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
1957 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
1958 Likewise.
1959 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
1960 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
1961 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
1962 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
1963 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
1964 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
1965 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
1966 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
1967 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
1968 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
1969 lbitset_xor_cmp, lbitset_zero): Likewise.
1970
1971 2002-10-14 Akim Demaille <akim@epita.fr>
1972
1973 Version 1.75.
1974
1975 2002-10-14 Akim Demaille <akim@epita.fr>
1976
1977 * tests/Makefile.am (maintainer-check-posix): New.
1978
1979 2002-10-14 Akim Demaille <akim@epita.fr>
1980
1981 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
1982 member.
1983
1984 2002-10-14 Akim Demaille <akim@epita.fr>
1985
1986 * src/tables.c (table_ninf_remap): base -> tab.
1987 Reported by Matt Rosing.
1988
1989 2002-10-14 Paul Eggert <eggert@twinsun.com>
1990
1991 * tests/action.at, tests/calc.at, tests/conflicts.at,
1992 tests/cxx-type.at, tests/headers.at, tests/input.at,
1993 tests/regression.at, tests/synclines.at, tests/torture.at:
1994 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
1995 so that the tests still work even if POSIXLY_CORRECT is set.
1996 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
1997
1998 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
1999 for portability to K&R hosts. Fix typo: signed char is guaranteed
2000 only to 127, not to 128.
2001 * data/glr.c (yysigned_char): New type.
2002 * data/yacc.c (yysigned_char): Likewise.
2003 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
2004
2005 2002-10-13 Paul Eggert <eggert@twinsun.com>
2006
2007 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
2008 true due to limited range of data type" warning from GCC.
2009
2010 * data/c.m4 (b4_token_defines): Protect against double-inclusion
2011 by wrapping enum yytokentype's definition inside #ifndef
2012 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
2013
2014 2002-10-13 Akim Demaille <akim@epita.fr>
2015
2016 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
2017 Un yy- yyrhs to avoid the name clash with the global YYRHS.
2018
2019 2002-10-13 Akim Demaille <akim@epita.fr>
2020
2021 * Makefile.maint: Update from Autoconf 2.54.
2022 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
2023
2024 2002-10-13 Akim Demaille <akim@epita.fr>
2025
2026 * src/print.c (print_state): Separate the list of solved conflicts
2027 from the other items.
2028 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
2029
2030 2002-10-13 Akim Demaille <akim@epita.fr>
2031
2032 Let nondeterministic skeletons be usable with deterministic
2033 tables.
2034
2035 With the patch, GAWK compiled by GCC without -O2 passes its test
2036 suite using a GLR parser driven by LALR tables. It fails with -O2
2037 because `struct stat' gives two different answers on my machine:
2038 88 (definition of an auto var) and later 96 (memset on this var).
2039 Hence the stack is badly corrumpted. The headers inclusion is to
2040 blame: if I move the awk.h inclusion before GLR's system header
2041 inclusion, the two struct stat have the same size.
2042
2043 * src/tables.c (pack_table): Always create conflict_table.
2044 (token_actions): Always create conflict_list.
2045 * data/glr.c (YYFLAG): Remove, unused.
2046
2047 2002-10-13 Akim Demaille <akim@epita.fr>
2048
2049 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
2050 (O0FLAGS): New.
2051 (VALGRIND, GXX): New.
2052 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
2053 * tests/bison.in: Run $PREBISON a pre-command.
2054 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
2055 (maintainer-check-g++): New.
2056 * Makefile.am (maintainer-check): New.
2057
2058 2002-10-13 Akim Demaille <akim@epita.fr>
2059
2060 * data/glr.c: Formatting changes.
2061 Tweak some trace messages to match yacc.c's.
2062
2063 2002-10-13 Akim Demaille <akim@epita.fr>
2064
2065 GLR parsers sometimes raise parse errors instead of performing the
2066 default reduction.
2067 Reported by Charles-Henry de Boysson.
2068
2069 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
2070 check the length of the traces when %glr.
2071 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
2072 GLR's traces.
2073 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
2074 Test GLR parsers.
2075 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
2076 (yyltype): Remove the yy prefix from the member names.
2077 (yytable): Complete its comment.
2078 (yygetLRActions): Map error action number from YYTABLE from
2079 YYTABLE_NINF to 0.
2080 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
2081 (which was a bug: it should have been YYTABEL_NINF, and yet it was
2082 not satisfying as we could compare an YYACTION computed from
2083 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
2084 only value for error actions.
2085 (yyreportParseError): In verbose parse error messages, don't issue
2086 `error' in the list of expected tokens.
2087 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
2088 next action to perform to match glr.c's decoding.
2089 (yytable): Complete its comment.
2090
2091 2002-10-13 Paul Eggert <eggert@twinsun.com>
2092
2093 Fix problem reported by Henrik Grubbstroem in
2094 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
2095 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
2096 because the Bison parser reads the second action before reducing
2097 the first one.
2098 * src/scan-gram.l (rule_length): New static var.
2099 Use it to keep track of the rule length in the scanner, since
2100 we can't expect the parser to be in lock-step sync with the scanner.
2101 (handle_action_dollar, handle_action_at): Use this var.
2102 * tests/actions.at (Exotic Dollars): Test for the problem.
2103
2104 2002-10-12 Paul Eggert <eggert@twinsun.com>
2105
2106 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
2107 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
2108 Include <sys/time.h> when checking for clock_t and struct tms.
2109 Use same include order as source.
2110 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
2111 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
2112
2113 * lib/timevar.c: Update copyright date and clarify comments.
2114 (get_time) [IN_GCC]: Keep the GCC version for reference.
2115
2116 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
2117 GCC version as of today, then merge Bison's changes.
2118 Change "GCC" to "Bison" in copyright notice. timevar.def's
2119 author is Akim, so change that too.
2120
2121 * src/reader.c (grammar_current_rule_check):
2122 Don't worry about the default action if $$ is untyped.
2123 Prevents bogus warnings reported by Jim Gifford in
2124 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
2125
2126 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
2127 * data/glr.c, data/lalr1.cc, data/yacc.c:
2128 Output token definitions before the first part of user declarations.
2129 Fixes compatibility problem reported by Jim Gifford for kbd in
2130 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
2131
2132 2002-10-11 Paul Eggert <eggert@twinsun.com>
2133
2134 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
2135 (yyparse): here. This undoes some of the 2002-07-25 change.
2136 Compatibility problem reported by Ralf S. Engelschall with
2137 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
2138
2139 2002-10-11 Akim Demaille <akim@epita.fr>
2140
2141 * tests/regression.at Characters Escapes): New.
2142 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
2143 characters.
2144 Reported by Jan Nieuwenhuizen.
2145
2146 2002-10-11 Akim Demaille <akim@epita.fr>
2147
2148 * po/id.po: New.
2149
2150 2002-10-10 Paul Eggert <eggert@twinsun.com>
2151
2152 Portability fixes for bitsets; this also avoids several GCC
2153 warnings.
2154
2155 * lib/abitset.c: Include <stddef.h>, for offsetof.
2156 * lib/lbitset.c: Likewise.
2157
2158 * lib/abitset.c (abitset_bytes): Return a size that is aligned
2159 properly for vectors of objects. Do not assume that adding a
2160 header size to a multiple of a word size yields a value that is
2161 properly aligned for the whole union.
2162 * lib/bitsetv.c (bitsetv_alloc): Likewise.
2163
2164 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
2165 unique names for structures.
2166 * lib/ebitset.c (ebitset_bytes): Likewise.
2167 * lib/lbitset.c (lbitset_bytes): Likewise.
2168
2169 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
2170 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
2171 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
2172 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
2173 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
2174 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
2175 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
2176 to improve the type-checking that GCC can do.
2177 * lib/bitset.c (bitset_op4_cmp): Likewise.
2178 * lib/bitset_stats.c (bitset_stats_count,
2179 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
2180 bitset_stats_copy, bitset_stats_disjoint_p,
2181 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
2182 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
2183 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
2184 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
2185 bitset_stats_and_or_cmp, bitset_stats_andn_or,
2186 bitset_stats_andn_or_cmp, bitset_stats_or_and,
2187 bitset_stats_or_and_cmp): Likewise.
2188 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
2189 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
2190 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
2191 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
2192
2193 * lib/abitset.h: Include bitset.h, not bbitset.h.
2194 * lib/ebitset.h: Likewise.
2195 * lib/lbitset.h: Likewise.
2196
2197 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
2198 All instances of parameters of type enum bitset_opts are now of
2199 type enum_bitset_opts, to conform to the C Standard, and similarly
2200 for enum_bitset_type.
2201 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
2202 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
2203
2204 Do not use "struct bitset_struct" to mean different things in
2205 different modules. Not only is this confusing, it violates
2206 the C Standard, which requires that structure types in different
2207 modules must be compatible if one is to be passed to the other.
2208 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
2209 All instances of "struct bitset_struct *" replaced with "bitset".
2210 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
2211 (union bitset_union, struct abitset_struct, struct ebitset_struct,
2212 struct lbitset_struct, struct bitset_stats_struct): New types.
2213 All uses of struct bitset_struct changed to union bitset_union,
2214 etc.
2215 * lib/abitset.c (struct abitset_struct, abitset,
2216 struct bitset_struct): Remove.
2217 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
2218 struct bitset_struct): Remove.
2219 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
2220 bitset_struct): Remove.
2221 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
2222 Likewise.
2223
2224 Do not call a function of type T using a call that assumes the
2225 function is of a different type U. Standard C requires that a
2226 function must be called with a type that is compatible with its
2227 definition.
2228 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
2229 New decls.
2230 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
2231 New functions.
2232 * lib/ebitset.c (PFV): Remove.
2233 * lib/lbitset.c (PFV): Likewise.
2234 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
2235 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
2236 decls.
2237 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
2238 (ebitset_vtable): Use them.
2239 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
2240 lbitset_xor): New functions.
2241 (lbitset_vtable): Use them.
2242
2243 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
2244 Declare.
2245
2246 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
2247 GCC warning.
2248 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
2249 Use offsetof, for simplicity.
2250
2251 2002-10-06 Paul Eggert <eggert@twinsun.com>
2252
2253 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
2254 the same width as int. This reapplies a hunk of the 2002-08-12 patch
2255 <http://mail.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
2256 which was inadvertently undone by the 2002-09-30 patch.
2257 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
2258 the same width as int.
2259
2260 2002-10-04 Paul Eggert <eggert@twinsun.com>
2261
2262 Version 1.50.
2263
2264 * configure.ac (AC_INIT), NEWS: Increment version number.
2265
2266 * doc/bison.texinfo: Minor spelling, grammar, and white space
2267 fixes.
2268 (Symbols): Mention that any negative value returned from yylex
2269 signifies end-of-input. Warn about negative chars. Mention
2270 the portable Standard C character set.
2271
2272 The GNU coding standard says CFLAGS and YFLAGS are reserved
2273 for the installer to set.
2274 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
2275 * src/Makefile.am (AM_CFLAGS): Likewise.
2276 (AM_YFLAGS): Renamed from YFLAGS.
2277
2278 Fix some MAX and MIN problems.
2279 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
2280 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
2281 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
2282 * src/reader.c (reader): Use it.
2283
2284 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
2285 POSIX 1003.1-2001 has removed fgrep.
2286
2287 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
2288
2289 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
2290 interpreted as signed.
2291 * lib/ebitset.c (ebitset_list): Fix bug.
2292
2293 2002-10-01 Paul Eggert <eggert@twinsun.com>
2294
2295 More fixes for 64-bit hosts and large bitsets.
2296
2297 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
2298 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
2299 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
2300 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
2301 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
2302 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
2303 bitset_count_): Likewise.
2304 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
2305 bitset_first, bitset_last): Likewise.
2306 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
2307 bitset_stats_list_reverse, bitset_stats_size,
2308 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
2309 Likewise.
2310 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
2311 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
2312 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
2313 bitsetv_reflexive_transitive_closure): Likewise.
2314 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
2315 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
2316 Likewise.
2317 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
2318 Likewise.
2319
2320 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
2321 Use size_t, not unsigned int, to count bytes.
2322 * lib/abitset.h (abitset_bytes): Likewise.
2323 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
2324 Likewise.
2325 * lib/bitset.h (bitset_bytes): Likewise.
2326 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
2327 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
2328 * lib/bitsetv.c (bitsetv_alloc): Likewise.
2329 * lib/ebitset.c (ebitset_bytes): Likewise.
2330 * lib/ebitset.h (ebitset_bytes): Likewise.
2331 * lib/lbitset.c (lbitset_bytes): Likewise.
2332 * lib/lbitset.h (lbitset_bytes): Likewise.
2333
2334 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
2335 abitset_subset_p, abitset_disjoint_p, abitset_and,
2336 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
2337 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
2338 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
2339 abitset_or_and, abitset_or_and_cmp):
2340 Use bitset_windex instead of unsigned int.
2341 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
2342 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
2343 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
2344 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
2345 Likewise.
2346 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
2347
2348 * lib/bitset.c (bitset_print):
2349 Use proper printf formats for widths of integer types.
2350 * lib/bitset_stats.c (bitset_percent_histogram_print,
2351 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
2352 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
2353 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
2354 * lib/lbitset.c (lbitset_bytes): Likewise.
2355
2356 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
2357 BITSET_SIZE_MAX): New macros.
2358 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
2359 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
2360 to BITSET_WINDEX_MAX.
2361
2362 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
2363 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
2364 since we now return the bitset_bindex type (not int).
2365
2366 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
2367 when computing sizes.
2368 * lib/ebitset.c (ebitset_elts_grow): Likewise.
2369
2370 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
2371 and avoid cast to unsigned.
2372
2373 2002-09-30 Akim Demaille <akim@epita.fr>
2374
2375 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
2376 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
2377 Updates from Michael Hayes.
2378
2379 2002-09-30 Art Haas <ahaas@neosoft.com>
2380
2381 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
2382 invocations.
2383 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
2384 defined.
2385
2386 2002-09-27 Akim Demaille <akim@epita.fr>
2387
2388 Version 1.49c.
2389
2390 2002-09-27 Akim Demaille <akim@epita.fr>
2391
2392 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
2393 (Because of AC_LIBSOURCE).
2394
2395 2002-09-27 Akim Demaille <akim@epita.fr>
2396
2397 Playing with Autoscan.
2398
2399 * configure.ac: Remove the old LIBOBJ tweaks.
2400 (AC_REPLACE_FUNCS): Add strrchr and strtol.
2401 * lib/strrchr.c: New.
2402 * lib/strtol.c: New, from the Coreutils 4.5.1.
2403
2404 2002-09-27 Akim Demaille <akim@epita.fr>
2405
2406 Playing with Autoscan.
2407
2408 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
2409 * lib/Makefile.am (libbison_a_SOURCES): No longer include
2410 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
2411 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
2412 Coreutils 4.5.1.
2413
2414 2002-09-24 Akim Demaille <akim@epita.fr>
2415
2416 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
2417 (Frequently Asked Questions, Parser Stack Overflow): New.
2418
2419 2002-09-13 Akim Demaille <akim@epita.fr>
2420
2421 Playing with autoscan.
2422
2423 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
2424 * src/files.c (skeleton_find): Remove, unused.
2425 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
2426 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
2427
2428 2002-09-13 Akim Demaille <akim@epita.fr>
2429
2430 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
2431 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
2432
2433 2002-09-13 Akim Demaille <akim@epita.fr>
2434
2435 * configure.ac: Require 2.54.
2436 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
2437 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
2438 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
2439 Remove, provided by Autoconf macros.
2440
2441 2002-09-12 Akim Demaille <akim@epita.fr>
2442
2443 * m4/prereq.m4: Update, from Coreutils 4.5.1.
2444
2445 2002-09-12 Akim Demaille <akim@epita.fr>
2446
2447 * m4/prereq.m4: Update, from Fileutils 4.1.5.
2448 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
2449 Reported by Martin Mokrejs.
2450
2451 2002-09-10 Akim Demaille <akim@epita.fr>
2452
2453 * src/parse-gram.y: Associate a human readable string to each
2454 token type.
2455 * tests/regression.at (Invalid inputs): Adjust.
2456
2457 2002-09-10 Gary V. Vaughan <gary@gnu.org>
2458
2459 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
2460 with an Autoconf-2.5x style configure.ac.
2461
2462 2002-09-06 Paul Eggert <eggert@twinsun.com>
2463
2464 * doc/bison.texinfo (Conditions): Make explicit that the GPL
2465 exception applies only to yacc.c. This is a modification of a
2466 patch originally suggested by Akim Demaille.
2467
2468 2002-09-06 Akim Demaille <akim@epita.fr>
2469
2470 * data/c.m4 (b4_copyright): Move the GPL exception comment from
2471 here to...
2472 * data/yacc.c: here.
2473
2474 * data/lalr1.cc (struct yyltype): Don't define it, since we use
2475 LocationType.
2476 (b4_ltype): Default to yy::Location from location.hh.
2477
2478 2002-09-04 Jim Meyering <jim@meyering.net>
2479
2480 * data/yacc.c: Guard the declaration of yytoknum also with
2481 `#ifdef YYPRINT', so it is declared only when used.
2482
2483 2002-09-04 Akim Demaille <akim@epita.fr>
2484
2485 * configure.in: Rename as...
2486 * configure.ac: this.
2487 Bump to 1.49c.
2488
2489 2002-09-04 Akim Demaille <akim@epita.fr>
2490
2491 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
2492 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
2493 translate maintainer only messages.
2494
2495 2002-08-12 Paul Eggert <eggert@twinsun.com>
2496
2497 Version 1.49b.
2498
2499 * Makefile.am (SUBDIRS): Remove intl.
2500 (DISTCLEANFILES): Remove.
2501 * NEWS: Mention that GNU M4 is now required. Clarify what is
2502 meant by "larger grammars". Mention the pt_BR translation.
2503 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
2504 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
2505 Bump version from 0.11.2 to 0.11.5.
2506 (BISON_PREREQ_STAGE): Remove.
2507 (AM_GNU_GETTEXT): Use external gettext.
2508 (AC_OUTPUT): Remove intl/Makefile.
2509
2510 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
2511
2512 * data/glr.c: Include string.h, for strlen.
2513 (yyreportParseError): Use size_t for yysize.
2514 (yy_yypstack): No longer nested inside yypstates, as nested
2515 functions are not portable. Do not assume size_t is the
2516 same width as int.
2517 (yypstates): Do not assume that ptrdiff_t is the same width
2518 as int, and similarly for yyposn and YYINDEX.
2519
2520 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
2521
2522 * lib/Makefile.am (INCLUDES): Do not include from the intl
2523 directory, which has been removed.
2524 * src/Makefile.am (INCLUDES): Likewise.
2525
2526 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
2527 (bitsets_sources, additional_bitsets_sources, timevars_sources):
2528 New vars.
2529
2530 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
2531 * tests/Makefile.am (EXTRA_DIST): Likewise.
2532
2533 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
2534 Do not assume that bitset_windex is the same width as unsigned.
2535
2536 * lib/abitset.c (abitset_unused_clear): Do not assume that
2537 bitset_word is the same width as int.
2538 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
2539 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
2540 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
2541 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
2542 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
2543
2544 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
2545 portability to one's complement hosts!).
2546 * lib/ebitset.c (ebitset_op1): Likewise.
2547 * lib/lbitset.c (lbitset_op1): Likewise.
2548
2549 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
2550 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
2551 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
2552 Sync with fileutils.
2553 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
2554 lib/gettext.h: Sync with diffutils.
2555
2556 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
2557 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
2558
2559 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
2560 PROTOTYPES to check for prototypes, and "defined __STDC__" to
2561 check for void *.
2562
2563 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
2564 size_t; the old version tried to do this but casted improperly.
2565 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
2566 (bitset_test): Now returns int, not unsigned long.
2567
2568 * lib/bitset_stats.c: Include "gettext.h".
2569 (_): New macro.
2570 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
2571 name locals "index", as it generates unnecessary warnings on some
2572 hosts that have an "index" function.
2573
2574 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
2575 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
2576 they need translation.
2577 * src/LR0.c (state_list_append, new_itemsets, get_state,
2578 append_states, generate_states): Likewise.
2579 * src/assoc.c (assoc_to_string): Likewise.
2580 * src/closure.c (print_closure, set_firsts, closure): Likewise.
2581 * src/gram.c (grammar_dump): Likewise.
2582 * src/injections.c (injections_compute): Likewise.
2583 * src/lalr.c (lookaheads_print): Likewise.
2584 * src/relation.c (relation_transpose): Likewise.
2585 * src/scan-gram.l: Likewise.
2586 * src/tables.c (table_grow, pack_vector): Likewise.
2587
2588 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
2589 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
2590 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
2591 * m4/mbstate_t.m4: Sync with fileutils.
2592 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
2593
2594 * po/LINGUAS: Add pt_BR.
2595 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
2596 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
2597 lib/timevar.c.
2598 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
2599 manual recommends.
2600 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
2601
2602 * src/complain.c (strerror_r): Remove decl; not needed.
2603 (strerror): Use same pattern as ../lib/error.c.
2604
2605 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
2606
2607 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
2608
2609 * src/main.c (main): Cast result of bindtextdomain and textdomain
2610 to void, to avoid a GCC warning when --disable-nls is in effect.
2611
2612 * src/scan-gram.l: Use strings rather than escapes when possible,
2613 to minimize the number of warnings from xgettext.
2614 (handle_action_dollar, handle_action_at): Don't use isdigit,
2615 as it mishandles negative chars and it may not work as expected
2616 outside the C locale.
2617
2618 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
2619 this is a GCC extension and is not portable to other compilers.
2620
2621 * src/system.h (alloca): Use same pattern as ../lib/error.c.
2622 Do not include <ctype.h>; no longer needed.
2623 Do not include <malloc.h>; no longer needed (and generates
2624 warnings on OpenBSD 3.0).
2625
2626 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
2627 it's not portable.
2628
2629 * tests/regression.at: Do not use 'cc -c input.c -o input';
2630 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
2631
2632 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
2633 exit status as failure, not just exit status 1. Sun C exits
2634 with status 2 sometimes.
2635
2636 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
2637 Use it for the two large tests.
2638
2639 2002-08-02 Akim Demaille <akim@epita.fr>
2640
2641 * src/conflicts.c (conflicts_output): Don't output rules never
2642 reduced here, since anyway that computation doesn't work.
2643 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
2644 (rule_useless_p, rule_never_reduced_p): New.
2645 (grammar_rules_partial_print): Use a filter instead of a range.
2646 Display the title only if needed.
2647 (grammar_rules_print): Adjust.
2648 (grammar_rules_never_reduced_report): New.
2649 * src/tables.c (action_row): Move the computation of rules never
2650 reduced to...
2651 (token_actions): here.
2652 * src/main.c (main): Make the parser before making the report, so
2653 that rules never reduced are computed.
2654 Call grammar_rules_never_reduced_report.
2655 * src/print.c (print_results): Report rules never reduced.
2656 * tests/conflicts.at, tests/reduce.at: Adjust.
2657
2658 2002-08-01 Akim Demaille <akim@epita.fr>
2659
2660 Instead of attaching lookaheads and duplicating the rules being
2661 reduced by a state, attach the lookaheads to the reductions.
2662
2663 * src/state.h (state_t): Remove the `lookaheads',
2664 `lookaheads_rule' member.
2665 (reductions_t): Add a `lookaheads' member.
2666 Use a regular array for the `rules'.
2667 * src/state.c (reductions_new): Initialize the lookaheads member
2668 to 0.
2669 (state_rule_lookaheads_print): Adjust.
2670 * src/state.h, src/state.c (state_reductions_find): New.
2671 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
2672 (count_rr_conflicts): Adjust.
2673 * src/lalr.c (LArule): Remove.
2674 (add_lookback_edge): Adjust.
2675 (state_lookaheads_count): New.
2676 (states_lookaheads_initialize): Merge into...
2677 (initialize_LA): this.
2678 (lalr_free): Adjust.
2679 * src/main.c (main): Don't free nullable and derives too early: it
2680 is used by --verbose.
2681 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
2682
2683 2002-08-01 Akim Demaille <akim@epita.fr>
2684
2685 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
2686 `rule_number_t**'.
2687 (set_derives, free_derives): Rename as...
2688 (derives_compute, derives_free): this.
2689 Adjust all dependencies.
2690 * src/nullable.c (set_nullable, free_nullable): Rename as...
2691 (nullable_compute, nullable_free): these.
2692 (rule_list_t): Store rule_t *, not rule_number_t.
2693 * src/state.c (state_rule_lookaheads_print): Directly compare rule
2694 pointers, instead of their numbers.
2695 * src/main.c (main): Call nullable_free, and derives_free earlier,
2696 as they were lo longer used.
2697
2698 2002-08-01 Akim Demaille <akim@epita.fr>
2699
2700 * lib/timevar.c (get_time): Include children time.
2701 * src/lalr.h (LA, LArule): Don't export them: used with the
2702 state_t.
2703 * src/lalr.c (LA, LArule): Static.
2704 * src/lalr.h, src/lalr.c (lalr_free): New.
2705 * src/main.c (main): Call it.
2706 * src/tables.c (pack_vector): Check whether loc is >= to the
2707 table_size, not >.
2708 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
2709 (tables_generate): do it, since that's also it which allocates
2710 them.
2711 Don't free LA and LArule, main does.
2712
2713 2002-07-31 Akim Demaille <akim@epita.fr>
2714
2715 Separate parser tables computation and output.
2716
2717 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
2718 (conflict_list, conflict_list_cnt, table, check, table_ninf)
2719 (yydefgoto, yydefact, high): Move to...
2720 * src/tables.h, src/tables.c: here.
2721 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
2722 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
2723 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
2724 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
2725 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
2726 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
2727 (action_row, save_row, token_actions, save_column, default_goto)
2728 (goto_actions, sort_actions, matching_state, pack_vector)
2729 (table_ninf_remap, pack_table, prepare_actions): Move to...
2730 * src/tables.c: here.
2731 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
2732 * src/output.c (token_actions, output_base, output_conflicts)
2733 (output_check): Merge into...
2734 (prepare_actions): this.
2735 (actions_output): Rename as...
2736 (user_actions_output): this.
2737 * src/main.c (main): Call tables_generate and tables_free.
2738
2739 2002-07-31 Akim Demaille <akim@epita.fr>
2740
2741 Steal GCC's --time-report support.
2742
2743 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
2744 stolen/adjusted from GCC.
2745 * m4/stage.m4: Remove time related checks.
2746 * m4/timevar.m4: New.
2747 * configure.in: Adjust.
2748 * src/system.h: Adjust to using timevar.h.
2749 * src/getargs.h, src/getargs.c: Support trace_time for
2750 --trace=time.
2751 * src/main.c (stage): Remove.
2752 (main): Replace `stage' invocations with timevar calls.
2753 * src/output.c: Insert pertinent timevar calls.
2754
2755 2002-07-31 Akim Demaille <akim@epita.fr>
2756
2757 Let --trace have arguments.
2758
2759 * src/getargs.h (enum trace_e): New.
2760 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
2761 (long_options, short_options): --trace/-T takes an optional
2762 argument.
2763 Change all the uses of trace_flag to reflect the new flags.
2764 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
2765
2766 Strengthen `stage' portability.
2767
2768 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
2769 * configure.in: Use it.
2770 Don't check for malloc.h and sys/times.h.
2771 * src/system.h: Include them when appropriate.
2772 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
2773 times and struct tms are available.
2774
2775 2002-07-30 Akim Demaille <akim@epita.fr>
2776
2777 In verbose parse error message, don't report `error' as an
2778 expected token.
2779 * tests/actions.at (Printers and Destructors): Adjust.
2780 * tests/calc.at (Calculator $1): Adjust.
2781 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
2782 error message, do not report the parser accepts the error token in
2783 that state.
2784
2785 2002-07-30 Akim Demaille <akim@epita.fr>
2786
2787 Normalize conflict related messages.
2788
2789 * src/complain.h, src/complain.c (warn, complain): New.
2790 * src/conflicts.c (conflicts_print): Use them.
2791 (conflict_report_yacc): New, extracted from...
2792 (conflicts_print): here.
2793 * tests/conflicts.at, tests/existing.at: Adjust.
2794
2795 2002-07-30 Akim Demaille <akim@epita.fr>
2796
2797 Report rules which are never reduced by the parser: those hidden
2798 by conflicts.
2799
2800 * src/LR0.c (save_reductions): Don't make the final state too
2801 different: save its reduction (accept) instead of having a state
2802 without any action (no shift or goto, no reduce).
2803 Note: the final state is now a ``regular'' state, i.e., the
2804 parsers now contain `reduce 0' as default reduction.
2805 Nevertheless, since they decide to `accept' when yystate =
2806 final_state, they still will not reduce rule 0.
2807 * src/print.c (print_actions, print_reduction): Adjust.
2808 * src/output.c (action_row): Track reduced rules.
2809 (token_actions): Report rules never reduced.
2810 * tests/conflicts.at, tests/regression.at: Adjust.
2811
2812 2002-07-30 Akim Demaille <akim@epita.fr>
2813
2814 `stage' was accidently included in a previous patch.
2815 Initiate its autoconfiscation.
2816
2817 * configure.in: Look for malloc.h and sys/times.h.
2818 * src/main.c (stage): Adjust.
2819 Report only when trace_flag.
2820
2821 2002-07-29 Akim Demaille <akim@epita.fr>
2822
2823 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
2824 state_number_t.
2825 (errs_t): symbol_t*, not symbol_number_t.
2826 (reductions_t): rule_t*, not rule_number_t.
2827 (FOR_EACH_SHIFT): New.
2828 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
2829 * src/print.c, src/print_graph.c: Adjust.
2830
2831 2002-07-29 Akim Demaille <akim@epita.fr>
2832
2833 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
2834
2835 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
2836 (endtoken, accept): these.
2837 * src/reader.c (reader): Set endtoken's default tag to "$end".
2838 Set undeftoken's tag to "$undefined" instead of "$undefined.".
2839 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
2840 Adjust.
2841
2842 2002-07-29 Akim Demaille <akim@epita.fr>
2843
2844 * src/reduce.c (reduce_grammar): When the language is empty,
2845 complain about the start symbol, not the axiom.
2846 Use its location.
2847 * tests/reduce.at (Empty Language): New.
2848
2849 2002-07-26 Akim Demaille <akim@epita.fr>
2850
2851 * src/reader.h, src/reader.c (gram_error): ... can't get
2852 yycontrol without making too strong assumptions on the parser
2853 itself.
2854 * src/output.c (prepare_tokens): Use the real 0th value of
2855 token_translations instead of `0'.
2856 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
2857 visible here.
2858 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
2859 for the time being: %locations ought to provide it to yyerror.
2860
2861 2002-07-25 Akim Demaille <akim@epita.fr>
2862
2863 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
2864 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
2865 * tests/regression.at (Web2c Actions): Adjust.
2866
2867 2002-07-25 Akim Demaille <akim@epita.fr>
2868
2869 Stop storing rules from 1 to nrules + 1.
2870
2871 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
2872 * src/nullable.c, src/output.c, src/print.c, src/reader.c
2873 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
2874 Iterate from 0 to nrules.
2875 Use rule_number_as_item_number and item_number_as_rule_number.
2876 Adjust to `derive' now containing possibly 0.
2877 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
2878 Handle the `- 1' part in rule numbers from/to item numbers.
2879 * src/conflicts.c (log_resolution): Fix the message which reversed
2880 shift and reduce.
2881 * src/output.c (action_row): Initialize default_rule to -1.
2882 (token_actions): Adjust.
2883 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
2884 expected output.
2885 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
2886
2887 2002-07-25 Akim Demaille <akim@epita.fr>
2888
2889 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
2890 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
2891 (b4_c_knr_arg_decl): New.
2892 * data/yacc.c: Use it to define yysymprint, yydestruct, and
2893 yyreport_parse_error.
2894
2895 2002-07-25 Akim Demaille <akim@epita.fr>
2896
2897 * data/yacc.c (yyreport_parse_error): New, extracted from...
2898 (yyparse): here.
2899 (yydestruct, yysymprint): Move above yyparse.
2900 Be K&R compliant.
2901
2902 2002-07-25 Akim Demaille <akim@epita.fr>
2903
2904 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
2905 replace...
2906 (b4_sint_type, b4_uint_type): these.
2907 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
2908 * tests/regression.at (Web2c Actions): Adjust.
2909
2910 2002-07-25 Akim Demaille <akim@epita.fr>
2911
2912 * src/gram.h (TIEM_NUMBER_MAX): New.
2913 (item_number_of_rule_number, rule_number_of_item_number): Rename
2914 as...
2915 (rule_number_as_item_number, item_number_as_rule_number): these.
2916 Adjust dependencies.
2917 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
2918 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
2919 (symbol_number_to_vector_number): New.
2920 (order): Of vector_number_t* type.
2921 (base_t, BASE_MAX, BASE_MIN): New.
2922 (froms, tos, width, pos, check): Of base_t type.
2923 (action_number_t, ACTION_MIN, ACTION_MAX): New.
2924 (actrow): Of action_number_t type.
2925 (conflrow): Of unsigned int type.
2926 (table_ninf, base_ninf): New.
2927 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
2928 (muscle_insert_int_table, muscle_insert_base_table)
2929 (muscle_insert_rule_number_table): New.
2930 (prepare_tokens): Output `toknum' as int_table.
2931 (action_row): Returns a rule_number_t.
2932 Use ACTION_MIN, not SHRT_MIN.
2933 (token_actions): yydefact is rule_number_t*.
2934 (table_ninf_remap): New.
2935 (pack_table): Use it for `base' and `table'.
2936 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
2937 replaced with...
2938 (YYPACT_NINF, YYTABLE_NINF): these.
2939 (yypact, yytable): Compute their types instead of hard-coded
2940 `short'.
2941 * tests/regression.at (Web2c Actions): Adjust.
2942
2943 2002-07-19 Akim Demaille <akim@epita.fr>
2944
2945 * src/scan-gram.l (id): Can start with an underscore.
2946
2947 2002-07-16 Akim Demaille <akim@epita.fr>
2948
2949 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
2950 Adjust all former `associativity' dependencies.
2951 * src/symtab.c (symbol_new): Default associativity is `undef', not
2952 `right'.
2953 (symbol_check_alias_consistence): Adjust.
2954
2955 2002-07-09 Akim Demaille <akim@epita.fr>
2956
2957 * doc/bison.texinfo: Properly set the ``header'' part.
2958 Use @dircategory ``GNU programming tools'' as per Texinfo's
2959 documentation.
2960 Use @copying.
2961
2962 2002-07-09 Akim Demaille <akim@epita.fr>
2963
2964 * lib/quotearg.h: Protect against multiple inclusions.
2965 * src/location.h (location_t): Add a `file' member.
2966 (LOCATION_RESET, LOCATION_PRINT): Adjust.
2967 * src/complain.c (warn_at, complain_at, fatal_at): Drop
2968 `error_one_per_line' support.
2969
2970 2002-07-09 Akim Demaille <akim@epita.fr>
2971
2972 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
2973 * src/reader.c (lineno): Remove.
2974 Adjust all dependencies.
2975 (get_merge_function): Take a location and use complain_at.
2976 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
2977 * tests/regression.at (Invalid inputs, Mixing %token styles):
2978 Adjust.
2979
2980 2002-07-09 Akim Demaille <akim@epita.fr>
2981
2982 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
2983 recovery rule, and forbid extensions when --yacc.
2984 (gram_error): Use complain_at.
2985 * src/reader.c (reader): Exit if there were parse errors.
2986
2987 2002-07-09 Akim Demaille <akim@epita.fr>
2988
2989 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
2990 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
2991 Reported by R Blake <blakers@mac.com>.
2992
2993 2002-07-09 Akim Demaille <akim@epita.fr>
2994
2995 * data/yacc.c: Output the copyright notive in the header.
2996
2997 2002-07-03 Akim Demaille <akim@epita.fr>
2998
2999 * src/output.c (froms, tos): Are state_number_t.
3000 (save_column): sp, sp1, and sp2 are state_number_t.
3001 (prepare): Rename `final' as `final_state_number', `nnts' as
3002 `nterms_number', `nrules' as `rules_number', `nstates' as
3003 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
3004 unused.
3005 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
3006 * data/lalr1.cc (nsym_): Remove, unused.
3007
3008 2002-07-03 Akim Demaille <akim@epita.fr>
3009
3010 * src/lalr.h, src/lalr.c (goto_number_t): New.
3011 * src/lalr.c (goto_list_t): New.
3012 Propagate them.
3013 * src/nullable.c (rule_list_t): New.
3014 Propagate.
3015 * src/types.h: Remove.
3016
3017 2002-07-03 Akim Demaille <akim@epita.fr>
3018
3019 * src/closure.c (print_fderives): Use rule_rhs_print.
3020 * src/derives.c (print_derives): Use rule_rhs_print.
3021 (rule_list_t): New, replaces `shorts'.
3022 (set_derives): Add comments.
3023 * tests/sets.at (Nullable, Firsts): Adjust.
3024
3025 2002-07-03 Akim Demaille <akim@epita.fr>
3026
3027 * src/output.c (prepare_actions): Free `tally' and `width'.
3028 (prepare_actions): Allocate and free `order'.
3029 * src/symtab.c (symbols_free): Free `symbols'.
3030 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
3031 * src/output.c (m4_invoke): Move to...
3032 * src/scan-skel.l: here.
3033 (<<EOF>>): Close yyout, and free its name.
3034
3035 2002-07-03 Akim Demaille <akim@epita.fr>
3036
3037 Fix some memory leaks, and fix a bug: state 0 was examined twice.
3038
3039 * src/LR0.c (new_state): Merge into...
3040 (state_list_append): this.
3041 (new_states): Merge into...
3042 (generate_states): here.
3043 (set_states): Don't ensure a proper `errs' state member here, do it...
3044 * src/conflicts.c (conflicts_solve): here.
3045 * src/state.h, src/state.c: Comment changes.
3046 (state_t): Rename member `shifts' as `transitions'.
3047 Adjust all dependencies.
3048 (errs_new): For consistency, also take the values as argument.
3049 (errs_dup): Remove.
3050 (state_errs_set): New.
3051 (state_reductions_set, state_transitions_set): Assert that no
3052 previous value was assigned.
3053 (state_free): New.
3054 (states_free): Use it.
3055 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
3056 temporary storage: use `errs' and `nerrs' as elsewhere.
3057 (set_conflicts): Allocate and free this `errs'.
3058
3059 2002-07-02 Akim Demaille <akim@epita.fr>
3060
3061 * lib/libiberty.h: New.
3062 * lib: Update the bitset implementation from upstream.
3063 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
3064 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
3065 * src/main.c: Adjust bitset stats calls.
3066
3067 2002-07-01 Paul Eggert <eggert@twinsun.com>
3068
3069 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
3070 char, so that negative chars don't collide with $.
3071
3072 2002-06-30 Akim Demaille <akim@epita.fr>
3073
3074 Have the GLR tests be `warning' checked, and fix the warnings.
3075
3076 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
3077 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
3078 (yyremoveDeletes): `yyi' and `yyj' are size_t.
3079 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
3080 (yyaddDeferredAction): static.
3081 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
3082 (yyreportParseError): yyprefix is const.
3083 yytokenp is used only when verbose.
3084 (yy__GNUC__): Replace with __GNUC__.
3085 (yypdumpstack): yyi is size_t.
3086 (yypreference): Un-yy local variables and arguments, to avoid
3087 clashes with `yyr1'. Anyway, we are not in the user name space.
3088 (yytname_size): be an int, as is compared with ints.
3089 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
3090 Use them.
3091 * tests/cxx-gram.at: Use quotation to protect $1.
3092 Use AT_COMPILE to enable warnings hunts.
3093 Prototype yylex and yyerror.
3094 `Use' argc.
3095 Include `string.h', not `strings.h'.
3096 Produce and prototype stmtMerge only when used.
3097 yylex takes a location.
3098
3099 2002-06-30 Akim Demaille <akim@epita.fr>
3100
3101 We spend a lot of time in quotearg, in particular when --verbose.
3102
3103 * src/symtab.c (symbol_get): Store a quoted version of the key.
3104 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
3105 Adjust all callers.
3106
3107 2002-06-30 Akim Demaille <akim@epita.fr>
3108
3109 * src/state.h (reductions_t): Rename member `nreds' as num.
3110 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
3111 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
3112
3113 2002-06-30 Akim Demaille <akim@epita.fr>
3114
3115 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
3116 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
3117 (shifts_to): Rename as...
3118 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
3119 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
3120 (TRANSITION_IS_DISABLED, transitions_to): these.
3121
3122 2002-06-30 Akim Demaille <akim@epita.fr>
3123
3124 * src/print.c (print_shifts, print_gotos): Merge into...
3125 (print_transitions): this.
3126 (print_transitions, print_errs, print_reductions): Align the
3127 lookaheads columns.
3128 (print_core, print_transitions, print_errs, print_state,
3129 print_grammar): Output empty lines separator before, not after.
3130 (state_default_rule_compute): Rename as...
3131 (state_default_rule): this.
3132 * tests/conflicts.at (Defaulted Conflicted Reduction),
3133 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
3134 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
3135
3136 2002-06-30 Akim Demaille <akim@epita.fr>
3137
3138 Display items as we display rules.
3139
3140 * src/gram.h, src/gram.c (rule_lhs_print): New.
3141 * src/gram.c (grammar_rules_partial_print): Use it.
3142 * src/print.c (print_core): Likewise.
3143 * tests/conflicts.at (Defaulted Conflicted Reduction),
3144 (Unresolved SR Conflicts): Adjust.
3145 (Unresolved SR Conflicts): Adjust and rename as...
3146 (Resolved SR Conflicts): this, as was meant.
3147 * tests/regression.at (Web2c Report): Adjust.
3148
3149 2002-06-30 Akim Demaille <akim@epita.fr>
3150
3151 * src/print.c (state_default_rule_compute): New, extracted from...
3152 (print_reductions): here.
3153 Pessimize, but clarify the code.
3154 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
3155
3156 2002-06-30 Akim Demaille <akim@epita.fr>
3157
3158 * src/output.c (action_row): Let default_rule be always a rule
3159 number.
3160
3161 2002-06-30 Akim Demaille <akim@epita.fr>
3162
3163 * src/closure.c (print_firsts, print_fderives, closure):
3164 Use BITSET_EXECUTE.
3165 * src/lalr.c (lookaheads_print): Likewise.
3166 * src/state.c (state_rule_lookaheads_print): Likewise.
3167 * src/print_graph.c (print_core): Likewise.
3168 * src/print.c (print_reductions): Likewise.
3169 * src/output.c (action_row): Likewise.
3170 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
3171
3172 2002-06-30 Akim Demaille <akim@epita.fr>
3173
3174 * src/print_graph.c: Use report_flag.
3175
3176 2002-06-30 Akim Demaille <akim@epita.fr>
3177
3178 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
3179 to...
3180 * src/relation.h, src/relation.c (traverse, relation_digraph)
3181 (relation_print, relation_transpose): New.
3182
3183 2002-06-30 Akim Demaille <akim@epita.fr>
3184
3185 * src/state.h, src/state.c (shifts_to): New.
3186 * src/lalr.c (build_relations): Use it.
3187
3188 2002-06-30 Akim Demaille <akim@epita.fr>
3189
3190 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
3191 (item_number_of_rule_number, rule_number_of_item_number): New.
3192 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
3193 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
3194 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
3195 Propagate their use.
3196 Much remains to be done, in particular wrt `shorts' from types.h.
3197
3198 2002-06-30 Akim Demaille <akim@epita.fr>
3199
3200 * src/symtab.c (symbol_new): Initialize the `printer' member.
3201
3202 2002-06-30 Akim Demaille <akim@epita.fr>
3203
3204 * src/LR0.c (save_reductions): Remove, replaced by...
3205 * src/state.h, src/state.c (state_reductions_set): New.
3206 (reductions, errs): Rename as...
3207 (reductions_t, errs_t): these.
3208 Adjust all dependencies.
3209
3210 2002-06-30 Akim Demaille <akim@epita.fr>
3211
3212 * src/LR0.c (state_list_t, state_list_append): New.
3213 (first_state, last_state): Now symbol_list_t.
3214 (this_state): Remove.
3215 (new_itemsets, append_states, save_reductions): Take a state_t as
3216 argument.
3217 (set_states, generate_states): Adjust.
3218 (save_shifts): Remove, replaced by...
3219 * src/state.h, src/state.c (state_shifts_set): New.
3220 (shifts): Rename as...
3221 (shifts_t): this.
3222 Adjust all dependencies.
3223 * src/state.h (state_t): Remove the `next' member.
3224
3225 2002-06-30 Akim Demaille <akim@epita.fr>
3226
3227 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
3228 escaped in slot 0.
3229
3230 2002-06-30 Akim Demaille <akim@epita.fr>
3231
3232 Use hash.h for the state hash table.
3233
3234 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
3235 (allocate_storage): Use state_hash_new.
3236 (free_storage): Use state_hash_free.
3237 (new_state, get_state): Adjust.
3238 * src/lalr.h, src/lalr.c (states): Move to...
3239 * src/states.h (state_t): Remove the `link' member, no longer
3240 used.
3241 * src/states.h, src/states.c: here.
3242 (state_hash_new, state_hash_free, state_hash_lookup)
3243 (state_hash_insert, states_free): New.
3244 * src/states.c (state_table, state_compare, state_hash): New.
3245 * src/output.c (output_actions): Do not free states now, since we
3246 still need to know the final_state number in `prepare', called
3247 afterwards. Do it...
3248 * src/main.c (main): here: call states_free after `output'.
3249
3250 2002-06-30 Akim Demaille <akim@epita.fr>
3251
3252 * src/state.h, src/state.c (state_new): New, extracted from...
3253 * src/LR0.c (new_state): here.
3254 * src/state.h (STATE_ALLOC): Move to...
3255 * src/state.c: here.
3256 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
3257 * src/state.h, src/state.c: here.
3258
3259 2002-06-30 Akim Demaille <akim@epita.fr>
3260
3261 * src/reader.c (gensym): Rename as...
3262 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
3263 (getsym): Rename as...
3264 (symbol_get): this.
3265
3266 2002-06-30 Akim Demaille <akim@epita.fr>
3267
3268 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
3269 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
3270 * src/output.c, src/print.c, src/print_graph.c: Propagate.
3271 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
3272
3273 2002-06-30 Akim Demaille <akim@epita.fr>
3274
3275 Make the test suite pass with warnings checked.
3276
3277 * tests/actions.at (Printers and Destructors): Improve.
3278 Avoid unsigned vs. signed issues.
3279 * tests/calc.at: Don't exercise the scanner here, do it...
3280 * tests/input.at (Torturing the Scanner): here.
3281
3282 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3283
3284 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
3285 reorganize first lines parallel to yacc.c.
3286
3287 2002-06-28 Akim Demaille <akim@epita.fr>
3288
3289 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
3290 (b4_token_enum, b4_token_defines): New, factored from...
3291 * data/lalr1.cc, data/yacc.c, glr.c: here.
3292
3293 2002-06-28 Akim Demaille <akim@epita.fr>
3294
3295 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
3296 unused variables.
3297 * src/output.c (merger_output): static.
3298
3299 2002-06-28 Akim Demaille <akim@epita.fr>
3300
3301 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
3302 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
3303 pacify GCC.
3304 * src/output.c (save_row): Initialize all the variables to pacify GCC.
3305
3306 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3307
3308 Accumulated changelog for new GLR parsing features.
3309
3310 * src/conflicts.c (count_total_conflicts): Change name to
3311 conflicts_total_count.
3312 * src/conflicts.h: Ditto.
3313 * src/output.c (token_actions): Use the new name.
3314 (output_conflicts): Change conflp => conflict_list_heads, and
3315 confl => conflict_list for better readability.
3316 * data/glr.c: Use the new names.
3317 * NEWS: Add self to GLR announcement.
3318
3319 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
3320
3321 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
3322 Akim Demaille.
3323
3324 * data/bison.glr: Change name to glr.c
3325 * data/glr.c: Renamed from bison.glr.
3326 * data/Makefile.am: Add glr.c
3327
3328 * src/getargs.c:
3329
3330 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
3331 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
3332
3333 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3334
3335 * data/bison.glr: Be sure to restore the
3336 current #line when returning to the skeleton contents after having
3337 exposed the input file's #line.
3338
3339 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3340
3341 * data/bison.glr: Bring up to date with changes to bison.simple.
3342
3343 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3344
3345 * data/bison.glr: Correct definitions that use b4_prefix.
3346 Various reformatting.
3347 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
3348 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
3349 yytokenp argument; now part of stack.
3350 (yychar): Define to behave as documented.
3351 (yyclearin): Ditto.
3352
3353 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3354
3355 * src/reader.h: Add declaration for free_merger_functions.
3356
3357 * src/reader.c (merge_functions): New variable.
3358 (get_merge_function): New function.
3359 (free_merger_functions): New function.
3360 (readgram): Check for %prec that is not followed by a symbol.
3361 Handle %dprec and %merge declarations.
3362 (packgram): Initialize dprec and merger fields in rules array.
3363
3364 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
3365 conflict_list_cnt, conflict_list_free): New variables.
3366 (table_grow): Also grow conflict_table.
3367 (prepare_rules): Output dprec and merger tables.
3368 (conflict_row): New function.
3369 (action_row): Output conflict lists for GLR parser. Don't use
3370 default reduction in conflicted states for GLR parser so that there
3371 are spaces for the conflict lists.
3372 (save_row): Also save conflict information.
3373 (token_actions): Allocate conflict list.
3374 (merger_output): New function.
3375 (pack_vector): Pack conflict table, too.
3376 (output_conflicts): New function to output yyconflp and yyconfl.
3377 (output_check): Allocate conflict_tos.
3378 (output_actions): Output conflict tables, also.
3379 (output_skeleton): Output b4_mergers definition.
3380 (prepare): Output b4_max_rhs_length definition.
3381 Use 'bison.glr' as default skeleton for GLR parsers.
3382
3383 * src/gram.c (glr_parser): New flag.
3384 (grammar_free): Call free_merger_functions.
3385
3386 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
3387 all pairs of conflicting reductions, rather than just all tokens
3388 causing conflicts. Needed to size conflict tables.
3389 (conflicts_output): Modify call to count_rr_conflicts for new
3390 interface.
3391 (conflicts_print): Ditto.
3392 (count_total_conflicts): New function.
3393
3394 * src/reader.h (merger_list): New type.
3395 (merge_functions): New variable.
3396
3397 * src/lex.h (tok_dprec, tok_merge): New token types.
3398
3399 * src/gram.h (rule_s): Add dprec and merger fields.
3400 (glr_parser): New flag.
3401
3402 * src/conflicts.h (count_total_conflicts): New function.
3403
3404 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
3405
3406 * doc/bison.texinfo (Generalized LR Parsing): New section.
3407 (GLR Parsers): New section.
3408 (Language and Grammar): Mention GLR parsing.
3409 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
3410 Correct typo ("tge" -> "the").
3411
3412 * data/bison.glr: New skeleton for GLR parsing.
3413
3414 * tests/cxx-gram.at: New tests for GLR parsing.
3415
3416 * tests/testsuite.at: Include cxx-gram.at.
3417
3418 * tests/Makefile.am: Add cxx-gram.at.
3419
3420 * src/parse-gram.y:
3421
3422 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
3423
3424 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
3425
3426 2002-06-27 Akim Demaille <akim@epita.fr>
3427
3428 * src/options.h, src/options.c: Remove.
3429 * src/getargs.c (short_options, long_options): New.
3430
3431 2002-06-27 Akim Demaille <akim@epita.fr>
3432
3433 * data/bison.simple, data/bison.c++: Rename as...
3434 * data/yacc.c, data/lalr1.cc: these.
3435 * doc/bison.texinfo (Environment Variables): Remove.
3436
3437 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
3438
3439 * src/getargs.c (report_argmatch): Initialize strtok().
3440
3441 2002-06-20 Akim Demaille <akim@epita.fr>
3442
3443 * data/bison.simple (b4_symbol_actions): New, replaces...
3444 (b4_symbol_destructor, b4_symbol_printer): these.
3445 (yysymprint): Be sure to call YYPRINT only for tokens, and using
3446 user token numbers.
3447
3448 2002-06-20 Akim Demaille <akim@epita.fr>
3449
3450 * data/bison.simple (yydestructor): Rename as...
3451 (yydestruct): this.
3452
3453 2002-06-20 Akim Demaille <akim@epita.fr>
3454
3455 * src/symtab.h, src/symtab.c (symbol_type_set)
3456 (symbol_destructor_set, symbol_precedence_set): The location is
3457 the last argument.
3458 Adjust all callers.
3459
3460 2002-06-20 Akim Demaille <akim@epita.fr>
3461
3462 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
3463 internals.
3464 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
3465 Takes a location.
3466 * src/symtab.h, src/symtab.c (symbol_class_set)
3467 (symbol_user_token_number_set): Likewise.
3468 Adjust all callers.
3469 Promote complain_at.
3470 * tests/input.at (Type Clashes): Adjust.
3471
3472 2002-06-20 Akim Demaille <akim@epita.fr>
3473
3474 * data/bison.simple (YYLEX): Fix the declaration when
3475 %pure-parser.
3476
3477 2002-06-20 Akim Demaille <akim@epita.fr>
3478
3479 * data/bison.simple (yysymprint): Don't print the token number,
3480 just its name.
3481 * tests/actions.at (Destructors): Rename as...
3482 (Printers and Destructors): this.
3483 Also exercise %printer.
3484
3485 2002-06-20 Akim Demaille <akim@epita.fr>
3486
3487 * data/bison.simple (YYDSYMPRINT): New.
3488 Use it to remove many of the #if YYDEBUG/if (yydebug).
3489
3490 2002-06-20 Akim Demaille <akim@epita.fr>
3491
3492 * src/symtab.h, src/symtab.c (symbol_t): printer and
3493 printer_location are new members.
3494 (symbol_printer_set): New.
3495 * src/parse-gram.y (PERCENT_PRINTER): New token.
3496 Handle its associated rule.
3497 * src/scan-gram.l: Adjust.
3498 (handle_destructor_at, handle_destructor_dollar): Rename as...
3499 (handle_symbol_code_at, handle_symbol_code_dollar): these.
3500 * src/output.c (symbol_printers_output): New.
3501 (output_skeleton): Call it.
3502 * data/bison.simple (yysymprint): New. Cannot be named yyprint
3503 since there are already many grammar files with a user `yyprint'.
3504 Replace the calls to YYPRINT to calls to yysymprint.
3505 * tests/calc.at: Adjust.
3506 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
3507 taking advantage of parser very internal details (stack size!).
3508
3509 2002-06-20 Akim Demaille <akim@epita.fr>
3510
3511 * src/scan-gram.l: Complete the scanner with the missing patterns
3512 to pacify Flex.
3513 Use `quote' and `symbol_tag_get' where appropriate.
3514
3515 2002-06-19 Akim Demaille <akim@epita.fr>
3516
3517 * tests/actions.at (Destructors): Augment to test locations.
3518 * data/bison.simple (yydestructor): Pass it the current location
3519 if locations are enabled.
3520 Prototype only when __STDC__ or C++.
3521 Change the argument names to move into the yy name space: there is
3522 user code here.
3523
3524 2002-06-19 Akim Demaille <akim@epita.fr>
3525
3526 * data/bison.simple (b4_pure_if): New.
3527 Use it instead of #ifdef YYPURE.
3528
3529 2002-06-19 Akim Demaille <akim@epita.fr>
3530
3531 * data/bison.simple (b4_location_if): New.
3532 Use it instead of #ifdef YYLSP_NEEDED.
3533
3534 2002-06-19 Akim Demaille <akim@epita.fr>
3535
3536 Prepare @$ in %destructor, but currently don't bind it in the
3537 skeleton, as %location use is not cleaned up yet.
3538
3539 * src/scan-gram.l (handle_dollar, handle_destructor_at)
3540 (handle_action_at): New.
3541 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
3542 a braced_code_t and a location as additional arguments.
3543 (handle_destructor_dollar): Instead of requiring `b4_eval', just
3544 unquote one when outputting `b4_dollar_dollar'.
3545 Adjust callers.
3546 * data/bison.simple (b4_eval): Remove.
3547 (b4_symbol_destructor): Adjust.
3548 * tests/input.at (Invalid @n): Adjust.
3549
3550 2002-06-19 Zack Weinberg <zack@codesourcery.com>
3551
3552 * doc/bison.texinfo: Document ability to have multiple
3553 prologue sections.
3554
3555 2002-06-18 Akim Demaille <akim@epita.fr>
3556
3557 * src/files.c (compute_base_names): When computing the output file
3558 names from the input file name, strip the directory part.
3559
3560 2002-06-18 Akim Demaille <akim@epita.fr>
3561
3562 * data/bison.simple.new: Comment changes.
3563 Reported by Andreas Schwab.
3564
3565 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
3566
3567 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
3568 there are no `label `yyoverflowlab' defined but not used' warnings
3569 when yyoverflow is defined.
3570
3571 2002-06-18 Akim Demaille <akim@epita.fr>
3572
3573 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
3574 new member.
3575 (symbol_destructor_set): Adjust.
3576 * src/output.c (symbol_destructors_output): Output the destructor
3577 locations.
3578 Output the symbol name.
3579 * data/bison.simple (b4_symbol_destructor): Adjust.
3580
3581 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
3582 and Akim Demaille <akim@epita.fr>
3583
3584 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
3585 what's left on the stack when the error recovery hits EOF.
3586 * tests/actions.at (Destructors): Complete to exercise this case.
3587
3588 2002-06-17 Akim Demaille <akim@epita.fr>
3589
3590 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
3591 arguments is really empty, not only equal to `[]'.
3592 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
3593 member.
3594 (symbol_destructor_set): New.
3595 * src/output.c (symbol_destructors_output): New.
3596 * src/reader.h (brace_code_t, current_braced_code): New.
3597 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
3598 (handle_dollar): Rename as...
3599 (handle_action_dollar): this.
3600 (handle_destructor_dollar): New.
3601 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
3602 (grammar_declaration): Use it.
3603 * data/bison.simple (yystos): Is always defined.
3604 (yydestructor): New.
3605 * tests/actions.at (Destructors): New.
3606 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
3607
3608 2002-06-17 Akim Demaille <akim@epita.fr>
3609
3610 * src/symlist.h, src/symlist.c (symbol_list_length): New.
3611 * src/scan-gram.l (handle_dollar, handle_at): Compute the
3612 rule_length only when needed.
3613 * src/output.c (actions_output, token_definitions_output): Output
3614 the full M4 block.
3615 * src/symtab.c: Don't access directly to the symbol tag, use
3616 symbol_tag_get.
3617 * src/parse-gram.y: Use symbol_list_free.
3618
3619 2002-06-17 Akim Demaille <akim@epita.fr>
3620
3621 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
3622 (symbol_list_prepend, get_type_name): Move to...
3623 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
3624 (symbol_list_prepend, symbol_list_n_type_name_get): here.
3625 Adjust all callers.
3626 (symbol_list_free): New.
3627 * src/scan-gram.l (handle_dollar): Takes a location.
3628 * tests/input.at (Invalid $n): Adjust.
3629
3630 2002-06-17 Akim Demaille <akim@epita.fr>
3631
3632 * src/reader.h, src/reader.c (symbol_list_new): Export it.
3633 (symbol_list_prepend): New.
3634 * src/parse-gram.y (%union): `list' is a new member.
3635 (symbols.1): New, replaces...
3636 (terms_to_prec.1, nterms_to_type.1): these.
3637 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
3638 Take a location as additional argument.
3639 Adjust all callers.
3640
3641 2002-06-15 Akim Demaille <akim@epita.fr>
3642
3643 * src/parse-gram.y: Move %token in the declaration section so that
3644 we don't depend upon CVS Bison.
3645
3646 2002-06-15 Akim Demaille <akim@epita.fr>
3647
3648 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
3649 * src/print.c (print_core): Use it.
3650
3651 2002-06-15 Akim Demaille <akim@epita.fr>
3652
3653 * src/conflicts.c (log_resolution): Accept the rule involved in
3654 the sr conflicts instead of the lookahead number that points to
3655 that rule.
3656 (flush_reduce): Accept the current lookahead vector as argument,
3657 instead of the index in LA.
3658 (resolve_sr_conflict): Accept the current number of lookahead
3659 bitset to consider for the STATE, instead of the index in LA.
3660 (set_conflicts): Adjust.
3661 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
3662
3663 2002-06-15 Akim Demaille <akim@epita.fr>
3664
3665 * src/state.h (state_t): Replace the `lookaheadsp' member, a
3666 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
3667 Adjust all dependencies.
3668 * src/lalr.c (initialize_lookaheads): Split into...
3669 (states_lookaheads_count, states_lookaheads_initialize): these.
3670 (lalr): Adjust.
3671
3672 2002-06-15 Akim Demaille <akim@epita.fr>
3673
3674 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
3675 out of...
3676 (grammar_rules_print): here.
3677 * src/reduce.c (reduce_output): Use it.
3678 * tests/reduce.at (Useless Rules, Reduced Automaton)
3679 (Underivable Rules): Adjust.
3680
3681 2002-06-15 Akim Demaille <akim@epita.fr>
3682
3683 Copy BYacc's nice way to report the grammar.
3684
3685 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
3686 New.
3687 Don't print the rules' location, it is confusing and useless.
3688 (rule_print): Use grammar_rhs_print.
3689 * src/print.c (print_grammar): Use grammar_rules_print.
3690
3691 2002-06-15 Akim Demaille <akim@epita.fr>
3692
3693 Complete and rationalize `useless thing' warnings.
3694
3695 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
3696 (symbol_tag_print): New.
3697 Use them everywhere in place of accessing directly the tag member.
3698 * src/gram.h, src/gram.c (rule_print): New.
3699 Use it where a rule used to be printed `by hand'.
3700 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
3701 (reduce_grammar_tables): Report the useless rules.
3702 (reduce_print): Useless things are a warning, not an error.
3703 Report it as such.
3704 * tests/reduce.at (Useless Nonterminals, Useless Rules):
3705 (Reduced Automaton, Underivable Rules): Adjust.
3706 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
3707 * tests/conflicts.at (Unresolved SR Conflicts)
3708 (Solved SR Conflicts): Adjust.
3709
3710 2002-06-15 Akim Demaille <akim@epita.fr>
3711
3712 Let symbols have a location.
3713
3714 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
3715 (getsym): Adjust.
3716 Adjust all callers.
3717 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
3718 Use location_t, not int.
3719 * src/symtab.c (symbol_check_defined): Take advantage of the
3720 location.
3721 * tests/regression.at (Invalid inputs): Adjust.
3722
3723 2002-06-15 Akim Demaille <akim@epita.fr>
3724
3725 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
3726 (input): Don't try to initialize yylloc here, do it in the
3727 scanner.
3728 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
3729 * src/gram.h (rule_t): Change line and action_line into location
3730 and action_location, of location_t type.
3731 Adjust all dependencies.
3732 * src/location.h, src/location.c (empty_location): New.
3733 * src/reader.h, src/reader.c (grammar_start_symbol_set)
3734 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
3735 (grammar_current_rule_symbol_append)
3736 (grammar_current_rule_action_append): Expect a location as argument.
3737 * src/reader.c (grammar_midrule_action): Adjust to attach an
3738 action's location as dummy symbol location.
3739 * src/symtab.h, src/symtab.c (startsymbol_location): New.
3740 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
3741 the line numbers.
3742
3743 2002-06-14 Akim Demaille <akim@epita.fr>
3744
3745 Grammar declarations may be found in the grammar section.
3746
3747 * src/parse-gram.y (rules_or_grammar_declaration): New.
3748 (declarations): Each declaration may end with a semicolon, not
3749 just...
3750 (grammar_declaration): `"%union"'.
3751 (grammar): Branch to rules_or_grammar_declaration.
3752
3753 2002-06-14 Akim Demaille <akim@epita.fr>
3754
3755 * src/main.c (main): Invoke scanner_free.
3756
3757 2002-06-14 Akim Demaille <akim@epita.fr>
3758
3759 * src/output.c (m4_invoke): Extracted from...
3760 (output_skeleton): here.
3761 Free tempfile.
3762
3763 2002-06-14 Akim Demaille <akim@epita.fr>
3764
3765 * src/parse-gram.y (directives, directive, gram)
3766 (grammar_directives, precedence_directives, precedence_directive):
3767 Rename as...
3768 (declarations, declaration, grammar, grammar_declaration)
3769 (precedence_declaration, precedence_declarator): these.
3770 (symbol_declaration): New.
3771
3772 2002-06-14 Akim Demaille <akim@epita.fr>
3773
3774 * src/files.c (action_obstack): Remove, unused.
3775 (output_obstack): Remove it, and all its dependencies, as it is no
3776 longer needed.
3777 * src/reader.c (epilogue_set): Build the epilogue in the
3778 muscle_obstack.
3779 * src/output.h, src/output.c (muscle_obstack): Move to...
3780 * src/muscle_tab.h, src/muscle_tab.h: here.
3781 (muscle_init): Initialize muscle_obstack.
3782 (muscle_free): New.
3783 * src/main.c (main): Call it.
3784
3785 2002-06-14 Akim Demaille <akim@epita.fr>
3786
3787 * src/location.h: New, extracted from...
3788 * src/reader.h: here.
3789 * src/Makefile.am (noinst_HEADERS): Merge into
3790 (bison_SOURCES): this.
3791 Add location.h.
3792 * src/parse-gram.y: Use location_t instead of Bison's.
3793 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
3794 Use location_t instead of ints.
3795
3796 2002-06-14 Akim Demaille <akim@epita.fr>
3797
3798 * data/bison.simple, data/bison.c++: Be sure to restore the
3799 current #line when returning to the skeleton contents after having
3800 exposed the input file's #line.
3801
3802 2002-06-12 Akim Demaille <akim@epita.fr>
3803
3804 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
3805 eager.
3806 * tests/actions.at (Exotic Dollars): New.
3807
3808 2002-06-12 Akim Demaille <akim@epita.fr>
3809
3810 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
3811 ['"/] too eagerly.
3812 * tests/input.at (Torturing the Scanner): New.
3813
3814 2002-06-11 Akim Demaille <akim@epita.fr>
3815
3816 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
3817 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
3818 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
3819 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
3820 * src/reader.c (reader): Use it.
3821
3822 2002-06-11 Akim Demaille <akim@epita.fr>
3823
3824 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
3825 Adjust all callers.
3826 (scanner_last_string_free): New.
3827
3828 2002-06-11 Akim Demaille <akim@epita.fr>
3829
3830 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
3831 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
3832 (last_string, YY_OBS_FREE): New.
3833 Use them when returning an ID.
3834
3835 2002-06-11 Akim Demaille <akim@epita.fr>
3836
3837 Have Bison grammars parsed by a Bison grammar.
3838
3839 * src/reader.c, src/reader.h (prologue_augment): New.
3840 * src/reader.c (copy_definition): Remove.
3841
3842 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
3843 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
3844 (grammar_current_rule_prec_set, grammar_current_rule_check)
3845 (grammar_current_rule_symbol_append)
3846 (grammar_current_rule_action_append): Export.
3847 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
3848 (symbol_list_action_append): Remove.
3849 Hook the routines from reader.
3850 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
3851 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
3852
3853 * src/reader.c (read_declarations): Remove, unused.
3854
3855 * src/parse-gram.y: Handle the epilogue.
3856 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
3857 (grammar_start_symbol_set): this.
3858 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
3859 * src/reader.c (readgram): Remove, unused.
3860 (reader): Adjust to insert eoftoken and axiom where appropriate.
3861
3862 * src/reader.c (copy_dollar): Replace with...
3863 * src/scan-gram.h (handle_dollar): this.
3864 * src/parse-gram.y: Remove `%thong'.
3865
3866 * src/reader.c (copy_at): Replace with...
3867 * src/scan-gram.h (handle_at): this.
3868
3869 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
3870 New.
3871
3872 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
3873 time being.
3874
3875 * src/reader.h, src/reader.c (grammar_rule_end): New.
3876
3877 * src/parse.y (current_type, current_class): New.
3878 Implement `%nterm', `%token' support.
3879 Merge `%term' into `%token'.
3880 (string_as_id): New.
3881 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
3882 type name.
3883
3884 * src/parse-gram.y: Be sure to handle properly the beginning of
3885 rules.
3886
3887 * src/parse-gram.y: Handle %type.
3888 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
3889
3890 * src/parse-gram.y: More directives support.
3891 * src/options.c: No longer handle source directives.
3892
3893 * src/parse-gram.y: Fix %output.
3894
3895 * src/parse-gram.y: Handle %union.
3896 Use the prologue locations.
3897 * src/reader.c (parse_union_decl): Remove.
3898
3899 * src/reader.h, src/reader.c (epilogue_set): New.
3900 * src/parse-gram.y: Use it.
3901
3902 * data/bison.simple, data/bison.c++: b4_stype is now either not
3903 defined, then default to int, or to the contents of %union,
3904 without `union' itself.
3905 Adjust.
3906 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
3907
3908 * src/output.c (actions_output): Don't output braces, as they are
3909 already handled by the scanner.
3910
3911 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
3912 characters to themselves.
3913
3914 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
3915 that the epilogue has a proper #line.
3916
3917 * src/parse-gram.y: Handle precedence/associativity.
3918
3919 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
3920 a terminal.
3921 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
3922 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
3923 at all to define terminals that cannot be emitted.
3924
3925 * src/scan-gram.l: Escape M4 characters.
3926
3927 * src/scan-gram.l: Working properly with escapes in user
3928 strings/characters.
3929
3930 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
3931 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
3932 grammar.
3933 Use more modest sizes, as for the time being the parser does not
3934 release memory, and therefore the process swallows a huge amount
3935 of memory.
3936
3937 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
3938 stricter %token grammar.
3939
3940 * src/symtab.h (associativity): Add `undef_assoc'.
3941 (symbol_precedence_set): Do nothing when passed an undef_assoc.
3942 * src/symtab.c (symbol_check_alias_consistence): Adjust.
3943
3944 * tests/regression.at (Invalid %directive): Remove, as it is now
3945 meaningless.
3946 (Invalid inputs): Adjust to the new error messages.
3947 (Token definitions): The new grammar doesn't allow too many
3948 eccentricities.
3949
3950 * src/lex.h, src/lex.c: Remove.
3951 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
3952 (copy_character, copy_string2, copy_string, copy_identifier)
3953 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
3954 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
3955 (parse_action): Remove.
3956 * po/POTFILES.in: Adjust.
3957
3958 2002-06-11 Akim Demaille <akim@epita.fr>
3959
3960 * src/reader.c (parse_action): Don't store directly into the
3961 rule's action member: return the action as a string.
3962 Don't require `rule_length' as an argument: compute it.
3963 (grammar_current_rule_symbol_append)
3964 (grammar_current_rule_action_append): New, eved out from
3965 (readgram): here.
3966 Remove `action_flag', `rulelength', unused now.
3967
3968 2002-06-11 Akim Demaille <akim@epita.fr>
3969
3970 * src/reader.c (grammar_current_rule_prec_set).
3971 (grammar_current_rule_check): New, eved out from...
3972 (readgram): here.
3973 Remove `xaction', `first_rhs': useless.
3974 * tests/input.at (Type clashes): New.
3975 * tests/existing.at (GNU Cim Grammar): Adjust.
3976
3977 2002-06-11 Akim Demaille <akim@epita.fr>
3978
3979 * src/reader.c (grammar_midrule_action): New, Eved out from
3980 (readgram): here.
3981
3982 2002-06-11 Akim Demaille <akim@epita.fr>
3983
3984 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
3985 New.
3986 (readgram): Use them as replacement of inlined code, crule and
3987 crule1.
3988
3989 2002-06-11 Akim Demaille <akim@epita.fr>
3990
3991 * src/reader.c (grammar_end, grammar_symbol_append): New.
3992 (readgram): Use them.
3993 Make the use of `p' as local as possible.
3994
3995 2002-06-10 Akim Demaille <akim@epita.fr>
3996
3997 GCJ's parser requires the tokens to be defined before the prologue.
3998
3999 * data/bison.simple: Output the token definition before the user's
4000 prologue.
4001 * tests/regression.at (Braces parsing, Duplicate string)
4002 (Mixing %token styles): Check the output from bison.
4003 (Early token definitions): New.
4004
4005 2002-06-10 Akim Demaille <akim@epita.fr>
4006
4007 * src/symtab.c (symbol_user_token_number_set): Don't complain when
4008 assigning twice the same user number to a token, so that we can
4009 use it in...
4010 * src/lex.c (lex): here.
4011 Also use `symbol_class_set' instead of hand written code.
4012 * src/reader.c (parse_assoc_decl): Likewise.
4013
4014 2002-06-10 Akim Demaille <akim@epita.fr>
4015
4016 * src/symtab.c, src/symtab.c (symbol_class_set)
4017 (symbol_user_token_number_set): New.
4018 * src/reader.c (parse_token_decl): Use them.
4019 Use a switch instead of ifs.
4020 Use a single argument.
4021
4022 2002-06-10 Akim Demaille <akim@epita.fr>
4023
4024 Remove `%thong' support as it is undocumented, unused, duplicates
4025 `%token's job, and creates useless e-mail traffic with people who
4026 want to know what it is, why it is undocumented, unused, and
4027 duplicates `%token's job.
4028
4029 * src/reader.c (parse_thong_decl): Remove.
4030 * src/options.c (option_table): Remove "thong".
4031 * src/lex.h (tok_thong): Remove.
4032
4033 2002-06-10 Akim Demaille <akim@epita.fr>
4034
4035 * src/symtab.c, src/symtab.c (symbol_type_set)
4036 (symbol_precedence_set): New.
4037 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
4038 (value_components_used): Remove, unused.
4039
4040 2002-06-09 Akim Demaille <akim@epita.fr>
4041
4042 Move symbols handling code out of the reader.
4043
4044 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
4045 (axiom): Move to...
4046 * src/symtab.h, src/symtab.c: here.
4047
4048 * src/gram.c (start_symbol): Remove: use startsymbol->number.
4049 * src/reader.c (startval): Rename as...
4050 * src/symtab.h, src/symtab.c (startsymbol): this.
4051 * src/reader.c: Adjust.
4052
4053 * src/reader.c (symbol_check_defined, symbol_make_alias)
4054 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
4055 (token_translations_init)
4056 Move to...
4057 * src/symtab.c: here.
4058 * src/reader.c (packsymbols): Move to...
4059 * src/symtab.h, src/symtab.c (symbols_pack): here.
4060 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
4061 argument.
4062
4063 2002-06-03 Akim Demaille <akim@epita.fr>
4064
4065 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
4066 then statements.
4067
4068 2002-06-03 Akim Demaille <akim@epita.fr>
4069
4070 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
4071 structs with non literals.
4072 * src/scan-skel.l: never-interactive.
4073 * src/conflicts.c (enum conflict_resolution_e): No trailing
4074 comma.
4075 * src/getargs.c (usage): Split long literal strings.
4076 Reported by Hans Aberg.
4077
4078 2002-05-28 Akim Demaille <akim@epita.fr>
4079
4080 * data/bison.c++: Use C++ ostreams.
4081 (cdebug_): New member.
4082
4083 2002-05-28 Akim Demaille <akim@epita.fr>
4084
4085 * src/output.c (output_skeleton): Be sure to allocate enough room
4086 for `/' _and_ for `\0' in full_skeleton.
4087
4088 2002-05-28 Akim Demaille <akim@epita.fr>
4089
4090 * data/bison.c++: Catch up with bison.simple:
4091 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4092 and Paul Eggert <eggert@twinsun.com>: `error' handing.
4093 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
4094 and popping traces.
4095
4096 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4097
4098 * src/output.c (output_skeleton): Put an explicit path in front of
4099 the skeleton file name, rather than relying on the -I directory,
4100 to partially alleviate effects of having a skeleton file lying around
4101 in the current directory.
4102
4103 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4104
4105 * src/conflicts.c (log_resolution): Correct typo:
4106 obstack_printf should be obstack_fgrow1.
4107
4108 2002-05-26 Akim Demaille <akim@epita.fr>
4109
4110 * src/state.h (state_t): `solved_conflicts' is a new member.
4111 * src/LR0.c (new_state): Set it to 0.
4112 * src/conflicts.h, src/conflicts.c (print_conflicts)
4113 (free_conflicts, solve_conflicts): Rename as...
4114 (conflicts_print, conflicts_free, conflicts_solve): these.
4115 Adjust callers.
4116 * src/conflicts.c (enum conflict_resolution_e)
4117 (solved_conflicts_obstack): New, used by...
4118 (log_resolution): this.
4119 Adjust to attach the conflict resolution to each state.
4120 Complete the description with the precedence/associativity
4121 information.
4122 (resolve_sr_conflict): Adjust.
4123 * src/print.c (print_state): Output its solved_conflicts.
4124 * tests/conflicts.at (Unresolved SR Conflicts)
4125 (Solved SR Conflicts): Exercise --report=all.
4126
4127 2002-05-26 Akim Demaille <akim@epita.fr>
4128
4129 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
4130 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
4131 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
4132 (token_number_t, item_number_as_token_number)
4133 (token_number_as_item_number, muscle_insert_token_number_table):
4134 Rename as...
4135 (symbol_number_t, item_number_as_symbol_number)
4136 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
4137 these, since it is more appropriate.
4138
4139 2002-05-26 Akim Demaille <akim@epita.fr>
4140
4141 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
4142 `Error:' lines.
4143 * data/bison.simple (yystos) [YYDEBUG]: New.
4144 (yyparse) [YYDEBUG]: Display the symbols which are popped during
4145 error recovery.
4146 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
4147
4148 2002-05-25 Akim Demaille <akim@epita.fr>
4149
4150 * doc/bison.texinfo (Debugging): Split into...
4151 (Tracing): this new section, its former contents, and...
4152 (Understanding): this new section.
4153 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
4154 by...
4155 (report_flag): this.
4156 Adjust all dependencies.
4157 (report_args, report_types, report_argmatch): New.
4158 (usage, getargs): Report/support -r, --report.
4159 * src/options.h
4160 (struct option_table_struct): Rename as..,
4161 (struct option_table_s): this.
4162 Rename the `set_flag' member to `flag' to match with getopt_long's
4163 struct.
4164 * src/options.c (option_table): Split verbose into an entry for
4165 %verbose, and another for --verbose.
4166 Support --report/-r, so remove -r from the obsolete --raw.
4167 * src/print.c: Attach full item sets and lookaheads reports to
4168 report_flag instead of trace_flag.
4169 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
4170
4171 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4172 and Paul Eggert <eggert@twinsun.com>
4173
4174 * data/bison.simple (yyparse): Correct error handling to conform to
4175 POSIX and yacc. Specifically, after syntax error is discovered,
4176 do not reduce further before shifting the error token.
4177 Clean up the code a bit by removing the labels yyerrdefault,
4178 yyerrhandle, yyerrpop.
4179 * NEWS: Document the above.
4180
4181 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4182
4183 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
4184 type; it isn't always big enough, since it doesn't necessarily
4185 include non-terminals.
4186 (yytranslate): Expand definition of yy_token_number_type, so that
4187 the latter can be removed.
4188 (yy_token_number_type): Remove, only one use.
4189 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
4190 don't use TokenNumberType as element type.
4191
4192 * tests/regression.at: Modify expected output to agree with change
4193 to yyr1 and yytranslate.
4194
4195 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
4196
4197 * src/reader.c (parse_action): Use copy_character instead of
4198 obstack_1grow.
4199
4200 2002-05-13 Akim Demaille <akim@epita.fr>
4201
4202 * tests/regression.at (Token definitions): Prototype yylex and
4203 yyerror.
4204
4205 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4206
4207 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
4208 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
4209 32-bit arithmetic.
4210 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
4211
4212 2002-05-07 Akim Demaille <akim@epita.fr>
4213
4214 * tests/synclines.at: Be sure to prototype yylex and yyerror to
4215 avoid GCC warnings.
4216
4217 2002-05-07 Akim Demaille <akim@epita.fr>
4218
4219 Kill GCC warnings.
4220
4221 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
4222 over the RHS of each rule.
4223 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
4224 * src/state.h (state_t): Member `nitems' is unsigned short.
4225 * src/LR0.c (get_state): Adjust.
4226 * src/reader.c (packgram): Likewise.
4227 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
4228 `Type'.
4229 (muscle_insert_int_table): Remove, unused.
4230 (prepare_rules): Remove `max'.
4231
4232 2002-05-06 Akim Demaille <akim@epita.fr>
4233
4234 * src/closure.c (print_firsts): Display of the symbol tags.
4235 (bitmatrix_print): Move to...
4236 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
4237 here.
4238 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
4239
4240 2002-05-06 Akim Demaille <akim@epita.fr>
4241
4242 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
4243 hash_do_for_each.
4244
4245 2002-05-06 Akim Demaille <akim@epita.fr>
4246
4247 * src/LR0.c (new_state, get_state): Instead of using the global
4248 `kernel_size' and `kernel_base', have two new arguments:
4249 `core_size' and `core'.
4250 Adjust callers.
4251
4252 2002-05-06 Akim Demaille <akim@epita.fr>
4253
4254 * src/reader.c (packgram): No longer end `ritem' with a 0
4255 sentinel: it is not used.
4256
4257 2002-05-05 Akim Demaille <akim@epita.fr>
4258
4259 New experimental feature: display the lookaheads in the report and
4260 graph.
4261
4262 * src/print (print_core): When --trace-flag, display the rules
4263 lookaheads.
4264 * src/print_graph.c (print_core): Likewise.
4265 Swap the arguments.
4266 Adjust caller.
4267
4268 2002-05-05 Akim Demaille <akim@epita.fr>
4269
4270 * tests/torture.at (Many lookaheads): New test.
4271
4272 2002-05-05 Akim Demaille <akim@epita.fr>
4273
4274 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
4275 (GENERATE_MUSCLE_INSERT_TABLE): this.
4276 (output_int_table, output_unsigned_int_table, output_short_table)
4277 (output_token_number_table, output_item_number_table): Replace with...
4278 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
4279 (muscle_insert_short_table, muscle_insert_token_number_table)
4280 (muscle_insert_item_number_table): these.
4281 Adjust all callers.
4282 (prepare_tokens): Don't free `translations', since...
4283 * src/reader.h, src/reader.c (grammar_free): do it.
4284 Move to...
4285 * src/gram.h, src/gram.c (grammar_free): here.
4286 * data/bison.simple, data/bison.c++: b4_token_number_max is now
4287 b4_translate_max.
4288
4289 2002-05-05 Akim Demaille <akim@epita.fr>
4290
4291 * src/output.c (output_unsigned_int_table): New.
4292 (prepare_rules): `i' is unsigned.
4293 `prhs', `rline', `r2' are unsigned int.
4294 Rename muscle `rhs_number_max' as `rhs_max'.
4295 Output muscles `prhs_max', `rline_max', and `r2_max'.
4296 Free rline and r1.
4297 * data/bison.simple, data/bison.c++: Adjust to use these muscles
4298 to compute types instead of constant types.
4299 * tests/regression.at (Web2c Actions): Adjust.
4300
4301 2002-05-04 Akim Demaille <akim@epita.fr>
4302
4303 * src/symtab.h (SALIAS, SUNDEF): Rename as...
4304 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
4305 Adjust dependencies.
4306 * src/output.c (token_definitions_output): Be sure not to output a
4307 `#define 'a'' when fed with `%token 'a' "a"'.
4308 * tests/regression.at (Token definitions): New.
4309
4310 2002-05-03 Paul Eggert <eggert@twinsun.com>
4311
4312 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
4313 for K&R C.
4314
4315 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
4316
4317 * Makefile.am (SUBDIRS): Remove intl.
4318 (EXTRA_DIST): Add config/config.rpath.
4319
4320 2002-05-03 Akim Demaille <akim@epita.fr>
4321
4322 * data/bison.simple (m4_if): Don't output empty enums.
4323 And actually, output valid enum definitions :(.
4324
4325 2002-05-03 Akim Demaille <akim@epita.fr>
4326
4327 * configure.bat: Remove, completely obsolete.
4328 * Makefile.am (EXTRA_DIST): Adjust.
4329 Don't distribute config.rpath...
4330 * config/Makefile.am (EXTRA_DIST): Do it.
4331
4332 2002-05-03 Akim Demaille <akim@epita.fr>
4333
4334 * configure.in (GETTEXT_VERSION): New.
4335 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
4336
4337 2002-05-03 Akim Demaille <akim@epita.fr>
4338
4339 * data/bison.simple (b4_token_enum): New.
4340 (b4_token_defines): Use it to output tokens both as #define and
4341 enums.
4342 Suggested by Paul Eggert.
4343 * src/output.c (token_definitions_output): Don't output spurious
4344 white spaces.
4345
4346 2002-05-03 Akim Demaille <akim@epita.fr>
4347
4348 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
4349
4350 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
4351
4352 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
4353 Update the stack class, give a try to deque as the default container.
4354
4355 2002-05-02 Akim Demaille <akim@epita.fr>
4356
4357 * data/bison.simple (yyparse): Do not implement @$ = @1.
4358 (YYLLOC_DEFAULT): Adjust to do it.
4359 * doc/bison.texinfo (Location Default Action): Fix.
4360
4361 2002-05-02 Akim Demaille <akim@epita.fr>
4362
4363 * src/reader.c (parse_braces): Merge into...
4364 (parse_action): this.
4365
4366 2002-05-02 Akim Demaille <akim@epita.fr>
4367
4368 * configure.in (ALL_LINGUAS): Remove.
4369 * po/LINGUAS, hr.po: New.
4370
4371 2002-05-02 Akim Demaille <akim@epita.fr>
4372
4373 Remove the so called hairy (semantic) parsers.
4374
4375 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
4376 * src/gram.h, src/gram.c (semantic_parser): Remove.
4377 (rule_t): Remove the guard and guard_line members.
4378 * src/lex.h (token_t): remove tok_guard.
4379 * src/options.c (option_table): Remove %guard and %semantic_parser
4380 support.
4381 * src/output.c, src/output.h (guards_output): Remove.
4382 (prepare): Adjust.
4383 (token_definitions_output): Don't output the `T'
4384 tokens (???).
4385 (output_skeleton): Don't output the guards.
4386 * src/files.c, src/files.c (attrsfile): Remove.
4387 * src/reader.c (symbol_list): Remove the guard and guard_line
4388 members.
4389 Adjust dependencies.
4390 (parse_guard): Remove.
4391 * data/bison.hairy: Remove.
4392 * doc/bison.texinfo (Environment Variables): Remove occurrences of
4393 BISON_HAIRY.
4394
4395 2002-05-02 Akim Demaille <akim@epita.fr>
4396
4397 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
4398 (parse_guard): Rename the formal argument `stack_offset' as
4399 `rule_length', which is more readable.
4400 Adjust callers.
4401 (copy_at, copy_dollar): Instead of outputting the hard coded
4402 values of $$, $n and so forth, output invocation to b4_lhs_value,
4403 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
4404 Note: this patch partially drops `semantic-parser' support: it
4405 always does `rule_length - n', where semantic parsers ought to
4406 always use `-n'.
4407 * data/bison.simple, data/bison.c++ (b4_lhs_value)
4408 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
4409
4410 2002-05-02 Akim Demaille <akim@epita.fr>
4411
4412 * configure.in (AC_INIT): Bump to 1.49b.
4413 (AM_INIT_AUTOMAKE): Short invocation.
4414
4415 2002-05-02 Akim Demaille <akim@epita.fr>
4416
4417 Version 1.49a.
4418
4419 2002-05-01 Akim Demaille <akim@epita.fr>
4420
4421 * src/skeleton.h: Remove.
4422
4423 2002-05-01 Akim Demaille <akim@epita.fr>
4424
4425 * src/skeleton.h: Fix the #endif.
4426 Reported by Magnus Fromreide.
4427
4428 2002-04-26 Paul Eggert <eggert@twinsun.com>
4429
4430 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
4431 Define if we define YYSTYPE and YYLTYPE, respectively.
4432 (YYCOPY): Fix [] quoting problem in the non-GCC case.
4433
4434 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
4435
4436 * src/scan-skel.l: Postprocess quadrigraphs.
4437
4438 * src/reader.c (copy_character): New function, used to output
4439 single characters while replacing `[' and `]' with quadrigraphs, to
4440 avoid troubles with M4 quotes.
4441 (copy_comment): Output characters with copy_character.
4442 (read_additionnal_code): Likewise.
4443 (copy_string2): Likewise.
4444 (copy_definition): Likewise.
4445
4446 * tests/calc.at: Exercise M4 quoting.
4447
4448 2002-04-25 Akim Demaille <akim@epita.fr>
4449
4450 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
4451 between `!' and the command.
4452 Reported by Paul Eggert.
4453
4454 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
4455
4456 * tests/calc.at: Exercise prologue splitting.
4457
4458 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
4459 `b4_post_prologue' instead of `b4_prologue'.
4460
4461 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
4462 muscles.
4463 (output): Free pre_prologue_obstack and post_prologue_obstack.
4464 * src/files.h, src/files.c (attrs_obstack): Remove.
4465 (pre_prologue_obstack, post_prologue_obstack): New.
4466 * src/reader.c (copy_definition): Add a parameter to specify the
4467 obstack to fill, instead of using attrs_obstack unconditionally.
4468 (read_declarations): Pass pre_prologue_obstack to copy_definition if
4469 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
4470
4471 2002-04-23 Paul Eggert <eggert@twinsun.com>
4472
4473 * data/bison.simple: Remove unnecessary commentary and white
4474 space differences from 1_29-branch.
4475 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
4476
4477 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
4478 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
4479 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
4480 constructors or destructors.
4481
4482 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
4483
4484 2002-04-23 Akim Demaille <akim@epita.fr>
4485
4486 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
4487 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
4488 location with columns.
4489 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
4490 All reported by Paul Eggert.
4491
4492 2002-04-22 Akim Demaille <akim@epita.fr>
4493
4494 * src/reduce.c (dump_grammar): Move to...
4495 * src/gram.h, src/gram.c (grammar_dump): here.
4496 Be sure to separate long item numbers.
4497 Don't read the members of a rule's prec if its nil.
4498
4499 2002-04-22 Akim Demaille <akim@epita.fr>
4500
4501 * src/output.c (table_size, table_grow): New.
4502 (MAXTABLE): Remove, replace uses with table_size.
4503 (pack_vector): Instead of dying when the table is too big, grow it.
4504
4505 2002-04-22 Akim Demaille <akim@epita.fr>
4506
4507 * data/bison.simple (yyr1): Its type is that of a token number.
4508 * data/bison.c++ (r1_): Likewise.
4509 * tests/regression.at (Web2c Actions): Adjust.
4510
4511 2002-04-22 Akim Demaille <akim@epita.fr>
4512
4513 * src/reader.c (token_translations_init): 256 is now the default
4514 value for the error token, i.e., it will be assigned another
4515 number if the user assigned 256 to one of her tokens.
4516 (reader): Don't force 256 to error.
4517 * doc/bison.texinfo (Symbols): Adjust.
4518 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
4519 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
4520 etc. instead of 10, 20, 30 (which was used to `jump' over error
4521 (256) and undefined (2)).
4522
4523 2002-04-22 Akim Demaille <akim@epita.fr>
4524
4525 Propagate more token_number_t.
4526
4527 * src/gram.h (token_number_as_item_number)
4528 (item_number_as_token_number): New.
4529 * src/output.c (GENERATE_OUTPUT_TABLE): New.
4530 Use it to create output_item_number_table and
4531 output_token_number_table.
4532 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
4533 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
4534 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
4535 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
4536
4537 2002-04-22 Akim Demaille <akim@epita.fr>
4538
4539 * src/output.h, src/output.c (get_lines_number): Remove.
4540
4541 2002-04-19 Akim Demaille <akim@epita.fr>
4542
4543 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
4544 as Lex/Flex'.
4545 (Debugging): More details about enabling the debugging features.
4546 (Table of Symbols): Describe $$, $n, @$, and @n.
4547 Suggested by Tim Josling.
4548
4549 2002-04-19 Akim Demaille <akim@epita.fr>
4550
4551 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
4552
4553 2002-04-10 Akim Demaille <akim@epita.fr>
4554
4555 * src/system.h: Rely on HAVE_LIMITS_H.
4556 Suggested by Paul Eggert.
4557
4558 2002-04-09 Akim Demaille <akim@epita.fr>
4559
4560 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
4561 full stderr, and strip it according to the bison options, instead
4562 of composing the error message from different bits.
4563 This makes it easier to check for several error messages.
4564 Adjust all the invocations.
4565 Add an invocation exercising the error token.
4566 Add an invocation demonstrating a stupid error message.
4567 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
4568 Adjust the tests.
4569 Error message are for stderr, not stdout.
4570
4571 2002-04-09 Akim Demaille <akim@epita.fr>
4572
4573 * src/gram.h, src/gram.c (error_token_number): Remove, use
4574 errtoken->number.
4575 * src/reader.c (reader): Don't specify the user token number (2)
4576 for $undefined, as it uselessly prevents using it.
4577 * src/gram.h (token_number_t): Move to...
4578 * src/symtab.h: here.
4579 (state_t.number): Is a token_number_t.
4580 * src/print.c, src/reader.c: Use undeftoken->number instead of
4581 hard coded 2.
4582 (Even though this 2 is not the same as above: the number of the
4583 undeftoken remains being 2, it is its user token number which
4584 might not be 2).
4585 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
4586 `user_token_number_max'.
4587 Output `undef_token_number'.
4588 * data/bison.simple, data/bison.c++: Use them.
4589 Be sure to map invalid yylex return values to
4590 `undef_token_number'. This saves us from gratuitous SEGV.
4591
4592 * tests/conflicts.at (Solved SR Conflicts)
4593 (Unresolved SR Conflicts): Adjust.
4594 * tests/regression.at (Web2c Actions): Adjust.
4595
4596 2002-04-08 Akim Demaille <akim@epita.fr>
4597
4598 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
4599 Adding #line.
4600 Remove the duplicate `typedefs'.
4601 (RhsNumberType): Fix the declaration and various other typos.
4602 Use __ofile__.
4603 * data/bison.simple: Use __ofile__.
4604 * src/scan-skel.l: Handle __ofile__.
4605
4606 2002-04-08 Akim Demaille <akim@epita.fr>
4607
4608 * src/gram.h (item_number_t): New, the type of item numbers in
4609 RITEM. Note that it must be able to code symbol numbers as
4610 positive number, and the negation of rule numbers as negative
4611 numbers.
4612 Adjust all dependencies (pretty many).
4613 * src/reduce.c (rule): Remove this `short *' pointer: use
4614 item_number_t.
4615 * src/system.h (MINSHORT, MAXSHORT): Remove.
4616 Include `limits.h'.
4617 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
4618 (shortcpy): Remove.
4619 (MAXTABLE): Move to...
4620 * src/output.c (MAXTABLE): here.
4621 (prepare_rules): Use output_int_table to output rhs.
4622 * data/bison.simple, data/bison.c++: Adjust.
4623 * tests/torture.at (Big triangle): Move the limit from 254 to
4624 500.
4625 * tests/regression.at (Web2c Actions): Ajust.
4626
4627 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
4628 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
4629 passes, but produces negative #line number, once fixed, GCC is
4630 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
4631 C), it passes.
4632 * src/state.h (state_h): Code input lines on ints, not shorts.
4633
4634 2002-04-08 Akim Demaille <akim@epita.fr>
4635
4636 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
4637 and then the grammar.
4638
4639 2002-04-08 Akim Demaille <akim@epita.fr>
4640
4641 * src/system.h: No longer using strndup.
4642
4643 2002-04-07 Akim Demaille <akim@epita.fr>
4644
4645 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
4646 * src/output.c (output_table_data): Return the longest number.
4647 (prepare_tokens): Output `token_number_max').
4648 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
4649 New.
4650 Use them to define yy_token_number_type/TokenNumberType.
4651 Use this type for yytranslate.
4652 * tests/torture.at (Big triangle): Push the limit from 124 to
4653 253.
4654 * tests/regression.at (Web2c Actions): Adjust.
4655
4656 2002-04-07 Akim Demaille <akim@epita.fr>
4657
4658 * tests/torture.at (Big triangle): New.
4659 (GNU AWK Grammar, GNU Cim Grammar): Move to...
4660 * tests/existing.at: here.
4661
4662 2002-04-07 Akim Demaille <akim@epita.fr>
4663
4664 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
4665 nritems.
4666 Adjust dependencies.
4667
4668 2002-04-07 Akim Demaille <akim@epita.fr>
4669
4670 * src/reader.c: Normalize increments to prefix form.
4671
4672 2002-04-07 Akim Demaille <akim@epita.fr>
4673
4674 * src/reader.c, symtab.c: Remove debugging code.
4675
4676 2002-04-07 Akim Demaille <akim@epita.fr>
4677
4678 Rename all the `bucket's as `symbol_t'.
4679
4680 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
4681 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
4682 * src/symtab.c, src/symtab.h (bucket): Rename as...
4683 (symbol_t): this.
4684 (symbol_list_new, bucket_check_defined, bucket_make_alias)
4685 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
4686 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
4687 (buckets_new, buckets_free, buckets_do): Rename as...
4688 (symbol_list_new, symbol_check_defined, symbol_make_alias)
4689 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
4690 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
4691 (symbols_new, symbols_free, symbols_do): these.
4692
4693 2002-04-07 Akim Demaille <akim@epita.fr>
4694
4695 Use lib/hash for the symbol table.
4696
4697 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
4698 EOF.
4699 * src/lex.c (lex): Set the `number' member of new terminals.
4700 * src/reader.c (bucket_check_defined, bucket_make_alias)
4701 (bucket_check_alias_consistence, bucket_translation): New.
4702 (reader, grammar_free, readgram, token_translations_init)
4703 (packsymbols): Adjust.
4704 (reader): Number the predefined tokens.
4705 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
4706 for predefined tokens.
4707 * src/symtab.h (bucket): Remove all the hash table related
4708 members.
4709 * src/symtab.c (symtab): Replace by...
4710 (bucket_table): this.
4711 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
4712 (buckets_new, buckets_do): New.
4713
4714 2002-04-07 Akim Demaille <akim@epita.fr>
4715
4716 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
4717 (start_symbol, max_user_token_number, semantic_parser)
4718 (error_token_number): Initialize.
4719 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
4720 Initialize.
4721 (reader): Don't.
4722 (errtoken, eoftoken, undeftoken, axiom): Extern.
4723
4724 2002-04-07 Akim Demaille <akim@epita.fr>
4725
4726 * src/gram.h (rule_s): prec and precsym are now pointers
4727 to the bucket giving the priority/associativity.
4728 Member `associativity' removed: useless.
4729 * src/reduce.c, src/conflicts.c: Adjust.
4730
4731 2002-04-07 Akim Demaille <akim@epita.fr>
4732
4733 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
4734 Properly escape the symbols' TAG when outputting them.
4735
4736 2002-04-07 Akim Demaille <akim@epita.fr>
4737
4738 * src/lalr.h (LA): Is a bitsetv, not bitset*.
4739
4740 2002-04-07 Akim Demaille <akim@epita.fr>
4741
4742 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
4743 (LArule): this, which is an array to rule_t*.
4744 * src/print.c, src/conflicts.c: Adjust.
4745
4746 2002-04-07 Akim Demaille <akim@epita.fr>
4747
4748 * src/gram.h (rule_t): Rename `number' as `user_number'.
4749 `number' is a new member.
4750 Adjust dependencies.
4751 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
4752
4753 2002-04-07 Akim Demaille <akim@epita.fr>
4754
4755 As a result of the previous patch, it is no longer needed
4756 to reorder ritem itself.
4757
4758 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
4759
4760 2002-04-07 Akim Demaille <akim@epita.fr>
4761
4762 Be sure never to walk through RITEMS, but use only data related to
4763 the rules themselves. RITEMS should be banished.
4764
4765 * src/output.c (output_token_translations): Rename as...
4766 (prepare_tokens): this.
4767 In addition to `translate', prepare the muscles `tname' and
4768 `toknum', which were handled by...
4769 (output_rule_data): this.
4770 Remove, and move the remainder of its outputs into...
4771 (prepare_rules): this new routines, which also merges content from
4772 (output_gram): this.
4773 (prepare_rules): Be sure never to walk through RITEMS.
4774 (output_stos): Rename as...
4775 (prepare_stos): this.
4776 (output): Always invoke prepare_states, after all, just don't use it
4777 in the output if you don't need it.
4778
4779 2002-04-07 Akim Demaille <akim@epita.fr>
4780
4781 * src/LR0.c (new_state): Display `nstates' as the name of the
4782 newly created state.
4783 Adjust to initialize first_state and last_state if needed.
4784 Be sure to distinguish the initial from the final state.
4785 (new_states): Create the itemset of the initial state, and use
4786 new_state.
4787 * src/closure.c (closure): Now that the initial state has its
4788 items properly set, there is no need for a special case when
4789 creating `ruleset'.
4790
4791 As a result, now the rule 0, reducing to $axiom, is visible in the
4792 outputs. Adjust the test suite.
4793
4794 * tests/conflicts.at (Solved SR Conflicts)
4795 (Unresolved SR Conflicts): Adjust.
4796 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
4797 * tests/conflicts.at (S/R in initial): New.
4798
4799 2002-04-07 Akim Demaille <akim@epita.fr>
4800
4801 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
4802 the RHS of the rules.
4803 * src/output.c (output_gram): Likewise.
4804
4805 2002-04-07 Akim Demaille <akim@epita.fr>
4806
4807 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
4808 bucket.
4809 Adjust all dependencies.
4810 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
4811 `number' of the buckets too.
4812 * src/gram.h: Include `symtab.h'.
4813 (associativity): Move to...
4814 * src/symtab.h: here.
4815 No longer include `gram.h'.
4816
4817 2002-04-07 Akim Demaille <akim@epita.fr>
4818
4819 * src/gram.h, src/gram.c (rules_rhs_length): New.
4820 (ritem_longest_rhs): Use it.
4821 * src/gram.h (rule_t): `number' is a new member.
4822 * src/reader.c (packgram): Set it.
4823 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
4824 the end of `rules', and count them out of `nrules'.
4825 (reduce_output, dump_grammar): Adjust.
4826 * src/print.c (print_grammar): It is no longer needed to check for
4827 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
4828 * tests/reduce.at (Reduced Automaton): New test.
4829
4830 2002-04-07 Akim Demaille <akim@epita.fr>
4831
4832 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
4833 lacking `+ 1' to nrules, Bison reported as useless a token if it
4834 was used solely to set the precedence of the last rule...
4835
4836 2002-04-07 Akim Demaille <akim@epita.fr>
4837
4838 * data/bison.c++, data/bison.simple: Don't output the current file
4839 name in #line, to avoid useless diffs between two identical
4840 outputs under different names.
4841
4842 2002-04-07 Akim Demaille <akim@epita.fr>
4843
4844 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
4845 Normalize loops to using `< nrules + 1', not `<= nrules'.
4846
4847 2002-04-07 Akim Demaille <akim@epita.fr>
4848
4849 * TODO: Update.
4850
4851 2002-04-07 Akim Demaille <akim@epita.fr>
4852
4853 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
4854 bucket.value as bucket.number.
4855
4856 2002-04-07 Akim Demaille <akim@epita.fr>
4857
4858 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
4859 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
4860 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
4861 RHS, instead of being an index in RITEMS.
4862
4863 2002-04-04 Paul Eggert <eggert@twinsun.com>
4864
4865 * doc/bison.texinfo: Update copyright date.
4866 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
4867 (Symbols): Warn about running Bison in one character set,
4868 but compiling and/or running in an incompatible one.
4869 Warn about character code 256, too.
4870
4871 2002-04-03 Paul Eggert <eggert@twinsun.com>
4872
4873 * src/bison.data (YYSTACK_ALLOC): Depend on whether
4874 YYERROR_VERBOSE is nonzero, not whether it is defined.
4875
4876 Merge changes from bison-1_29-branch.
4877
4878 2002-03-20 Paul Eggert <eggert@twinsun.com>
4879
4880 Merge fixes from Debian bison_1.34-1.diff.
4881
4882 * configure.in (AC_PREREQ): 2.53.
4883
4884 2002-03-20 Akim Demaille <akim@epita.fr>
4885
4886 * src/conflicts.c (log_resolution): Argument `resolution' is const.
4887
4888 2002-03-19 Paul Eggert <eggert@twinsun.com>
4889
4890 * src/bison.simple (YYCOPY): New macro.
4891 (YYSTACK_RELOCATE): Use it.
4892 Remove Type arg; no longer needed. All callers changed.
4893 (yymemcpy): Remove; no longer needed.
4894
4895 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
4896 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
4897
4898 2002-03-19 Akim Demaille <akim@epita.fr>
4899
4900 Test and fix the #line outputs.
4901
4902 * tests/atlocal.at (GCC): New.
4903 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
4904 (Prologue synch line, ,%union synch line, Postprologue synch line)
4905 (Action synch line, Epilogue synch line): New tests.
4906 * src/reader.c (parse_union_decl): Define the muscle stype_line.
4907 * data/bison.simple, data/bison.c++: Use it.
4908
4909 2002-03-19 Akim Demaille <akim@epita.fr>
4910
4911 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
4912 (Solved SR Conflicts, %expect not enough, %expect right)
4913 (%expect too much): Move to...
4914 * tests/conflicts.at: this new file.
4915
4916 2002-03-19 Akim Demaille <akim@epita.fr>
4917
4918 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
4919 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
4920 that we can move to enums for instance.
4921 * src/output.c (token_definitions_output): Output a list of
4922 `token-name, token-number' instead of the #define.
4923 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
4924
4925 2002-03-14 Akim Demaille <akim@epita.fr>
4926
4927 Use Gettext 0.11.1.
4928
4929 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
4930
4931 * data/bison.c++: Make the user able to add members to the generated
4932 parser by subclassing.
4933
4934 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
4935
4936 * src/reader.c (read_additionnal_code): `c' should be an integer, not
4937 a character.
4938 Reported by Nicolas Tisserand and Nicolas Burrus.
4939
4940 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
4941
4942 * src/reader.c: Warn about lacking semi-colons, do not complain.
4943
4944 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
4945
4946 * data/bison.c++: Remove a debug line.
4947
4948 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
4949
4950 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
4951 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
4952 provide a default implementation.
4953
4954 2002-03-04 Akim Demaille <akim@epita.fr>
4955
4956 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
4957 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
4958 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
4959 * tests/semantic.at (Parsing Guards): Similarly.
4960 * src/reader.at (readgram): Complain if the last rule is not ended
4961 with a semi-colon.
4962
4963 2002-03-04 Akim Demaille <akim@epita.fr>
4964
4965 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
4966 * src/closure.c: here.
4967 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
4968 RTC.
4969 * src/warshall.h, src/warshall.c: Remove.
4970 * tests/sets.at (Broken Closure): Adjust.
4971
4972 2002-03-04 Akim Demaille <akim@epita.fr>
4973
4974 * src/output.c (output_skeleton): tempdir is const.
4975 bytes_read is unused.
4976
4977 2002-03-04 Akim Demaille <akim@epita.fr>
4978
4979 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
4980 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
4981 Update.
4982 From Michael Hayes.
4983
4984 2002-03-04 Akim Demaille <akim@epita.fr>
4985
4986 * src/closure.c (closure): `r' is unused.
4987
4988 2002-03-04 Akim Demaille <akim@epita.fr>
4989
4990 * tests/sets.at (Broken Closure): Add the ending `;'.
4991 * src/reader.at (readgram): Complain if a rule is not ended with a
4992 semi-colon.
4993
4994 2002-03-04 Akim Demaille <akim@epita.fr>
4995
4996 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
4997 (count_sr_conflicts): Use bitset_count.
4998 * src/reduce.c (inaccessable_symbols): Ditto.
4999 (bits_size): Remove.
5000 * src/warshall.h, src/warshall.c: Convert to bitsetv.
5001
5002 2002-03-04 Akim Demaille <akim@epita.fr>
5003
5004 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
5005 * src/reduce.c: Remove the `bitset_zero's following the
5006 `bitset_create's, as now it is performed by the latter.
5007
5008 2002-03-04 Akim Demaille <akim@epita.fr>
5009
5010 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
5011 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
5012 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
5013 latest sources from Michael.
5014
5015 2002-03-04 Akim Demaille <akim@epita.fr>
5016
5017 * src/output.c (output): Don't free the grammar.
5018 * src/reader.c (grammar_free): New.
5019 * src/main.c (main): Call it and don't free symtab here.
5020
5021 2002-03-04 Akim Demaille <akim@epita.fr>
5022
5023 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
5024 before returning.
5025 Reported by Benoit Perrot.
5026
5027 2002-03-04 Akim Demaille <akim@epita.fr>
5028
5029 Use bitset operations when possible, not loops over bits.
5030
5031 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
5032 bitset_or.
5033 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
5034 * src/reduce.c (useless_nonterminals): Formatting changes.
5035 * src/warshall.c (TC): Use bitset_or.
5036
5037 2002-03-04 Akim Demaille <akim@epita.fr>
5038
5039 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
5040 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
5041 Ditto.
5042
5043 2002-03-04 Akim Demaille <akim@epita.fr>
5044
5045 * src/lalr.c (F): Now a bitset*.
5046 Adjust all dependencies.
5047
5048 2002-03-04 Akim Demaille <akim@epita.fr>
5049
5050 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
5051 Adjust all dependencies.
5052
5053 2002-03-04 Akim Demaille <akim@epita.fr>
5054
5055 * src/L0.c, src/LR0.h (nstates): Be size_t.
5056 Adjust comparisons (signed vs unsigned).
5057 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
5058 bitset*.
5059 Adjust all dependencies.
5060
5061 2002-03-04 Akim Demaille <akim@epita.fr>
5062
5063 * src/closure.c (firsts): Now, also a bitset.
5064 Adjust all dependencies.
5065 (varsetsize): Remove, now unused.
5066 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
5067
5068 2002-03-04 Akim Demaille <akim@epita.fr>
5069
5070 * src/print.c: Convert to use bitset.h, not hand coded iterations
5071 over ints.
5072
5073 2002-03-04 Akim Demaille <akim@epita.fr>
5074
5075 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
5076
5077 2002-03-04 Akim Demaille <akim@epita.fr>
5078
5079 * src/closure.c (ruleset): Be a bitset.
5080 (rulesetsize): Remove.
5081
5082 2002-03-04 Akim Demaille <akim@epita.fr>
5083
5084 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
5085 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
5086 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
5087 * src/closure.c (fderives): Be an array of bitsets.
5088
5089 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
5090
5091 * data/bison.c++: Merge the two generated headers. Insert a copyright
5092 notice in each output file.
5093
5094 2002-02-28 Akim Demaille <akim@epita.fr>
5095
5096 * data/bison.c++: Copy the prologue of bison.simple to fetch
5097 useful M4 definitions, such as b4_header_guard.
5098
5099 2002-02-25 Akim Demaille <akim@epita.fr>
5100
5101 * src/getargs.c (version): Give the name of the authors, and use a
5102 translator friendly scheme for the bgr
5103 copyright notice.
5104
5105 2002-02-25 Akim Demaille <akim@epita.fr>
5106
5107 * src/output.c (header_output): Remove, now handled completely via
5108 M4.
5109
5110 2002-02-25 Akim Demaille <akim@epita.fr>
5111
5112 * m4/m4.m4: New, from CVS Autoconf.
5113 * configure.in: Invoke it.
5114 * src/output.c (output_skeleton): Use its result instead of the
5115 hard coded name.
5116
5117 2002-02-25 Akim Demaille <akim@epita.fr>
5118
5119 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
5120 Fileutils 4.1.5.
5121 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
5122 * src/output.c (output_skeleton): Use mkstemp to create a real
5123 temporary file.
5124 Move the filling of `skeleton' and its muscle to...
5125 (prepare): here.
5126 (output): Move the definition of the prologue muscle to...
5127 (prepare): here.
5128 * src/system.h (DEFAULT_TMPDIR): New.
5129
5130 2002-02-14 Paul Eggert <eggert@twinsun.com>
5131
5132 Remove the support for C++ namespace cleanliness; it was
5133 causing more problems than it was curing, since it didn't work
5134 properly on some nonstandard C++ compilers. This can wait
5135 for a proper C++ parser.
5136
5137 * NEWS: Document this.
5138 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
5139 of C++, as it's treated like C now.
5140 * src/bison.simple (YYSTD): Remove.
5141 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
5142 Treat C++ just like Standard C instead of trying to support
5143 namespace cleanliness.
5144
5145 2002-02-14 Akim Demaille <akim@epita.fr>
5146
5147 * tests/regression.at (else): Adjust to Andreas' change.
5148
5149 2002-02-14 Akim Demaille <akim@epita.fr>
5150
5151 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
5152
5153 2002-02-13 Andreas Schwab <schwab@suse.de>
5154
5155 * src/output.c (output_rule_data): Don't output NULL, it might
5156 not be defined yet.
5157
5158 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
5159
5160 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
5161 (Copyright notice): Update.
5162
5163 2002-02-11 Akim Demaille <akim@epita.fr>
5164
5165 * tests/regression.at (%nonassoc and eof): Don't include
5166 nonportable headers.
5167
5168 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
5169
5170 * data/bison.c++: Correct error recovery. Make the user able to
5171 initialize the starting location.
5172
5173 2002-02-07 Akim Demaille <akim@epita.fr>
5174
5175 * tests/input.at: New.
5176
5177 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
5178
5179 * data/bison.c++: Replace some direct m4 expansions by constants. Be
5180 more consistent when naming methods and variables. Put preprocessor
5181 directives around tables only needed for debugging.
5182
5183 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
5184
5185 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
5186 C++ parsers.
5187 (yy::b4_name::parse): Use print_.
5188
5189 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
5190
5191 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
5192
5193 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
5194
5195 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
5196 C++ parsers.
5197 (yy::b4_name::parse): Build verbose error messages, and use error_.
5198
5199 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
5200
5201 * data/bison.c++: Fix m4 quoting in comments.
5202
5203 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
5204
5205 * data/bison.c++: Adjust the parser code. Fix some muscles that were
5206 not expanded by m4.
5207
5208 2002-02-05 Akim Demaille <akim@epita.fr>
5209
5210 * data/bison.c++: Adjust to the M4 back end.
5211 More is certainly needed.
5212
5213 2002-02-05 Akim Demaille <akim@epita.fr>
5214
5215 Give a try to M4 as a back end.
5216
5217 * lib/readpipe.c: New, from wdiff.
5218 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
5219 BISON_HAIRY.
5220 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
5221 specific values. Now it is m4 that performs the lookup.
5222 * src/parse-skel.y: Remove.
5223 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
5224 * src/output.c (actions_output, guards_output)
5225 (token_definitions_output): No longer keeps track of the output
5226 line number, hence remove the second argument.
5227 (guards_output): Check against the guard member of a rule, not the
5228 action member.
5229 Adjust callers.
5230 (output_skeleton): Don't look for the skeleton location, let m4 do
5231 that.
5232 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
5233 file will be used.
5234 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
5235 (prepare): Given that for the time being changesyntax is not
5236 usable in M4, rename the muscles using `-' to `_'.
5237 Define `defines_flag', `output_parser_name' and `output_header_name'.
5238 * src/output.h (actions_output, guards_output)
5239 (token_definitions_output): Adjust prototypes.
5240 * src/scan-skel.l: Instead of scanning the skeletons, it now
5241 processes the output of m4: `__oline__' and `#output'.
5242 * data/bison.simple: Adjust to be used by M4(sugar).
5243 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
5244 to date.
5245 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
5246 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
5247 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
5248 shamelessly stolen from CVS Autoconf.
5249
5250 2002-02-05 Akim Demaille <akim@epita.fr>
5251
5252 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
5253 * configure.in: Check for the declarations of free and malloc.
5254 * src/muscle_tab.c: Adjust.
5255
5256 2002-02-05 Akim Demaille <akim@epita.fr>
5257
5258 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
5259 which have no values.
5260
5261 2002-02-05 Akim Demaille <akim@epita.fr>
5262
5263 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
5264 * data/: here.
5265
5266 2002-01-29 Paul Eggert <eggert@twinsun.com>
5267
5268 * src/bison.simple (YYSIZE_T): Do not define merely because
5269 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
5270 On some platforms, <alloca.h> does not declare YYSTD (size_t).
5271
5272 2002-01-27 Akim Demaille <akim@epita.fr>
5273
5274 Fix `%nonassoc and eof'.
5275
5276 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
5277 which were not properly copied! Replace
5278 memcpy (res->errs, src->errs, src->nerrs);
5279 with
5280 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
5281 !!!
5282 * tests/regression.at (%nonassoc and eof): Adjust to newest
5283 Autotest: `.' is not in the PATH.
5284
5285 2002-01-27 Akim Demaille <akim@epita.fr>
5286
5287 * tests/sets.at (AT_EXTRACT_SETS): New.
5288 (Nullable): Use it.
5289 (Firsts): New.
5290
5291 2002-01-26 Akim Demaille <akim@epita.fr>
5292
5293 * tests/actions.at, tests/calc.at, tests/headers.at,
5294 * tests/torture.at: Adjust to the newest Autotest which no longer
5295 forces `.' in the PATH.
5296
5297 2002-01-25 Akim Demaille <akim@epita.fr>
5298
5299 * tests/regression.at (%nonassoc and eof): New.
5300 Suggested by Robert Anisko.
5301
5302 2002-01-24 Akim Demaille <akim@epita.fr>
5303
5304 Bison dumps core when trying to complain about broken input files.
5305 Reported by Cris van Pelt.
5306
5307 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
5308 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
5309 into...
5310 (Invalid inputs): Strengthen: exercise parse_percent_token.
5311
5312 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
5313
5314 * src/Makefile.am: Add bison.c++.
5315 * src/bison.c++: New skeleton.
5316
5317 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
5318
5319 * po/it.po: New.
5320
5321 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
5322
5323 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
5324
5325 2002-01-20 Marc Autret <marc@gnu.org>
5326
5327 * src/files.c (compute_output_file_names): Fix
5328
5329 2002-01-20 Marc Autret <marc@gnu.org>
5330
5331 * tests/output.at: New test.
5332 * src/files.c (compute_base_names): Don't map extensions when
5333 the YACC flag is set, use defaults.
5334 Reported by Evgeny Stambulchik.
5335
5336 2002-01-20 Marc Autret <marc@gnu.org>
5337
5338 * src/system.h: Need to define __attribute__ away for non-GCC
5339 compilers as well (i.e. the vendor C compiler).
5340 Suggested by Albert Chin-A-Young.
5341
5342 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
5343
5344 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
5345 canonical definition.
5346 * src/system.h: Use the canonical definition for PARAMS (avoids
5347 a conflict with the macro from lib/hash.h).
5348
5349 2002-01-11 Akim Demaille <akim@epita.fr>
5350
5351 * configure.in: Use AC_FUNC_STRNLEN.
5352 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
5353
5354 2002-01-09 Akim Demaille <akim@epita.fr>
5355
5356 * src/files.c, src/files.h (output_infix): New.
5357 (tab_extension): Remove.
5358 (compute_base_names): Compute the former, drop the latter.
5359 * src/output.c (prepare): Insert the muscles `output-infix', and
5360 `output-suffix'.
5361 * src/parse-skel.y (string, string.1): New.
5362 (section.header): Use it.
5363 (section.yacc): Remove.
5364 (prefix): Remove too.
5365 * src/scan-skel.l: Adjust.
5366 * src/bison.simple, src/bison.hairy: Adjust.
5367
5368 2002-01-09 Akim Demaille <akim@epita.fr>
5369
5370 * configure.in (WERROR_CFLAGS): Compute it.
5371 * src/Makefile.am (CFLAGS): Pass it.
5372 * tests/atlocal.in (CFLAGS): Idem.
5373 * src/files.c: Fix a few warnings.
5374 (get_extension_index): Remove, unused.
5375
5376 2002-01-08 Akim Demaille <akim@epita.fr>
5377
5378 * src/getargs.c (AS_FILE_NAME): New.
5379 (getargs): Use it to convert DOSish file names.
5380 * src/files.c (base_name): Rename as full_base_name to avoid
5381 clashes with `base_name ()'.
5382 (filename_split): New.
5383 (compute_base_names): N-th rewrite, using filename_split.
5384
5385 2002-01-08 Akim Demaille <akim@epita.fr>
5386
5387 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
5388 New, stolen from the Fileutils 4.1.
5389 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
5390 * configure.in: Check for the presence of memrchr, and of its
5391 prototype.
5392
5393 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
5394
5395 * lib/hash.h (__P): Added definition for this macro.
5396 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
5397 BUILT_SOURCES, to ensure they are generated first.
5398 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
5399 %error-verbose to allow bootstrapping with bison 1.30x.
5400
5401 2002-01-06 Akim Demaille <akim@epita.fr>
5402
5403 * src/reader.c (parse_braces): Don't fetch the next char, the
5404 convention is to fetch on entry.
5405 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
5406 'switch' without a following semicolon.
5407 * tests/regression.at (braces parsing): New.
5408
5409 2002-01-06 Akim Demaille <akim@epita.fr>
5410
5411 Bison is dead wrong in its RR conflict reports.
5412
5413 * tests/torture.at (GNU Cim Grammar): New.
5414 * src/conflicts.c (count_rr_conflicts): Fix.
5415
5416 2002-01-06 Akim Demaille <akim@epita.fr>
5417
5418 Creating package.m4 from configure.ac causes too many problems.
5419
5420 * tests/Makefile.am (package.m4): Create it by hand,
5421 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
5422
5423 2002-01-06 Akim Demaille <akim@epita.fr>
5424
5425 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
5426 skeleton.h.
5427
5428 2002-01-04 Paul Eggert <eggert@twinsun.com>
5429
5430 * doc/bison.texinfo (Debugging):
5431 Remove YYSTDERR; it's no longer defined or used.
5432 Also, s/cstdio.h/cstdio/.
5433
5434 2002-01-03 Akim Demaille <akim@epita.fr>
5435
5436 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
5437
5438 2002-01-03 Akim Demaille <akim@epita.fr>
5439
5440 * src/parse-skel.y (process_skeleton): Don't bind the parser's
5441 tracing code to --trace, wait for a better --trace option, with
5442 args.
5443
5444 2002-01-03 Akim Demaille <akim@epita.fr>
5445
5446 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
5447 The ISO C++ standard is extremely clear about it: stderr is
5448 considered a macro, not a regular symbol (see table 94 `Header
5449 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
5450 Therefore std:: does not apply to it. It still does with fprintf.
5451 Also, s/cstdio.h/cstdio/.
5452
5453 2002-01-03 Akim Demaille <akim@epita.fr>
5454
5455 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
5456 for non system headers.
5457
5458 2002-01-02 Akim Demaille <akim@epita.fr>
5459
5460 Equip the skeleton chain with location tracking, runtime trace,
5461 pure parser and scanner.
5462
5463 * src/parse-skel.y: Request a pure parser, locations, and prefix
5464 renaming.
5465 (%union): Having several members with the same type does not help
5466 type mismatches, simplify.
5467 (YYPRINT, yyprint): New.
5468 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
5469 (skel_error): this.
5470 Handle locations.
5471 * src/scan-skel.l: Adjust to these changes.
5472 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
5473 (LOCATION_PRINT, skel_control_t): New.
5474
5475 2001-12-30 Akim Demaille <akim@epita.fr>
5476
5477 * src/parse-skel.y: Get rid of the shift/reduce conflict:
5478 replace `gb' with BLANKS.
5479 * src/scan-skel.l: Adjust.
5480
5481 2001-12-30 Akim Demaille <akim@epita.fr>
5482
5483 * src/system.h: We don't need nor want bcopy.
5484 Throw away MS-DOS crap: we don't need getpid.
5485 * configure.in: We don't need strndup. It was even causing
5486 problems: because Flex includes the headers *before* us,
5487 _GNU_SOURCE is not defined by config.h, and therefore strndup was
5488 not visible.
5489 * lib/xstrndup.c: New.
5490 * src/scan-skel.l: Use it.
5491 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
5492 * src/parse-skel.y: Use %directives instead of #defines.
5493
5494 2001-12-30 Akim Demaille <akim@epita.fr>
5495
5496 * src/skeleton.h: New.
5497 * src/output.c (output_parser, output_master_parser): Remove, dead
5498 code.
5499 * src/output.h (get_lines_number, actions_output, guards_output)
5500 (token_definitions_output): Prototype them.
5501 * src/parse-skel.y: Add the license notice.
5502 Include output.h and skeleton.h.
5503 (process_skeleton): Returns void, and takes a single parameter.
5504 * src/scan-skel.l: Add the license notice.
5505 Include skeleton.h.
5506 Don't use %option yylineno: it seems that then Flex imagines
5507 REJECT has been used, and therefore it won't reallocate its
5508 buffers (which makes no other sense to me than a bug). It results
5509 in warnings for `unused: yy_flex_realloc'.
5510
5511 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
5512
5513 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
5514 (MUSCLE_INSERT_PREFIX): ...to there.
5515 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
5516 (MUSCLE_INSERT_PREFIX): Move from here...
5517
5518 * src/bison.hairy: Add a section directive. Put braces around muscle
5519 names. This parser skeleton is still broken, but Bison should not
5520 choke on a bad muscle 'syntax'.
5521 * src/bison.simple: Add a section directive. Put braces around muscle
5522 names.
5523
5524 * src/files.h (strsuffix, stringappend): Add declarations.
5525 (tab_extension): Add declaration.
5526 (short_base_name): Add declaration.
5527
5528 * src/files.c (strsuffix, stringappend): No longer static. These
5529 functions are used in the skeleton parser.
5530 (tab_extension): New.
5531 (compute_base_names): Use the computations done in this function
5532 to guess if the generated parsers should have '.tab' in their
5533 names.
5534 (short_base_name): No longer static.
5535
5536 * src/output.c (output_skeleton): New.
5537 (output): Disable call to output_master_parser, and give a try to
5538 a new skeleton handling system.
5539 (guards_output, actions_output): No longer static.
5540 (token_definitions_output, get_lines_number): No longer static.
5541
5542 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
5543
5544 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
5545 parse-skel.y.
5546
5547 * src/parse-skel.y: New file.
5548 * src/scan-skel.l: New file.
5549
5550 2001-12-29 Akim Demaille <akim@epita.fr>
5551
5552 %name-prefix is broken.
5553
5554 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
5555 Adjust all dependencies.
5556 * tests/headers.at (export YYLTYPE): Strengthen this test: use
5557 %name-prefix.
5558
5559 Renaming yylval but not yylloc is not consistent. Now we do.
5560
5561 * src/bison.simple: Prefix yylloc if used.
5562 * doc/bison.texinfo (Decl Summary): Document that.
5563
5564 2001-12-29 Akim Demaille <akim@epita.fr>
5565
5566 * doc/bison.texinfo: Promote `%long-directive' over
5567 `%long_directive'.
5568 Remove all references to fixed-output-files, yacc is enough.
5569
5570 2001-12-29 Akim Demaille <akim@epita.fr>
5571
5572 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
5573 user prologue. These are defaults.
5574 * tests/actions.at (Mid-rule actions): Make sure the user can
5575 define YYDEBUG and YYERROR_VERBOSE.
5576
5577 2001-12-29 Akim Demaille <akim@epita.fr>
5578
5579 * src/output.c (header_output): Don't forget to export YYLTYPE and
5580 yylloc.
5581 * tests/headers.at (export YYLTYPE): New, make sure it does.
5582 * tests/regression.at (%union and --defines, Invalid CPP headers):
5583 Move to...
5584 * tests/headers.at: here.
5585
5586 2001-12-29 Akim Demaille <akim@epita.fr>
5587
5588 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
5589
5590 2001-12-29 Akim Demaille <akim@epita.fr>
5591
5592 * tests/actions.at (Mid-rule actions): Output on a single line
5593 instead of several.
5594
5595 2001-12-29 Akim Demaille <akim@epita.fr>
5596
5597 * doc/bison.texinfo: Formatting changes.
5598
5599 2001-12-29 Akim Demaille <akim@epita.fr>
5600
5601 Don't store the token defs in a muscle, just be ready to output it
5602 on command. Now possible via `symbols'. Fixes a memory leak.
5603
5604 * src/output.c (token_definitions_output): New.
5605 (output_parser, header_output): Use it.
5606 * src/reader.c (symbols_save): Remove.
5607
5608 2001-12-29 Akim Demaille <akim@epita.fr>
5609
5610 * src/bison.simple: Do not provide a default for YYSTYPE and
5611 YYLTYPE before the user's prologue. Otherwise it's hardly... a
5612 default.
5613
5614 2001-12-29 Akim Demaille <akim@epita.fr>
5615
5616 Mid-rule actions are simply... ignored!
5617
5618 * src/reader.c (readgram): Be sure to attach mid-rule actions to
5619 the empty-rule associated to the dummy symbol, not to the host
5620 rule.
5621 * tests/actions.at (Mid-rule actions): New.
5622
5623 2001-12-29 Akim Demaille <akim@epita.fr>
5624
5625 Memory leak.
5626
5627 * src/reader.c (reader): Free grammar.
5628
5629 2001-12-29 Akim Demaille <akim@epita.fr>
5630
5631 Memory leak.
5632
5633 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
5634 since it allocates it for each state, although only one is needed.
5635 (allocate_storage): Do it here.
5636
5637 2001-12-29 Akim Demaille <akim@epita.fr>
5638
5639 * src/options.h, src/options.c (create_long_option_table): Rename
5640 as...
5641 (long_option_table_new): this, with a clearer prototype.
5642 (percent_table): Remove, unused,
5643 * src/getargs.c (getargs): Adjust.
5644
5645 2001-12-29 Akim Demaille <akim@epita.fr>
5646
5647 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
5648 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
5649 as states.
5650
5651 2001-12-29 Akim Demaille <akim@epita.fr>
5652
5653 * src/lalr.c (build_relations): Rename `states' as `states1'.
5654 Sorry, I don't understand exactly what it is, no better name...
5655
5656 2001-12-29 Akim Demaille <akim@epita.fr>
5657
5658 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
5659 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
5660 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
5661 as rules.
5662
5663 2001-12-29 Akim Demaille <akim@epita.fr>
5664
5665 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
5666 ago.
5667
5668 2001-12-29 Akim Demaille <akim@epita.fr>
5669
5670 * src/reader.c, src/reader.h (user_toknums): Remove.
5671 Adjust all users to use symbols[i]->user_token_number.
5672
5673 2001-12-29 Akim Demaille <akim@epita.fr>
5674
5675 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
5676 Adjust all users to use symbols[i]->prec or ->assoc.
5677
5678 2001-12-29 Akim Demaille <akim@epita.fr>
5679
5680 * src/reader.c, src/reader.h (tags): Remove.
5681 Adjust all users to use symbols[i]->tag.
5682
5683 2001-12-29 Akim Demaille <akim@epita.fr>
5684
5685 * src/gram.h, src/gram.c (symbols): New, similar to state_table
5686 and rule_table.
5687 * src/reader.c (packsymbols): Fill this table.
5688 Drop sprec.
5689 * src/conflicts.c (resolve_sr_conflict): Adjust.
5690 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
5691 single table.
5692 Use symbols[i]->tag instead of tags[i].
5693
5694 2001-12-29 Akim Demaille <akim@epita.fr>
5695
5696 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
5697 In addition, put a comment in there, to replace...
5698 * tests/regression.at (%union and C comments): Remove.
5699
5700 2001-12-29 Akim Demaille <akim@epita.fr>
5701
5702 * tests/regression.at (Web2c Actions): Blindly move the actual
5703 output as expected output. The contents *seem* right to me, but I
5704 can't pretend reading perfectly parser tables... Nonetheless, all
5705 the other tests pass correctly, the table look OK, even though the
5706 presence of `$axiom' is to be noted: AFAICS it is useless (but
5707 harmless).
5708
5709 2001-12-29 Akim Demaille <akim@epita.fr>
5710
5711 * src/reader.c (readgram): Don't add the rule 0 if there were no
5712 rules read. In other words, add it _after_ having performed
5713 grammar sanity checks.
5714 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
5715
5716 2001-12-29 Akim Demaille <akim@epita.fr>
5717
5718 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
5719 visible, and some states have now a different number.
5720
5721 2001-12-29 Akim Demaille <akim@epita.fr>
5722
5723 * src/reader.c (readgram): Bind the initial rule's lineno to that
5724 of the first rule.
5725 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
5726 (Solved SR Conflicts): Adjust rule 0's line number.
5727
5728 2001-12-29 Akim Demaille <akim@epita.fr>
5729
5730 Fix the `GAWK Grammar' failure.
5731
5732 * src/LR0.c (final_state): Initialize to -1 so that we do compute
5733 the reductions of the first state which was mistakenly confused
5734 with the final state because precisely final_state was initialized
5735 to 0.
5736 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
5737 now noticed by Bison.
5738 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
5739 have a reduction on $default.
5740
5741 2001-12-29 Akim Demaille <akim@epita.fr>
5742
5743 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
5744 rule line numbers.
5745 * src/closure.c (print_closure): Likewise.
5746 * src/derives.c (print_derives): Likewise.
5747 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
5748 now.
5749
5750 2001-12-29 Akim Demaille <akim@epita.fr>
5751
5752 * src/lalr.c (lookaheads_print): New.
5753 (lalr): Call it when --trace-flag.
5754 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
5755 are dumped.
5756
5757 2001-12-29 Akim Demaille <akim@epita.fr>
5758
5759 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
5760 when walking through ritem, even via rule->rhs.
5761 * src/reduce.c (dump_grammar, useful_production, reduce_output)
5762 (useful_production, useless_nonterminals): Likewise.
5763 (reduce_grammar_tables): Likewise, plus update nritems.
5764 * src/nullable.c (set_nullable): Likewise.
5765 * src/lalr.c (build_relations): Likewise.
5766 * tests/sets.at (Nullable): Adjust.
5767 Fortunately, now, the $axiom is no longer nullable.
5768
5769 2001-12-29 Akim Demaille <akim@epita.fr>
5770
5771 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
5772 the 0-sentinel.
5773 * src/gram.c (ritem_longest_rhs): Likewise.
5774 * src/reduce.c (nonterminals_reduce): Likewise.
5775 * src/print_graph.c (print_graph): Likewise.
5776 * src/output.c (output_rule_data): Likewise.
5777 * src/nullable.c (set_nullable): Likewise.
5778
5779 2001-12-29 Akim Demaille <akim@epita.fr>
5780
5781 * src/output.c: Comment changes.
5782
5783 2001-12-27 Paul Eggert <eggert@twinsun.com>
5784
5785 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
5786 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
5787 Sparc, as they were causing more porting problems than the
5788 (minor) performance improvement was worth.
5789
5790 Also, catch up with 1.31's YYSTD.
5791
5792 2001-12-27 Akim Demaille <akim@epita.fr>
5793
5794 * src/output.c (output_gram): Rely on nritems, not the
5795 0-sentinel. See below.
5796 Use -1 as separator, not 0.
5797 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
5798 Rely on -1 as separator in yyrhs, instead of 0.
5799 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
5800 twice `Now at end of input', therefore there are two lines less to
5801 expect.
5802
5803 2001-12-27 Akim Demaille <akim@epita.fr>
5804
5805 * tests/regression.at (Unresolved SR Conflicts):
5806 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
5807 below.
5808
5809 2001-12-27 Akim Demaille <akim@epita.fr>
5810
5811 * src/LR0.c (new_state): Recognize the final state by the fact it
5812 is reached by eoftoken.
5813 (insert_start_shifting_state, insert_eof_shifting_state)
5814 (insert_accepting_state, augment_automaton): Remove, since now
5815 these states are automatically computed from the initial state.
5816 (generate_states): Adjust.
5817 * src/print.c: When reporting a rule number to the user, substract
5818 1, so that the axiom rule is rule 0, and the first user rule is 1.
5819 * src/reduce.c: Likewise.
5820 * src/print_graph.c (print_core): For the time being, just as for
5821 the report, depend upon --trace-flags to dump the full set of
5822 items.
5823 * src/reader.c (readgram): Once the grammar read, insert the rule
5824 0: `$axiom: START-SYMBOL $'.
5825 * tests/set.at: Adjust: rule 0 is now displayed, and since the
5826 number of the states has changed (the final state is no longer
5827 necessarily the last), catch up.
5828
5829 2001-12-27 Akim Demaille <akim@epita.fr>
5830
5831 Try to make the use of the eoftoken valid. Given that its value
5832 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
5833 is used instead of > 0 where appropriate, (ii), depend upon nritems
5834 instead of the 0-sentinel.
5835
5836 * src/gram.h, src/gram.c (nritems): New.
5837 Expected to be duplication of nitems, but for the time being...
5838 * src/reader.c (packgram): Assert nritems and nitems are equal.
5839 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
5840 * src/closure.c (print_closure, print_fderives): Likewise.
5841 * src/gram.c (ritem_print): Likewise.
5842 * src/print.c (print_core, print_grammar): Likewise.
5843 * src/print_graph.c: Likewise.
5844
5845 2001-12-27 Akim Demaille <akim@epita.fr>
5846
5847 * src/main.c (main): If there are complains after grammar
5848 reductions, then output the report anyway if requested, then die.
5849 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
5850 * src/reader.c (eoftoken): New.
5851 (parse_token_decl): If the token being defined has value `0', it
5852 is the eoftoken.
5853 (packsymbols): No longer hack `tags' to insert `$' by hand.
5854 Be sure to preserve the value of the eoftoken.
5855 (reader): Make sure eoftoken is defined.
5856 Initialize nsyms to 0: now eoftoken is created just like the others.
5857 * src/print.c (print_grammar): Don't special case the eof token.
5858 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
5859 lie anyway, albeit pleasant.
5860 * tests/calc.at: Exercise error messages with eoftoken.
5861 Change the grammar so that empty input is invalid.
5862 Adjust expectations.
5863 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
5864
5865 2001-12-27 Akim Demaille <akim@epita.fr>
5866
5867 * configure.in: Check the protos of strchr ans strspn.
5868 Replace strchr if needed.
5869 * src/system.h: Provide the protos of strchr, strspn and memchr if
5870 missing.
5871 * lib/strchr.c: New.
5872 * src/reader.c (symbols_save): Use strchr.
5873
5874 2001-12-27 Akim Demaille <akim@epita.fr>
5875
5876 * src/print.c, src/print_graph.c (escape): New.
5877 Use it to quote the TAGS outputs.
5878 * src/print_graph.c (print_state): Now errors are in red, and
5879 reductions in green.
5880 Prefer high to wide: output the state number on a line of its own.
5881
5882 2001-12-27 Akim Demaille <akim@epita.fr>
5883
5884 * src/state.h, src/state.c (reductions_new): New.
5885 * src/LR0.c (set_state_table): Let all the states have a
5886 `reductions', even if reduced to 0.
5887 (save_reductions): Adjust.
5888 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
5889 * src/print.c (print_reductions, print_actions): Adjust.
5890 * src/output.c (action_row): Adjust.
5891
5892 2001-12-27 Akim Demaille <akim@epita.fr>
5893
5894 * src/state.h, src/state.c (errs_new, errs_dup): New.
5895 * src/LR0.c (set_state_table): Let all the states have an errs,
5896 even if reduced to 0.
5897 * src/print.c (print_errs, print_reductions): Adjust.
5898 * src/output.c (output_actions, action_row): Adjust.
5899 * src/conflicts.c (resolve_sr_conflict): Adjust.
5900
5901 2001-12-27 Akim Demaille <akim@epita.fr>
5902
5903 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
5904
5905 2001-12-27 Akim Demaille <akim@epita.fr>
5906
5907 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
5908 * src/print.c: here.
5909 (lookaheadset, shiftset): New, used as additional storage by
5910 print_reductions.
5911 (print_results): Adjust.
5912 (print_shifts, print_gotos, print_errs): New, extracted from...
5913 (print_actions): here.
5914 * src/print_graph.c (print_actions): Remove dead code.
5915
5916 2001-12-27 Akim Demaille <akim@epita.fr>
5917
5918 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
5919 `$n' and `@n'.
5920
5921 2001-12-27 Akim Demaille <akim@epita.fr>
5922
5923 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
5924 (build_relations): Adjust.
5925
5926 2001-12-27 Akim Demaille <akim@epita.fr>
5927
5928 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
5929 duplication.
5930
5931 2001-12-27 Akim Demaille <akim@epita.fr>
5932
5933 * src/reader.c (packgram): Catch nitems overflows.
5934
5935 2001-12-27 Akim Demaille <akim@epita.fr>
5936
5937 * src/files.c, src/files.h (guard_obstack): Remove.
5938 * src/output.c (output): Adjust.
5939 * src/reader.c (parse_braces): New, factoring...
5940 (copy_action, copy_guard): these two which are renamed as...
5941 (parse_action, parse_guard): these.
5942 As a voluntary consequence, using braces around guards is now
5943 mandatory.
5944
5945 2001-12-27 Akim Demaille <akim@epita.fr>
5946
5947 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
5948 * src/reader.c (symbol_list): `guard' and `guard_line' are new
5949 members.
5950 (symbol_list_new): Adjust.
5951 (copy_action): action_line is the first line, not the last.
5952 (copy_guard): Just as for actions, store the `action' only, not
5953 the switch/case/break flesh.
5954 Don't parse the user action that might follow the guard, let...
5955 (readgram): do it, i.e., now, there can be an action after a
5956 guard.
5957 In other words the guard is just explicitly optional.
5958 (packgram): Adjust.
5959 * src/output.c (guards_output): New.
5960 (output_parser): Call it when needed.
5961 (output): Also free the guard and attrs obstacks.
5962 * src/files.c, src/files.h (obstack_save): Remove.
5963 (output_files): Remove.
5964 As a result, if one needs the former `.act' file, using an
5965 appropriate skeleton which requires actions and guards is now
5966 required.
5967 * src/main.c (main): Adjust.
5968 * tests/semantic.at: New.
5969 * tests/regression.at: Use `input.y' as input file name.
5970 Avoid 8+3 problems by requiring input.c when the test needs the
5971 parser.
5972
5973 2001-12-27 Akim Demaille <akim@epita.fr>
5974
5975 * src/reader.c (symbol_list_new): Be sure to initialize all the
5976 fields.
5977
5978 2001-12-27 Akim Demaille <akim@epita.fr>
5979
5980 All the hacks using a final pseudo state are now useless.
5981
5982 * src/LR0.c (set_state_table): state_table holds exactly nstates.
5983 * src/lalr.c (nLA): New.
5984 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
5985 instead of lookaheadsp from the pseudo state (nstate + 1).
5986
5987 2001-12-27 Akim Demaille <akim@epita.fr>
5988
5989 * src/output.c (action_row, token_actions): Use a state_t instead
5990 of a integer, and nlookaheads instead of the following state's
5991 lookaheadsp.
5992
5993 2001-12-27 Akim Demaille <akim@epita.fr>
5994
5995 * src/conflicts.c (log_resolution, flush_shift)
5996 (resolve_sr_conflict, set_conflicts, solve_conflicts)
5997 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
5998 (conflicts_print, print_reductions): Use a state_t instead of an
5999 integer when referring to a state.
6000 As much as possible, depend upon nlookaheads, instead of the
6001 `lookaheadsp' member of the following state (since lookaheads of
6002 successive states are successive, the difference between state n + 1
6003 and n served as the number of lookaheads for state n).
6004 * src/lalr.c (add_lookback_edge): Likewise.
6005 * src/print.c (print_core, print_actions, print_state)
6006 (print_results): Likewise.
6007 * src/print_graph.c (print_core, print_actions, print_state)
6008 (print_graph): Likewise.
6009 * src/conflicts.h: Adjust.
6010
6011 2001-12-27 Akim Demaille <akim@epita.fr>
6012
6013 * src/bison.hairy: Formatting/comment changes.
6014 ANSIfy.
6015 Remove `register' indications.
6016 Add plenty of `static'.
6017
6018 2001-12-27 Akim Demaille <akim@epita.fr>
6019
6020 * src/output.c (prepare): Drop the muscle `ntbase' which
6021 duplicates ntokens.
6022 * src/bison.simple: Formatting/comment changes.
6023 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
6024 is an undocumented synonym.
6025
6026 2001-12-22 Akim Demaille <akim@epita.fr>
6027
6028 * src/output.c (output_table_data): Change the prototype to use
6029 `int' for array ranges: some invocations do pass an int, not a
6030 short.
6031 Reported by Wayne Green.
6032
6033 2001-12-22 Akim Demaille <akim@epita.fr>
6034
6035 Some actions of web2c.y are improperly triggered.
6036 Reported by Mike Castle.
6037
6038 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
6039 * tests/regression.at (Web2c): Rename as...
6040 (Web2c Report): this.
6041 (Web2c Actions): New.
6042
6043 2001-12-22 Akim Demaille <akim@epita.fr>
6044
6045 Reductions in web2c.y are improperly reported.
6046 Reported by Mike Castle.
6047
6048 * src/conflicts.c (print_reductions): Fix.
6049 * tests/regression.at (Web2c): New.
6050
6051 2001-12-18 Akim Demaille <akim@epita.fr>
6052
6053 Some host fail on `assert (!"foo")', which expands to
6054 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
6055 Reported by Nelson Beebee.
6056
6057 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
6058 `#define it_succeeded 0' and `assert (it_succeeded)'.
6059
6060 2001-12-17 Marc Autret <autret_m@epita.fr>
6061
6062 * src/bison.simple: Don't hard code the skeleton line and filename.
6063 * src/output.c (output_parser): Rename 'line' as 'output_line'.
6064 New line counter 'skeleton_line' (skeleton-line muscle).
6065
6066 2001-12-17 Paul Eggert <eggert@twinsun.com>
6067
6068 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
6069 YYDEBUG must be defined to a nonzero value.
6070
6071 * src/bison.simple (yytname): Do not assume that the user defines
6072 YYDEBUG to a properly parenthesized expression.
6073
6074 2001-12-17 Akim Demaille <akim@epita.fr>
6075
6076 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
6077 nlookaheads is a new member.
6078 Adjust all users.
6079 * src/lalr.h (nlookaheads): Remove this orphan declaration.
6080 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
6081 state.
6082
6083 2001-12-17 Akim Demaille <akim@epita.fr>
6084
6085 * src/files.h, src/files.c (open_files, close_files): Remove.
6086 * src/main.c (main): Don't open/close files, nor invoke lex_free,
6087 let...
6088 * src/reader.c (reader): Do it.
6089
6090 2001-12-17 Akim Demaille <akim@epita.fr>
6091
6092 * src/conflicts.c (print_reductions): Formatting changes.
6093
6094 2001-12-17 Akim Demaille <akim@epita.fr>
6095
6096 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
6097 (flush_reduce): New.
6098 (resolve_sr_conflict): Adjust.
6099
6100 2001-12-17 Akim Demaille <akim@epita.fr>
6101
6102 * src/output.c (output_obstack): Be static and rename as...
6103 (format_obstack): this, to avoid any confusion with files.c's
6104 output_obstack.
6105 * src/reader.h (muscle_obstack): Move to...
6106 * src/output.h: here, since it's defined in output.c.
6107
6108 2001-12-17 Akim Demaille <akim@epita.fr>
6109
6110 * src/output.c (action_row, save_column, default_goto)
6111 (sort_actions, matching_state, pack_vector): Better variable
6112 locality.
6113
6114 2001-12-17 Akim Demaille <akim@epita.fr>
6115
6116 * src/output.c: Various formatting changes.
6117
6118 2001-12-17 Akim Demaille <akim@epita.fr>
6119
6120 * src/files.c (output_files): Free the output_obstack.
6121 * src/main.c (main): Call print and print_graph conditionally.
6122 * src/print.c (print): Work unconditionally.
6123 * src/print_graph.c (print_graph): Work unconditionally.
6124 * src/conflicts.c (log_resolution): Output only if verbose_flag.
6125
6126 2001-12-16 Marc Autret <autret_m@epita.fr>
6127
6128 * src/output.c (actions_output): Fix. When we use %no-lines,
6129 there is one less line per action.
6130
6131 2001-12-16 Marc Autret <autret_m@epita.fr>
6132
6133 * src/bison.simple: Remove a useless #line directive.
6134 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
6135 * src/output.c (get_lines_number): New.
6136 (output_parser): Adjust, now takes care about the lines of a
6137 output muscles.
6138 Fix line numbering.
6139 (actions_output): Computes the number of lines taken by actions.
6140 (output_master_parser): Insert new skeleton which is the name of
6141 the output parser file name.
6142
6143 2001-12-15 Marc Autret <autret_m@epita.fr>
6144
6145 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
6146
6147 2001-12-15 Marc Autret <autret_m@epita.fr>
6148
6149 * src/output.c (output_gram): Keep track of the hairy one.
6150
6151 2001-12-15 Akim Demaille <akim@epita.fr>
6152
6153 Make `make distcheck' work.
6154
6155 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
6156 system.h which uses libgettext.h.
6157
6158 2001-12-15 Akim Demaille <akim@epita.fr>
6159
6160 * src/nullable.c (set_nullable): Useless rules must be skipped,
6161 otherwise, since we range over their symbols, we might look at a
6162 nonterminal which no longer ``exists'', i.e., it is not counted in
6163 `nvars', hence we overflow our arrays.
6164
6165 2001-12-15 Akim Demaille <akim@epita.fr>
6166
6167 The header can also be produced directly, without any obstack!
6168 Yahoo!
6169
6170 * src/files.c, src/files.h (defines_obstack): Remove.
6171 (compute_header_macro): Global.
6172 (defines_obstack_save): Remove.
6173 * src/reader.c (parse_union_decl): No longer output to
6174 defines_obstack: its content can be found in the `stype' muscle
6175 anyway.
6176 (output_token_translations): Merge into...
6177 (symbols_output): this.
6178 Rename as...
6179 (symbols_save): this.
6180 (reader): Adjust.
6181 * src/output.c (header_output): New.
6182 (output): Call it.
6183
6184 2001-12-15 Akim Demaille <akim@epita.fr>
6185
6186 * src/reader.c (parse_union_decl): Instead of handling two obstack
6187 simultaneously, use one to define the `stype' muscle, and use the
6188 value of the latter to fill defines_obstack.
6189 (copy_comment): Remove.
6190 (copy_comment2): Work for a single obstack.
6191 Rename as...
6192 (copy_comment): this.
6193
6194 2001-12-15 Akim Demaille <akim@epita.fr>
6195
6196 * src/lex.c, src/lex.h (xgetc): No longer static.
6197 * src/reader.c (parse_union_decl): Revamp.
6198
6199 2001-12-15 Akim Demaille <akim@epita.fr>
6200
6201 Still making progress in separating Bison into (i) input, (ii)
6202 process, (iii) output: now we can directly output the parser file
6203 without using table_obstack at all.
6204
6205 * src/files.c, src/files.h (table_obstack): Bye bye.
6206 (parser_file_name): New.
6207 * src/files.c (compute_output_file_names): Compute it.
6208 * src/output.c (actions_output, output_parser)
6209 (output_master_parser): To a file instead of an obstack.
6210
6211 2001-12-15 Akim Demaille <akim@epita.fr>
6212
6213 Attach actions to rules, instead of pre-outputting them to
6214 actions_obstack.
6215
6216 * src/gram.h (rule_t): action and action_line are new members.
6217 * src/reader.c (symbol_list): Likewise.
6218 (copy_action): Save the actions within the rule.
6219 (packgram): Save them in rule_table.
6220 * src/output.c (actions_output): New.
6221 (output_parser): Use it on `%%actions'.
6222 (output_rule_data): Don't free rule_table.
6223 (output): Do it.
6224 (prepare): Don't save the `action' muscle.
6225 * src/bison.simple: s/%%action/%%actions/.
6226
6227 2001-12-15 Akim Demaille <akim@epita.fr>
6228
6229 * src/reader.c (copy_action): When --yacc, don't append a `;'
6230 to the user action: let it fail if lacking.
6231 Suggested by Arnold Robbins and Tom Tromey.
6232
6233 2001-12-14 Akim Demaille <akim@epita.fr>
6234
6235 * src/lex.c (literalchar): Simply return the char you decoded, non
6236 longer mess around with obstacks and int pointers.
6237 Adjust all callers.
6238
6239 2001-12-14 Akim Demaille <akim@epita.fr>
6240
6241 * src/lex.c (literalchar): Don't escape the special characters,
6242 just decode them, and keep them as char (before, eol was output as
6243 the 2 char string `\n' etc.).
6244 * src/output.c (output_rule_data): Use quotearg to output the
6245 token strings.
6246
6247 2001-12-13 Paul Eggert <eggert@twinsun.com>
6248
6249 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
6250 Do not infringe on the global user namespace when using C++.
6251 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
6252 All uses of `fprintf' and `stderr' changed.
6253
6254 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
6255
6256 2001-12-13 Akim Demaille <akim@epita.fr>
6257
6258 The computation of nullable is broken: it doesn't handle empty
6259 RHS's properly.
6260
6261 * tests/torture.at (GNU AWK Grammar): New.
6262 * tests/sets.at (Nullable): New.
6263 * src/nullable.c (set_nullable): Instead of blindly looping over
6264 `ritems', loop over the rules, and then over their rhs's.
6265
6266 Work around Autotest bugs.
6267
6268 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
6269 frame, because Autotest understand lines starting with a `+' as
6270 traces from the shell. Then, they are not processed properly.
6271 Admittedly an Autotest bug, but we don't have time to wait for
6272 Autotest to catch up.
6273 * tests/regression.at (Broken Closure): Adjust to the new table
6274 frames.
6275 Move to...
6276 * tests/sets.at: here.
6277
6278 2001-12-13 Akim Demaille <akim@epita.fr>
6279
6280 * src/closure.c (closure): Use nrules instead of playing tricks
6281 with BITS_PER_WORD.
6282
6283 2001-12-13 Akim Demaille <akim@epita.fr>
6284
6285 * src/print.c (print_actions): Output the handling of `$' as the
6286 traces do: shifting the token EOF. Before EOF was treated as a
6287 nonterminal.
6288 * tests/regression.at: Adjust some tests.
6289 * src/print_graph.c (print_core): Complete the set of items via
6290 closure. The next-to-final and final states are still unsatisfying,
6291 but that's to be addressed elsewhere.
6292 No longer output the rule numbers, but do output the state number.
6293 A single loop for the shifts + gotos is enough, but picked a
6294 distinct color for each.
6295 (print_graph): Initialize and finalize closure.
6296
6297 2001-12-13 Akim Demaille <akim@epita.fr>
6298
6299 * src/reader.c (readgram): Remove dead code, an strip useless
6300 braces.
6301 (get_type): Remove, unused.
6302
6303 2001-12-12 Akim Demaille <akim@epita.fr>
6304
6305 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
6306 on that of lib/error.c.
6307
6308 2001-12-12 Akim Demaille <akim@epita.fr>
6309
6310 Some hosts don't like `/' in includes.
6311
6312 * src/system.h: Include libgettext.h without qualifying the path.
6313 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
6314 $(top_srcdir).
6315
6316 2001-12-11 Marc Autret <autret_m@epita.fr>
6317
6318 * src/output.c (output_parser): Remove useless muscle.
6319
6320 2001-12-11 Marc Autret <autret_m@epita.fr>
6321
6322 * src/bison.simple: Remove #line just before %%epilogue. It
6323 is now handled in ...
6324 * src/reader.c (read_additionnal_code): Add the output of a
6325 #line for the epilogue.
6326
6327 2001-12-10 Marc Autret <autret_m@epita.fr>
6328
6329 * src/reader.c (copy_definition): Re-use CPP-outed code which
6330 replace precedent remove.
6331 * src/bison.simple: Remove #line before %%prologue because
6332 %%input-line is wrong at this time.
6333
6334 2001-12-10 Marc Autret <autret_m@epita.fr>
6335
6336 * src/reader.c (symbols_output): Clean up.
6337 * src/output.c (output_gram, output): Clean up.
6338
6339 2001-12-10 Akim Demaille <akim@epita.fr>
6340
6341 * src/lalr.c (initialize_lookaheads): New. Extracted from...
6342 * src/LR0.c (set_state_table): here.
6343 * src/lalr.c (lalr): Call it.
6344
6345 2001-12-10 Akim Demaille <akim@epita.fr>
6346
6347 * src/state.h (shifts): Remove the `number' member: shifts are
6348 attached to state, hence no longer need to be labelled with a
6349 state number.
6350
6351 2001-12-10 Akim Demaille <akim@epita.fr>
6352
6353 Now that states have a complete set of members, the linked list of
6354 shifts is useless: just fill directly the state's shifts member.
6355
6356 * src/state.h (shifts): Remove the `next' member.
6357 * src/LR0.c (first_state, last_state): Remove.
6358 Adjust the callers.
6359 (augment_automaton): Don't look for the shifts that must be added
6360 a shift on EOF: it is those of the state we looked for! But now,
6361 since shifts are attached, it is no longer needed to looking
6362 merely by its id: its number.
6363
6364 2001-12-10 Akim Demaille <akim@epita.fr>
6365
6366 * src/LR0.c (augment_automaton): Better variable locality.
6367 Remove an impossible branch: if there is a state corresponding to
6368 the start symbol being shifted, then there is shift for the start
6369 symbol from the initial state.
6370
6371 2001-12-10 Akim Demaille <akim@epita.fr>
6372
6373 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
6374 only when appropriate: when insert_start_shifting_state' is not
6375 invoked.
6376 * tests/regression.at (Rule Line Numbers): Adjust.
6377
6378 2001-12-10 Akim Demaille <akim@epita.fr>
6379
6380 * src/LR0.c (augment_automaton): Now that all states have shifts,
6381 merge the two cases addition shifts to the initial state.
6382
6383 2001-12-10 Akim Demaille <akim@epita.fr>
6384
6385 * src/lalr.c (set_state_table): Move to...
6386 * src/LR0.c: here.
6387 * src/lalr.c (lalr): Don't call it...
6388 * src/LR0.c (generate_states): do it.
6389 * src/LR0.h (first_state): Remove, only the table is used.
6390
6391 2001-12-10 Akim Demaille <akim@epita.fr>
6392
6393 * src/LR0.h (first_shift, first_reduction): Remove.
6394 * src/lalr.c: Don't use first_shift: find shifts through the
6395 states.
6396
6397 2001-12-10 Akim Demaille <akim@epita.fr>
6398
6399 * src/LR0.c: Attach shifts to states as soon as they are
6400 computed.
6401 * src/lalr.c (set_state_table): Instead of assigning shifts to
6402 state, just assert that the mapping was properly done.
6403
6404 2001-12-10 Akim Demaille <akim@epita.fr>
6405
6406 * src/LR0.c (insert_start_shift): Rename as...
6407 (insert_start_shifting_state): this.
6408 (insert_eof_shifting_state, insert_accepting_state): New.
6409 (augment_automaton): Adjust.
6410 Better locality of the variables.
6411 When looking if the start_symbol is shifted from the initial
6412 state, using `while (... symbol != start_symbol ...)' sounds
6413 better than `while (... symbol < start_symbol ...)': If fail
6414 to see how the order between symbols could be relevant!
6415
6416 2001-12-10 Akim Demaille <akim@epita.fr>
6417
6418 * src/getargs.h: Don't declare `spec_name_prefix' and
6419 `spec_file_prefix', declared by src/files.h.
6420 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
6421 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
6422 * src/output.c (prepare): Adjust.
6423 * src/reader.c (symbols_output): Likewise.
6424 * src/vmsgetargs.c: Vaguely adjust, but who cares?
6425
6426 2001-12-10 Akim Demaille <akim@epita.fr>
6427
6428 * src/muscle_tab.c (muscle_init): NULL is a better default than
6429 `"0"'.
6430
6431 2001-12-10 Akim Demaille <akim@epita.fr>
6432
6433 * src/reader.c (reader): Calling symbols_output once is enough.
6434
6435 2001-12-10 Akim Demaille <akim@epita.fr>
6436
6437 Now that states have a complete set of members, the linked list of
6438 reductions is useless: just fill directly the state's reductions
6439 member.
6440
6441 * src/state.h (struct reductions): Remove member `number' and
6442 `next'.
6443 * src/LR0.c (first_reduction, last_reduction): Remove.
6444 (save_reductions): Don't link the new reductions, store them in
6445 this_state.
6446 * src/lalr.c (set_state_table): No need to attach reductions to
6447 states, it's already done.
6448 * src/output.c (output_actions): No longer free the shifts, then
6449 the reductions, then the states: free all the states and their
6450 members.
6451
6452 2001-12-10 Akim Demaille <akim@epita.fr>
6453
6454 * src/options.c (OPTN, DRTV, BOTH): New.
6455 (option_table): Use them.
6456
6457 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
6458 the job of system.h.
6459 * src/options.c: Don't include stdio.h and xalloc.h for the same
6460 reasons.
6461
6462 2001-12-10 Akim Demaille <akim@epita.fr>
6463
6464 * src/output.c (output, prepare): Make sure the values of the
6465 muscles `action' and `prologue' are 0-terminated.
6466
6467 2001-12-10 Akim Demaille <akim@epita.fr>
6468
6469 Clean up GCC warnings.
6470
6471 * src/reader.c (copy_action): `buf' is not used.
6472 (parse_skel_decl): Be static.
6473 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
6474 * src/options.h (create_long_option_table): Have a real prototype.
6475 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
6476 (hash_delete_at): Return const void *.
6477 Adjust casts to preserve the const.
6478
6479 2001-12-10 Akim Demaille <akim@epita.fr>
6480
6481 * configure.in: Require 2.52g.
6482 M4 is not needed, but AUTOM4TE is.
6483 * m4/m4.m4: Remove.
6484 * tests/Makefile.am: Adjust.
6485
6486 2001-12-10 Akim Demaille <akim@epita.fr>
6487
6488 One structure for states is enough, even though theoretically
6489 there are LR(0) states and LALR(1) states.
6490
6491 * src/lalr.h (state_t): Remove.
6492 (state_table): Be state_t **, not state_t *.
6493 * src/state.h (core, CORE_ALLOC): Rename as...
6494 (state_t, STATE_ALLOC): this.
6495 Add the LALR(1) members: shifts, reductions, errs.
6496 * src/LR0.c (state_table): Rename as...
6497 (state_hash): this, to avoid name clashes with the global
6498 `state_table'.
6499 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
6500 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
6501
6502 2001-12-10 Akim Demaille <akim@epita.fr>
6503
6504 Bison dumps core on bash.y.
6505 Reported by Pascal Bart.
6506
6507 * src/warshall.c (bitmatrix_print): New.
6508 (TC): Use it.
6509 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
6510 j must be the outer loop.
6511 * tests/regression.at (Broken Closure): New.
6512
6513 2001-12-05 Akim Demaille <akim@epita.fr>
6514
6515 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
6516 its argument.
6517 Reported by Peter Hámorský.
6518
6519 2001-12-05 Akim Demaille <akim@epita.fr>
6520
6521 * src/conflicts.c (err_table): Remove.
6522 (resolve_sr_conflict): Adjust.
6523 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
6524 Rename as...
6525 (state_t.reductions, state_t.shifts): this.
6526
6527 2001-12-05 Akim Demaille <akim@epita.fr>
6528
6529 * src/reduce.c (reduce_grammar_tables): No longer disable the
6530 removal of useless rules via CPP but via `if (0)', so that the
6531 compiler still check the code is valid.
6532 For instance, it should have noticed `rline' no longer exists: use
6533 the `line' member of rule_t.
6534 * src/gram.c (dummy, rline): Remove, unused.
6535
6536 2001-12-05 Akim Demaille <akim@epita.fr>
6537
6538 * src/output.c (pack_vector): Use assert, not berror.
6539 * src/main.c (berror): Remove, unused.
6540
6541 2001-12-05 Akim Demaille <akim@epita.fr>
6542
6543 New experimental feature: if --verbose --trace output all the
6544 items of a state, not only its kernel.
6545
6546 * src/print.c (print_core): If `trace_flag', then invoke closure
6547 before outputting the items of the state (print_core is no longer
6548 a correct name them).
6549 (print_results): Invoke new_closure/free_closure if needed.
6550
6551 2001-12-05 Akim Demaille <akim@epita.fr>
6552
6553 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
6554 * src/closure.c, src/closure.h (itemsetsize): Rename as...
6555 (nitemset): for consistency with the rest of the project.
6556
6557 2001-12-05 Akim Demaille <akim@epita.fr>
6558
6559 * src/closure.c (print_closure): Improve.
6560 (closure): Use it for printing input and output.
6561
6562 2001-12-05 Akim Demaille <akim@epita.fr>
6563
6564 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
6565 indexed by nonterminals.
6566
6567 2001-12-05 Akim Demaille <akim@epita.fr>
6568
6569 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
6570 what it was!).
6571 * src/warshall.h: Remove accidental duplication of the content.
6572
6573 2001-12-05 Akim Demaille <akim@epita.fr>
6574
6575 * src/closure.c (set_fderives): De-obfuscate.
6576
6577 2001-12-05 Akim Demaille <akim@epita.fr>
6578
6579 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
6580
6581 2001-12-05 Akim Demaille <akim@epita.fr>
6582
6583 * src/closure.c (set_firsts): De-obfuscate.
6584
6585 2001-12-05 Akim Demaille <akim@epita.fr>
6586
6587 * src/output.c (action_row): De-obfuscate
6588 using the good o' techniques: arrays not pointers, variable
6589 locality, BITISSET, RESETBIT etc.
6590
6591 2001-12-05 Akim Demaille <akim@epita.fr>
6592
6593 Pessimize the code to simplify it: from now on, all the states
6594 have a valid SHIFTS, which NSHIFTS is possibly 0.
6595
6596 * src/LR0.c (shifts_new): Be global and move to..
6597 * src/state.c, src/state.h: here.
6598 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
6599 * src/print_graph: Adjust.
6600
6601 2001-12-05 Akim Demaille <akim@epita.fr>
6602
6603 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
6604 * src/conflicts.c: Use it.
6605 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
6606 incorrectly ``simplified''.
6607
6608 2001-12-05 Akim Demaille <akim@epita.fr>
6609
6610 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
6611 using the good o' techniques: arrays not pointers, variable
6612 locality, BITISSET, RESETBIT etc.
6613
6614 2001-12-05 Akim Demaille <akim@epita.fr>
6615
6616 * src/state.h (SHIFT_SYMBOL): New.
6617 * src/conflicts.c: Use it to deobfuscate.
6618
6619 2001-12-05 Akim Demaille <akim@epita.fr>
6620
6621 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
6622 (print_reductions): De-obfuscate using the good o' techniques:
6623 arrays not pointers, variable locality, BITISSET.
6624
6625 2001-12-05 Akim Demaille <akim@epita.fr>
6626
6627 * src/conflicts.c (print_reductions): Arrays, not pointers.
6628 Use BITISSET.
6629
6630 2001-12-05 Akim Demaille <akim@epita.fr>
6631
6632 * src/conflicts.c (print_reductions): Pessimize, but clarify.
6633
6634 2001-12-05 Akim Demaille <akim@epita.fr>
6635
6636 * src/conflicts.c (print_reductions): Improve variable locality.
6637
6638 2001-12-05 Akim Demaille <akim@epita.fr>
6639
6640 * src/conflicts.c (print_reductions): Pessimize, but clarify.
6641
6642 2001-12-05 Akim Demaille <akim@epita.fr>
6643
6644 * src/conflicts.c (print_reductions): Improve variable locality.
6645
6646 2001-12-05 Akim Demaille <akim@epita.fr>
6647
6648 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
6649 * src/lalr.c: Use them.
6650
6651 2001-12-05 Akim Demaille <akim@epita.fr>
6652
6653 * src/LR0.c (augment_automaton): Formatting changes.
6654 Better variable locality.
6655
6656 2001-12-05 Akim Demaille <akim@epita.fr>
6657
6658 * src/lalr.c (matrix_print): New.
6659 (transpose): Use it.
6660 Use arrays instead of pointers.
6661
6662 2001-12-05 Akim Demaille <akim@epita.fr>
6663
6664 * src/lalr.c (maxrhs): Move to...
6665 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
6666 * src/lalr.c (build_relations): Adjust.
6667
6668 2001-12-05 Akim Demaille <akim@epita.fr>
6669
6670 * src/lalr.c (transpose): Free the memory allocated to the
6671 argument, as it is replaced by the results by the unique caller.
6672 (build_relations): Merely invoke transpose: it handles the memory
6673 deallocation.
6674 Improve variable locality.
6675 Avoid variables used as mere abbreviations.
6676 (compute_lookaheads): Use arrays instead of pointers.
6677
6678 2001-12-05 Akim Demaille <akim@epita.fr>
6679
6680 * src/lalr.c (initialize_F): Improve variable locality.
6681 Avoid variables used as mere abbreviations.
6682
6683 2001-12-05 Akim Demaille <akim@epita.fr>
6684
6685 * src/derives.c (print_derives): Display the ruleno.
6686 * src/lalr.c (initialize_F, transpose): Better variable locality
6687 to improve readability.
6688 Avoid variables used as mere abbreviations.
6689
6690 2001-12-05 Akim Demaille <akim@epita.fr>
6691
6692 * src/lalr.c (traverse): Use arrays instead of pointers.
6693
6694 2001-12-05 Akim Demaille <akim@epita.fr>
6695
6696 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
6697 the handling of squeue.
6698 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
6699
6700 2001-12-05 Akim Demaille <akim@epita.fr>
6701
6702 Because useless nonterminals are now kept alive (instead of being
6703 `destroyed'), we now sometimes examine them, and store information
6704 related to them. Hence we need to know their number, and adjust
6705 memory allocations.
6706
6707 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
6708 static.
6709 * src/LR0.c (allocate_itemsets): The memory allocated to
6710 `symbol_count' was used for two different purpose: once to count
6711 the number of occurrences of each symbol, and later reassigned to
6712 `shift_symbol', containing the symbol that can be shifted from a
6713 given state.
6714 Deobfuscate, i.e., allocate, use and free `symbol_count' here
6715 only, and...
6716 (new_itemsets): Allocate `shift_symbol' here.
6717 (allocate_itemsets): symbol_count includes useless nonterminals.
6718 Make room for them.
6719 (free_storage): Use `free', not `XFREE', for pointers that cannot
6720 be null.
6721
6722 2001-12-05 Akim Demaille <akim@epita.fr>
6723
6724 * src/nullable.c (set_nullable): Deobfuscate the handling of
6725 ritem.
6726 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
6727
6728 2001-12-05 Akim Demaille <akim@epita.fr>
6729
6730 * src/gram.c, src/gram.h (ritem_print): New.
6731 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
6732 (This useless function was defined only to work around VMS linkers
6733 that can't handle compilation units with variables only).
6734 * src/reduce.c (dump_grammar): Use it to trace the construction of
6735 ritem.
6736
6737 2001-12-04 Paul Eggert <eggert@twinsun.com>
6738
6739 * src/bison.simple (union yyalloc): Change member names
6740 to be the same as the stack names.
6741 (yyparse): yyptr is now union yyalloc *, not char *.
6742 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
6743 and may generate better code on some machines.
6744 (yystpcpy): Use prototype if __STDC__ is defined, not just
6745 if __cplusplus is defined.
6746
6747 2001-11-30 Akim Demaille <akim@epita.fr>
6748
6749 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
6750 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
6751 Gettext doesn't compile cleanly, and dies with -Werror.
6752 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
6753 Include WARNING_CFLAGS here.
6754 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
6755 before being defined.
6756
6757 2001-11-27 Paul Eggert <eggert@twinsun.com>
6758
6759 * lib/quotearg.h (quotearg_n, quotearg_n_style):
6760 First arg is int, not unsigned.
6761 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
6762 (SIZE_MAX, UINT_MAX): New macros.
6763 (quotearg_n_options): Abort if N is negative.
6764 Avoid overflow check on hosts where size_t is 64 bits and int
6765 is 32 bits, as overflow is impossible there.
6766 Fix off-by-one typo that caused unnecessary reallocation.
6767
6768 2001-11-29 Paul Eggert <eggert@twinsun.com>
6769
6770 Name space cleanup in generated parser.
6771
6772 * doc/bison.texinfo (Bison Parser): Discuss system headers
6773 and their effect on the user name space.
6774
6775 * src/bison.simple:
6776 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
6777 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
6778 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
6779
6780 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
6781 on user names when possible.
6782
6783 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
6784 Simplify test for whather <alloca.h> exists.
6785
6786 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
6787
6788 (<stdio.h>): Include if YYDEBUG.
6789
6790 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
6791 ! defined (yyoverflow) && ! defined (yymemcpy).
6792
6793 (yymemcpy, yyparse): Rename local variables as needed so that
6794 they all begin with 'yy'.
6795
6796 (yystrlen, yystpcpy): New functions.
6797
6798 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
6799 All uses changed.
6800
6801 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
6802 instead of relying on string.h functions. Use YYSTACK_ALLOC
6803 and YYSTACK_FREE instead of malloc and free.
6804
6805 2001-11-30 Akim Demaille <akim@epita.fr>
6806
6807 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
6808 before their first uses.
6809 (YYBISON, YYPURE): Move to the top of the output.
6810
6811 2001-11-30 Akim Demaille <akim@epita.fr>
6812
6813 * tests/reduce.at (Useless Nonterminals): Fix.
6814
6815 2001-11-30 Akim Demaille <akim@epita.fr>
6816
6817 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
6818 if body instead of `;' to pacify GCC's warnings.
6819
6820 2001-11-30 Akim Demaille <akim@epita.fr>
6821
6822 Instead of mapping the LHS of unused rules to -1, keep the LHS
6823 valid, but flag the rules as invalid.
6824
6825 * src/gram.h (rule_t): `useful' is a new member.
6826 * src/print.c (print_grammar): Adjust.
6827 * src/derives.c (set_derives): Likewise.
6828 * src/reader.c (packgram, reduce_output): Likewise.
6829 * src/reduce.c (reduce_grammar_tables): Likewise.
6830 * tests/reduce.at (Underivable Rules, Useless Rules): New.
6831
6832 2001-11-30 Akim Demaille <akim@epita.fr>
6833
6834 * src/reduce.c (reduce_output): Formatting changes.
6835 * src/print.c (print_results, print_grammar): Likewise.
6836 * tests/regression.at (Rule Line Numbers)
6837 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
6838
6839 2001-11-30 Akim Demaille <akim@epita.fr>
6840
6841 * src/reduce.c (nonterminals_reduce): Instead of throwing away
6842 useless nonterminals, move them at the end of the symbol arrays.
6843 (reduce_output): Adjust.
6844 * tests/reduce.at (Useless Nonterminals): Adjust.
6845
6846 2001-11-30 Akim Demaille <akim@epita.fr>
6847
6848 * src/reduce.c: Various comment/formatting changes.
6849 (nonterminals_reduce): New, extracted from...
6850 (reduce_grammar_tables): here.
6851 (reduce_grammar): Call nonterminals_reduce.
6852
6853 2001-11-29 Paul Eggert <eggert@twinsun.com>
6854
6855 * src/bison.simple (YYSTACK_REALLOC): Remove.
6856 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
6857 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
6858 New macros.
6859 (union yyalloc): New type.
6860 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
6861 an arbitrary restriction on hosts where size_t is wider than int.
6862
6863 (yyparse): Don't dump core if alloca or malloc fails; instead, report
6864 a parser stack overflow. Allocate just one block of memory for all
6865 three stacks, instead of allocating three blocks; this typically is
6866 faster and reduces fragmentation.
6867
6868 Do not limit the number of items in the stack to a value that fits
6869 in 'int', as this is an arbitrary limit on hosts with 64-bit
6870 size_t and 32-bit int.
6871
6872 2001-11-29 Marc Autret <autret_m@epita.fr>
6873
6874 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
6875 of defining YYERROR_VERBOSE.
6876 [AT_DATA]: $4 is now out of C declarations in the prologue.
6877
6878 2001-11-28 Marc Autret <autret_m@epita.fr>
6879
6880 * src/reader.c (parse_dquoted_param): New.
6881 (parse_skel_decl): Use it.
6882 * src/lex.h: Add its prototype.
6883 * src/lex.c (literalchar): Become not static.
6884
6885 2001-11-28 Marc Autret <autret_m@epita.fr>
6886
6887 * src/output.h: And put its extern declaration here.
6888 * src/output.c (error_verbose): Define here.
6889 (prepare): Echo name modification.
6890 * src/getargs.h: Clean its extern declaration.
6891 * src/getargs.c (error_verbose_flag): Remove.
6892 (getargs): Remove case 'e'.
6893 * src/options.c (option_table): 'error-verbose' is now seen as simple
6894 percent option.
6895 Include output.h.
6896
6897 * src/reader.c (read_declarations): Remove case tok_include.
6898 (parse_include_decl): Remove.
6899 * src/lex.h (token_t): Remove tok_include.
6900 * src/options.c (option_table): 'include' is now a simple command line
6901 option.
6902
6903 2001-11-28 Marc Autret <autret_m@epita.fr>
6904
6905 * src/bison.simple: Adjust muscle names.
6906 * src/muscle_tab.c (muscle_init): Also rename the muscles.
6907 * src/output.c (prepare): s/_/-/ for the muscles names.
6908 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
6909
6910 2001-11-28 Marc Autret <autret_m@epita.fr>
6911
6912 * src/bison.simple: Fix debug.
6913 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
6914
6915 2001-11-28 Akim Demaille <akim@epita.fr>
6916
6917 * src/LR0.c (shifts_new): New.
6918 (save_shifts, insert_start_shift, augment_automaton): Use it.
6919
6920 2001-11-28 Akim Demaille <akim@epita.fr>
6921
6922 * src/closure.c (closure): `b' and `ruleno' denote the same value:
6923 keep ruleno only.
6924
6925 2001-11-28 Akim Demaille <akim@epita.fr>
6926
6927 * src/closure.c (closure): Instead of looping over word in array
6928 then bits in words, loop over bits in array.
6929
6930 2001-11-28 Akim Demaille <akim@epita.fr>
6931
6932 * src/closure.c (closure): No longer optimize the special case
6933 where all the bits of `ruleset[r]' are set to 0, to make the code
6934 clearer.
6935
6936 2001-11-28 Akim Demaille <akim@epita.fr>
6937
6938 * src/closure.c (closure): `r' and `c' are new variables, used to
6939 de-obfuscate accesses to RULESET and CORE.
6940
6941 2001-11-28 Akim Demaille <akim@epita.fr>
6942
6943 * src/reduce.c (reduce_print): Use ngettext.
6944 (dump_grammar): Improve the trace accuracy.
6945
6946 2001-11-28 Akim Demaille <akim@epita.fr>
6947
6948 * src/reduce.c (dump_grammar): Don't translate trace messages.
6949
6950 2001-11-28 Akim Demaille <akim@epita.fr>
6951
6952 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
6953 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
6954 as all tags are free'ed afterwards.
6955 From Enrico Scholz.
6956
6957 2001-11-27 Paul Eggert <eggert@twinsun.com>
6958
6959 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
6960 use alloca when we didn't want to, and vice versa.
6961
6962 2001-11-27 Marc Autret <autret_m@epita.fr>
6963
6964 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
6965 initialization.
6966 * src/output.c (prepare): Remove its update.
6967
6968 2001-11-27 Marc Autret <autret_m@epita.fr>
6969
6970 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
6971 Use %error-verbose.
6972
6973 2001-11-27 Marc Autret <autret_m@epita.fr>
6974
6975 * src/bison.simple: Remove YYERROR_VERBOSE using.
6976 Use %%error_verbose.
6977 (yyparse): Likewise.
6978 * src/output.c (prepare): Give its final value.
6979 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
6980 * src/getargs.h: Add its extern declaration.
6981 * src/getargs.c (error_verbose_flag): New int.
6982 (getargs): Update to catch new case.
6983 * src/options.c (option_table): 'error-verbose' is a new option.
6984 (shortopts): Update.
6985
6986 2001-11-27 Akim Demaille <akim@epita.fr>
6987
6988 * src/system.h: Use intl/libgettext.h.
6989 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
6990
6991 2001-11-27 Akim Demaille <akim@epita.fr>
6992
6993 * tests/torture.at (Exploding the Stack Size with Malloc):
6994 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
6995
6996 2001-11-27 Akim Demaille <akim@epita.fr>
6997
6998 * src/files.c: Include error.h.
6999 Reported by Hans Aberg.
7000
7001 2001-11-26 Marc Autret <autret_m@epita.fr>
7002
7003 * src/reader.c (parse_include_decl): New, not yet implemented.
7004 (read_declarations): Add case tok_include.
7005 * src/getargs.h (include): Add its extern definition.
7006 * src/getargs.c (include): New const char *.
7007 (getargs): Add case '-I'.
7008 * src/options.c (option_table): Add include as command line and
7009 percent option.
7010 * src/lex.h (token_t): Add tok_include.
7011
7012 2001-11-26 Akim Demaille <akim@epita.fr>
7013
7014 * src/reader.c (readgram): Make sure rules for mid-rule actions
7015 have a lineno equal to that of their host rule.
7016 Reported by Hans Aberg.
7017 * tests/regression.at (Rule Line Numbers): New.
7018
7019 2001-11-26 Akim Demaille <akim@epita.fr>
7020
7021 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
7022 size_ts.
7023
7024 2001-11-26 Akim Demaille <akim@epita.fr>
7025
7026 * src/complain.c, src/complain.h (error): Remove, provided by
7027 lib/error.[ch].
7028
7029 2001-11-26 Akim Demaille <akim@epita.fr>
7030
7031 * src/reader.c (read_declarations): Don't abort on tok_illegal,
7032 issue an error message.
7033 * tests/regression.at (Invalid %directive): New.
7034 Reported by Hans Aberg.
7035
7036 2001-11-26 Akim Demaille <akim@epita.fr>
7037
7038 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
7039 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
7040
7041 2001-11-26 Akim Demaille <akim@epita.fr>
7042
7043 * src/conflicts.c (conflicts_print): Don't complain at all when
7044 there are no reduce/reduce conflicts, and as many shift/reduce
7045 conflicts as expected.
7046 * tests/regression.at (%expect right): Adjust.
7047
7048 2001-11-23 Akim Demaille <akim@epita.fr>
7049
7050 * lib/alloca.c: Update, from fileutils.
7051
7052 2001-11-23 Akim Demaille <akim@epita.fr>
7053
7054 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
7055
7056 2001-11-23 Akim Demaille <akim@epita.fr>
7057
7058 * src/system.h: Include alloca.h.
7059 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
7060
7061 2001-11-23 Akim Demaille <akim@epita.fr>
7062
7063 * src/print_graph.c (print_actions): Remove `rule', unused.
7064 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
7065 pacify GCC's signed < unsigned warnings.
7066 * src/closure.c (itemsetsize): Likewise.
7067 * src/reader.c (symbol_list_new): Static.
7068
7069 2001-11-23 Akim Demaille <akim@epita.fr>
7070
7071 Attaching lineno to buckets is stupid, since only one copy of each
7072 symbol is kept, only the line of the first occurrence is kept too.
7073
7074 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
7075 * src/reader.c (rline_allocated): Remove, unused.
7076 (symbol_list): Have a `line' member.
7077 (symbol_list_new): New.
7078 (readgram): Use it.
7079 * src/print.c (print_grammar): Output the rule line numbers.
7080 * tests/regression.at (Solved SR Conflicts)
7081 (Unresolved SR Conflicts): Adjust.
7082 Reported by Hans Aberg.
7083
7084 2001-11-22 Marc Autret <autret_m@epita.fr>
7085
7086 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
7087
7088 2001-11-22 Marc Autret <autret_m@epita.fr>
7089
7090 * src/muscle_tab.c (muscle_init): Remove initialization of
7091 skeleton muscle.
7092 * src/output.c (output_master_parser): Do it here.
7093
7094 2001-11-20 Akim Demaille <akim@epita.fr>
7095
7096 * po/sv.po: New.
7097 * configure.in (ALL_LINGUAS): Adjust.
7098 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
7099 longer contains strings to translate.
7100
7101 2001-11-19 Akim Demaille <akim@epita.fr>
7102
7103 * src/conflicts.c (conflicts_print): Add a missing \n.
7104
7105 2001-11-19 Akim Demaille <akim@epita.fr>
7106
7107 * src/nullable.c (nullable_print): New.
7108 (set_nullable): Call it when tracing.
7109 Better locality of variables.
7110
7111 2001-11-19 Akim Demaille <akim@epita.fr>
7112
7113 * src/print.c (print_actions): Better locality of variables.
7114
7115 2001-11-19 Akim Demaille <akim@epita.fr>
7116
7117 * src/derives.c (print_derives): Fix and enrich.
7118 * src/closure.c (print_fderives): Likewise.
7119
7120 2001-11-19 Akim Demaille <akim@epita.fr>
7121
7122 * src/closure.c (itemsetend): Remove, replaced with...
7123 (itemsetsize): new.
7124
7125 2001-11-19 Akim Demaille <akim@epita.fr>
7126
7127 * src/LR0.c (kernel_end): Remove, replaced with...
7128 (kernel_size): new.
7129
7130 2001-11-19 Akim Demaille <akim@epita.fr>
7131
7132 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
7133 to clarify.
7134
7135 2001-11-19 Akim Demaille <akim@epita.fr>
7136
7137 * src/closure.c (closure): Use arrays instead of pointers to clarify.
7138
7139 2001-11-19 Akim Demaille <akim@epita.fr>
7140
7141 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
7142 trace messages.
7143 * src/LR0.c: Likewise.
7144 (allocate_itemsets): Use arrays instead of pointers to clarify.
7145
7146 2001-11-19 Akim Demaille <akim@epita.fr>
7147
7148 * src/getargs.c (statistics_flag): Replace with...
7149 (trace_flag): New.
7150 (longopts): Accept --trace instead of --statistics.
7151 * src/getargs.h, src/options.c: Adjust.
7152 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
7153 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
7154
7155 2001-11-19 Akim Demaille <akim@epita.fr>
7156
7157 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
7158 pointers to clarify the code.
7159 (save_reductions, save_shifts): Factor common parts of alternatives.
7160
7161 2001-11-19 Akim Demaille <akim@epita.fr>
7162
7163 * src/LR0.c (new_state, get_state): Complete TRACE code.
7164 * src/closure.c: Include `reader.h' to get `tags', needed by the
7165 trace code.
7166 Rename the conditional DEBUG as TRACE.
7167 Output consistently TRACEs to stderr, not stdout.
7168 * src/derives.c: Likewise.
7169 * src/reduce.c: (inaccessable_symbols): Using if is better style
7170 than goto.
7171 Use `#if TRACE' instead of `#if 0' for tracing code.
7172
7173 2001-11-19 Akim Demaille <akim@epita.fr>
7174
7175 * src/system.h (LIST_FREE, shortcpy): New.
7176 * src/LR0.c: Use them.
7177 * src/output.c (free_itemsets, free_reductions, free_shifts):
7178 Remove, replaced by LIST_FREE.
7179
7180 2001-11-19 Akim Demaille <akim@epita.fr>
7181
7182 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
7183 (REDUCTIONS_ALLOC): New.
7184 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
7185 allocation.
7186
7187 2001-11-19 Akim Demaille <akim@epita.fr>
7188
7189 * src/LR0.c (new_state): Complete trace code.
7190 * src/nullable.c (set_nullable): Don't translate traces.
7191
7192 2001-11-19 Akim Demaille <akim@epita.fr>
7193
7194 * src/print_graph.c (print_core): Better locality of variables.
7195 * src/print.c (print_core): Likewise.
7196
7197 2001-11-19 Akim Demaille <akim@epita.fr>
7198
7199 * src/vcg.c: You do the output, so you are responsible of the
7200 handling of VCG syntax, in particular: use quotearg.
7201 * src/print_graph.c: Don't.
7202 (print_actions): Don't output the actions as part of the nodes,
7203 since that's the job of the edges.
7204 (print_state): Don't output by hand: fill the node description,
7205 and ask for its output.
7206
7207 2001-11-19 Akim Demaille <akim@epita.fr>
7208
7209 * src/bison.simple (yyparse): When verbosely reporting an error,
7210 no longer put additional quotes around token names.
7211 * tests/calc.at: Adjust.
7212
7213 2001-11-19 Akim Demaille <akim@epita.fr>
7214
7215 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
7216 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
7217 * src/output.c: Adjust.
7218
7219 2001-11-19 Akim Demaille <akim@epita.fr>
7220
7221 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
7222 (rule_t): this.
7223 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
7224
7225 2001-11-19 Akim Demaille <akim@epita.fr>
7226
7227 * src/gram.h (rule_t): New.
7228 (rule_table): New.
7229 (rrhs, rlhs): Remove, part of state_t.
7230 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
7231 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
7232 * src/reader.c, src/reduce.c: Adjust.
7233
7234 2001-11-19 Akim Demaille <akim@epita.fr>
7235
7236 * src/reader.c (symbols_output): New, extracted from...
7237 (packsymbols): Here.
7238 (reader): Call it.
7239
7240 2001-11-19 Akim Demaille <akim@epita.fr>
7241
7242 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
7243 (maxrhs): this new function.
7244
7245 2001-11-19 Akim Demaille <akim@epita.fr>
7246
7247 * src/lalr.c (F): New macro to access the variable F.
7248 Adjust.
7249
7250 2001-11-19 Akim Demaille <akim@epita.fr>
7251
7252 * src/lalr.h (LA): New macro to access the variable LA.
7253 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
7254 * src/lalr.c: Adjust.
7255
7256 2001-11-19 Akim Demaille <akim@epita.fr>
7257
7258 * src/lalr.c (initialize_LA): Only initialize LA. Let...
7259 (set_state_table): handle the `lookaheads' members.
7260
7261 2001-11-19 Akim Demaille <akim@epita.fr>
7262
7263 * src/lalr.h (lookaheads): Removed array, whose contents is now
7264 a member of...
7265 (state_t): this structure.
7266 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
7267 Adjust.
7268
7269 2001-11-19 Akim Demaille <akim@epita.fr>
7270
7271 * src/lalr.h (consistent): Removed array, whose contents is now
7272 a member of...
7273 (state_t): this structure.
7274 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
7275 Adjust.
7276
7277 2001-11-19 Akim Demaille <akim@epita.fr>
7278
7279 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
7280 contents are now members of...
7281 (state_t): this structure.
7282 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
7283 Adjust.
7284
7285 2001-11-19 Akim Demaille <akim@epita.fr>
7286
7287 * src/lalr.h (state_t): New.
7288 (state_table): Be a state_t * instead of a core **.
7289 (accessing_symbol): Remove, part of state_t.
7290 * src/lalr.c: Adjust.
7291 (set_accessing_symbol): Merge into...
7292 (set_state_table): this.
7293 * src/print_graph.c, src/conflicts.c: Adjust.
7294
7295 2001-11-14 Akim Demaille <akim@epita.fr>
7296
7297 * tests/calc.at, tests/output.at, tests/regression.at,
7298 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
7299 now the tests are run in private dirs, therefore AC_CLEANUP and
7300 family can be simplified to 0-ary.
7301 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
7302 use abs. path to find config.h.
7303 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
7304 stderr, there can be way too much random noise.
7305 Instead pass -Werror to GCC and rely on the exit status.
7306 Reported by Wolfram Wagner.
7307
7308 2001-11-14 Akim Demaille <akim@epita.fr>
7309
7310 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
7311 defined only if yyoverflow is defined, to avoid `warning: unused
7312 variable `yyvs1''.
7313 Reported by The Test Suite.
7314
7315 2001-11-14 Akim Demaille <akim@epita.fr>
7316
7317 * src/print.c: Include reduce.h.
7318 Reported by Hans Aberg.
7319
7320 2001-11-14 Akim Demaille <akim@epita.fr>
7321
7322 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
7323 Revert a previous patch: these are really const.
7324 * src/conflicts.c (conflict_report): Additional useless pair of
7325 braces to pacify GCC's warnings for `if () if () {} else {}'.
7326 * src/lex.c (parse_percent_token): Replace equal_offset with
7327 arg_offset.
7328 arg is const.
7329 Be sure to strdup `arg' when used, since there is no reason for
7330 token_buffer not to change.
7331
7332 2001-11-14 Akim Demaille <akim@epita.fr>
7333
7334 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
7335 definition.
7336 * src/main.c (main): Use them.
7337 Suggested by Hans Aberg.
7338
7339 2001-11-12 Akim Demaille <akim@epita.fr>
7340
7341 * src/system.h (ngettext): Now that we use ngettext, be sure to
7342 provide a default definition when NLS are not used.
7343
7344 2001-11-12 Akim Demaille <akim@epita.fr>
7345
7346 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
7347 Use @kbd to denote user input.
7348 (Language and Grammar): ANSIfy the example.
7349 Adjust its layout for info/notinfo.
7350 (Location Tracking Calc): Output error messages to stderr.
7351 Output locations in a more GNUtically correct way.
7352 Fix a couple of Englishos.
7353 Adjust @group/@end group pairs.
7354
7355 2001-11-12 Akim Demaille <akim@epita.fr>
7356
7357 %expect was not functioning at all.
7358
7359 * src/conflicts.c (expected_conflicts): Set to -1.
7360 (conflict_report): Use ngettext.
7361 (conflicts_print): Check %expect and make its violation an error.
7362 * doc/bison.texinfo (Expect Decl): Adjust.
7363 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
7364 * tests/regression.at (%expect not enough, %expect right)
7365 (%expect too much): New.
7366
7367 2001-11-12 Akim Demaille <akim@epita.fr>
7368
7369 * tests/regression.at (Conflicts): Rename as...
7370 (Unresolved SR Conflicts): this.
7371 (Solved SR Conflicts): New.
7372
7373 2001-11-12 Akim Demaille <akim@epita.fr>
7374
7375 * src/reduce.c (print_results): Rename as...
7376 (reduce_output): This.
7377 Output to OUT, passed as argument, instead of output_obstack.
7378 (dump_grammar): Likewise.
7379 (reduce_free): New.
7380 Also free V1.
7381 (reduce_grammar): No longer call reduce_output, since...
7382 * src/print.c (print_results): do it.
7383 * src/main.c (main): Call reduce_free;
7384
7385 2001-11-12 Akim Demaille <akim@epita.fr>
7386
7387 * src/conflicts.c (print_reductions): Accept OUT as argument.
7388 Output to it, not to output_obstack.
7389 * src/print.c (print_actions): Adjust.
7390
7391 2001-11-12 Akim Demaille <akim@epita.fr>
7392
7393 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
7394 the result instead of using...
7395 (src_total, rrc_total, src_count, rrc_count): Remove.
7396 (any_conflicts): Remove.
7397 (print_conflicts): Split into...
7398 (conflicts_print, conflicts_output): New.
7399 * src/conflicts.h: Adjust.
7400 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
7401 * src/print.c (print_grammar): Issue `\n' between two rules.
7402 * tests/regression.at (Conflicts): New.
7403 Reported by Tom Lane.
7404
7405 2001-11-12 Akim Demaille <akim@epita.fr>
7406
7407 * tests/regression.at (Invalid input): Remove, duplicate with
7408 ``Invalid input: 1''.
7409
7410 2001-11-12 Akim Demaille <akim@epita.fr>
7411
7412 * tests/torture.at (AT_DATA_STACK_TORTURE)
7413 (Exploding the Stack Size with Alloca)
7414 (Exploding the Stack Size with Malloc): New.
7415
7416 2001-11-12 Akim Demaille <akim@epita.fr>
7417
7418 * src/bison.simple (YYSTACK_REALLOC): New.
7419 (yyparse) [!yyoverflow]: Use it and free the old stack.
7420 Reported by Per Allansson.
7421
7422 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
7423
7424 * src/bison.simple: Define type yystype instead of YYSTYPE, and
7425 define CPP macro, which substitute YYSTYPE by yystype.
7426 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
7427 with yyltype/YYLTYPE. This allows inclusion of the generated
7428 header within the parser if the compiler, such as GGC, accepts
7429 multiple equivalent #defines.
7430 From Akim.
7431
7432 2001-11-05 Akim Demaille <akim@epita.fr>
7433
7434 * src/reader.c (symbols_output): New, extracted from...
7435 (packsymbols): here.
7436 (reader): Adjust.
7437
7438 2001-11-05 Akim Demaille <akim@epita.fr>
7439
7440 * src/lex.c (parse_percent_token): s/quotearg/quote/.
7441
7442 2001-11-05 Akim Demaille <akim@epita.fr>
7443
7444 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
7445 pattern.
7446
7447 2001-11-05 Akim Demaille <akim@epita.fr>
7448
7449 * src/options.h (struct option_table_struct): set_flags is void*.
7450 * src/options.c (longopts): Support `--output' and `%output'.
7451 (usage): Adjust.
7452 * src/lex.h (tok_setopt): Remove, replaced with...
7453 (tok_intopt, tok_stropt): these new guys.
7454 * src/lex.c (getopt.h): Not needed.
7455 (token_buffer, unlexed_token_buffer): Not const.
7456 (percent_table): Promote `-' over `_' in directive names.
7457 Active `%name-prefix', `file-prefix', and `output'.
7458 (parse_percent_token): Accept possible arguments to directives.
7459 Promote `-' over `_' in directive names.
7460
7461 2001-11-04 Akim Demaille <akim@epita.fr>
7462
7463 * doc/bison.texinfo (Decl Summary): Split the list into
7464 `directives for grammars' and `directives for bison'.
7465 Sort'em.
7466 Add description of `%name-prefix', `file-prefix', and `output'.
7467 Promote `-' over `_' in directive names.
7468 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
7469 Simplify the description of `--name-prefix'.
7470 Promote `-' over `_' in directive names.
7471 Promote `--output' over `--output-file'.
7472 Fix the description of `--defines'.
7473 * tests/output.at: Exercise %file-prefix and %output.
7474
7475 2001-11-02 Akim Demaille <akim@epita.fr>
7476
7477 * doc/refcard.tex: Update.
7478
7479 2001-11-02 Akim Demaille <akim@epita.fr>
7480
7481 * src/symtab.h (SUNDEF): New.
7482 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
7483 stand for `uninitialized', instead of 0.
7484 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
7485 * src/lex.c (lex): Adjust.
7486
7487 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
7488 Number it 0.
7489 Let yylex return it instead of a plain 0.
7490 Reported by Dick Streefland.
7491
7492 2001-11-02 Akim Demaille <akim@epita.fr>
7493
7494 * tests/regression.at (Mixing %token styles): New test.
7495
7496 2001-11-02 Akim Demaille <akim@epita.fr>
7497
7498 * src/reader.c (parse_thong_decl): Formatting changes.
7499 (token_translations_init): New, extracted from...
7500 (packsymbols): Here.
7501 Adjust.
7502
7503 2001-11-01 Akim Demaille <akim@epita.fr>
7504
7505 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
7506 Check that `9foo.y' produces correct cpp guards.
7507 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
7508 guards.
7509 Reported by Wwp.
7510
7511 2001-11-01 Akim Demaille <akim@epita.fr>
7512
7513 * tests/regression.at (Invalid input: 2): New.
7514 * src/lex.c (unlexed_token_buffer): New.
7515 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
7516 too.
7517 Reported by Wwp.
7518
7519 2001-11-01 Akim Demaille <akim@epita.fr>
7520
7521 * tests/calc.at: Catch up with 1.30.
7522 * configure.in: Bump to 1.49a.
7523 Adjust to newer Autotest.
7524
7525 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
7526
7527 * src/conflicts.c: Move global variables rrc_total and src_total ...
7528 (print_conflicts): here.
7529 * src/output.c (output): Free global variable user_toknums.
7530 * src/lex.c (token_obstack): Become static.
7531
7532 2001-10-18 Akim Demaille <akim@epita.fr>
7533
7534 * tests/atlocal.in (GCC): Add.
7535 * tests/calc.at: s/m4_match/m4_bmatch/.
7536 s/m4_patsubst/m4_bpatsubst/.
7537 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
7538 * configure.in: AC_SUBST(GCC).
7539
7540 2001-10-14 Marc Autret <autret_m@epita.fr>
7541
7542 * src/options.c (create_long_option_table): Fix.
7543
7544 2001-10-10 Akim Demaille <akim@epita.fr>
7545
7546 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
7547
7548 2001-10-04 Akim Demaille <akim@epita.fr>
7549
7550 * src/reader.c (parse_union_decl): Push the caracters in
7551 union_obstack, not attrs_obstack.
7552
7553 2001-10-04 Akim Demaille <akim@epita.fr>
7554
7555 Merge in the branch 1.29.
7556
7557 * src/reader.c (packsymbols): Use a temporary obstack for
7558 `%%tokendef', since output_stack is already used elsewhere.
7559
7560 2001-10-02 Akim Demaille <akim@epita.fr>
7561
7562 Bump 1.29d.
7563
7564 2001-10-02 Akim Demaille <akim@epita.fr>
7565
7566 Version 1.29c.
7567
7568 2001-10-02 Akim Demaille <akim@epita.fr>
7569
7570 * tests/regression.at (Invalid CPP headers): New.
7571 From Alexander Belopolsky.
7572 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
7573
7574 2001-10-02 Akim Demaille <akim@epita.fr>
7575
7576 * tests/regression.at (Invalid input): New.
7577 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
7578 Reported by Shura.
7579
7580 2001-10-02 Akim Demaille <akim@epita.fr>
7581
7582 * tests/calc.at: Now that --debug works, the tests must be adjusted.
7583
7584 2001-10-02 Akim Demaille <akim@epita.fr>
7585
7586 * src/output.c (output_parser): Assert `skeleton'.
7587 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
7588 systems.
7589 From Shura.
7590
7591 2001-10-01 Marc Autret <autret_m@epita.fr>
7592
7593 * src/lex.h: Echo modifications.
7594 * src/lex.c (unlex): Parameter is now token_t.
7595 From Hans Aberg.
7596
7597 2001-10-01 Marc Autret <autret_m@epita.fr>
7598
7599 * src/main.c: Include lex.h.
7600 From Hans Aberg.
7601
7602 2001-09-29 Akim Demaille <akim@epita.fr>
7603
7604 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
7605
7606 2001-09-28 Akim Demaille <akim@epita.fr>
7607
7608 * tests/testsuite.at: Update to newer Autotest.
7609 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
7610
7611 2001-09-27 Akim Demaille <akim@epita.fr>
7612
7613 Position independent wrapper.
7614
7615 * tests/bison: Remove.
7616 * tests/bison.in: New.
7617 * configure.in: Adjust.
7618
7619 2001-09-27 Paul Eggert <eggert@twinsun.com>
7620
7621 Port quotearg fixes from tar 1.13.24.
7622
7623 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
7624 tm to be declared.
7625 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
7626 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
7627
7628 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
7629 * m4/mbrtowc.m4: New file.
7630 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
7631 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
7632
7633 2001-09-27 Akim Demaille <akim@epita.fr>
7634
7635 Bump to 1.29c.
7636
7637 2001-09-27 Akim Demaille <akim@epita.fr>
7638
7639 Version 1.29b.
7640
7641 2001-09-25 Akim Demaille <akim@epita.fr>
7642
7643 * src/system.h: Include `xalloc.h'.
7644 Remove it from the C files.
7645 * src/files.c (output_files): Free the obstacks.
7646 * src/lex.c (init_lex): Rename as...
7647 (lex_init): this.
7648 (lex_free): New.
7649 * src/main.c (main): Use it.
7650
7651 2001-09-24 Marc Autret <autret_m@epita.fr>
7652
7653 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
7654 to output informations in fout (FILE*).
7655 (open_graph, close_graph): Likewise.
7656 (output_graph, output_edge, output_node): Likewise.
7657 * src/vcg.h: Update function prototypes.
7658 * src/print_graph.c (print_graph): Open output graph file.
7659 (print_actions): Adjust.
7660 * src/files.h: Remove extern declaration.
7661 * src/files.c: Remove graph_obstack declaration.
7662 (open_files): Remove graph_obstack initialization.
7663 (output_files): Remove graph_obstack saving.
7664
7665 2001-09-24 Marc Autret <autret_m@epita.fr>
7666
7667 * src/files.c (compute_output_file_names): Fix.
7668
7669 2001-09-24 Marc Autret <autret_m@epita.fr>,
7670 Akim Demaille <akim@epita.fr>
7671
7672 * src/reader.c (reader): Remove call to free_symtab ().
7673 * src/main.c (main): Call it here.
7674 Include symtab.h.
7675 * src/conflicts.c (initialize_conflicts): Rename as...
7676 (solve_conflicts): this.
7677 * src/print.c (print_core, print_actions, print_state)
7678 (print_grammar): Dump to a file instead a `output_obstack'.
7679 (print_results): Dump `output_obstack', and then proceed with the
7680 FILE *.
7681 * src/files.c (compute_output_file_names, close_files): New.
7682 (output_files): Adjust.
7683 * src/main.c (main): Adjust.
7684
7685 2001-09-23 Marc Autret <autret_m@epita.fr>
7686
7687 * src/files.c (compute_header_macro): Computes header macro name
7688 from spec_defines_file when given.
7689
7690 2001-09-23 Marc Autret <autret_m@epita.fr>
7691
7692 * src/files.c (output_files): Add default extensions.
7693
7694 2001-09-22 Akim Demaille <akim@epita.fr>
7695
7696 * src/conflicts.c (finalize_conflicts): Rename as...
7697 (free_conflicts): this.
7698
7699 2001-09-22 Akim Demaille <akim@epita.fr>
7700
7701 * src/gram.c (gram_free): Rename back as...
7702 (dummy): this.
7703 (output_token_translations): Free `token_translations'.
7704 * src/symtab.c (free_symtab): Free the tag field.
7705
7706 2001-09-22 Akim Demaille <akim@epita.fr>
7707
7708 Remove `translations' as it is always set to true.
7709
7710 * src/gram.h: Adjust.
7711 * src/reader.c (packsymbols, parse_token_decl): Adjust
7712 * src/print.c (print_grammar): Adjust.
7713 * src/output.c (output_token_translations): Adjust.
7714 * src/lex.c (lex): Adjust.
7715 * src/gram.c: Be sure the set pointers to NULL.
7716 (dummy): Rename as...
7717 (gram_free): this.
7718
7719 2001-09-22 Akim Demaille <akim@epita.fr>
7720
7721 * configure.in: Invoke AM_LIB_DMALLOC.
7722 * src/system.h: Use dmalloc.
7723 * src/LR0.c: Be sure to have pointers initialized to NULL.
7724 (allocate_itemsets): Allocate kernel_items only if needed.
7725
7726 2001-09-22 Akim Demaille <akim@epita.fr>
7727
7728 * configure.in: Bump to 1.29b.
7729 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
7730 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
7731 need xmalloc.c in calc.y.
7732 From Pascal Bart.
7733
7734 2001-09-21 Akim Demaille <akim@epita.fr>
7735
7736 Version 1.29a.
7737 * Makefile.maint, config/config.guess, config/config.sub,
7738 * config/missing: Update from masters.
7739 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
7740 upon package.m4.
7741 * configure.in (ALL_LINGUAS): Add `tr'.
7742
7743 2001-09-21 Akim Demaille <akim@epita.fr>
7744
7745 * tests/Makefile.am (package.m4): Move to...
7746 ($(srcdir)/$(TESTSUITE)): here.
7747
7748 2001-09-20 Akim Demaille <akim@epita.fr>
7749
7750 * src/complain.c: No longer try to be standalone: use system.h.
7751 Don't assume __STDC__ is defined to 1. Just test if it is defined.
7752 * src/complain.h: Likewise.
7753 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
7754 Remove the unused variable `n'.
7755 From Albert Chin-A-Young.
7756
7757 2001-09-18 Marc Autret <autret_m@epita.fr>
7758
7759 * doc/bison.1: Update.
7760 * doc/bison.texinfo (Bison Options): Update --defines and --graph
7761 descriptions.
7762 (Option Cross Key): Update.
7763 Add --graph.
7764
7765 2001-09-18 Marc Autret <autret_m@epita.fr>
7766
7767 * tests/regression.at: New test (comment in %union).
7768
7769 2001-09-18 Marc Autret <autret_m@epita.fr>
7770
7771 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
7772 do that.
7773 Reported by Keith Browne.
7774
7775 2001-09-18 Marc Autret <autret_m@epita.fr>
7776
7777 * tests/output.at: Add tests for --defines and --graph.
7778
7779 2001-09-18 Marc Autret <autret_m@epita.fr>
7780
7781 * tests/output.at: Removes tests of %{header,src}_extension features.
7782
7783 2001-09-18 Akim Demaille <akim@epita.fr>
7784
7785 * tests/Makefile.am (package.m4): New.
7786 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
7787 (_AT_CHECK_CALC_ERROR): Likewise.
7788 Factor the `, ' part of verbose error messages.
7789
7790 2001-09-18 Marc Autret <autret_m@epita.fr>
7791
7792 * src/getargs.c (longopts): Declare --defines and --graph as options
7793 with optional arguments.
7794 * src/files.h: Add extern declarations.
7795 * src/files.c (spec_graph_file, spec_defines_file): New.
7796 (output_files): Update.
7797 Remove CPP-outed code.
7798
7799 2001-09-18 Marc Autret <autret_m@epita.fr>
7800
7801 Turn off %{source,header}_extension feature.
7802
7803 * src/files.c (compute_exts_from_gf): Update.
7804 (compute_exts_from_src): Update.
7805 (output_files): CPP-out useless code.
7806 * src/files.h: Remove {header,source}_extension extern declarations.
7807 * src/reader.c (parse_dquoted_param): CPP-out.
7808 (parse_header_extension_decl): Remove.
7809 (parse_source_extension_decl): Remove.
7810 (read_declarations): Remove cases tok_{hdrext,srcext}.
7811 * src/lex.c (percent_table): Remove {header,source}_extension entries.
7812 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
7813
7814 2001-09-10 Akim Demaille <akim@epita.fr>
7815
7816 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
7817 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
7818 (AT_CHECK_OUTPUT): this.
7819 Merely check ls' exit status, its output is useless.
7820
7821 2001-09-10 Akim Demaille <akim@epita.fr>
7822
7823 * tests/calc.at: Use m4_match.
7824 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
7825
7826 2001-09-10 Marc Autret <autret_m@epita.fr>,
7827 Akim Demaille <akim@epita.fr>
7828
7829 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
7830 enum color_e.
7831 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
7832 to `normal'.
7833 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
7834 * src/lex.h: Adjust prototype.
7835 (token_t): Add `tok_undef'.
7836 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
7837 (parse_percent_token): Now returns token_t.
7838 Add default statement in switch.
7839 (lex): Separate `c' as an input variable, from the token_t result
7840 part.
7841 (unlexed): Is a token_t.
7842
7843 2001-09-10 Akim Demaille <akim@epita.fr>
7844
7845 * configure.in: Bump to 1.29a.
7846
7847 2001-09-07 Akim Demaille <akim@epita.fr>
7848
7849 Version 1.29.
7850
7851 2001-08-30 Akim Demaille <akim@epita.fr>
7852
7853 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
7854 * m4/atconfig.m4: Remove.
7855 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
7856 * tests/bison: New.
7857 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
7858 m4_if, m4_patsubst, and m4_regexp.
7859 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
7860 `input' file instead of echo.
7861
7862 2001-08-29 Akim Demaille <akim@epita.fr>
7863
7864 Bump to 1.28e.
7865
7866 2001-08-29 Akim Demaille <akim@epita.fr>
7867
7868 Version 1.28d.
7869
7870 2001-08-29 Paul Eggert <eggert@twinsun.com>
7871
7872 * src/bison.simple (yyparse): Don't take the address of an
7873 item before the start of an array, as that doesn't conform to
7874 the C Standard.
7875
7876 2001-08-29 Robert Anisko <anisko_r@epita.fr>
7877
7878 * doc/bison.texinfo (Location Tracking Calc): New node.
7879
7880 2001-08-29 Paul Eggert <eggert@twinsun.com>
7881
7882 * src/output.c (output): Do not define const, as this now
7883 causes more problems than it cures.
7884
7885 2001-08-29 Akim Demaille <akim@epita.fr>
7886
7887 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
7888 the nodes.
7889 Be sure to tag the `detailmenu'.
7890
7891 2001-08-29 Akim Demaille <akim@epita.fr>
7892
7893 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
7894 download in a tmp dir.
7895
7896 2001-08-28 Marc Autret <autret_m@epita.fr>
7897
7898 * config/depcomp: New file.
7899
7900 2001-08-28 Marc Autret <autret_m@epita.fr>
7901
7902 * doc/bison.1 (mandoc): Adjust.
7903 From Juan Manuel Guerrero.
7904
7905 2001-08-28 Marc Autret <autret_m@epita.fr>
7906
7907 * src/print_graph.c (print_state): Fix.
7908
7909 2001-08-27 Marc Autret <autret_m@epita.fr>
7910
7911 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
7912 char * members.
7913 Echo modifications to the functions prototypes.
7914 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
7915
7916 2001-08-27 Marc Autret <autret_m@epita.fr>
7917
7918 * src/vcg.c: Include `xalloc.h'.
7919 (add_colorentry): New.
7920 (add_classname): New.
7921 (add_infoname): New.
7922 * src/vcg.h: Add new prototypes.
7923
7924 2001-08-27 Akim Demaille <akim@epita.fr>
7925
7926 * Makefile.maint: Sync. again with CVS Autoconf.
7927
7928 2001-08-27 Akim Demaille <akim@epita.fr>
7929
7930 * Makefile.maint: Formatting changes.
7931 (po-update, cvs-update, update): New targets.
7932 (AMTAR): Remove.
7933
7934 2001-08-27 Akim Demaille <akim@epita.fr>
7935
7936 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
7937 * Makefile.maint: Sync. with CVS Autoconf.
7938
7939 2001-08-27 Marc Autret <autret_m@epita.fr>
7940
7941 * src/vcg.h (struct infoname_s): New.
7942 (struct colorentry_s): New.
7943 (graph_s): New fields {vertical,horizontal}_order in structure.
7944 Add `infoname' field.
7945 Add `colorentry' field;
7946 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
7947 (G_HORIZONTAL_ORDER): New.
7948 (G_INFONAME): New.
7949 (G_COLORENTRY): New.
7950 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
7951 Add output of `infoname'.
7952 Add output of `colorentry'.
7953
7954 2001-08-27 Marc Autret <autret_m@epita.fr>
7955
7956 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
7957 This one shadowed a global parameter.
7958
7959 2001-08-24 Marc Autret <autret_m@epita.fr>
7960
7961 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
7962 instead of `unsigned'.
7963 (print_state): Do not call obstack_object_size () in obstack_grow ()
7964 to avoid macro variables shadowing.
7965
7966 2001-08-23 Marc Autret <autret_m@epita.fr>
7967
7968 * src/lex.c (percent_table): Typo: s/naem/name/.
7969 Add graph option.
7970 Normalize new options declarations.
7971
7972 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
7973
7974 * tests/suite.at: Exercise %header_extension and %source_extension.
7975
7976 2001-08-16 Marc Autret <autret_m@epita.fr>
7977
7978 * src/reader.c (parse_dquoted_param): New.
7979 (parse_header_extension_decl): Use it.
7980 (parse_source_extension_decl): Likewise.
7981
7982 2001-08-16 Marc Autret <autret_m@epita.fr>
7983
7984 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
7985 (get_xxxx_str): Use assert () instead of complain ().
7986 Remove return invokations in default cases.
7987 (get_decision_str): Modify default behaviour. Remove second argument.
7988 Echo modifications on calls.
7989 (output_graph): Fix.
7990
7991 2001-08-16 Marc Autret <autret_m@epita.fr>
7992
7993 * src/getargs.c (usage): Update with ``-g, --graph''.
7994
7995 2001-08-16 Marc Autret <autret_m@epita.fr>
7996
7997 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
7998 (Option Cross Key): Likewise.
7999 * doc/bison.1: Update.
8000
8001 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
8002
8003 * src/output.c (output_master_parser): Don't finish action_obstack.
8004 (output_parser): Don't care about the muscle action, here.
8005 (prepare): Copy the action_obstack in the action muscle.
8006 (output): Free action_obstack.
8007
8008 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
8009
8010 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
8011 will contain `%union' declaration.
8012 (parse_union_decl): Delete #line directive output.
8013 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
8014 informations about %union.
8015 (parse_union_decl): Copy the union_obstack in the muscle stype.
8016 * src/bison.simple: Add new #line directive.
8017 Add typdef %%stype YYSTYPE.
8018
8019 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
8020
8021 * src/bison.simple: Add new `#line' directive.
8022
8023 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
8024
8025 * src/bison.simple: New `#line' directive.
8026 * src/output.c (output_parser): Support new dynamic muscle input_line.
8027
8028 2001-09-22 Marc Autret <autret_m@epita.fr>
8029
8030 * src/output.c (output_master_parser): New.
8031 (output_parser): Be more re-entrant.
8032
8033 2001-09-21 Marc Autret <autret_m@epita.fr>
8034
8035 * src/reader.c (copy_definition, parse_union_decl): Update and use
8036 `linef' muscle.
8037 (copy_action): Likewise.
8038 Use obstack_1grow ().
8039 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
8040
8041 2001-09-21 Marc Autret <autret_m@epita.fr>
8042
8043 * src/options.c (option_table): Adjust.
8044 * src/lex.c (parse_percent_token): Fix.
8045
8046 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
8047
8048 * src/options.c (symtab.h): Include it, need by lex.h.
8049
8050 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
8051
8052 * src/lex.c (parse_percent_token): Change type of variable `tx', which
8053 is now an option_table_struct*.
8054 (option_strcmp): New function option_strcmp.
8055 (parse_percent_token): Call option_strcmp.
8056 * src/getargs.c (xalloc.h, options.h): Include it.
8057 (getargs): Call create_long_option_table.
8058 (getargs): Free longopts at the end of the function.
8059 (shortopts): Move in options.c.
8060 * src/options.c (create_long_option_table): New function. Convert
8061 information from option_table to option structure.
8062 * src/reader.c (options.h): Include it.
8063
8064 * src/Makefile.am: Adjust.
8065 * src/options.c (option_table): Create from longopts and percent_table.
8066 * src/getargs.c (longopts): Delete.
8067 * src/lex.c (struct percent_table_struct): Delete.
8068 (percent_table): Delete.
8069 (options.h): Include it.
8070 * src/options.c: Create.
8071 * src/options.h: Create.
8072 Declare enum opt_access_e.
8073 Define struct option_table_struct.
8074
8075 2001-09-20 Marc Autret <autret_m@epita.fr>
8076
8077 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
8078 sections of Bison.
8079
8080 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
8081
8082 * src/bison.simple: s/%%filename/%%skeleton.
8083 * src/muscle_tab.c (getargs.h): Include it.
8084 (muscle_init): Insert new muscle skeleton.
8085
8086 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
8087
8088 * src/output.c (output_parser): Delete unused variable actions_dumped.
8089
8090 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
8091
8092 * src/output.c (output): Delete call to reader_output_yylsp.
8093 * src/reader.c (reader): Likewise.
8094 * src/reader.h: Delete declaration of reader_output_yylsp.
8095
8096 2001-09-02 Marc Autret <autret_m@epita.fr>
8097
8098 * src/reader.c: Include muscle_tab.h.
8099 (parse_union_decl): Update.
8100 (parse_macro_decl): Rename parse_muscle_decl.
8101 Update to use renamed functions and variable.
8102 (read_declarations, copy_action, read_additionnal_code, : Updated
8103 with correct variables and functions names.
8104 (packsymbols, reader): Likewise.
8105
8106 * src/reader.h (muscle_obstack): Extern declaration update.
8107
8108 * src/output.c: Include muscle_tab.h
8109 In all functions using macro_insert, change by using muscle_insert ().
8110 (macro_obstack): Rename muscle_obstack.
8111 Echo modifications in the whole file.
8112 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
8113 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
8114 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
8115
8116 * src/muscle_tab.h: Update double inclusion macros.
8117 (macro_entry_s): Rename muscle_entry_s.
8118 Update prototypes.
8119
8120 * src/muscle_tab.c: Include muscle_tab.h.
8121 Rename macro_tabble to muscle_table.
8122 (mhash1, mhash2, mcmp): Use muscle_entry.
8123 (macro_init): Rename muscle_init. Update.
8124 (macro_insert): Rename muscle_insert. Update.
8125 (macro_find): Rename muscle_find. Update.
8126
8127 * src/main.c: Include muscle_tab.h.
8128 (main): Call muscle_init ().
8129 * src/Makefile.am (bison_SOURCES): Echo modifications.
8130
8131 2001-09-02 Marc Autret <autret_m@epita.fr>
8132
8133 Now the files macro_tab.[ch] are named muscle_tab.[ch].
8134
8135 * src/muscle_tab.c, src/muscle_tab.h: Add files.
8136
8137 2001-09-02 Marc Autret <autret_m@epita.fr>
8138
8139 * src/macrotab.c, src/macrotab.h: Remove.
8140
8141 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
8142
8143 * src/reader.c (copy_guard): Use muscle to specify the `#line'
8144 filename.
8145
8146 2001-09-01 Marc Autret <autret_m@epita.fr>
8147
8148 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
8149 to an explicit value to activate the feature. We do it here.
8150
8151 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
8152
8153 * src/output.c (prepare): Delete the `filename' muscule insertion.
8154 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
8155 (parse_union_decl): Likewise.
8156 * src/macrotab.c (macro_init): Initialize filename by infile.
8157
8158 2001-08-31 Marc Autret <autret_m@epita.fr>
8159
8160 * src/bison.simple (YYLSP_NEEDED): New definition.
8161 * src/output.c (prepare): Add macro insertion of `locations_flag'
8162
8163 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
8164
8165 * src/output.c (prepare): Delete insertion of previous muscles,
8166 and insert the `prefix' muscles.
8167 * src/macrotab.c (macro_init): Likewise.
8168 (macro_init): Initialization prefix directive by `yy'.
8169 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
8170 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
8171 yylval, yydebug, yyerror, yynerrs and yyparse.
8172 New directive `#define' to substitute yydebug, ... with option
8173 name_prefix.
8174
8175 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
8176
8177 * src/main.c (main): Standardize.
8178 * src/output.c (output_table_data, output_parser): Likewise.
8179 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
8180
8181 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
8182
8183 * src/reader.c (read_additionnal_code): Rename %%user_code to
8184 %%epilogue.
8185 * src/output.c (output): Rename %%declarations to %%prologue.
8186 * src/bison.simple: Echo modifications.
8187
8188 2001-08-31 Marc Autret <autret_m@epita.fr>
8189
8190 * src/reader.c (readgram): CleanUp.
8191 (output_token_defines): Likewise.
8192 (packsymbols): Likewise.
8193 (reader): Likewise.
8194 * src/output.c (output): CPP-out useless code.
8195
8196 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
8197
8198 * src/reader.c (reader): Delete obsolete call to function
8199 output_trailers and output_headers.
8200 * src/output.h: Remove obsolete functions prototypes of output_headers
8201 and output_trailers.
8202
8203 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
8204
8205 * src/main.c: Include macrotab.h.
8206 * src/macrotab.h (macro_entry_s): Constify fields.
8207 Adjust functions prototypes.
8208 * src/macrotab.c (macro_insert): Constify key and value.
8209 (macro_find): Constify key.
8210 (macro_insert): Include 'xalloc.h'
8211 (macro_insert): Use XMALLOC.
8212 (macro_find): Constify return value.
8213 * src/output.c (output_table_data): Rename table to table_data.
8214 (output_parser): Constify macro_key, macro_value.
8215
8216 2001-08-30 Marc Autret <autret_m@epita.fr>
8217
8218 * src/reader.c (parse_skel_decl): New.
8219 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
8220 * src/lex.h (token_t): New token `tok_skel'.
8221 * src/lex.c (percent_table): Add skeleton option entry.
8222 Standardize.
8223
8224 2001-08-29 Marc Autret <autret_m@epita.fr>
8225
8226 * src/bison.simple: Add %%user_code directive at the end.
8227 * src/reader.c (read_additionnal_code): New.
8228 (reader): Use it.
8229 * src/output.c (output_program): Remove.
8230 (output): Update.
8231
8232 2001-08-28 Marc Autret <autret_m@epita.fr>
8233
8234 * src/output.c (output_actions): Clean up.
8235 (output_gram): CPP-out useless code.
8236 * src/reader.c (reader): Clean up, CPP-out useless code.
8237
8238 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
8239
8240 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
8241 directive.
8242 * src/bison.simple: Add `%%definitions'.
8243
8244 2001-08-28 Marc Autret <autret_m@epita.fr>
8245
8246 * config/depcomp: New file.
8247
8248 2001-08-27 Paul Eggert <eggert@twinsun.com>
8249
8250 * src/bison.simple (yyparse): Don't take the address of an
8251 item before the start of an array, as that doesn't conform to
8252 the C Standard.
8253
8254 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
8255
8256 * src/output.c (output): Remove the initialization of the macro
8257 obstack. It was done too late here.
8258
8259 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
8260 completely wrong.
8261 (reader): Initialize the macro obstack here, since we need it to grow
8262 '%define' directives.
8263
8264 * src/reader.h: Declare the macro obstack as extern.
8265
8266 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
8267
8268 * src/output.c (output_parser): Fix. Store single '%' characters in
8269 the output obstack instead of throwing them away.
8270
8271 2001-08-27 Akim Demaille <akim@epita.fr>
8272
8273 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
8274
8275 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8276
8277 * lib/Makefile.am: Adjust.
8278
8279 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8280
8281 * src/bison.simple: Update and add '%%' directives.
8282
8283 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8284
8285 * src/reader.c (reader): Remove calls to 'output_headers' and
8286 'output_trailers'. Remove some C output.
8287 (readgram): Disable a piece of code that was writing a default
8288 definition for 'YYSTYPE'.
8289 (reader_output_yylsp): Remove.
8290 (packsymbols): Output token defintions to a macro.
8291 (copy_definition): Disable C output.
8292
8293 * src/reader.c (parse_macro_decl): New function used to parse macro
8294 declarations.
8295 (copy_string2): Put the body of copy_string into this new function.
8296 Add a parameter to let the caller choose whether he wants to copy the
8297 string delimiters or not.
8298 (copy_string): Be a simple call to copy_string2 with the last argument
8299 bound to true.
8300 (read_declarations): Add case for macro definition.
8301 (copy_identifier): New.
8302 (parse_macro_decl): Read macro identifiers using copy_identifier
8303 rather than lex.
8304
8305 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8306
8307 * src/output.c (prepare): Add prefixed names.
8308 (output_parser): Output semantic actions.
8309 (output_parser): Fix bug on '%%line' directives.
8310
8311 * src/output.c (output_headers): Remove. The C code printed by this
8312 function should now be in the skeletons.
8313 (output_trailers): Remove.
8314 (output): Disable call to 'reader_output_yylsp'.
8315 (output_rule_data): Do not output tables to the table obstack.
8316
8317 * src/output.c: Remove some C dedicated output.
8318 Improve the use of macro and output obstacks.
8319 (output_defines): Remove.
8320
8321 * src/output.c (output_token_translations): Associate 'translate'
8322 table with a macro. No output to the table obstack.
8323 (output_gram): Same for 'rhs' and 'prhs'.
8324 (output_stos): Same for 'stos'.
8325 (output_rule_data): Same for 'r1' and 'r2'.
8326 (token_actions): Same for 'defact'.
8327 (goto_actions): Same for 'defgoto'.
8328 (output_base): Same for 'pact' and 'pgoto'.
8329 (output_table): Same for 'table'.
8330 (output_check): Same for 'check'.
8331
8332 * src/output.c (output_table_data): New function.
8333 (output_short_table): Remove.
8334 (output_short_or_char_table): Remove.
8335
8336 * src/output.c (output_parser): Replace most of the skeleton copy code
8337 with something new. Skeletons are now processed character by character
8338 rather than line by line, and Bison looks for '%%' macros. This is the
8339 first step in making Bison's output process (a lot) more flexible.
8340 (output_parser): Use the macro table.
8341
8342 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8343
8344 * src/main.c (main): Initialize the macro table.
8345
8346 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8347
8348 * src/lex.c (percent_table): Add tok_define.
8349 * src/lex.h: Add tok_define.
8350
8351 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8352
8353 * src/macrotab.c: New file.
8354 * src/macrotab.h: New file.
8355 * src/Makefile.am: Update.
8356
8357 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8358
8359 * lib/hash.c: New file.
8360 * lib/hash.h: New file.
8361 * lib/Makefile.am: Update.
8362
8363 2001-08-15 Akim Demaille <akim@epita.fr>
8364
8365 Version 1.28c.
8366
8367 2001-08-15 Marc Autret <autret_m@epita.fr>
8368
8369 * src/reader.c (readgram): Indent output macro YYSTYPE.
8370 (packsymbols): Likewise.
8371 (output_token_defines): Likewise.
8372 * src/files.c: Standardize.
8373 (compute_header_macro): New.
8374 (defines_obstack_save): New. Use compute_header_macro.
8375 (output_files): Update. Use defines_obstack_save.
8376
8377 2001-08-15 Akim Demaille <akim@epita.fr>
8378
8379 * doc/bison.texinfo (Table of Symbols): Document
8380 YYSTACK_USE_ALLOCA.
8381
8382 2001-08-15 Akim Demaille <akim@epita.fr>
8383
8384 * missing: Update from CVS Automake.
8385 * config/config.guess, config/config.sub, config/texinfo.tex:
8386 Update from gnu.org.
8387
8388 2001-08-15 Akim Demaille <akim@epita.fr>
8389
8390 * Makefile.maint: Sync with CVS Autoconf.
8391
8392 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
8393
8394 * doc/bison.texinfo: Include GNU Free Documentation License from
8395 `fdl.texi'.
8396 * doc/fdl.texi: Add to package.
8397
8398 2001-08-14 Marc Autret <autret_m@epita.fr>
8399
8400 Turn on %{source,header}_extension features.
8401
8402 * src/lex.c (percent_table): Un-CPP out header_extension and
8403 source_extension.
8404 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
8405 (compute_exts_from_src): Remove conditions. It restores priorities
8406 between options.
8407
8408 2001-08-14 Marc Autret <autret_m@epita.fr>
8409
8410 * src/files.c (compute_base_names): Add extensions computing when
8411 `--file-prefix' used.
8412 Standardize function calls.
8413
8414 2001-08-13 Marc Autret <autret_m@epita.fr>
8415
8416 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
8417 defining it (defined but null disables alloca).
8418
8419 2001-08-13 Marc Autret <autret_m@epita.fr>
8420
8421 * src/bison.simple (_yy_memcpy): CPP reformat.
8422
8423 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
8424
8425 * tests/atconfig.in (CPPFLAGS): Fix.
8426
8427 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
8428
8429 * doc/bison.texinfo: Include GNU General Public License from
8430 `gpl.texi'.
8431 * doc/gpl.texi: Add to package.
8432
8433 2001-08-10 Marc Autret <autret_m@epita.fr>
8434
8435 * src/print_graph.h: Fix.
8436 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
8437
8438 2001-08-10 Akim Demaille <akim@epita.fr>
8439
8440 * src/system.h: Provide default declarations for stpcpy, strndup,
8441 and strnlen.
8442
8443 2001-08-10 Robert Anisko <anisko_r@epita.fr>
8444
8445 * doc/bison.texinfo (Locations): Update @$ stuff.
8446
8447 2001-08-09 Robert Anisko <anisko_r@epita.fr>
8448
8449 * src/bison.simple (YYLLOC_DEFAULT): Update.
8450 (yyparse): Adjust.
8451
8452 2001-08-08 Marc Autret <autret_m@epita.fr>
8453
8454 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
8455 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
8456 Reported by Fabrice Bauzac.
8457
8458 2001-08-08 Marc Autret <autret_m@epita.fr>
8459
8460 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
8461 * src/vcg.c (output_node): Fix.
8462 * src/vcg.h: Cleanup.
8463 * src/print_graph.c: Add comments.
8464 (node_output_size): New global variable. Simplify the formatting of
8465 the VCG graph output.
8466 (print_actions): Unused code is now used. It notifies the final state
8467 and no action states in the VCG graph. It also give the reduce actions.
8468 The `shift and goto' edges are red and the `go to state' edges are
8469 blue.
8470 Get the current node name and node_obstack by argument.
8471 (node_obstack): New variable.
8472 (print_state): Manage node_obstack.
8473 (print_core): Use node_obstack given by argument.
8474 A node is not only computed here but in print_actions also.
8475 (print_graph): CPP out useless code instead of commenting it.
8476
8477 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
8478
8479 * tests/atconfig.in (CPPFLAGS): Fix.
8480
8481 2001-08-07 Akim Demaille <akim@epita.fr>
8482
8483 * src/print_graph.c (quote): New.
8484 (print_core): Use it.
8485
8486 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
8487
8488 * src/vcg.c (complain.h): Include it.
8489 Unepitaize `return' invocations.
8490 [NDEBUG] (main): Remove.
8491 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
8492 * src/files.c (open_files): Initialize graph_obstack.
8493 * src/print_graph.c (print_actions): CPP out useless code.
8494 (print_core): Don't output the last `\n' in labels.
8495 Use `quote'.
8496 * src/files.c (output_files): Output the VCG file.
8497 * src/main.c (main): Invoke print_graph ();
8498
8499 2001-08-06 Marc Autret <autret_m@epita.fr>
8500
8501 Automaton VCG graph output.
8502 Using option ``-g'' or long option ``--graph'', you can generate
8503 a gram_filename.vcg file containing a VCG description of the LALR (1)
8504 automaton of your grammar.
8505
8506 * src/main.c: Call to print_graph() function.
8507 * src/getargs.h: Update.
8508 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
8509 (graph_flag): New flag.
8510 (longopts): Update.
8511 (getargs): Add case `g'.
8512 * src/files.c (graph_obstack): New obstack struct.
8513 (open_files): Initialize new obstack.
8514 (output_files): Saves graph_obstack if required.
8515 * src/files.h (graph_obstack): New extern declaration.
8516 * src/Makefile.am: Add new source files.
8517
8518 2001-08-06 Marc Autret <autret_m@epita.fr>
8519
8520 * src/print_graph.c, src/print_graph.h (graph): New.
8521 * src/vcg.h: New file.
8522 * src/vcg.c: New file, VCG graph handling.
8523
8524 2001-08-06 Marc Autret <autret_m@epita.fr>
8525
8526 Add of %source_extension and %header_extension which specify
8527 the source or/and the header output file extension.
8528
8529 * src/files.c (compute_base_names): Remove initialisation of
8530 src_extension and header_extension.
8531 (compute_exts_from_gf): Update.
8532 (compute_exts_from_src): Update.
8533 (output_files): Update.
8534 * src/reader.c (parse_header_extension_decl): New.
8535 (parse_source_extension_decl): New.
8536 (read_declarations): New case statements for the new tokens.
8537 * src/lex.c (percent_table): Add entries for %source_extension
8538 and %header_extension.
8539 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
8540
8541 2001-08-06 Marc Autret <autret_m@epita.fr>
8542
8543 * configure.in: Bump to 1.28c.
8544 * doc/bison.texinfo: Texinfo thingies.
8545
8546 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
8547
8548 * tests/atconfig.in (CPPFLAGS): Add.
8549 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
8550
8551 2001-08-03 Akim Demaille <akim@epita.fr>
8552
8553 Version 1.28b.
8554
8555 2001-08-03 Akim Demaille <akim@epita.fr>
8556
8557 * tests/Makefile.am (check-local): Ship testsuite.
8558 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
8559 Include `string.h'.
8560
8561 2001-08-03 Akim Demaille <akim@epita.fr>
8562
8563 * configure.in: Try using -Wformat when compiling.
8564
8565 2001-08-03 Akim Demaille <akim@epita.fr>
8566
8567 * configure.in: Bump to 1.28b.
8568
8569 2001-08-03 Akim Demaille <akim@epita.fr>
8570
8571 * src/complain.c: Adjust strerror_r portability issues.
8572
8573 2001-08-03 Akim Demaille <akim@epita.fr>
8574
8575 Version 1.28a.
8576
8577 2001-08-03 Akim Demaille <akim@epita.fr>
8578
8579 * src/getargs.c, src/getarg.h (skeleton)): Constify.
8580 * src/lex.c (literalchar): Avoid name clashes on `buf'.
8581 * src/getargs.c: Include complain.h.
8582 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
8583 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
8584
8585 2001-08-03 Akim Demaille <akim@epita.fr>
8586
8587 * src/reader.c (readgram): Display hidden chars in error messages.
8588
8589 2001-08-03 Akim Demaille <akim@epita.fr>
8590
8591 Update to gettext 0.10.39.
8592
8593 2001-08-03 Akim Demaille <akim@epita.fr>
8594
8595 * lib/strspn.c: New.
8596
8597 2001-08-01 Marc Autret <autret_m@epita.fr>
8598
8599 * doc/bison.texinfo: Update.
8600 * doc/bison.1 (mandoc): Update.
8601 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
8602 * src/files.c: Support output files extensions computing.
8603 (src_extension): New static variable.
8604 (header_extension): New static variable.
8605 (tr): New function.
8606 (get_extension_index): New function, gets the index of an extension
8607 filename in a string.
8608 (compute_exts_from_gf): New function, computes extensions from the
8609 grammar file extension.
8610 (compute_exts_from_src): New functions, computes extensions from the
8611 C source file extension, file given by ``-o'' option.
8612 (compute_base_names): Update.
8613 (output_files): Update.
8614
8615 2001-08-01 Robert Anisko <anisko_r@epita.fr>
8616
8617 * doc/bison.texi: Document @$.
8618 (Locations): New section.
8619
8620 2001-07-18 Akim Demaille <akim@epita.fr>
8621
8622 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
8623 * config/prev-version.txt, config/move-if-change: New.
8624 * Makefile.am: Adjust.
8625
8626 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
8627
8628 * src/bison.simple (yyparse): Suppress warning `comparaison
8629 between signed and unsigned'.
8630
8631 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
8632
8633 * src/getargs.h (raw_flag): Remove.
8634 * src/getargs.c: Die on `-r'/`--raw'.
8635 * src/lex.c (parse_percent_token): Die on `%raw'.
8636 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
8637 * tests/calc.at: Suppress test with option `--raw'.
8638
8639 2001-07-14 Akim Demaille <akim@epita.fr>
8640
8641 * config/: New.
8642 * configure.in: Require Autoconf 2.50.
8643 Update to gettext 0.10.38.
8644
8645 2001-03-16 Akim Demaille <akim@epita.fr>
8646
8647 * doc/bison.texinfo: ANSIfy the examples.
8648
8649 2001-03-16 Akim Demaille <akim@epita.fr>
8650
8651 * getargs.c (skeleton): New variable.
8652 (longopts): --skeleton is a new option.
8653 (shortopts, getargs): -S is a new option.
8654 * getargs.h: Declare skeleton.
8655 * output.c (output_parser): Use it.
8656
8657 2001-03-16 Akim Demaille <akim@epita.fr>
8658
8659 * m4/strerror_r.m4: New.
8660 * m4/error.m4: Run AC_FUNC_STRERROR_R.
8661 * lib/error.h, lib/error.c: Update.
8662
8663 2001-03-16 Akim Demaille <akim@epita.fr>
8664
8665 * src/getargs.c (longopts): Clean up.
8666
8667 2001-02-21 Akim Demaille <akim@epita.fr>
8668
8669 * src/reader.c (gensym): `gensym_count' is your own.
8670 Use a static buf to create the symbol name, as token_buffer is no
8671 longer a buffer.
8672
8673 2001-02-08 Akim Demaille <akim@epita.fr>
8674
8675 * src/conflicts.c (conflict_report): Be sure not to append to res
8676 between two calls, which could happen if both first sprintf were
8677 skipped, but not the first cp += strlen.
8678
8679 2001-02-08 Akim Demaille <akim@epita.fr>
8680
8681 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
8682 New, from fileutils 4.0.37.
8683 * configure.in: Require Autoconf 2.49c. I took some time before
8684 making this decision. This is the only way out for portability
8685 issues in Bison, it would mean way too much duplicate effort to
8686 import in Bison features implemented in 2.49c since 2.13.
8687 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
8688
8689 2001-02-02 Akim Demaille <akim@epita.fr>
8690
8691 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
8692 * lib/xalloc.h, lib/xmalloc.c: Update.
8693
8694 2001-01-19 Akim Demaille <akim@epita.fr>
8695
8696 Get rid of the ad hoc handling of token_buffer in the scanner: use
8697 the obstacks.
8698
8699 * src/lex.c (token_obstack): New.
8700 (init_lex): Initialize it. No longer call...
8701 (grow_token_buffer): this. Remove it.
8702 Adjust all the places which used it to use the obstack.
8703
8704 2001-01-19 Akim Demaille <akim@epita.fr>
8705
8706 * src/lex.h: Rename all the tokens:
8707 s/\bENDFILE\b/tok_eof/g;
8708 s/\bIDENTIFIER\b/tok_identifier/g;
8709 etc.
8710 Let them be enums, not #define, to ease debugging.
8711 Adjust all the code.
8712
8713 2001-01-18 Akim Demaille <akim@epita.fr>
8714
8715 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
8716 * src/lex.c (maxtoken, grow_token_buffer): Static.
8717
8718 2001-01-18 Akim Demaille <akim@epita.fr>
8719
8720 Since we now use obstacks, more % directives can be enabled.
8721
8722 * src/lex.c (percent_table): Also accept `%yacc',
8723 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
8724 `%debug'.
8725 Handle the actions for `%semantic_parser' and `%pure_parser' here,
8726 instead of returning a token.
8727 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
8728 * src/reader.c (read_declarations): Adjust.
8729 * src/files.c (open_files): Don't call `compute_base_names', don't
8730 compute `attrsfile' since they depend upon data which might be
8731 *in* the input file now.
8732 (output_files): Do it here.
8733 * src/output.c (output_headers): Document the fact that this patch
8734 introduces a guaranteed SEGV for semantic parsers.
8735 * doc/bison.texinfo: Document them.
8736 * tests/suite.at: Exercise these %options.
8737
8738 2000-12-20 Akim Demaille <akim@epita.fr>
8739
8740 Also handle the output file (--verbose) with obstacks.
8741
8742 * files.c (foutput): Remove.
8743 (output_obstack): New.
8744 Adjust all dependencies.
8745 * src/conflicts.c: Return a string.
8746 * src/system.h (obstack_grow_string): Rename as...
8747 (obstack_sgrow): this. Be ready to work with non literals.
8748 (obstack_fgrow4): New.
8749
8750 2000-12-20 Akim Demaille <akim@epita.fr>
8751
8752 * src/files.c (open_files): Fix the computation of short_base_name
8753 in the case of `-o foo.tab.c'.
8754
8755 2000-12-20 Akim Demaille <akim@epita.fr>
8756
8757 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
8758 (copy_dollar): Now that everything uses obstacks, get rid of the
8759 FILE * parameters.
8760
8761 2000-12-20 Akim Demaille <akim@epita.fr>
8762
8763 * src/files.c (open_files): Actually the `.output' file is based
8764 on the short_base_name, not base_name.
8765 * tests/suite.at (Checking output file names): Adjust.
8766
8767 2000-12-20 Akim Demaille <akim@epita.fr>
8768
8769 * src/bison.s1: Remove, we now use directly...
8770 * src/bison.simple: this.
8771 * src/Makefile.am: Use pkgdata instead of data.
8772
8773 2000-12-20 Akim Demaille <akim@epita.fr>
8774
8775 * src/files.c (guard_obstack): New.
8776 (open_files): Initialize it.
8777 (output_files): Dump it...
8778 * src/files.h: Export it.
8779 * src/reader.c (copy_guard): Use it.
8780
8781 2000-12-19 Akim Demaille <akim@epita.fr>
8782
8783 * src/files.c (outfile, defsfile, actfile): Removed as global
8784 vars.
8785 (open_files): Don't compute them.
8786 (output_files): Adjust.
8787 (base_name, short_base_name): Be global.
8788 Adjust dependencies.
8789
8790 2000-12-19 Akim Demaille <akim@epita.fr>
8791
8792 * src/files.c (strsuffix): New.
8793 (stringappend): Be just like strcat but allocate.
8794 (base_names): Eve out from open_files.
8795 Try to simplify the rather hairy computation of base_name and
8796 short_base_name.
8797 (open_files): Use it.
8798 * tests/suite.at (Checking output file names): New test.
8799
8800 2000-12-19 Akim Demaille <akim@epita.fr>
8801
8802 * src/system.h (obstack_grow_literal_string): Rename as...
8803 (obstack_grow_string): this.
8804 * src/output.c (output_parser): Recognize `%% actions' instead of
8805 `$'.
8806 * src/bison.s1: s/$/%% actions/.
8807 * src/bison.hairy: Likewise.
8808
8809 2000-12-19 Akim Demaille <akim@epita.fr>
8810
8811 * src/output.c (output_parser): Compute the `#line' lines when
8812 there are.
8813 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
8814 Suggested by Hans Aberg.
8815
8816 2000-12-19 Akim Demaille <akim@epita.fr>
8817
8818 Let the handling of the skeleton files be local to the procedures
8819 that use it.
8820
8821 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
8822 longer static.
8823 (fparser, open_extra_files): Remove.
8824 (open_files, output_files): Don't take care of fparser.
8825 * src/files.h: Adjust.
8826 * src/output.c (output_parser): Open and close the file to the
8827 skeleton.
8828 * src/reader.c (read_declarations): When %semantic_parser, open
8829 fguard.
8830
8831 2000-12-19 Akim Demaille <akim@epita.fr>
8832
8833 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
8834 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
8835
8836 2000-12-19 Akim Demaille <akim@epita.fr>
8837
8838 * src/files.c (open_files): Yipee! We no longer need all the code
8839 looking for `/tmp' since we have no tmp file.
8840
8841 2000-12-19 Akim Demaille <akim@epita.fr>
8842
8843 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
8844 New macros.
8845 * src/files.c (open_files): Less dependency on MSDOS etc.
8846
8847 2000-12-14 Akim Demaille <akim@epita.fr>
8848
8849 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
8850 Provide a default definition.
8851 Use it when executing the default @ action.
8852 * src/reader.c (reader_output_yylsp): No longer include
8853 `timestamp' and `text' in the default YYLTYPE.
8854
8855 2000-12-12 Akim Demaille <akim@epita.fr>
8856
8857 * src/reader.c (copy_definition, parse_union_decl, copy_action)
8858 (copy_guard): Quote the file names.
8859 Reported by Laurent Mascherpa.
8860
8861 2000-12-12 Akim Demaille <akim@epita.fr>
8862
8863 * src/output.c (output_headers, output_program, output): Be sure
8864 to escape special characters when outputting filenames.
8865 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
8866 (output_headers): Don't depend on them, Use ACTSTR.
8867
8868 2000-11-17 Akim Demaille <akim@epita.fr>
8869
8870 * lib/obstack.h: Formatting changes.
8871 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
8872 prevents type checking.
8873 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
8874 cast the value to (void *): assigning a `foo *' to a `void *'
8875 variable is valid.
8876 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
8877 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
8878 append characters.
8879
8880 2000-11-17 Akim Demaille <akim@epita.fr>
8881
8882 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
8883 as...
8884 (suite.m4, regression.m4, calc.m4): these.
8885 * tests/atgeneral.m4: Update from CVS Autoconf.
8886
8887 2000-11-17 Akim Demaille <akim@epita.fr>
8888
8889 * tests/regression.m4 (%union and --defines): New test,
8890 demonstrating a current bug in the obstack implementation.
8891
8892 2000-11-17 Akim Demaille <akim@epita.fr>
8893
8894 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
8895 macros.
8896 Use them to declare the variables which are global or local to
8897 `yyparse'.
8898
8899 2000-11-17 Akim Demaille <akim@epita.fr>
8900
8901 * acconfig.h: Remove, no longer used.
8902
8903 2000-11-07 Akim Demaille <akim@epita.fr>
8904
8905 * src: s/Copyright (C)/Copyright/g.
8906
8907 2000-11-07 Akim Demaille <akim@epita.fr>
8908
8909 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
8910 defining.
8911 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
8912
8913 2000-11-07 Akim Demaille <akim@epita.fr>
8914
8915 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
8916 Merge in a single CPP if/else.
8917
8918 2000-11-07 Akim Demaille <akim@epita.fr>
8919
8920 * src/output.c (output): Remove useless variables.
8921 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
8922 argument `data' for consistency with the prototypes.
8923 Qualify it `const'.
8924 (obstack_copy, obstack_copy0): Rename the second argument as
8925 `address' for consistency. Qualify it `const'.
8926 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
8927 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
8928 `const' their input argument (`data' or `address').
8929 Adjust the corresponding macros to include `const' in casts.
8930
8931 2000-11-03 Akim Demaille <akim@epita.fr>
8932
8933 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
8934 s/PFILE1/BISON_HAIRY/.
8935 Adjust dependencies.
8936
8937 2000-11-03 Akim Demaille <akim@epita.fr>
8938
8939 For some reason, this was not applied.
8940
8941 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
8942 `unlink': it's no longer used.
8943
8944 2000-11-03 Akim Demaille <akim@epita.fr>
8945
8946 * src/files.c (skeleton_find): New function, eved out of...
8947 (open_files, open_extra_files): here.
8948
8949 2000-11-03 Akim Demaille <akim@epita.fr>
8950
8951 Don't use `atexit'.
8952
8953 * src/files.c (obstack_save): New function.
8954 (done): Rename as...
8955 (output_files): this.
8956 Use `obstack_save'.
8957 * src/main.c (main): Don't use `atexit' to register `done', since
8958 it no longer has to remove tmp files, just call `output_files'
8959 when there are no errors.
8960
8961 2000-11-02 Akim Demaille <akim@epita.fr>
8962
8963 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
8964 `unlink': it's no longer used.
8965 * src/files.h: Formatting changes.
8966
8967 2000-11-02 Akim Demaille <akim@epita.fr>
8968
8969 Remove the last uses of mktemp and unlink/delete.
8970
8971 * src/files.c (fdefines, ftable): Removed.
8972 (defines_ostack, table_obstack): New.
8973 Adjust dependencies of the former into uses of the latter.
8974 * src/output.c (output_short_or_char_table, output_short_table):
8975 Convert to using obstacks.
8976 * src/reader.c (copy_comment2): Accept one FILE * and two
8977 obstacks.
8978 (output_token_defines, reader_output_yylsp): Use obstacks.
8979 * src/system.h (obstack_fgrow3): New.
8980
8981 2000-11-01 Akim Demaille <akim@epita.fr>
8982
8983 Change each use of `fattrs' into a use of `attrs_obstack'.
8984
8985 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
8986 * src/files.c (fattrs): Remove.
8987 (attrs_obstack): New.
8988 Adjust all dependencies.
8989 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
8990
8991 2000-11-01 Akim Demaille <akim@epita.fr>
8992
8993 Introduce obstacks.
8994 Change each use of `faction' into a use of `action_obstack'.
8995
8996 * lib/obstack.h, lib/obstack.c: New files.
8997 * src/files.c (faction): Remove.
8998 (action_obstack): New.
8999 Adjust all dependencies.
9000
9001 2000-10-20 Akim Demaille <akim@epita.fr>
9002
9003 * lib/quote.h (PARAMS): New macro. Use it.
9004
9005 2000-10-16 Akim Demaille <akim@epita.fr>
9006
9007 * src/output.c (output_short_or_char_table): New function.
9008 (output_short_table, output_token_translations): Use it.
9009 (goto_actions): Use output_short_table.
9010
9011 2000-10-16 Akim Demaille <akim@epita.fr>
9012
9013 * src/symtab.c (bucket_new): New function.
9014 (getsym): Use it.
9015
9016 * src/output.c (output_short_table): New argument to display the
9017 comment associated with the table.
9018 Adjust dependencies.
9019 (output_gram): Use it.
9020 (output_rule_data): Nicer output layout for YYTNAME.
9021
9022 2000-10-16 Akim Demaille <akim@epita.fr>
9023
9024 * src/lex.c (read_typename): New function.
9025 (lex): Use it.
9026 * src/reader.c (copy_dollar): Likewise.
9027
9028 2000-10-16 Akim Demaille <akim@epita.fr>
9029
9030 * src/reader.c (copy_comment2): Expect the input stream to be on
9031 the `/' which is suspected to open a comment, instead of being
9032 called after `//' or `/*' was read.
9033 (copy_comment, copy_definition, parse_union_decl, copy_action)
9034 (copy_guard): Adjust.
9035
9036 2000-10-16 Akim Demaille <akim@epita.fr>
9037
9038 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
9039 `read_signed_integer'.
9040
9041 2000-10-16 Akim Demaille <akim@epita.fr>
9042
9043 * src/reader.c (copy_dollar): New function.
9044 (copy_guard, copy_action): Use it.
9045
9046 2000-10-16 Akim Demaille <akim@epita.fr>
9047
9048 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
9049 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
9050 New files, from Fileutils 4.0.27.
9051 * src/main.c (printable_version): Remove.
9052 * src/lex.c, src/reader.c: Use `quote'.
9053
9054 2000-10-04 Akim Demaille <akim@epita.fr>
9055
9056 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
9057
9058 2000-10-04 Akim Demaille <akim@epita.fr>
9059
9060 * doc/bison.texinfo: Various typos spotted by Neil Booth.
9061
9062 2000-10-04 Akim Demaille <akim@epita.fr>
9063
9064 When a literal string is used to define two different tokens,
9065 `bison -v' segfaults.
9066 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
9067
9068 * tests/regression.m4: New file.
9069 Include the core of the sample provided by Piotr Gackiewicz.
9070 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
9071 properly.
9072
9073 2000-10-04 Akim Demaille <akim@epita.fr>
9074
9075 * src/reader.c (parse_expect_decl): Keep `count' within the size
9076 of `buffer'.
9077 From Neil Booth.
9078
9079 2000-10-02 Paul Eggert <eggert@twinsun.com>
9080
9081 * bison.s1 (yyparse): Assign the default value
9082 unconditionally, to avoid a GCC warning and make the parser a
9083 tad smaller.
9084
9085 2000-10-02 Akim Demaille <akim@epita.fr>
9086
9087 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
9088 options.
9089
9090 2000-10-02 Akim Demaille <akim@epita.fr>
9091
9092 * src/derives.c, src/print.c, src/reduce.c: To ease the
9093 translation, move some `\n' out of the translated strings.
9094
9095 2000-10-02 Akim Demaille <akim@epita.fr>
9096
9097 The location tracking mechanism is precious for parse error
9098 messages. Nevertheless, it is enabled only when `@n' is used in
9099 the grammar, which is a different issue (you can use it in error
9100 message, but not in the grammar per se). Therefore, there should
9101 be another means to enable it.
9102
9103 * src/getargs.c (getargs): Support `--locations'.
9104 (usage): Report it.
9105 * src/getargs.h (locationsflag): Export it.
9106 * src/lex.c (percent_table): Support `%locations'.
9107 * src/reader.c (yylsp_needed): Remove this variable, now replaced
9108 with `locationsflag'.
9109 * doc/bison.texinfo: Document `--locations' and `%locations'.
9110 Sort the options.
9111 * tests/calc.m4: Test it.
9112
9113 For regularity of the names, replace each
9114 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
9115 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
9116 In addition replace each `flag' with `_flag'.
9117
9118 2000-10-02 Akim Demaille <akim@epita.fr>
9119
9120 Also test parse error messages, including with YYERROR_VERBOSE.
9121
9122 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
9123 associative).
9124 Use it to check the computations.
9125 Use it to check `nonassoc' is honored.
9126 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
9127 `--yyerror-verbose'.
9128 (_AT_CHECK_CALC): Adjust to this option.
9129 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
9130
9131 2000-10-02 Akim Demaille <akim@epita.fr>
9132
9133 Test also `--verbose', `--defines' and `--name-prefix'. Testing
9134 the latter demonstrates a flaw in the handling of non debugging
9135 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
9136 was used in order to simplify:
9137
9138 #if YYDEBUG
9139 if (yydebug)
9140 {
9141 ...
9142 }
9143 #endif
9144
9145 into
9146
9147 if (yydebug)
9148 {
9149 ...
9150 }
9151
9152 unfortunately this leads to a CPP conflict when
9153 `--name-prefix=foo' is used since it produces `#define yydebug
9154 foodebug'.
9155
9156 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
9157 (YYDPRINTF): New macro.
9158 Spread its use.
9159 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
9160 the bison options.
9161 Also test `--verbose', `--defines' and `--name-prefix'.
9162
9163 2000-10-02 Akim Demaille <akim@epita.fr>
9164
9165 Improve the readability of the produced parsers.
9166
9167 * src/bison.s1: Formatting changes.
9168 Improve the comment related to the `$' mark.
9169 (yydefault): Don't fall through to `yyresume': `goto' there.
9170 * src/output.c (output_parser): When the `$' is met, skip the end
9171 of its line.
9172 New variable, `number_of_dollar_signs', to check there's exactly
9173 one `$' in the parser skeleton.
9174
9175 2000-10-02 Akim Demaille <akim@epita.fr>
9176
9177 * lib/xstrdup.c: New file, from the fileutils.
9178 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
9179 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
9180 instead of strlen + xmalloc + strcpy.
9181 * src/symtab.c (copys): Remove, use xstrdup instead.
9182
9183 2000-10-02 Akim Demaille <akim@epita.fr>
9184
9185 * src/gram.h (associativity): New enum type which replaces the
9186 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
9187 `right_assoc', `left_assoc' and `non_assoc'.
9188 Adjust all dependencies.
9189 * src/reader.c: Formatting changes.
9190 (LTYPESTR): Don't define it, use it as a literal in
9191 `reader_output_yylsp'.
9192 * src/symtab.h (symbol_class): New enum type which replaces the
9193 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
9194 `sunknown', `stoken and `snterm'.
9195
9196 2000-10-02 Akim Demaille <akim@epita.fr>
9197
9198 * src/getargs.c (fixed_outfiles): Rename as...
9199 (yaccflag): for consistency and accuracy.
9200 Adjust dependencies.
9201
9202 2000-10-02 Akim Demaille <akim@epita.fr>
9203
9204 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
9205 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
9206 difficult and introduced a lot of core dump. It turns out that
9207 Bison used an implementation of `xmalloc' based on `calloc', and
9208 at various places it does depend upon the initialization to 0. I
9209 have not tried to isolate the pertinent places, and all the former
9210 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
9211 someone should address this issue.
9212
9213 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
9214 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
9215 files.
9216 Adjust dependencies.
9217 * src/warshall.h: New file.
9218 Propagate.
9219
9220 2000-10-02 Akim Demaille <akim@epita.fr>
9221
9222 Various anti-`extern in *.c' changes.
9223
9224 * src/system.h: Include `assert.h'.
9225
9226 2000-10-02 Akim Demaille <akim@epita.fr>
9227
9228 * src/state.h (nstates, final_state, first_state, first_shift)
9229 (first_reduction): Move their exportation from here...
9230 * src/LR0.h: to here.
9231 Adjust dependencies.
9232 * src/getargs.c (statisticsflag): New variable.
9233 Add support for `--statistics'.
9234 Adjust dependencies.
9235
9236 Remove a lot of now useless `extern' statements in most files.
9237
9238 2000-10-02 Akim Demaille <akim@epita.fr>
9239
9240 * src/LR0.h: New file.
9241 Propagate its use.
9242
9243 2000-10-02 Akim Demaille <akim@epita.fr>
9244
9245 * src/print.h: New file.
9246 Propagate its use.
9247 * src/print.c: Formatting and ordering changes.
9248 (verbose, terse): Replace with...
9249 (print_results): this new function.
9250 Adjust dependencies.
9251
9252 2000-10-02 Akim Demaille <akim@epita.fr>
9253
9254 * src/conflicts.c (conflict_report): New function.
9255 (conflict_log, verbose_conflict_log): Replace with...
9256 (print_conflicts): this function.
9257 Adjust dependencies.
9258 * src/conflicts.h: New file.
9259 Propagate its inclusion.
9260
9261 2000-10-02 Akim Demaille <akim@epita.fr>
9262
9263 * src/nullable.h: New file.
9264 Propagate its inclusion.
9265 * src/nullable.c: Formatting changes.
9266
9267 2000-10-02 Akim Demaille <akim@epita.fr>
9268
9269 * src/reduce.h: New file.
9270 Propagate its inclusion.
9271 * src/reduce.c: Topological sort and other formatting changes.
9272 (bool, TRUE, FALSE): Move their definition to...
9273 * src/system.h: here.
9274
9275 2000-10-02 Akim Demaille <akim@epita.fr>
9276
9277 * src/files.c: Formatting changes.
9278 (tryopen, tryclose, openfiles): Rename as...
9279 (xfopen, xfclose, open_files): this.
9280 (stringappend): static.
9281 * src/files.h: Complete the list of exported symbols.
9282 Propagate its use.
9283
9284 2000-10-02 Akim Demaille <akim@epita.fr>
9285
9286 * src/reader.h: New file.
9287 Propagate its use instead of tedious list of `extern' and
9288 prototypes.
9289 * src/reader.c: Formatting changes, topological sort,
9290 s/register//.
9291
9292 2000-10-02 Akim Demaille <akim@epita.fr>
9293
9294 * src/lex.h: Prototype `lex.c' exported functions.
9295 * src/reader.c: Adjust.
9296 * src/lex.c: Formatting changes.
9297 (safegetc): Rename as...
9298 (xgetc): this.
9299
9300 2000-10-02 Akim Demaille <akim@epita.fr>
9301
9302 * src/lalr.h: New file.
9303 Propagate its inclusion instead of prototypes and `extern'.
9304 * src/lalr.c: Formatting changes, topological sorting etc.
9305
9306 2000-10-02 Akim Demaille <akim@epita.fr>
9307
9308 * src/output.c (token_actions): Introduce a temporary array,
9309 YYDEFACT, that makes it possible for this function to use
9310 output_short_table.
9311
9312 2000-10-02 Akim Demaille <akim@epita.fr>
9313
9314 `user_toknums' is output as a `short[]' in `output.c', while it is
9315 defined as a `int[]' in `reader.c'. For consistency with the
9316 other output tables, `user_toknums' is now defined as a table of
9317 shorts.
9318
9319 * src/reader.c (user_toknums): Be a short table instead of an int
9320 table.
9321 Adjust dependencies.
9322
9323 Factor the short table outputs.
9324
9325 * src/output.c (output_short_table): New function.
9326 * src/output.c (output_gram, output_stos, output_rule_data)
9327 (output_base, output_table, output_check): Use it.
9328
9329 2000-10-02 Akim Demaille <akim@epita.fr>
9330
9331 * src/output.c (output): Topological sort of the functions, in
9332 order to get rid of the `static' prototypes.
9333 No longer use `register'.
9334 * src/output.h: New file.
9335 Propagate its inclusion in files explicitly prototyping functions
9336 from output.c.
9337
9338 2000-09-21 Akim Demaille <akim@epita.fr>
9339
9340 * src/atgeneral.m4: Update from Autoconf.
9341
9342 2000-09-21 Akim Demaille <akim@epita.fr>
9343
9344 * src/closure.h: New file.
9345 * src/closure.c: Formatting changes, topological sort over the
9346 functions, use of closure.h.
9347 (initialize_closure, finalize_closure): Rename as...
9348 (new_closure, free_closure): these. Adjust dependencies.
9349 * src/LR0.c: Formatting changes, topological sort, use of
9350 cloture.h.
9351 (initialize_states): Rename as...
9352 (new_states): this.
9353 * src/Makefile.am (noinst_HEADERS): Adjust.
9354
9355 2000-09-20 Akim Demaille <akim@epita.fr>
9356
9357 * src/acconfig.h: Don't protect config.h against multiple
9358 inclusion.
9359 Don't define PARAMS.
9360 * src/system.h: Define PARAMS.
9361 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
9362 purpose of config.h. system.h must not try to fix wrong
9363 definitions in config.h.
9364
9365 2000-09-20 Akim Demaille <akim@epita.fr>
9366
9367 * src/derives.h: New file.
9368 * src/main.c, src/derives.h: Use it.
9369 Formatting changes.
9370 * src/Makefile.am (noinst_HEADERS): Adjust.
9371
9372 2000-09-20 Akim Demaille <akim@epita.fr>
9373
9374 * tests/atgeneral.m4: Update from Autoconf.
9375 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
9376 (AT_CHECK_CALC): New macros.
9377 Use these macros to test bison with options `', `--raw',
9378 `--debug', `--yacc', `--yacc --debug'.
9379
9380 2000-09-19 Akim Demaille <akim@epita.fr>
9381
9382 * src/output.c: Formatting changes.
9383 * src/machine.h: Remove, leaving its contents in...
9384 * src/system.h: here.
9385 Include stdio.h.
9386 Adjust all dependencies on stdio.h and machine.h.
9387 * src/getargs.h: New file.
9388 Let all `extern' declarations about getargs.c be replaced with
9389 inclusion of `getargs.h'.
9390 * src/Makefile.am (noinst_HEADERS): Adjust.
9391
9392 * tests/calc.m4 (yyin): Be initialized in main, not on the global
9393 scope.
9394 (yyerror): Returns void, not int.
9395 * doc/bison.texinfo: Formatting changes.
9396
9397 2000-09-19 Akim Demaille <akim@epita.fr>
9398
9399 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
9400 portable.
9401
9402 2000-09-18 Akim Demaille <akim@epita.fr>
9403
9404 * configure.in: Append WARNING_CFLAGS to CFLAGS.
9405 * src/Makefile.am (INCLUDES): Don't.
9406 Be ready to fetch headers in lib/.
9407
9408 2000-09-18 Akim Demaille <akim@epita.fr>
9409
9410 * doc/bison.texinfo: Update the copyright.
9411 ANSIfy and GNUify the examples.
9412 Remove the old menu.
9413
9414 2000-09-18 Akim Demaille <akim@epita.fr>
9415
9416 First set of tests: use the `calc' example from the documentation.
9417
9418 * src/bison.s1 (yyparse): Condition the code using `yytname' which
9419 is defined only when YYDEBUG is.
9420 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
9421 * src/files.c (tryopen, tryclose): Formatting changes.
9422 Move to the top and be static.
9423 * src/reader.c (read_signed_integer): Likewise.
9424 * tests/calc.m4: New file.
9425 * Makefile.am, suite.m4: Adjust.
9426 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
9427
9428 2000-09-18 Akim Demaille <akim@epita.fr>
9429
9430 Add support for an Autotest test suite for Bison.
9431
9432 * m4/m4.m4, m4/atconfig.m4: New files.
9433 * m4/Makefile.am (EXTRA_DIST): Adjust.
9434 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
9435 files.
9436 * src/getargs.c: Display a more standard --version message.
9437 * src/reader.c (reader): Formatting changes.
9438 No longer depend upon VERSION_STRING.
9439 * configure.in: No longer use `dnl'.
9440 Set up the test suite and the new directory `tests/.
9441 (VERSION_STRING): Remove.
9442
9443 2000-04-14 Akim Demaille <akim@epita.fr>
9444
9445 * src/reader.c (copy_comment2): New function, same as former
9446 `copy_comment', but outputs into two FILE *.
9447 (copy_comment): Use it.
9448 (parse_union_decl): Use it.
9449 (get_type, parse_start_decl): Use the same `invalid' message.
9450 (parse_start_decl, parse_union_decl): Use the same `multiple'
9451 message.
9452 (parse_union_decl, copy_guard, copy_action): Use the same
9453 `unmatched' message.
9454 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
9455
9456 2000-03-31 Akim Demaille <akim@epita.fr>
9457
9458 * src/files.c (tryopen, tryclose): Move to the top.
9459 Be static.
9460
9461 2000-03-31 Akim Demaille <akim@epita.fr>
9462
9463 * src/main.c (main): Don't call `done', exit does it.
9464
9465 2000-03-31 Akim Demaille <akim@epita.fr>
9466
9467 * allocate.c: s/return (foo)/return foo/.
9468 * lalr.c: Likewise.
9469 * LR0.c: Likewise.
9470 * output.c: Likewise.
9471 * reader.c: Likewise.
9472 * symtab.c: Likewise.
9473 * vmsgetargs.c: Likewise.
9474
9475 2000-03-31 Akim Demaille <akim@epita.fr>
9476
9477 Clean up the error reporting functions.
9478
9479 * src/report.c: New file.
9480 * src/report.h: Likewise.
9481 * src/Makefile.am: Adjust.
9482 * m4/error.m4: New file.
9483 * m4/Makefile.am: Adjust.
9484 * configure.in (jm_PREREQ_ERROR): Call it.
9485 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
9486 Remove.
9487 (fatal, fatals): Remove. All callers use complain.c::fatal.
9488 (warn, warni, warns, warnss, warnss): Remove. All callers use
9489 complain.c::complain.
9490 (toomany): Remove, use fatal instead.
9491 * src/files.c (done): No argument, use complain_message_count.
9492 * src/main.c (main): Register `done' to `atexit'.
9493
9494 * src/getargs.c (usage): More `fputs', less `fprintf'.
9495
9496 2000-03-28 Akim Demaille <akim@epita.fr>
9497
9498 * lib/: New directory.
9499 * Makefile.am (SUBDIRS): Adjust.
9500 * configure.in: Adjust.
9501 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
9502 useless.
9503 * src/alloca.c: Moved to lib/.
9504 * src/getopt.c: Likewise.
9505 * src/getopt1.c: Likewise.
9506 * src/getopt.h: Likewise.
9507 * src/ansi2knr.c: Likewise.
9508 * src/ansi2knr.1: Likewise.
9509 * src/Makefile.am: Adjust.
9510 * lib/Makefile.am: New file.
9511
9512 2000-03-28 Akim Demaille <akim@epita.fr>
9513
9514 * src/getargs.c (usage): Refresh the help message.
9515
9516 2000-03-17 Akim Demaille <akim@epita.fr>
9517
9518 * src/getopt1.c: Updated from textutils 2.0e
9519 * src/getopt.c: Likewise.
9520 * src/getopt.h: Likewise.
9521
9522 2000-03-17 Akim Demaille <akim@epita.fr>
9523
9524 * src/Makefile.am (bison.simple): Fix the awk program: quote only
9525 the file name, not the whole `#line LINE FILE'.
9526
9527 2000-03-17 Akim Demaille <akim@epita.fr>
9528
9529 On syntax errors, report the token on which we choked.
9530
9531 * src/bison.s1 (yyparse): In the label yyerrlab, when
9532 YYERROR_VERBOSE, add yychar in msg.
9533
9534 2000-03-17 Akim Demaille <akim@epita.fr>
9535
9536 * src/reader.c (copy_at): New function.
9537 (copy_guard): Use it.
9538 (copy_action): Use it.
9539
9540 2000-03-17 Akim Demaille <akim@epita.fr>
9541
9542 Be kind to translators, save some useless translations.
9543
9544 * src/main.c (banner): New function.
9545 (fatal_banner): Use it.
9546 (warn_banner): Use it.
9547
9548 2000-03-17 Akim Demaille <akim@epita.fr>
9549
9550 * src/reader.c (copy_definition): Use copy_string and
9551 copy_comment. Removed now unused `match', `ended',
9552 `cplus_comment'.
9553 (copy_comment, copy_string): Moved, to be visible from
9554 copy_definition.
9555
9556 2000-03-17 Akim Demaille <akim@epita.fr>
9557
9558 * src/reader.c (copy_string): Declare `static inline'. No
9559 problems with inline, since it is checked by configure.
9560 (copy_comment): Likewise.
9561
9562 2000-03-17 Akim Demaille <akim@epita.fr>
9563
9564 * src/reader.c (packsymbols): Formatting changes.
9565
9566 2000-03-17 Akim Demaille <akim@epita.fr>
9567
9568 * src/reader.c (copy_comment): New function, factored out from:
9569 (copy_action): Use it. Removed now unused `match', `ended',
9570 `cplus_comment'.
9571 (copy_guard): Likewise.
9572
9573 2000-03-17 Akim Demaille <akim@epita.fr>
9574
9575 * src/reader.c (copy_string): New function, factored out from:
9576 (copy_action): Use it.
9577 (copy_guard): Likewise.
9578
9579 2000-03-17 Akim Demaille <akim@epita.fr>
9580
9581 Change the handling of @s so that they behave exactly like $s.
9582 There is now a pseudo variable @$ (readble and writable), location
9583 of the lhs of the rule (by default ranging from the location of
9584 the first symbol of the rhs, to the location of the last symbol,
9585 or, if the rhs is empty, YYLLOC).
9586
9587 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
9588 yyval.
9589 (yyparse): When providing a default semantic action, provide a
9590 default location action.
9591 (after the $): No longer change `*YYLSP', just stack YYLOC the
9592 same way you stack YYVAL.
9593 * src/reader.c (read_declarations): Use warns.
9594 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
9595 (copy_action, case '@'): Likewise.
9596 Use a standard error message, to save useless work from
9597 translators.
9598
9599 2000-03-17 Akim Demaille <akim@epita.fr>
9600
9601 * src/bison.s1: Formatting and cosmetics changes.
9602 * src/reader.c: Likewise.
9603 Update the Copyright notice.
9604
9605 2000-03-17 Akim Demaille <akim@epita.fr>
9606
9607 * src/bison.s1 (#line): All set to `#line' only, since the
9608 Makefile now handles them.
9609
9610 2000-03-16 Akim Demaille <akim@epita.fr>
9611
9612 * src/output.c (output_rule_data): Output the documentation of
9613 some of the tables.
9614 (Copyright notice): Update.
9615 Formatting changes.
9616
9617 2000-03-16 Akim Demaille <akim@epita.fr>
9618
9619 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
9620 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
9621 One `#if YYDEBUG' remains, since it uses variables which are
9622 defined only if `YYDEBUG != 0'.
9623
9624 2000-03-16 Akim Demaille <akim@epita.fr>
9625
9626 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
9627 and related variables so that the similarities are highlighted.
9628
9629 2000-03-16 Akim Demaille <akim@epita.fr>
9630
9631 * src/bison.s1: Properly indent CPP directives.
9632
9633 2000-03-16 Akim Demaille <akim@epita.fr>
9634
9635 * src/bison.s1: Properly indent the `alloca' CPP section.
9636
9637 2000-03-16 Akim Demaille <akim@epita.fr>
9638
9639 Do not hard code values of directories in `configure.in'.
9640 Update the `configure' tool chain.
9641
9642 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
9643 src/makefile.am.
9644 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
9645 (AC_OUTPUT): Add m4/Makefile.
9646 Bump to bison 1.28a, 1.29 has never been released.
9647 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
9648 handled via src/Makefile.am.
9649 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
9650 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
9651 autoheader.
9652 * Makefile.am (SUBDIRS): Add m4.
9653 (ACLOCAL_AM_FLAGS): New variable.
9654 (AUTOMAKE_OPTIONS): Add check-news.
9655 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
9656 the proper line number and file name.
9657 (DEFS): Propagate the location of bison library files and of the
9658 locale files.
9659 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
9660 builddir.
9661 * acinclude.m4: Remove, replaced by the directory m4.
9662 * m4/Makefile.am (EXTRA_DIST): New variable.
9663 * m4/gettext.m4: New file, from the fileutils.
9664 * m4/lcmessage.m4: Likewise
9665 * m4/progtest.m4: Likewise.
9666 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
9667
9668 2000-03-10 Akim Demaille <akim@epita.fr>
9669
9670 * src/closure.c:
9671 Formatting changes of various comments.
9672 Respect the GNU coding standards at various places.
9673 Don't use `_()' when no translation is needed.
9674
9675 1999-12-13 Jesse Thilo <jthilo@gnu.org>
9676
9677 * src/files.c:
9678 OS/2 honors TMPDIR environment variable.
9679
9680 1999-12-13 Jesse Thilo <jthilo@gnu.org>
9681
9682 * doc/bison.texinfo: Tweaked spelling and grammar.
9683 Updated ISBN.
9684 Removed reference to price of printed copy.
9685 Mention BISON_SIMPLE and BISON_HAIRY.
9686
9687 1999-12-13 Jesse Thilo <jthilo@gnu.org>
9688
9689 * configure.in, NEWS:
9690 Bison 1.29 released.
9691
9692 1999-10-27 Jesse Thilo <jthilo@gnu.org>
9693
9694 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
9695 Added reference card.
9696
9697 1999-07-26 Jesse Thilo <jthilo@gnu.org>
9698
9699 * po/ru.po: Added Russian translation.
9700
9701 1999-07-26 Jesse Thilo <jthilo@gnu.org>
9702
9703 * configure.in: Added Russian translation.
9704
9705 1999-07-06 Jesse Thilo <jthilo@gnu.org>
9706
9707 * configure.in, NEWS, README:
9708 Released version 1.28.
9709
9710 1999-06-14 Jesse Thilo <jthilo@gnu.org>
9711
9712 * src/system.h:
9713 Squashed redefinition warning on some systems.
9714
9715 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
9716 Have configure build version string instead of relying on ANSI string
9717 concatentation.
9718
9719 1999-06-14 Jesse Thilo <jthilo@gnu.org>
9720
9721 * po/POTFILES.in: Got rid of version.c.
9722
9723 1999-06-14 Jesse Thilo <jthilo@gnu.org>
9724
9725 * acconfig.h, configure.in:
9726 Have configure build version string instead of relying on ANSI string
9727 concatentation.
9728
9729 1999-06-08 Jesse Thilo <jthilo@gnu.org>
9730
9731 * doc/bison.1:
9732 Dropped mention of `+' for long-named options.
9733
9734 1999-05-30 Jesse Thilo <jthilo@gnu.org>
9735
9736 * src/files.c: Added <unistd.h> for unlink().
9737
9738 * src/Makefile.am, src/system.h:
9739 I18n fixes.
9740
9741 1999-05-30 Jesse Thilo <jthilo@gnu.org>
9742
9743 * README: Added a FAQ list.
9744
9745 * configure.in, acconfig.h:
9746 I18n fixes.
9747
9748 1999-05-30 Jesse Thilo <jthilo@gnu.org>
9749
9750 * doc/FAQ, doc/Makefile.am:
9751 Added a FAQ list.
9752
9753 1999-05-19 Jesse Thilo <jthilo@gnu.org>
9754
9755 * src/alloc.h, src/symtab.h, src/version.c:
9756 Protected inclusion of "config.h" with HAVE_CONFIG_H.
9757
9758 1999-04-18 Jesse Thilo <jthilo@gnu.org>
9759
9760 * src/.cvsignore, src/Makefile.am:
9761 Reorganized: sources in `src', documentation in `doc'.
9762
9763 * src/lex.c (literalchar):
9764 fixed the code for escaping double quotes (thanks
9765 Jonathan Czisny.)
9766
9767 1999-04-18 Jesse Thilo <jthilo@gnu.org>
9768
9769 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
9770 Adjusted paths to reflect directory reorganization.
9771
9772 1999-04-18 Jesse Thilo <jthilo@gnu.org>
9773
9774 * doc/.cvsignore, doc/Makefile.am:
9775 Reorganized: sources in `src', documentation in `doc'.
9776
9777 1999-04-18 Jesse Thilo <jthilo@gnu.org>
9778
9779 * configure.in:
9780 Updated AC_INIT file to reflect directory reorganization.
9781
9782 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
9783 Reorganized: sources in `src', documentation in `doc'.
9784
9785 1999-04-13 Jesse Thilo <jthilo@gnu.org>
9786
9787 * src/allocate.c:
9788 Don't declare calloc() and realloc() if not necessary.
9789
9790 1999-04-13 Jesse Thilo <jthilo@gnu.org>
9791
9792 * configure.in, acconfig.h, acinclude.m4:
9793 Don't declare calloc() and realloc() if not necessary.
9794
9795 1999-03-23 Jesse Thilo <jthilo@gnu.org>
9796
9797 * po/.cvsignore: Added i18n support.
9798
9799 1999-03-23 Jesse Thilo <jthilo@gnu.org>
9800
9801 * acconfig.h, configure.in, Makefile.am:
9802 Added i18n support.
9803
9804 1999-03-22 Jesse Thilo <jthilo@gnu.org>
9805
9806 * src/bison.s1: Fixed #line numbers.
9807
9808 1999-03-15 Jesse Thilo <jthilo@gnu.org>
9809
9810 * po/es.po, po/fr.po, po/nl.po, po/de.po:
9811 Added PO files from Translation Project.
9812
9813 1999-03-03 Jesse Thilo <jthilo@gnu.org>
9814
9815 * Makefile.am:
9816 Added support for non-ANSI compilers (ansi2knr).
9817
9818 1999-02-16 Jesse Thilo <jthilo@gnu.org>
9819
9820 * configure.in: Bumped version number to 1.27.
9821
9822 * Makefile.am:
9823 Added `bison.simple' to list of files removed by `make distclean'.
9824
9825 1999-02-12 Jesse Thilo <jthilo@gnu.org>
9826
9827 * src/files.c, src/files.h:
9828 Defined locations of parser files in config.h instead of Makefile.
9829
9830 1999-02-12 Jesse Thilo <jthilo@gnu.org>
9831
9832 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
9833 Defined locations of parser files in config.h instead of Makefile.
9834
9835 1999-02-09 Jesse Thilo <jthilo@gnu.org>
9836
9837 * Makefile.am:
9838 Removed inappropriate use of $< macro.
9839
9840 1999-02-05 Jesse Thilo <jthilo@gnu.org>
9841
9842 * po/Makefile.in.in, po/POTFILES.in:
9843 Add `po' directory skeleton.
9844
9845 1999-01-27 Jesse Thilo <jthilo@gnu.org>
9846
9847 * README: Document help-bison list.
9848
9849 * configure.in: Add check for mkstemp().
9850
9851 1999-01-20 Jesse Thilo <jthilo@gnu.org>
9852
9853 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
9854 Hush a few compiler warnings.
9855
9856 * src/files.c:
9857 Add tryclose(), which verifies that fclose was successful.
9858 Hush a couple of compiler warnings.
9859
9860 1999-01-20 Jesse Thilo <jthilo@gnu.org>
9861
9862 * Makefile.am, OChangeLog:
9863 ChangeLog is now automatically generated. Include the old version as
9864 OChangeLog.
9865
9866 1999-01-14 Jesse Thilo <jthilo@gnu.org>
9867
9868 * 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:
9869 Update FSF address.
9870
9871 1999-01-14 Jesse Thilo <jthilo@gnu.org>
9872
9873 * doc/bison.texinfo: Fix formatting glitch.
9874
9875 * doc/bison.texinfo: Update FSF address.
9876
9877 1999-01-14 Jesse Thilo <jthilo@gnu.org>
9878
9879 * acconfig.h: Update FSF address.
9880
9881 1999-01-08 Jesse Thilo <jthilo@gnu.org>
9882
9883 * src/system.h:
9884 Don't define PACKAGE here, since config.h defines it.
9885
9886 1998-12-30 Jesse Thilo <jthilo@gnu.org>
9887
9888 * src/reader.c: Update copyright date.
9889
9890 * src/main.c:
9891 Ditch sprintf to statically-sized buffers in fatal/warn functions in
9892 favor of output directly to stderr (avoids buffer overruns).
9893
9894 * src/reader.c: Some checks for premature EOF.
9895
9896 * 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:
9897 Use prototypes if the compiler understands them.
9898
9899 * src/files.c: Honor TMPDIR on Unix hosts.
9900 Use prototypes if the compiler understands them.
9901
9902 * src/reader.c:
9903 Fix a couple of buffer overrun bugs.
9904 Use prototypes if the compiler understands them.
9905
9906 * src/system.h: Include unistd.h and ctype.h.
9907 Use #ifdef instead of #if for NLS symbols.
9908
9909 1998-12-30 Jesse Thilo <jthilo@gnu.org>
9910
9911 * doc/bison.texinfo:
9912 Delete comment "consider using @set for edition number, etc..." since
9913 we now are doing so.
9914
9915 1998-12-30 Jesse Thilo <jthilo@gnu.org>
9916
9917 * configure.in:
9918 Use prototypes if the compiler understands them.
9919
9920 * NEWS: Document 1.26 highlights.
9921
9922 * Makefile.am: Require Automake 1.3 or later.
9923
9924 * acconfig.h:
9925 Use prototypes if the compiler understands them.
9926
9927 1998-12-29 Jesse Thilo <jthilo@gnu.org>
9928
9929 * src/version.c:
9930 Use VERSION symbol from automake for version number.
9931
9932 1998-12-29 Jesse Thilo <jthilo@gnu.org>
9933
9934 * acconfig.h, configure.in, version.cin:
9935 Use VERSION symbol from automake for version number.
9936
9937 1998-11-28 Jesse Thilo <jthilo@gnu.org>
9938
9939 * Makefile.am:
9940 Distribute original version of simple parser (bison.s1), not built
9941 version (bison.simple).
9942
9943 1998-11-28 Jesse Thilo <jthilo@gnu.org>
9944
9945 * doc/bison.texinfo: Add info dir entry.
9946
9947 * doc/bison.texinfo:
9948 Let automake put version number into documentation.
9949
9950 1998-11-26 Jesse Thilo <jthilo@gnu.org>
9951
9952 * src/bison.cld, src/build.com, src/vmshlp.mar:
9953 Add non-RCS files from /gd/gnu/bison.
9954
9955 1998-11-26 Jesse Thilo <jthilo@gnu.org>
9956
9957 * doc/bison.1:
9958 Document the BISON_HAIRY and BISON_SIMPLE variables.
9959
9960 1998-11-25 Jesse Thilo <jthilo@gnu.org>
9961
9962 * src/version.c: Build version.c automatically.
9963
9964 * src/reader.c:
9965 Fix token numbering (used to start at 258, not 257).
9966
9967 * src/system.h: Include config.h.
9968
9969 * src/getargs.c: Update bug report address.
9970
9971 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
9972 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
9973
9974 1998-11-25 Jesse Thilo <jthilo@gnu.org>
9975
9976 * Makefile.am:
9977 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
9978
9979 * configure.in, version.cin:
9980 Build version.c automatically.
9981
9982 * AUTHORS: Add AUTHORS file.
9983
9984 * README: Update bug report address.
9985
9986 * bison.simple:
9987 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
9988
9989 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
9990 Add automake stuff.
9991
9992 1998-11-25 Jesse Thilo <jthilo@gnu.org>
9993
9994 * doc/bison.texinfo: Clean up some formatting.
9995
9996 1998-05-05 Richard Stallman <rms@gnu.org>
9997
9998 * doc/bison.texinfo:
9999 Explain better why to make a pure parser.
10000
10001 1998-01-05 Richard Stallman <rms@gnu.org>
10002
10003 * src/files.c (openfiles):
10004 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
10005 find a temporary directory, if possible. Do not unlink files while
10006 they are open.
10007
10008 1997-08-25 Richard Stallman <rms@gnu.org>
10009
10010 * src/reader.c (stack_offset;):
10011 Change some warni to warns.
10012
10013 * src/lex.c (literalchar): Use warns, not warni.
10014
10015 1997-06-28 Richard Stallman <rms@gnu.org>
10016
10017 * src/bison.s1: Add a Bison version comment.
10018
10019 * src/main.c (fatal, warn, berror):
10020 Use program_name.
10021
10022 1997-06-28 Richard Stallman <rms@gnu.org>
10023
10024 * Makefile.in (bison_version): New variable.
10025 (dist): Use that variable.
10026 (bison.s1): Substitute the Bison version into bison.simple.
10027
10028 * bison.simple: Add a Bison version comment.
10029
10030 1997-06-18 Richard Stallman <rms@gnu.org>
10031
10032 * src/main.c (fatal, warn, berror):
10033 Make error messages standard.
10034 (toomany): Improve error message text.
10035
10036 * 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:
10037 new.h renamed to alloc.h.
10038
10039 1997-06-18 Richard Stallman <rms@gnu.org>
10040
10041 * Makefile.in: new.h renamed to alloc.h.
10042
10043 1997-05-24 Richard Stallman <rms@gnu.org>
10044
10045 * src/lex.c (literalchar):
10046 Fix the code for escaping \, " and '.
10047
10048 (lex): Avoid trouble when there are many chars
10049 to discard in a char literal with just several chars in it.
10050
10051 1997-05-17 Richard Stallman <rms@gnu.org>
10052
10053 * src/bison.s1:
10054 Use malloc, if using alloca is troublesome.
10055 (YYSTACK_USE_ALLOCA): New flag macro.
10056 Define it for some systems and compilers.
10057 (YYSTACK_ALLOC): New macro.
10058 (yyparse): Use YYSTACK_ALLOC to allocate stack.
10059 If it was malloc'd, free it.
10060
10061 1997-05-17 Richard Stallman <rms@gnu.org>
10062
10063 * bison.simple:
10064 Use malloc, if using alloca is troublesome.
10065 (YYSTACK_USE_ALLOCA): New flag macro.
10066 Define it for some systems and compilers.
10067 (YYSTACK_ALLOC): New macro.
10068 (yyparse): Use YYSTACK_ALLOC to allocate stack.
10069 If it was malloc'd, free it.
10070
10071 1997-04-23 Richard Stallman <rms@gnu.org>
10072
10073 * src/bison.s1:
10074 (alloca) [__hpux]: Always define as __builtin_alloca.
10075
10076 1997-04-23 Richard Stallman <rms@gnu.org>
10077
10078 * bison.simple:
10079 (alloca) [__hpux]: Always define as __builtin_alloca.
10080
10081 1997-04-22 Richard Stallman <rms@gnu.org>
10082
10083 * src/bison.s1:
10084 [__hpux]: Include alloca.h (right for HPUX 10)
10085 instead of declaring alloca (right for HPUX 9).
10086
10087 * src/bison.s1 (__yy_memcpy):
10088 Declare arg `count' as unsigned int.
10089 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
10090
10091 1997-04-22 Richard Stallman <rms@gnu.org>
10092
10093 * bison.simple:
10094 [__hpux]: Include alloca.h (right for HPUX 10)
10095 instead of declaring alloca (right for HPUX 9).
10096
10097 * bison.simple (__yy_memcpy):
10098 Declare arg `count' as unsigned int.
10099 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
10100
10101 1997-01-03 Richard Stallman <rms@gnu.org>
10102
10103 * src/allocate.c: [__STDC__ or _MSC_VER]:
10104 Declare calloc and realloc to return void *.
10105
10106 1997-01-02 Richard Stallman <rms@gnu.org>
10107
10108 * src/system.h:
10109 [_MSC_VER]: Include stdlib.h and process.h.
10110 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
10111
10112 * src/main.c (main): Return FAILURE as a value.
10113 (printable_version): Declare arg as int, not char.
10114
10115 1997-01-02 Richard Stallman <rms@gnu.org>
10116
10117 * Makefile.in (dist):
10118 Explicitly check for symlinks, and copy them.
10119
10120 1996-12-19 Richard Stallman <rms@gnu.org>
10121
10122 * src/files.c:
10123 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
10124
10125 1996-12-18 Paul Eggert <eggert@gnu.org>
10126
10127 * src/bison.s1 (yyparse):
10128 If __GNUC__ and YYPARSE_PARAM are both defined,
10129 declare yyparse to have a void * argument.
10130
10131 1996-12-18 Paul Eggert <eggert@gnu.org>
10132
10133 * bison.simple (yyparse):
10134 If __GNUC__ and YYPARSE_PARAM are both defined,
10135 declare yyparse to have a void * argument.
10136
10137 1996-12-17 Richard Stallman <rms@gnu.org>
10138
10139 * src/reduce.c (nbits): Add some casts.
10140
10141 1996-08-12 Richard Stallman <rms@gnu.org>
10142
10143 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
10144
10145 1996-08-12 Richard Stallman <rms@gnu.org>
10146
10147 * bison.simple: Test _MSDOS as well as _MSDOS_.
10148
10149 1996-07-31 Richard Stallman <rms@gnu.org>
10150
10151 * src/bison.s1:
10152 [__sun && __i386]: Include alloca.h.
10153
10154 1996-07-31 Richard Stallman <rms@gnu.org>
10155
10156 * bison.simple:
10157 [__sun && __i386]: Include alloca.h.
10158
10159 1996-07-30 Richard Stallman <rms@gnu.org>
10160
10161 * src/bison.s1: Comment change.
10162
10163 * src/bison.s1: Test _MSDOS_, not MSDOS.
10164
10165 1996-07-30 Richard Stallman <rms@gnu.org>
10166
10167 * bison.simple: Comment change.
10168
10169 * bison.simple: Test _MSDOS_, not MSDOS.
10170
10171 1996-06-01 Richard Stallman <rms@gnu.org>
10172
10173 * 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:
10174 Insert `_' macro around many string constants.
10175
10176 * src/main.c:
10177 Insert `_' macro around many string constants.
10178
10179 (main): Call setlocale, bindtextdomain and textdomain.
10180
10181 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
10182 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
10183 [ENABLE_NLS]: Include libintl.h.
10184 [ENABLE_NLS] (gettext): Define.
10185 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
10186 (N_, PACKAGE, LOCALEDIR): New macros.
10187
10188 1996-06-01 Richard Stallman <rms@gnu.org>
10189
10190 * POTFILES.in: New file.
10191
10192 * Makefile.in (allocate.o):
10193 Define target explicitly.
10194
10195 * Makefile.in (CFLAGS): Set to @CFLAGS@.
10196 (LDFLAGS): Set to @LDFLAGS@.
10197 (configure): Run autoconf only if preceding `cd' succeeds.
10198 (bison.s1): Redirect output to temporary file then move the
10199 temporary to the target, rather than redirecting directly to bison.s1.
10200 (clean): Remove config.status and config.log.
10201 (distclean): Don't remove config.status here.
10202
10203 1996-05-12 Richard Stallman <rms@gnu.org>
10204
10205 * src/bison.s1:
10206 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
10207
10208 1996-05-12 Richard Stallman <rms@gnu.org>
10209
10210 * bison.simple:
10211 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
10212
10213 1996-05-11 Richard Stallman <rms@gnu.org>
10214
10215 * src/bison.s1 (__yy_memcpy):
10216 Really reorder the args, as was supposedly done on Feb 14 1995.
10217 (yyparse): Calls changed accordingly.
10218
10219 1996-05-11 Richard Stallman <rms@gnu.org>
10220
10221 * Makefile.in (dist): Don't use $(srcdir).
10222
10223 * bison.simple (__yy_memcpy):
10224 Really reorder the args, as was supposedly done on Feb 14 1995.
10225 (yyparse): Calls changed accordingly.
10226
10227 1996-01-27 Richard Stallman <rms@gnu.org>
10228
10229 * src/output.c (output_rule_data):
10230 Test YYERROR_VERBOSE in the conditional
10231 around the definition of ttyname.
10232
10233 1995-12-29 Richard Stallman <rms@gnu.org>
10234
10235 * src/bison.s1:
10236 Fix line numbers in #line commands.
10237
10238 1995-12-29 Richard Stallman <rms@gnu.org>
10239
10240 * bison.simple:
10241 Fix line numbers in #line commands.
10242
10243 1995-12-27 Richard Stallman <rms@gnu.org>
10244
10245 * src/bison.s1 (YYPARSE_PARAM_DECL):
10246 In C++, make it always null.
10247 (YYPARSE_PARAM_ARG): New macro.
10248 (yyparse): Use YYPARSE_PARAM_ARG.
10249
10250 1995-12-27 Richard Stallman <rms@gnu.org>
10251
10252 * bison.simple (YYPARSE_PARAM_DECL):
10253 In C++, make it always null.
10254 (YYPARSE_PARAM_ARG): New macro.
10255 (yyparse): Use YYPARSE_PARAM_ARG.
10256
10257 1995-11-29 Richard Stallman <rms@gnu.org>
10258
10259 * doc/bison.texinfo:
10260 Describe literal string tokens, %raw, %no_lines, %token_table.
10261
10262 1995-11-29 Daniel Hagerty <hag@gnu.org>
10263
10264 * doc/bison.texinfo: Fixed update date
10265
10266 1995-10-16 Richard Stallman <rms@gnu.org>
10267
10268 * src/version.c: Version 1.25.
10269
10270 1995-10-16 Richard Stallman <rms@gnu.org>
10271
10272 * NEWS: *** empty log message ***
10273
10274 1995-10-16 Richard Stallman <rms@gnu.org>
10275
10276 * doc/bison.1, doc/bison.rnh:
10277 Add new options.
10278
10279 1995-10-15 Richard Stallman <rms@gnu.org>
10280
10281 * src/vmsgetargs.c, src/getargs.c:
10282 Added -n, -k, and -raw switches.
10283 (noparserflag, toknumflag, rawtoknumflag): New variables.
10284
10285 * src/symtab.h (SALIAS):
10286 New #define for adding aliases to %token.
10287 (struct bucket): Added `alias' field.
10288
10289 * src/reduce.c (reduce_grammar):
10290 Revise error message.
10291 (print_notices): Remove final `.' from error message.
10292
10293 * src/reader.c (reader_output_yylsp):
10294 New function.
10295 (readgram): Use `#if 0' around code that accepted %command
10296 inside grammar rules: The documentation doesn't allow it,
10297 and it will fail since the %command processors scan for the next %.
10298 (parse_token_decl): Extended the %token
10299 declaration to allow a multi-character symbol as an alias.
10300 (parse_thong_decl): New function.
10301 (read_declarations): Added %thong declarations.
10302 (read_declarations): Handle NOOP to deal with allowing
10303 % declarations as another means to specify the flags.
10304 (readgram): Allow %prec prior to semantics embedded in a rule.
10305 (skip_to_char, read_declarations, copy_definition)
10306 (parse_token_decl, parse_start_decl, parse_type_decl)
10307 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
10308 (get_type_name, copy_guard, copy_action, readgram)
10309 (get_type, packsymbols): Revised most error messages.
10310 Changed `fatal' to `warnxxx' to avoid aborting for error.
10311 Revised and use multiple warnxxx functions to avoid using VARARGS1.
10312 (read_declarations): Improve the error message for
10313 an invalid character. Do not abort.
10314 (read_declarations, copy_guard, copy_action): Use
10315 printable_version to avoid unprintable characters in printed output.
10316 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
10317 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
10318 Allow the type of a non-terminal can be given
10319 more than once, as long as all specifications give the same type.
10320
10321 * src/output.c:
10322 (output_headers, output_trailers, output, output_gram)
10323 (output_rule_data): Implement noparserflag variable.
10324 Implement toknumflag variable.
10325 (output): Call reader_output_yylsp to output LTYPESTR.
10326
10327 * src/main.c (main):
10328 If reader sees an error, don't process the grammar.
10329 (fatals): Updated to not use VARARGS1.
10330 (printable_version, int_to_string, warn, warni, warns, warnss)
10331 (warnsss): New error reporting functions. Avoid abort for error.
10332
10333 * src/lex.h:
10334 Added THONG and NOOP for alias processing.
10335 Added SETOPT for the new code that allows setting options with %flags.
10336
10337 * src/lex.c:
10338 Include getopt.h. Add some extern decls.
10339 (safegetc): New function to deal with EOF gracefully.
10340 (literalchar); new function to deal with reading \ escapes.
10341 (lex): Use literalchar.
10342 (lex): Implemented "..." tokens.
10343 (literalchar, lex, parse_percent_token): Made tokenbuffer
10344 always contain the token. This includes growing the token
10345 buffer while reading an integer.
10346 (parse_percent_token): Replaced if-else statement with percent_table.
10347 (parse_percent_token): Added % declarations as another
10348 way to specify the flags -n, -l, and -r. Also added hooks for
10349 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
10350 major changes to files.c.
10351 (lex) Retain in the incoming stream a character following
10352 an incorrect '/'.
10353 (skip_white_space, lex): Revised most error messages
10354 and changed fatal to warn to avoid aborting.
10355 (percent_table): Added %thong declarations.
10356
10357 * src/gram.h: Comment changes.
10358
10359 * src/files.c (openfiles, open_extra_files, done):
10360 Add faction flag
10361 and actfile file. Handle noparserflag. Both for -n switch.
10362
10363 * src/conflicts.c (resolve_sr_conflict):
10364 Remove use of alloca.
10365
10366 1995-06-01 Jim Meyering <meyering@gnu.org>
10367
10368 * doc/bison.texinfo: *** empty log message ***
10369
10370 1995-05-06 Richard Stallman <rms@gnu.org>
10371
10372 * src/bison.s1: Comment change.
10373
10374 1995-05-06 Richard Stallman <rms@gnu.org>
10375
10376 * bison.simple: Comment change.
10377
10378 1995-05-03 Richard Stallman <rms@gnu.org>
10379
10380 * src/version.c: Version now 1.24.
10381
10382 * src/bison.s1: Change distribution terms.
10383
10384 * src/version.c: Version now 1.23.
10385
10386 1995-05-03 Richard Stallman <rms@gnu.org>
10387
10388 * doc/bison.texinfo:
10389 Rewrite "Conditions for Using Bison".
10390 Update version to 1.24.
10391
10392 1995-05-03 Richard Stallman <rms@gnu.org>
10393
10394 * bison.simple: Change distribution terms.
10395
10396 1995-02-23 Richard Stallman <rms@gnu.org>
10397
10398 * src/files.c: Test __VMS_POSIX as well as VMS.
10399
10400 1995-02-14 Jim Meyering <meyering@gnu.org>
10401
10402 * src/bison.s1 (__yy_memcpy):
10403 Renamed from __yy_bcopy to avoid
10404 confusion. Reverse FROM and TO arguments to be consistent with
10405 those of memcpy.
10406
10407 1995-02-14 Jim Meyering <meyering@gnu.org>
10408
10409 * bison.simple (__yy_memcpy):
10410 Renamed from __yy_bcopy to avoid
10411 confusion. Reverse FROM and TO arguments to be consistent with
10412 those of memcpy.
10413
10414 1994-11-10 David J. MacKenzie <djm@gnu.org>
10415
10416 * NEWS: reformat
10417
10418 * NEWS: New file.
10419
10420 * Makefile.in (DISTFILES): Include NEWS.
10421
10422 * Makefile.in (DISTFILES):
10423 Include install-sh, not install.sh.
10424
10425 * configure.in: Update to Autoconf v2 macro names.
10426
10427 1994-10-05 David J. MacKenzie <djm@gnu.org>
10428
10429 * Makefile.in: fix typo
10430
10431 * Makefile.in (prefix, exec_prefix):
10432 Let configure set them.
10433
10434 1994-09-28 David J. MacKenzie <djm@gnu.org>
10435
10436 * Makefile.in: Set datadir to $(prefix)/share.
10437
10438 1994-09-15 Richard Stallman <rms@gnu.org>
10439
10440 * src/bison.s1:
10441 Update copyright notice and GPL version.
10442
10443 1994-09-15 Richard Stallman <rms@gnu.org>
10444
10445 * bison.simple:
10446 Update copyright notice and GPL version.
10447
10448 1994-07-12 Richard Stallman <rms@gnu.org>
10449
10450 * src/reduce.c, src/reader.c:
10451 entered into RCS
10452
10453 1994-05-05 David J. MacKenzie <djm@gnu.org>
10454
10455 * Makefile.in: entered into RCS
10456
10457 1994-03-26 Richard Stallman <rms@gnu.org>
10458
10459 * src/bison.s1: entered into RCS
10460
10461 1994-03-26 Richard Stallman <rms@gnu.org>
10462
10463 * bison.simple: entered into RCS
10464
10465 1994-03-25 Richard Stallman <rms@gnu.org>
10466
10467 * src/main.c: entered into RCS
10468
10469 1994-03-24 Richard Stallman <rms@gnu.org>
10470
10471 * src/conflicts.c: entered into RCS
10472
10473 1994-01-02 Richard Stallman <rms@gnu.org>
10474
10475 * Makefile.in: *** empty log message ***
10476
10477 1993-11-21 Richard Stallman <rms@gnu.org>
10478
10479 * src/bison.s1: *** empty log message ***
10480
10481 1993-11-21 Richard Stallman <rms@gnu.org>
10482
10483 * doc/bison.texinfo: entered into RCS
10484
10485 * doc/bison.texinfo: *** empty log message ***
10486
10487 1993-11-21 Richard Stallman <rms@gnu.org>
10488
10489 * bison.simple: *** empty log message ***
10490
10491 1993-10-25 David J. MacKenzie <djm@gnu.org>
10492
10493 * doc/bison.texinfo: *** empty log message ***
10494
10495 1993-10-19 Richard Stallman <rms@gnu.org>
10496
10497 * src/bison.s1: *** empty log message ***
10498
10499 1993-10-19 Richard Stallman <rms@gnu.org>
10500
10501 * bison.simple: *** empty log message ***
10502
10503 1993-10-14 Richard Stallman <rms@gnu.org>
10504
10505 * src/bison.s1: *** empty log message ***
10506
10507 1993-10-14 Richard Stallman <rms@gnu.org>
10508
10509 * bison.simple: *** empty log message ***
10510
10511 1993-09-14 David J. MacKenzie <djm@gnu.org>
10512
10513 * doc/bison.texinfo: *** empty log message ***
10514
10515 1993-09-13 Noah Friedman <friedman@gnu.org>
10516
10517 * Makefile.in: *** empty log message ***
10518
10519 1993-09-10 Richard Stallman <rms@gnu.org>
10520
10521 * src/conflicts.c: *** empty log message ***
10522
10523 * src/system.h: entered into RCS
10524
10525 1993-09-10 Richard Stallman <rms@gnu.org>
10526
10527 * doc/bison.1: entered into RCS
10528
10529 1993-09-06 Noah Friedman <friedman@gnu.org>
10530
10531 * src/version.c: entered into RCS
10532
10533 1993-09-06 Noah Friedman <friedman@gnu.org>
10534
10535 * Makefile.in: *** empty log message ***
10536
10537 1993-07-30 David J. MacKenzie <djm@gnu.org>
10538
10539 * Makefile.in: *** empty log message ***
10540
10541 1993-07-24 Richard Stallman <rms@gnu.org>
10542
10543 * src/bison.s1: *** empty log message ***
10544
10545 1993-07-24 Richard Stallman <rms@gnu.org>
10546
10547 * bison.simple: *** empty log message ***
10548
10549 1993-07-08 David J. MacKenzie <djm@gnu.org>
10550
10551 * Makefile.in: *** empty log message ***
10552
10553 1993-07-04 Richard Stallman <rms@gnu.org>
10554
10555 * src/bison.s1: *** empty log message ***
10556
10557 1993-07-04 Richard Stallman <rms@gnu.org>
10558
10559 * bison.simple: *** empty log message ***
10560
10561 1993-06-26 David J. MacKenzie <djm@gnu.org>
10562
10563 * src/getargs.c: entered into RCS
10564
10565 1993-06-26 David J. MacKenzie <djm@gnu.org>
10566
10567 * doc/bison.texinfo: *** empty log message ***
10568
10569 * doc/bison.1: New file.
10570
10571 1993-06-25 Richard Stallman <rms@gnu.org>
10572
10573 * src/getargs.c: New file.
10574
10575 1993-06-16 Richard Stallman <rms@gnu.org>
10576
10577 * src/bison.s1: *** empty log message ***
10578
10579 1993-06-16 Richard Stallman <rms@gnu.org>
10580
10581 * bison.simple: *** empty log message ***
10582
10583 1993-06-03 Richard Stallman <rms@gnu.org>
10584
10585 * src/bison.s1: New file.
10586
10587 1993-06-03 Richard Stallman <rms@gnu.org>
10588
10589 * doc/bison.texinfo: *** empty log message ***
10590
10591 1993-06-03 Richard Stallman <rms@gnu.org>
10592
10593 * bison.simple: New file.
10594
10595 1993-05-19 Richard Stallman <rms@gnu.org>
10596
10597 * doc/bison.texinfo: New file.
10598
10599 1993-05-07 Noah Friedman <friedman@gnu.org>
10600
10601 * Makefile.in: *** empty log message ***
10602
10603 1993-04-28 Noah Friedman <friedman@gnu.org>
10604
10605 * src/reader.c: *** empty log message ***
10606
10607 1993-04-23 Noah Friedman <friedman@gnu.org>
10608
10609 * src/alloc.h: entered into RCS
10610
10611 1993-04-20 David J. MacKenzie <djm@gnu.org>
10612
10613 * src/version.c: *** empty log message ***
10614
10615 * src/files.c, src/allocate.c:
10616 entered into RCS
10617
10618 * src/reader.c: *** empty log message ***
10619
10620 * src/lex.c: entered into RCS
10621
10622 * src/conflicts.c: New file.
10623
10624 * src/symtab.c: entered into RCS
10625
10626 * src/alloc.h: New file.
10627
10628 * src/LR0.c: entered into RCS
10629
10630 1993-04-18 Noah Friedman <friedman@gnu.org>
10631
10632 * src/reader.c: New file.
10633
10634 * src/version.c: *** empty log message ***
10635
10636 1993-04-18 Noah Friedman <friedman@gnu.org>
10637
10638 * Makefile.in: *** empty log message ***
10639
10640 1993-04-17 Noah Friedman <friedman@gnu.org>
10641
10642 * Makefile.in: *** empty log message ***
10643
10644 1993-04-15 Richard Stallman <rms@gnu.org>
10645
10646 * src/main.c, src/files.c:
10647 New file.
10648
10649 1993-04-15 Noah Friedman <friedman@gnu.org>
10650
10651 * configure.in: entered into RCS
10652
10653 * configure.in: *** empty log message ***
10654
10655 * configure.in: New file.
10656
10657 1993-04-14 Richard Stallman <rms@gnu.org>
10658
10659 * Makefile.in: New file.
10660
10661 1993-04-13 Richard Stallman <rms@gnu.org>
10662
10663 * src/version.c: New file.
10664
10665 1993-03-25 Richard Stallman <rms@gnu.org>
10666
10667 * src/output.c: entered into RCS
10668
10669 1992-09-25 Richard Stallman <rms@gnu.org>
10670
10671 * configure.bat: entered into RCS
10672
10673 1992-06-22 Richard Stallman <rms@gnu.org>
10674
10675 * src/vmsgetargs.c: entered into RCS
10676
10677 1992-06-22 Richard Stallman <rms@gnu.org>
10678
10679 * doc/bison.rnh: entered into RCS
10680
10681 1992-04-20 David J. MacKenzie <djm@gnu.org>
10682
10683 * README: entered into RCS
10684
10685 1992-01-22 Richard Stallman <rms@gnu.org>
10686
10687 * src/machine.h: entered into RCS
10688
10689 1991-12-21 Richard Stallman <rms@gnu.org>
10690
10691 * src/lalr.c, src/closure.c:
10692 entered into RCS
10693
10694 1991-12-20 Richard Stallman <rms@gnu.org>
10695
10696 * src/state.h: entered into RCS
10697
10698 1991-12-18 Richard Stallman <rms@gnu.org>
10699
10700 * src/print.c, src/nullable.c, src/derives.c:
10701 entered into RCS
10702
10703 1991-11-03 David J. MacKenzie <djm@gnu.org>
10704
10705 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
10706 entered into RCS
10707
10708 1988-09-09 Richard Stallman <rms@gnu.org>
10709
10710 * src/bison.hairy: entered into RCS
10711
10712 1987-12-16 Richard Stallman <rms@gnu.org>
10713
10714 * REFERENCES: entered into RCS
10715
10716 -----
10717
10718 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
10719 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
10720
10721 This file is part of Bison, the GNU Compiler Compiler.
10722
10723 Bison is free software; you can redistribute it and/or modify
10724 it under the terms of the GNU General Public License as published by
10725 the Free Software Foundation; either version 2, or (at your option)
10726 any later version.
10727
10728 Bison is distributed in the hope that it will be useful,
10729 but WITHOUT ANY WARRANTY; without even the implied warranty of
10730 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10731 GNU General Public License for more details.
10732
10733 You should have received a copy of the GNU General Public License
10734 along with Bison; see the file COPYING. If not, write to
10735 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
10736 Boston, MA 02111-1307, USA.