]> git.saurik.com Git - bison.git/blob - ChangeLog
* src/output.c (symbol_printers_output): Fix typo that led
[bison.git] / ChangeLog
1 2003-01-17 Paul Eggert <eggert@twinsun.com>
2
3 * src/output.c (symbol_printers_output): Fix typo that led
4 to core dump. Problem reported by Antonio Rus in
5 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
6
7 2003-01-13 Akim Demaille <akim@epita.fr>,
8 Quoc Peyrot <chojin@lrde.epita.fr>,
9 Robert Anisko <anisko_r@lrde.epita.fr>
10
11 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
12 when the stacks contain one element, as the loop would otherwise
13 free the last state, and then use the top state (the one we just
14 popped). This means that the initial elements will not be freed
15 explicitly, as is the case in yacc.c; it is not a problem, as
16 these elements have fake values.
17
18 2003-01-11 Paul Eggert <eggert@twinsun.com>
19
20 * NEWS: %expect-violations are now just warnings, reverting
21 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
22 bootstrapping problem reported by Matthias Klose; see
23 <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
24 * src/conflicts.c (conflicts_print): Likewise.
25 * tests/conflicts.at (%expect not enough, %expect too much,
26 %expect with reduce conflicts): Likewise.
27 * doc/bison.texinfo (Expect Decl): Document this. Also mention
28 that the warning is enabled if the number of conflicts changes
29 (not necessarily increases).
30
31 * src/getargs.c (version): Update copyright year.
32
33 2003-01-09 Akim Demaille <akim@epita.fr>
34
35 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
36
37 2003-01-08 Paul Eggert <eggert@twinsun.com>
38
39 * Makefile.maint (WGETFLAGS):
40 New macro, containing "-C off" to disable proxy caches.
41 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
42 (rel-check): Use $(WGET) instead of wget.
43
44 2003-01-06 Paul Eggert <eggert@twinsun.com>
45
46 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
47 the GLR paper of Scott, Johnstone and Hussain.
48
49 2003-01-04 Paul Eggert <eggert@twinsun.com>
50
51 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
52 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
53 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
54 (EXTRA_LIBRARIES): New var, for liby.a.
55 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
56 (EXTRA_SCRIPTS): New var, for yacc.
57
58 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
59 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
60 Problem reported by Nelson H. F. Beebe.
61
62 2003-01-03 Paul Eggert <eggert@twinsun.com>
63
64 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
65 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
66 when compiling Bison 1.875's `bitset bset = obstack_alloc
67 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
68
69 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
70 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
71 grow to a huge size with typical invocation.
72
73 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
74 Use the pattern recommended by Autoconf 2.57, except also protect
75 against double-definition.
76 * src/system.h: Likewise.
77 Portability issues reported by Nelson H. F. Beebe.
78
79 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
80 All uses changed. Provide a definition in both C and C++.
81 (yytrue, yyfalse): Define even if defined (__cplusplus).
82
83 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
84 Reported by Nelson H. F. Beebe.
85
86 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
87
88 2003-01-02 Paul Eggert <eggert@twinsun.com>
89
90 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
91 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
92 Bug reported by Nelson H. F. Beebe.
93
94 2003-01-01 Paul Eggert <eggert@twinsun.com>
95
96 * Version 1.875.
97
98 2002-12-30 Paul Eggert <eggert@twinsun.com>
99
100 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
101 Moved here from...
102 (<INITIAL>","): Here. This causes stray "," to be treated
103 more uniformly.
104
105 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
106 last brace in braced code when not in Yacc mode, for compatibility
107 with Bison 1.35. This resurrects the 2001-12-15 patch to
108 src/reader.c.
109
110 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
111 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
112
113 2002-12-28 Paul Eggert <eggert@twinsun.com>
114
115 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
116 that of SYM's type. This fixes Debian bug 168069, reported by
117 Thomas Olsson.
118
119 2002-12-28 Paul Eggert <eggert@twinsun.com>
120
121 Version 1.75f.
122
123 Switch back to the Yacc style of conflict reports, undoing some
124 of the 2002-07-30 change.
125 * doc/bison.texinfo (Understanding): Use Yacc style for
126 conflict reports. Also, use new way of locating rules.
127 * src/conflicts.c (conflict_report):
128 Renamed from conflict_report_yacc, removing the old
129 'conflict_report'. Translate the entire conflict report at once,
130 so that we don't assume that "," has the same interpretation in
131 all languages.
132 (conflicts_output): Use Yacc-style conflict report for each state,
133 instead of our more-complicated style.
134 (conflicts_print): Use Yacc-style conflict report, except print
135 the input file name when not emulating Yacc.
136 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
137 Conflicted Reduction, %expect not enough, %expect too much,
138 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
139 * tests/existing.at (GNU Cim Grammar): Likewise.
140 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
141
142 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
143 fatal): Don't invoke fflush; it's not needed and it might even be
144 harmful for stdout, as stdout might not be open.
145 * src/reduce.c (reduce_print): Likewise.
146
147 2002-12-27 Paul Eggert <eggert@twinsun.com>
148
149 Fix a bug where error locations were not being recorded correctly.
150 This problem was originally reported by Paul Hilfinger in
151 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
152
153 * data/yacc.c (yyparse): New local var yylerrsp, to record the
154 top of the location stack's error locations.
155 (yyerrlab): Set it. When discarding a token, push its location
156 onto yylerrsp so that we don't lose track of the error's end.
157 (yyerrlab1): Now is only the target of YYERROR, so that we can
158 properly record the location of the action that failed. For GCC
159 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
160 GCC warning about yyerrlab1 being unused if YYERROR is unused.
161 (yyerrlab2): New label, which yyerrlab now falls through to.
162 Compute the error's location by applying YYLLOC_DEFAULT to
163 the locations of all the symbols that went into the error.
164 * doc/bison.texinfo (Location Default Action): Mention that
165 YYLLOC_DEFAULT is also invoked for syntax errors.
166 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
167 Error locations include the locations of all the tokens that were
168 discarded, not just the last token.
169
170 2002-12-26 Paul Eggert <eggert@twinsun.com>
171
172 * src/files.c: Include quote.h.
173 (compute_output_file_names): Warn if we detect conflicting
174 outputs to the same file. This should catch the misunderstanding
175 exemplified by Debian Bug 165349, reported by Bruce Stephens..
176
177 * src/conflicts.c (conflicts_print): If the user specifies
178 "%expect N", report an error if there are any reduce/reduce
179 conflicts. This is what the manual says should happen.
180 This fixes Debian bug 130890, reported by Anthony DeRobertis.
181 * tests/conflicts.at (%expect with reduce conflicts): New test.
182
183 Don't use m4_include on relative file names, as it doesn't work as
184 desired if there happens to be a file with that name under ".".
185
186 * m4sugar/version.m4: Remove; it was included but it wasn't used.
187 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
188 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
189 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
190 * src/output.c (output_skeleton): Use full path names when
191 specifying a file to include; don't rely on include path, as
192 it's unreliable when the working file contains a file with
193 that name.
194
195 2002-12-25 Paul Eggert <eggert@twinsun.com>
196
197 Remove obsolete references to bison.simple and bison.hairy.
198 Problem mentioned by Aubin Mahe in
199 <http://mail.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
200 * data/glr.c: Comment fix.
201 * doc/bison.1: Remove references. Also, mention "yacc".
202
203 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
204 with -g option.
205
206 * src/parse-gram.y (declaration): Use enum "report_states" rather
207 than its numeric value 1.
208
209 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
210 opening a new one. This fixes Debian bug 165349, reported by
211 Bruce Stephens.
212
213 2002-12-24 Paul Eggert <eggert@twinsun.com>
214
215 Version 1.75e.
216
217 * Makefile.maint (cvs-update): Don't assume that the shell
218 supports $(...), as Solaris sh doesn't.
219
220 * src/parse-gram.y (lloc_default): Remove test for empty
221 nonterminals at the end, since it didn't change the result.
222
223 2002-12-24 Paul Eggert <eggert@twinsun.com>
224
225 If the user does not define YYSTYPE as a macro, Bison now declares it
226 using typedef instead of defining it as a macro. POSIX requires this.
227 For consistency, YYLTYPE is also declared instead of defined.
228
229 %union directives can now have a tag before the `{', e.g., the
230 directive `%union foo {...}' now generates the C code
231 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
232 The default union tag is `YYSTYPE', for compatibility with Solaris 9
233 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
234 instead of `yyltype'.
235
236 `yystype' and `yyltype' are now obsolescent macros instead of being
237 typedefs or tags; they are no longer documented and will be
238 withdrawn in a future release.
239
240 * data/glr.c (b4_location_type): Remove.
241 (YYSTYPE): Renamed from yystype.
242 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
243 (struct YYLTYPE): Renamed from struct yyltype.
244 (YYLTYPE): Renamed from yyltype.
245 (yyltype, yystype): New (and obsolescent) macros,
246 for backward compatibility.
247 * data/yacc.c: Likewise.
248
249 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
250 does not specify a union tag. This is for compatibility with
251 Solaris 9 yacc.
252
253 * src/parse-gram.y (add_param): 2nd arg is now char * not char
254 const *, since it is now modified by stripping surrounding { }.
255 (current_braced_code): Remove.
256 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
257 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
258 trailing " {...}". Now of type <chars>.
259 (grammar_declaration): Adjust to bundled tokens.
260 (code_content): Remove; stripping is now done by add_param.
261 (print_token_value): Print contents of bundled tokens.
262 (token_name): New function.
263
264 * src/reader.h (braced_code, current_braced_code): Remove.
265 (token_name): New decl.
266
267 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
268 token_type, not braced_code code_kind. All uses changed.
269 (SC_PRE_CODE): New state, for scanning after a keyword that
270 has (or usually has) an immediately-following braced code.
271 (token_type): New local var, to keep track of which token type
272 to return when scanning braced code.
273 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
274 <INITIAL>"%parse-param", <INITIAL>"%printer",
275 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
276 instead of returning a token type immediately.
277 (<INITIAL>"{"): Set token type.
278 (<SC_BRACED_CODE>"}"): Use it.
279 (handle_action_dollar, handle_action_at): Now returns bool
280 indicating success. Fail if ! current_rule; this prevents a core dump.
281 (handle_symbol_code_dollar, handle_symbol_code_at):
282 Remove; merge body into caller.
283 (handle_dollar, handle_at): Complain in invalid contexts.
284
285 * NEWS, doc/bison.texinfo: Document the above.
286 * NEWS: Fix years and program names in copyright notice.
287
288 2002-12-17 Paul Eggert <eggert@twinsun.com>
289
290 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
291 Reporting, Table of Symbols): Omit mentions of %lex-param and
292 %parse-param from the documentation for now.
293
294 2002-12-15 Paul Eggert <eggert@twinsun.com>
295
296 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
297 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
298 lookahead symbol, and which sets yychar in parser actions) and it
299 disagreed with the Bison documentation. Bug
300 reported by Andrew Walrond.
301
302 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
303 as the caller now does that.
304 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
305 (YYEMPTY): Parenthesize right hand side, since others use it.
306 (yyparse): Don't assume that our generated code is the only code
307 that sets yychar.
308
309 2002-12-13 Paul Eggert <eggert@twinsun.com>
310
311 Version 1.75d.
312
313 POSIX requires a "yacc" command.
314 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
315 (MOSTLYCLEANFILES): Add yacc.
316 (yacc): New rule.
317 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
318 as an alias for bison y.
319
320 * po/LINGUAS: Add da.
321
322 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
323 problem with latest <getopt.h>.
324 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
325
326 * doc/fdl.texi: Upgrade to 1.2.
327 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
328 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
329 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
330 gnulib.
331 * config/install-sh: Sync with autotools.
332
333 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
334 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
335 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
336 locations are requested.
337 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
338 locations are requested.
339
340 2002-12-12 Paul Eggert <eggert@twinsun.com>
341
342 Remove unportable casts and storage allocation tricks.
343 While we're at it, remove almost all casts, since they
344 usually aren't needed and are a sign of trouble.
345
346 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
347
348 * src/derives.c (derives_compute): Do not subtract NTOKENS from
349 the pointer DSET returned by malloc; this isn't portable.
350 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
351 Similarly for DERIVES.
352 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
353 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
354 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
355
356 * src/derives.c (derives_compute): Do not bother invoking
357 int_of_rule_number, since rule numbers are integers.
358
359 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
360 rather than XMALLOC (char, N).
361
362 * src/files.c (filename_split): Rewrite to avoid cast.
363
364 * src/gram.h (symbol_number_as_item_number,
365 item_number_as_symbol_number, rule_number_as_item_number,
366 item_number_as_rule_number):
367 Now inline functions rather than macros, to avoid casts.
368 * src/state.h (state_number_as_int): Likewise.
369 * src/tables.c (state_number_to_vector_number,
370 symbol_number_to_vector_number): Likewise.
371
372 * src/gram.h (int_of_rule_number): Remove; no longer used.
373
374 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
375 since the resulting storage is always stored into.
376
377 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
378 where it's needed.
379
380 * src/muscle_tab.c (muscle_m4_output):
381 Now inline. Return bool, not int.
382 * src/state.c (state_compare): Likewise.
383 * src/symtab.c (symbol_check_defined,
384 symbol_check_alias_consistency, symbol_pack, symbol_translation,
385 hash_compare_symbol, hash_symbol):
386 Likewise.
387 * src/uniqstr.c (uniqstr_print): Likewise.
388 * src/muscle_tab.c (muscle_m4_output_processor):
389 New function, to avoid casts.
390 * src/state.c (state_comparator, stage_hasher): Likewise.
391 * src/symtab.c (symbol_check_defined_processor,
392 symbol_check_alias_consistency_processor, symbol_pack_processor,
393 symbol_translation_processor, hash_symbol_comparator,
394 hash_symbol_hasher): Likewise.
395 * src/uniqstr.c (uniqstr_print_processor): Likewise.
396 * src/muscle_tab.c (muscles_m4_output):
397 Use new functions instead of casting old functions unportably.
398 * src/state.c (state_hash_new): Likewise.
399 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
400 symbols_token_translations_init):
401 Likewise.
402 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
403
404 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
405 var instead of casting to long, to avoid casts.
406 (prepare_states): Use MALLOC rather than alloca, so that we don't
407 have to worry about alloca.
408 * src/state.c (state_hash_lookup): Likewise.
409
410 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
411 local var instead of casting to unsigned char, to avoid casts.
412
413 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
414 STATE_ALLOC): Remove.
415 (transitions_new, errs_new, reductions_new, state_new): Use malloc
416 rather than calloc, and use offsetof to avoid allocating slightly
417 too much storage.
418 (state_new): Initialize all members.
419
420 * src/state.c (state_hash): Use unsigned accumulator, not signed.
421
422 * src/symtab.c (symbol_free): Remove; unused.
423 (symbol_get): Remove cast in lhs of assignment.
424 (symbols_do): Now static. Accept generic arguments, not
425 hashing-related ones.
426
427 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
428 (symbol_processor): Remove.
429 (symbols_do): Remove decl; now static.
430
431 * src/system.h (alloca): Remove; decl no longer needed.
432 (<stddef.h>): Include, for offsetof.
433 (<inttypes.>, <stdint.h>): Include if available.
434 (uintptr_t): New type, if system lacks it.
435 (CALLOC, MALLOC, REALLOC): New macros.
436 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
437 new macros.
438
439 * src/tables.c (table_size): Now int, to pacify GCC.
440 (table_grow, table_ninf_remap): Use signed table size.
441 (save_row): Don't bother initializing locals when not needed.
442 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
443 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
444
445 * src/vcg.h: Correct misspellings.
446
447 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
448
449
450 * src/getargs.c (getargs): Don't assume EOF == -1.
451
452 2002-12-09 Paul Eggert <eggert@twinsun.com>
453
454 Change identifier spellings to avoid collisions with names
455 that are reserved by POSIX.
456
457 Don't use names ending in _t, since POSIX reserves them.
458 For consistency, remove _e and _s endings -- they're weren't
459 needed to remove ambiguity. All uses changed.
460 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
461 turn was just renamed from struniq_t.
462 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
463 which in turn was just renamed from struniq_processor_t.
464 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
465 in turn was renamed from hash_compare_struniq_t.
466 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
467 (state_list): Renamed from state_list_t.
468 * src/assoc.h (assoc): Renamed from assoc_t.
469 * src/conflicts.c (enum conflict_resolution): Renamed from
470 enum conflict_resolution_e.
471 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
472 (rule_list): Renamed from rule_list_t.
473 * src/getargs.h (enum trace): Renamed from enum trace_e.
474 (enum report): Renamed from enum report_e.
475 * src/gram.h (item_number): Renamed from item_number_t.
476 (rule_number): Renamed from rule_number_t.
477 (struct rule_s): Remove the "rule_s" part; not used.
478 (rule): Renamed from rule_t.
479 (rule_filter): Renamed from rule_filter_t.
480 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
481 (goto_list): Renamed from goto_list_t.
482 * src/lalr.h (goto_number): Renamed from goto_number_t.
483 * src/location.h (location): Renamed from location_t.
484 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
485 and moved here from:
486 * src/muscle_tab.h (muscle_entry_t): here.
487 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
488 (rule_list): Renamed from rule_list_t.
489 * src/print_graph.c (static_graph): Renamed from graph.
490 * src/reader.h (braced_code): Renamed from braced_code_t.
491 Remove brace_code_e tag.
492 * src/relation.h (relation_node): Renamed from relation_node_t.
493 (relation_nodes): Renamed from relation_nodes_t.
494 (relation): Renamed from relation_t.
495 * src/state.h (state_number): Renamed from state_number_t.
496 (struct state): Renamed from struct state_s.
497 (state): Renamed from state_t.
498 (transitions): Renamed from transitions_t. Unused (and
499 misspelled) transtion_s tag removed.
500 (errs): Renamed from errs_t. Unused errs_s tag removed.
501 (reductions): Renamed from reductions_t. Unused tag
502 reductions_s removed.
503 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
504 (struct symbol_list): Renamed from struct symbol_list_s.
505 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
506 (struct symbol): Renamed from struct symbol_s.
507 (symbol): Renamed from symbol_t.
508 * src/tables.c (vector_number): Renamed from vector_number_t.
509 (action_number): Renamed from action_t.
510 * src/tables.h (base_number): Renamed from base_t.
511 * src/vcg.h (enum color): Renamed from enum color_e.
512 (enum textmode): Renamed from enum textmode_e.
513 (enum shape): Renamed from enum shape_e.
514 (struct colorentry): Renamed from struct colorentry_s.
515 (struct classname): Renamed from struct classname_s.
516 (struct infoname): Renamed from struct infoname_s.
517 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
518 (enum decision): Renamed from enum decision_e.
519 (enum orientation): Renamed from enum orientation_e.
520 (enum alignment): Renamed from enum alignment_e.
521 (enum arrow_mode): Renamed from enum arrow_mode_e.
522 (enum crossing_type): Renamed from enum crossing_type_e.
523 (enum view): Renamed from enum view_e.
524 (struct node): Renamed from struct node_s.
525 (node): Renamed from node_t.
526 (enum linestyle): Renamed from enum linestyle_e.
527 (enum arrowstyle): Renamed from enum arrowstyle_e.
528 (struct edge): Renamed from struct edge.
529 (edge): Renamed from edge_t.
530 (struct graph): Renamed from struct graph_s.
531 (graph): Renamed from graph_t.
532 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
533 Rename value_t -> value.
534 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
535 value_t_as_yystype -> value_as_yystype.
536
537 Don't include <errno.h> in the mainstream code, since it
538 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
539 * lib/get-errno.c, lib/get-errno.h: New files.
540 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
541 get-errno.c.
542 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
543 * src/output.c (output_skeleton): Likewise.
544 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
545 instead of errno.
546 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
547 Likewise.
548 (handle_action_dollar, handle_action_at): Likewise.
549 * src/system.h: Do not include <errno.h>.
550 (TAB_EXT): Renamed from EXT_TAB.
551 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
552
553 Avoid str[a-z]*, since <string.h> reserves that name space.
554 Change all instances of "struniq" in names to "uniqstr", and
555 likewise for "STRUNIQ" and "UNIQSTR".
556 * src/uniqstr.c: Renamed from src/struniq.c.
557 * src/uniqstr.h: Renamed from src/struniq.h.
558 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
559 * src/files.c (strsuffix): Remove; unused.
560 (concat2): Renamed from stringappend. Now static.
561 * src/files.h (strsuffix, stringappend): Remove; unused.
562 * src/parse-gram.y (<chars>): Renamed from <string>.
563 (<uniqstr>): Renamed from <struniq>.
564 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
565 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
566 (struct graph_s.expand): Renamed from struct graph_s.stretch.
567 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
568 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
569 (N_EXPAND): Renamed from N_STRETCH.
570
571 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
572 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
573 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
574 Remove; unused.
575 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
576 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
577 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
578 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
579 (BASE_MAXIMUM): Renamed from BASE_MAX.
580 (BASE_MINIMUM): Renamed from BASE_MIN.
581 (ACTION_MAX): Remove; unused.
582 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
583 Unnecessary casts removed from above defines.
584
585
586 Fix misspelling in names.
587 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
588 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
589 G_NODE_ALIGNEMENT.
590
591
592 * lib/timevar.c (timevar_report): Renamed from time_report,
593 for consistency with other names.
594 * lib/timevar.h (timevar_report): New decl.
595 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
596
597
598 Sort include-file uses.
599
600 Reorder all include files under src to be in the order "system.h".
601 then the ../lib include files in angle brackets (alphabetized),
602 then the . include files in double-quotes (alphabetized). Fix
603 dependency breakages encountered in this process, as follows:
604 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
605 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
606 * src/state.h: Include "symtab.h".
607
608 2002-12-08 Paul Eggert <eggert@twinsun.com>
609
610 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
611 since this causes problems when __file__ contains character
612 sequences like "@" that are treated specially by src/scan-skel.l.
613 Instead, just use the file's basename. This fixes the bug
614 reported by Martin Mokrejs in
615 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
616
617 2002-12-06 Paul Eggert <eggert@twinsun.com>
618
619 Add support for rules that do not have trailing semicolons, as
620 POSIX requires. Improve the quality of locations in Bison
621 diagnostics.
622
623 * src/location.c: Include <quotearg.h>.
624 (empty_location): Now const.
625 (location_print): New function. Follow the recommendation of the
626 GNU Coding Standards for locations that span file boundaries.
627 * src/location.h: Do not include <quotearg.h>; no longer needed.
628 (boundary): New type.
629 (location_t): Use it. This allows locations to span file boundaries.
630 All member uses changed: file -> start.file or end.file (as needed),
631 first_line -> start.line, first_column -> start.column,
632 last_line -> end.line, last_column -> end.column.
633 (equal_boundaries): New function.
634 (LOCATION_RESET, LOCATION_STEP): Remove.
635 (LOCATION_PRINT): Remove. All callers changed to use location_print.
636 (empty_location): Now const.
637 (location_print): New decl.
638 * src/parse-gram.y (lloc_default): New function, which handles
639 empty locations more accurately.
640 (YYLLOC_DEFAULT): Use it.
641 (%token COLON): Remove.
642 (%token ID_COLON): New token.
643 (rules): Use it.
644 (declarations, rules): Remove trailing semicolon.
645 (declaration, rules_or_grammar_declaration):
646 Allow empty (";") declaration.
647 (symbol_def): Remove empty actions; no longer needed.
648 (rules_or_grammar_declaration): Remove trailing semicolon.
649 (semi_colon.opt): Remove.
650 * src/reader.h: Include location.h.
651 (scanner_cursor): New decl.
652 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
653 rolling our own.
654 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
655 of *loc.
656 (STEP): Remove. No longer needed, now that adjust_location does
657 the work. All uses removed.
658 (scanner_cursor): New var.
659 (adjust_location): Renamed from extend_location. It now sets
660 *loc and adjusts the scanner cursor. All uses changed.
661 Don't bother testing for CR.
662 (handle_syncline): Remove location arg; now updates scanner cursor.
663 All callers changed.
664 (unexpected_end_of_file): Now accepts start boundary of token or
665 comment, not location. All callers changed. Update scanner cursor,
666 not the location.
667 (SC_AFTER_IDENTIFIER): New state.
668 (context_state): Renamed from c_context. All uses changed.
669 (id_loc, code_start, token_start): New local vars.
670 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
671 processing of Yacc white space and equivalents here.
672 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
673 instead of returning ID immediately, since we need to search for
674 a subsequent colon.
675 (<INITIAL>"'", "\""): Save token_start.
676 (<INITIAL>"%{", "{", "%%"): Save code_start.
677 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
678 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
679 BEGIN context_state at end, not INITIAL.
680 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
681 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
682 Return correct token start.
683 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
684 the start of a character, string or multiline comment is found.
685 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
686 Reduction): Adjust reported locations to match the more-precise
687 results now expected.
688 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
689 * tests/reduce.at (Useless Rules, Reduced Automaton,
690 Underivable Rules): Likewise.
691 * tests/regression.at (Invalid inputs): No longer `expecting ";"
692 or "|"' now that so many other tokens are allowed by the new grammar.
693
694 * src/complain.h (current_file): Remove duplicate decl;
695 current_file is now owned by files.h.
696 * src/complain.c, src/scan-gram.l: Include files.h.
697
698 2002-12-06 Paul Eggert <eggert@twinsun.com>
699
700 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
701 promotes to int; it might be unsigned int.
702 * data/yacc.c (yy_reduce_print): Likewise.
703
704 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
705 be #defined in the prologue, not in the Bison declarations.
706 This fixes Debian Bug 102878, reported by Shaul Karl.
707
708 2002-12-02 Paul Eggert <eggert@twinsun.com>
709
710 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
711 * lib/strtoul.c: New file, from gnulib.
712 This fixes a porting bug reported by Peter Klein in
713 <http://mail.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
714
715 2002-11-30 Paul Eggert <eggert@twinsun.com>
716
717 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
718 and put only a forward declaration in the prologue. This is for
719 consistency with the other scanner helper functions.
720
721 Type clashes now generate warnings, not errors, since it
722 appears that POSIX may allow some grammars with type clashes.
723 * src/reader.c (grammar_current_rule_check): Warn about
724 type clashes instead of complaining.
725 * tests/input.at (Type Clashes): Expect warnings, not complaints.
726
727 Add Yacc library, since POSIX requires it.
728 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
729 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
730 * lib/main.c, lib/yyerror.c: New files.
731
732 gram_error can be static; it need not be extern.
733 * src/reader.h (gram_error): Remove decl.
734 * src/parse-gram.y (gram_error): Now static. Add static decl.
735 (print_token_value): Omit parameter names from forward decl,
736 for consistency.
737
738 2002-11-29 Paul Eggert <eggert@twinsun.com>
739
740 * doc/bison.texinfo: Emphasize that yylex and yyerror must
741 be declared before being used. E.g., one should typically
742 declare them in the prologue. Use GNU coding style in examples.
743 Put "const" consistently after the type it modifies. Mention
744 that C99 supports "inline". Mention that yyerror traditionally
745 returns "int".
746
747 %parse-param and %lex-param now take just one argument, the
748 declaration; the argument name is deduced from the declaration.
749
750 * doc/bison.texinfo (Parser Function, Pure Calling, Error
751 Reporting, Table of Symbols): Document this.
752 * src/parse-gram.y (add_param): New function.
753 (COMMA): Remove.
754 (declaration): Implement new rule for %parse-param and %lex-param.
755 * src/scan-gram.l: "," now elicits a warning, rather than being
756 a token; this is more compatible with byacc.
757 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
758
759 2002-11-27 Paul Eggert <eggert@twinsun.com>
760
761 Rename identifiers to avoid real and potential collisions.
762
763 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
764 to avoid collision with lex macro described by Bruce Lilly in
765 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
766 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
767 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
768 * src/parse-gram.y (print_token_value): Renamed from yyprint.
769 All uses changed.
770 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
771 The name "yycontrol" violates the name space rules, and this stuff
772 wasn't being used anyway.
773 (input): Remove action; this stuff wasn't being used.
774 (gram_error): Rename local variable yylloc -> loc.
775 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
776 (YY_DECL): Don't use "yy" at start of local variables.
777 All uses changed, e.g., yylloc -> loc.
778 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
779 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
780 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
781 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
782
783 * src/parse-gram.y (gram_error): loc is now const *.
784 * src/reader.h (gram_error): Likewise.
785
786 2002-11-24 Paul Eggert <eggert@twinsun.com>
787
788 Version 1.75c.
789
790 * tests/actions.at (Actions after errors): Use an output format
791 more similar to that of the Printers and Destructors test.
792 Test the position of the ';' token too.
793 (Printers and Destructors): Likewise.
794 (Printers and Destructors: %glr-parser): Remove for now, to avoid
795 unnecessarily alarming people when the test fails.
796
797 * data/yacc.c (yyerrlab1): Move this label down, so that the
798 parser does not discard the lookahead token if the user code
799 invokes YYERROR. This change is required for POSIX conformance.
800
801 * lib/error.c: Sync with gnulib.
802
803 2002-11-22 Paul Eggert <eggert@twinsun.com>
804
805 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
806 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
807 * lib/xmalloc.c: Likewise.
808
809 2002-11-20 Paul Eggert <eggert@twinsun.com>
810
811 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
812
813 2002-11-20 Paul Eggert <eggert@twinsun.com>
814
815 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
816 should use `if (! x) abort ();' rather than `assert (x);', and
817 anyway it's one less thing to worry about configuring.
818
819 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
820 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
821 and replace all instances of assert with abort.
822 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
823 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
824
825 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
826 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
827 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
828 hash_find_entry, hash_rehash, hash_insert): Likewise.
829 * src/conflicts.c (resolve_sr_conflict): Likewise.
830 * src/lalr.c (set_goto_map, map_goto): Likewise.
831 * src/nullable.c (nullable_compute): Likewise.
832 * src/output.c (prepare_rules, token_definitions_output): Likewise.
833 * src/reader.c (packgram, reader): Likewise.
834 * src/state.c (state_new, state_free, state_transitions_set,
835 state_reduction_find): Likewise.
836 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
837 symbol_pack): Likewise.
838 * src/tables.c (conflict_row, pack_vector): Likewise.
839 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
840 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
841 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
842 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
843
844 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
845 (ARGMATCH_CONSTRAINT): New macro.
846 (ARGMATCH_ASSERT): Use it.
847
848 * src/system.h (verify): New macro.
849 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
850 rather than assert.
851 * src/tables.c (tables_generate): Likewise.
852
853 * src/struniq.c (struniq_assert): Now returns void, and aborts
854 if the assertion is false.
855 (struniq_assert_p): Remove.
856 * src/struniq.h: Likewise.
857
858 2002-11-18 Paul Eggert <eggert@twinsun.com>
859
860 * data/glr.c (yygetLRActions): Replace `yyindex' with
861 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
862 This fixes the regression with Sun ONE Studio 7 cc that I reported in
863 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
864
865 2002-11-18 Akim Demaille <akim@epita.fr>
866
867 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
868 space.
869 From Tim Van Holder.
870
871 2002-11-17 Paul Eggert <eggert@twinsun.com>
872
873 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
874 to "SyntaxError" for consistency with my 2002-11-15 change.
875
876 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
877 not define to {}, since this breaks the common use of `YYDPRINTF
878 ((...));' if a single statement is desired (e.g. before `else').
879 Work around GCC warnings by surrounding corresponding calls with
880 {} if needed.
881 (yyhasResolvedValue): Remove unused function.
882 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
883 loop body.
884 (yyreportSyntaxError): Renamed from yyreportParseError.
885 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
886 All uses changed.
887 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
888 extern when possible. Remove unused initializations.
889
890 2002-11-16 Akim Demaille <akim@epita.fr>
891
892 Augment the similarity between GLR and LALR traces.
893
894 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
895 (YY_REDUCE_PRINT): New.
896 (yyparse): Use them.
897 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
898 YYDPRINT here.
899 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
900 state reached after the reduction/recovery, since...
901 (yyparse, yyprocessOneStack): Report the state we are entering in.
902
903 2002-11-16 Akim Demaille <akim@epita.fr>
904
905 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
906 Add support for --trace=skeleton.
907 * src/scan-skel.l: %option debug.
908 Scan strings of non-@ or \n instead of character by character.
909 (scan_skel): Handle trace_skeleton.
910 (QPUTS): New.
911 (@output_parser_name@, @output_header_name@): ``Restore'' their
912 support (used to be M4 macros).
913 * data/yacc.c: Quote larger chunks, a la glr.c.
914 * data/lalr1.cc: Likewise.
915 The header guards are no longer available, so use some other
916 string than `YYLSP_NEEDED'.
917
918 2002-11-16 Akim Demaille <akim@epita.fr>
919
920 Make the ``Printers and Destructors'' test more verbose, taking
921 `yacc.c''s behavior as (possibly wrong) reference.
922
923 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
924 instead of fprint on stdout.
925 Set and report the last_line of the symbols.
926 Consistently display values and locations.
927
928 2002-11-16 Paul Eggert <eggert@twinsun.com>
929
930 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
931
932 2002-11-15 Paul Eggert <eggert@twinsun.com>
933
934 * tests/actions.at (Actions after errors): New test case.
935
936 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
937 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
938 tests/action.at, tests/calc.at, tests/conflicts.at,
939 tests/cxx-type.at, tests/regression.at:
940 "parse error" -> "syntax error" for POSIX compatibility.
941 "parsing stack overflow..." -> "parser stack overflow" so
942 that code matches Bison documentation.
943
944 2002-11-15 Akim Demaille <akim@epita.fr>
945
946 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
947 take two BRACED_CODE, not two string_content.
948 Free the scanner's obstack when we are done.
949 (code_content): New.
950 * tests/calc.at: Adjust.
951 * doc/bison.texinfo: Adjust.
952 Also, make sure to include the `,' for these declarations.
953
954 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
955
956 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
957 definition; avoids potential autoreconf problems.
958
959 2002-11-15 Akim Demaille <akim@epita.fr>
960
961 Always check the value returned by yyparse.
962
963 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
964 returned by yyparse.
965 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
966 Adjust calls.
967 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
968 returned by yyparse.
969
970 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
971
972 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
973 on input.at test.
974
975 2002-11-14 Paul Eggert <eggert@twinsun.com>
976
977 * src/output.c (output_skeleton): Call xfopen instead of
978 duplicating xfopen's body.
979
980 Fix bugs reported by Nelson H. F. Beebe in
981 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
982
983 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
984 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
985 Group compiler. Instead, use "$CC -E bar.c". Include the .h
986 file twice in the grammar, as an extra check.
987
988 * tests/input.at (Torturing the Scanner): Surround the
989 backslash-newline tests with "#if 0", to make it less likely that
990 we'll run into compiler bugs. Bring back solitary \ inside
991 comment, but add a closing comment to work around HP C bug. Don't
992 test backslash-newline in C character constant.
993
994 2002-11-14 Akim Demaille <akim@epita.fr>
995
996 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
997 status of the compiler.
998 Calling `exit 1' is no longer needed.
999 Reported by Nelson H. F. Beebe.
1000
1001 2002-11-14 Akim Demaille <akim@epita.fr>
1002
1003 * tests/atlocal.in (CPPFLAGS): We have config.h.
1004 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
1005 New.
1006 * tests/actions.at, tests/calc.at, tests/conflicts.at,
1007 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
1008 * tests/regression.at, tests/torture.at: Use them for all the
1009 grammars that are to be compiled.
1010 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
1011 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
1012 * doc/bison.texinfo (GLR Parsers): Document `inline'.
1013
1014 2002-11-14 Akim Demaille <akim@epita.fr>
1015
1016 * doc/bison.texinfo: Various formatting changes (alignments in
1017 samples, additional @group/@end group, GCS in samples.
1018 Use @deffn instead of simple @table to define the directives,
1019 macros, variables etc.
1020
1021 2002-11-13 Paul Eggert <eggert@twinsun.com>
1022
1023 Fix some bugs reported by Albert Chin-A-Young in
1024 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
1025
1026 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
1027 -o c"; the HP C compiler chatters during compilation.
1028 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
1029 * tests/headers.at (export YYLTYPE): Likewise.
1030
1031 * tests/input.at (Torturing the Scanner): Remove lines containing
1032 solitary backslashes, as they tickle a bug in the HP C compiler.
1033
1034 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
1035 comments, since they're not portable. Use GNU coding style.
1036
1037 2002-11-13 Akim Demaille <akim@epita.fr>
1038
1039 * data/yacc.c: Leave bigger chunks of quoted text.
1040 (YYDSYMPRINTF): New.
1041 Use it to report symbol activities.
1042 * data/glr.c (YYDSYMPRINTF): New.
1043 Use it.
1044
1045 2002-11-12 Paul Eggert <eggert@twinsun.com>
1046
1047 Version 1.75b.
1048
1049 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
1050 (yyglrReduce): Return yyok, not 0.
1051 This should avoid the enumerated-type warnings reported
1052 by Nelson H. F. Beebe in
1053 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
1054
1055 * lib/bbitset.h (BITSET_INLINE): Remove.
1056 * lib/bitset.h [! BITSET_INLINE]: Remove.
1057 (bitset_set, bitset_reset, bitset_test): Rename local vars
1058 to avoid shadowing warnings by GCC.
1059
1060 * data/glr.c (inline): Remove #define. It's the user's
1061 responsibility to #define it away, just like 'const'.
1062 This fixes one of the bugs reported by Nelson H. F. Beebe in
1063 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
1064
1065 * Makefile.maint (po-check): Scan .l and .y files instead of the
1066 .c and the .h files that they generate. This fixes the bug
1067 reported by Tim Van Holder in:
1068 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
1069 Look for N_ as well as for _. Try to avoid matching #define for
1070 N_ and _.
1071 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
1072 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
1073 * src/scan-gram.l: Revamp regular expressions so that " and '
1074 do not confuse xgettext.
1075
1076 * src/struniq.h (struniq_new): Do not declare the return type
1077 to be 'const'; this violates the C standard.
1078 * src/struniq.c (struniq_new): Likewise.
1079
1080 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
1081
1082 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
1083 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
1084 linker.
1085
1086 2002-11-12 Akim Demaille <akim@epita.fr>
1087
1088 * Makefile.maint: Sync with Autoconf:
1089 (local_updates): New.
1090
1091 2002-11-12 Akim Demaille <akim@epita.fr>
1092
1093 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
1094
1095 2002-11-12 Akim Demaille <akim@epita.fr>
1096
1097 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
1098 locations.
1099
1100 2002-11-12 Akim Demaille <akim@epita.fr>
1101
1102 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
1103 not yyvalue.
1104
1105 2002-11-12 Akim Demaille <akim@epita.fr>
1106
1107 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
1108 Use it to test the GLR parser.
1109
1110 2002-11-12 Akim Demaille <akim@epita.fr>
1111
1112 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
1113 defines it.
1114 * data/glr.c (yystos): New.
1115 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
1116 (YYDSYMPRINT): New.
1117 (yyval): Don't define it, it is handled via M4.
1118 (yyrecoverParseError): Free verbosely the discarded symbols.
1119 * data/yacc.c (yysymprint): Remove, rather...
1120 (b4_yysymprint_generate): invoke.
1121 * data/c.m4 (b4_yysymprint_generate): New.
1122 Accept pointers as arguments, as opposed to the version from
1123 yacc.c.
1124 (b4_yydestruct_generate): Likewise.
1125 * tests/cations.at (Printers and Destructors): Use Bison directives
1126 instead of CPP macros.
1127 Don't rely on internal details.
1128
1129 2002-11-12 Akim Demaille <akim@epita.fr>
1130
1131 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
1132 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
1133 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
1134 it against YYEMPTY and so forth), work on yytoken (i.e., set
1135 it to YYEMPTY etc.).
1136 (yydestruct): Replace with a b4_yydestruct_generate invocation.
1137 (b4_symbol_actions): Remove.
1138 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
1139 for 0, end-of-input.
1140
1141 2002-11-12 Akim Demaille <akim@epita.fr>
1142
1143 * doc/bison.texinfo (Destructor Decl): New.
1144
1145 2002-11-12 Akim Demaille <akim@epita.fr>
1146
1147 * src/tables.c (tables_generate): Use free for pointers that
1148 cannot be NULL, not XFREE.
1149 (pack_vector): Use assert, not fatal, for bound violations.
1150 * src/state.c (state_new): Likewise.
1151 * src/reader.c (reader): Likewise.
1152 * src/lalr.c (set_goto_map): Likewise.
1153 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
1154 the file name.
1155
1156 2002-11-12 Akim Demaille <akim@epita.fr>
1157
1158 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
1159 Restore.
1160 * src/scan-gram.l (last_string): Is global to the file, not to
1161 yylex.
1162 * src/parse-gram.y (input): Don't append the epilogue here,
1163 (epilogue.opt): do it here, and free the scanner's obstack.
1164 * src/reader.c (epilogue_set): Rename as...
1165 (epilogue_augment): this.
1166 * data/c.m4 (b4_epilogue): Defaults to empty.
1167
1168 2002-11-12 Akim Demaille <akim@epita.fr>
1169
1170 * src/getargs.c (long_options): Remove duplicates.
1171 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
1172 Remove.
1173 * doc/bison.rnh: Remove.
1174 * doc/bison.texinfo (VMS Invocation): Remove.
1175
1176 2002-11-12 Akim Demaille <akim@epita.fr>
1177
1178 * src/struniq.h, src/struniq.c (struniq_t): Is const.
1179 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
1180
1181 Use struniq for symbols.
1182
1183 * src/symtab.h (symbol_t): The tag member is a struniq.
1184 (symbol_type_set): Adjust.
1185 * src/symtab.c (symbol_new): Takes a struniq.
1186 (symbol_free): Don't free the tag member.
1187 (hash_compare_symbol_t, hash_symbol_t): Rename as...
1188 (hash_compare_symbol, hash_symbol): these.
1189 Use the fact that tags as struniqs.
1190 (symbol_get): Use struniq_new.
1191 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
1192 Returns a strniq.
1193 * src/reader.h (merger_list, grammar_currentmerge_set): The name
1194 and type members are struniqs.
1195 * src/reader.c (get_merge_function)
1196 (grammar_current_rule_merge_set): Adjust.
1197 (TYPE, current_type): Are struniq.
1198
1199 Use struniq for file names.
1200
1201 * src/files.h, src/files.c (infile): Split into...
1202 (grammar_file, current_file): these.
1203 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
1204 * src/reduce.c (reduce_print): Likewise.
1205 * src/getargs.c (getargs): Likewise.
1206 * src/complain.h, src/complain.c: Likewise.
1207 * src/main.c (main): Call struniqs_new early enough to use it for
1208 file names.
1209 Don't free the input file name.
1210
1211 2002-11-12 Akim Demaille <akim@epita.fr>
1212
1213 * src/symtab.c (symbol_free): Remove dead deactivated code:
1214 type_name are properly removed.
1215 Don't use XFREE to free items that cannot be NULL.
1216 * src/struniq.h, src/struniq.c: New.
1217 * src/main.c (main): Initialize/free struniqs.
1218 * src/parse-gram.y (%union): Add astruniq member.
1219 (yyprint): Adjust.
1220 * src/scan-gram.l (<{tag}>): Return a struniq.
1221 Free the obstack bit that used to store it.
1222 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
1223
1224 2002-11-11 Paul Eggert <eggert@twinsun.com>
1225
1226 Revamp to fix many (but not all) of the C- and M4-related quoting
1227 problems. Among other things, this fixes the Bison bug reported
1228 by Jan Hubicka when processing the Bash grammar; see:
1229 <http://mail.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
1230
1231 Use new @ escapes consistently. Represent brackets with @{ and @}
1232 rather than @<:@ and @:>@, since this works a bit better with dumb
1233 editors like vi. Represent @ with @@, since @ is now consistently
1234 an escape. Use @oline@ and @ofile@ rather than __oline__ and
1235 __ofile__, to avoid unexpected expansions. Similarly, use @output
1236 rather than #output.
1237
1238 * data/c.m4 (b4_copyright): Omit file name from comment, since
1239 the file name could contain "*/".
1240 (b4_synclines_flag): Don't quote the 2nd argument; it should already
1241 be quoted. All uses changed.
1242
1243 * data/glr.c: Use new @ escapes consistently.
1244 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
1245 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
1246 Remove, since they couldn't handle arbitrary characters in file
1247 names.
1248 * data/lalr1.cc: Likewise.
1249 * data/yacc.c: Likewise.
1250
1251 * src/files.c (output_infix): Remove; all uses removed.
1252 * src/files.h: Likewise.
1253
1254 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
1255 mishandled funny characters in file names, and anyway it isn't
1256 needed any more.
1257 * data/yacc.c: Likewise.
1258 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
1259
1260 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
1261 * data/yacc.c: Likewise.
1262
1263 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
1264 strings now.
1265 (muscle_init): Quote filename as a C string.
1266 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
1267 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
1268 * src/output.c (escaped_file_name_output): New function.
1269 (prepare_symbols): Quote tokens for M4.
1270 (prepare): Don't insert output_infix, output_prefix,
1271 output_parser_name, output_header_name; this is now down by scan-skel.
1272 Insert skeleton as a C string.
1273
1274 * src/output.c (user_actions_output, symbol_destructors_output,
1275 symbol_printers_output): Quote filenames for C and M4.
1276 * src/reader.c (prologue_augment, epilogue_set): Likewise.
1277
1278 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
1279 escapes other than \\ and \'; this simplifies the code.
1280 (<SC_STRING>): Likewise, for \\ and \".
1281 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
1282 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
1283 Use new escapes @{ and @} for [ and ].
1284
1285 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
1286 them with auto vars.
1287 Switch to new escape scheme, where @ is the escape character uniformly.
1288 Abort if a stray escape character is found. Avoid unbounded input
1289 buffer when parsing non-escaped text.
1290
1291 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
1292 __oline__, #output, $@, and @{ do not have unintended meanings.
1293
1294 2002-11-09 Paul Eggert <eggert@twinsun.com>
1295
1296 Fix the test failure due to GCC warnings described in
1297 <http://mail.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
1298 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
1299 evaluate to 0 if it's impossible for NINF to be in the respective
1300 table.
1301 (yygetLRActions, yyrecoverParseError): Use them.
1302
1303 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
1304 counted in the token inserted at end of file. Now takes
1305 location_t *, not location_t, so that the location can be
1306 adjusted. All uses changed.
1307
1308 * tests/regression.at (Invalid inputs): Adjust wording in
1309 diagnostic to match the new behavior.
1310
1311 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
1312 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
1313 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
1314 abort ();'. This reduces the runtime of the "Many lookaheads"
1315 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
1316 GCC 3.2.
1317
1318 2002-11-07 Paul Eggert <eggert@twinsun.com>
1319
1320 * src/parse-gram.y (CHARACTER): Remove unused token.
1321 All uses removed.
1322
1323 * src/scan-gram.l: Remove stack option. We no longer use the
1324 stack, since the stack was never deeper than 1; instead, use the
1325 new auto var c_context to record the stacked value.
1326
1327 Remove nounput option. At an unexpected end of file, we now unput
1328 the minimal input necessary to end cleanly; this simplifies the
1329 code.
1330
1331 Avoid unbounded token sizes where this is easy.
1332
1333 (unexpected_end_of_file): New function.
1334 Use it to systematize the error message on unexpected EOF.
1335 (last-string): Now auto, not static.
1336 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
1337 (scanner_last_string_free): Remove; not used.
1338 (percent_percent_count): Move decl to just before use.
1339 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
1340 not the (never otherwised-used) CHARACTER.
1341
1342 2002-11-07 Akim Demaille <akim@epita.fr>
1343
1344 Let yyerror always receive the msg as last argument, so that
1345 yyerror can be variadic.
1346
1347 * data/yacc.c (b4_yyerror_args): New.
1348 Use it when calling yyerror.
1349 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
1350 Use it when calling yyerror.
1351 * doc/bison.texinfo (Error Reporting): Adjust.
1352 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
1353 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
1354
1355 2002-11-06 Akim Demaille <akim@epita.fr>
1356
1357 #line should have quoted strings.
1358 Ideally, this should be done by m4_quotearg.
1359
1360 * src/scan-skel.l: Include quotearg.h.
1361 Quote __ofile__.
1362 * src/output.c (symbol_printers_output)
1363 (symbol_destructors_output): Quote the file name.
1364
1365 2002-11-06 Akim Demaille <akim@epita.fr>
1366
1367 * tests/regression.at (Invalid inputs): Adjust to the recent
1368 messages.
1369
1370 2002-11-06 Akim Demaille <akim@epita.fr>
1371
1372 Restore --no-lines.
1373 Reported by Jim Kent.
1374
1375 * data/c.m4 (b4_syncline): New.
1376 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
1377 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
1378 * src/output.c (user_actions_output): Likewise.
1379 (prepare): Define 'b4_synclines_flag'.
1380 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
1381
1382 2002-11-06 Akim Demaille <akim@epita.fr>
1383
1384 * src/main.c (main): Free `infile'.
1385 * src/scan-gram.l (handle_syncline): New.
1386 Recognize `#line'.
1387 * src/output.c (user_actions_output, symbol_destructors_output)
1388 (symbol_printers_output): Use the location's file name, not
1389 infile.
1390 * src/reader.c (prologue_augment, epilogue_set): Likewise.
1391
1392 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1393
1394 * src/tables.c (matching_state): Don't allow states to match if
1395 either has GLR conflict entries.
1396
1397 2002-11-05 Paul Eggert <eggert@twinsun.com>
1398
1399 * src/scan-gram.l: Use more accurate diagnostics, e.g.
1400 "integer out of range" rather than "invalid value".
1401 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
1402 accordingly.
1403
1404 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
1405 Also, remove one static variable in the scanner.
1406
1407 * src/scan-gram.l (braces_level): Now auto, not static.
1408 Initialize to zero if the compiler is being picky.
1409 (INITIAL): Clear braces_level instead of incrementing it.
1410 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
1411 as POSIX 1003.1-2001 requires.
1412 * src/system.h (IF_LINT): New macro, taken from coreutils.
1413 * configure.ac: Define "lint" if --enable-gcc-warnings.
1414
1415 2002-11-05 Akim Demaille <akim@epita.fr>
1416
1417 * src/scan-gram.l: When it starts with `%', complain about the
1418 whole directive, not just that `invalid character: %'.
1419
1420 2002-11-04 Akim Demaille <akim@epita.fr>
1421
1422 * Makefile.maint: Update from Autoconf.
1423 (update, cvs-update, po-update, do-po-update): New.
1424
1425 2002-11-04 Akim Demaille <akim@epita.fr>
1426
1427 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
1428 and yyerror.
1429 Have yyerror `use' its arguments.
1430 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
1431 returns true when location & yacc & pure & parse-param.
1432 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
1433
1434 2002-11-04 Akim Demaille <akim@epita.fr>
1435
1436 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
1437 clashes.
1438 * src/scan-gram.l: Use [\'] instead of ['] to pacify
1439 font-lock-mode.
1440 Use complain_at.
1441 Use quote, not quote_n since LOCATION_PRINT no longer uses the
1442 slot 0.
1443
1444 2002-11-03 Paul Eggert <eggert@twinsun.com>
1445
1446 * src/reader.c (get_merge_function, grammar_current_rule_check):
1447 Use consistent diagnostics for reporting type name clashes.
1448 Quote the types with <>, for consistency with Yacc.
1449 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
1450
1451 2002-11-03 Akim Demaille <akim@epita.fr>
1452
1453 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
1454 New.
1455 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
1456 (b4_parse_param): Remove.
1457 Use b4_identification.
1458 Propagate b4_pure_args where needed to pass them to yyerror.
1459 * data/glr.m4 (b4_parse_param): Remove.
1460 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
1461 (b4_lpure_formals): New.
1462 Use b4_identification.
1463 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
1464 b4_user_formals and b4_user_args.
1465 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
1466 (yyreportAmbiguity): When using a pure parser, also need
1467 the location, and the parse-params.
1468 Adjust callers.
1469 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
1470 When using a pure parser, also need the parse-params.
1471 Adjust callers.
1472 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
1473 (%pure-parser + %parse-param) LALR and GLR parsers.
1474 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
1475 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
1476 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
1477 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
1478 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
1479 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
1480 * doc/bison.texinfo: Untabify the whole file.
1481 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
1482 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
1483 (Error Reporting): Adjust to these new directives.
1484 Document %error-verbose, deprecate YYERROR_VERBOSE.
1485
1486 2002-11-03 Akim Demaille <akim@epita.fr>
1487
1488 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
1489 AT_CHECK_CALC_GLR invocations to use % directives, instead of
1490 command line options.
1491 * tests/cxx-type.at: Formatting changes.
1492
1493 2002-11-03 Paul Eggert <eggert@twinsun.com>
1494
1495 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
1496 to count columns correctly, and to check for invalid inputs.
1497
1498 Use mbsnwidth to count columns correctly. Account for tabs, too.
1499 Include mbswidth.h.
1500 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
1501 (extend_location): New function.
1502 (YY_LINES): Remove.
1503
1504 Handle CRLF in C code rather than in Lex code.
1505 (YY_INPUT): New macro.
1506 (no_cr_read): New function.
1507
1508 Scan UCNs, even though we don't fully handle them yet.
1509 (convert_ucn_to_byte): New function.
1510
1511 Handle backslash-newline correctly in C code.
1512 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
1513 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
1514 all uses changed.
1515 (tag, splice): New EREs. Do not allow NUL or newline in tags.
1516 Use {splice} wherever C allows backslash-newline.
1517 YY_STEP after space, newline, vertical-tab.
1518 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
1519
1520 (letter, id): Don't assume ASCII; e.g., spell out a-z.
1521
1522 ({int}, handle_action_dollar, handle_action_at): Check for integer
1523 overflow.
1524
1525 (YY_STEP): Omit trailing semicolon, so that it's more like C.
1526
1527 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
1528 as well as \000. Check for UCHAR_MAX, not 255.
1529 Allow \x with an arbitrary positive number of digits, as in C.
1530 Check for overflow here.
1531 Allow \? and UCNs, for compatibility with C.
1532
1533 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
1534 with quote slot used by complain_at.
1535
1536 * tests/input.at: Add tests for backslash-newline, m4 quotes
1537 in symbols, long literals, and funny escapes in strings.
1538
1539 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
1540 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
1541 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
1542 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
1543 * m4/mbswidth.m4: New file, from GNU coreutils.
1544
1545 * doc/bison.texinfo (Grammar Outline): Document // comments.
1546 (Symbols): Document that trigraphs have no special meaning in Bison,
1547 nor is backslash-newline allowed.
1548 (Actions): Document that trigraphs have no special meaning.
1549
1550 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
1551 no longer used.
1552
1553 2002-11-02 Paul Eggert <eggert@twinsun.com>
1554
1555 * src/reader.c: Don't include quote.h; not needed.
1556 (get_merge_function): Reword warning to be consistent with
1557 type clash diagnostic in grammar_current_rule_check.
1558
1559 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
1560 bug in trigraph handling.
1561
1562 * src/output.c (prepare_symbols): When printing token names,
1563 escape "[" as "@<:@" and likewise for "]".
1564
1565 * src/system.h (errno): Remove declaration, as we are now
1566 assuming C89 or better, and C89 guarantees errno.
1567
1568 2002-10-30 Paul Eggert <eggert@twinsun.com>
1569
1570 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
1571 Check for close failures.
1572 * src/files.h (xfclose): Return void, not int, since it always
1573 returned zero.
1574 * src/files.c (xfclose): Likewise. Report I/O error if ferror
1575 indicates one.
1576 * src/output.c (output_skeleton): Use xfclose rather than fclose
1577 and ferror. xfclose now checks ferror.
1578
1579 * data/glr.c (YYLEFTMOST_STATE): Remove.
1580 (yyreportTree): Use a stack-based leftmost state. This avoids
1581 our continuing battles with bogus warnings about initializers.
1582
1583 2002-10-30 Akim Demaille <akim@epita.fr>
1584
1585 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
1586 #if.
1587
1588 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1589
1590 * tests/glr-regr1.at: New test for reported regressions.
1591 * tests/testsuite.at: Add glr-regr1.at test.
1592 * tests/Makefile.am: Add glr-regr1.at test.
1593
1594 2002-10-24 Paul Eggert <eggert@twinsun.com>
1595
1596 Version 1.75a.
1597
1598 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
1599 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
1600 we use malloc. Don't assume 'A' through 'Z' are contiguous.
1601 Don't assume strdup exists; POSIX says its an XSI extension.
1602 Check for buffer overflow on input.
1603
1604 2002-10-24 Akim Demaille <akim@epita.fr>
1605
1606 * src/output.c (output_skeleton): Don't disable M4sugar comments
1607 too soon: it results in comments being expanded.
1608 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
1609 first output.
1610
1611 2002-10-24 Akim Demaille <akim@epita.fr>
1612
1613 * data/yacc.c (m4_int_type): New.
1614 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
1615 char' as only yacc.c wants K&R portability.
1616 * data/glr.c (yysigned_char): Remove.
1617 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
1618 Reported by Quoc Peyrot.
1619
1620 2002-10-23 Paul Eggert <eggert@twinsun.com>
1621
1622 * src/main.c (main): With --trace=time, report times even if a
1623 non-fatal error occurs. Formerly, the times were reported in some
1624 such cases but not in others.
1625 * src/reader.c (reader): Just return if a complaint has been issued,
1626 instead of exiting, so that 'main' can report times.
1627
1628 2002-10-22 Akim Demaille <akim@epita.fr>
1629
1630 * src/system.h: Include sys/types.
1631 Reported by Bert Deknuydt.
1632
1633 2002-10-23 Paul Eggert <eggert@twinsun.com>
1634
1635 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
1636 Suggested by Art Haas.
1637
1638 2002-10-22 Paul Eggert <eggert@twinsun.com>
1639
1640 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
1641 decl; not needed any more.
1642 * src/main.c (main): Use return to exit, undoing yesterday's change.
1643 The last OS that we could find where this wouldn't work is
1644 SunOS 3.5, and that's too old to worry about now.
1645
1646 * data/glr.c (struct yyltype): Define members even when not
1647 doing locations. This is more consistent with yacc.c, and it
1648 works around the following bug reports:
1649 http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
1650 http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
1651
1652 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
1653 @acronym consistently. Standardize on "Yacc" instead of "YACC",
1654 "Algol" instead of "ALGOL". Give a bit more history about BNF.
1655
1656 2002-10-22 Akim Demaille <akim@epita.fr>
1657
1658 * data/README: New.
1659
1660 2002-10-21 Paul Eggert <eggert@twinsun.com>
1661
1662 Be consistent about 'bool'; the old code used an enum in one
1663 module and an int in another, and this violates the C standard.
1664 * m4/stdbool.m4: New file, from coreutils 4.5.3.
1665 * configure.ac (AC_HEADER_STDBOOL): Add.
1666 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
1667 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
1668 * src/symtab.c (hash_compare_symbol_t): Likewise.
1669 * src/system.h (bool, false, true): Use a definition consistent
1670 with ../lib/hash.c. All uses changed.
1671
1672 * src/complain.c (warning_issued): Renamed from warn_message_count,
1673 so that we needn't worry about integer overflow (!).
1674 Now of type bool. All uses changed.
1675 (complaint_issued): Renamed from complain_message_count; likewise.
1676
1677 * src/main.c (main): Use exit to exit with failure.
1678
1679 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
1680 rather than 1 and 0.
1681 * src/main.c (main): Likewise.
1682 * src/getargs.c (getargs): Likewise.
1683 * src/reader.c (reader): Likewise.
1684
1685 * src/getarg.c (getargs): Remove duplicate code for
1686 "Try `bison --help'".
1687
1688 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
1689 What was that "2" for?
1690
1691 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
1692 * src/getargs.c (usage): Likewise.
1693
1694 * src/getargs.c (getargs): When there are too few operands, report
1695 the last one. When there are too many, report the first extra
1696 one. This is how diffutils does it.
1697
1698 2002-10-20 Paul Eggert <eggert@twinsun.com>
1699
1700 Remove K&R vestiges.
1701 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
1702 * src/complain.c (VA_START): Remove. Assume prototypes.
1703 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
1704 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
1705 fatal): Assume prototypes.
1706 * src/complain.h: Assume prototypes.
1707 * src/system.h (PARAMS): Remove.
1708 Include <limits.h> unconditionally, since it's guaranteeed even
1709 for a freestanding C89 compiler.
1710 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
1711 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
1712
1713 2002-10-20 Akim Demaille <akim@epita.fr>
1714
1715 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
1716 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
1717 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
1718 (yyresolveStates, yyresolveAction, yyresolveStack)
1719 (yyprocessOneStack): Use them.
1720 (yy_reduce_print): New.
1721 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
1722
1723 2002-10-20 Akim Demaille <akim@epita.fr>
1724
1725 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
1726 arguments and output `void'.
1727 (b4_c_function): Rename as...
1728 (b4_c_function_def): this.
1729 (b4_c_function_decl, b4_c_ansi_function_def)
1730 (b4_c_ansi_function_decl): New.
1731 Change the interpretation of the arguments: before `int, foo', now
1732 `int foo, foo'.
1733 * data/yacc.c (yyparse): Prototype and define thanks to these.
1734 Adjust b4_c_function_def uses.
1735 * data/glr.c (yyparse): Likewise, but ANSI only.
1736
1737 2002-10-20 Akim Demaille <akim@epita.fr>
1738
1739 * src/output.c (prepare): Move the definition of `tokens_number',
1740 `nterms_number', `undef_token_number', `user_token_number_max'
1741 to...
1742 (prepare_tokens): Here.
1743 (prepare_tokens): Rename as...
1744 (prepare_symbols): this.
1745 (prepare): Move the definition of `rules_number' to...
1746 (prepare_rules): here.
1747 (prepare): Move the definition of `last', `final_state_number',
1748 `states_number' to...
1749 (prepare_states): here.
1750 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
1751
1752 2002-10-20 Akim Demaille <akim@epita.fr>
1753
1754 * src/tables.h, src/tables.c, src/output.c: Comment changes.
1755
1756 2002-10-20 Akim Demaille <akim@epita.fr>
1757
1758 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
1759 * data/c.m4: here.
1760
1761 2002-10-20 Akim Demaille <akim@epita.fr>
1762
1763 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
1764 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
1765 `pair'.
1766 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
1767 `name' to...
1768 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
1769 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
1770 These.
1771
1772 2002-10-19 Paul Eggert <eggert@twinsun.com>
1773
1774 Do not create a temporary file, as that involves security and
1775 cleanup headaches. Instead, use a pair of pipes.
1776 Derived from a suggestion by Florian Krohm.
1777 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
1778 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
1779 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
1780 (BISON_PREREQ_SUBPIPE): Add.
1781 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
1782 Add subpipe.h, subpipe.c.
1783 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
1784 * po/POTFILES.in: Add lib/subpipe.c.
1785 * src/output.c: Include "subpipe.h".
1786 (m4_invoke): Remove decl.
1787 (scan_skel): New decl.
1788 (output_skeleton): Use pipe rather than temporary file for m4 input.
1789 Check that m4sugar.m4 is readable, to avoid deadlock.
1790 Check for pipe I/O error.
1791 * src/scan-skel.l (readpipe): Remove decl.
1792 (scan_skel): New function, to be used in place of m4_invoke.
1793 Read from stream rather than file.
1794
1795 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
1796 float, as this generates a warning on Solaris 8 + GCC 3.2 with
1797 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
1798 this generates a more-accurate value anyway.
1799
1800 * lib/timevar.c (timervar_accumulate): Rename locals to
1801 avoid confusion with similarly-named more-global.
1802 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
1803
1804 * src/output.c (prepare): Use xstrdup to convert char const *
1805 to char *, to avoid GCC warning.
1806
1807 2002-10-19 Akim Demaille <akim@epita.fr>
1808
1809 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
1810 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
1811 Use them to have `calc.y' ready for %pure-parser.
1812 * data/yacc.c (YYLEX): Pass a yylex return type to
1813 b4_c_function_call.
1814
1815 2002-10-19 Akim Demaille <akim@epita.fr>
1816
1817 Prototype support of %lex-param and %parse-param.
1818
1819 * src/parse-gram.y: Add the definition of the %lex-param and
1820 %parse-param tokens, plus their rules.
1821 Drop the `_' version of %glr-parser.
1822 Add the "," token.
1823 * src/scan-gram.l (INITIAL): Scan them.
1824 * src/muscle_tab.c: Comment changes.
1825 (muscle_insert, muscle_find): Rename `pair' as `probe'.
1826 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
1827 (muscle_entry_s): The `value' member is no longer const.
1828 Adjust all dependencies.
1829 * src/muscle_tab.c (muscle_init): Adjust: use
1830 MUSCLE_INSERT_STRING.
1831 Initialize the obstack earlier.
1832 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
1833 (muscle_pair_list_grow): New.
1834 * data/c.m4 (b4_c_function_call, b4_c_args): New.
1835 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
1836 * tests/calc.at: Use %locations, not --locations.
1837 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
1838
1839 2002-10-19 Akim Demaille <akim@epita.fr>
1840
1841 * src/getargs.c (usage): Take status as argument and exit
1842 accordingly.
1843 Report the traditional `Try ... --help' message when status != 0.
1844 (usage, version): Don't take a FILE * as arg, it is pointless.
1845 (getargs): When there is an incorrect number of arguments, make it
1846 an error, and report it GNUlically thanks to `usage ()'.
1847
1848 2002-10-18 Paul Eggert <eggert@twinsun.com>
1849
1850 * data/glr.c (yyreportParseError): Don't assume that sprintf
1851 yields the length of the printed string, as this is not true
1852 on SunOS 4.1.4. Reported by Peter Klein.
1853
1854 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
1855 * tests/conflicts.at (%nonassoc and eof): Likewise.
1856 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
1857
1858 2002-10-17 Akim Demaille <akim@epita.fr>
1859
1860 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
1861 * src/getargs.c (trace_types, trace_args): Adjust.
1862 * src/reader.c (grammar_current_rule_prec_set)
1863 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
1864 Standardize error messages.
1865 And s/@prec/%prec/!
1866 (reader): Use trace_flag to enable scanner/parser debugging,
1867 instead of an adhoc scheme.
1868 * src/scan-gram.l: Remove trailing debugging code.
1869
1870 2002-10-16 Paul Eggert <eggert@twinsun.com>
1871
1872 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
1873 MUSCLE_TAB_H.
1874
1875 * NEWS: Officially drop support for building Bison with K&R C,
1876 since it didn't work anyway and it's not worth worrying about.
1877 * Makefile.maint (wget_files): Remove ansi2knr.c.
1878 (ansi2knr.c-url_prefix): Remove.
1879 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
1880 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
1881 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
1882
1883 2002-10-15 Paul Eggert <eggert@twinsun.com>
1884
1885 Stop using the "enum_" trick for K&R-style function definitions;
1886 it confused me, and I was the author! Instead, assume that people
1887 who want to use K&R C compilers (when using these modules in GCC,
1888 perhaps?) will run ansi2knr.
1889
1890 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
1891 All uses of "enum_" changed to "enum ".
1892 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
1893 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
1894
1895 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
1896 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
1897 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
1898 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
1899 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
1900 abitset_not, abitset_ones, abitset_or, abitset_or_and,
1901 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
1902 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
1903 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
1904 Use function prototypes; this removes the need for declaring
1905 static functions simply to provide their prototypes.
1906 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
1907 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
1908 bitset_count_, bitset_create, bitset_dump, bitset_first,
1909 bitset_free, bitset_init, bitset_last, bitset_next,
1910 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
1911 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
1912 bitset_print, bitset_release_memory, bitset_toggle_,
1913 bitset_type_choose, bitset_type_get, bitset_type_name_get,
1914 debug_bitset): Likewise.
1915 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
1916 * lib/bitset_stats.c (bitset_log_histogram_print,
1917 bitset_percent_histogram_print, bitset_stats_and,
1918 bitset_stats_and_cmp, bitset_stats_and_or,
1919 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
1920 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
1921 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
1922 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
1923 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
1924 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
1925 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
1926 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
1927 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
1928 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
1929 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
1930 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
1931 bitset_stats_zero): Likewise.
1932 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
1933 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
1934 bitsetv_dump, debug_bitsetv): Likewise.
1935 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
1936 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
1937 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
1938 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
1939 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
1940 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
1941 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
1942 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
1943 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
1944 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
1945 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
1946 Likewise.
1947 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
1948 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
1949 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
1950 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
1951 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
1952 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
1953 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
1954 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
1955 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
1956 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
1957 lbitset_xor_cmp, lbitset_zero): Likewise.
1958
1959 2002-10-14 Akim Demaille <akim@epita.fr>
1960
1961 Version 1.75.
1962
1963 2002-10-14 Akim Demaille <akim@epita.fr>
1964
1965 * tests/Makefile.am (maintainer-check-posix): New.
1966
1967 2002-10-14 Akim Demaille <akim@epita.fr>
1968
1969 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
1970 member.
1971
1972 2002-10-14 Akim Demaille <akim@epita.fr>
1973
1974 * src/tables.c (table_ninf_remap): base -> tab.
1975 Reported by Matt Rosing.
1976
1977 2002-10-14 Paul Eggert <eggert@twinsun.com>
1978
1979 * tests/action.at, tests/calc.at, tests/conflicts.at,
1980 tests/cxx-type.at, tests/headers.at, tests/input.at,
1981 tests/regression.at, tests/synclines.at, tests/torture.at:
1982 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
1983 so that the tests still work even if POSIXLY_CORRECT is set.
1984 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
1985
1986 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
1987 for portability to K&R hosts. Fix typo: signed char is guaranteed
1988 only to 127, not to 128.
1989 * data/glr.c (yysigned_char): New type.
1990 * data/yacc.c (yysigned_char): Likewise.
1991 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
1992
1993 2002-10-13 Paul Eggert <eggert@twinsun.com>
1994
1995 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
1996 true due to limited range of data type" warning from GCC.
1997
1998 * data/c.m4 (b4_token_defines): Protect against double-inclusion
1999 by wrapping enum yytokentype's definition inside #ifndef
2000 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
2001
2002 2002-10-13 Akim Demaille <akim@epita.fr>
2003
2004 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
2005 Un yy- yyrhs to avoid the name clash with the global YYRHS.
2006
2007 2002-10-13 Akim Demaille <akim@epita.fr>
2008
2009 * Makefile.maint: Update from Autoconf 2.54.
2010 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
2011
2012 2002-10-13 Akim Demaille <akim@epita.fr>
2013
2014 * src/print.c (print_state): Separate the list of solved conflicts
2015 from the other items.
2016 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
2017
2018 2002-10-13 Akim Demaille <akim@epita.fr>
2019
2020 Let nondeterministic skeletons be usable with deterministic
2021 tables.
2022
2023 With the patch, GAWK compiled by GCC without -O2 passes its test
2024 suite using a GLR parser driven by LALR tables. It fails with -O2
2025 because `struct stat' gives two different answers on my machine:
2026 88 (definition of an auto var) and later 96 (memset on this var).
2027 Hence the stack is badly corrumpted. The headers inclusion is to
2028 blame: if I move the awk.h inclusion before GLR's system header
2029 inclusion, the two struct stat have the same size.
2030
2031 * src/tables.c (pack_table): Always create conflict_table.
2032 (token_actions): Always create conflict_list.
2033 * data/glr.c (YYFLAG): Remove, unused.
2034
2035 2002-10-13 Akim Demaille <akim@epita.fr>
2036
2037 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
2038 (O0FLAGS): New.
2039 (VALGRIND, GXX): New.
2040 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
2041 * tests/bison.in: Run $PREBISON a pre-command.
2042 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
2043 (maintainer-check-g++): New.
2044 * Makefile.am (maintainer-check): New.
2045
2046 2002-10-13 Akim Demaille <akim@epita.fr>
2047
2048 * data/glr.c: Formatting changes.
2049 Tweak some trace messages to match yacc.c's.
2050
2051 2002-10-13 Akim Demaille <akim@epita.fr>
2052
2053 GLR parsers sometimes raise parse errors instead of performing the
2054 default reduction.
2055 Reported by Charles-Henry de Boysson.
2056
2057 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
2058 check the length of the traces when %glr.
2059 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
2060 GLR's traces.
2061 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
2062 Test GLR parsers.
2063 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
2064 (yyltype): Remove the yy prefix from the member names.
2065 (yytable): Complete its comment.
2066 (yygetLRActions): Map error action number from YYTABLE from
2067 YYTABLE_NINF to 0.
2068 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
2069 (which was a bug: it should have been YYTABEL_NINF, and yet it was
2070 not satisfying as we could compare an YYACTION computed from
2071 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
2072 only value for error actions.
2073 (yyreportParseError): In verbose parse error messages, don't issue
2074 `error' in the list of expected tokens.
2075 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
2076 next action to perform to match glr.c's decoding.
2077 (yytable): Complete its comment.
2078
2079 2002-10-13 Paul Eggert <eggert@twinsun.com>
2080
2081 Fix problem reported by Henrik Grubbstroem in
2082 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
2083 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
2084 because the Bison parser reads the second action before reducing
2085 the first one.
2086 * src/scan-gram.l (rule_length): New static var.
2087 Use it to keep track of the rule length in the scanner, since
2088 we can't expect the parser to be in lock-step sync with the scanner.
2089 (handle_action_dollar, handle_action_at): Use this var.
2090 * tests/actions.at (Exotic Dollars): Test for the problem.
2091
2092 2002-10-12 Paul Eggert <eggert@twinsun.com>
2093
2094 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
2095 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
2096 Include <sys/time.h> when checking for clock_t and struct tms.
2097 Use same include order as source.
2098 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
2099 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
2100
2101 * lib/timevar.c: Update copyright date and clarify comments.
2102 (get_time) [IN_GCC]: Keep the GCC version for reference.
2103
2104 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
2105 GCC version as of today, then merge Bison's changes.
2106 Change "GCC" to "Bison" in copyright notice. timevar.def's
2107 author is Akim, so change that too.
2108
2109 * src/reader.c (grammar_current_rule_check):
2110 Don't worry about the default action if $$ is untyped.
2111 Prevents bogus warnings reported by Jim Gifford in
2112 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
2113
2114 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
2115 * data/glr.c, data/lalr1.cc, data/yacc.c:
2116 Output token definitions before the first part of user declarations.
2117 Fixes compatibility problem reported by Jim Gifford for kbd in
2118 <http://mail.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
2119
2120 2002-10-11 Paul Eggert <eggert@twinsun.com>
2121
2122 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
2123 (yyparse): here. This undoes some of the 2002-07-25 change.
2124 Compatibility problem reported by Ralf S. Engelschall with
2125 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
2126
2127 2002-10-11 Akim Demaille <akim@epita.fr>
2128
2129 * tests/regression.at Characters Escapes): New.
2130 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
2131 characters.
2132 Reported by Jan Nieuwenhuizen.
2133
2134 2002-10-11 Akim Demaille <akim@epita.fr>
2135
2136 * po/id.po: New.
2137
2138 2002-10-10 Paul Eggert <eggert@twinsun.com>
2139
2140 Portability fixes for bitsets; this also avoids several GCC
2141 warnings.
2142
2143 * lib/abitset.c: Include <stddef.h>, for offsetof.
2144 * lib/lbitset.c: Likewise.
2145
2146 * lib/abitset.c (abitset_bytes): Return a size that is aligned
2147 properly for vectors of objects. Do not assume that adding a
2148 header size to a multiple of a word size yields a value that is
2149 properly aligned for the whole union.
2150 * lib/bitsetv.c (bitsetv_alloc): Likewise.
2151
2152 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
2153 unique names for structures.
2154 * lib/ebitset.c (ebitset_bytes): Likewise.
2155 * lib/lbitset.c (lbitset_bytes): Likewise.
2156
2157 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
2158 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
2159 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
2160 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
2161 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
2162 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
2163 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
2164 to improve the type-checking that GCC can do.
2165 * lib/bitset.c (bitset_op4_cmp): Likewise.
2166 * lib/bitset_stats.c (bitset_stats_count,
2167 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
2168 bitset_stats_copy, bitset_stats_disjoint_p,
2169 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
2170 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
2171 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
2172 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
2173 bitset_stats_and_or_cmp, bitset_stats_andn_or,
2174 bitset_stats_andn_or_cmp, bitset_stats_or_and,
2175 bitset_stats_or_and_cmp): Likewise.
2176 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
2177 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
2178 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
2179 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
2180
2181 * lib/abitset.h: Include bitset.h, not bbitset.h.
2182 * lib/ebitset.h: Likewise.
2183 * lib/lbitset.h: Likewise.
2184
2185 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
2186 All instances of parameters of type enum bitset_opts are now of
2187 type enum_bitset_opts, to conform to the C Standard, and similarly
2188 for enum_bitset_type.
2189 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
2190 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
2191
2192 Do not use "struct bitset_struct" to mean different things in
2193 different modules. Not only is this confusing, it violates
2194 the C Standard, which requires that structure types in different
2195 modules must be compatible if one is to be passed to the other.
2196 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
2197 All instances of "struct bitset_struct *" replaced with "bitset".
2198 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
2199 (union bitset_union, struct abitset_struct, struct ebitset_struct,
2200 struct lbitset_struct, struct bitset_stats_struct): New types.
2201 All uses of struct bitset_struct changed to union bitset_union,
2202 etc.
2203 * lib/abitset.c (struct abitset_struct, abitset,
2204 struct bitset_struct): Remove.
2205 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
2206 struct bitset_struct): Remove.
2207 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
2208 bitset_struct): Remove.
2209 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
2210 Likewise.
2211
2212 Do not call a function of type T using a call that assumes the
2213 function is of a different type U. Standard C requires that a
2214 function must be called with a type that is compatible with its
2215 definition.
2216 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
2217 New decls.
2218 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
2219 New functions.
2220 * lib/ebitset.c (PFV): Remove.
2221 * lib/lbitset.c (PFV): Likewise.
2222 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
2223 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
2224 decls.
2225 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
2226 (ebitset_vtable): Use them.
2227 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
2228 lbitset_xor): New functions.
2229 (lbitset_vtable): Use them.
2230
2231 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
2232 Declare.
2233
2234 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
2235 GCC warning.
2236 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
2237 Use offsetof, for simplicity.
2238
2239 2002-10-06 Paul Eggert <eggert@twinsun.com>
2240
2241 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
2242 the same width as int. This reapplies a hunk of the 2002-08-12 patch
2243 <http://mail.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
2244 which was inadvertently undone by the 2002-09-30 patch.
2245 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
2246 the same width as int.
2247
2248 2002-10-04 Paul Eggert <eggert@twinsun.com>
2249
2250 Version 1.50.
2251
2252 * configure.ac (AC_INIT), NEWS: Increment version number.
2253
2254 * doc/bison.texinfo: Minor spelling, grammar, and white space
2255 fixes.
2256 (Symbols): Mention that any negative value returned from yylex
2257 signifies end-of-input. Warn about negative chars. Mention
2258 the portable Standard C character set.
2259
2260 The GNU coding standard says CFLAGS and YFLAGS are reserved
2261 for the installer to set.
2262 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
2263 * src/Makefile.am (AM_CFLAGS): Likewise.
2264 (AM_YFLAGS): Renamed from YFLAGS.
2265
2266 Fix some MAX and MIN problems.
2267 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
2268 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
2269 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
2270 * src/reader.c (reader): Use it.
2271
2272 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
2273 POSIX 1003.1-2001 has removed fgrep.
2274
2275 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
2276
2277 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
2278 interpreted as signed.
2279 * lib/ebitset.c (ebitset_list): Fix bug.
2280
2281 2002-10-01 Paul Eggert <eggert@twinsun.com>
2282
2283 More fixes for 64-bit hosts and large bitsets.
2284
2285 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
2286 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
2287 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
2288 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
2289 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
2290 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
2291 bitset_count_): Likewise.
2292 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
2293 bitset_first, bitset_last): Likewise.
2294 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
2295 bitset_stats_list_reverse, bitset_stats_size,
2296 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
2297 Likewise.
2298 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
2299 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
2300 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
2301 bitsetv_reflexive_transitive_closure): Likewise.
2302 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
2303 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
2304 Likewise.
2305 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
2306 Likewise.
2307
2308 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
2309 Use size_t, not unsigned int, to count bytes.
2310 * lib/abitset.h (abitset_bytes): Likewise.
2311 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
2312 Likewise.
2313 * lib/bitset.h (bitset_bytes): Likewise.
2314 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
2315 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
2316 * lib/bitsetv.c (bitsetv_alloc): Likewise.
2317 * lib/ebitset.c (ebitset_bytes): Likewise.
2318 * lib/ebitset.h (ebitset_bytes): Likewise.
2319 * lib/lbitset.c (lbitset_bytes): Likewise.
2320 * lib/lbitset.h (lbitset_bytes): Likewise.
2321
2322 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
2323 abitset_subset_p, abitset_disjoint_p, abitset_and,
2324 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
2325 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
2326 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
2327 abitset_or_and, abitset_or_and_cmp):
2328 Use bitset_windex instead of unsigned int.
2329 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
2330 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
2331 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
2332 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
2333 Likewise.
2334 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
2335
2336 * lib/bitset.c (bitset_print):
2337 Use proper printf formats for widths of integer types.
2338 * lib/bitset_stats.c (bitset_percent_histogram_print,
2339 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
2340 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
2341 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
2342 * lib/lbitset.c (lbitset_bytes): Likewise.
2343
2344 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
2345 BITSET_SIZE_MAX): New macros.
2346 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
2347 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
2348 to BITSET_WINDEX_MAX.
2349
2350 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
2351 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
2352 since we now return the bitset_bindex type (not int).
2353
2354 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
2355 when computing sizes.
2356 * lib/ebitset.c (ebitset_elts_grow): Likewise.
2357
2358 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
2359 and avoid cast to unsigned.
2360
2361 2002-09-30 Akim Demaille <akim@epita.fr>
2362
2363 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
2364 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
2365 Updates from Michael Hayes.
2366
2367 2002-09-30 Art Haas <ahaas@neosoft.com>
2368
2369 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
2370 invocations.
2371 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
2372 defined.
2373
2374 2002-09-27 Akim Demaille <akim@epita.fr>
2375
2376 Version 1.49c.
2377
2378 2002-09-27 Akim Demaille <akim@epita.fr>
2379
2380 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
2381 (Because of AC_LIBSOURCE).
2382
2383 2002-09-27 Akim Demaille <akim@epita.fr>
2384
2385 Playing with Autoscan.
2386
2387 * configure.ac: Remove the old LIBOBJ tweaks.
2388 (AC_REPLACE_FUNCS): Add strrchr and strtol.
2389 * lib/strrchr.c: New.
2390 * lib/strtol.c: New, from the Coreutils 4.5.1.
2391
2392 2002-09-27 Akim Demaille <akim@epita.fr>
2393
2394 Playing with Autoscan.
2395
2396 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
2397 * lib/Makefile.am (libbison_a_SOURCES): No longer include
2398 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
2399 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
2400 Coreutils 4.5.1.
2401
2402 2002-09-24 Akim Demaille <akim@epita.fr>
2403
2404 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
2405 (Frequently Asked Questions, Parser Stack Overflow): New.
2406
2407 2002-09-13 Akim Demaille <akim@epita.fr>
2408
2409 Playing with autoscan.
2410
2411 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
2412 * src/files.c (skeleton_find): Remove, unused.
2413 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
2414 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
2415
2416 2002-09-13 Akim Demaille <akim@epita.fr>
2417
2418 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
2419 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
2420
2421 2002-09-13 Akim Demaille <akim@epita.fr>
2422
2423 * configure.ac: Require 2.54.
2424 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
2425 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
2426 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
2427 Remove, provided by Autoconf macros.
2428
2429 2002-09-12 Akim Demaille <akim@epita.fr>
2430
2431 * m4/prereq.m4: Update, from Coreutils 4.5.1.
2432
2433 2002-09-12 Akim Demaille <akim@epita.fr>
2434
2435 * m4/prereq.m4: Update, from Fileutils 4.1.5.
2436 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
2437 Reported by Martin Mokrejs.
2438
2439 2002-09-10 Akim Demaille <akim@epita.fr>
2440
2441 * src/parse-gram.y: Associate a human readable string to each
2442 token type.
2443 * tests/regression.at (Invalid inputs): Adjust.
2444
2445 2002-09-10 Gary V. Vaughan <gary@gnu.org>
2446
2447 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
2448 with an Autoconf-2.5x style configure.ac.
2449
2450 2002-09-06 Paul Eggert <eggert@twinsun.com>
2451
2452 * doc/bison.texinfo (Conditions): Make explicit that the GPL
2453 exception applies only to yacc.c. This is a modification of a
2454 patch originally suggested by Akim Demaille.
2455
2456 2002-09-06 Akim Demaille <akim@epita.fr>
2457
2458 * data/c.m4 (b4_copyright): Move the GPL exception comment from
2459 here to...
2460 * data/yacc.c: here.
2461
2462 * data/lalr1.cc (struct yyltype): Don't define it, since we use
2463 LocationType.
2464 (b4_ltype): Default to yy::Location from location.hh.
2465
2466 2002-09-04 Jim Meyering <jim@meyering.net>
2467
2468 * data/yacc.c: Guard the declaration of yytoknum also with
2469 `#ifdef YYPRINT', so it is declared only when used.
2470
2471 2002-09-04 Akim Demaille <akim@epita.fr>
2472
2473 * configure.in: Rename as...
2474 * configure.ac: this.
2475 Bump to 1.49c.
2476
2477 2002-09-04 Akim Demaille <akim@epita.fr>
2478
2479 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
2480 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
2481 translate maintainer only messages.
2482
2483 2002-08-12 Paul Eggert <eggert@twinsun.com>
2484
2485 Version 1.49b.
2486
2487 * Makefile.am (SUBDIRS): Remove intl.
2488 (DISTCLEANFILES): Remove.
2489 * NEWS: Mention that GNU M4 is now required. Clarify what is
2490 meant by "larger grammars". Mention the pt_BR translation.
2491 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
2492 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
2493 Bump version from 0.11.2 to 0.11.5.
2494 (BISON_PREREQ_STAGE): Remove.
2495 (AM_GNU_GETTEXT): Use external gettext.
2496 (AC_OUTPUT): Remove intl/Makefile.
2497
2498 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
2499
2500 * data/glr.c: Include string.h, for strlen.
2501 (yyreportParseError): Use size_t for yysize.
2502 (yy_yypstack): No longer nested inside yypstates, as nested
2503 functions are not portable. Do not assume size_t is the
2504 same width as int.
2505 (yypstates): Do not assume that ptrdiff_t is the same width
2506 as int, and similarly for yyposn and YYINDEX.
2507
2508 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
2509
2510 * lib/Makefile.am (INCLUDES): Do not include from the intl
2511 directory, which has been removed.
2512 * src/Makefile.am (INCLUDES): Likewise.
2513
2514 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
2515 (bitsets_sources, additional_bitsets_sources, timevars_sources):
2516 New vars.
2517
2518 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
2519 * tests/Makefile.am (EXTRA_DIST): Likewise.
2520
2521 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
2522 Do not assume that bitset_windex is the same width as unsigned.
2523
2524 * lib/abitset.c (abitset_unused_clear): Do not assume that
2525 bitset_word is the same width as int.
2526 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
2527 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
2528 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
2529 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
2530 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
2531
2532 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
2533 portability to one's complement hosts!).
2534 * lib/ebitset.c (ebitset_op1): Likewise.
2535 * lib/lbitset.c (lbitset_op1): Likewise.
2536
2537 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
2538 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
2539 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
2540 Sync with fileutils.
2541 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
2542 lib/gettext.h: Sync with diffutils.
2543
2544 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
2545 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
2546
2547 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
2548 PROTOTYPES to check for prototypes, and "defined __STDC__" to
2549 check for void *.
2550
2551 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
2552 size_t; the old version tried to do this but casted improperly.
2553 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
2554 (bitset_test): Now returns int, not unsigned long.
2555
2556 * lib/bitset_stats.c: Include "gettext.h".
2557 (_): New macro.
2558 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
2559 name locals "index", as it generates unnecessary warnings on some
2560 hosts that have an "index" function.
2561
2562 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
2563 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
2564 they need translation.
2565 * src/LR0.c (state_list_append, new_itemsets, get_state,
2566 append_states, generate_states): Likewise.
2567 * src/assoc.c (assoc_to_string): Likewise.
2568 * src/closure.c (print_closure, set_firsts, closure): Likewise.
2569 * src/gram.c (grammar_dump): Likewise.
2570 * src/injections.c (injections_compute): Likewise.
2571 * src/lalr.c (lookaheads_print): Likewise.
2572 * src/relation.c (relation_transpose): Likewise.
2573 * src/scan-gram.l: Likewise.
2574 * src/tables.c (table_grow, pack_vector): Likewise.
2575
2576 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
2577 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
2578 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
2579 * m4/mbstate_t.m4: Sync with fileutils.
2580 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
2581
2582 * po/LINGUAS: Add pt_BR.
2583 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
2584 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
2585 lib/timevar.c.
2586 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
2587 manual recommends.
2588 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
2589
2590 * src/complain.c (strerror_r): Remove decl; not needed.
2591 (strerror): Use same pattern as ../lib/error.c.
2592
2593 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
2594
2595 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
2596
2597 * src/main.c (main): Cast result of bindtextdomain and textdomain
2598 to void, to avoid a GCC warning when --disable-nls is in effect.
2599
2600 * src/scan-gram.l: Use strings rather than escapes when possible,
2601 to minimize the number of warnings from xgettext.
2602 (handle_action_dollar, handle_action_at): Don't use isdigit,
2603 as it mishandles negative chars and it may not work as expected
2604 outside the C locale.
2605
2606 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
2607 this is a GCC extension and is not portable to other compilers.
2608
2609 * src/system.h (alloca): Use same pattern as ../lib/error.c.
2610 Do not include <ctype.h>; no longer needed.
2611 Do not include <malloc.h>; no longer needed (and generates
2612 warnings on OpenBSD 3.0).
2613
2614 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
2615 it's not portable.
2616
2617 * tests/regression.at: Do not use 'cc -c input.c -o input';
2618 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
2619
2620 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
2621 exit status as failure, not just exit status 1. Sun C exits
2622 with status 2 sometimes.
2623
2624 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
2625 Use it for the two large tests.
2626
2627 2002-08-02 Akim Demaille <akim@epita.fr>
2628
2629 * src/conflicts.c (conflicts_output): Don't output rules never
2630 reduced here, since anyway that computation doesn't work.
2631 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
2632 (rule_useless_p, rule_never_reduced_p): New.
2633 (grammar_rules_partial_print): Use a filter instead of a range.
2634 Display the title only if needed.
2635 (grammar_rules_print): Adjust.
2636 (grammar_rules_never_reduced_report): New.
2637 * src/tables.c (action_row): Move the computation of rules never
2638 reduced to...
2639 (token_actions): here.
2640 * src/main.c (main): Make the parser before making the report, so
2641 that rules never reduced are computed.
2642 Call grammar_rules_never_reduced_report.
2643 * src/print.c (print_results): Report rules never reduced.
2644 * tests/conflicts.at, tests/reduce.at: Adjust.
2645
2646 2002-08-01 Akim Demaille <akim@epita.fr>
2647
2648 Instead of attaching lookaheads and duplicating the rules being
2649 reduced by a state, attach the lookaheads to the reductions.
2650
2651 * src/state.h (state_t): Remove the `lookaheads',
2652 `lookaheads_rule' member.
2653 (reductions_t): Add a `lookaheads' member.
2654 Use a regular array for the `rules'.
2655 * src/state.c (reductions_new): Initialize the lookaheads member
2656 to 0.
2657 (state_rule_lookaheads_print): Adjust.
2658 * src/state.h, src/state.c (state_reductions_find): New.
2659 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
2660 (count_rr_conflicts): Adjust.
2661 * src/lalr.c (LArule): Remove.
2662 (add_lookback_edge): Adjust.
2663 (state_lookaheads_count): New.
2664 (states_lookaheads_initialize): Merge into...
2665 (initialize_LA): this.
2666 (lalr_free): Adjust.
2667 * src/main.c (main): Don't free nullable and derives too early: it
2668 is used by --verbose.
2669 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
2670
2671 2002-08-01 Akim Demaille <akim@epita.fr>
2672
2673 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
2674 `rule_number_t**'.
2675 (set_derives, free_derives): Rename as...
2676 (derives_compute, derives_free): this.
2677 Adjust all dependencies.
2678 * src/nullable.c (set_nullable, free_nullable): Rename as...
2679 (nullable_compute, nullable_free): these.
2680 (rule_list_t): Store rule_t *, not rule_number_t.
2681 * src/state.c (state_rule_lookaheads_print): Directly compare rule
2682 pointers, instead of their numbers.
2683 * src/main.c (main): Call nullable_free, and derives_free earlier,
2684 as they were lo longer used.
2685
2686 2002-08-01 Akim Demaille <akim@epita.fr>
2687
2688 * lib/timevar.c (get_time): Include children time.
2689 * src/lalr.h (LA, LArule): Don't export them: used with the
2690 state_t.
2691 * src/lalr.c (LA, LArule): Static.
2692 * src/lalr.h, src/lalr.c (lalr_free): New.
2693 * src/main.c (main): Call it.
2694 * src/tables.c (pack_vector): Check whether loc is >= to the
2695 table_size, not >.
2696 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
2697 (tables_generate): do it, since that's also it which allocates
2698 them.
2699 Don't free LA and LArule, main does.
2700
2701 2002-07-31 Akim Demaille <akim@epita.fr>
2702
2703 Separate parser tables computation and output.
2704
2705 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
2706 (conflict_list, conflict_list_cnt, table, check, table_ninf)
2707 (yydefgoto, yydefact, high): Move to...
2708 * src/tables.h, src/tables.c: here.
2709 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
2710 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
2711 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
2712 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
2713 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
2714 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
2715 (action_row, save_row, token_actions, save_column, default_goto)
2716 (goto_actions, sort_actions, matching_state, pack_vector)
2717 (table_ninf_remap, pack_table, prepare_actions): Move to...
2718 * src/tables.c: here.
2719 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
2720 * src/output.c (token_actions, output_base, output_conflicts)
2721 (output_check): Merge into...
2722 (prepare_actions): this.
2723 (actions_output): Rename as...
2724 (user_actions_output): this.
2725 * src/main.c (main): Call tables_generate and tables_free.
2726
2727 2002-07-31 Akim Demaille <akim@epita.fr>
2728
2729 Steal GCC's --time-report support.
2730
2731 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
2732 stolen/adjusted from GCC.
2733 * m4/stage.m4: Remove time related checks.
2734 * m4/timevar.m4: New.
2735 * configure.in: Adjust.
2736 * src/system.h: Adjust to using timevar.h.
2737 * src/getargs.h, src/getargs.c: Support trace_time for
2738 --trace=time.
2739 * src/main.c (stage): Remove.
2740 (main): Replace `stage' invocations with timevar calls.
2741 * src/output.c: Insert pertinent timevar calls.
2742
2743 2002-07-31 Akim Demaille <akim@epita.fr>
2744
2745 Let --trace have arguments.
2746
2747 * src/getargs.h (enum trace_e): New.
2748 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
2749 (long_options, short_options): --trace/-T takes an optional
2750 argument.
2751 Change all the uses of trace_flag to reflect the new flags.
2752 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
2753
2754 Strengthen `stage' portability.
2755
2756 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
2757 * configure.in: Use it.
2758 Don't check for malloc.h and sys/times.h.
2759 * src/system.h: Include them when appropriate.
2760 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
2761 times and struct tms are available.
2762
2763 2002-07-30 Akim Demaille <akim@epita.fr>
2764
2765 In verbose parse error message, don't report `error' as an
2766 expected token.
2767 * tests/actions.at (Printers and Destructors): Adjust.
2768 * tests/calc.at (Calculator $1): Adjust.
2769 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
2770 error message, do not report the parser accepts the error token in
2771 that state.
2772
2773 2002-07-30 Akim Demaille <akim@epita.fr>
2774
2775 Normalize conflict related messages.
2776
2777 * src/complain.h, src/complain.c (warn, complain): New.
2778 * src/conflicts.c (conflicts_print): Use them.
2779 (conflict_report_yacc): New, extracted from...
2780 (conflicts_print): here.
2781 * tests/conflicts.at, tests/existing.at: Adjust.
2782
2783 2002-07-30 Akim Demaille <akim@epita.fr>
2784
2785 Report rules which are never reduced by the parser: those hidden
2786 by conflicts.
2787
2788 * src/LR0.c (save_reductions): Don't make the final state too
2789 different: save its reduction (accept) instead of having a state
2790 without any action (no shift or goto, no reduce).
2791 Note: the final state is now a ``regular'' state, i.e., the
2792 parsers now contain `reduce 0' as default reduction.
2793 Nevertheless, since they decide to `accept' when yystate =
2794 final_state, they still will not reduce rule 0.
2795 * src/print.c (print_actions, print_reduction): Adjust.
2796 * src/output.c (action_row): Track reduced rules.
2797 (token_actions): Report rules never reduced.
2798 * tests/conflicts.at, tests/regression.at: Adjust.
2799
2800 2002-07-30 Akim Demaille <akim@epita.fr>
2801
2802 `stage' was accidently included in a previous patch.
2803 Initiate its autoconfiscation.
2804
2805 * configure.in: Look for malloc.h and sys/times.h.
2806 * src/main.c (stage): Adjust.
2807 Report only when trace_flag.
2808
2809 2002-07-29 Akim Demaille <akim@epita.fr>
2810
2811 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
2812 state_number_t.
2813 (errs_t): symbol_t*, not symbol_number_t.
2814 (reductions_t): rule_t*, not rule_number_t.
2815 (FOR_EACH_SHIFT): New.
2816 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
2817 * src/print.c, src/print_graph.c: Adjust.
2818
2819 2002-07-29 Akim Demaille <akim@epita.fr>
2820
2821 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
2822
2823 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
2824 (endtoken, accept): these.
2825 * src/reader.c (reader): Set endtoken's default tag to "$end".
2826 Set undeftoken's tag to "$undefined" instead of "$undefined.".
2827 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
2828 Adjust.
2829
2830 2002-07-29 Akim Demaille <akim@epita.fr>
2831
2832 * src/reduce.c (reduce_grammar): When the language is empty,
2833 complain about the start symbol, not the axiom.
2834 Use its location.
2835 * tests/reduce.at (Empty Language): New.
2836
2837 2002-07-26 Akim Demaille <akim@epita.fr>
2838
2839 * src/reader.h, src/reader.c (gram_error): ... can't get
2840 yycontrol without making too strong assumptions on the parser
2841 itself.
2842 * src/output.c (prepare_tokens): Use the real 0th value of
2843 token_translations instead of `0'.
2844 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
2845 visible here.
2846 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
2847 for the time being: %locations ought to provide it to yyerror.
2848
2849 2002-07-25 Akim Demaille <akim@epita.fr>
2850
2851 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
2852 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
2853 * tests/regression.at (Web2c Actions): Adjust.
2854
2855 2002-07-25 Akim Demaille <akim@epita.fr>
2856
2857 Stop storing rules from 1 to nrules + 1.
2858
2859 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
2860 * src/nullable.c, src/output.c, src/print.c, src/reader.c
2861 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
2862 Iterate from 0 to nrules.
2863 Use rule_number_as_item_number and item_number_as_rule_number.
2864 Adjust to `derive' now containing possibly 0.
2865 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
2866 Handle the `- 1' part in rule numbers from/to item numbers.
2867 * src/conflicts.c (log_resolution): Fix the message which reversed
2868 shift and reduce.
2869 * src/output.c (action_row): Initialize default_rule to -1.
2870 (token_actions): Adjust.
2871 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
2872 expected output.
2873 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
2874
2875 2002-07-25 Akim Demaille <akim@epita.fr>
2876
2877 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
2878 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
2879 (b4_c_knr_arg_decl): New.
2880 * data/yacc.c: Use it to define yysymprint, yydestruct, and
2881 yyreport_parse_error.
2882
2883 2002-07-25 Akim Demaille <akim@epita.fr>
2884
2885 * data/yacc.c (yyreport_parse_error): New, extracted from...
2886 (yyparse): here.
2887 (yydestruct, yysymprint): Move above yyparse.
2888 Be K&R compliant.
2889
2890 2002-07-25 Akim Demaille <akim@epita.fr>
2891
2892 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
2893 replace...
2894 (b4_sint_type, b4_uint_type): these.
2895 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
2896 * tests/regression.at (Web2c Actions): Adjust.
2897
2898 2002-07-25 Akim Demaille <akim@epita.fr>
2899
2900 * src/gram.h (TIEM_NUMBER_MAX): New.
2901 (item_number_of_rule_number, rule_number_of_item_number): Rename
2902 as...
2903 (rule_number_as_item_number, item_number_as_rule_number): these.
2904 Adjust dependencies.
2905 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
2906 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
2907 (symbol_number_to_vector_number): New.
2908 (order): Of vector_number_t* type.
2909 (base_t, BASE_MAX, BASE_MIN): New.
2910 (froms, tos, width, pos, check): Of base_t type.
2911 (action_number_t, ACTION_MIN, ACTION_MAX): New.
2912 (actrow): Of action_number_t type.
2913 (conflrow): Of unsigned int type.
2914 (table_ninf, base_ninf): New.
2915 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
2916 (muscle_insert_int_table, muscle_insert_base_table)
2917 (muscle_insert_rule_number_table): New.
2918 (prepare_tokens): Output `toknum' as int_table.
2919 (action_row): Returns a rule_number_t.
2920 Use ACTION_MIN, not SHRT_MIN.
2921 (token_actions): yydefact is rule_number_t*.
2922 (table_ninf_remap): New.
2923 (pack_table): Use it for `base' and `table'.
2924 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
2925 replaced with...
2926 (YYPACT_NINF, YYTABLE_NINF): these.
2927 (yypact, yytable): Compute their types instead of hard-coded
2928 `short'.
2929 * tests/regression.at (Web2c Actions): Adjust.
2930
2931 2002-07-19 Akim Demaille <akim@epita.fr>
2932
2933 * src/scan-gram.l (id): Can start with an underscore.
2934
2935 2002-07-16 Akim Demaille <akim@epita.fr>
2936
2937 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
2938 Adjust all former `associativity' dependencies.
2939 * src/symtab.c (symbol_new): Default associativity is `undef', not
2940 `right'.
2941 (symbol_check_alias_consistence): Adjust.
2942
2943 2002-07-09 Akim Demaille <akim@epita.fr>
2944
2945 * doc/bison.texinfo: Properly set the ``header'' part.
2946 Use @dircategory ``GNU programming tools'' as per Texinfo's
2947 documentation.
2948 Use @copying.
2949
2950 2002-07-09 Akim Demaille <akim@epita.fr>
2951
2952 * lib/quotearg.h: Protect against multiple inclusions.
2953 * src/location.h (location_t): Add a `file' member.
2954 (LOCATION_RESET, LOCATION_PRINT): Adjust.
2955 * src/complain.c (warn_at, complain_at, fatal_at): Drop
2956 `error_one_per_line' support.
2957
2958 2002-07-09 Akim Demaille <akim@epita.fr>
2959
2960 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
2961 * src/reader.c (lineno): Remove.
2962 Adjust all dependencies.
2963 (get_merge_function): Take a location and use complain_at.
2964 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
2965 * tests/regression.at (Invalid inputs, Mixing %token styles):
2966 Adjust.
2967
2968 2002-07-09 Akim Demaille <akim@epita.fr>
2969
2970 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
2971 recovery rule, and forbid extensions when --yacc.
2972 (gram_error): Use complain_at.
2973 * src/reader.c (reader): Exit if there were parse errors.
2974
2975 2002-07-09 Akim Demaille <akim@epita.fr>
2976
2977 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
2978 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
2979 Reported by R Blake <blakers@mac.com>.
2980
2981 2002-07-09 Akim Demaille <akim@epita.fr>
2982
2983 * data/yacc.c: Output the copyright notive in the header.
2984
2985 2002-07-03 Akim Demaille <akim@epita.fr>
2986
2987 * src/output.c (froms, tos): Are state_number_t.
2988 (save_column): sp, sp1, and sp2 are state_number_t.
2989 (prepare): Rename `final' as `final_state_number', `nnts' as
2990 `nterms_number', `nrules' as `rules_number', `nstates' as
2991 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
2992 unused.
2993 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
2994 * data/lalr1.cc (nsym_): Remove, unused.
2995
2996 2002-07-03 Akim Demaille <akim@epita.fr>
2997
2998 * src/lalr.h, src/lalr.c (goto_number_t): New.
2999 * src/lalr.c (goto_list_t): New.
3000 Propagate them.
3001 * src/nullable.c (rule_list_t): New.
3002 Propagate.
3003 * src/types.h: Remove.
3004
3005 2002-07-03 Akim Demaille <akim@epita.fr>
3006
3007 * src/closure.c (print_fderives): Use rule_rhs_print.
3008 * src/derives.c (print_derives): Use rule_rhs_print.
3009 (rule_list_t): New, replaces `shorts'.
3010 (set_derives): Add comments.
3011 * tests/sets.at (Nullable, Firsts): Adjust.
3012
3013 2002-07-03 Akim Demaille <akim@epita.fr>
3014
3015 * src/output.c (prepare_actions): Free `tally' and `width'.
3016 (prepare_actions): Allocate and free `order'.
3017 * src/symtab.c (symbols_free): Free `symbols'.
3018 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
3019 * src/output.c (m4_invoke): Move to...
3020 * src/scan-skel.l: here.
3021 (<<EOF>>): Close yyout, and free its name.
3022
3023 2002-07-03 Akim Demaille <akim@epita.fr>
3024
3025 Fix some memory leaks, and fix a bug: state 0 was examined twice.
3026
3027 * src/LR0.c (new_state): Merge into...
3028 (state_list_append): this.
3029 (new_states): Merge into...
3030 (generate_states): here.
3031 (set_states): Don't ensure a proper `errs' state member here, do it...
3032 * src/conflicts.c (conflicts_solve): here.
3033 * src/state.h, src/state.c: Comment changes.
3034 (state_t): Rename member `shifts' as `transitions'.
3035 Adjust all dependencies.
3036 (errs_new): For consistency, also take the values as argument.
3037 (errs_dup): Remove.
3038 (state_errs_set): New.
3039 (state_reductions_set, state_transitions_set): Assert that no
3040 previous value was assigned.
3041 (state_free): New.
3042 (states_free): Use it.
3043 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
3044 temporary storage: use `errs' and `nerrs' as elsewhere.
3045 (set_conflicts): Allocate and free this `errs'.
3046
3047 2002-07-02 Akim Demaille <akim@epita.fr>
3048
3049 * lib/libiberty.h: New.
3050 * lib: Update the bitset implementation from upstream.
3051 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
3052 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
3053 * src/main.c: Adjust bitset stats calls.
3054
3055 2002-07-01 Paul Eggert <eggert@twinsun.com>
3056
3057 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
3058 char, so that negative chars don't collide with $.
3059
3060 2002-06-30 Akim Demaille <akim@epita.fr>
3061
3062 Have the GLR tests be `warning' checked, and fix the warnings.
3063
3064 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
3065 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
3066 (yyremoveDeletes): `yyi' and `yyj' are size_t.
3067 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
3068 (yyaddDeferredAction): static.
3069 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
3070 (yyreportParseError): yyprefix is const.
3071 yytokenp is used only when verbose.
3072 (yy__GNUC__): Replace with __GNUC__.
3073 (yypdumpstack): yyi is size_t.
3074 (yypreference): Un-yy local variables and arguments, to avoid
3075 clashes with `yyr1'. Anyway, we are not in the user name space.
3076 (yytname_size): be an int, as is compared with ints.
3077 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
3078 Use them.
3079 * tests/cxx-gram.at: Use quotation to protect $1.
3080 Use AT_COMPILE to enable warnings hunts.
3081 Prototype yylex and yyerror.
3082 `Use' argc.
3083 Include `string.h', not `strings.h'.
3084 Produce and prototype stmtMerge only when used.
3085 yylex takes a location.
3086
3087 2002-06-30 Akim Demaille <akim@epita.fr>
3088
3089 We spend a lot of time in quotearg, in particular when --verbose.
3090
3091 * src/symtab.c (symbol_get): Store a quoted version of the key.
3092 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
3093 Adjust all callers.
3094
3095 2002-06-30 Akim Demaille <akim@epita.fr>
3096
3097 * src/state.h (reductions_t): Rename member `nreds' as num.
3098 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
3099 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
3100
3101 2002-06-30 Akim Demaille <akim@epita.fr>
3102
3103 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
3104 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
3105 (shifts_to): Rename as...
3106 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
3107 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
3108 (TRANSITION_IS_DISABLED, transitions_to): these.
3109
3110 2002-06-30 Akim Demaille <akim@epita.fr>
3111
3112 * src/print.c (print_shifts, print_gotos): Merge into...
3113 (print_transitions): this.
3114 (print_transitions, print_errs, print_reductions): Align the
3115 lookaheads columns.
3116 (print_core, print_transitions, print_errs, print_state,
3117 print_grammar): Output empty lines separator before, not after.
3118 (state_default_rule_compute): Rename as...
3119 (state_default_rule): this.
3120 * tests/conflicts.at (Defaulted Conflicted Reduction),
3121 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
3122 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
3123
3124 2002-06-30 Akim Demaille <akim@epita.fr>
3125
3126 Display items as we display rules.
3127
3128 * src/gram.h, src/gram.c (rule_lhs_print): New.
3129 * src/gram.c (grammar_rules_partial_print): Use it.
3130 * src/print.c (print_core): Likewise.
3131 * tests/conflicts.at (Defaulted Conflicted Reduction),
3132 (Unresolved SR Conflicts): Adjust.
3133 (Unresolved SR Conflicts): Adjust and rename as...
3134 (Resolved SR Conflicts): this, as was meant.
3135 * tests/regression.at (Web2c Report): Adjust.
3136
3137 2002-06-30 Akim Demaille <akim@epita.fr>
3138
3139 * src/print.c (state_default_rule_compute): New, extracted from...
3140 (print_reductions): here.
3141 Pessimize, but clarify the code.
3142 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
3143
3144 2002-06-30 Akim Demaille <akim@epita.fr>
3145
3146 * src/output.c (action_row): Let default_rule be always a rule
3147 number.
3148
3149 2002-06-30 Akim Demaille <akim@epita.fr>
3150
3151 * src/closure.c (print_firsts, print_fderives, closure):
3152 Use BITSET_EXECUTE.
3153 * src/lalr.c (lookaheads_print): Likewise.
3154 * src/state.c (state_rule_lookaheads_print): Likewise.
3155 * src/print_graph.c (print_core): Likewise.
3156 * src/print.c (print_reductions): Likewise.
3157 * src/output.c (action_row): Likewise.
3158 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
3159
3160 2002-06-30 Akim Demaille <akim@epita.fr>
3161
3162 * src/print_graph.c: Use report_flag.
3163
3164 2002-06-30 Akim Demaille <akim@epita.fr>
3165
3166 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
3167 to...
3168 * src/relation.h, src/relation.c (traverse, relation_digraph)
3169 (relation_print, relation_transpose): New.
3170
3171 2002-06-30 Akim Demaille <akim@epita.fr>
3172
3173 * src/state.h, src/state.c (shifts_to): New.
3174 * src/lalr.c (build_relations): Use it.
3175
3176 2002-06-30 Akim Demaille <akim@epita.fr>
3177
3178 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
3179 (item_number_of_rule_number, rule_number_of_item_number): New.
3180 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
3181 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
3182 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
3183 Propagate their use.
3184 Much remains to be done, in particular wrt `shorts' from types.h.
3185
3186 2002-06-30 Akim Demaille <akim@epita.fr>
3187
3188 * src/symtab.c (symbol_new): Initialize the `printer' member.
3189
3190 2002-06-30 Akim Demaille <akim@epita.fr>
3191
3192 * src/LR0.c (save_reductions): Remove, replaced by...
3193 * src/state.h, src/state.c (state_reductions_set): New.
3194 (reductions, errs): Rename as...
3195 (reductions_t, errs_t): these.
3196 Adjust all dependencies.
3197
3198 2002-06-30 Akim Demaille <akim@epita.fr>
3199
3200 * src/LR0.c (state_list_t, state_list_append): New.
3201 (first_state, last_state): Now symbol_list_t.
3202 (this_state): Remove.
3203 (new_itemsets, append_states, save_reductions): Take a state_t as
3204 argument.
3205 (set_states, generate_states): Adjust.
3206 (save_shifts): Remove, replaced by...
3207 * src/state.h, src/state.c (state_shifts_set): New.
3208 (shifts): Rename as...
3209 (shifts_t): this.
3210 Adjust all dependencies.
3211 * src/state.h (state_t): Remove the `next' member.
3212
3213 2002-06-30 Akim Demaille <akim@epita.fr>
3214
3215 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
3216 escaped in slot 0.
3217
3218 2002-06-30 Akim Demaille <akim@epita.fr>
3219
3220 Use hash.h for the state hash table.
3221
3222 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
3223 (allocate_storage): Use state_hash_new.
3224 (free_storage): Use state_hash_free.
3225 (new_state, get_state): Adjust.
3226 * src/lalr.h, src/lalr.c (states): Move to...
3227 * src/states.h (state_t): Remove the `link' member, no longer
3228 used.
3229 * src/states.h, src/states.c: here.
3230 (state_hash_new, state_hash_free, state_hash_lookup)
3231 (state_hash_insert, states_free): New.
3232 * src/states.c (state_table, state_compare, state_hash): New.
3233 * src/output.c (output_actions): Do not free states now, since we
3234 still need to know the final_state number in `prepare', called
3235 afterwards. Do it...
3236 * src/main.c (main): here: call states_free after `output'.
3237
3238 2002-06-30 Akim Demaille <akim@epita.fr>
3239
3240 * src/state.h, src/state.c (state_new): New, extracted from...
3241 * src/LR0.c (new_state): here.
3242 * src/state.h (STATE_ALLOC): Move to...
3243 * src/state.c: here.
3244 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
3245 * src/state.h, src/state.c: here.
3246
3247 2002-06-30 Akim Demaille <akim@epita.fr>
3248
3249 * src/reader.c (gensym): Rename as...
3250 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
3251 (getsym): Rename as...
3252 (symbol_get): this.
3253
3254 2002-06-30 Akim Demaille <akim@epita.fr>
3255
3256 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
3257 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
3258 * src/output.c, src/print.c, src/print_graph.c: Propagate.
3259 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
3260
3261 2002-06-30 Akim Demaille <akim@epita.fr>
3262
3263 Make the test suite pass with warnings checked.
3264
3265 * tests/actions.at (Printers and Destructors): Improve.
3266 Avoid unsigned vs. signed issues.
3267 * tests/calc.at: Don't exercise the scanner here, do it...
3268 * tests/input.at (Torturing the Scanner): here.
3269
3270 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3271
3272 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
3273 reorganize first lines parallel to yacc.c.
3274
3275 2002-06-28 Akim Demaille <akim@epita.fr>
3276
3277 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
3278 (b4_token_enum, b4_token_defines): New, factored from...
3279 * data/lalr1.cc, data/yacc.c, glr.c: here.
3280
3281 2002-06-28 Akim Demaille <akim@epita.fr>
3282
3283 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
3284 unused variables.
3285 * src/output.c (merger_output): static.
3286
3287 2002-06-28 Akim Demaille <akim@epita.fr>
3288
3289 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
3290 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
3291 pacify GCC.
3292 * src/output.c (save_row): Initialize all the variables to pacify GCC.
3293
3294 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3295
3296 Accumulated changelog for new GLR parsing features.
3297
3298 * src/conflicts.c (count_total_conflicts): Change name to
3299 conflicts_total_count.
3300 * src/conflicts.h: Ditto.
3301 * src/output.c (token_actions): Use the new name.
3302 (output_conflicts): Change conflp => conflict_list_heads, and
3303 confl => conflict_list for better readability.
3304 * data/glr.c: Use the new names.
3305 * NEWS: Add self to GLR announcement.
3306
3307 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
3308
3309 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
3310 Akim Demaille.
3311
3312 * data/bison.glr: Change name to glr.c
3313 * data/glr.c: Renamed from bison.glr.
3314 * data/Makefile.am: Add glr.c
3315
3316 * src/getargs.c:
3317
3318 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
3319 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
3320
3321 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3322
3323 * data/bison.glr: Be sure to restore the
3324 current #line when returning to the skeleton contents after having
3325 exposed the input file's #line.
3326
3327 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3328
3329 * data/bison.glr: Bring up to date with changes to bison.simple.
3330
3331 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3332
3333 * data/bison.glr: Correct definitions that use b4_prefix.
3334 Various reformatting.
3335 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
3336 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
3337 yytokenp argument; now part of stack.
3338 (yychar): Define to behave as documented.
3339 (yyclearin): Ditto.
3340
3341 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3342
3343 * src/reader.h: Add declaration for free_merger_functions.
3344
3345 * src/reader.c (merge_functions): New variable.
3346 (get_merge_function): New function.
3347 (free_merger_functions): New function.
3348 (readgram): Check for %prec that is not followed by a symbol.
3349 Handle %dprec and %merge declarations.
3350 (packgram): Initialize dprec and merger fields in rules array.
3351
3352 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
3353 conflict_list_cnt, conflict_list_free): New variables.
3354 (table_grow): Also grow conflict_table.
3355 (prepare_rules): Output dprec and merger tables.
3356 (conflict_row): New function.
3357 (action_row): Output conflict lists for GLR parser. Don't use
3358 default reduction in conflicted states for GLR parser so that there
3359 are spaces for the conflict lists.
3360 (save_row): Also save conflict information.
3361 (token_actions): Allocate conflict list.
3362 (merger_output): New function.
3363 (pack_vector): Pack conflict table, too.
3364 (output_conflicts): New function to output yyconflp and yyconfl.
3365 (output_check): Allocate conflict_tos.
3366 (output_actions): Output conflict tables, also.
3367 (output_skeleton): Output b4_mergers definition.
3368 (prepare): Output b4_max_rhs_length definition.
3369 Use 'bison.glr' as default skeleton for GLR parsers.
3370
3371 * src/gram.c (glr_parser): New flag.
3372 (grammar_free): Call free_merger_functions.
3373
3374 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
3375 all pairs of conflicting reductions, rather than just all tokens
3376 causing conflicts. Needed to size conflict tables.
3377 (conflicts_output): Modify call to count_rr_conflicts for new
3378 interface.
3379 (conflicts_print): Ditto.
3380 (count_total_conflicts): New function.
3381
3382 * src/reader.h (merger_list): New type.
3383 (merge_functions): New variable.
3384
3385 * src/lex.h (tok_dprec, tok_merge): New token types.
3386
3387 * src/gram.h (rule_s): Add dprec and merger fields.
3388 (glr_parser): New flag.
3389
3390 * src/conflicts.h (count_total_conflicts): New function.
3391
3392 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
3393
3394 * doc/bison.texinfo (Generalized LR Parsing): New section.
3395 (GLR Parsers): New section.
3396 (Language and Grammar): Mention GLR parsing.
3397 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
3398 Correct typo ("tge" -> "the").
3399
3400 * data/bison.glr: New skeleton for GLR parsing.
3401
3402 * tests/cxx-gram.at: New tests for GLR parsing.
3403
3404 * tests/testsuite.at: Include cxx-gram.at.
3405
3406 * tests/Makefile.am: Add cxx-gram.at.
3407
3408 * src/parse-gram.y:
3409
3410 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
3411
3412 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
3413
3414 2002-06-27 Akim Demaille <akim@epita.fr>
3415
3416 * src/options.h, src/options.c: Remove.
3417 * src/getargs.c (short_options, long_options): New.
3418
3419 2002-06-27 Akim Demaille <akim@epita.fr>
3420
3421 * data/bison.simple, data/bison.c++: Rename as...
3422 * data/yacc.c, data/lalr1.cc: these.
3423 * doc/bison.texinfo (Environment Variables): Remove.
3424
3425 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
3426
3427 * src/getargs.c (report_argmatch): Initialize strtok().
3428
3429 2002-06-20 Akim Demaille <akim@epita.fr>
3430
3431 * data/bison.simple (b4_symbol_actions): New, replaces...
3432 (b4_symbol_destructor, b4_symbol_printer): these.
3433 (yysymprint): Be sure to call YYPRINT only for tokens, and using
3434 user token numbers.
3435
3436 2002-06-20 Akim Demaille <akim@epita.fr>
3437
3438 * data/bison.simple (yydestructor): Rename as...
3439 (yydestruct): this.
3440
3441 2002-06-20 Akim Demaille <akim@epita.fr>
3442
3443 * src/symtab.h, src/symtab.c (symbol_type_set)
3444 (symbol_destructor_set, symbol_precedence_set): The location is
3445 the last argument.
3446 Adjust all callers.
3447
3448 2002-06-20 Akim Demaille <akim@epita.fr>
3449
3450 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
3451 internals.
3452 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
3453 Takes a location.
3454 * src/symtab.h, src/symtab.c (symbol_class_set)
3455 (symbol_user_token_number_set): Likewise.
3456 Adjust all callers.
3457 Promote complain_at.
3458 * tests/input.at (Type Clashes): Adjust.
3459
3460 2002-06-20 Akim Demaille <akim@epita.fr>
3461
3462 * data/bison.simple (YYLEX): Fix the declaration when
3463 %pure-parser.
3464
3465 2002-06-20 Akim Demaille <akim@epita.fr>
3466
3467 * data/bison.simple (yysymprint): Don't print the token number,
3468 just its name.
3469 * tests/actions.at (Destructors): Rename as...
3470 (Printers and Destructors): this.
3471 Also exercise %printer.
3472
3473 2002-06-20 Akim Demaille <akim@epita.fr>
3474
3475 * data/bison.simple (YYDSYMPRINT): New.
3476 Use it to remove many of the #if YYDEBUG/if (yydebug).
3477
3478 2002-06-20 Akim Demaille <akim@epita.fr>
3479
3480 * src/symtab.h, src/symtab.c (symbol_t): printer and
3481 printer_location are new members.
3482 (symbol_printer_set): New.
3483 * src/parse-gram.y (PERCENT_PRINTER): New token.
3484 Handle its associated rule.
3485 * src/scan-gram.l: Adjust.
3486 (handle_destructor_at, handle_destructor_dollar): Rename as...
3487 (handle_symbol_code_at, handle_symbol_code_dollar): these.
3488 * src/output.c (symbol_printers_output): New.
3489 (output_skeleton): Call it.
3490 * data/bison.simple (yysymprint): New. Cannot be named yyprint
3491 since there are already many grammar files with a user `yyprint'.
3492 Replace the calls to YYPRINT to calls to yysymprint.
3493 * tests/calc.at: Adjust.
3494 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
3495 taking advantage of parser very internal details (stack size!).
3496
3497 2002-06-20 Akim Demaille <akim@epita.fr>
3498
3499 * src/scan-gram.l: Complete the scanner with the missing patterns
3500 to pacify Flex.
3501 Use `quote' and `symbol_tag_get' where appropriate.
3502
3503 2002-06-19 Akim Demaille <akim@epita.fr>
3504
3505 * tests/actions.at (Destructors): Augment to test locations.
3506 * data/bison.simple (yydestructor): Pass it the current location
3507 if locations are enabled.
3508 Prototype only when __STDC__ or C++.
3509 Change the argument names to move into the yy name space: there is
3510 user code here.
3511
3512 2002-06-19 Akim Demaille <akim@epita.fr>
3513
3514 * data/bison.simple (b4_pure_if): New.
3515 Use it instead of #ifdef YYPURE.
3516
3517 2002-06-19 Akim Demaille <akim@epita.fr>
3518
3519 * data/bison.simple (b4_location_if): New.
3520 Use it instead of #ifdef YYLSP_NEEDED.
3521
3522 2002-06-19 Akim Demaille <akim@epita.fr>
3523
3524 Prepare @$ in %destructor, but currently don't bind it in the
3525 skeleton, as %location use is not cleaned up yet.
3526
3527 * src/scan-gram.l (handle_dollar, handle_destructor_at)
3528 (handle_action_at): New.
3529 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
3530 a braced_code_t and a location as additional arguments.
3531 (handle_destructor_dollar): Instead of requiring `b4_eval', just
3532 unquote one when outputting `b4_dollar_dollar'.
3533 Adjust callers.
3534 * data/bison.simple (b4_eval): Remove.
3535 (b4_symbol_destructor): Adjust.
3536 * tests/input.at (Invalid @n): Adjust.
3537
3538 2002-06-19 Zack Weinberg <zack@codesourcery.com>
3539
3540 * doc/bison.texinfo: Document ability to have multiple
3541 prologue sections.
3542
3543 2002-06-18 Akim Demaille <akim@epita.fr>
3544
3545 * src/files.c (compute_base_names): When computing the output file
3546 names from the input file name, strip the directory part.
3547
3548 2002-06-18 Akim Demaille <akim@epita.fr>
3549
3550 * data/bison.simple.new: Comment changes.
3551 Reported by Andreas Schwab.
3552
3553 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
3554
3555 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
3556 there are no `label `yyoverflowlab' defined but not used' warnings
3557 when yyoverflow is defined.
3558
3559 2002-06-18 Akim Demaille <akim@epita.fr>
3560
3561 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
3562 new member.
3563 (symbol_destructor_set): Adjust.
3564 * src/output.c (symbol_destructors_output): Output the destructor
3565 locations.
3566 Output the symbol name.
3567 * data/bison.simple (b4_symbol_destructor): Adjust.
3568
3569 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
3570 and Akim Demaille <akim@epita.fr>
3571
3572 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
3573 what's left on the stack when the error recovery hits EOF.
3574 * tests/actions.at (Destructors): Complete to exercise this case.
3575
3576 2002-06-17 Akim Demaille <akim@epita.fr>
3577
3578 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
3579 arguments is really empty, not only equal to `[]'.
3580 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
3581 member.
3582 (symbol_destructor_set): New.
3583 * src/output.c (symbol_destructors_output): New.
3584 * src/reader.h (brace_code_t, current_braced_code): New.
3585 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
3586 (handle_dollar): Rename as...
3587 (handle_action_dollar): this.
3588 (handle_destructor_dollar): New.
3589 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
3590 (grammar_declaration): Use it.
3591 * data/bison.simple (yystos): Is always defined.
3592 (yydestructor): New.
3593 * tests/actions.at (Destructors): New.
3594 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
3595
3596 2002-06-17 Akim Demaille <akim@epita.fr>
3597
3598 * src/symlist.h, src/symlist.c (symbol_list_length): New.
3599 * src/scan-gram.l (handle_dollar, handle_at): Compute the
3600 rule_length only when needed.
3601 * src/output.c (actions_output, token_definitions_output): Output
3602 the full M4 block.
3603 * src/symtab.c: Don't access directly to the symbol tag, use
3604 symbol_tag_get.
3605 * src/parse-gram.y: Use symbol_list_free.
3606
3607 2002-06-17 Akim Demaille <akim@epita.fr>
3608
3609 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
3610 (symbol_list_prepend, get_type_name): Move to...
3611 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
3612 (symbol_list_prepend, symbol_list_n_type_name_get): here.
3613 Adjust all callers.
3614 (symbol_list_free): New.
3615 * src/scan-gram.l (handle_dollar): Takes a location.
3616 * tests/input.at (Invalid $n): Adjust.
3617
3618 2002-06-17 Akim Demaille <akim@epita.fr>
3619
3620 * src/reader.h, src/reader.c (symbol_list_new): Export it.
3621 (symbol_list_prepend): New.
3622 * src/parse-gram.y (%union): `list' is a new member.
3623 (symbols.1): New, replaces...
3624 (terms_to_prec.1, nterms_to_type.1): these.
3625 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
3626 Take a location as additional argument.
3627 Adjust all callers.
3628
3629 2002-06-15 Akim Demaille <akim@epita.fr>
3630
3631 * src/parse-gram.y: Move %token in the declaration section so that
3632 we don't depend upon CVS Bison.
3633
3634 2002-06-15 Akim Demaille <akim@epita.fr>
3635
3636 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
3637 * src/print.c (print_core): Use it.
3638
3639 2002-06-15 Akim Demaille <akim@epita.fr>
3640
3641 * src/conflicts.c (log_resolution): Accept the rule involved in
3642 the sr conflicts instead of the lookahead number that points to
3643 that rule.
3644 (flush_reduce): Accept the current lookahead vector as argument,
3645 instead of the index in LA.
3646 (resolve_sr_conflict): Accept the current number of lookahead
3647 bitset to consider for the STATE, instead of the index in LA.
3648 (set_conflicts): Adjust.
3649 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
3650
3651 2002-06-15 Akim Demaille <akim@epita.fr>
3652
3653 * src/state.h (state_t): Replace the `lookaheadsp' member, a
3654 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
3655 Adjust all dependencies.
3656 * src/lalr.c (initialize_lookaheads): Split into...
3657 (states_lookaheads_count, states_lookaheads_initialize): these.
3658 (lalr): Adjust.
3659
3660 2002-06-15 Akim Demaille <akim@epita.fr>
3661
3662 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
3663 out of...
3664 (grammar_rules_print): here.
3665 * src/reduce.c (reduce_output): Use it.
3666 * tests/reduce.at (Useless Rules, Reduced Automaton)
3667 (Underivable Rules): Adjust.
3668
3669 2002-06-15 Akim Demaille <akim@epita.fr>
3670
3671 Copy BYacc's nice way to report the grammar.
3672
3673 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
3674 New.
3675 Don't print the rules' location, it is confusing and useless.
3676 (rule_print): Use grammar_rhs_print.
3677 * src/print.c (print_grammar): Use grammar_rules_print.
3678
3679 2002-06-15 Akim Demaille <akim@epita.fr>
3680
3681 Complete and rationalize `useless thing' warnings.
3682
3683 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
3684 (symbol_tag_print): New.
3685 Use them everywhere in place of accessing directly the tag member.
3686 * src/gram.h, src/gram.c (rule_print): New.
3687 Use it where a rule used to be printed `by hand'.
3688 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
3689 (reduce_grammar_tables): Report the useless rules.
3690 (reduce_print): Useless things are a warning, not an error.
3691 Report it as such.
3692 * tests/reduce.at (Useless Nonterminals, Useless Rules):
3693 (Reduced Automaton, Underivable Rules): Adjust.
3694 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
3695 * tests/conflicts.at (Unresolved SR Conflicts)
3696 (Solved SR Conflicts): Adjust.
3697
3698 2002-06-15 Akim Demaille <akim@epita.fr>
3699
3700 Let symbols have a location.
3701
3702 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
3703 (getsym): Adjust.
3704 Adjust all callers.
3705 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
3706 Use location_t, not int.
3707 * src/symtab.c (symbol_check_defined): Take advantage of the
3708 location.
3709 * tests/regression.at (Invalid inputs): Adjust.
3710
3711 2002-06-15 Akim Demaille <akim@epita.fr>
3712
3713 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
3714 (input): Don't try to initialize yylloc here, do it in the
3715 scanner.
3716 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
3717 * src/gram.h (rule_t): Change line and action_line into location
3718 and action_location, of location_t type.
3719 Adjust all dependencies.
3720 * src/location.h, src/location.c (empty_location): New.
3721 * src/reader.h, src/reader.c (grammar_start_symbol_set)
3722 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
3723 (grammar_current_rule_symbol_append)
3724 (grammar_current_rule_action_append): Expect a location as argument.
3725 * src/reader.c (grammar_midrule_action): Adjust to attach an
3726 action's location as dummy symbol location.
3727 * src/symtab.h, src/symtab.c (startsymbol_location): New.
3728 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
3729 the line numbers.
3730
3731 2002-06-14 Akim Demaille <akim@epita.fr>
3732
3733 Grammar declarations may be found in the grammar section.
3734
3735 * src/parse-gram.y (rules_or_grammar_declaration): New.
3736 (declarations): Each declaration may end with a semicolon, not
3737 just...
3738 (grammar_declaration): `"%union"'.
3739 (grammar): Branch to rules_or_grammar_declaration.
3740
3741 2002-06-14 Akim Demaille <akim@epita.fr>
3742
3743 * src/main.c (main): Invoke scanner_free.
3744
3745 2002-06-14 Akim Demaille <akim@epita.fr>
3746
3747 * src/output.c (m4_invoke): Extracted from...
3748 (output_skeleton): here.
3749 Free tempfile.
3750
3751 2002-06-14 Akim Demaille <akim@epita.fr>
3752
3753 * src/parse-gram.y (directives, directive, gram)
3754 (grammar_directives, precedence_directives, precedence_directive):
3755 Rename as...
3756 (declarations, declaration, grammar, grammar_declaration)
3757 (precedence_declaration, precedence_declarator): these.
3758 (symbol_declaration): New.
3759
3760 2002-06-14 Akim Demaille <akim@epita.fr>
3761
3762 * src/files.c (action_obstack): Remove, unused.
3763 (output_obstack): Remove it, and all its dependencies, as it is no
3764 longer needed.
3765 * src/reader.c (epilogue_set): Build the epilogue in the
3766 muscle_obstack.
3767 * src/output.h, src/output.c (muscle_obstack): Move to...
3768 * src/muscle_tab.h, src/muscle_tab.h: here.
3769 (muscle_init): Initialize muscle_obstack.
3770 (muscle_free): New.
3771 * src/main.c (main): Call it.
3772
3773 2002-06-14 Akim Demaille <akim@epita.fr>
3774
3775 * src/location.h: New, extracted from...
3776 * src/reader.h: here.
3777 * src/Makefile.am (noinst_HEADERS): Merge into
3778 (bison_SOURCES): this.
3779 Add location.h.
3780 * src/parse-gram.y: Use location_t instead of Bison's.
3781 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
3782 Use location_t instead of ints.
3783
3784 2002-06-14 Akim Demaille <akim@epita.fr>
3785
3786 * data/bison.simple, data/bison.c++: Be sure to restore the
3787 current #line when returning to the skeleton contents after having
3788 exposed the input file's #line.
3789
3790 2002-06-12 Akim Demaille <akim@epita.fr>
3791
3792 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
3793 eager.
3794 * tests/actions.at (Exotic Dollars): New.
3795
3796 2002-06-12 Akim Demaille <akim@epita.fr>
3797
3798 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
3799 ['"/] too eagerly.
3800 * tests/input.at (Torturing the Scanner): New.
3801
3802 2002-06-11 Akim Demaille <akim@epita.fr>
3803
3804 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
3805 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
3806 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
3807 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
3808 * src/reader.c (reader): Use it.
3809
3810 2002-06-11 Akim Demaille <akim@epita.fr>
3811
3812 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
3813 Adjust all callers.
3814 (scanner_last_string_free): New.
3815
3816 2002-06-11 Akim Demaille <akim@epita.fr>
3817
3818 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
3819 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
3820 (last_string, YY_OBS_FREE): New.
3821 Use them when returning an ID.
3822
3823 2002-06-11 Akim Demaille <akim@epita.fr>
3824
3825 Have Bison grammars parsed by a Bison grammar.
3826
3827 * src/reader.c, src/reader.h (prologue_augment): New.
3828 * src/reader.c (copy_definition): Remove.
3829
3830 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
3831 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
3832 (grammar_current_rule_prec_set, grammar_current_rule_check)
3833 (grammar_current_rule_symbol_append)
3834 (grammar_current_rule_action_append): Export.
3835 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
3836 (symbol_list_action_append): Remove.
3837 Hook the routines from reader.
3838 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
3839 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
3840
3841 * src/reader.c (read_declarations): Remove, unused.
3842
3843 * src/parse-gram.y: Handle the epilogue.
3844 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
3845 (grammar_start_symbol_set): this.
3846 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
3847 * src/reader.c (readgram): Remove, unused.
3848 (reader): Adjust to insert eoftoken and axiom where appropriate.
3849
3850 * src/reader.c (copy_dollar): Replace with...
3851 * src/scan-gram.h (handle_dollar): this.
3852 * src/parse-gram.y: Remove `%thong'.
3853
3854 * src/reader.c (copy_at): Replace with...
3855 * src/scan-gram.h (handle_at): this.
3856
3857 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
3858 New.
3859
3860 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
3861 time being.
3862
3863 * src/reader.h, src/reader.c (grammar_rule_end): New.
3864
3865 * src/parse.y (current_type, current_class): New.
3866 Implement `%nterm', `%token' support.
3867 Merge `%term' into `%token'.
3868 (string_as_id): New.
3869 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
3870 type name.
3871
3872 * src/parse-gram.y: Be sure to handle properly the beginning of
3873 rules.
3874
3875 * src/parse-gram.y: Handle %type.
3876 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
3877
3878 * src/parse-gram.y: More directives support.
3879 * src/options.c: No longer handle source directives.
3880
3881 * src/parse-gram.y: Fix %output.
3882
3883 * src/parse-gram.y: Handle %union.
3884 Use the prologue locations.
3885 * src/reader.c (parse_union_decl): Remove.
3886
3887 * src/reader.h, src/reader.c (epilogue_set): New.
3888 * src/parse-gram.y: Use it.
3889
3890 * data/bison.simple, data/bison.c++: b4_stype is now either not
3891 defined, then default to int, or to the contents of %union,
3892 without `union' itself.
3893 Adjust.
3894 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
3895
3896 * src/output.c (actions_output): Don't output braces, as they are
3897 already handled by the scanner.
3898
3899 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
3900 characters to themselves.
3901
3902 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
3903 that the epilogue has a proper #line.
3904
3905 * src/parse-gram.y: Handle precedence/associativity.
3906
3907 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
3908 a terminal.
3909 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
3910 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
3911 at all to define terminals that cannot be emitted.
3912
3913 * src/scan-gram.l: Escape M4 characters.
3914
3915 * src/scan-gram.l: Working properly with escapes in user
3916 strings/characters.
3917
3918 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
3919 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
3920 grammar.
3921 Use more modest sizes, as for the time being the parser does not
3922 release memory, and therefore the process swallows a huge amount
3923 of memory.
3924
3925 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
3926 stricter %token grammar.
3927
3928 * src/symtab.h (associativity): Add `undef_assoc'.
3929 (symbol_precedence_set): Do nothing when passed an undef_assoc.
3930 * src/symtab.c (symbol_check_alias_consistence): Adjust.
3931
3932 * tests/regression.at (Invalid %directive): Remove, as it is now
3933 meaningless.
3934 (Invalid inputs): Adjust to the new error messages.
3935 (Token definitions): The new grammar doesn't allow too many
3936 eccentricities.
3937
3938 * src/lex.h, src/lex.c: Remove.
3939 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
3940 (copy_character, copy_string2, copy_string, copy_identifier)
3941 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
3942 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
3943 (parse_action): Remove.
3944 * po/POTFILES.in: Adjust.
3945
3946 2002-06-11 Akim Demaille <akim@epita.fr>
3947
3948 * src/reader.c (parse_action): Don't store directly into the
3949 rule's action member: return the action as a string.
3950 Don't require `rule_length' as an argument: compute it.
3951 (grammar_current_rule_symbol_append)
3952 (grammar_current_rule_action_append): New, eved out from
3953 (readgram): here.
3954 Remove `action_flag', `rulelength', unused now.
3955
3956 2002-06-11 Akim Demaille <akim@epita.fr>
3957
3958 * src/reader.c (grammar_current_rule_prec_set).
3959 (grammar_current_rule_check): New, eved out from...
3960 (readgram): here.
3961 Remove `xaction', `first_rhs': useless.
3962 * tests/input.at (Type clashes): New.
3963 * tests/existing.at (GNU Cim Grammar): Adjust.
3964
3965 2002-06-11 Akim Demaille <akim@epita.fr>
3966
3967 * src/reader.c (grammar_midrule_action): New, Eved out from
3968 (readgram): here.
3969
3970 2002-06-11 Akim Demaille <akim@epita.fr>
3971
3972 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
3973 New.
3974 (readgram): Use them as replacement of inlined code, crule and
3975 crule1.
3976
3977 2002-06-11 Akim Demaille <akim@epita.fr>
3978
3979 * src/reader.c (grammar_end, grammar_symbol_append): New.
3980 (readgram): Use them.
3981 Make the use of `p' as local as possible.
3982
3983 2002-06-10 Akim Demaille <akim@epita.fr>
3984
3985 GCJ's parser requires the tokens to be defined before the prologue.
3986
3987 * data/bison.simple: Output the token definition before the user's
3988 prologue.
3989 * tests/regression.at (Braces parsing, Duplicate string)
3990 (Mixing %token styles): Check the output from bison.
3991 (Early token definitions): New.
3992
3993 2002-06-10 Akim Demaille <akim@epita.fr>
3994
3995 * src/symtab.c (symbol_user_token_number_set): Don't complain when
3996 assigning twice the same user number to a token, so that we can
3997 use it in...
3998 * src/lex.c (lex): here.
3999 Also use `symbol_class_set' instead of hand written code.
4000 * src/reader.c (parse_assoc_decl): Likewise.
4001
4002 2002-06-10 Akim Demaille <akim@epita.fr>
4003
4004 * src/symtab.c, src/symtab.c (symbol_class_set)
4005 (symbol_user_token_number_set): New.
4006 * src/reader.c (parse_token_decl): Use them.
4007 Use a switch instead of ifs.
4008 Use a single argument.
4009
4010 2002-06-10 Akim Demaille <akim@epita.fr>
4011
4012 Remove `%thong' support as it is undocumented, unused, duplicates
4013 `%token's job, and creates useless e-mail traffic with people who
4014 want to know what it is, why it is undocumented, unused, and
4015 duplicates `%token's job.
4016
4017 * src/reader.c (parse_thong_decl): Remove.
4018 * src/options.c (option_table): Remove "thong".
4019 * src/lex.h (tok_thong): Remove.
4020
4021 2002-06-10 Akim Demaille <akim@epita.fr>
4022
4023 * src/symtab.c, src/symtab.c (symbol_type_set)
4024 (symbol_precedence_set): New.
4025 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
4026 (value_components_used): Remove, unused.
4027
4028 2002-06-09 Akim Demaille <akim@epita.fr>
4029
4030 Move symbols handling code out of the reader.
4031
4032 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
4033 (axiom): Move to...
4034 * src/symtab.h, src/symtab.c: here.
4035
4036 * src/gram.c (start_symbol): Remove: use startsymbol->number.
4037 * src/reader.c (startval): Rename as...
4038 * src/symtab.h, src/symtab.c (startsymbol): this.
4039 * src/reader.c: Adjust.
4040
4041 * src/reader.c (symbol_check_defined, symbol_make_alias)
4042 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
4043 (token_translations_init)
4044 Move to...
4045 * src/symtab.c: here.
4046 * src/reader.c (packsymbols): Move to...
4047 * src/symtab.h, src/symtab.c (symbols_pack): here.
4048 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
4049 argument.
4050
4051 2002-06-03 Akim Demaille <akim@epita.fr>
4052
4053 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
4054 then statements.
4055
4056 2002-06-03 Akim Demaille <akim@epita.fr>
4057
4058 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
4059 structs with non literals.
4060 * src/scan-skel.l: never-interactive.
4061 * src/conflicts.c (enum conflict_resolution_e): No trailing
4062 comma.
4063 * src/getargs.c (usage): Split long literal strings.
4064 Reported by Hans Aberg.
4065
4066 2002-05-28 Akim Demaille <akim@epita.fr>
4067
4068 * data/bison.c++: Use C++ ostreams.
4069 (cdebug_): New member.
4070
4071 2002-05-28 Akim Demaille <akim@epita.fr>
4072
4073 * src/output.c (output_skeleton): Be sure to allocate enough room
4074 for `/' _and_ for `\0' in full_skeleton.
4075
4076 2002-05-28 Akim Demaille <akim@epita.fr>
4077
4078 * data/bison.c++: Catch up with bison.simple:
4079 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4080 and Paul Eggert <eggert@twinsun.com>: `error' handing.
4081 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
4082 and popping traces.
4083
4084 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4085
4086 * src/output.c (output_skeleton): Put an explicit path in front of
4087 the skeleton file name, rather than relying on the -I directory,
4088 to partially alleviate effects of having a skeleton file lying around
4089 in the current directory.
4090
4091 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4092
4093 * src/conflicts.c (log_resolution): Correct typo:
4094 obstack_printf should be obstack_fgrow1.
4095
4096 2002-05-26 Akim Demaille <akim@epita.fr>
4097
4098 * src/state.h (state_t): `solved_conflicts' is a new member.
4099 * src/LR0.c (new_state): Set it to 0.
4100 * src/conflicts.h, src/conflicts.c (print_conflicts)
4101 (free_conflicts, solve_conflicts): Rename as...
4102 (conflicts_print, conflicts_free, conflicts_solve): these.
4103 Adjust callers.
4104 * src/conflicts.c (enum conflict_resolution_e)
4105 (solved_conflicts_obstack): New, used by...
4106 (log_resolution): this.
4107 Adjust to attach the conflict resolution to each state.
4108 Complete the description with the precedence/associativity
4109 information.
4110 (resolve_sr_conflict): Adjust.
4111 * src/print.c (print_state): Output its solved_conflicts.
4112 * tests/conflicts.at (Unresolved SR Conflicts)
4113 (Solved SR Conflicts): Exercise --report=all.
4114
4115 2002-05-26 Akim Demaille <akim@epita.fr>
4116
4117 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
4118 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
4119 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
4120 (token_number_t, item_number_as_token_number)
4121 (token_number_as_item_number, muscle_insert_token_number_table):
4122 Rename as...
4123 (symbol_number_t, item_number_as_symbol_number)
4124 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
4125 these, since it is more appropriate.
4126
4127 2002-05-26 Akim Demaille <akim@epita.fr>
4128
4129 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
4130 `Error:' lines.
4131 * data/bison.simple (yystos) [YYDEBUG]: New.
4132 (yyparse) [YYDEBUG]: Display the symbols which are popped during
4133 error recovery.
4134 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
4135
4136 2002-05-25 Akim Demaille <akim@epita.fr>
4137
4138 * doc/bison.texinfo (Debugging): Split into...
4139 (Tracing): this new section, its former contents, and...
4140 (Understanding): this new section.
4141 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
4142 by...
4143 (report_flag): this.
4144 Adjust all dependencies.
4145 (report_args, report_types, report_argmatch): New.
4146 (usage, getargs): Report/support -r, --report.
4147 * src/options.h
4148 (struct option_table_struct): Rename as..,
4149 (struct option_table_s): this.
4150 Rename the `set_flag' member to `flag' to match with getopt_long's
4151 struct.
4152 * src/options.c (option_table): Split verbose into an entry for
4153 %verbose, and another for --verbose.
4154 Support --report/-r, so remove -r from the obsolete --raw.
4155 * src/print.c: Attach full item sets and lookaheads reports to
4156 report_flag instead of trace_flag.
4157 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
4158
4159 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4160 and Paul Eggert <eggert@twinsun.com>
4161
4162 * data/bison.simple (yyparse): Correct error handling to conform to
4163 POSIX and yacc. Specifically, after syntax error is discovered,
4164 do not reduce further before shifting the error token.
4165 Clean up the code a bit by removing the labels yyerrdefault,
4166 yyerrhandle, yyerrpop.
4167 * NEWS: Document the above.
4168
4169 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4170
4171 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
4172 type; it isn't always big enough, since it doesn't necessarily
4173 include non-terminals.
4174 (yytranslate): Expand definition of yy_token_number_type, so that
4175 the latter can be removed.
4176 (yy_token_number_type): Remove, only one use.
4177 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
4178 don't use TokenNumberType as element type.
4179
4180 * tests/regression.at: Modify expected output to agree with change
4181 to yyr1 and yytranslate.
4182
4183 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
4184
4185 * src/reader.c (parse_action): Use copy_character instead of
4186 obstack_1grow.
4187
4188 2002-05-13 Akim Demaille <akim@epita.fr>
4189
4190 * tests/regression.at (Token definitions): Prototype yylex and
4191 yyerror.
4192
4193 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4194
4195 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
4196 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
4197 32-bit arithmetic.
4198 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
4199
4200 2002-05-07 Akim Demaille <akim@epita.fr>
4201
4202 * tests/synclines.at: Be sure to prototype yylex and yyerror to
4203 avoid GCC warnings.
4204
4205 2002-05-07 Akim Demaille <akim@epita.fr>
4206
4207 Kill GCC warnings.
4208
4209 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
4210 over the RHS of each rule.
4211 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
4212 * src/state.h (state_t): Member `nitems' is unsigned short.
4213 * src/LR0.c (get_state): Adjust.
4214 * src/reader.c (packgram): Likewise.
4215 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
4216 `Type'.
4217 (muscle_insert_int_table): Remove, unused.
4218 (prepare_rules): Remove `max'.
4219
4220 2002-05-06 Akim Demaille <akim@epita.fr>
4221
4222 * src/closure.c (print_firsts): Display of the symbol tags.
4223 (bitmatrix_print): Move to...
4224 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
4225 here.
4226 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
4227
4228 2002-05-06 Akim Demaille <akim@epita.fr>
4229
4230 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
4231 hash_do_for_each.
4232
4233 2002-05-06 Akim Demaille <akim@epita.fr>
4234
4235 * src/LR0.c (new_state, get_state): Instead of using the global
4236 `kernel_size' and `kernel_base', have two new arguments:
4237 `core_size' and `core'.
4238 Adjust callers.
4239
4240 2002-05-06 Akim Demaille <akim@epita.fr>
4241
4242 * src/reader.c (packgram): No longer end `ritem' with a 0
4243 sentinel: it is not used.
4244
4245 2002-05-05 Akim Demaille <akim@epita.fr>
4246
4247 New experimental feature: display the lookaheads in the report and
4248 graph.
4249
4250 * src/print (print_core): When --trace-flag, display the rules
4251 lookaheads.
4252 * src/print_graph.c (print_core): Likewise.
4253 Swap the arguments.
4254 Adjust caller.
4255
4256 2002-05-05 Akim Demaille <akim@epita.fr>
4257
4258 * tests/torture.at (Many lookaheads): New test.
4259
4260 2002-05-05 Akim Demaille <akim@epita.fr>
4261
4262 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
4263 (GENERATE_MUSCLE_INSERT_TABLE): this.
4264 (output_int_table, output_unsigned_int_table, output_short_table)
4265 (output_token_number_table, output_item_number_table): Replace with...
4266 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
4267 (muscle_insert_short_table, muscle_insert_token_number_table)
4268 (muscle_insert_item_number_table): these.
4269 Adjust all callers.
4270 (prepare_tokens): Don't free `translations', since...
4271 * src/reader.h, src/reader.c (grammar_free): do it.
4272 Move to...
4273 * src/gram.h, src/gram.c (grammar_free): here.
4274 * data/bison.simple, data/bison.c++: b4_token_number_max is now
4275 b4_translate_max.
4276
4277 2002-05-05 Akim Demaille <akim@epita.fr>
4278
4279 * src/output.c (output_unsigned_int_table): New.
4280 (prepare_rules): `i' is unsigned.
4281 `prhs', `rline', `r2' are unsigned int.
4282 Rename muscle `rhs_number_max' as `rhs_max'.
4283 Output muscles `prhs_max', `rline_max', and `r2_max'.
4284 Free rline and r1.
4285 * data/bison.simple, data/bison.c++: Adjust to use these muscles
4286 to compute types instead of constant types.
4287 * tests/regression.at (Web2c Actions): Adjust.
4288
4289 2002-05-04 Akim Demaille <akim@epita.fr>
4290
4291 * src/symtab.h (SALIAS, SUNDEF): Rename as...
4292 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
4293 Adjust dependencies.
4294 * src/output.c (token_definitions_output): Be sure not to output a
4295 `#define 'a'' when fed with `%token 'a' "a"'.
4296 * tests/regression.at (Token definitions): New.
4297
4298 2002-05-03 Paul Eggert <eggert@twinsun.com>
4299
4300 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
4301 for K&R C.
4302
4303 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
4304
4305 * Makefile.am (SUBDIRS): Remove intl.
4306 (EXTRA_DIST): Add config/config.rpath.
4307
4308 2002-05-03 Akim Demaille <akim@epita.fr>
4309
4310 * data/bison.simple (m4_if): Don't output empty enums.
4311 And actually, output valid enum definitions :(.
4312
4313 2002-05-03 Akim Demaille <akim@epita.fr>
4314
4315 * configure.bat: Remove, completely obsolete.
4316 * Makefile.am (EXTRA_DIST): Adjust.
4317 Don't distribute config.rpath...
4318 * config/Makefile.am (EXTRA_DIST): Do it.
4319
4320 2002-05-03 Akim Demaille <akim@epita.fr>
4321
4322 * configure.in (GETTEXT_VERSION): New.
4323 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
4324
4325 2002-05-03 Akim Demaille <akim@epita.fr>
4326
4327 * data/bison.simple (b4_token_enum): New.
4328 (b4_token_defines): Use it to output tokens both as #define and
4329 enums.
4330 Suggested by Paul Eggert.
4331 * src/output.c (token_definitions_output): Don't output spurious
4332 white spaces.
4333
4334 2002-05-03 Akim Demaille <akim@epita.fr>
4335
4336 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
4337
4338 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
4339
4340 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
4341 Update the stack class, give a try to deque as the default container.
4342
4343 2002-05-02 Akim Demaille <akim@epita.fr>
4344
4345 * data/bison.simple (yyparse): Do not implement @$ = @1.
4346 (YYLLOC_DEFAULT): Adjust to do it.
4347 * doc/bison.texinfo (Location Default Action): Fix.
4348
4349 2002-05-02 Akim Demaille <akim@epita.fr>
4350
4351 * src/reader.c (parse_braces): Merge into...
4352 (parse_action): this.
4353
4354 2002-05-02 Akim Demaille <akim@epita.fr>
4355
4356 * configure.in (ALL_LINGUAS): Remove.
4357 * po/LINGUAS, hr.po: New.
4358
4359 2002-05-02 Akim Demaille <akim@epita.fr>
4360
4361 Remove the so called hairy (semantic) parsers.
4362
4363 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
4364 * src/gram.h, src/gram.c (semantic_parser): Remove.
4365 (rule_t): Remove the guard and guard_line members.
4366 * src/lex.h (token_t): remove tok_guard.
4367 * src/options.c (option_table): Remove %guard and %semantic_parser
4368 support.
4369 * src/output.c, src/output.h (guards_output): Remove.
4370 (prepare): Adjust.
4371 (token_definitions_output): Don't output the `T'
4372 tokens (???).
4373 (output_skeleton): Don't output the guards.
4374 * src/files.c, src/files.c (attrsfile): Remove.
4375 * src/reader.c (symbol_list): Remove the guard and guard_line
4376 members.
4377 Adjust dependencies.
4378 (parse_guard): Remove.
4379 * data/bison.hairy: Remove.
4380 * doc/bison.texinfo (Environment Variables): Remove occurrences of
4381 BISON_HAIRY.
4382
4383 2002-05-02 Akim Demaille <akim@epita.fr>
4384
4385 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
4386 (parse_guard): Rename the formal argument `stack_offset' as
4387 `rule_length', which is more readable.
4388 Adjust callers.
4389 (copy_at, copy_dollar): Instead of outputting the hard coded
4390 values of $$, $n and so forth, output invocation to b4_lhs_value,
4391 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
4392 Note: this patch partially drops `semantic-parser' support: it
4393 always does `rule_length - n', where semantic parsers ought to
4394 always use `-n'.
4395 * data/bison.simple, data/bison.c++ (b4_lhs_value)
4396 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
4397
4398 2002-05-02 Akim Demaille <akim@epita.fr>
4399
4400 * configure.in (AC_INIT): Bump to 1.49b.
4401 (AM_INIT_AUTOMAKE): Short invocation.
4402
4403 2002-05-02 Akim Demaille <akim@epita.fr>
4404
4405 Version 1.49a.
4406
4407 2002-05-01 Akim Demaille <akim@epita.fr>
4408
4409 * src/skeleton.h: Remove.
4410
4411 2002-05-01 Akim Demaille <akim@epita.fr>
4412
4413 * src/skeleton.h: Fix the #endif.
4414 Reported by Magnus Fromreide.
4415
4416 2002-04-26 Paul Eggert <eggert@twinsun.com>
4417
4418 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
4419 Define if we define YYSTYPE and YYLTYPE, respectively.
4420 (YYCOPY): Fix [] quoting problem in the non-GCC case.
4421
4422 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
4423
4424 * src/scan-skel.l: Postprocess quadrigraphs.
4425
4426 * src/reader.c (copy_character): New function, used to output
4427 single characters while replacing `[' and `]' with quadrigraphs, to
4428 avoid troubles with M4 quotes.
4429 (copy_comment): Output characters with copy_character.
4430 (read_additionnal_code): Likewise.
4431 (copy_string2): Likewise.
4432 (copy_definition): Likewise.
4433
4434 * tests/calc.at: Exercise M4 quoting.
4435
4436 2002-04-25 Akim Demaille <akim@epita.fr>
4437
4438 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
4439 between `!' and the command.
4440 Reported by Paul Eggert.
4441
4442 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
4443
4444 * tests/calc.at: Exercise prologue splitting.
4445
4446 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
4447 `b4_post_prologue' instead of `b4_prologue'.
4448
4449 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
4450 muscles.
4451 (output): Free pre_prologue_obstack and post_prologue_obstack.
4452 * src/files.h, src/files.c (attrs_obstack): Remove.
4453 (pre_prologue_obstack, post_prologue_obstack): New.
4454 * src/reader.c (copy_definition): Add a parameter to specify the
4455 obstack to fill, instead of using attrs_obstack unconditionally.
4456 (read_declarations): Pass pre_prologue_obstack to copy_definition if
4457 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
4458
4459 2002-04-23 Paul Eggert <eggert@twinsun.com>
4460
4461 * data/bison.simple: Remove unnecessary commentary and white
4462 space differences from 1_29-branch.
4463 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
4464
4465 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
4466 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
4467 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
4468 constructors or destructors.
4469
4470 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
4471
4472 2002-04-23 Akim Demaille <akim@epita.fr>
4473
4474 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
4475 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
4476 location with columns.
4477 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
4478 All reported by Paul Eggert.
4479
4480 2002-04-22 Akim Demaille <akim@epita.fr>
4481
4482 * src/reduce.c (dump_grammar): Move to...
4483 * src/gram.h, src/gram.c (grammar_dump): here.
4484 Be sure to separate long item numbers.
4485 Don't read the members of a rule's prec if its nil.
4486
4487 2002-04-22 Akim Demaille <akim@epita.fr>
4488
4489 * src/output.c (table_size, table_grow): New.
4490 (MAXTABLE): Remove, replace uses with table_size.
4491 (pack_vector): Instead of dying when the table is too big, grow it.
4492
4493 2002-04-22 Akim Demaille <akim@epita.fr>
4494
4495 * data/bison.simple (yyr1): Its type is that of a token number.
4496 * data/bison.c++ (r1_): Likewise.
4497 * tests/regression.at (Web2c Actions): Adjust.
4498
4499 2002-04-22 Akim Demaille <akim@epita.fr>
4500
4501 * src/reader.c (token_translations_init): 256 is now the default
4502 value for the error token, i.e., it will be assigned another
4503 number if the user assigned 256 to one of her tokens.
4504 (reader): Don't force 256 to error.
4505 * doc/bison.texinfo (Symbols): Adjust.
4506 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
4507 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
4508 etc. instead of 10, 20, 30 (which was used to `jump' over error
4509 (256) and undefined (2)).
4510
4511 2002-04-22 Akim Demaille <akim@epita.fr>
4512
4513 Propagate more token_number_t.
4514
4515 * src/gram.h (token_number_as_item_number)
4516 (item_number_as_token_number): New.
4517 * src/output.c (GENERATE_OUTPUT_TABLE): New.
4518 Use it to create output_item_number_table and
4519 output_token_number_table.
4520 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
4521 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
4522 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
4523 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
4524
4525 2002-04-22 Akim Demaille <akim@epita.fr>
4526
4527 * src/output.h, src/output.c (get_lines_number): Remove.
4528
4529 2002-04-19 Akim Demaille <akim@epita.fr>
4530
4531 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
4532 as Lex/Flex'.
4533 (Debugging): More details about enabling the debugging features.
4534 (Table of Symbols): Describe $$, $n, @$, and @n.
4535 Suggested by Tim Josling.
4536
4537 2002-04-19 Akim Demaille <akim@epita.fr>
4538
4539 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
4540
4541 2002-04-10 Akim Demaille <akim@epita.fr>
4542
4543 * src/system.h: Rely on HAVE_LIMITS_H.
4544 Suggested by Paul Eggert.
4545
4546 2002-04-09 Akim Demaille <akim@epita.fr>
4547
4548 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
4549 full stderr, and strip it according to the bison options, instead
4550 of composing the error message from different bits.
4551 This makes it easier to check for several error messages.
4552 Adjust all the invocations.
4553 Add an invocation exercising the error token.
4554 Add an invocation demonstrating a stupid error message.
4555 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
4556 Adjust the tests.
4557 Error message are for stderr, not stdout.
4558
4559 2002-04-09 Akim Demaille <akim@epita.fr>
4560
4561 * src/gram.h, src/gram.c (error_token_number): Remove, use
4562 errtoken->number.
4563 * src/reader.c (reader): Don't specify the user token number (2)
4564 for $undefined, as it uselessly prevents using it.
4565 * src/gram.h (token_number_t): Move to...
4566 * src/symtab.h: here.
4567 (state_t.number): Is a token_number_t.
4568 * src/print.c, src/reader.c: Use undeftoken->number instead of
4569 hard coded 2.
4570 (Even though this 2 is not the same as above: the number of the
4571 undeftoken remains being 2, it is its user token number which
4572 might not be 2).
4573 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
4574 `user_token_number_max'.
4575 Output `undef_token_number'.
4576 * data/bison.simple, data/bison.c++: Use them.
4577 Be sure to map invalid yylex return values to
4578 `undef_token_number'. This saves us from gratuitous SEGV.
4579
4580 * tests/conflicts.at (Solved SR Conflicts)
4581 (Unresolved SR Conflicts): Adjust.
4582 * tests/regression.at (Web2c Actions): Adjust.
4583
4584 2002-04-08 Akim Demaille <akim@epita.fr>
4585
4586 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
4587 Adding #line.
4588 Remove the duplicate `typedefs'.
4589 (RhsNumberType): Fix the declaration and various other typos.
4590 Use __ofile__.
4591 * data/bison.simple: Use __ofile__.
4592 * src/scan-skel.l: Handle __ofile__.
4593
4594 2002-04-08 Akim Demaille <akim@epita.fr>
4595
4596 * src/gram.h (item_number_t): New, the type of item numbers in
4597 RITEM. Note that it must be able to code symbol numbers as
4598 positive number, and the negation of rule numbers as negative
4599 numbers.
4600 Adjust all dependencies (pretty many).
4601 * src/reduce.c (rule): Remove this `short *' pointer: use
4602 item_number_t.
4603 * src/system.h (MINSHORT, MAXSHORT): Remove.
4604 Include `limits.h'.
4605 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
4606 (shortcpy): Remove.
4607 (MAXTABLE): Move to...
4608 * src/output.c (MAXTABLE): here.
4609 (prepare_rules): Use output_int_table to output rhs.
4610 * data/bison.simple, data/bison.c++: Adjust.
4611 * tests/torture.at (Big triangle): Move the limit from 254 to
4612 500.
4613 * tests/regression.at (Web2c Actions): Ajust.
4614
4615 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
4616 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
4617 passes, but produces negative #line number, once fixed, GCC is
4618 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
4619 C), it passes.
4620 * src/state.h (state_h): Code input lines on ints, not shorts.
4621
4622 2002-04-08 Akim Demaille <akim@epita.fr>
4623
4624 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
4625 and then the grammar.
4626
4627 2002-04-08 Akim Demaille <akim@epita.fr>
4628
4629 * src/system.h: No longer using strndup.
4630
4631 2002-04-07 Akim Demaille <akim@epita.fr>
4632
4633 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
4634 * src/output.c (output_table_data): Return the longest number.
4635 (prepare_tokens): Output `token_number_max').
4636 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
4637 New.
4638 Use them to define yy_token_number_type/TokenNumberType.
4639 Use this type for yytranslate.
4640 * tests/torture.at (Big triangle): Push the limit from 124 to
4641 253.
4642 * tests/regression.at (Web2c Actions): Adjust.
4643
4644 2002-04-07 Akim Demaille <akim@epita.fr>
4645
4646 * tests/torture.at (Big triangle): New.
4647 (GNU AWK Grammar, GNU Cim Grammar): Move to...
4648 * tests/existing.at: here.
4649
4650 2002-04-07 Akim Demaille <akim@epita.fr>
4651
4652 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
4653 nritems.
4654 Adjust dependencies.
4655
4656 2002-04-07 Akim Demaille <akim@epita.fr>
4657
4658 * src/reader.c: Normalize increments to prefix form.
4659
4660 2002-04-07 Akim Demaille <akim@epita.fr>
4661
4662 * src/reader.c, symtab.c: Remove debugging code.
4663
4664 2002-04-07 Akim Demaille <akim@epita.fr>
4665
4666 Rename all the `bucket's as `symbol_t'.
4667
4668 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
4669 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
4670 * src/symtab.c, src/symtab.h (bucket): Rename as...
4671 (symbol_t): this.
4672 (symbol_list_new, bucket_check_defined, bucket_make_alias)
4673 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
4674 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
4675 (buckets_new, buckets_free, buckets_do): Rename as...
4676 (symbol_list_new, symbol_check_defined, symbol_make_alias)
4677 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
4678 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
4679 (symbols_new, symbols_free, symbols_do): these.
4680
4681 2002-04-07 Akim Demaille <akim@epita.fr>
4682
4683 Use lib/hash for the symbol table.
4684
4685 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
4686 EOF.
4687 * src/lex.c (lex): Set the `number' member of new terminals.
4688 * src/reader.c (bucket_check_defined, bucket_make_alias)
4689 (bucket_check_alias_consistence, bucket_translation): New.
4690 (reader, grammar_free, readgram, token_translations_init)
4691 (packsymbols): Adjust.
4692 (reader): Number the predefined tokens.
4693 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
4694 for predefined tokens.
4695 * src/symtab.h (bucket): Remove all the hash table related
4696 members.
4697 * src/symtab.c (symtab): Replace by...
4698 (bucket_table): this.
4699 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
4700 (buckets_new, buckets_do): New.
4701
4702 2002-04-07 Akim Demaille <akim@epita.fr>
4703
4704 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
4705 (start_symbol, max_user_token_number, semantic_parser)
4706 (error_token_number): Initialize.
4707 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
4708 Initialize.
4709 (reader): Don't.
4710 (errtoken, eoftoken, undeftoken, axiom): Extern.
4711
4712 2002-04-07 Akim Demaille <akim@epita.fr>
4713
4714 * src/gram.h (rule_s): prec and precsym are now pointers
4715 to the bucket giving the priority/associativity.
4716 Member `associativity' removed: useless.
4717 * src/reduce.c, src/conflicts.c: Adjust.
4718
4719 2002-04-07 Akim Demaille <akim@epita.fr>
4720
4721 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
4722 Properly escape the symbols' TAG when outputting them.
4723
4724 2002-04-07 Akim Demaille <akim@epita.fr>
4725
4726 * src/lalr.h (LA): Is a bitsetv, not bitset*.
4727
4728 2002-04-07 Akim Demaille <akim@epita.fr>
4729
4730 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
4731 (LArule): this, which is an array to rule_t*.
4732 * src/print.c, src/conflicts.c: Adjust.
4733
4734 2002-04-07 Akim Demaille <akim@epita.fr>
4735
4736 * src/gram.h (rule_t): Rename `number' as `user_number'.
4737 `number' is a new member.
4738 Adjust dependencies.
4739 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
4740
4741 2002-04-07 Akim Demaille <akim@epita.fr>
4742
4743 As a result of the previous patch, it is no longer needed
4744 to reorder ritem itself.
4745
4746 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
4747
4748 2002-04-07 Akim Demaille <akim@epita.fr>
4749
4750 Be sure never to walk through RITEMS, but use only data related to
4751 the rules themselves. RITEMS should be banished.
4752
4753 * src/output.c (output_token_translations): Rename as...
4754 (prepare_tokens): this.
4755 In addition to `translate', prepare the muscles `tname' and
4756 `toknum', which were handled by...
4757 (output_rule_data): this.
4758 Remove, and move the remainder of its outputs into...
4759 (prepare_rules): this new routines, which also merges content from
4760 (output_gram): this.
4761 (prepare_rules): Be sure never to walk through RITEMS.
4762 (output_stos): Rename as...
4763 (prepare_stos): this.
4764 (output): Always invoke prepare_states, after all, just don't use it
4765 in the output if you don't need it.
4766
4767 2002-04-07 Akim Demaille <akim@epita.fr>
4768
4769 * src/LR0.c (new_state): Display `nstates' as the name of the
4770 newly created state.
4771 Adjust to initialize first_state and last_state if needed.
4772 Be sure to distinguish the initial from the final state.
4773 (new_states): Create the itemset of the initial state, and use
4774 new_state.
4775 * src/closure.c (closure): Now that the initial state has its
4776 items properly set, there is no need for a special case when
4777 creating `ruleset'.
4778
4779 As a result, now the rule 0, reducing to $axiom, is visible in the
4780 outputs. Adjust the test suite.
4781
4782 * tests/conflicts.at (Solved SR Conflicts)
4783 (Unresolved SR Conflicts): Adjust.
4784 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
4785 * tests/conflicts.at (S/R in initial): New.
4786
4787 2002-04-07 Akim Demaille <akim@epita.fr>
4788
4789 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
4790 the RHS of the rules.
4791 * src/output.c (output_gram): Likewise.
4792
4793 2002-04-07 Akim Demaille <akim@epita.fr>
4794
4795 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
4796 bucket.
4797 Adjust all dependencies.
4798 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
4799 `number' of the buckets too.
4800 * src/gram.h: Include `symtab.h'.
4801 (associativity): Move to...
4802 * src/symtab.h: here.
4803 No longer include `gram.h'.
4804
4805 2002-04-07 Akim Demaille <akim@epita.fr>
4806
4807 * src/gram.h, src/gram.c (rules_rhs_length): New.
4808 (ritem_longest_rhs): Use it.
4809 * src/gram.h (rule_t): `number' is a new member.
4810 * src/reader.c (packgram): Set it.
4811 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
4812 the end of `rules', and count them out of `nrules'.
4813 (reduce_output, dump_grammar): Adjust.
4814 * src/print.c (print_grammar): It is no longer needed to check for
4815 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
4816 * tests/reduce.at (Reduced Automaton): New test.
4817
4818 2002-04-07 Akim Demaille <akim@epita.fr>
4819
4820 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
4821 lacking `+ 1' to nrules, Bison reported as useless a token if it
4822 was used solely to set the precedence of the last rule...
4823
4824 2002-04-07 Akim Demaille <akim@epita.fr>
4825
4826 * data/bison.c++, data/bison.simple: Don't output the current file
4827 name in #line, to avoid useless diffs between two identical
4828 outputs under different names.
4829
4830 2002-04-07 Akim Demaille <akim@epita.fr>
4831
4832 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
4833 Normalize loops to using `< nrules + 1', not `<= nrules'.
4834
4835 2002-04-07 Akim Demaille <akim@epita.fr>
4836
4837 * TODO: Update.
4838
4839 2002-04-07 Akim Demaille <akim@epita.fr>
4840
4841 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
4842 bucket.value as bucket.number.
4843
4844 2002-04-07 Akim Demaille <akim@epita.fr>
4845
4846 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
4847 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
4848 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
4849 RHS, instead of being an index in RITEMS.
4850
4851 2002-04-04 Paul Eggert <eggert@twinsun.com>
4852
4853 * doc/bison.texinfo: Update copyright date.
4854 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
4855 (Symbols): Warn about running Bison in one character set,
4856 but compiling and/or running in an incompatible one.
4857 Warn about character code 256, too.
4858
4859 2002-04-03 Paul Eggert <eggert@twinsun.com>
4860
4861 * src/bison.data (YYSTACK_ALLOC): Depend on whether
4862 YYERROR_VERBOSE is nonzero, not whether it is defined.
4863
4864 Merge changes from bison-1_29-branch.
4865
4866 2002-03-20 Paul Eggert <eggert@twinsun.com>
4867
4868 Merge fixes from Debian bison_1.34-1.diff.
4869
4870 * configure.in (AC_PREREQ): 2.53.
4871
4872 2002-03-20 Akim Demaille <akim@epita.fr>
4873
4874 * src/conflicts.c (log_resolution): Argument `resolution' is const.
4875
4876 2002-03-19 Paul Eggert <eggert@twinsun.com>
4877
4878 * src/bison.simple (YYCOPY): New macro.
4879 (YYSTACK_RELOCATE): Use it.
4880 Remove Type arg; no longer needed. All callers changed.
4881 (yymemcpy): Remove; no longer needed.
4882
4883 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
4884 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
4885
4886 2002-03-19 Akim Demaille <akim@epita.fr>
4887
4888 Test and fix the #line outputs.
4889
4890 * tests/atlocal.at (GCC): New.
4891 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
4892 (Prologue synch line, ,%union synch line, Postprologue synch line)
4893 (Action synch line, Epilogue synch line): New tests.
4894 * src/reader.c (parse_union_decl): Define the muscle stype_line.
4895 * data/bison.simple, data/bison.c++: Use it.
4896
4897 2002-03-19 Akim Demaille <akim@epita.fr>
4898
4899 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
4900 (Solved SR Conflicts, %expect not enough, %expect right)
4901 (%expect too much): Move to...
4902 * tests/conflicts.at: this new file.
4903
4904 2002-03-19 Akim Demaille <akim@epita.fr>
4905
4906 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
4907 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
4908 that we can move to enums for instance.
4909 * src/output.c (token_definitions_output): Output a list of
4910 `token-name, token-number' instead of the #define.
4911 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
4912
4913 2002-03-14 Akim Demaille <akim@epita.fr>
4914
4915 Use Gettext 0.11.1.
4916
4917 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
4918
4919 * data/bison.c++: Make the user able to add members to the generated
4920 parser by subclassing.
4921
4922 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
4923
4924 * src/reader.c (read_additionnal_code): `c' should be an integer, not
4925 a character.
4926 Reported by Nicolas Tisserand and Nicolas Burrus.
4927
4928 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
4929
4930 * src/reader.c: Warn about lacking semi-colons, do not complain.
4931
4932 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
4933
4934 * data/bison.c++: Remove a debug line.
4935
4936 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
4937
4938 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
4939 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
4940 provide a default implementation.
4941
4942 2002-03-04 Akim Demaille <akim@epita.fr>
4943
4944 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
4945 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
4946 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
4947 * tests/semantic.at (Parsing Guards): Similarly.
4948 * src/reader.at (readgram): Complain if the last rule is not ended
4949 with a semi-colon.
4950
4951 2002-03-04 Akim Demaille <akim@epita.fr>
4952
4953 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
4954 * src/closure.c: here.
4955 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
4956 RTC.
4957 * src/warshall.h, src/warshall.c: Remove.
4958 * tests/sets.at (Broken Closure): Adjust.
4959
4960 2002-03-04 Akim Demaille <akim@epita.fr>
4961
4962 * src/output.c (output_skeleton): tempdir is const.
4963 bytes_read is unused.
4964
4965 2002-03-04 Akim Demaille <akim@epita.fr>
4966
4967 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
4968 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
4969 Update.
4970 From Michael Hayes.
4971
4972 2002-03-04 Akim Demaille <akim@epita.fr>
4973
4974 * src/closure.c (closure): `r' is unused.
4975
4976 2002-03-04 Akim Demaille <akim@epita.fr>
4977
4978 * tests/sets.at (Broken Closure): Add the ending `;'.
4979 * src/reader.at (readgram): Complain if a rule is not ended with a
4980 semi-colon.
4981
4982 2002-03-04 Akim Demaille <akim@epita.fr>
4983
4984 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
4985 (count_sr_conflicts): Use bitset_count.
4986 * src/reduce.c (inaccessable_symbols): Ditto.
4987 (bits_size): Remove.
4988 * src/warshall.h, src/warshall.c: Convert to bitsetv.
4989
4990 2002-03-04 Akim Demaille <akim@epita.fr>
4991
4992 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
4993 * src/reduce.c: Remove the `bitset_zero's following the
4994 `bitset_create's, as now it is performed by the latter.
4995
4996 2002-03-04 Akim Demaille <akim@epita.fr>
4997
4998 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
4999 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
5000 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
5001 latest sources from Michael.
5002
5003 2002-03-04 Akim Demaille <akim@epita.fr>
5004
5005 * src/output.c (output): Don't free the grammar.
5006 * src/reader.c (grammar_free): New.
5007 * src/main.c (main): Call it and don't free symtab here.
5008
5009 2002-03-04 Akim Demaille <akim@epita.fr>
5010
5011 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
5012 before returning.
5013 Reported by Benoit Perrot.
5014
5015 2002-03-04 Akim Demaille <akim@epita.fr>
5016
5017 Use bitset operations when possible, not loops over bits.
5018
5019 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
5020 bitset_or.
5021 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
5022 * src/reduce.c (useless_nonterminals): Formatting changes.
5023 * src/warshall.c (TC): Use bitset_or.
5024
5025 2002-03-04 Akim Demaille <akim@epita.fr>
5026
5027 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
5028 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
5029 Ditto.
5030
5031 2002-03-04 Akim Demaille <akim@epita.fr>
5032
5033 * src/lalr.c (F): Now a bitset*.
5034 Adjust all dependencies.
5035
5036 2002-03-04 Akim Demaille <akim@epita.fr>
5037
5038 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
5039 Adjust all dependencies.
5040
5041 2002-03-04 Akim Demaille <akim@epita.fr>
5042
5043 * src/L0.c, src/LR0.h (nstates): Be size_t.
5044 Adjust comparisons (signed vs unsigned).
5045 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
5046 bitset*.
5047 Adjust all dependencies.
5048
5049 2002-03-04 Akim Demaille <akim@epita.fr>
5050
5051 * src/closure.c (firsts): Now, also a bitset.
5052 Adjust all dependencies.
5053 (varsetsize): Remove, now unused.
5054 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
5055
5056 2002-03-04 Akim Demaille <akim@epita.fr>
5057
5058 * src/print.c: Convert to use bitset.h, not hand coded iterations
5059 over ints.
5060
5061 2002-03-04 Akim Demaille <akim@epita.fr>
5062
5063 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
5064
5065 2002-03-04 Akim Demaille <akim@epita.fr>
5066
5067 * src/closure.c (ruleset): Be a bitset.
5068 (rulesetsize): Remove.
5069
5070 2002-03-04 Akim Demaille <akim@epita.fr>
5071
5072 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
5073 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
5074 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
5075 * src/closure.c (fderives): Be an array of bitsets.
5076
5077 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
5078
5079 * data/bison.c++: Merge the two generated headers. Insert a copyright
5080 notice in each output file.
5081
5082 2002-02-28 Akim Demaille <akim@epita.fr>
5083
5084 * data/bison.c++: Copy the prologue of bison.simple to fetch
5085 useful M4 definitions, such as b4_header_guard.
5086
5087 2002-02-25 Akim Demaille <akim@epita.fr>
5088
5089 * src/getargs.c (version): Give the name of the authors, and use a
5090 translator friendly scheme for the bgr
5091 copyright notice.
5092
5093 2002-02-25 Akim Demaille <akim@epita.fr>
5094
5095 * src/output.c (header_output): Remove, now handled completely via
5096 M4.
5097
5098 2002-02-25 Akim Demaille <akim@epita.fr>
5099
5100 * m4/m4.m4: New, from CVS Autoconf.
5101 * configure.in: Invoke it.
5102 * src/output.c (output_skeleton): Use its result instead of the
5103 hard coded name.
5104
5105 2002-02-25 Akim Demaille <akim@epita.fr>
5106
5107 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
5108 Fileutils 4.1.5.
5109 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
5110 * src/output.c (output_skeleton): Use mkstemp to create a real
5111 temporary file.
5112 Move the filling of `skeleton' and its muscle to...
5113 (prepare): here.
5114 (output): Move the definition of the prologue muscle to...
5115 (prepare): here.
5116 * src/system.h (DEFAULT_TMPDIR): New.
5117
5118 2002-02-14 Paul Eggert <eggert@twinsun.com>
5119
5120 Remove the support for C++ namespace cleanliness; it was
5121 causing more problems than it was curing, since it didn't work
5122 properly on some nonstandard C++ compilers. This can wait
5123 for a proper C++ parser.
5124
5125 * NEWS: Document this.
5126 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
5127 of C++, as it's treated like C now.
5128 * src/bison.simple (YYSTD): Remove.
5129 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
5130 Treat C++ just like Standard C instead of trying to support
5131 namespace cleanliness.
5132
5133 2002-02-14 Akim Demaille <akim@epita.fr>
5134
5135 * tests/regression.at (else): Adjust to Andreas' change.
5136
5137 2002-02-14 Akim Demaille <akim@epita.fr>
5138
5139 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
5140
5141 2002-02-13 Andreas Schwab <schwab@suse.de>
5142
5143 * src/output.c (output_rule_data): Don't output NULL, it might
5144 not be defined yet.
5145
5146 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
5147
5148 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
5149 (Copyright notice): Update.
5150
5151 2002-02-11 Akim Demaille <akim@epita.fr>
5152
5153 * tests/regression.at (%nonassoc and eof): Don't include
5154 nonportable headers.
5155
5156 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
5157
5158 * data/bison.c++: Correct error recovery. Make the user able to
5159 initialize the starting location.
5160
5161 2002-02-07 Akim Demaille <akim@epita.fr>
5162
5163 * tests/input.at: New.
5164
5165 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
5166
5167 * data/bison.c++: Replace some direct m4 expansions by constants. Be
5168 more consistent when naming methods and variables. Put preprocessor
5169 directives around tables only needed for debugging.
5170
5171 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
5172
5173 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
5174 C++ parsers.
5175 (yy::b4_name::parse): Use print_.
5176
5177 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
5178
5179 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
5180
5181 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
5182
5183 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
5184 C++ parsers.
5185 (yy::b4_name::parse): Build verbose error messages, and use error_.
5186
5187 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
5188
5189 * data/bison.c++: Fix m4 quoting in comments.
5190
5191 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
5192
5193 * data/bison.c++: Adjust the parser code. Fix some muscles that were
5194 not expanded by m4.
5195
5196 2002-02-05 Akim Demaille <akim@epita.fr>
5197
5198 * data/bison.c++: Adjust to the M4 back end.
5199 More is certainly needed.
5200
5201 2002-02-05 Akim Demaille <akim@epita.fr>
5202
5203 Give a try to M4 as a back end.
5204
5205 * lib/readpipe.c: New, from wdiff.
5206 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
5207 BISON_HAIRY.
5208 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
5209 specific values. Now it is m4 that performs the lookup.
5210 * src/parse-skel.y: Remove.
5211 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
5212 * src/output.c (actions_output, guards_output)
5213 (token_definitions_output): No longer keeps track of the output
5214 line number, hence remove the second argument.
5215 (guards_output): Check against the guard member of a rule, not the
5216 action member.
5217 Adjust callers.
5218 (output_skeleton): Don't look for the skeleton location, let m4 do
5219 that.
5220 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
5221 file will be used.
5222 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
5223 (prepare): Given that for the time being changesyntax is not
5224 usable in M4, rename the muscles using `-' to `_'.
5225 Define `defines_flag', `output_parser_name' and `output_header_name'.
5226 * src/output.h (actions_output, guards_output)
5227 (token_definitions_output): Adjust prototypes.
5228 * src/scan-skel.l: Instead of scanning the skeletons, it now
5229 processes the output of m4: `__oline__' and `#output'.
5230 * data/bison.simple: Adjust to be used by M4(sugar).
5231 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
5232 to date.
5233 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
5234 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
5235 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
5236 shamelessly stolen from CVS Autoconf.
5237
5238 2002-02-05 Akim Demaille <akim@epita.fr>
5239
5240 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
5241 * configure.in: Check for the declarations of free and malloc.
5242 * src/muscle_tab.c: Adjust.
5243
5244 2002-02-05 Akim Demaille <akim@epita.fr>
5245
5246 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
5247 which have no values.
5248
5249 2002-02-05 Akim Demaille <akim@epita.fr>
5250
5251 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
5252 * data/: here.
5253
5254 2002-01-29 Paul Eggert <eggert@twinsun.com>
5255
5256 * src/bison.simple (YYSIZE_T): Do not define merely because
5257 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
5258 On some platforms, <alloca.h> does not declare YYSTD (size_t).
5259
5260 2002-01-27 Akim Demaille <akim@epita.fr>
5261
5262 Fix `%nonassoc and eof'.
5263
5264 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
5265 which were not properly copied! Replace
5266 memcpy (res->errs, src->errs, src->nerrs);
5267 with
5268 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
5269 !!!
5270 * tests/regression.at (%nonassoc and eof): Adjust to newest
5271 Autotest: `.' is not in the PATH.
5272
5273 2002-01-27 Akim Demaille <akim@epita.fr>
5274
5275 * tests/sets.at (AT_EXTRACT_SETS): New.
5276 (Nullable): Use it.
5277 (Firsts): New.
5278
5279 2002-01-26 Akim Demaille <akim@epita.fr>
5280
5281 * tests/actions.at, tests/calc.at, tests/headers.at,
5282 * tests/torture.at: Adjust to the newest Autotest which no longer
5283 forces `.' in the PATH.
5284
5285 2002-01-25 Akim Demaille <akim@epita.fr>
5286
5287 * tests/regression.at (%nonassoc and eof): New.
5288 Suggested by Robert Anisko.
5289
5290 2002-01-24 Akim Demaille <akim@epita.fr>
5291
5292 Bison dumps core when trying to complain about broken input files.
5293 Reported by Cris van Pelt.
5294
5295 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
5296 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
5297 into...
5298 (Invalid inputs): Strengthen: exercise parse_percent_token.
5299
5300 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
5301
5302 * src/Makefile.am: Add bison.c++.
5303 * src/bison.c++: New skeleton.
5304
5305 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
5306
5307 * po/it.po: New.
5308
5309 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
5310
5311 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
5312
5313 2002-01-20 Marc Autret <marc@gnu.org>
5314
5315 * src/files.c (compute_output_file_names): Fix
5316
5317 2002-01-20 Marc Autret <marc@gnu.org>
5318
5319 * tests/output.at: New test.
5320 * src/files.c (compute_base_names): Don't map extensions when
5321 the YACC flag is set, use defaults.
5322 Reported by Evgeny Stambulchik.
5323
5324 2002-01-20 Marc Autret <marc@gnu.org>
5325
5326 * src/system.h: Need to define __attribute__ away for non-GCC
5327 compilers as well (i.e. the vendor C compiler).
5328 Suggested by Albert Chin-A-Young.
5329
5330 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
5331
5332 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
5333 canonical definition.
5334 * src/system.h: Use the canonical definition for PARAMS (avoids
5335 a conflict with the macro from lib/hash.h).
5336
5337 2002-01-11 Akim Demaille <akim@epita.fr>
5338
5339 * configure.in: Use AC_FUNC_STRNLEN.
5340 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
5341
5342 2002-01-09 Akim Demaille <akim@epita.fr>
5343
5344 * src/files.c, src/files.h (output_infix): New.
5345 (tab_extension): Remove.
5346 (compute_base_names): Compute the former, drop the latter.
5347 * src/output.c (prepare): Insert the muscles `output-infix', and
5348 `output-suffix'.
5349 * src/parse-skel.y (string, string.1): New.
5350 (section.header): Use it.
5351 (section.yacc): Remove.
5352 (prefix): Remove too.
5353 * src/scan-skel.l: Adjust.
5354 * src/bison.simple, src/bison.hairy: Adjust.
5355
5356 2002-01-09 Akim Demaille <akim@epita.fr>
5357
5358 * configure.in (WERROR_CFLAGS): Compute it.
5359 * src/Makefile.am (CFLAGS): Pass it.
5360 * tests/atlocal.in (CFLAGS): Idem.
5361 * src/files.c: Fix a few warnings.
5362 (get_extension_index): Remove, unused.
5363
5364 2002-01-08 Akim Demaille <akim@epita.fr>
5365
5366 * src/getargs.c (AS_FILE_NAME): New.
5367 (getargs): Use it to convert DOSish file names.
5368 * src/files.c (base_name): Rename as full_base_name to avoid
5369 clashes with `base_name ()'.
5370 (filename_split): New.
5371 (compute_base_names): N-th rewrite, using filename_split.
5372
5373 2002-01-08 Akim Demaille <akim@epita.fr>
5374
5375 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
5376 New, stolen from the Fileutils 4.1.
5377 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
5378 * configure.in: Check for the presence of memrchr, and of its
5379 prototype.
5380
5381 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
5382
5383 * lib/hash.h (__P): Added definition for this macro.
5384 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
5385 BUILT_SOURCES, to ensure they are generated first.
5386 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
5387 %error-verbose to allow bootstrapping with bison 1.30x.
5388
5389 2002-01-06 Akim Demaille <akim@epita.fr>
5390
5391 * src/reader.c (parse_braces): Don't fetch the next char, the
5392 convention is to fetch on entry.
5393 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
5394 'switch' without a following semicolon.
5395 * tests/regression.at (braces parsing): New.
5396
5397 2002-01-06 Akim Demaille <akim@epita.fr>
5398
5399 Bison is dead wrong in its RR conflict reports.
5400
5401 * tests/torture.at (GNU Cim Grammar): New.
5402 * src/conflicts.c (count_rr_conflicts): Fix.
5403
5404 2002-01-06 Akim Demaille <akim@epita.fr>
5405
5406 Creating package.m4 from configure.ac causes too many problems.
5407
5408 * tests/Makefile.am (package.m4): Create it by hand,
5409 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
5410
5411 2002-01-06 Akim Demaille <akim@epita.fr>
5412
5413 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
5414 skeleton.h.
5415
5416 2002-01-04 Paul Eggert <eggert@twinsun.com>
5417
5418 * doc/bison.texinfo (Debugging):
5419 Remove YYSTDERR; it's no longer defined or used.
5420 Also, s/cstdio.h/cstdio/.
5421
5422 2002-01-03 Akim Demaille <akim@epita.fr>
5423
5424 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
5425
5426 2002-01-03 Akim Demaille <akim@epita.fr>
5427
5428 * src/parse-skel.y (process_skeleton): Don't bind the parser's
5429 tracing code to --trace, wait for a better --trace option, with
5430 args.
5431
5432 2002-01-03 Akim Demaille <akim@epita.fr>
5433
5434 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
5435 The ISO C++ standard is extremely clear about it: stderr is
5436 considered a macro, not a regular symbol (see table 94 `Header
5437 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
5438 Therefore std:: does not apply to it. It still does with fprintf.
5439 Also, s/cstdio.h/cstdio/.
5440
5441 2002-01-03 Akim Demaille <akim@epita.fr>
5442
5443 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
5444 for non system headers.
5445
5446 2002-01-02 Akim Demaille <akim@epita.fr>
5447
5448 Equip the skeleton chain with location tracking, runtime trace,
5449 pure parser and scanner.
5450
5451 * src/parse-skel.y: Request a pure parser, locations, and prefix
5452 renaming.
5453 (%union): Having several members with the same type does not help
5454 type mismatches, simplify.
5455 (YYPRINT, yyprint): New.
5456 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
5457 (skel_error): this.
5458 Handle locations.
5459 * src/scan-skel.l: Adjust to these changes.
5460 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
5461 (LOCATION_PRINT, skel_control_t): New.
5462
5463 2001-12-30 Akim Demaille <akim@epita.fr>
5464
5465 * src/parse-skel.y: Get rid of the shift/reduce conflict:
5466 replace `gb' with BLANKS.
5467 * src/scan-skel.l: Adjust.
5468
5469 2001-12-30 Akim Demaille <akim@epita.fr>
5470
5471 * src/system.h: We don't need nor want bcopy.
5472 Throw away MS-DOS crap: we don't need getpid.
5473 * configure.in: We don't need strndup. It was even causing
5474 problems: because Flex includes the headers *before* us,
5475 _GNU_SOURCE is not defined by config.h, and therefore strndup was
5476 not visible.
5477 * lib/xstrndup.c: New.
5478 * src/scan-skel.l: Use it.
5479 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
5480 * src/parse-skel.y: Use %directives instead of #defines.
5481
5482 2001-12-30 Akim Demaille <akim@epita.fr>
5483
5484 * src/skeleton.h: New.
5485 * src/output.c (output_parser, output_master_parser): Remove, dead
5486 code.
5487 * src/output.h (get_lines_number, actions_output, guards_output)
5488 (token_definitions_output): Prototype them.
5489 * src/parse-skel.y: Add the license notice.
5490 Include output.h and skeleton.h.
5491 (process_skeleton): Returns void, and takes a single parameter.
5492 * src/scan-skel.l: Add the license notice.
5493 Include skeleton.h.
5494 Don't use %option yylineno: it seems that then Flex imagines
5495 REJECT has been used, and therefore it won't reallocate its
5496 buffers (which makes no other sense to me than a bug). It results
5497 in warnings for `unused: yy_flex_realloc'.
5498
5499 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
5500
5501 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
5502 (MUSCLE_INSERT_PREFIX): ...to there.
5503 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
5504 (MUSCLE_INSERT_PREFIX): Move from here...
5505
5506 * src/bison.hairy: Add a section directive. Put braces around muscle
5507 names. This parser skeleton is still broken, but Bison should not
5508 choke on a bad muscle 'syntax'.
5509 * src/bison.simple: Add a section directive. Put braces around muscle
5510 names.
5511
5512 * src/files.h (strsuffix, stringappend): Add declarations.
5513 (tab_extension): Add declaration.
5514 (short_base_name): Add declaration.
5515
5516 * src/files.c (strsuffix, stringappend): No longer static. These
5517 functions are used in the skeleton parser.
5518 (tab_extension): New.
5519 (compute_base_names): Use the computations done in this function
5520 to guess if the generated parsers should have '.tab' in their
5521 names.
5522 (short_base_name): No longer static.
5523
5524 * src/output.c (output_skeleton): New.
5525 (output): Disable call to output_master_parser, and give a try to
5526 a new skeleton handling system.
5527 (guards_output, actions_output): No longer static.
5528 (token_definitions_output, get_lines_number): No longer static.
5529
5530 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
5531
5532 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
5533 parse-skel.y.
5534
5535 * src/parse-skel.y: New file.
5536 * src/scan-skel.l: New file.
5537
5538 2001-12-29 Akim Demaille <akim@epita.fr>
5539
5540 %name-prefix is broken.
5541
5542 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
5543 Adjust all dependencies.
5544 * tests/headers.at (export YYLTYPE): Strengthen this test: use
5545 %name-prefix.
5546
5547 Renaming yylval but not yylloc is not consistent. Now we do.
5548
5549 * src/bison.simple: Prefix yylloc if used.
5550 * doc/bison.texinfo (Decl Summary): Document that.
5551
5552 2001-12-29 Akim Demaille <akim@epita.fr>
5553
5554 * doc/bison.texinfo: Promote `%long-directive' over
5555 `%long_directive'.
5556 Remove all references to fixed-output-files, yacc is enough.
5557
5558 2001-12-29 Akim Demaille <akim@epita.fr>
5559
5560 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
5561 user prologue. These are defaults.
5562 * tests/actions.at (Mid-rule actions): Make sure the user can
5563 define YYDEBUG and YYERROR_VERBOSE.
5564
5565 2001-12-29 Akim Demaille <akim@epita.fr>
5566
5567 * src/output.c (header_output): Don't forget to export YYLTYPE and
5568 yylloc.
5569 * tests/headers.at (export YYLTYPE): New, make sure it does.
5570 * tests/regression.at (%union and --defines, Invalid CPP headers):
5571 Move to...
5572 * tests/headers.at: here.
5573
5574 2001-12-29 Akim Demaille <akim@epita.fr>
5575
5576 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
5577
5578 2001-12-29 Akim Demaille <akim@epita.fr>
5579
5580 * tests/actions.at (Mid-rule actions): Output on a single line
5581 instead of several.
5582
5583 2001-12-29 Akim Demaille <akim@epita.fr>
5584
5585 * doc/bison.texinfo: Formatting changes.
5586
5587 2001-12-29 Akim Demaille <akim@epita.fr>
5588
5589 Don't store the token defs in a muscle, just be ready to output it
5590 on command. Now possible via `symbols'. Fixes a memory leak.
5591
5592 * src/output.c (token_definitions_output): New.
5593 (output_parser, header_output): Use it.
5594 * src/reader.c (symbols_save): Remove.
5595
5596 2001-12-29 Akim Demaille <akim@epita.fr>
5597
5598 * src/bison.simple: Do not provide a default for YYSTYPE and
5599 YYLTYPE before the user's prologue. Otherwise it's hardly... a
5600 default.
5601
5602 2001-12-29 Akim Demaille <akim@epita.fr>
5603
5604 Mid-rule actions are simply... ignored!
5605
5606 * src/reader.c (readgram): Be sure to attach mid-rule actions to
5607 the empty-rule associated to the dummy symbol, not to the host
5608 rule.
5609 * tests/actions.at (Mid-rule actions): New.
5610
5611 2001-12-29 Akim Demaille <akim@epita.fr>
5612
5613 Memory leak.
5614
5615 * src/reader.c (reader): Free grammar.
5616
5617 2001-12-29 Akim Demaille <akim@epita.fr>
5618
5619 Memory leak.
5620
5621 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
5622 since it allocates it for each state, although only one is needed.
5623 (allocate_storage): Do it here.
5624
5625 2001-12-29 Akim Demaille <akim@epita.fr>
5626
5627 * src/options.h, src/options.c (create_long_option_table): Rename
5628 as...
5629 (long_option_table_new): this, with a clearer prototype.
5630 (percent_table): Remove, unused,
5631 * src/getargs.c (getargs): Adjust.
5632
5633 2001-12-29 Akim Demaille <akim@epita.fr>
5634
5635 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
5636 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
5637 as states.
5638
5639 2001-12-29 Akim Demaille <akim@epita.fr>
5640
5641 * src/lalr.c (build_relations): Rename `states' as `states1'.
5642 Sorry, I don't understand exactly what it is, no better name...
5643
5644 2001-12-29 Akim Demaille <akim@epita.fr>
5645
5646 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
5647 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
5648 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
5649 as rules.
5650
5651 2001-12-29 Akim Demaille <akim@epita.fr>
5652
5653 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
5654 ago.
5655
5656 2001-12-29 Akim Demaille <akim@epita.fr>
5657
5658 * src/reader.c, src/reader.h (user_toknums): Remove.
5659 Adjust all users to use symbols[i]->user_token_number.
5660
5661 2001-12-29 Akim Demaille <akim@epita.fr>
5662
5663 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
5664 Adjust all users to use symbols[i]->prec or ->assoc.
5665
5666 2001-12-29 Akim Demaille <akim@epita.fr>
5667
5668 * src/reader.c, src/reader.h (tags): Remove.
5669 Adjust all users to use symbols[i]->tag.
5670
5671 2001-12-29 Akim Demaille <akim@epita.fr>
5672
5673 * src/gram.h, src/gram.c (symbols): New, similar to state_table
5674 and rule_table.
5675 * src/reader.c (packsymbols): Fill this table.
5676 Drop sprec.
5677 * src/conflicts.c (resolve_sr_conflict): Adjust.
5678 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
5679 single table.
5680 Use symbols[i]->tag instead of tags[i].
5681
5682 2001-12-29 Akim Demaille <akim@epita.fr>
5683
5684 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
5685 In addition, put a comment in there, to replace...
5686 * tests/regression.at (%union and C comments): Remove.
5687
5688 2001-12-29 Akim Demaille <akim@epita.fr>
5689
5690 * tests/regression.at (Web2c Actions): Blindly move the actual
5691 output as expected output. The contents *seem* right to me, but I
5692 can't pretend reading perfectly parser tables... Nonetheless, all
5693 the other tests pass correctly, the table look OK, even though the
5694 presence of `$axiom' is to be noted: AFAICS it is useless (but
5695 harmless).
5696
5697 2001-12-29 Akim Demaille <akim@epita.fr>
5698
5699 * src/reader.c (readgram): Don't add the rule 0 if there were no
5700 rules read. In other words, add it _after_ having performed
5701 grammar sanity checks.
5702 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
5703
5704 2001-12-29 Akim Demaille <akim@epita.fr>
5705
5706 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
5707 visible, and some states have now a different number.
5708
5709 2001-12-29 Akim Demaille <akim@epita.fr>
5710
5711 * src/reader.c (readgram): Bind the initial rule's lineno to that
5712 of the first rule.
5713 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
5714 (Solved SR Conflicts): Adjust rule 0's line number.
5715
5716 2001-12-29 Akim Demaille <akim@epita.fr>
5717
5718 Fix the `GAWK Grammar' failure.
5719
5720 * src/LR0.c (final_state): Initialize to -1 so that we do compute
5721 the reductions of the first state which was mistakenly confused
5722 with the final state because precisely final_state was initialized
5723 to 0.
5724 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
5725 now noticed by Bison.
5726 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
5727 have a reduction on $default.
5728
5729 2001-12-29 Akim Demaille <akim@epita.fr>
5730
5731 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
5732 rule line numbers.
5733 * src/closure.c (print_closure): Likewise.
5734 * src/derives.c (print_derives): Likewise.
5735 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
5736 now.
5737
5738 2001-12-29 Akim Demaille <akim@epita.fr>
5739
5740 * src/lalr.c (lookaheads_print): New.
5741 (lalr): Call it when --trace-flag.
5742 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
5743 are dumped.
5744
5745 2001-12-29 Akim Demaille <akim@epita.fr>
5746
5747 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
5748 when walking through ritem, even via rule->rhs.
5749 * src/reduce.c (dump_grammar, useful_production, reduce_output)
5750 (useful_production, useless_nonterminals): Likewise.
5751 (reduce_grammar_tables): Likewise, plus update nritems.
5752 * src/nullable.c (set_nullable): Likewise.
5753 * src/lalr.c (build_relations): Likewise.
5754 * tests/sets.at (Nullable): Adjust.
5755 Fortunately, now, the $axiom is no longer nullable.
5756
5757 2001-12-29 Akim Demaille <akim@epita.fr>
5758
5759 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
5760 the 0-sentinel.
5761 * src/gram.c (ritem_longest_rhs): Likewise.
5762 * src/reduce.c (nonterminals_reduce): Likewise.
5763 * src/print_graph.c (print_graph): Likewise.
5764 * src/output.c (output_rule_data): Likewise.
5765 * src/nullable.c (set_nullable): Likewise.
5766
5767 2001-12-29 Akim Demaille <akim@epita.fr>
5768
5769 * src/output.c: Comment changes.
5770
5771 2001-12-27 Paul Eggert <eggert@twinsun.com>
5772
5773 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
5774 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
5775 Sparc, as they were causing more porting problems than the
5776 (minor) performance improvement was worth.
5777
5778 Also, catch up with 1.31's YYSTD.
5779
5780 2001-12-27 Akim Demaille <akim@epita.fr>
5781
5782 * src/output.c (output_gram): Rely on nritems, not the
5783 0-sentinel. See below.
5784 Use -1 as separator, not 0.
5785 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
5786 Rely on -1 as separator in yyrhs, instead of 0.
5787 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
5788 twice `Now at end of input', therefore there are two lines less to
5789 expect.
5790
5791 2001-12-27 Akim Demaille <akim@epita.fr>
5792
5793 * tests/regression.at (Unresolved SR Conflicts):
5794 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
5795 below.
5796
5797 2001-12-27 Akim Demaille <akim@epita.fr>
5798
5799 * src/LR0.c (new_state): Recognize the final state by the fact it
5800 is reached by eoftoken.
5801 (insert_start_shifting_state, insert_eof_shifting_state)
5802 (insert_accepting_state, augment_automaton): Remove, since now
5803 these states are automatically computed from the initial state.
5804 (generate_states): Adjust.
5805 * src/print.c: When reporting a rule number to the user, substract
5806 1, so that the axiom rule is rule 0, and the first user rule is 1.
5807 * src/reduce.c: Likewise.
5808 * src/print_graph.c (print_core): For the time being, just as for
5809 the report, depend upon --trace-flags to dump the full set of
5810 items.
5811 * src/reader.c (readgram): Once the grammar read, insert the rule
5812 0: `$axiom: START-SYMBOL $'.
5813 * tests/set.at: Adjust: rule 0 is now displayed, and since the
5814 number of the states has changed (the final state is no longer
5815 necessarily the last), catch up.
5816
5817 2001-12-27 Akim Demaille <akim@epita.fr>
5818
5819 Try to make the use of the eoftoken valid. Given that its value
5820 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
5821 is used instead of > 0 where appropriate, (ii), depend upon nritems
5822 instead of the 0-sentinel.
5823
5824 * src/gram.h, src/gram.c (nritems): New.
5825 Expected to be duplication of nitems, but for the time being...
5826 * src/reader.c (packgram): Assert nritems and nitems are equal.
5827 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
5828 * src/closure.c (print_closure, print_fderives): Likewise.
5829 * src/gram.c (ritem_print): Likewise.
5830 * src/print.c (print_core, print_grammar): Likewise.
5831 * src/print_graph.c: Likewise.
5832
5833 2001-12-27 Akim Demaille <akim@epita.fr>
5834
5835 * src/main.c (main): If there are complains after grammar
5836 reductions, then output the report anyway if requested, then die.
5837 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
5838 * src/reader.c (eoftoken): New.
5839 (parse_token_decl): If the token being defined has value `0', it
5840 is the eoftoken.
5841 (packsymbols): No longer hack `tags' to insert `$' by hand.
5842 Be sure to preserve the value of the eoftoken.
5843 (reader): Make sure eoftoken is defined.
5844 Initialize nsyms to 0: now eoftoken is created just like the others.
5845 * src/print.c (print_grammar): Don't special case the eof token.
5846 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
5847 lie anyway, albeit pleasant.
5848 * tests/calc.at: Exercise error messages with eoftoken.
5849 Change the grammar so that empty input is invalid.
5850 Adjust expectations.
5851 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
5852
5853 2001-12-27 Akim Demaille <akim@epita.fr>
5854
5855 * configure.in: Check the protos of strchr ans strspn.
5856 Replace strchr if needed.
5857 * src/system.h: Provide the protos of strchr, strspn and memchr if
5858 missing.
5859 * lib/strchr.c: New.
5860 * src/reader.c (symbols_save): Use strchr.
5861
5862 2001-12-27 Akim Demaille <akim@epita.fr>
5863
5864 * src/print.c, src/print_graph.c (escape): New.
5865 Use it to quote the TAGS outputs.
5866 * src/print_graph.c (print_state): Now errors are in red, and
5867 reductions in green.
5868 Prefer high to wide: output the state number on a line of its own.
5869
5870 2001-12-27 Akim Demaille <akim@epita.fr>
5871
5872 * src/state.h, src/state.c (reductions_new): New.
5873 * src/LR0.c (set_state_table): Let all the states have a
5874 `reductions', even if reduced to 0.
5875 (save_reductions): Adjust.
5876 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
5877 * src/print.c (print_reductions, print_actions): Adjust.
5878 * src/output.c (action_row): Adjust.
5879
5880 2001-12-27 Akim Demaille <akim@epita.fr>
5881
5882 * src/state.h, src/state.c (errs_new, errs_dup): New.
5883 * src/LR0.c (set_state_table): Let all the states have an errs,
5884 even if reduced to 0.
5885 * src/print.c (print_errs, print_reductions): Adjust.
5886 * src/output.c (output_actions, action_row): Adjust.
5887 * src/conflicts.c (resolve_sr_conflict): Adjust.
5888
5889 2001-12-27 Akim Demaille <akim@epita.fr>
5890
5891 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
5892
5893 2001-12-27 Akim Demaille <akim@epita.fr>
5894
5895 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
5896 * src/print.c: here.
5897 (lookaheadset, shiftset): New, used as additional storage by
5898 print_reductions.
5899 (print_results): Adjust.
5900 (print_shifts, print_gotos, print_errs): New, extracted from...
5901 (print_actions): here.
5902 * src/print_graph.c (print_actions): Remove dead code.
5903
5904 2001-12-27 Akim Demaille <akim@epita.fr>
5905
5906 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
5907 `$n' and `@n'.
5908
5909 2001-12-27 Akim Demaille <akim@epita.fr>
5910
5911 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
5912 (build_relations): Adjust.
5913
5914 2001-12-27 Akim Demaille <akim@epita.fr>
5915
5916 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
5917 duplication.
5918
5919 2001-12-27 Akim Demaille <akim@epita.fr>
5920
5921 * src/reader.c (packgram): Catch nitems overflows.
5922
5923 2001-12-27 Akim Demaille <akim@epita.fr>
5924
5925 * src/files.c, src/files.h (guard_obstack): Remove.
5926 * src/output.c (output): Adjust.
5927 * src/reader.c (parse_braces): New, factoring...
5928 (copy_action, copy_guard): these two which are renamed as...
5929 (parse_action, parse_guard): these.
5930 As a voluntary consequence, using braces around guards is now
5931 mandatory.
5932
5933 2001-12-27 Akim Demaille <akim@epita.fr>
5934
5935 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
5936 * src/reader.c (symbol_list): `guard' and `guard_line' are new
5937 members.
5938 (symbol_list_new): Adjust.
5939 (copy_action): action_line is the first line, not the last.
5940 (copy_guard): Just as for actions, store the `action' only, not
5941 the switch/case/break flesh.
5942 Don't parse the user action that might follow the guard, let...
5943 (readgram): do it, i.e., now, there can be an action after a
5944 guard.
5945 In other words the guard is just explicitly optional.
5946 (packgram): Adjust.
5947 * src/output.c (guards_output): New.
5948 (output_parser): Call it when needed.
5949 (output): Also free the guard and attrs obstacks.
5950 * src/files.c, src/files.h (obstack_save): Remove.
5951 (output_files): Remove.
5952 As a result, if one needs the former `.act' file, using an
5953 appropriate skeleton which requires actions and guards is now
5954 required.
5955 * src/main.c (main): Adjust.
5956 * tests/semantic.at: New.
5957 * tests/regression.at: Use `input.y' as input file name.
5958 Avoid 8+3 problems by requiring input.c when the test needs the
5959 parser.
5960
5961 2001-12-27 Akim Demaille <akim@epita.fr>
5962
5963 * src/reader.c (symbol_list_new): Be sure to initialize all the
5964 fields.
5965
5966 2001-12-27 Akim Demaille <akim@epita.fr>
5967
5968 All the hacks using a final pseudo state are now useless.
5969
5970 * src/LR0.c (set_state_table): state_table holds exactly nstates.
5971 * src/lalr.c (nLA): New.
5972 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
5973 instead of lookaheadsp from the pseudo state (nstate + 1).
5974
5975 2001-12-27 Akim Demaille <akim@epita.fr>
5976
5977 * src/output.c (action_row, token_actions): Use a state_t instead
5978 of a integer, and nlookaheads instead of the following state's
5979 lookaheadsp.
5980
5981 2001-12-27 Akim Demaille <akim@epita.fr>
5982
5983 * src/conflicts.c (log_resolution, flush_shift)
5984 (resolve_sr_conflict, set_conflicts, solve_conflicts)
5985 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
5986 (conflicts_print, print_reductions): Use a state_t instead of an
5987 integer when referring to a state.
5988 As much as possible, depend upon nlookaheads, instead of the
5989 `lookaheadsp' member of the following state (since lookaheads of
5990 successive states are successive, the difference between state n + 1
5991 and n served as the number of lookaheads for state n).
5992 * src/lalr.c (add_lookback_edge): Likewise.
5993 * src/print.c (print_core, print_actions, print_state)
5994 (print_results): Likewise.
5995 * src/print_graph.c (print_core, print_actions, print_state)
5996 (print_graph): Likewise.
5997 * src/conflicts.h: Adjust.
5998
5999 2001-12-27 Akim Demaille <akim@epita.fr>
6000
6001 * src/bison.hairy: Formatting/comment changes.
6002 ANSIfy.
6003 Remove `register' indications.
6004 Add plenty of `static'.
6005
6006 2001-12-27 Akim Demaille <akim@epita.fr>
6007
6008 * src/output.c (prepare): Drop the muscle `ntbase' which
6009 duplicates ntokens.
6010 * src/bison.simple: Formatting/comment changes.
6011 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
6012 is an undocumented synonym.
6013
6014 2001-12-22 Akim Demaille <akim@epita.fr>
6015
6016 * src/output.c (output_table_data): Change the prototype to use
6017 `int' for array ranges: some invocations do pass an int, not a
6018 short.
6019 Reported by Wayne Green.
6020
6021 2001-12-22 Akim Demaille <akim@epita.fr>
6022
6023 Some actions of web2c.y are improperly triggered.
6024 Reported by Mike Castle.
6025
6026 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
6027 * tests/regression.at (Web2c): Rename as...
6028 (Web2c Report): this.
6029 (Web2c Actions): New.
6030
6031 2001-12-22 Akim Demaille <akim@epita.fr>
6032
6033 Reductions in web2c.y are improperly reported.
6034 Reported by Mike Castle.
6035
6036 * src/conflicts.c (print_reductions): Fix.
6037 * tests/regression.at (Web2c): New.
6038
6039 2001-12-18 Akim Demaille <akim@epita.fr>
6040
6041 Some host fail on `assert (!"foo")', which expands to
6042 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
6043 Reported by Nelson Beebee.
6044
6045 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
6046 `#define it_succeeded 0' and `assert (it_succeeded)'.
6047
6048 2001-12-17 Marc Autret <autret_m@epita.fr>
6049
6050 * src/bison.simple: Don't hard code the skeleton line and filename.
6051 * src/output.c (output_parser): Rename 'line' as 'output_line'.
6052 New line counter 'skeleton_line' (skeleton-line muscle).
6053
6054 2001-12-17 Paul Eggert <eggert@twinsun.com>
6055
6056 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
6057 YYDEBUG must be defined to a nonzero value.
6058
6059 * src/bison.simple (yytname): Do not assume that the user defines
6060 YYDEBUG to a properly parenthesized expression.
6061
6062 2001-12-17 Akim Demaille <akim@epita.fr>
6063
6064 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
6065 nlookaheads is a new member.
6066 Adjust all users.
6067 * src/lalr.h (nlookaheads): Remove this orphan declaration.
6068 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
6069 state.
6070
6071 2001-12-17 Akim Demaille <akim@epita.fr>
6072
6073 * src/files.h, src/files.c (open_files, close_files): Remove.
6074 * src/main.c (main): Don't open/close files, nor invoke lex_free,
6075 let...
6076 * src/reader.c (reader): Do it.
6077
6078 2001-12-17 Akim Demaille <akim@epita.fr>
6079
6080 * src/conflicts.c (print_reductions): Formatting changes.
6081
6082 2001-12-17 Akim Demaille <akim@epita.fr>
6083
6084 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
6085 (flush_reduce): New.
6086 (resolve_sr_conflict): Adjust.
6087
6088 2001-12-17 Akim Demaille <akim@epita.fr>
6089
6090 * src/output.c (output_obstack): Be static and rename as...
6091 (format_obstack): this, to avoid any confusion with files.c's
6092 output_obstack.
6093 * src/reader.h (muscle_obstack): Move to...
6094 * src/output.h: here, since it's defined in output.c.
6095
6096 2001-12-17 Akim Demaille <akim@epita.fr>
6097
6098 * src/output.c (action_row, save_column, default_goto)
6099 (sort_actions, matching_state, pack_vector): Better variable
6100 locality.
6101
6102 2001-12-17 Akim Demaille <akim@epita.fr>
6103
6104 * src/output.c: Various formatting changes.
6105
6106 2001-12-17 Akim Demaille <akim@epita.fr>
6107
6108 * src/files.c (output_files): Free the output_obstack.
6109 * src/main.c (main): Call print and print_graph conditionally.
6110 * src/print.c (print): Work unconditionally.
6111 * src/print_graph.c (print_graph): Work unconditionally.
6112 * src/conflicts.c (log_resolution): Output only if verbose_flag.
6113
6114 2001-12-16 Marc Autret <autret_m@epita.fr>
6115
6116 * src/output.c (actions_output): Fix. When we use %no-lines,
6117 there is one less line per action.
6118
6119 2001-12-16 Marc Autret <autret_m@epita.fr>
6120
6121 * src/bison.simple: Remove a useless #line directive.
6122 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
6123 * src/output.c (get_lines_number): New.
6124 (output_parser): Adjust, now takes care about the lines of a
6125 output muscles.
6126 Fix line numbering.
6127 (actions_output): Computes the number of lines taken by actions.
6128 (output_master_parser): Insert new skeleton which is the name of
6129 the output parser file name.
6130
6131 2001-12-15 Marc Autret <autret_m@epita.fr>
6132
6133 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
6134
6135 2001-12-15 Marc Autret <autret_m@epita.fr>
6136
6137 * src/output.c (output_gram): Keep track of the hairy one.
6138
6139 2001-12-15 Akim Demaille <akim@epita.fr>
6140
6141 Make `make distcheck' work.
6142
6143 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
6144 system.h which uses libgettext.h.
6145
6146 2001-12-15 Akim Demaille <akim@epita.fr>
6147
6148 * src/nullable.c (set_nullable): Useless rules must be skipped,
6149 otherwise, since we range over their symbols, we might look at a
6150 nonterminal which no longer ``exists'', i.e., it is not counted in
6151 `nvars', hence we overflow our arrays.
6152
6153 2001-12-15 Akim Demaille <akim@epita.fr>
6154
6155 The header can also be produced directly, without any obstack!
6156 Yahoo!
6157
6158 * src/files.c, src/files.h (defines_obstack): Remove.
6159 (compute_header_macro): Global.
6160 (defines_obstack_save): Remove.
6161 * src/reader.c (parse_union_decl): No longer output to
6162 defines_obstack: its content can be found in the `stype' muscle
6163 anyway.
6164 (output_token_translations): Merge into...
6165 (symbols_output): this.
6166 Rename as...
6167 (symbols_save): this.
6168 (reader): Adjust.
6169 * src/output.c (header_output): New.
6170 (output): Call it.
6171
6172 2001-12-15 Akim Demaille <akim@epita.fr>
6173
6174 * src/reader.c (parse_union_decl): Instead of handling two obstack
6175 simultaneously, use one to define the `stype' muscle, and use the
6176 value of the latter to fill defines_obstack.
6177 (copy_comment): Remove.
6178 (copy_comment2): Work for a single obstack.
6179 Rename as...
6180 (copy_comment): this.
6181
6182 2001-12-15 Akim Demaille <akim@epita.fr>
6183
6184 * src/lex.c, src/lex.h (xgetc): No longer static.
6185 * src/reader.c (parse_union_decl): Revamp.
6186
6187 2001-12-15 Akim Demaille <akim@epita.fr>
6188
6189 Still making progress in separating Bison into (i) input, (ii)
6190 process, (iii) output: now we can directly output the parser file
6191 without using table_obstack at all.
6192
6193 * src/files.c, src/files.h (table_obstack): Bye bye.
6194 (parser_file_name): New.
6195 * src/files.c (compute_output_file_names): Compute it.
6196 * src/output.c (actions_output, output_parser)
6197 (output_master_parser): To a file instead of an obstack.
6198
6199 2001-12-15 Akim Demaille <akim@epita.fr>
6200
6201 Attach actions to rules, instead of pre-outputting them to
6202 actions_obstack.
6203
6204 * src/gram.h (rule_t): action and action_line are new members.
6205 * src/reader.c (symbol_list): Likewise.
6206 (copy_action): Save the actions within the rule.
6207 (packgram): Save them in rule_table.
6208 * src/output.c (actions_output): New.
6209 (output_parser): Use it on `%%actions'.
6210 (output_rule_data): Don't free rule_table.
6211 (output): Do it.
6212 (prepare): Don't save the `action' muscle.
6213 * src/bison.simple: s/%%action/%%actions/.
6214
6215 2001-12-15 Akim Demaille <akim@epita.fr>
6216
6217 * src/reader.c (copy_action): When --yacc, don't append a `;'
6218 to the user action: let it fail if lacking.
6219 Suggested by Arnold Robbins and Tom Tromey.
6220
6221 2001-12-14 Akim Demaille <akim@epita.fr>
6222
6223 * src/lex.c (literalchar): Simply return the char you decoded, non
6224 longer mess around with obstacks and int pointers.
6225 Adjust all callers.
6226
6227 2001-12-14 Akim Demaille <akim@epita.fr>
6228
6229 * src/lex.c (literalchar): Don't escape the special characters,
6230 just decode them, and keep them as char (before, eol was output as
6231 the 2 char string `\n' etc.).
6232 * src/output.c (output_rule_data): Use quotearg to output the
6233 token strings.
6234
6235 2001-12-13 Paul Eggert <eggert@twinsun.com>
6236
6237 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
6238 Do not infringe on the global user namespace when using C++.
6239 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
6240 All uses of `fprintf' and `stderr' changed.
6241
6242 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
6243
6244 2001-12-13 Akim Demaille <akim@epita.fr>
6245
6246 The computation of nullable is broken: it doesn't handle empty
6247 RHS's properly.
6248
6249 * tests/torture.at (GNU AWK Grammar): New.
6250 * tests/sets.at (Nullable): New.
6251 * src/nullable.c (set_nullable): Instead of blindly looping over
6252 `ritems', loop over the rules, and then over their rhs's.
6253
6254 Work around Autotest bugs.
6255
6256 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
6257 frame, because Autotest understand lines starting with a `+' as
6258 traces from the shell. Then, they are not processed properly.
6259 Admittedly an Autotest bug, but we don't have time to wait for
6260 Autotest to catch up.
6261 * tests/regression.at (Broken Closure): Adjust to the new table
6262 frames.
6263 Move to...
6264 * tests/sets.at: here.
6265
6266 2001-12-13 Akim Demaille <akim@epita.fr>
6267
6268 * src/closure.c (closure): Use nrules instead of playing tricks
6269 with BITS_PER_WORD.
6270
6271 2001-12-13 Akim Demaille <akim@epita.fr>
6272
6273 * src/print.c (print_actions): Output the handling of `$' as the
6274 traces do: shifting the token EOF. Before EOF was treated as a
6275 nonterminal.
6276 * tests/regression.at: Adjust some tests.
6277 * src/print_graph.c (print_core): Complete the set of items via
6278 closure. The next-to-final and final states are still unsatisfying,
6279 but that's to be addressed elsewhere.
6280 No longer output the rule numbers, but do output the state number.
6281 A single loop for the shifts + gotos is enough, but picked a
6282 distinct color for each.
6283 (print_graph): Initialize and finalize closure.
6284
6285 2001-12-13 Akim Demaille <akim@epita.fr>
6286
6287 * src/reader.c (readgram): Remove dead code, an strip useless
6288 braces.
6289 (get_type): Remove, unused.
6290
6291 2001-12-12 Akim Demaille <akim@epita.fr>
6292
6293 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
6294 on that of lib/error.c.
6295
6296 2001-12-12 Akim Demaille <akim@epita.fr>
6297
6298 Some hosts don't like `/' in includes.
6299
6300 * src/system.h: Include libgettext.h without qualifying the path.
6301 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
6302 $(top_srcdir).
6303
6304 2001-12-11 Marc Autret <autret_m@epita.fr>
6305
6306 * src/output.c (output_parser): Remove useless muscle.
6307
6308 2001-12-11 Marc Autret <autret_m@epita.fr>
6309
6310 * src/bison.simple: Remove #line just before %%epilogue. It
6311 is now handled in ...
6312 * src/reader.c (read_additionnal_code): Add the output of a
6313 #line for the epilogue.
6314
6315 2001-12-10 Marc Autret <autret_m@epita.fr>
6316
6317 * src/reader.c (copy_definition): Re-use CPP-outed code which
6318 replace precedent remove.
6319 * src/bison.simple: Remove #line before %%prologue because
6320 %%input-line is wrong at this time.
6321
6322 2001-12-10 Marc Autret <autret_m@epita.fr>
6323
6324 * src/reader.c (symbols_output): Clean up.
6325 * src/output.c (output_gram, output): Clean up.
6326
6327 2001-12-10 Akim Demaille <akim@epita.fr>
6328
6329 * src/lalr.c (initialize_lookaheads): New. Extracted from...
6330 * src/LR0.c (set_state_table): here.
6331 * src/lalr.c (lalr): Call it.
6332
6333 2001-12-10 Akim Demaille <akim@epita.fr>
6334
6335 * src/state.h (shifts): Remove the `number' member: shifts are
6336 attached to state, hence no longer need to be labelled with a
6337 state number.
6338
6339 2001-12-10 Akim Demaille <akim@epita.fr>
6340
6341 Now that states have a complete set of members, the linked list of
6342 shifts is useless: just fill directly the state's shifts member.
6343
6344 * src/state.h (shifts): Remove the `next' member.
6345 * src/LR0.c (first_state, last_state): Remove.
6346 Adjust the callers.
6347 (augment_automaton): Don't look for the shifts that must be added
6348 a shift on EOF: it is those of the state we looked for! But now,
6349 since shifts are attached, it is no longer needed to looking
6350 merely by its id: its number.
6351
6352 2001-12-10 Akim Demaille <akim@epita.fr>
6353
6354 * src/LR0.c (augment_automaton): Better variable locality.
6355 Remove an impossible branch: if there is a state corresponding to
6356 the start symbol being shifted, then there is shift for the start
6357 symbol from the initial state.
6358
6359 2001-12-10 Akim Demaille <akim@epita.fr>
6360
6361 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
6362 only when appropriate: when insert_start_shifting_state' is not
6363 invoked.
6364 * tests/regression.at (Rule Line Numbers): Adjust.
6365
6366 2001-12-10 Akim Demaille <akim@epita.fr>
6367
6368 * src/LR0.c (augment_automaton): Now that all states have shifts,
6369 merge the two cases addition shifts to the initial state.
6370
6371 2001-12-10 Akim Demaille <akim@epita.fr>
6372
6373 * src/lalr.c (set_state_table): Move to...
6374 * src/LR0.c: here.
6375 * src/lalr.c (lalr): Don't call it...
6376 * src/LR0.c (generate_states): do it.
6377 * src/LR0.h (first_state): Remove, only the table is used.
6378
6379 2001-12-10 Akim Demaille <akim@epita.fr>
6380
6381 * src/LR0.h (first_shift, first_reduction): Remove.
6382 * src/lalr.c: Don't use first_shift: find shifts through the
6383 states.
6384
6385 2001-12-10 Akim Demaille <akim@epita.fr>
6386
6387 * src/LR0.c: Attach shifts to states as soon as they are
6388 computed.
6389 * src/lalr.c (set_state_table): Instead of assigning shifts to
6390 state, just assert that the mapping was properly done.
6391
6392 2001-12-10 Akim Demaille <akim@epita.fr>
6393
6394 * src/LR0.c (insert_start_shift): Rename as...
6395 (insert_start_shifting_state): this.
6396 (insert_eof_shifting_state, insert_accepting_state): New.
6397 (augment_automaton): Adjust.
6398 Better locality of the variables.
6399 When looking if the start_symbol is shifted from the initial
6400 state, using `while (... symbol != start_symbol ...)' sounds
6401 better than `while (... symbol < start_symbol ...)': If fail
6402 to see how the order between symbols could be relevant!
6403
6404 2001-12-10 Akim Demaille <akim@epita.fr>
6405
6406 * src/getargs.h: Don't declare `spec_name_prefix' and
6407 `spec_file_prefix', declared by src/files.h.
6408 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
6409 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
6410 * src/output.c (prepare): Adjust.
6411 * src/reader.c (symbols_output): Likewise.
6412 * src/vmsgetargs.c: Vaguely adjust, but who cares?
6413
6414 2001-12-10 Akim Demaille <akim@epita.fr>
6415
6416 * src/muscle_tab.c (muscle_init): NULL is a better default than
6417 `"0"'.
6418
6419 2001-12-10 Akim Demaille <akim@epita.fr>
6420
6421 * src/reader.c (reader): Calling symbols_output once is enough.
6422
6423 2001-12-10 Akim Demaille <akim@epita.fr>
6424
6425 Now that states have a complete set of members, the linked list of
6426 reductions is useless: just fill directly the state's reductions
6427 member.
6428
6429 * src/state.h (struct reductions): Remove member `number' and
6430 `next'.
6431 * src/LR0.c (first_reduction, last_reduction): Remove.
6432 (save_reductions): Don't link the new reductions, store them in
6433 this_state.
6434 * src/lalr.c (set_state_table): No need to attach reductions to
6435 states, it's already done.
6436 * src/output.c (output_actions): No longer free the shifts, then
6437 the reductions, then the states: free all the states and their
6438 members.
6439
6440 2001-12-10 Akim Demaille <akim@epita.fr>
6441
6442 * src/options.c (OPTN, DRTV, BOTH): New.
6443 (option_table): Use them.
6444
6445 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
6446 the job of system.h.
6447 * src/options.c: Don't include stdio.h and xalloc.h for the same
6448 reasons.
6449
6450 2001-12-10 Akim Demaille <akim@epita.fr>
6451
6452 * src/output.c (output, prepare): Make sure the values of the
6453 muscles `action' and `prologue' are 0-terminated.
6454
6455 2001-12-10 Akim Demaille <akim@epita.fr>
6456
6457 Clean up GCC warnings.
6458
6459 * src/reader.c (copy_action): `buf' is not used.
6460 (parse_skel_decl): Be static.
6461 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
6462 * src/options.h (create_long_option_table): Have a real prototype.
6463 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
6464 (hash_delete_at): Return const void *.
6465 Adjust casts to preserve the const.
6466
6467 2001-12-10 Akim Demaille <akim@epita.fr>
6468
6469 * configure.in: Require 2.52g.
6470 M4 is not needed, but AUTOM4TE is.
6471 * m4/m4.m4: Remove.
6472 * tests/Makefile.am: Adjust.
6473
6474 2001-12-10 Akim Demaille <akim@epita.fr>
6475
6476 One structure for states is enough, even though theoretically
6477 there are LR(0) states and LALR(1) states.
6478
6479 * src/lalr.h (state_t): Remove.
6480 (state_table): Be state_t **, not state_t *.
6481 * src/state.h (core, CORE_ALLOC): Rename as...
6482 (state_t, STATE_ALLOC): this.
6483 Add the LALR(1) members: shifts, reductions, errs.
6484 * src/LR0.c (state_table): Rename as...
6485 (state_hash): this, to avoid name clashes with the global
6486 `state_table'.
6487 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
6488 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
6489
6490 2001-12-10 Akim Demaille <akim@epita.fr>
6491
6492 Bison dumps core on bash.y.
6493 Reported by Pascal Bart.
6494
6495 * src/warshall.c (bitmatrix_print): New.
6496 (TC): Use it.
6497 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
6498 j must be the outer loop.
6499 * tests/regression.at (Broken Closure): New.
6500
6501 2001-12-05 Akim Demaille <akim@epita.fr>
6502
6503 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
6504 its argument.
6505 Reported by Peter Hámorský.
6506
6507 2001-12-05 Akim Demaille <akim@epita.fr>
6508
6509 * src/conflicts.c (err_table): Remove.
6510 (resolve_sr_conflict): Adjust.
6511 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
6512 Rename as...
6513 (state_t.reductions, state_t.shifts): this.
6514
6515 2001-12-05 Akim Demaille <akim@epita.fr>
6516
6517 * src/reduce.c (reduce_grammar_tables): No longer disable the
6518 removal of useless rules via CPP but via `if (0)', so that the
6519 compiler still check the code is valid.
6520 For instance, it should have noticed `rline' no longer exists: use
6521 the `line' member of rule_t.
6522 * src/gram.c (dummy, rline): Remove, unused.
6523
6524 2001-12-05 Akim Demaille <akim@epita.fr>
6525
6526 * src/output.c (pack_vector): Use assert, not berror.
6527 * src/main.c (berror): Remove, unused.
6528
6529 2001-12-05 Akim Demaille <akim@epita.fr>
6530
6531 New experimental feature: if --verbose --trace output all the
6532 items of a state, not only its kernel.
6533
6534 * src/print.c (print_core): If `trace_flag', then invoke closure
6535 before outputting the items of the state (print_core is no longer
6536 a correct name them).
6537 (print_results): Invoke new_closure/free_closure if needed.
6538
6539 2001-12-05 Akim Demaille <akim@epita.fr>
6540
6541 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
6542 * src/closure.c, src/closure.h (itemsetsize): Rename as...
6543 (nitemset): for consistency with the rest of the project.
6544
6545 2001-12-05 Akim Demaille <akim@epita.fr>
6546
6547 * src/closure.c (print_closure): Improve.
6548 (closure): Use it for printing input and output.
6549
6550 2001-12-05 Akim Demaille <akim@epita.fr>
6551
6552 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
6553 indexed by nonterminals.
6554
6555 2001-12-05 Akim Demaille <akim@epita.fr>
6556
6557 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
6558 what it was!).
6559 * src/warshall.h: Remove accidental duplication of the content.
6560
6561 2001-12-05 Akim Demaille <akim@epita.fr>
6562
6563 * src/closure.c (set_fderives): De-obfuscate.
6564
6565 2001-12-05 Akim Demaille <akim@epita.fr>
6566
6567 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
6568
6569 2001-12-05 Akim Demaille <akim@epita.fr>
6570
6571 * src/closure.c (set_firsts): De-obfuscate.
6572
6573 2001-12-05 Akim Demaille <akim@epita.fr>
6574
6575 * src/output.c (action_row): De-obfuscate
6576 using the good o' techniques: arrays not pointers, variable
6577 locality, BITISSET, RESETBIT etc.
6578
6579 2001-12-05 Akim Demaille <akim@epita.fr>
6580
6581 Pessimize the code to simplify it: from now on, all the states
6582 have a valid SHIFTS, which NSHIFTS is possibly 0.
6583
6584 * src/LR0.c (shifts_new): Be global and move to..
6585 * src/state.c, src/state.h: here.
6586 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
6587 * src/print_graph: Adjust.
6588
6589 2001-12-05 Akim Demaille <akim@epita.fr>
6590
6591 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
6592 * src/conflicts.c: Use it.
6593 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
6594 incorrectly ``simplified''.
6595
6596 2001-12-05 Akim Demaille <akim@epita.fr>
6597
6598 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
6599 using the good o' techniques: arrays not pointers, variable
6600 locality, BITISSET, RESETBIT etc.
6601
6602 2001-12-05 Akim Demaille <akim@epita.fr>
6603
6604 * src/state.h (SHIFT_SYMBOL): New.
6605 * src/conflicts.c: Use it to deobfuscate.
6606
6607 2001-12-05 Akim Demaille <akim@epita.fr>
6608
6609 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
6610 (print_reductions): De-obfuscate using the good o' techniques:
6611 arrays not pointers, variable locality, BITISSET.
6612
6613 2001-12-05 Akim Demaille <akim@epita.fr>
6614
6615 * src/conflicts.c (print_reductions): Arrays, not pointers.
6616 Use BITISSET.
6617
6618 2001-12-05 Akim Demaille <akim@epita.fr>
6619
6620 * src/conflicts.c (print_reductions): Pessimize, but clarify.
6621
6622 2001-12-05 Akim Demaille <akim@epita.fr>
6623
6624 * src/conflicts.c (print_reductions): Improve variable locality.
6625
6626 2001-12-05 Akim Demaille <akim@epita.fr>
6627
6628 * src/conflicts.c (print_reductions): Pessimize, but clarify.
6629
6630 2001-12-05 Akim Demaille <akim@epita.fr>
6631
6632 * src/conflicts.c (print_reductions): Improve variable locality.
6633
6634 2001-12-05 Akim Demaille <akim@epita.fr>
6635
6636 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
6637 * src/lalr.c: Use them.
6638
6639 2001-12-05 Akim Demaille <akim@epita.fr>
6640
6641 * src/LR0.c (augment_automaton): Formatting changes.
6642 Better variable locality.
6643
6644 2001-12-05 Akim Demaille <akim@epita.fr>
6645
6646 * src/lalr.c (matrix_print): New.
6647 (transpose): Use it.
6648 Use arrays instead of pointers.
6649
6650 2001-12-05 Akim Demaille <akim@epita.fr>
6651
6652 * src/lalr.c (maxrhs): Move to...
6653 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
6654 * src/lalr.c (build_relations): Adjust.
6655
6656 2001-12-05 Akim Demaille <akim@epita.fr>
6657
6658 * src/lalr.c (transpose): Free the memory allocated to the
6659 argument, as it is replaced by the results by the unique caller.
6660 (build_relations): Merely invoke transpose: it handles the memory
6661 deallocation.
6662 Improve variable locality.
6663 Avoid variables used as mere abbreviations.
6664 (compute_lookaheads): Use arrays instead of pointers.
6665
6666 2001-12-05 Akim Demaille <akim@epita.fr>
6667
6668 * src/lalr.c (initialize_F): Improve variable locality.
6669 Avoid variables used as mere abbreviations.
6670
6671 2001-12-05 Akim Demaille <akim@epita.fr>
6672
6673 * src/derives.c (print_derives): Display the ruleno.
6674 * src/lalr.c (initialize_F, transpose): Better variable locality
6675 to improve readability.
6676 Avoid variables used as mere abbreviations.
6677
6678 2001-12-05 Akim Demaille <akim@epita.fr>
6679
6680 * src/lalr.c (traverse): Use arrays instead of pointers.
6681
6682 2001-12-05 Akim Demaille <akim@epita.fr>
6683
6684 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
6685 the handling of squeue.
6686 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
6687
6688 2001-12-05 Akim Demaille <akim@epita.fr>
6689
6690 Because useless nonterminals are now kept alive (instead of being
6691 `destroyed'), we now sometimes examine them, and store information
6692 related to them. Hence we need to know their number, and adjust
6693 memory allocations.
6694
6695 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
6696 static.
6697 * src/LR0.c (allocate_itemsets): The memory allocated to
6698 `symbol_count' was used for two different purpose: once to count
6699 the number of occurrences of each symbol, and later reassigned to
6700 `shift_symbol', containing the symbol that can be shifted from a
6701 given state.
6702 Deobfuscate, i.e., allocate, use and free `symbol_count' here
6703 only, and...
6704 (new_itemsets): Allocate `shift_symbol' here.
6705 (allocate_itemsets): symbol_count includes useless nonterminals.
6706 Make room for them.
6707 (free_storage): Use `free', not `XFREE', for pointers that cannot
6708 be null.
6709
6710 2001-12-05 Akim Demaille <akim@epita.fr>
6711
6712 * src/nullable.c (set_nullable): Deobfuscate the handling of
6713 ritem.
6714 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
6715
6716 2001-12-05 Akim Demaille <akim@epita.fr>
6717
6718 * src/gram.c, src/gram.h (ritem_print): New.
6719 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
6720 (This useless function was defined only to work around VMS linkers
6721 that can't handle compilation units with variables only).
6722 * src/reduce.c (dump_grammar): Use it to trace the construction of
6723 ritem.
6724
6725 2001-12-04 Paul Eggert <eggert@twinsun.com>
6726
6727 * src/bison.simple (union yyalloc): Change member names
6728 to be the same as the stack names.
6729 (yyparse): yyptr is now union yyalloc *, not char *.
6730 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
6731 and may generate better code on some machines.
6732 (yystpcpy): Use prototype if __STDC__ is defined, not just
6733 if __cplusplus is defined.
6734
6735 2001-11-30 Akim Demaille <akim@epita.fr>
6736
6737 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
6738 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
6739 Gettext doesn't compile cleanly, and dies with -Werror.
6740 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
6741 Include WARNING_CFLAGS here.
6742 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
6743 before being defined.
6744
6745 2001-11-27 Paul Eggert <eggert@twinsun.com>
6746
6747 * lib/quotearg.h (quotearg_n, quotearg_n_style):
6748 First arg is int, not unsigned.
6749 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
6750 (SIZE_MAX, UINT_MAX): New macros.
6751 (quotearg_n_options): Abort if N is negative.
6752 Avoid overflow check on hosts where size_t is 64 bits and int
6753 is 32 bits, as overflow is impossible there.
6754 Fix off-by-one typo that caused unnecessary reallocation.
6755
6756 2001-11-29 Paul Eggert <eggert@twinsun.com>
6757
6758 Name space cleanup in generated parser.
6759
6760 * doc/bison.texinfo (Bison Parser): Discuss system headers
6761 and their effect on the user name space.
6762
6763 * src/bison.simple:
6764 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
6765 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
6766 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
6767
6768 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
6769 on user names when possible.
6770
6771 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
6772 Simplify test for whather <alloca.h> exists.
6773
6774 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
6775
6776 (<stdio.h>): Include if YYDEBUG.
6777
6778 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
6779 ! defined (yyoverflow) && ! defined (yymemcpy).
6780
6781 (yymemcpy, yyparse): Rename local variables as needed so that
6782 they all begin with 'yy'.
6783
6784 (yystrlen, yystpcpy): New functions.
6785
6786 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
6787 All uses changed.
6788
6789 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
6790 instead of relying on string.h functions. Use YYSTACK_ALLOC
6791 and YYSTACK_FREE instead of malloc and free.
6792
6793 2001-11-30 Akim Demaille <akim@epita.fr>
6794
6795 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
6796 before their first uses.
6797 (YYBISON, YYPURE): Move to the top of the output.
6798
6799 2001-11-30 Akim Demaille <akim@epita.fr>
6800
6801 * tests/reduce.at (Useless Nonterminals): Fix.
6802
6803 2001-11-30 Akim Demaille <akim@epita.fr>
6804
6805 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
6806 if body instead of `;' to pacify GCC's warnings.
6807
6808 2001-11-30 Akim Demaille <akim@epita.fr>
6809
6810 Instead of mapping the LHS of unused rules to -1, keep the LHS
6811 valid, but flag the rules as invalid.
6812
6813 * src/gram.h (rule_t): `useful' is a new member.
6814 * src/print.c (print_grammar): Adjust.
6815 * src/derives.c (set_derives): Likewise.
6816 * src/reader.c (packgram, reduce_output): Likewise.
6817 * src/reduce.c (reduce_grammar_tables): Likewise.
6818 * tests/reduce.at (Underivable Rules, Useless Rules): New.
6819
6820 2001-11-30 Akim Demaille <akim@epita.fr>
6821
6822 * src/reduce.c (reduce_output): Formatting changes.
6823 * src/print.c (print_results, print_grammar): Likewise.
6824 * tests/regression.at (Rule Line Numbers)
6825 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
6826
6827 2001-11-30 Akim Demaille <akim@epita.fr>
6828
6829 * src/reduce.c (nonterminals_reduce): Instead of throwing away
6830 useless nonterminals, move them at the end of the symbol arrays.
6831 (reduce_output): Adjust.
6832 * tests/reduce.at (Useless Nonterminals): Adjust.
6833
6834 2001-11-30 Akim Demaille <akim@epita.fr>
6835
6836 * src/reduce.c: Various comment/formatting changes.
6837 (nonterminals_reduce): New, extracted from...
6838 (reduce_grammar_tables): here.
6839 (reduce_grammar): Call nonterminals_reduce.
6840
6841 2001-11-29 Paul Eggert <eggert@twinsun.com>
6842
6843 * src/bison.simple (YYSTACK_REALLOC): Remove.
6844 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
6845 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
6846 New macros.
6847 (union yyalloc): New type.
6848 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
6849 an arbitrary restriction on hosts where size_t is wider than int.
6850
6851 (yyparse): Don't dump core if alloca or malloc fails; instead, report
6852 a parser stack overflow. Allocate just one block of memory for all
6853 three stacks, instead of allocating three blocks; this typically is
6854 faster and reduces fragmentation.
6855
6856 Do not limit the number of items in the stack to a value that fits
6857 in 'int', as this is an arbitrary limit on hosts with 64-bit
6858 size_t and 32-bit int.
6859
6860 2001-11-29 Marc Autret <autret_m@epita.fr>
6861
6862 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
6863 of defining YYERROR_VERBOSE.
6864 [AT_DATA]: $4 is now out of C declarations in the prologue.
6865
6866 2001-11-28 Marc Autret <autret_m@epita.fr>
6867
6868 * src/reader.c (parse_dquoted_param): New.
6869 (parse_skel_decl): Use it.
6870 * src/lex.h: Add its prototype.
6871 * src/lex.c (literalchar): Become not static.
6872
6873 2001-11-28 Marc Autret <autret_m@epita.fr>
6874
6875 * src/output.h: And put its extern declaration here.
6876 * src/output.c (error_verbose): Define here.
6877 (prepare): Echo name modification.
6878 * src/getargs.h: Clean its extern declaration.
6879 * src/getargs.c (error_verbose_flag): Remove.
6880 (getargs): Remove case 'e'.
6881 * src/options.c (option_table): 'error-verbose' is now seen as simple
6882 percent option.
6883 Include output.h.
6884
6885 * src/reader.c (read_declarations): Remove case tok_include.
6886 (parse_include_decl): Remove.
6887 * src/lex.h (token_t): Remove tok_include.
6888 * src/options.c (option_table): 'include' is now a simple command line
6889 option.
6890
6891 2001-11-28 Marc Autret <autret_m@epita.fr>
6892
6893 * src/bison.simple: Adjust muscle names.
6894 * src/muscle_tab.c (muscle_init): Also rename the muscles.
6895 * src/output.c (prepare): s/_/-/ for the muscles names.
6896 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
6897
6898 2001-11-28 Marc Autret <autret_m@epita.fr>
6899
6900 * src/bison.simple: Fix debug.
6901 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
6902
6903 2001-11-28 Akim Demaille <akim@epita.fr>
6904
6905 * src/LR0.c (shifts_new): New.
6906 (save_shifts, insert_start_shift, augment_automaton): Use it.
6907
6908 2001-11-28 Akim Demaille <akim@epita.fr>
6909
6910 * src/closure.c (closure): `b' and `ruleno' denote the same value:
6911 keep ruleno only.
6912
6913 2001-11-28 Akim Demaille <akim@epita.fr>
6914
6915 * src/closure.c (closure): Instead of looping over word in array
6916 then bits in words, loop over bits in array.
6917
6918 2001-11-28 Akim Demaille <akim@epita.fr>
6919
6920 * src/closure.c (closure): No longer optimize the special case
6921 where all the bits of `ruleset[r]' are set to 0, to make the code
6922 clearer.
6923
6924 2001-11-28 Akim Demaille <akim@epita.fr>
6925
6926 * src/closure.c (closure): `r' and `c' are new variables, used to
6927 de-obfuscate accesses to RULESET and CORE.
6928
6929 2001-11-28 Akim Demaille <akim@epita.fr>
6930
6931 * src/reduce.c (reduce_print): Use ngettext.
6932 (dump_grammar): Improve the trace accuracy.
6933
6934 2001-11-28 Akim Demaille <akim@epita.fr>
6935
6936 * src/reduce.c (dump_grammar): Don't translate trace messages.
6937
6938 2001-11-28 Akim Demaille <akim@epita.fr>
6939
6940 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
6941 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
6942 as all tags are free'ed afterwards.
6943 From Enrico Scholz.
6944
6945 2001-11-27 Paul Eggert <eggert@twinsun.com>
6946
6947 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
6948 use alloca when we didn't want to, and vice versa.
6949
6950 2001-11-27 Marc Autret <autret_m@epita.fr>
6951
6952 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
6953 initialization.
6954 * src/output.c (prepare): Remove its update.
6955
6956 2001-11-27 Marc Autret <autret_m@epita.fr>
6957
6958 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
6959 Use %error-verbose.
6960
6961 2001-11-27 Marc Autret <autret_m@epita.fr>
6962
6963 * src/bison.simple: Remove YYERROR_VERBOSE using.
6964 Use %%error_verbose.
6965 (yyparse): Likewise.
6966 * src/output.c (prepare): Give its final value.
6967 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
6968 * src/getargs.h: Add its extern declaration.
6969 * src/getargs.c (error_verbose_flag): New int.
6970 (getargs): Update to catch new case.
6971 * src/options.c (option_table): 'error-verbose' is a new option.
6972 (shortopts): Update.
6973
6974 2001-11-27 Akim Demaille <akim@epita.fr>
6975
6976 * src/system.h: Use intl/libgettext.h.
6977 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
6978
6979 2001-11-27 Akim Demaille <akim@epita.fr>
6980
6981 * tests/torture.at (Exploding the Stack Size with Malloc):
6982 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
6983
6984 2001-11-27 Akim Demaille <akim@epita.fr>
6985
6986 * src/files.c: Include error.h.
6987 Reported by Hans Aberg.
6988
6989 2001-11-26 Marc Autret <autret_m@epita.fr>
6990
6991 * src/reader.c (parse_include_decl): New, not yet implemented.
6992 (read_declarations): Add case tok_include.
6993 * src/getargs.h (include): Add its extern definition.
6994 * src/getargs.c (include): New const char *.
6995 (getargs): Add case '-I'.
6996 * src/options.c (option_table): Add include as command line and
6997 percent option.
6998 * src/lex.h (token_t): Add tok_include.
6999
7000 2001-11-26 Akim Demaille <akim@epita.fr>
7001
7002 * src/reader.c (readgram): Make sure rules for mid-rule actions
7003 have a lineno equal to that of their host rule.
7004 Reported by Hans Aberg.
7005 * tests/regression.at (Rule Line Numbers): New.
7006
7007 2001-11-26 Akim Demaille <akim@epita.fr>
7008
7009 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
7010 size_ts.
7011
7012 2001-11-26 Akim Demaille <akim@epita.fr>
7013
7014 * src/complain.c, src/complain.h (error): Remove, provided by
7015 lib/error.[ch].
7016
7017 2001-11-26 Akim Demaille <akim@epita.fr>
7018
7019 * src/reader.c (read_declarations): Don't abort on tok_illegal,
7020 issue an error message.
7021 * tests/regression.at (Invalid %directive): New.
7022 Reported by Hans Aberg.
7023
7024 2001-11-26 Akim Demaille <akim@epita.fr>
7025
7026 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
7027 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
7028
7029 2001-11-26 Akim Demaille <akim@epita.fr>
7030
7031 * src/conflicts.c (conflicts_print): Don't complain at all when
7032 there are no reduce/reduce conflicts, and as many shift/reduce
7033 conflicts as expected.
7034 * tests/regression.at (%expect right): Adjust.
7035
7036 2001-11-23 Akim Demaille <akim@epita.fr>
7037
7038 * lib/alloca.c: Update, from fileutils.
7039
7040 2001-11-23 Akim Demaille <akim@epita.fr>
7041
7042 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
7043
7044 2001-11-23 Akim Demaille <akim@epita.fr>
7045
7046 * src/system.h: Include alloca.h.
7047 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
7048
7049 2001-11-23 Akim Demaille <akim@epita.fr>
7050
7051 * src/print_graph.c (print_actions): Remove `rule', unused.
7052 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
7053 pacify GCC's signed < unsigned warnings.
7054 * src/closure.c (itemsetsize): Likewise.
7055 * src/reader.c (symbol_list_new): Static.
7056
7057 2001-11-23 Akim Demaille <akim@epita.fr>
7058
7059 Attaching lineno to buckets is stupid, since only one copy of each
7060 symbol is kept, only the line of the first occurrence is kept too.
7061
7062 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
7063 * src/reader.c (rline_allocated): Remove, unused.
7064 (symbol_list): Have a `line' member.
7065 (symbol_list_new): New.
7066 (readgram): Use it.
7067 * src/print.c (print_grammar): Output the rule line numbers.
7068 * tests/regression.at (Solved SR Conflicts)
7069 (Unresolved SR Conflicts): Adjust.
7070 Reported by Hans Aberg.
7071
7072 2001-11-22 Marc Autret <autret_m@epita.fr>
7073
7074 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
7075
7076 2001-11-22 Marc Autret <autret_m@epita.fr>
7077
7078 * src/muscle_tab.c (muscle_init): Remove initialization of
7079 skeleton muscle.
7080 * src/output.c (output_master_parser): Do it here.
7081
7082 2001-11-20 Akim Demaille <akim@epita.fr>
7083
7084 * po/sv.po: New.
7085 * configure.in (ALL_LINGUAS): Adjust.
7086 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
7087 longer contains strings to translate.
7088
7089 2001-11-19 Akim Demaille <akim@epita.fr>
7090
7091 * src/conflicts.c (conflicts_print): Add a missing \n.
7092
7093 2001-11-19 Akim Demaille <akim@epita.fr>
7094
7095 * src/nullable.c (nullable_print): New.
7096 (set_nullable): Call it when tracing.
7097 Better locality of variables.
7098
7099 2001-11-19 Akim Demaille <akim@epita.fr>
7100
7101 * src/print.c (print_actions): Better locality of variables.
7102
7103 2001-11-19 Akim Demaille <akim@epita.fr>
7104
7105 * src/derives.c (print_derives): Fix and enrich.
7106 * src/closure.c (print_fderives): Likewise.
7107
7108 2001-11-19 Akim Demaille <akim@epita.fr>
7109
7110 * src/closure.c (itemsetend): Remove, replaced with...
7111 (itemsetsize): new.
7112
7113 2001-11-19 Akim Demaille <akim@epita.fr>
7114
7115 * src/LR0.c (kernel_end): Remove, replaced with...
7116 (kernel_size): new.
7117
7118 2001-11-19 Akim Demaille <akim@epita.fr>
7119
7120 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
7121 to clarify.
7122
7123 2001-11-19 Akim Demaille <akim@epita.fr>
7124
7125 * src/closure.c (closure): Use arrays instead of pointers to clarify.
7126
7127 2001-11-19 Akim Demaille <akim@epita.fr>
7128
7129 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
7130 trace messages.
7131 * src/LR0.c: Likewise.
7132 (allocate_itemsets): Use arrays instead of pointers to clarify.
7133
7134 2001-11-19 Akim Demaille <akim@epita.fr>
7135
7136 * src/getargs.c (statistics_flag): Replace with...
7137 (trace_flag): New.
7138 (longopts): Accept --trace instead of --statistics.
7139 * src/getargs.h, src/options.c: Adjust.
7140 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
7141 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
7142
7143 2001-11-19 Akim Demaille <akim@epita.fr>
7144
7145 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
7146 pointers to clarify the code.
7147 (save_reductions, save_shifts): Factor common parts of alternatives.
7148
7149 2001-11-19 Akim Demaille <akim@epita.fr>
7150
7151 * src/LR0.c (new_state, get_state): Complete TRACE code.
7152 * src/closure.c: Include `reader.h' to get `tags', needed by the
7153 trace code.
7154 Rename the conditional DEBUG as TRACE.
7155 Output consistently TRACEs to stderr, not stdout.
7156 * src/derives.c: Likewise.
7157 * src/reduce.c: (inaccessable_symbols): Using if is better style
7158 than goto.
7159 Use `#if TRACE' instead of `#if 0' for tracing code.
7160
7161 2001-11-19 Akim Demaille <akim@epita.fr>
7162
7163 * src/system.h (LIST_FREE, shortcpy): New.
7164 * src/LR0.c: Use them.
7165 * src/output.c (free_itemsets, free_reductions, free_shifts):
7166 Remove, replaced by LIST_FREE.
7167
7168 2001-11-19 Akim Demaille <akim@epita.fr>
7169
7170 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
7171 (REDUCTIONS_ALLOC): New.
7172 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
7173 allocation.
7174
7175 2001-11-19 Akim Demaille <akim@epita.fr>
7176
7177 * src/LR0.c (new_state): Complete trace code.
7178 * src/nullable.c (set_nullable): Don't translate traces.
7179
7180 2001-11-19 Akim Demaille <akim@epita.fr>
7181
7182 * src/print_graph.c (print_core): Better locality of variables.
7183 * src/print.c (print_core): Likewise.
7184
7185 2001-11-19 Akim Demaille <akim@epita.fr>
7186
7187 * src/vcg.c: You do the output, so you are responsible of the
7188 handling of VCG syntax, in particular: use quotearg.
7189 * src/print_graph.c: Don't.
7190 (print_actions): Don't output the actions as part of the nodes,
7191 since that's the job of the edges.
7192 (print_state): Don't output by hand: fill the node description,
7193 and ask for its output.
7194
7195 2001-11-19 Akim Demaille <akim@epita.fr>
7196
7197 * src/bison.simple (yyparse): When verbosely reporting an error,
7198 no longer put additional quotes around token names.
7199 * tests/calc.at: Adjust.
7200
7201 2001-11-19 Akim Demaille <akim@epita.fr>
7202
7203 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
7204 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
7205 * src/output.c: Adjust.
7206
7207 2001-11-19 Akim Demaille <akim@epita.fr>
7208
7209 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
7210 (rule_t): this.
7211 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
7212
7213 2001-11-19 Akim Demaille <akim@epita.fr>
7214
7215 * src/gram.h (rule_t): New.
7216 (rule_table): New.
7217 (rrhs, rlhs): Remove, part of state_t.
7218 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
7219 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
7220 * src/reader.c, src/reduce.c: Adjust.
7221
7222 2001-11-19 Akim Demaille <akim@epita.fr>
7223
7224 * src/reader.c (symbols_output): New, extracted from...
7225 (packsymbols): Here.
7226 (reader): Call it.
7227
7228 2001-11-19 Akim Demaille <akim@epita.fr>
7229
7230 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
7231 (maxrhs): this new function.
7232
7233 2001-11-19 Akim Demaille <akim@epita.fr>
7234
7235 * src/lalr.c (F): New macro to access the variable F.
7236 Adjust.
7237
7238 2001-11-19 Akim Demaille <akim@epita.fr>
7239
7240 * src/lalr.h (LA): New macro to access the variable LA.
7241 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
7242 * src/lalr.c: Adjust.
7243
7244 2001-11-19 Akim Demaille <akim@epita.fr>
7245
7246 * src/lalr.c (initialize_LA): Only initialize LA. Let...
7247 (set_state_table): handle the `lookaheads' members.
7248
7249 2001-11-19 Akim Demaille <akim@epita.fr>
7250
7251 * src/lalr.h (lookaheads): Removed array, whose contents is now
7252 a member of...
7253 (state_t): this structure.
7254 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
7255 Adjust.
7256
7257 2001-11-19 Akim Demaille <akim@epita.fr>
7258
7259 * src/lalr.h (consistent): Removed array, whose contents is now
7260 a member of...
7261 (state_t): this structure.
7262 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
7263 Adjust.
7264
7265 2001-11-19 Akim Demaille <akim@epita.fr>
7266
7267 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
7268 contents are now members of...
7269 (state_t): this structure.
7270 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
7271 Adjust.
7272
7273 2001-11-19 Akim Demaille <akim@epita.fr>
7274
7275 * src/lalr.h (state_t): New.
7276 (state_table): Be a state_t * instead of a core **.
7277 (accessing_symbol): Remove, part of state_t.
7278 * src/lalr.c: Adjust.
7279 (set_accessing_symbol): Merge into...
7280 (set_state_table): this.
7281 * src/print_graph.c, src/conflicts.c: Adjust.
7282
7283 2001-11-14 Akim Demaille <akim@epita.fr>
7284
7285 * tests/calc.at, tests/output.at, tests/regression.at,
7286 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
7287 now the tests are run in private dirs, therefore AC_CLEANUP and
7288 family can be simplified to 0-ary.
7289 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
7290 use abs. path to find config.h.
7291 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
7292 stderr, there can be way too much random noise.
7293 Instead pass -Werror to GCC and rely on the exit status.
7294 Reported by Wolfram Wagner.
7295
7296 2001-11-14 Akim Demaille <akim@epita.fr>
7297
7298 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
7299 defined only if yyoverflow is defined, to avoid `warning: unused
7300 variable `yyvs1''.
7301 Reported by The Test Suite.
7302
7303 2001-11-14 Akim Demaille <akim@epita.fr>
7304
7305 * src/print.c: Include reduce.h.
7306 Reported by Hans Aberg.
7307
7308 2001-11-14 Akim Demaille <akim@epita.fr>
7309
7310 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
7311 Revert a previous patch: these are really const.
7312 * src/conflicts.c (conflict_report): Additional useless pair of
7313 braces to pacify GCC's warnings for `if () if () {} else {}'.
7314 * src/lex.c (parse_percent_token): Replace equal_offset with
7315 arg_offset.
7316 arg is const.
7317 Be sure to strdup `arg' when used, since there is no reason for
7318 token_buffer not to change.
7319
7320 2001-11-14 Akim Demaille <akim@epita.fr>
7321
7322 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
7323 definition.
7324 * src/main.c (main): Use them.
7325 Suggested by Hans Aberg.
7326
7327 2001-11-12 Akim Demaille <akim@epita.fr>
7328
7329 * src/system.h (ngettext): Now that we use ngettext, be sure to
7330 provide a default definition when NLS are not used.
7331
7332 2001-11-12 Akim Demaille <akim@epita.fr>
7333
7334 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
7335 Use @kbd to denote user input.
7336 (Language and Grammar): ANSIfy the example.
7337 Adjust its layout for info/notinfo.
7338 (Location Tracking Calc): Output error messages to stderr.
7339 Output locations in a more GNUtically correct way.
7340 Fix a couple of Englishos.
7341 Adjust @group/@end group pairs.
7342
7343 2001-11-12 Akim Demaille <akim@epita.fr>
7344
7345 %expect was not functioning at all.
7346
7347 * src/conflicts.c (expected_conflicts): Set to -1.
7348 (conflict_report): Use ngettext.
7349 (conflicts_print): Check %expect and make its violation an error.
7350 * doc/bison.texinfo (Expect Decl): Adjust.
7351 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
7352 * tests/regression.at (%expect not enough, %expect right)
7353 (%expect too much): New.
7354
7355 2001-11-12 Akim Demaille <akim@epita.fr>
7356
7357 * tests/regression.at (Conflicts): Rename as...
7358 (Unresolved SR Conflicts): this.
7359 (Solved SR Conflicts): New.
7360
7361 2001-11-12 Akim Demaille <akim@epita.fr>
7362
7363 * src/reduce.c (print_results): Rename as...
7364 (reduce_output): This.
7365 Output to OUT, passed as argument, instead of output_obstack.
7366 (dump_grammar): Likewise.
7367 (reduce_free): New.
7368 Also free V1.
7369 (reduce_grammar): No longer call reduce_output, since...
7370 * src/print.c (print_results): do it.
7371 * src/main.c (main): Call reduce_free;
7372
7373 2001-11-12 Akim Demaille <akim@epita.fr>
7374
7375 * src/conflicts.c (print_reductions): Accept OUT as argument.
7376 Output to it, not to output_obstack.
7377 * src/print.c (print_actions): Adjust.
7378
7379 2001-11-12 Akim Demaille <akim@epita.fr>
7380
7381 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
7382 the result instead of using...
7383 (src_total, rrc_total, src_count, rrc_count): Remove.
7384 (any_conflicts): Remove.
7385 (print_conflicts): Split into...
7386 (conflicts_print, conflicts_output): New.
7387 * src/conflicts.h: Adjust.
7388 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
7389 * src/print.c (print_grammar): Issue `\n' between two rules.
7390 * tests/regression.at (Conflicts): New.
7391 Reported by Tom Lane.
7392
7393 2001-11-12 Akim Demaille <akim@epita.fr>
7394
7395 * tests/regression.at (Invalid input): Remove, duplicate with
7396 ``Invalid input: 1''.
7397
7398 2001-11-12 Akim Demaille <akim@epita.fr>
7399
7400 * tests/torture.at (AT_DATA_STACK_TORTURE)
7401 (Exploding the Stack Size with Alloca)
7402 (Exploding the Stack Size with Malloc): New.
7403
7404 2001-11-12 Akim Demaille <akim@epita.fr>
7405
7406 * src/bison.simple (YYSTACK_REALLOC): New.
7407 (yyparse) [!yyoverflow]: Use it and free the old stack.
7408 Reported by Per Allansson.
7409
7410 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
7411
7412 * src/bison.simple: Define type yystype instead of YYSTYPE, and
7413 define CPP macro, which substitute YYSTYPE by yystype.
7414 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
7415 with yyltype/YYLTYPE. This allows inclusion of the generated
7416 header within the parser if the compiler, such as GGC, accepts
7417 multiple equivalent #defines.
7418 From Akim.
7419
7420 2001-11-05 Akim Demaille <akim@epita.fr>
7421
7422 * src/reader.c (symbols_output): New, extracted from...
7423 (packsymbols): here.
7424 (reader): Adjust.
7425
7426 2001-11-05 Akim Demaille <akim@epita.fr>
7427
7428 * src/lex.c (parse_percent_token): s/quotearg/quote/.
7429
7430 2001-11-05 Akim Demaille <akim@epita.fr>
7431
7432 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
7433 pattern.
7434
7435 2001-11-05 Akim Demaille <akim@epita.fr>
7436
7437 * src/options.h (struct option_table_struct): set_flags is void*.
7438 * src/options.c (longopts): Support `--output' and `%output'.
7439 (usage): Adjust.
7440 * src/lex.h (tok_setopt): Remove, replaced with...
7441 (tok_intopt, tok_stropt): these new guys.
7442 * src/lex.c (getopt.h): Not needed.
7443 (token_buffer, unlexed_token_buffer): Not const.
7444 (percent_table): Promote `-' over `_' in directive names.
7445 Active `%name-prefix', `file-prefix', and `output'.
7446 (parse_percent_token): Accept possible arguments to directives.
7447 Promote `-' over `_' in directive names.
7448
7449 2001-11-04 Akim Demaille <akim@epita.fr>
7450
7451 * doc/bison.texinfo (Decl Summary): Split the list into
7452 `directives for grammars' and `directives for bison'.
7453 Sort'em.
7454 Add description of `%name-prefix', `file-prefix', and `output'.
7455 Promote `-' over `_' in directive names.
7456 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
7457 Simplify the description of `--name-prefix'.
7458 Promote `-' over `_' in directive names.
7459 Promote `--output' over `--output-file'.
7460 Fix the description of `--defines'.
7461 * tests/output.at: Exercise %file-prefix and %output.
7462
7463 2001-11-02 Akim Demaille <akim@epita.fr>
7464
7465 * doc/refcard.tex: Update.
7466
7467 2001-11-02 Akim Demaille <akim@epita.fr>
7468
7469 * src/symtab.h (SUNDEF): New.
7470 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
7471 stand for `uninitialized', instead of 0.
7472 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
7473 * src/lex.c (lex): Adjust.
7474
7475 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
7476 Number it 0.
7477 Let yylex return it instead of a plain 0.
7478 Reported by Dick Streefland.
7479
7480 2001-11-02 Akim Demaille <akim@epita.fr>
7481
7482 * tests/regression.at (Mixing %token styles): New test.
7483
7484 2001-11-02 Akim Demaille <akim@epita.fr>
7485
7486 * src/reader.c (parse_thong_decl): Formatting changes.
7487 (token_translations_init): New, extracted from...
7488 (packsymbols): Here.
7489 Adjust.
7490
7491 2001-11-01 Akim Demaille <akim@epita.fr>
7492
7493 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
7494 Check that `9foo.y' produces correct cpp guards.
7495 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
7496 guards.
7497 Reported by Wwp.
7498
7499 2001-11-01 Akim Demaille <akim@epita.fr>
7500
7501 * tests/regression.at (Invalid input: 2): New.
7502 * src/lex.c (unlexed_token_buffer): New.
7503 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
7504 too.
7505 Reported by Wwp.
7506
7507 2001-11-01 Akim Demaille <akim@epita.fr>
7508
7509 * tests/calc.at: Catch up with 1.30.
7510 * configure.in: Bump to 1.49a.
7511 Adjust to newer Autotest.
7512
7513 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
7514
7515 * src/conflicts.c: Move global variables rrc_total and src_total ...
7516 (print_conflicts): here.
7517 * src/output.c (output): Free global variable user_toknums.
7518 * src/lex.c (token_obstack): Become static.
7519
7520 2001-10-18 Akim Demaille <akim@epita.fr>
7521
7522 * tests/atlocal.in (GCC): Add.
7523 * tests/calc.at: s/m4_match/m4_bmatch/.
7524 s/m4_patsubst/m4_bpatsubst/.
7525 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
7526 * configure.in: AC_SUBST(GCC).
7527
7528 2001-10-14 Marc Autret <autret_m@epita.fr>
7529
7530 * src/options.c (create_long_option_table): Fix.
7531
7532 2001-10-10 Akim Demaille <akim@epita.fr>
7533
7534 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
7535
7536 2001-10-04 Akim Demaille <akim@epita.fr>
7537
7538 * src/reader.c (parse_union_decl): Push the caracters in
7539 union_obstack, not attrs_obstack.
7540
7541 2001-10-04 Akim Demaille <akim@epita.fr>
7542
7543 Merge in the branch 1.29.
7544
7545 * src/reader.c (packsymbols): Use a temporary obstack for
7546 `%%tokendef', since output_stack is already used elsewhere.
7547
7548 2001-10-02 Akim Demaille <akim@epita.fr>
7549
7550 Bump 1.29d.
7551
7552 2001-10-02 Akim Demaille <akim@epita.fr>
7553
7554 Version 1.29c.
7555
7556 2001-10-02 Akim Demaille <akim@epita.fr>
7557
7558 * tests/regression.at (Invalid CPP headers): New.
7559 From Alexander Belopolsky.
7560 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
7561
7562 2001-10-02 Akim Demaille <akim@epita.fr>
7563
7564 * tests/regression.at (Invalid input): New.
7565 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
7566 Reported by Shura.
7567
7568 2001-10-02 Akim Demaille <akim@epita.fr>
7569
7570 * tests/calc.at: Now that --debug works, the tests must be adjusted.
7571
7572 2001-10-02 Akim Demaille <akim@epita.fr>
7573
7574 * src/output.c (output_parser): Assert `skeleton'.
7575 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
7576 systems.
7577 From Shura.
7578
7579 2001-10-01 Marc Autret <autret_m@epita.fr>
7580
7581 * src/lex.h: Echo modifications.
7582 * src/lex.c (unlex): Parameter is now token_t.
7583 From Hans Aberg.
7584
7585 2001-10-01 Marc Autret <autret_m@epita.fr>
7586
7587 * src/main.c: Include lex.h.
7588 From Hans Aberg.
7589
7590 2001-09-29 Akim Demaille <akim@epita.fr>
7591
7592 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
7593
7594 2001-09-28 Akim Demaille <akim@epita.fr>
7595
7596 * tests/testsuite.at: Update to newer Autotest.
7597 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
7598
7599 2001-09-27 Akim Demaille <akim@epita.fr>
7600
7601 Position independent wrapper.
7602
7603 * tests/bison: Remove.
7604 * tests/bison.in: New.
7605 * configure.in: Adjust.
7606
7607 2001-09-27 Paul Eggert <eggert@twinsun.com>
7608
7609 Port quotearg fixes from tar 1.13.24.
7610
7611 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
7612 tm to be declared.
7613 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
7614 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
7615
7616 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
7617 * m4/mbrtowc.m4: New file.
7618 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
7619 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
7620
7621 2001-09-27 Akim Demaille <akim@epita.fr>
7622
7623 Bump to 1.29c.
7624
7625 2001-09-27 Akim Demaille <akim@epita.fr>
7626
7627 Version 1.29b.
7628
7629 2001-09-25 Akim Demaille <akim@epita.fr>
7630
7631 * src/system.h: Include `xalloc.h'.
7632 Remove it from the C files.
7633 * src/files.c (output_files): Free the obstacks.
7634 * src/lex.c (init_lex): Rename as...
7635 (lex_init): this.
7636 (lex_free): New.
7637 * src/main.c (main): Use it.
7638
7639 2001-09-24 Marc Autret <autret_m@epita.fr>
7640
7641 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
7642 to output informations in fout (FILE*).
7643 (open_graph, close_graph): Likewise.
7644 (output_graph, output_edge, output_node): Likewise.
7645 * src/vcg.h: Update function prototypes.
7646 * src/print_graph.c (print_graph): Open output graph file.
7647 (print_actions): Adjust.
7648 * src/files.h: Remove extern declaration.
7649 * src/files.c: Remove graph_obstack declaration.
7650 (open_files): Remove graph_obstack initialization.
7651 (output_files): Remove graph_obstack saving.
7652
7653 2001-09-24 Marc Autret <autret_m@epita.fr>
7654
7655 * src/files.c (compute_output_file_names): Fix.
7656
7657 2001-09-24 Marc Autret <autret_m@epita.fr>,
7658 Akim Demaille <akim@epita.fr>
7659
7660 * src/reader.c (reader): Remove call to free_symtab ().
7661 * src/main.c (main): Call it here.
7662 Include symtab.h.
7663 * src/conflicts.c (initialize_conflicts): Rename as...
7664 (solve_conflicts): this.
7665 * src/print.c (print_core, print_actions, print_state)
7666 (print_grammar): Dump to a file instead a `output_obstack'.
7667 (print_results): Dump `output_obstack', and then proceed with the
7668 FILE *.
7669 * src/files.c (compute_output_file_names, close_files): New.
7670 (output_files): Adjust.
7671 * src/main.c (main): Adjust.
7672
7673 2001-09-23 Marc Autret <autret_m@epita.fr>
7674
7675 * src/files.c (compute_header_macro): Computes header macro name
7676 from spec_defines_file when given.
7677
7678 2001-09-23 Marc Autret <autret_m@epita.fr>
7679
7680 * src/files.c (output_files): Add default extensions.
7681
7682 2001-09-22 Akim Demaille <akim@epita.fr>
7683
7684 * src/conflicts.c (finalize_conflicts): Rename as...
7685 (free_conflicts): this.
7686
7687 2001-09-22 Akim Demaille <akim@epita.fr>
7688
7689 * src/gram.c (gram_free): Rename back as...
7690 (dummy): this.
7691 (output_token_translations): Free `token_translations'.
7692 * src/symtab.c (free_symtab): Free the tag field.
7693
7694 2001-09-22 Akim Demaille <akim@epita.fr>
7695
7696 Remove `translations' as it is always set to true.
7697
7698 * src/gram.h: Adjust.
7699 * src/reader.c (packsymbols, parse_token_decl): Adjust
7700 * src/print.c (print_grammar): Adjust.
7701 * src/output.c (output_token_translations): Adjust.
7702 * src/lex.c (lex): Adjust.
7703 * src/gram.c: Be sure the set pointers to NULL.
7704 (dummy): Rename as...
7705 (gram_free): this.
7706
7707 2001-09-22 Akim Demaille <akim@epita.fr>
7708
7709 * configure.in: Invoke AM_LIB_DMALLOC.
7710 * src/system.h: Use dmalloc.
7711 * src/LR0.c: Be sure to have pointers initialized to NULL.
7712 (allocate_itemsets): Allocate kernel_items only if needed.
7713
7714 2001-09-22 Akim Demaille <akim@epita.fr>
7715
7716 * configure.in: Bump to 1.29b.
7717 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
7718 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
7719 need xmalloc.c in calc.y.
7720 From Pascal Bart.
7721
7722 2001-09-21 Akim Demaille <akim@epita.fr>
7723
7724 Version 1.29a.
7725 * Makefile.maint, config/config.guess, config/config.sub,
7726 * config/missing: Update from masters.
7727 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
7728 upon package.m4.
7729 * configure.in (ALL_LINGUAS): Add `tr'.
7730
7731 2001-09-21 Akim Demaille <akim@epita.fr>
7732
7733 * tests/Makefile.am (package.m4): Move to...
7734 ($(srcdir)/$(TESTSUITE)): here.
7735
7736 2001-09-20 Akim Demaille <akim@epita.fr>
7737
7738 * src/complain.c: No longer try to be standalone: use system.h.
7739 Don't assume __STDC__ is defined to 1. Just test if it is defined.
7740 * src/complain.h: Likewise.
7741 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
7742 Remove the unused variable `n'.
7743 From Albert Chin-A-Young.
7744
7745 2001-09-18 Marc Autret <autret_m@epita.fr>
7746
7747 * doc/bison.1: Update.
7748 * doc/bison.texinfo (Bison Options): Update --defines and --graph
7749 descriptions.
7750 (Option Cross Key): Update.
7751 Add --graph.
7752
7753 2001-09-18 Marc Autret <autret_m@epita.fr>
7754
7755 * tests/regression.at: New test (comment in %union).
7756
7757 2001-09-18 Marc Autret <autret_m@epita.fr>
7758
7759 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
7760 do that.
7761 Reported by Keith Browne.
7762
7763 2001-09-18 Marc Autret <autret_m@epita.fr>
7764
7765 * tests/output.at: Add tests for --defines and --graph.
7766
7767 2001-09-18 Marc Autret <autret_m@epita.fr>
7768
7769 * tests/output.at: Removes tests of %{header,src}_extension features.
7770
7771 2001-09-18 Akim Demaille <akim@epita.fr>
7772
7773 * tests/Makefile.am (package.m4): New.
7774 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
7775 (_AT_CHECK_CALC_ERROR): Likewise.
7776 Factor the `, ' part of verbose error messages.
7777
7778 2001-09-18 Marc Autret <autret_m@epita.fr>
7779
7780 * src/getargs.c (longopts): Declare --defines and --graph as options
7781 with optional arguments.
7782 * src/files.h: Add extern declarations.
7783 * src/files.c (spec_graph_file, spec_defines_file): New.
7784 (output_files): Update.
7785 Remove CPP-outed code.
7786
7787 2001-09-18 Marc Autret <autret_m@epita.fr>
7788
7789 Turn off %{source,header}_extension feature.
7790
7791 * src/files.c (compute_exts_from_gf): Update.
7792 (compute_exts_from_src): Update.
7793 (output_files): CPP-out useless code.
7794 * src/files.h: Remove {header,source}_extension extern declarations.
7795 * src/reader.c (parse_dquoted_param): CPP-out.
7796 (parse_header_extension_decl): Remove.
7797 (parse_source_extension_decl): Remove.
7798 (read_declarations): Remove cases tok_{hdrext,srcext}.
7799 * src/lex.c (percent_table): Remove {header,source}_extension entries.
7800 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
7801
7802 2001-09-10 Akim Demaille <akim@epita.fr>
7803
7804 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
7805 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
7806 (AT_CHECK_OUTPUT): this.
7807 Merely check ls' exit status, its output is useless.
7808
7809 2001-09-10 Akim Demaille <akim@epita.fr>
7810
7811 * tests/calc.at: Use m4_match.
7812 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
7813
7814 2001-09-10 Marc Autret <autret_m@epita.fr>,
7815 Akim Demaille <akim@epita.fr>
7816
7817 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
7818 enum color_e.
7819 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
7820 to `normal'.
7821 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
7822 * src/lex.h: Adjust prototype.
7823 (token_t): Add `tok_undef'.
7824 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
7825 (parse_percent_token): Now returns token_t.
7826 Add default statement in switch.
7827 (lex): Separate `c' as an input variable, from the token_t result
7828 part.
7829 (unlexed): Is a token_t.
7830
7831 2001-09-10 Akim Demaille <akim@epita.fr>
7832
7833 * configure.in: Bump to 1.29a.
7834
7835 2001-09-07 Akim Demaille <akim@epita.fr>
7836
7837 Version 1.29.
7838
7839 2001-08-30 Akim Demaille <akim@epita.fr>
7840
7841 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
7842 * m4/atconfig.m4: Remove.
7843 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
7844 * tests/bison: New.
7845 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
7846 m4_if, m4_patsubst, and m4_regexp.
7847 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
7848 `input' file instead of echo.
7849
7850 2001-08-29 Akim Demaille <akim@epita.fr>
7851
7852 Bump to 1.28e.
7853
7854 2001-08-29 Akim Demaille <akim@epita.fr>
7855
7856 Version 1.28d.
7857
7858 2001-08-29 Paul Eggert <eggert@twinsun.com>
7859
7860 * src/bison.simple (yyparse): Don't take the address of an
7861 item before the start of an array, as that doesn't conform to
7862 the C Standard.
7863
7864 2001-08-29 Robert Anisko <anisko_r@epita.fr>
7865
7866 * doc/bison.texinfo (Location Tracking Calc): New node.
7867
7868 2001-08-29 Paul Eggert <eggert@twinsun.com>
7869
7870 * src/output.c (output): Do not define const, as this now
7871 causes more problems than it cures.
7872
7873 2001-08-29 Akim Demaille <akim@epita.fr>
7874
7875 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
7876 the nodes.
7877 Be sure to tag the `detailmenu'.
7878
7879 2001-08-29 Akim Demaille <akim@epita.fr>
7880
7881 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
7882 download in a tmp dir.
7883
7884 2001-08-28 Marc Autret <autret_m@epita.fr>
7885
7886 * config/depcomp: New file.
7887
7888 2001-08-28 Marc Autret <autret_m@epita.fr>
7889
7890 * doc/bison.1 (mandoc): Adjust.
7891 From Juan Manuel Guerrero.
7892
7893 2001-08-28 Marc Autret <autret_m@epita.fr>
7894
7895 * src/print_graph.c (print_state): Fix.
7896
7897 2001-08-27 Marc Autret <autret_m@epita.fr>
7898
7899 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
7900 char * members.
7901 Echo modifications to the functions prototypes.
7902 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
7903
7904 2001-08-27 Marc Autret <autret_m@epita.fr>
7905
7906 * src/vcg.c: Include `xalloc.h'.
7907 (add_colorentry): New.
7908 (add_classname): New.
7909 (add_infoname): New.
7910 * src/vcg.h: Add new prototypes.
7911
7912 2001-08-27 Akim Demaille <akim@epita.fr>
7913
7914 * Makefile.maint: Sync. again with CVS Autoconf.
7915
7916 2001-08-27 Akim Demaille <akim@epita.fr>
7917
7918 * Makefile.maint: Formatting changes.
7919 (po-update, cvs-update, update): New targets.
7920 (AMTAR): Remove.
7921
7922 2001-08-27 Akim Demaille <akim@epita.fr>
7923
7924 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
7925 * Makefile.maint: Sync. with CVS Autoconf.
7926
7927 2001-08-27 Marc Autret <autret_m@epita.fr>
7928
7929 * src/vcg.h (struct infoname_s): New.
7930 (struct colorentry_s): New.
7931 (graph_s): New fields {vertical,horizontal}_order in structure.
7932 Add `infoname' field.
7933 Add `colorentry' field;
7934 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
7935 (G_HORIZONTAL_ORDER): New.
7936 (G_INFONAME): New.
7937 (G_COLORENTRY): New.
7938 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
7939 Add output of `infoname'.
7940 Add output of `colorentry'.
7941
7942 2001-08-27 Marc Autret <autret_m@epita.fr>
7943
7944 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
7945 This one shadowed a global parameter.
7946
7947 2001-08-24 Marc Autret <autret_m@epita.fr>
7948
7949 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
7950 instead of `unsigned'.
7951 (print_state): Do not call obstack_object_size () in obstack_grow ()
7952 to avoid macro variables shadowing.
7953
7954 2001-08-23 Marc Autret <autret_m@epita.fr>
7955
7956 * src/lex.c (percent_table): Typo: s/naem/name/.
7957 Add graph option.
7958 Normalize new options declarations.
7959
7960 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
7961
7962 * tests/suite.at: Exercise %header_extension and %source_extension.
7963
7964 2001-08-16 Marc Autret <autret_m@epita.fr>
7965
7966 * src/reader.c (parse_dquoted_param): New.
7967 (parse_header_extension_decl): Use it.
7968 (parse_source_extension_decl): Likewise.
7969
7970 2001-08-16 Marc Autret <autret_m@epita.fr>
7971
7972 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
7973 (get_xxxx_str): Use assert () instead of complain ().
7974 Remove return invokations in default cases.
7975 (get_decision_str): Modify default behaviour. Remove second argument.
7976 Echo modifications on calls.
7977 (output_graph): Fix.
7978
7979 2001-08-16 Marc Autret <autret_m@epita.fr>
7980
7981 * src/getargs.c (usage): Update with ``-g, --graph''.
7982
7983 2001-08-16 Marc Autret <autret_m@epita.fr>
7984
7985 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
7986 (Option Cross Key): Likewise.
7987 * doc/bison.1: Update.
7988
7989 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
7990
7991 * src/output.c (output_master_parser): Don't finish action_obstack.
7992 (output_parser): Don't care about the muscle action, here.
7993 (prepare): Copy the action_obstack in the action muscle.
7994 (output): Free action_obstack.
7995
7996 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
7997
7998 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
7999 will contain `%union' declaration.
8000 (parse_union_decl): Delete #line directive output.
8001 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
8002 informations about %union.
8003 (parse_union_decl): Copy the union_obstack in the muscle stype.
8004 * src/bison.simple: Add new #line directive.
8005 Add typdef %%stype YYSTYPE.
8006
8007 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
8008
8009 * src/bison.simple: Add new `#line' directive.
8010
8011 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
8012
8013 * src/bison.simple: New `#line' directive.
8014 * src/output.c (output_parser): Support new dynamic muscle input_line.
8015
8016 2001-09-22 Marc Autret <autret_m@epita.fr>
8017
8018 * src/output.c (output_master_parser): New.
8019 (output_parser): Be more re-entrant.
8020
8021 2001-09-21 Marc Autret <autret_m@epita.fr>
8022
8023 * src/reader.c (copy_definition, parse_union_decl): Update and use
8024 `linef' muscle.
8025 (copy_action): Likewise.
8026 Use obstack_1grow ().
8027 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
8028
8029 2001-09-21 Marc Autret <autret_m@epita.fr>
8030
8031 * src/options.c (option_table): Adjust.
8032 * src/lex.c (parse_percent_token): Fix.
8033
8034 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
8035
8036 * src/options.c (symtab.h): Include it, need by lex.h.
8037
8038 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
8039
8040 * src/lex.c (parse_percent_token): Change type of variable `tx', which
8041 is now an option_table_struct*.
8042 (option_strcmp): New function option_strcmp.
8043 (parse_percent_token): Call option_strcmp.
8044 * src/getargs.c (xalloc.h, options.h): Include it.
8045 (getargs): Call create_long_option_table.
8046 (getargs): Free longopts at the end of the function.
8047 (shortopts): Move in options.c.
8048 * src/options.c (create_long_option_table): New function. Convert
8049 information from option_table to option structure.
8050 * src/reader.c (options.h): Include it.
8051
8052 * src/Makefile.am: Adjust.
8053 * src/options.c (option_table): Create from longopts and percent_table.
8054 * src/getargs.c (longopts): Delete.
8055 * src/lex.c (struct percent_table_struct): Delete.
8056 (percent_table): Delete.
8057 (options.h): Include it.
8058 * src/options.c: Create.
8059 * src/options.h: Create.
8060 Declare enum opt_access_e.
8061 Define struct option_table_struct.
8062
8063 2001-09-20 Marc Autret <autret_m@epita.fr>
8064
8065 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
8066 sections of Bison.
8067
8068 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
8069
8070 * src/bison.simple: s/%%filename/%%skeleton.
8071 * src/muscle_tab.c (getargs.h): Include it.
8072 (muscle_init): Insert new muscle skeleton.
8073
8074 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
8075
8076 * src/output.c (output_parser): Delete unused variable actions_dumped.
8077
8078 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
8079
8080 * src/output.c (output): Delete call to reader_output_yylsp.
8081 * src/reader.c (reader): Likewise.
8082 * src/reader.h: Delete declaration of reader_output_yylsp.
8083
8084 2001-09-02 Marc Autret <autret_m@epita.fr>
8085
8086 * src/reader.c: Include muscle_tab.h.
8087 (parse_union_decl): Update.
8088 (parse_macro_decl): Rename parse_muscle_decl.
8089 Update to use renamed functions and variable.
8090 (read_declarations, copy_action, read_additionnal_code, : Updated
8091 with correct variables and functions names.
8092 (packsymbols, reader): Likewise.
8093
8094 * src/reader.h (muscle_obstack): Extern declaration update.
8095
8096 * src/output.c: Include muscle_tab.h
8097 In all functions using macro_insert, change by using muscle_insert ().
8098 (macro_obstack): Rename muscle_obstack.
8099 Echo modifications in the whole file.
8100 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
8101 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
8102 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
8103
8104 * src/muscle_tab.h: Update double inclusion macros.
8105 (macro_entry_s): Rename muscle_entry_s.
8106 Update prototypes.
8107
8108 * src/muscle_tab.c: Include muscle_tab.h.
8109 Rename macro_tabble to muscle_table.
8110 (mhash1, mhash2, mcmp): Use muscle_entry.
8111 (macro_init): Rename muscle_init. Update.
8112 (macro_insert): Rename muscle_insert. Update.
8113 (macro_find): Rename muscle_find. Update.
8114
8115 * src/main.c: Include muscle_tab.h.
8116 (main): Call muscle_init ().
8117 * src/Makefile.am (bison_SOURCES): Echo modifications.
8118
8119 2001-09-02 Marc Autret <autret_m@epita.fr>
8120
8121 Now the files macro_tab.[ch] are named muscle_tab.[ch].
8122
8123 * src/muscle_tab.c, src/muscle_tab.h: Add files.
8124
8125 2001-09-02 Marc Autret <autret_m@epita.fr>
8126
8127 * src/macrotab.c, src/macrotab.h: Remove.
8128
8129 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
8130
8131 * src/reader.c (copy_guard): Use muscle to specify the `#line'
8132 filename.
8133
8134 2001-09-01 Marc Autret <autret_m@epita.fr>
8135
8136 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
8137 to an explicit value to activate the feature. We do it here.
8138
8139 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
8140
8141 * src/output.c (prepare): Delete the `filename' muscule insertion.
8142 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
8143 (parse_union_decl): Likewise.
8144 * src/macrotab.c (macro_init): Initialize filename by infile.
8145
8146 2001-08-31 Marc Autret <autret_m@epita.fr>
8147
8148 * src/bison.simple (YYLSP_NEEDED): New definition.
8149 * src/output.c (prepare): Add macro insertion of `locations_flag'
8150
8151 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
8152
8153 * src/output.c (prepare): Delete insertion of previous muscles,
8154 and insert the `prefix' muscles.
8155 * src/macrotab.c (macro_init): Likewise.
8156 (macro_init): Initialization prefix directive by `yy'.
8157 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
8158 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
8159 yylval, yydebug, yyerror, yynerrs and yyparse.
8160 New directive `#define' to substitute yydebug, ... with option
8161 name_prefix.
8162
8163 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
8164
8165 * src/main.c (main): Standardize.
8166 * src/output.c (output_table_data, output_parser): Likewise.
8167 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
8168
8169 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
8170
8171 * src/reader.c (read_additionnal_code): Rename %%user_code to
8172 %%epilogue.
8173 * src/output.c (output): Rename %%declarations to %%prologue.
8174 * src/bison.simple: Echo modifications.
8175
8176 2001-08-31 Marc Autret <autret_m@epita.fr>
8177
8178 * src/reader.c (readgram): CleanUp.
8179 (output_token_defines): Likewise.
8180 (packsymbols): Likewise.
8181 (reader): Likewise.
8182 * src/output.c (output): CPP-out useless code.
8183
8184 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
8185
8186 * src/reader.c (reader): Delete obsolete call to function
8187 output_trailers and output_headers.
8188 * src/output.h: Remove obsolete functions prototypes of output_headers
8189 and output_trailers.
8190
8191 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
8192
8193 * src/main.c: Include macrotab.h.
8194 * src/macrotab.h (macro_entry_s): Constify fields.
8195 Adjust functions prototypes.
8196 * src/macrotab.c (macro_insert): Constify key and value.
8197 (macro_find): Constify key.
8198 (macro_insert): Include 'xalloc.h'
8199 (macro_insert): Use XMALLOC.
8200 (macro_find): Constify return value.
8201 * src/output.c (output_table_data): Rename table to table_data.
8202 (output_parser): Constify macro_key, macro_value.
8203
8204 2001-08-30 Marc Autret <autret_m@epita.fr>
8205
8206 * src/reader.c (parse_skel_decl): New.
8207 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
8208 * src/lex.h (token_t): New token `tok_skel'.
8209 * src/lex.c (percent_table): Add skeleton option entry.
8210 Standardize.
8211
8212 2001-08-29 Marc Autret <autret_m@epita.fr>
8213
8214 * src/bison.simple: Add %%user_code directive at the end.
8215 * src/reader.c (read_additionnal_code): New.
8216 (reader): Use it.
8217 * src/output.c (output_program): Remove.
8218 (output): Update.
8219
8220 2001-08-28 Marc Autret <autret_m@epita.fr>
8221
8222 * src/output.c (output_actions): Clean up.
8223 (output_gram): CPP-out useless code.
8224 * src/reader.c (reader): Clean up, CPP-out useless code.
8225
8226 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
8227
8228 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
8229 directive.
8230 * src/bison.simple: Add `%%definitions'.
8231
8232 2001-08-28 Marc Autret <autret_m@epita.fr>
8233
8234 * config/depcomp: New file.
8235
8236 2001-08-27 Paul Eggert <eggert@twinsun.com>
8237
8238 * src/bison.simple (yyparse): Don't take the address of an
8239 item before the start of an array, as that doesn't conform to
8240 the C Standard.
8241
8242 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
8243
8244 * src/output.c (output): Remove the initialization of the macro
8245 obstack. It was done too late here.
8246
8247 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
8248 completely wrong.
8249 (reader): Initialize the macro obstack here, since we need it to grow
8250 '%define' directives.
8251
8252 * src/reader.h: Declare the macro obstack as extern.
8253
8254 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
8255
8256 * src/output.c (output_parser): Fix. Store single '%' characters in
8257 the output obstack instead of throwing them away.
8258
8259 2001-08-27 Akim Demaille <akim@epita.fr>
8260
8261 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
8262
8263 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8264
8265 * lib/Makefile.am: Adjust.
8266
8267 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8268
8269 * src/bison.simple: Update and add '%%' directives.
8270
8271 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8272
8273 * src/reader.c (reader): Remove calls to 'output_headers' and
8274 'output_trailers'. Remove some C output.
8275 (readgram): Disable a piece of code that was writing a default
8276 definition for 'YYSTYPE'.
8277 (reader_output_yylsp): Remove.
8278 (packsymbols): Output token defintions to a macro.
8279 (copy_definition): Disable C output.
8280
8281 * src/reader.c (parse_macro_decl): New function used to parse macro
8282 declarations.
8283 (copy_string2): Put the body of copy_string into this new function.
8284 Add a parameter to let the caller choose whether he wants to copy the
8285 string delimiters or not.
8286 (copy_string): Be a simple call to copy_string2 with the last argument
8287 bound to true.
8288 (read_declarations): Add case for macro definition.
8289 (copy_identifier): New.
8290 (parse_macro_decl): Read macro identifiers using copy_identifier
8291 rather than lex.
8292
8293 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8294
8295 * src/output.c (prepare): Add prefixed names.
8296 (output_parser): Output semantic actions.
8297 (output_parser): Fix bug on '%%line' directives.
8298
8299 * src/output.c (output_headers): Remove. The C code printed by this
8300 function should now be in the skeletons.
8301 (output_trailers): Remove.
8302 (output): Disable call to 'reader_output_yylsp'.
8303 (output_rule_data): Do not output tables to the table obstack.
8304
8305 * src/output.c: Remove some C dedicated output.
8306 Improve the use of macro and output obstacks.
8307 (output_defines): Remove.
8308
8309 * src/output.c (output_token_translations): Associate 'translate'
8310 table with a macro. No output to the table obstack.
8311 (output_gram): Same for 'rhs' and 'prhs'.
8312 (output_stos): Same for 'stos'.
8313 (output_rule_data): Same for 'r1' and 'r2'.
8314 (token_actions): Same for 'defact'.
8315 (goto_actions): Same for 'defgoto'.
8316 (output_base): Same for 'pact' and 'pgoto'.
8317 (output_table): Same for 'table'.
8318 (output_check): Same for 'check'.
8319
8320 * src/output.c (output_table_data): New function.
8321 (output_short_table): Remove.
8322 (output_short_or_char_table): Remove.
8323
8324 * src/output.c (output_parser): Replace most of the skeleton copy code
8325 with something new. Skeletons are now processed character by character
8326 rather than line by line, and Bison looks for '%%' macros. This is the
8327 first step in making Bison's output process (a lot) more flexible.
8328 (output_parser): Use the macro table.
8329
8330 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8331
8332 * src/main.c (main): Initialize the macro table.
8333
8334 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8335
8336 * src/lex.c (percent_table): Add tok_define.
8337 * src/lex.h: Add tok_define.
8338
8339 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8340
8341 * src/macrotab.c: New file.
8342 * src/macrotab.h: New file.
8343 * src/Makefile.am: Update.
8344
8345 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
8346
8347 * lib/hash.c: New file.
8348 * lib/hash.h: New file.
8349 * lib/Makefile.am: Update.
8350
8351 2001-08-15 Akim Demaille <akim@epita.fr>
8352
8353 Version 1.28c.
8354
8355 2001-08-15 Marc Autret <autret_m@epita.fr>
8356
8357 * src/reader.c (readgram): Indent output macro YYSTYPE.
8358 (packsymbols): Likewise.
8359 (output_token_defines): Likewise.
8360 * src/files.c: Standardize.
8361 (compute_header_macro): New.
8362 (defines_obstack_save): New. Use compute_header_macro.
8363 (output_files): Update. Use defines_obstack_save.
8364
8365 2001-08-15 Akim Demaille <akim@epita.fr>
8366
8367 * doc/bison.texinfo (Table of Symbols): Document
8368 YYSTACK_USE_ALLOCA.
8369
8370 2001-08-15 Akim Demaille <akim@epita.fr>
8371
8372 * missing: Update from CVS Automake.
8373 * config/config.guess, config/config.sub, config/texinfo.tex:
8374 Update from gnu.org.
8375
8376 2001-08-15 Akim Demaille <akim@epita.fr>
8377
8378 * Makefile.maint: Sync with CVS Autoconf.
8379
8380 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
8381
8382 * doc/bison.texinfo: Include GNU Free Documentation License from
8383 `fdl.texi'.
8384 * doc/fdl.texi: Add to package.
8385
8386 2001-08-14 Marc Autret <autret_m@epita.fr>
8387
8388 Turn on %{source,header}_extension features.
8389
8390 * src/lex.c (percent_table): Un-CPP out header_extension and
8391 source_extension.
8392 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
8393 (compute_exts_from_src): Remove conditions. It restores priorities
8394 between options.
8395
8396 2001-08-14 Marc Autret <autret_m@epita.fr>
8397
8398 * src/files.c (compute_base_names): Add extensions computing when
8399 `--file-prefix' used.
8400 Standardize function calls.
8401
8402 2001-08-13 Marc Autret <autret_m@epita.fr>
8403
8404 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
8405 defining it (defined but null disables alloca).
8406
8407 2001-08-13 Marc Autret <autret_m@epita.fr>
8408
8409 * src/bison.simple (_yy_memcpy): CPP reformat.
8410
8411 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
8412
8413 * tests/atconfig.in (CPPFLAGS): Fix.
8414
8415 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
8416
8417 * doc/bison.texinfo: Include GNU General Public License from
8418 `gpl.texi'.
8419 * doc/gpl.texi: Add to package.
8420
8421 2001-08-10 Marc Autret <autret_m@epita.fr>
8422
8423 * src/print_graph.h: Fix.
8424 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
8425
8426 2001-08-10 Akim Demaille <akim@epita.fr>
8427
8428 * src/system.h: Provide default declarations for stpcpy, strndup,
8429 and strnlen.
8430
8431 2001-08-10 Robert Anisko <anisko_r@epita.fr>
8432
8433 * doc/bison.texinfo (Locations): Update @$ stuff.
8434
8435 2001-08-09 Robert Anisko <anisko_r@epita.fr>
8436
8437 * src/bison.simple (YYLLOC_DEFAULT): Update.
8438 (yyparse): Adjust.
8439
8440 2001-08-08 Marc Autret <autret_m@epita.fr>
8441
8442 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
8443 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
8444 Reported by Fabrice Bauzac.
8445
8446 2001-08-08 Marc Autret <autret_m@epita.fr>
8447
8448 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
8449 * src/vcg.c (output_node): Fix.
8450 * src/vcg.h: Cleanup.
8451 * src/print_graph.c: Add comments.
8452 (node_output_size): New global variable. Simplify the formatting of
8453 the VCG graph output.
8454 (print_actions): Unused code is now used. It notifies the final state
8455 and no action states in the VCG graph. It also give the reduce actions.
8456 The `shift and goto' edges are red and the `go to state' edges are
8457 blue.
8458 Get the current node name and node_obstack by argument.
8459 (node_obstack): New variable.
8460 (print_state): Manage node_obstack.
8461 (print_core): Use node_obstack given by argument.
8462 A node is not only computed here but in print_actions also.
8463 (print_graph): CPP out useless code instead of commenting it.
8464
8465 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
8466
8467 * tests/atconfig.in (CPPFLAGS): Fix.
8468
8469 2001-08-07 Akim Demaille <akim@epita.fr>
8470
8471 * src/print_graph.c (quote): New.
8472 (print_core): Use it.
8473
8474 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
8475
8476 * src/vcg.c (complain.h): Include it.
8477 Unepitaize `return' invocations.
8478 [NDEBUG] (main): Remove.
8479 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
8480 * src/files.c (open_files): Initialize graph_obstack.
8481 * src/print_graph.c (print_actions): CPP out useless code.
8482 (print_core): Don't output the last `\n' in labels.
8483 Use `quote'.
8484 * src/files.c (output_files): Output the VCG file.
8485 * src/main.c (main): Invoke print_graph ();
8486
8487 2001-08-06 Marc Autret <autret_m@epita.fr>
8488
8489 Automaton VCG graph output.
8490 Using option ``-g'' or long option ``--graph'', you can generate
8491 a gram_filename.vcg file containing a VCG description of the LALR (1)
8492 automaton of your grammar.
8493
8494 * src/main.c: Call to print_graph() function.
8495 * src/getargs.h: Update.
8496 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
8497 (graph_flag): New flag.
8498 (longopts): Update.
8499 (getargs): Add case `g'.
8500 * src/files.c (graph_obstack): New obstack struct.
8501 (open_files): Initialize new obstack.
8502 (output_files): Saves graph_obstack if required.
8503 * src/files.h (graph_obstack): New extern declaration.
8504 * src/Makefile.am: Add new source files.
8505
8506 2001-08-06 Marc Autret <autret_m@epita.fr>
8507
8508 * src/print_graph.c, src/print_graph.h (graph): New.
8509 * src/vcg.h: New file.
8510 * src/vcg.c: New file, VCG graph handling.
8511
8512 2001-08-06 Marc Autret <autret_m@epita.fr>
8513
8514 Add of %source_extension and %header_extension which specify
8515 the source or/and the header output file extension.
8516
8517 * src/files.c (compute_base_names): Remove initialisation of
8518 src_extension and header_extension.
8519 (compute_exts_from_gf): Update.
8520 (compute_exts_from_src): Update.
8521 (output_files): Update.
8522 * src/reader.c (parse_header_extension_decl): New.
8523 (parse_source_extension_decl): New.
8524 (read_declarations): New case statements for the new tokens.
8525 * src/lex.c (percent_table): Add entries for %source_extension
8526 and %header_extension.
8527 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
8528
8529 2001-08-06 Marc Autret <autret_m@epita.fr>
8530
8531 * configure.in: Bump to 1.28c.
8532 * doc/bison.texinfo: Texinfo thingies.
8533
8534 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
8535
8536 * tests/atconfig.in (CPPFLAGS): Add.
8537 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
8538
8539 2001-08-03 Akim Demaille <akim@epita.fr>
8540
8541 Version 1.28b.
8542
8543 2001-08-03 Akim Demaille <akim@epita.fr>
8544
8545 * tests/Makefile.am (check-local): Ship testsuite.
8546 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
8547 Include `string.h'.
8548
8549 2001-08-03 Akim Demaille <akim@epita.fr>
8550
8551 * configure.in: Try using -Wformat when compiling.
8552
8553 2001-08-03 Akim Demaille <akim@epita.fr>
8554
8555 * configure.in: Bump to 1.28b.
8556
8557 2001-08-03 Akim Demaille <akim@epita.fr>
8558
8559 * src/complain.c: Adjust strerror_r portability issues.
8560
8561 2001-08-03 Akim Demaille <akim@epita.fr>
8562
8563 Version 1.28a.
8564
8565 2001-08-03 Akim Demaille <akim@epita.fr>
8566
8567 * src/getargs.c, src/getarg.h (skeleton)): Constify.
8568 * src/lex.c (literalchar): Avoid name clashes on `buf'.
8569 * src/getargs.c: Include complain.h.
8570 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
8571 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
8572
8573 2001-08-03 Akim Demaille <akim@epita.fr>
8574
8575 * src/reader.c (readgram): Display hidden chars in error messages.
8576
8577 2001-08-03 Akim Demaille <akim@epita.fr>
8578
8579 Update to gettext 0.10.39.
8580
8581 2001-08-03 Akim Demaille <akim@epita.fr>
8582
8583 * lib/strspn.c: New.
8584
8585 2001-08-01 Marc Autret <autret_m@epita.fr>
8586
8587 * doc/bison.texinfo: Update.
8588 * doc/bison.1 (mandoc): Update.
8589 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
8590 * src/files.c: Support output files extensions computing.
8591 (src_extension): New static variable.
8592 (header_extension): New static variable.
8593 (tr): New function.
8594 (get_extension_index): New function, gets the index of an extension
8595 filename in a string.
8596 (compute_exts_from_gf): New function, computes extensions from the
8597 grammar file extension.
8598 (compute_exts_from_src): New functions, computes extensions from the
8599 C source file extension, file given by ``-o'' option.
8600 (compute_base_names): Update.
8601 (output_files): Update.
8602
8603 2001-08-01 Robert Anisko <anisko_r@epita.fr>
8604
8605 * doc/bison.texi: Document @$.
8606 (Locations): New section.
8607
8608 2001-07-18 Akim Demaille <akim@epita.fr>
8609
8610 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
8611 * config/prev-version.txt, config/move-if-change: New.
8612 * Makefile.am: Adjust.
8613
8614 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
8615
8616 * src/bison.simple (yyparse): Suppress warning `comparaison
8617 between signed and unsigned'.
8618
8619 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
8620
8621 * src/getargs.h (raw_flag): Remove.
8622 * src/getargs.c: Die on `-r'/`--raw'.
8623 * src/lex.c (parse_percent_token): Die on `%raw'.
8624 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
8625 * tests/calc.at: Suppress test with option `--raw'.
8626
8627 2001-07-14 Akim Demaille <akim@epita.fr>
8628
8629 * config/: New.
8630 * configure.in: Require Autoconf 2.50.
8631 Update to gettext 0.10.38.
8632
8633 2001-03-16 Akim Demaille <akim@epita.fr>
8634
8635 * doc/bison.texinfo: ANSIfy the examples.
8636
8637 2001-03-16 Akim Demaille <akim@epita.fr>
8638
8639 * getargs.c (skeleton): New variable.
8640 (longopts): --skeleton is a new option.
8641 (shortopts, getargs): -S is a new option.
8642 * getargs.h: Declare skeleton.
8643 * output.c (output_parser): Use it.
8644
8645 2001-03-16 Akim Demaille <akim@epita.fr>
8646
8647 * m4/strerror_r.m4: New.
8648 * m4/error.m4: Run AC_FUNC_STRERROR_R.
8649 * lib/error.h, lib/error.c: Update.
8650
8651 2001-03-16 Akim Demaille <akim@epita.fr>
8652
8653 * src/getargs.c (longopts): Clean up.
8654
8655 2001-02-21 Akim Demaille <akim@epita.fr>
8656
8657 * src/reader.c (gensym): `gensym_count' is your own.
8658 Use a static buf to create the symbol name, as token_buffer is no
8659 longer a buffer.
8660
8661 2001-02-08 Akim Demaille <akim@epita.fr>
8662
8663 * src/conflicts.c (conflict_report): Be sure not to append to res
8664 between two calls, which could happen if both first sprintf were
8665 skipped, but not the first cp += strlen.
8666
8667 2001-02-08 Akim Demaille <akim@epita.fr>
8668
8669 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
8670 New, from fileutils 4.0.37.
8671 * configure.in: Require Autoconf 2.49c. I took some time before
8672 making this decision. This is the only way out for portability
8673 issues in Bison, it would mean way too much duplicate effort to
8674 import in Bison features implemented in 2.49c since 2.13.
8675 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
8676
8677 2001-02-02 Akim Demaille <akim@epita.fr>
8678
8679 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
8680 * lib/xalloc.h, lib/xmalloc.c: Update.
8681
8682 2001-01-19 Akim Demaille <akim@epita.fr>
8683
8684 Get rid of the ad hoc handling of token_buffer in the scanner: use
8685 the obstacks.
8686
8687 * src/lex.c (token_obstack): New.
8688 (init_lex): Initialize it. No longer call...
8689 (grow_token_buffer): this. Remove it.
8690 Adjust all the places which used it to use the obstack.
8691
8692 2001-01-19 Akim Demaille <akim@epita.fr>
8693
8694 * src/lex.h: Rename all the tokens:
8695 s/\bENDFILE\b/tok_eof/g;
8696 s/\bIDENTIFIER\b/tok_identifier/g;
8697 etc.
8698 Let them be enums, not #define, to ease debugging.
8699 Adjust all the code.
8700
8701 2001-01-18 Akim Demaille <akim@epita.fr>
8702
8703 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
8704 * src/lex.c (maxtoken, grow_token_buffer): Static.
8705
8706 2001-01-18 Akim Demaille <akim@epita.fr>
8707
8708 Since we now use obstacks, more % directives can be enabled.
8709
8710 * src/lex.c (percent_table): Also accept `%yacc',
8711 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
8712 `%debug'.
8713 Handle the actions for `%semantic_parser' and `%pure_parser' here,
8714 instead of returning a token.
8715 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
8716 * src/reader.c (read_declarations): Adjust.
8717 * src/files.c (open_files): Don't call `compute_base_names', don't
8718 compute `attrsfile' since they depend upon data which might be
8719 *in* the input file now.
8720 (output_files): Do it here.
8721 * src/output.c (output_headers): Document the fact that this patch
8722 introduces a guaranteed SEGV for semantic parsers.
8723 * doc/bison.texinfo: Document them.
8724 * tests/suite.at: Exercise these %options.
8725
8726 2000-12-20 Akim Demaille <akim@epita.fr>
8727
8728 Also handle the output file (--verbose) with obstacks.
8729
8730 * files.c (foutput): Remove.
8731 (output_obstack): New.
8732 Adjust all dependencies.
8733 * src/conflicts.c: Return a string.
8734 * src/system.h (obstack_grow_string): Rename as...
8735 (obstack_sgrow): this. Be ready to work with non literals.
8736 (obstack_fgrow4): New.
8737
8738 2000-12-20 Akim Demaille <akim@epita.fr>
8739
8740 * src/files.c (open_files): Fix the computation of short_base_name
8741 in the case of `-o foo.tab.c'.
8742
8743 2000-12-20 Akim Demaille <akim@epita.fr>
8744
8745 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
8746 (copy_dollar): Now that everything uses obstacks, get rid of the
8747 FILE * parameters.
8748
8749 2000-12-20 Akim Demaille <akim@epita.fr>
8750
8751 * src/files.c (open_files): Actually the `.output' file is based
8752 on the short_base_name, not base_name.
8753 * tests/suite.at (Checking output file names): Adjust.
8754
8755 2000-12-20 Akim Demaille <akim@epita.fr>
8756
8757 * src/bison.s1: Remove, we now use directly...
8758 * src/bison.simple: this.
8759 * src/Makefile.am: Use pkgdata instead of data.
8760
8761 2000-12-20 Akim Demaille <akim@epita.fr>
8762
8763 * src/files.c (guard_obstack): New.
8764 (open_files): Initialize it.
8765 (output_files): Dump it...
8766 * src/files.h: Export it.
8767 * src/reader.c (copy_guard): Use it.
8768
8769 2000-12-19 Akim Demaille <akim@epita.fr>
8770
8771 * src/files.c (outfile, defsfile, actfile): Removed as global
8772 vars.
8773 (open_files): Don't compute them.
8774 (output_files): Adjust.
8775 (base_name, short_base_name): Be global.
8776 Adjust dependencies.
8777
8778 2000-12-19 Akim Demaille <akim@epita.fr>
8779
8780 * src/files.c (strsuffix): New.
8781 (stringappend): Be just like strcat but allocate.
8782 (base_names): Eve out from open_files.
8783 Try to simplify the rather hairy computation of base_name and
8784 short_base_name.
8785 (open_files): Use it.
8786 * tests/suite.at (Checking output file names): New test.
8787
8788 2000-12-19 Akim Demaille <akim@epita.fr>
8789
8790 * src/system.h (obstack_grow_literal_string): Rename as...
8791 (obstack_grow_string): this.
8792 * src/output.c (output_parser): Recognize `%% actions' instead of
8793 `$'.
8794 * src/bison.s1: s/$/%% actions/.
8795 * src/bison.hairy: Likewise.
8796
8797 2000-12-19 Akim Demaille <akim@epita.fr>
8798
8799 * src/output.c (output_parser): Compute the `#line' lines when
8800 there are.
8801 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
8802 Suggested by Hans Aberg.
8803
8804 2000-12-19 Akim Demaille <akim@epita.fr>
8805
8806 Let the handling of the skeleton files be local to the procedures
8807 that use it.
8808
8809 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
8810 longer static.
8811 (fparser, open_extra_files): Remove.
8812 (open_files, output_files): Don't take care of fparser.
8813 * src/files.h: Adjust.
8814 * src/output.c (output_parser): Open and close the file to the
8815 skeleton.
8816 * src/reader.c (read_declarations): When %semantic_parser, open
8817 fguard.
8818
8819 2000-12-19 Akim Demaille <akim@epita.fr>
8820
8821 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
8822 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
8823
8824 2000-12-19 Akim Demaille <akim@epita.fr>
8825
8826 * src/files.c (open_files): Yipee! We no longer need all the code
8827 looking for `/tmp' since we have no tmp file.
8828
8829 2000-12-19 Akim Demaille <akim@epita.fr>
8830
8831 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
8832 New macros.
8833 * src/files.c (open_files): Less dependency on MSDOS etc.
8834
8835 2000-12-14 Akim Demaille <akim@epita.fr>
8836
8837 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
8838 Provide a default definition.
8839 Use it when executing the default @ action.
8840 * src/reader.c (reader_output_yylsp): No longer include
8841 `timestamp' and `text' in the default YYLTYPE.
8842
8843 2000-12-12 Akim Demaille <akim@epita.fr>
8844
8845 * src/reader.c (copy_definition, parse_union_decl, copy_action)
8846 (copy_guard): Quote the file names.
8847 Reported by Laurent Mascherpa.
8848
8849 2000-12-12 Akim Demaille <akim@epita.fr>
8850
8851 * src/output.c (output_headers, output_program, output): Be sure
8852 to escape special characters when outputting filenames.
8853 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
8854 (output_headers): Don't depend on them, Use ACTSTR.
8855
8856 2000-11-17 Akim Demaille <akim@epita.fr>
8857
8858 * lib/obstack.h: Formatting changes.
8859 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
8860 prevents type checking.
8861 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
8862 cast the value to (void *): assigning a `foo *' to a `void *'
8863 variable is valid.
8864 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
8865 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
8866 append characters.
8867
8868 2000-11-17 Akim Demaille <akim@epita.fr>
8869
8870 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
8871 as...
8872 (suite.m4, regression.m4, calc.m4): these.
8873 * tests/atgeneral.m4: Update from CVS Autoconf.
8874
8875 2000-11-17 Akim Demaille <akim@epita.fr>
8876
8877 * tests/regression.m4 (%union and --defines): New test,
8878 demonstrating a current bug in the obstack implementation.
8879
8880 2000-11-17 Akim Demaille <akim@epita.fr>
8881
8882 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
8883 macros.
8884 Use them to declare the variables which are global or local to
8885 `yyparse'.
8886
8887 2000-11-17 Akim Demaille <akim@epita.fr>
8888
8889 * acconfig.h: Remove, no longer used.
8890
8891 2000-11-07 Akim Demaille <akim@epita.fr>
8892
8893 * src: s/Copyright (C)/Copyright/g.
8894
8895 2000-11-07 Akim Demaille <akim@epita.fr>
8896
8897 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
8898 defining.
8899 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
8900
8901 2000-11-07 Akim Demaille <akim@epita.fr>
8902
8903 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
8904 Merge in a single CPP if/else.
8905
8906 2000-11-07 Akim Demaille <akim@epita.fr>
8907
8908 * src/output.c (output): Remove useless variables.
8909 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
8910 argument `data' for consistency with the prototypes.
8911 Qualify it `const'.
8912 (obstack_copy, obstack_copy0): Rename the second argument as
8913 `address' for consistency. Qualify it `const'.
8914 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
8915 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
8916 `const' their input argument (`data' or `address').
8917 Adjust the corresponding macros to include `const' in casts.
8918
8919 2000-11-03 Akim Demaille <akim@epita.fr>
8920
8921 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
8922 s/PFILE1/BISON_HAIRY/.
8923 Adjust dependencies.
8924
8925 2000-11-03 Akim Demaille <akim@epita.fr>
8926
8927 For some reason, this was not applied.
8928
8929 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
8930 `unlink': it's no longer used.
8931
8932 2000-11-03 Akim Demaille <akim@epita.fr>
8933
8934 * src/files.c (skeleton_find): New function, eved out of...
8935 (open_files, open_extra_files): here.
8936
8937 2000-11-03 Akim Demaille <akim@epita.fr>
8938
8939 Don't use `atexit'.
8940
8941 * src/files.c (obstack_save): New function.
8942 (done): Rename as...
8943 (output_files): this.
8944 Use `obstack_save'.
8945 * src/main.c (main): Don't use `atexit' to register `done', since
8946 it no longer has to remove tmp files, just call `output_files'
8947 when there are no errors.
8948
8949 2000-11-02 Akim Demaille <akim@epita.fr>
8950
8951 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
8952 `unlink': it's no longer used.
8953 * src/files.h: Formatting changes.
8954
8955 2000-11-02 Akim Demaille <akim@epita.fr>
8956
8957 Remove the last uses of mktemp and unlink/delete.
8958
8959 * src/files.c (fdefines, ftable): Removed.
8960 (defines_ostack, table_obstack): New.
8961 Adjust dependencies of the former into uses of the latter.
8962 * src/output.c (output_short_or_char_table, output_short_table):
8963 Convert to using obstacks.
8964 * src/reader.c (copy_comment2): Accept one FILE * and two
8965 obstacks.
8966 (output_token_defines, reader_output_yylsp): Use obstacks.
8967 * src/system.h (obstack_fgrow3): New.
8968
8969 2000-11-01 Akim Demaille <akim@epita.fr>
8970
8971 Change each use of `fattrs' into a use of `attrs_obstack'.
8972
8973 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
8974 * src/files.c (fattrs): Remove.
8975 (attrs_obstack): New.
8976 Adjust all dependencies.
8977 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
8978
8979 2000-11-01 Akim Demaille <akim@epita.fr>
8980
8981 Introduce obstacks.
8982 Change each use of `faction' into a use of `action_obstack'.
8983
8984 * lib/obstack.h, lib/obstack.c: New files.
8985 * src/files.c (faction): Remove.
8986 (action_obstack): New.
8987 Adjust all dependencies.
8988
8989 2000-10-20 Akim Demaille <akim@epita.fr>
8990
8991 * lib/quote.h (PARAMS): New macro. Use it.
8992
8993 2000-10-16 Akim Demaille <akim@epita.fr>
8994
8995 * src/output.c (output_short_or_char_table): New function.
8996 (output_short_table, output_token_translations): Use it.
8997 (goto_actions): Use output_short_table.
8998
8999 2000-10-16 Akim Demaille <akim@epita.fr>
9000
9001 * src/symtab.c (bucket_new): New function.
9002 (getsym): Use it.
9003
9004 * src/output.c (output_short_table): New argument to display the
9005 comment associated with the table.
9006 Adjust dependencies.
9007 (output_gram): Use it.
9008 (output_rule_data): Nicer output layout for YYTNAME.
9009
9010 2000-10-16 Akim Demaille <akim@epita.fr>
9011
9012 * src/lex.c (read_typename): New function.
9013 (lex): Use it.
9014 * src/reader.c (copy_dollar): Likewise.
9015
9016 2000-10-16 Akim Demaille <akim@epita.fr>
9017
9018 * src/reader.c (copy_comment2): Expect the input stream to be on
9019 the `/' which is suspected to open a comment, instead of being
9020 called after `//' or `/*' was read.
9021 (copy_comment, copy_definition, parse_union_decl, copy_action)
9022 (copy_guard): Adjust.
9023
9024 2000-10-16 Akim Demaille <akim@epita.fr>
9025
9026 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
9027 `read_signed_integer'.
9028
9029 2000-10-16 Akim Demaille <akim@epita.fr>
9030
9031 * src/reader.c (copy_dollar): New function.
9032 (copy_guard, copy_action): Use it.
9033
9034 2000-10-16 Akim Demaille <akim@epita.fr>
9035
9036 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
9037 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
9038 New files, from Fileutils 4.0.27.
9039 * src/main.c (printable_version): Remove.
9040 * src/lex.c, src/reader.c: Use `quote'.
9041
9042 2000-10-04 Akim Demaille <akim@epita.fr>
9043
9044 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
9045
9046 2000-10-04 Akim Demaille <akim@epita.fr>
9047
9048 * doc/bison.texinfo: Various typos spotted by Neil Booth.
9049
9050 2000-10-04 Akim Demaille <akim@epita.fr>
9051
9052 When a literal string is used to define two different tokens,
9053 `bison -v' segfaults.
9054 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
9055
9056 * tests/regression.m4: New file.
9057 Include the core of the sample provided by Piotr Gackiewicz.
9058 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
9059 properly.
9060
9061 2000-10-04 Akim Demaille <akim@epita.fr>
9062
9063 * src/reader.c (parse_expect_decl): Keep `count' within the size
9064 of `buffer'.
9065 From Neil Booth.
9066
9067 2000-10-02 Paul Eggert <eggert@twinsun.com>
9068
9069 * bison.s1 (yyparse): Assign the default value
9070 unconditionally, to avoid a GCC warning and make the parser a
9071 tad smaller.
9072
9073 2000-10-02 Akim Demaille <akim@epita.fr>
9074
9075 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
9076 options.
9077
9078 2000-10-02 Akim Demaille <akim@epita.fr>
9079
9080 * src/derives.c, src/print.c, src/reduce.c: To ease the
9081 translation, move some `\n' out of the translated strings.
9082
9083 2000-10-02 Akim Demaille <akim@epita.fr>
9084
9085 The location tracking mechanism is precious for parse error
9086 messages. Nevertheless, it is enabled only when `@n' is used in
9087 the grammar, which is a different issue (you can use it in error
9088 message, but not in the grammar per se). Therefore, there should
9089 be another means to enable it.
9090
9091 * src/getargs.c (getargs): Support `--locations'.
9092 (usage): Report it.
9093 * src/getargs.h (locationsflag): Export it.
9094 * src/lex.c (percent_table): Support `%locations'.
9095 * src/reader.c (yylsp_needed): Remove this variable, now replaced
9096 with `locationsflag'.
9097 * doc/bison.texinfo: Document `--locations' and `%locations'.
9098 Sort the options.
9099 * tests/calc.m4: Test it.
9100
9101 For regularity of the names, replace each
9102 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
9103 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
9104 In addition replace each `flag' with `_flag'.
9105
9106 2000-10-02 Akim Demaille <akim@epita.fr>
9107
9108 Also test parse error messages, including with YYERROR_VERBOSE.
9109
9110 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
9111 associative).
9112 Use it to check the computations.
9113 Use it to check `nonassoc' is honored.
9114 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
9115 `--yyerror-verbose'.
9116 (_AT_CHECK_CALC): Adjust to this option.
9117 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
9118
9119 2000-10-02 Akim Demaille <akim@epita.fr>
9120
9121 Test also `--verbose', `--defines' and `--name-prefix'. Testing
9122 the latter demonstrates a flaw in the handling of non debugging
9123 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
9124 was used in order to simplify:
9125
9126 #if YYDEBUG
9127 if (yydebug)
9128 {
9129 ...
9130 }
9131 #endif
9132
9133 into
9134
9135 if (yydebug)
9136 {
9137 ...
9138 }
9139
9140 unfortunately this leads to a CPP conflict when
9141 `--name-prefix=foo' is used since it produces `#define yydebug
9142 foodebug'.
9143
9144 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
9145 (YYDPRINTF): New macro.
9146 Spread its use.
9147 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
9148 the bison options.
9149 Also test `--verbose', `--defines' and `--name-prefix'.
9150
9151 2000-10-02 Akim Demaille <akim@epita.fr>
9152
9153 Improve the readability of the produced parsers.
9154
9155 * src/bison.s1: Formatting changes.
9156 Improve the comment related to the `$' mark.
9157 (yydefault): Don't fall through to `yyresume': `goto' there.
9158 * src/output.c (output_parser): When the `$' is met, skip the end
9159 of its line.
9160 New variable, `number_of_dollar_signs', to check there's exactly
9161 one `$' in the parser skeleton.
9162
9163 2000-10-02 Akim Demaille <akim@epita.fr>
9164
9165 * lib/xstrdup.c: New file, from the fileutils.
9166 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
9167 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
9168 instead of strlen + xmalloc + strcpy.
9169 * src/symtab.c (copys): Remove, use xstrdup instead.
9170
9171 2000-10-02 Akim Demaille <akim@epita.fr>
9172
9173 * src/gram.h (associativity): New enum type which replaces the
9174 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
9175 `right_assoc', `left_assoc' and `non_assoc'.
9176 Adjust all dependencies.
9177 * src/reader.c: Formatting changes.
9178 (LTYPESTR): Don't define it, use it as a literal in
9179 `reader_output_yylsp'.
9180 * src/symtab.h (symbol_class): New enum type which replaces the
9181 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
9182 `sunknown', `stoken and `snterm'.
9183
9184 2000-10-02 Akim Demaille <akim@epita.fr>
9185
9186 * src/getargs.c (fixed_outfiles): Rename as...
9187 (yaccflag): for consistency and accuracy.
9188 Adjust dependencies.
9189
9190 2000-10-02 Akim Demaille <akim@epita.fr>
9191
9192 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
9193 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
9194 difficult and introduced a lot of core dump. It turns out that
9195 Bison used an implementation of `xmalloc' based on `calloc', and
9196 at various places it does depend upon the initialization to 0. I
9197 have not tried to isolate the pertinent places, and all the former
9198 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
9199 someone should address this issue.
9200
9201 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
9202 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
9203 files.
9204 Adjust dependencies.
9205 * src/warshall.h: New file.
9206 Propagate.
9207
9208 2000-10-02 Akim Demaille <akim@epita.fr>
9209
9210 Various anti-`extern in *.c' changes.
9211
9212 * src/system.h: Include `assert.h'.
9213
9214 2000-10-02 Akim Demaille <akim@epita.fr>
9215
9216 * src/state.h (nstates, final_state, first_state, first_shift)
9217 (first_reduction): Move their exportation from here...
9218 * src/LR0.h: to here.
9219 Adjust dependencies.
9220 * src/getargs.c (statisticsflag): New variable.
9221 Add support for `--statistics'.
9222 Adjust dependencies.
9223
9224 Remove a lot of now useless `extern' statements in most files.
9225
9226 2000-10-02 Akim Demaille <akim@epita.fr>
9227
9228 * src/LR0.h: New file.
9229 Propagate its use.
9230
9231 2000-10-02 Akim Demaille <akim@epita.fr>
9232
9233 * src/print.h: New file.
9234 Propagate its use.
9235 * src/print.c: Formatting and ordering changes.
9236 (verbose, terse): Replace with...
9237 (print_results): this new function.
9238 Adjust dependencies.
9239
9240 2000-10-02 Akim Demaille <akim@epita.fr>
9241
9242 * src/conflicts.c (conflict_report): New function.
9243 (conflict_log, verbose_conflict_log): Replace with...
9244 (print_conflicts): this function.
9245 Adjust dependencies.
9246 * src/conflicts.h: New file.
9247 Propagate its inclusion.
9248
9249 2000-10-02 Akim Demaille <akim@epita.fr>
9250
9251 * src/nullable.h: New file.
9252 Propagate its inclusion.
9253 * src/nullable.c: Formatting changes.
9254
9255 2000-10-02 Akim Demaille <akim@epita.fr>
9256
9257 * src/reduce.h: New file.
9258 Propagate its inclusion.
9259 * src/reduce.c: Topological sort and other formatting changes.
9260 (bool, TRUE, FALSE): Move their definition to...
9261 * src/system.h: here.
9262
9263 2000-10-02 Akim Demaille <akim@epita.fr>
9264
9265 * src/files.c: Formatting changes.
9266 (tryopen, tryclose, openfiles): Rename as...
9267 (xfopen, xfclose, open_files): this.
9268 (stringappend): static.
9269 * src/files.h: Complete the list of exported symbols.
9270 Propagate its use.
9271
9272 2000-10-02 Akim Demaille <akim@epita.fr>
9273
9274 * src/reader.h: New file.
9275 Propagate its use instead of tedious list of `extern' and
9276 prototypes.
9277 * src/reader.c: Formatting changes, topological sort,
9278 s/register//.
9279
9280 2000-10-02 Akim Demaille <akim@epita.fr>
9281
9282 * src/lex.h: Prototype `lex.c' exported functions.
9283 * src/reader.c: Adjust.
9284 * src/lex.c: Formatting changes.
9285 (safegetc): Rename as...
9286 (xgetc): this.
9287
9288 2000-10-02 Akim Demaille <akim@epita.fr>
9289
9290 * src/lalr.h: New file.
9291 Propagate its inclusion instead of prototypes and `extern'.
9292 * src/lalr.c: Formatting changes, topological sorting etc.
9293
9294 2000-10-02 Akim Demaille <akim@epita.fr>
9295
9296 * src/output.c (token_actions): Introduce a temporary array,
9297 YYDEFACT, that makes it possible for this function to use
9298 output_short_table.
9299
9300 2000-10-02 Akim Demaille <akim@epita.fr>
9301
9302 `user_toknums' is output as a `short[]' in `output.c', while it is
9303 defined as a `int[]' in `reader.c'. For consistency with the
9304 other output tables, `user_toknums' is now defined as a table of
9305 shorts.
9306
9307 * src/reader.c (user_toknums): Be a short table instead of an int
9308 table.
9309 Adjust dependencies.
9310
9311 Factor the short table outputs.
9312
9313 * src/output.c (output_short_table): New function.
9314 * src/output.c (output_gram, output_stos, output_rule_data)
9315 (output_base, output_table, output_check): Use it.
9316
9317 2000-10-02 Akim Demaille <akim@epita.fr>
9318
9319 * src/output.c (output): Topological sort of the functions, in
9320 order to get rid of the `static' prototypes.
9321 No longer use `register'.
9322 * src/output.h: New file.
9323 Propagate its inclusion in files explicitly prototyping functions
9324 from output.c.
9325
9326 2000-09-21 Akim Demaille <akim@epita.fr>
9327
9328 * src/atgeneral.m4: Update from Autoconf.
9329
9330 2000-09-21 Akim Demaille <akim@epita.fr>
9331
9332 * src/closure.h: New file.
9333 * src/closure.c: Formatting changes, topological sort over the
9334 functions, use of closure.h.
9335 (initialize_closure, finalize_closure): Rename as...
9336 (new_closure, free_closure): these. Adjust dependencies.
9337 * src/LR0.c: Formatting changes, topological sort, use of
9338 cloture.h.
9339 (initialize_states): Rename as...
9340 (new_states): this.
9341 * src/Makefile.am (noinst_HEADERS): Adjust.
9342
9343 2000-09-20 Akim Demaille <akim@epita.fr>
9344
9345 * src/acconfig.h: Don't protect config.h against multiple
9346 inclusion.
9347 Don't define PARAMS.
9348 * src/system.h: Define PARAMS.
9349 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
9350 purpose of config.h. system.h must not try to fix wrong
9351 definitions in config.h.
9352
9353 2000-09-20 Akim Demaille <akim@epita.fr>
9354
9355 * src/derives.h: New file.
9356 * src/main.c, src/derives.h: Use it.
9357 Formatting changes.
9358 * src/Makefile.am (noinst_HEADERS): Adjust.
9359
9360 2000-09-20 Akim Demaille <akim@epita.fr>
9361
9362 * tests/atgeneral.m4: Update from Autoconf.
9363 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
9364 (AT_CHECK_CALC): New macros.
9365 Use these macros to test bison with options `', `--raw',
9366 `--debug', `--yacc', `--yacc --debug'.
9367
9368 2000-09-19 Akim Demaille <akim@epita.fr>
9369
9370 * src/output.c: Formatting changes.
9371 * src/machine.h: Remove, leaving its contents in...
9372 * src/system.h: here.
9373 Include stdio.h.
9374 Adjust all dependencies on stdio.h and machine.h.
9375 * src/getargs.h: New file.
9376 Let all `extern' declarations about getargs.c be replaced with
9377 inclusion of `getargs.h'.
9378 * src/Makefile.am (noinst_HEADERS): Adjust.
9379
9380 * tests/calc.m4 (yyin): Be initialized in main, not on the global
9381 scope.
9382 (yyerror): Returns void, not int.
9383 * doc/bison.texinfo: Formatting changes.
9384
9385 2000-09-19 Akim Demaille <akim@epita.fr>
9386
9387 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
9388 portable.
9389
9390 2000-09-18 Akim Demaille <akim@epita.fr>
9391
9392 * configure.in: Append WARNING_CFLAGS to CFLAGS.
9393 * src/Makefile.am (INCLUDES): Don't.
9394 Be ready to fetch headers in lib/.
9395
9396 2000-09-18 Akim Demaille <akim@epita.fr>
9397
9398 * doc/bison.texinfo: Update the copyright.
9399 ANSIfy and GNUify the examples.
9400 Remove the old menu.
9401
9402 2000-09-18 Akim Demaille <akim@epita.fr>
9403
9404 First set of tests: use the `calc' example from the documentation.
9405
9406 * src/bison.s1 (yyparse): Condition the code using `yytname' which
9407 is defined only when YYDEBUG is.
9408 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
9409 * src/files.c (tryopen, tryclose): Formatting changes.
9410 Move to the top and be static.
9411 * src/reader.c (read_signed_integer): Likewise.
9412 * tests/calc.m4: New file.
9413 * Makefile.am, suite.m4: Adjust.
9414 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
9415
9416 2000-09-18 Akim Demaille <akim@epita.fr>
9417
9418 Add support for an Autotest test suite for Bison.
9419
9420 * m4/m4.m4, m4/atconfig.m4: New files.
9421 * m4/Makefile.am (EXTRA_DIST): Adjust.
9422 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
9423 files.
9424 * src/getargs.c: Display a more standard --version message.
9425 * src/reader.c (reader): Formatting changes.
9426 No longer depend upon VERSION_STRING.
9427 * configure.in: No longer use `dnl'.
9428 Set up the test suite and the new directory `tests/.
9429 (VERSION_STRING): Remove.
9430
9431 2000-04-14 Akim Demaille <akim@epita.fr>
9432
9433 * src/reader.c (copy_comment2): New function, same as former
9434 `copy_comment', but outputs into two FILE *.
9435 (copy_comment): Use it.
9436 (parse_union_decl): Use it.
9437 (get_type, parse_start_decl): Use the same `invalid' message.
9438 (parse_start_decl, parse_union_decl): Use the same `multiple'
9439 message.
9440 (parse_union_decl, copy_guard, copy_action): Use the same
9441 `unmatched' message.
9442 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
9443
9444 2000-03-31 Akim Demaille <akim@epita.fr>
9445
9446 * src/files.c (tryopen, tryclose): Move to the top.
9447 Be static.
9448
9449 2000-03-31 Akim Demaille <akim@epita.fr>
9450
9451 * src/main.c (main): Don't call `done', exit does it.
9452
9453 2000-03-31 Akim Demaille <akim@epita.fr>
9454
9455 * allocate.c: s/return (foo)/return foo/.
9456 * lalr.c: Likewise.
9457 * LR0.c: Likewise.
9458 * output.c: Likewise.
9459 * reader.c: Likewise.
9460 * symtab.c: Likewise.
9461 * vmsgetargs.c: Likewise.
9462
9463 2000-03-31 Akim Demaille <akim@epita.fr>
9464
9465 Clean up the error reporting functions.
9466
9467 * src/report.c: New file.
9468 * src/report.h: Likewise.
9469 * src/Makefile.am: Adjust.
9470 * m4/error.m4: New file.
9471 * m4/Makefile.am: Adjust.
9472 * configure.in (jm_PREREQ_ERROR): Call it.
9473 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
9474 Remove.
9475 (fatal, fatals): Remove. All callers use complain.c::fatal.
9476 (warn, warni, warns, warnss, warnss): Remove. All callers use
9477 complain.c::complain.
9478 (toomany): Remove, use fatal instead.
9479 * src/files.c (done): No argument, use complain_message_count.
9480 * src/main.c (main): Register `done' to `atexit'.
9481
9482 * src/getargs.c (usage): More `fputs', less `fprintf'.
9483
9484 2000-03-28 Akim Demaille <akim@epita.fr>
9485
9486 * lib/: New directory.
9487 * Makefile.am (SUBDIRS): Adjust.
9488 * configure.in: Adjust.
9489 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
9490 useless.
9491 * src/alloca.c: Moved to lib/.
9492 * src/getopt.c: Likewise.
9493 * src/getopt1.c: Likewise.
9494 * src/getopt.h: Likewise.
9495 * src/ansi2knr.c: Likewise.
9496 * src/ansi2knr.1: Likewise.
9497 * src/Makefile.am: Adjust.
9498 * lib/Makefile.am: New file.
9499
9500 2000-03-28 Akim Demaille <akim@epita.fr>
9501
9502 * src/getargs.c (usage): Refresh the help message.
9503
9504 2000-03-17 Akim Demaille <akim@epita.fr>
9505
9506 * src/getopt1.c: Updated from textutils 2.0e
9507 * src/getopt.c: Likewise.
9508 * src/getopt.h: Likewise.
9509
9510 2000-03-17 Akim Demaille <akim@epita.fr>
9511
9512 * src/Makefile.am (bison.simple): Fix the awk program: quote only
9513 the file name, not the whole `#line LINE FILE'.
9514
9515 2000-03-17 Akim Demaille <akim@epita.fr>
9516
9517 On syntax errors, report the token on which we choked.
9518
9519 * src/bison.s1 (yyparse): In the label yyerrlab, when
9520 YYERROR_VERBOSE, add yychar in msg.
9521
9522 2000-03-17 Akim Demaille <akim@epita.fr>
9523
9524 * src/reader.c (copy_at): New function.
9525 (copy_guard): Use it.
9526 (copy_action): Use it.
9527
9528 2000-03-17 Akim Demaille <akim@epita.fr>
9529
9530 Be kind to translators, save some useless translations.
9531
9532 * src/main.c (banner): New function.
9533 (fatal_banner): Use it.
9534 (warn_banner): Use it.
9535
9536 2000-03-17 Akim Demaille <akim@epita.fr>
9537
9538 * src/reader.c (copy_definition): Use copy_string and
9539 copy_comment. Removed now unused `match', `ended',
9540 `cplus_comment'.
9541 (copy_comment, copy_string): Moved, to be visible from
9542 copy_definition.
9543
9544 2000-03-17 Akim Demaille <akim@epita.fr>
9545
9546 * src/reader.c (copy_string): Declare `static inline'. No
9547 problems with inline, since it is checked by configure.
9548 (copy_comment): Likewise.
9549
9550 2000-03-17 Akim Demaille <akim@epita.fr>
9551
9552 * src/reader.c (packsymbols): Formatting changes.
9553
9554 2000-03-17 Akim Demaille <akim@epita.fr>
9555
9556 * src/reader.c (copy_comment): New function, factored out from:
9557 (copy_action): Use it. Removed now unused `match', `ended',
9558 `cplus_comment'.
9559 (copy_guard): Likewise.
9560
9561 2000-03-17 Akim Demaille <akim@epita.fr>
9562
9563 * src/reader.c (copy_string): New function, factored out from:
9564 (copy_action): Use it.
9565 (copy_guard): Likewise.
9566
9567 2000-03-17 Akim Demaille <akim@epita.fr>
9568
9569 Change the handling of @s so that they behave exactly like $s.
9570 There is now a pseudo variable @$ (readble and writable), location
9571 of the lhs of the rule (by default ranging from the location of
9572 the first symbol of the rhs, to the location of the last symbol,
9573 or, if the rhs is empty, YYLLOC).
9574
9575 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
9576 yyval.
9577 (yyparse): When providing a default semantic action, provide a
9578 default location action.
9579 (after the $): No longer change `*YYLSP', just stack YYLOC the
9580 same way you stack YYVAL.
9581 * src/reader.c (read_declarations): Use warns.
9582 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
9583 (copy_action, case '@'): Likewise.
9584 Use a standard error message, to save useless work from
9585 translators.
9586
9587 2000-03-17 Akim Demaille <akim@epita.fr>
9588
9589 * src/bison.s1: Formatting and cosmetics changes.
9590 * src/reader.c: Likewise.
9591 Update the Copyright notice.
9592
9593 2000-03-17 Akim Demaille <akim@epita.fr>
9594
9595 * src/bison.s1 (#line): All set to `#line' only, since the
9596 Makefile now handles them.
9597
9598 2000-03-16 Akim Demaille <akim@epita.fr>
9599
9600 * src/output.c (output_rule_data): Output the documentation of
9601 some of the tables.
9602 (Copyright notice): Update.
9603 Formatting changes.
9604
9605 2000-03-16 Akim Demaille <akim@epita.fr>
9606
9607 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
9608 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
9609 One `#if YYDEBUG' remains, since it uses variables which are
9610 defined only if `YYDEBUG != 0'.
9611
9612 2000-03-16 Akim Demaille <akim@epita.fr>
9613
9614 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
9615 and related variables so that the similarities are highlighted.
9616
9617 2000-03-16 Akim Demaille <akim@epita.fr>
9618
9619 * src/bison.s1: Properly indent CPP directives.
9620
9621 2000-03-16 Akim Demaille <akim@epita.fr>
9622
9623 * src/bison.s1: Properly indent the `alloca' CPP section.
9624
9625 2000-03-16 Akim Demaille <akim@epita.fr>
9626
9627 Do not hard code values of directories in `configure.in'.
9628 Update the `configure' tool chain.
9629
9630 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
9631 src/makefile.am.
9632 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
9633 (AC_OUTPUT): Add m4/Makefile.
9634 Bump to bison 1.28a, 1.29 has never been released.
9635 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
9636 handled via src/Makefile.am.
9637 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
9638 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
9639 autoheader.
9640 * Makefile.am (SUBDIRS): Add m4.
9641 (ACLOCAL_AM_FLAGS): New variable.
9642 (AUTOMAKE_OPTIONS): Add check-news.
9643 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
9644 the proper line number and file name.
9645 (DEFS): Propagate the location of bison library files and of the
9646 locale files.
9647 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
9648 builddir.
9649 * acinclude.m4: Remove, replaced by the directory m4.
9650 * m4/Makefile.am (EXTRA_DIST): New variable.
9651 * m4/gettext.m4: New file, from the fileutils.
9652 * m4/lcmessage.m4: Likewise
9653 * m4/progtest.m4: Likewise.
9654 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
9655
9656 2000-03-10 Akim Demaille <akim@epita.fr>
9657
9658 * src/closure.c:
9659 Formatting changes of various comments.
9660 Respect the GNU coding standards at various places.
9661 Don't use `_()' when no translation is needed.
9662
9663 1999-12-13 Jesse Thilo <jthilo@gnu.org>
9664
9665 * src/files.c:
9666 OS/2 honors TMPDIR environment variable.
9667
9668 1999-12-13 Jesse Thilo <jthilo@gnu.org>
9669
9670 * doc/bison.texinfo: Tweaked spelling and grammar.
9671 Updated ISBN.
9672 Removed reference to price of printed copy.
9673 Mention BISON_SIMPLE and BISON_HAIRY.
9674
9675 1999-12-13 Jesse Thilo <jthilo@gnu.org>
9676
9677 * configure.in, NEWS:
9678 Bison 1.29 released.
9679
9680 1999-10-27 Jesse Thilo <jthilo@gnu.org>
9681
9682 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
9683 Added reference card.
9684
9685 1999-07-26 Jesse Thilo <jthilo@gnu.org>
9686
9687 * po/ru.po: Added Russian translation.
9688
9689 1999-07-26 Jesse Thilo <jthilo@gnu.org>
9690
9691 * configure.in: Added Russian translation.
9692
9693 1999-07-06 Jesse Thilo <jthilo@gnu.org>
9694
9695 * configure.in, NEWS, README:
9696 Released version 1.28.
9697
9698 1999-06-14 Jesse Thilo <jthilo@gnu.org>
9699
9700 * src/system.h:
9701 Squashed redefinition warning on some systems.
9702
9703 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
9704 Have configure build version string instead of relying on ANSI string
9705 concatentation.
9706
9707 1999-06-14 Jesse Thilo <jthilo@gnu.org>
9708
9709 * po/POTFILES.in: Got rid of version.c.
9710
9711 1999-06-14 Jesse Thilo <jthilo@gnu.org>
9712
9713 * acconfig.h, configure.in:
9714 Have configure build version string instead of relying on ANSI string
9715 concatentation.
9716
9717 1999-06-08 Jesse Thilo <jthilo@gnu.org>
9718
9719 * doc/bison.1:
9720 Dropped mention of `+' for long-named options.
9721
9722 1999-05-30 Jesse Thilo <jthilo@gnu.org>
9723
9724 * src/files.c: Added <unistd.h> for unlink().
9725
9726 * src/Makefile.am, src/system.h:
9727 I18n fixes.
9728
9729 1999-05-30 Jesse Thilo <jthilo@gnu.org>
9730
9731 * README: Added a FAQ list.
9732
9733 * configure.in, acconfig.h:
9734 I18n fixes.
9735
9736 1999-05-30 Jesse Thilo <jthilo@gnu.org>
9737
9738 * doc/FAQ, doc/Makefile.am:
9739 Added a FAQ list.
9740
9741 1999-05-19 Jesse Thilo <jthilo@gnu.org>
9742
9743 * src/alloc.h, src/symtab.h, src/version.c:
9744 Protected inclusion of "config.h" with HAVE_CONFIG_H.
9745
9746 1999-04-18 Jesse Thilo <jthilo@gnu.org>
9747
9748 * src/.cvsignore, src/Makefile.am:
9749 Reorganized: sources in `src', documentation in `doc'.
9750
9751 * src/lex.c (literalchar):
9752 fixed the code for escaping double quotes (thanks
9753 Jonathan Czisny.)
9754
9755 1999-04-18 Jesse Thilo <jthilo@gnu.org>
9756
9757 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
9758 Adjusted paths to reflect directory reorganization.
9759
9760 1999-04-18 Jesse Thilo <jthilo@gnu.org>
9761
9762 * doc/.cvsignore, doc/Makefile.am:
9763 Reorganized: sources in `src', documentation in `doc'.
9764
9765 1999-04-18 Jesse Thilo <jthilo@gnu.org>
9766
9767 * configure.in:
9768 Updated AC_INIT file to reflect directory reorganization.
9769
9770 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
9771 Reorganized: sources in `src', documentation in `doc'.
9772
9773 1999-04-13 Jesse Thilo <jthilo@gnu.org>
9774
9775 * src/allocate.c:
9776 Don't declare calloc() and realloc() if not necessary.
9777
9778 1999-04-13 Jesse Thilo <jthilo@gnu.org>
9779
9780 * configure.in, acconfig.h, acinclude.m4:
9781 Don't declare calloc() and realloc() if not necessary.
9782
9783 1999-03-23 Jesse Thilo <jthilo@gnu.org>
9784
9785 * po/.cvsignore: Added i18n support.
9786
9787 1999-03-23 Jesse Thilo <jthilo@gnu.org>
9788
9789 * acconfig.h, configure.in, Makefile.am:
9790 Added i18n support.
9791
9792 1999-03-22 Jesse Thilo <jthilo@gnu.org>
9793
9794 * src/bison.s1: Fixed #line numbers.
9795
9796 1999-03-15 Jesse Thilo <jthilo@gnu.org>
9797
9798 * po/es.po, po/fr.po, po/nl.po, po/de.po:
9799 Added PO files from Translation Project.
9800
9801 1999-03-03 Jesse Thilo <jthilo@gnu.org>
9802
9803 * Makefile.am:
9804 Added support for non-ANSI compilers (ansi2knr).
9805
9806 1999-02-16 Jesse Thilo <jthilo@gnu.org>
9807
9808 * configure.in: Bumped version number to 1.27.
9809
9810 * Makefile.am:
9811 Added `bison.simple' to list of files removed by `make distclean'.
9812
9813 1999-02-12 Jesse Thilo <jthilo@gnu.org>
9814
9815 * src/files.c, src/files.h:
9816 Defined locations of parser files in config.h instead of Makefile.
9817
9818 1999-02-12 Jesse Thilo <jthilo@gnu.org>
9819
9820 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
9821 Defined locations of parser files in config.h instead of Makefile.
9822
9823 1999-02-09 Jesse Thilo <jthilo@gnu.org>
9824
9825 * Makefile.am:
9826 Removed inappropriate use of $< macro.
9827
9828 1999-02-05 Jesse Thilo <jthilo@gnu.org>
9829
9830 * po/Makefile.in.in, po/POTFILES.in:
9831 Add `po' directory skeleton.
9832
9833 1999-01-27 Jesse Thilo <jthilo@gnu.org>
9834
9835 * README: Document help-bison list.
9836
9837 * configure.in: Add check for mkstemp().
9838
9839 1999-01-20 Jesse Thilo <jthilo@gnu.org>
9840
9841 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
9842 Hush a few compiler warnings.
9843
9844 * src/files.c:
9845 Add tryclose(), which verifies that fclose was successful.
9846 Hush a couple of compiler warnings.
9847
9848 1999-01-20 Jesse Thilo <jthilo@gnu.org>
9849
9850 * Makefile.am, OChangeLog:
9851 ChangeLog is now automatically generated. Include the old version as
9852 OChangeLog.
9853
9854 1999-01-14 Jesse Thilo <jthilo@gnu.org>
9855
9856 * 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:
9857 Update FSF address.
9858
9859 1999-01-14 Jesse Thilo <jthilo@gnu.org>
9860
9861 * doc/bison.texinfo: Fix formatting glitch.
9862
9863 * doc/bison.texinfo: Update FSF address.
9864
9865 1999-01-14 Jesse Thilo <jthilo@gnu.org>
9866
9867 * acconfig.h: Update FSF address.
9868
9869 1999-01-08 Jesse Thilo <jthilo@gnu.org>
9870
9871 * src/system.h:
9872 Don't define PACKAGE here, since config.h defines it.
9873
9874 1998-12-30 Jesse Thilo <jthilo@gnu.org>
9875
9876 * src/reader.c: Update copyright date.
9877
9878 * src/main.c:
9879 Ditch sprintf to statically-sized buffers in fatal/warn functions in
9880 favor of output directly to stderr (avoids buffer overruns).
9881
9882 * src/reader.c: Some checks for premature EOF.
9883
9884 * 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:
9885 Use prototypes if the compiler understands them.
9886
9887 * src/files.c: Honor TMPDIR on Unix hosts.
9888 Use prototypes if the compiler understands them.
9889
9890 * src/reader.c:
9891 Fix a couple of buffer overrun bugs.
9892 Use prototypes if the compiler understands them.
9893
9894 * src/system.h: Include unistd.h and ctype.h.
9895 Use #ifdef instead of #if for NLS symbols.
9896
9897 1998-12-30 Jesse Thilo <jthilo@gnu.org>
9898
9899 * doc/bison.texinfo:
9900 Delete comment "consider using @set for edition number, etc..." since
9901 we now are doing so.
9902
9903 1998-12-30 Jesse Thilo <jthilo@gnu.org>
9904
9905 * configure.in:
9906 Use prototypes if the compiler understands them.
9907
9908 * NEWS: Document 1.26 highlights.
9909
9910 * Makefile.am: Require Automake 1.3 or later.
9911
9912 * acconfig.h:
9913 Use prototypes if the compiler understands them.
9914
9915 1998-12-29 Jesse Thilo <jthilo@gnu.org>
9916
9917 * src/version.c:
9918 Use VERSION symbol from automake for version number.
9919
9920 1998-12-29 Jesse Thilo <jthilo@gnu.org>
9921
9922 * acconfig.h, configure.in, version.cin:
9923 Use VERSION symbol from automake for version number.
9924
9925 1998-11-28 Jesse Thilo <jthilo@gnu.org>
9926
9927 * Makefile.am:
9928 Distribute original version of simple parser (bison.s1), not built
9929 version (bison.simple).
9930
9931 1998-11-28 Jesse Thilo <jthilo@gnu.org>
9932
9933 * doc/bison.texinfo: Add info dir entry.
9934
9935 * doc/bison.texinfo:
9936 Let automake put version number into documentation.
9937
9938 1998-11-26 Jesse Thilo <jthilo@gnu.org>
9939
9940 * src/bison.cld, src/build.com, src/vmshlp.mar:
9941 Add non-RCS files from /gd/gnu/bison.
9942
9943 1998-11-26 Jesse Thilo <jthilo@gnu.org>
9944
9945 * doc/bison.1:
9946 Document the BISON_HAIRY and BISON_SIMPLE variables.
9947
9948 1998-11-25 Jesse Thilo <jthilo@gnu.org>
9949
9950 * src/version.c: Build version.c automatically.
9951
9952 * src/reader.c:
9953 Fix token numbering (used to start at 258, not 257).
9954
9955 * src/system.h: Include config.h.
9956
9957 * src/getargs.c: Update bug report address.
9958
9959 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
9960 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
9961
9962 1998-11-25 Jesse Thilo <jthilo@gnu.org>
9963
9964 * Makefile.am:
9965 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
9966
9967 * configure.in, version.cin:
9968 Build version.c automatically.
9969
9970 * AUTHORS: Add AUTHORS file.
9971
9972 * README: Update bug report address.
9973
9974 * bison.simple:
9975 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
9976
9977 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
9978 Add automake stuff.
9979
9980 1998-11-25 Jesse Thilo <jthilo@gnu.org>
9981
9982 * doc/bison.texinfo: Clean up some formatting.
9983
9984 1998-05-05 Richard Stallman <rms@gnu.org>
9985
9986 * doc/bison.texinfo:
9987 Explain better why to make a pure parser.
9988
9989 1998-01-05 Richard Stallman <rms@gnu.org>
9990
9991 * src/files.c (openfiles):
9992 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
9993 find a temporary directory, if possible. Do not unlink files while
9994 they are open.
9995
9996 1997-08-25 Richard Stallman <rms@gnu.org>
9997
9998 * src/reader.c (stack_offset;):
9999 Change some warni to warns.
10000
10001 * src/lex.c (literalchar): Use warns, not warni.
10002
10003 1997-06-28 Richard Stallman <rms@gnu.org>
10004
10005 * src/bison.s1: Add a Bison version comment.
10006
10007 * src/main.c (fatal, warn, berror):
10008 Use program_name.
10009
10010 1997-06-28 Richard Stallman <rms@gnu.org>
10011
10012 * Makefile.in (bison_version): New variable.
10013 (dist): Use that variable.
10014 (bison.s1): Substitute the Bison version into bison.simple.
10015
10016 * bison.simple: Add a Bison version comment.
10017
10018 1997-06-18 Richard Stallman <rms@gnu.org>
10019
10020 * src/main.c (fatal, warn, berror):
10021 Make error messages standard.
10022 (toomany): Improve error message text.
10023
10024 * 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:
10025 new.h renamed to alloc.h.
10026
10027 1997-06-18 Richard Stallman <rms@gnu.org>
10028
10029 * Makefile.in: new.h renamed to alloc.h.
10030
10031 1997-05-24 Richard Stallman <rms@gnu.org>
10032
10033 * src/lex.c (literalchar):
10034 Fix the code for escaping \, " and '.
10035
10036 (lex): Avoid trouble when there are many chars
10037 to discard in a char literal with just several chars in it.
10038
10039 1997-05-17 Richard Stallman <rms@gnu.org>
10040
10041 * src/bison.s1:
10042 Use malloc, if using alloca is troublesome.
10043 (YYSTACK_USE_ALLOCA): New flag macro.
10044 Define it for some systems and compilers.
10045 (YYSTACK_ALLOC): New macro.
10046 (yyparse): Use YYSTACK_ALLOC to allocate stack.
10047 If it was malloc'd, free it.
10048
10049 1997-05-17 Richard Stallman <rms@gnu.org>
10050
10051 * bison.simple:
10052 Use malloc, if using alloca is troublesome.
10053 (YYSTACK_USE_ALLOCA): New flag macro.
10054 Define it for some systems and compilers.
10055 (YYSTACK_ALLOC): New macro.
10056 (yyparse): Use YYSTACK_ALLOC to allocate stack.
10057 If it was malloc'd, free it.
10058
10059 1997-04-23 Richard Stallman <rms@gnu.org>
10060
10061 * src/bison.s1:
10062 (alloca) [__hpux]: Always define as __builtin_alloca.
10063
10064 1997-04-23 Richard Stallman <rms@gnu.org>
10065
10066 * bison.simple:
10067 (alloca) [__hpux]: Always define as __builtin_alloca.
10068
10069 1997-04-22 Richard Stallman <rms@gnu.org>
10070
10071 * src/bison.s1:
10072 [__hpux]: Include alloca.h (right for HPUX 10)
10073 instead of declaring alloca (right for HPUX 9).
10074
10075 * src/bison.s1 (__yy_memcpy):
10076 Declare arg `count' as unsigned int.
10077 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
10078
10079 1997-04-22 Richard Stallman <rms@gnu.org>
10080
10081 * bison.simple:
10082 [__hpux]: Include alloca.h (right for HPUX 10)
10083 instead of declaring alloca (right for HPUX 9).
10084
10085 * bison.simple (__yy_memcpy):
10086 Declare arg `count' as unsigned int.
10087 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
10088
10089 1997-01-03 Richard Stallman <rms@gnu.org>
10090
10091 * src/allocate.c: [__STDC__ or _MSC_VER]:
10092 Declare calloc and realloc to return void *.
10093
10094 1997-01-02 Richard Stallman <rms@gnu.org>
10095
10096 * src/system.h:
10097 [_MSC_VER]: Include stdlib.h and process.h.
10098 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
10099
10100 * src/main.c (main): Return FAILURE as a value.
10101 (printable_version): Declare arg as int, not char.
10102
10103 1997-01-02 Richard Stallman <rms@gnu.org>
10104
10105 * Makefile.in (dist):
10106 Explicitly check for symlinks, and copy them.
10107
10108 1996-12-19 Richard Stallman <rms@gnu.org>
10109
10110 * src/files.c:
10111 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
10112
10113 1996-12-18 Paul Eggert <eggert@gnu.org>
10114
10115 * src/bison.s1 (yyparse):
10116 If __GNUC__ and YYPARSE_PARAM are both defined,
10117 declare yyparse to have a void * argument.
10118
10119 1996-12-18 Paul Eggert <eggert@gnu.org>
10120
10121 * bison.simple (yyparse):
10122 If __GNUC__ and YYPARSE_PARAM are both defined,
10123 declare yyparse to have a void * argument.
10124
10125 1996-12-17 Richard Stallman <rms@gnu.org>
10126
10127 * src/reduce.c (nbits): Add some casts.
10128
10129 1996-08-12 Richard Stallman <rms@gnu.org>
10130
10131 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
10132
10133 1996-08-12 Richard Stallman <rms@gnu.org>
10134
10135 * bison.simple: Test _MSDOS as well as _MSDOS_.
10136
10137 1996-07-31 Richard Stallman <rms@gnu.org>
10138
10139 * src/bison.s1:
10140 [__sun && __i386]: Include alloca.h.
10141
10142 1996-07-31 Richard Stallman <rms@gnu.org>
10143
10144 * bison.simple:
10145 [__sun && __i386]: Include alloca.h.
10146
10147 1996-07-30 Richard Stallman <rms@gnu.org>
10148
10149 * src/bison.s1: Comment change.
10150
10151 * src/bison.s1: Test _MSDOS_, not MSDOS.
10152
10153 1996-07-30 Richard Stallman <rms@gnu.org>
10154
10155 * bison.simple: Comment change.
10156
10157 * bison.simple: Test _MSDOS_, not MSDOS.
10158
10159 1996-06-01 Richard Stallman <rms@gnu.org>
10160
10161 * 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:
10162 Insert `_' macro around many string constants.
10163
10164 * src/main.c:
10165 Insert `_' macro around many string constants.
10166
10167 (main): Call setlocale, bindtextdomain and textdomain.
10168
10169 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
10170 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
10171 [ENABLE_NLS]: Include libintl.h.
10172 [ENABLE_NLS] (gettext): Define.
10173 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
10174 (N_, PACKAGE, LOCALEDIR): New macros.
10175
10176 1996-06-01 Richard Stallman <rms@gnu.org>
10177
10178 * POTFILES.in: New file.
10179
10180 * Makefile.in (allocate.o):
10181 Define target explicitly.
10182
10183 * Makefile.in (CFLAGS): Set to @CFLAGS@.
10184 (LDFLAGS): Set to @LDFLAGS@.
10185 (configure): Run autoconf only if preceding `cd' succeeds.
10186 (bison.s1): Redirect output to temporary file then move the
10187 temporary to the target, rather than redirecting directly to bison.s1.
10188 (clean): Remove config.status and config.log.
10189 (distclean): Don't remove config.status here.
10190
10191 1996-05-12 Richard Stallman <rms@gnu.org>
10192
10193 * src/bison.s1:
10194 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
10195
10196 1996-05-12 Richard Stallman <rms@gnu.org>
10197
10198 * bison.simple:
10199 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
10200
10201 1996-05-11 Richard Stallman <rms@gnu.org>
10202
10203 * src/bison.s1 (__yy_memcpy):
10204 Really reorder the args, as was supposedly done on Feb 14 1995.
10205 (yyparse): Calls changed accordingly.
10206
10207 1996-05-11 Richard Stallman <rms@gnu.org>
10208
10209 * Makefile.in (dist): Don't use $(srcdir).
10210
10211 * bison.simple (__yy_memcpy):
10212 Really reorder the args, as was supposedly done on Feb 14 1995.
10213 (yyparse): Calls changed accordingly.
10214
10215 1996-01-27 Richard Stallman <rms@gnu.org>
10216
10217 * src/output.c (output_rule_data):
10218 Test YYERROR_VERBOSE in the conditional
10219 around the definition of ttyname.
10220
10221 1995-12-29 Richard Stallman <rms@gnu.org>
10222
10223 * src/bison.s1:
10224 Fix line numbers in #line commands.
10225
10226 1995-12-29 Richard Stallman <rms@gnu.org>
10227
10228 * bison.simple:
10229 Fix line numbers in #line commands.
10230
10231 1995-12-27 Richard Stallman <rms@gnu.org>
10232
10233 * src/bison.s1 (YYPARSE_PARAM_DECL):
10234 In C++, make it always null.
10235 (YYPARSE_PARAM_ARG): New macro.
10236 (yyparse): Use YYPARSE_PARAM_ARG.
10237
10238 1995-12-27 Richard Stallman <rms@gnu.org>
10239
10240 * bison.simple (YYPARSE_PARAM_DECL):
10241 In C++, make it always null.
10242 (YYPARSE_PARAM_ARG): New macro.
10243 (yyparse): Use YYPARSE_PARAM_ARG.
10244
10245 1995-11-29 Richard Stallman <rms@gnu.org>
10246
10247 * doc/bison.texinfo:
10248 Describe literal string tokens, %raw, %no_lines, %token_table.
10249
10250 1995-11-29 Daniel Hagerty <hag@gnu.org>
10251
10252 * doc/bison.texinfo: Fixed update date
10253
10254 1995-10-16 Richard Stallman <rms@gnu.org>
10255
10256 * src/version.c: Version 1.25.
10257
10258 1995-10-16 Richard Stallman <rms@gnu.org>
10259
10260 * NEWS: *** empty log message ***
10261
10262 1995-10-16 Richard Stallman <rms@gnu.org>
10263
10264 * doc/bison.1, doc/bison.rnh:
10265 Add new options.
10266
10267 1995-10-15 Richard Stallman <rms@gnu.org>
10268
10269 * src/vmsgetargs.c, src/getargs.c:
10270 Added -n, -k, and -raw switches.
10271 (noparserflag, toknumflag, rawtoknumflag): New variables.
10272
10273 * src/symtab.h (SALIAS):
10274 New #define for adding aliases to %token.
10275 (struct bucket): Added `alias' field.
10276
10277 * src/reduce.c (reduce_grammar):
10278 Revise error message.
10279 (print_notices): Remove final `.' from error message.
10280
10281 * src/reader.c (reader_output_yylsp):
10282 New function.
10283 (readgram): Use `#if 0' around code that accepted %command
10284 inside grammar rules: The documentation doesn't allow it,
10285 and it will fail since the %command processors scan for the next %.
10286 (parse_token_decl): Extended the %token
10287 declaration to allow a multi-character symbol as an alias.
10288 (parse_thong_decl): New function.
10289 (read_declarations): Added %thong declarations.
10290 (read_declarations): Handle NOOP to deal with allowing
10291 % declarations as another means to specify the flags.
10292 (readgram): Allow %prec prior to semantics embedded in a rule.
10293 (skip_to_char, read_declarations, copy_definition)
10294 (parse_token_decl, parse_start_decl, parse_type_decl)
10295 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
10296 (get_type_name, copy_guard, copy_action, readgram)
10297 (get_type, packsymbols): Revised most error messages.
10298 Changed `fatal' to `warnxxx' to avoid aborting for error.
10299 Revised and use multiple warnxxx functions to avoid using VARARGS1.
10300 (read_declarations): Improve the error message for
10301 an invalid character. Do not abort.
10302 (read_declarations, copy_guard, copy_action): Use
10303 printable_version to avoid unprintable characters in printed output.
10304 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
10305 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
10306 Allow the type of a non-terminal can be given
10307 more than once, as long as all specifications give the same type.
10308
10309 * src/output.c:
10310 (output_headers, output_trailers, output, output_gram)
10311 (output_rule_data): Implement noparserflag variable.
10312 Implement toknumflag variable.
10313 (output): Call reader_output_yylsp to output LTYPESTR.
10314
10315 * src/main.c (main):
10316 If reader sees an error, don't process the grammar.
10317 (fatals): Updated to not use VARARGS1.
10318 (printable_version, int_to_string, warn, warni, warns, warnss)
10319 (warnsss): New error reporting functions. Avoid abort for error.
10320
10321 * src/lex.h:
10322 Added THONG and NOOP for alias processing.
10323 Added SETOPT for the new code that allows setting options with %flags.
10324
10325 * src/lex.c:
10326 Include getopt.h. Add some extern decls.
10327 (safegetc): New function to deal with EOF gracefully.
10328 (literalchar); new function to deal with reading \ escapes.
10329 (lex): Use literalchar.
10330 (lex): Implemented "..." tokens.
10331 (literalchar, lex, parse_percent_token): Made tokenbuffer
10332 always contain the token. This includes growing the token
10333 buffer while reading an integer.
10334 (parse_percent_token): Replaced if-else statement with percent_table.
10335 (parse_percent_token): Added % declarations as another
10336 way to specify the flags -n, -l, and -r. Also added hooks for
10337 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
10338 major changes to files.c.
10339 (lex) Retain in the incoming stream a character following
10340 an incorrect '/'.
10341 (skip_white_space, lex): Revised most error messages
10342 and changed fatal to warn to avoid aborting.
10343 (percent_table): Added %thong declarations.
10344
10345 * src/gram.h: Comment changes.
10346
10347 * src/files.c (openfiles, open_extra_files, done):
10348 Add faction flag
10349 and actfile file. Handle noparserflag. Both for -n switch.
10350
10351 * src/conflicts.c (resolve_sr_conflict):
10352 Remove use of alloca.
10353
10354 1995-06-01 Jim Meyering <meyering@gnu.org>
10355
10356 * doc/bison.texinfo: *** empty log message ***
10357
10358 1995-05-06 Richard Stallman <rms@gnu.org>
10359
10360 * src/bison.s1: Comment change.
10361
10362 1995-05-06 Richard Stallman <rms@gnu.org>
10363
10364 * bison.simple: Comment change.
10365
10366 1995-05-03 Richard Stallman <rms@gnu.org>
10367
10368 * src/version.c: Version now 1.24.
10369
10370 * src/bison.s1: Change distribution terms.
10371
10372 * src/version.c: Version now 1.23.
10373
10374 1995-05-03 Richard Stallman <rms@gnu.org>
10375
10376 * doc/bison.texinfo:
10377 Rewrite "Conditions for Using Bison".
10378 Update version to 1.24.
10379
10380 1995-05-03 Richard Stallman <rms@gnu.org>
10381
10382 * bison.simple: Change distribution terms.
10383
10384 1995-02-23 Richard Stallman <rms@gnu.org>
10385
10386 * src/files.c: Test __VMS_POSIX as well as VMS.
10387
10388 1995-02-14 Jim Meyering <meyering@gnu.org>
10389
10390 * src/bison.s1 (__yy_memcpy):
10391 Renamed from __yy_bcopy to avoid
10392 confusion. Reverse FROM and TO arguments to be consistent with
10393 those of memcpy.
10394
10395 1995-02-14 Jim Meyering <meyering@gnu.org>
10396
10397 * bison.simple (__yy_memcpy):
10398 Renamed from __yy_bcopy to avoid
10399 confusion. Reverse FROM and TO arguments to be consistent with
10400 those of memcpy.
10401
10402 1994-11-10 David J. MacKenzie <djm@gnu.org>
10403
10404 * NEWS: reformat
10405
10406 * NEWS: New file.
10407
10408 * Makefile.in (DISTFILES): Include NEWS.
10409
10410 * Makefile.in (DISTFILES):
10411 Include install-sh, not install.sh.
10412
10413 * configure.in: Update to Autoconf v2 macro names.
10414
10415 1994-10-05 David J. MacKenzie <djm@gnu.org>
10416
10417 * Makefile.in: fix typo
10418
10419 * Makefile.in (prefix, exec_prefix):
10420 Let configure set them.
10421
10422 1994-09-28 David J. MacKenzie <djm@gnu.org>
10423
10424 * Makefile.in: Set datadir to $(prefix)/share.
10425
10426 1994-09-15 Richard Stallman <rms@gnu.org>
10427
10428 * src/bison.s1:
10429 Update copyright notice and GPL version.
10430
10431 1994-09-15 Richard Stallman <rms@gnu.org>
10432
10433 * bison.simple:
10434 Update copyright notice and GPL version.
10435
10436 1994-07-12 Richard Stallman <rms@gnu.org>
10437
10438 * src/reduce.c, src/reader.c:
10439 entered into RCS
10440
10441 1994-05-05 David J. MacKenzie <djm@gnu.org>
10442
10443 * Makefile.in: entered into RCS
10444
10445 1994-03-26 Richard Stallman <rms@gnu.org>
10446
10447 * src/bison.s1: entered into RCS
10448
10449 1994-03-26 Richard Stallman <rms@gnu.org>
10450
10451 * bison.simple: entered into RCS
10452
10453 1994-03-25 Richard Stallman <rms@gnu.org>
10454
10455 * src/main.c: entered into RCS
10456
10457 1994-03-24 Richard Stallman <rms@gnu.org>
10458
10459 * src/conflicts.c: entered into RCS
10460
10461 1994-01-02 Richard Stallman <rms@gnu.org>
10462
10463 * Makefile.in: *** empty log message ***
10464
10465 1993-11-21 Richard Stallman <rms@gnu.org>
10466
10467 * src/bison.s1: *** empty log message ***
10468
10469 1993-11-21 Richard Stallman <rms@gnu.org>
10470
10471 * doc/bison.texinfo: entered into RCS
10472
10473 * doc/bison.texinfo: *** empty log message ***
10474
10475 1993-11-21 Richard Stallman <rms@gnu.org>
10476
10477 * bison.simple: *** empty log message ***
10478
10479 1993-10-25 David J. MacKenzie <djm@gnu.org>
10480
10481 * doc/bison.texinfo: *** empty log message ***
10482
10483 1993-10-19 Richard Stallman <rms@gnu.org>
10484
10485 * src/bison.s1: *** empty log message ***
10486
10487 1993-10-19 Richard Stallman <rms@gnu.org>
10488
10489 * bison.simple: *** empty log message ***
10490
10491 1993-10-14 Richard Stallman <rms@gnu.org>
10492
10493 * src/bison.s1: *** empty log message ***
10494
10495 1993-10-14 Richard Stallman <rms@gnu.org>
10496
10497 * bison.simple: *** empty log message ***
10498
10499 1993-09-14 David J. MacKenzie <djm@gnu.org>
10500
10501 * doc/bison.texinfo: *** empty log message ***
10502
10503 1993-09-13 Noah Friedman <friedman@gnu.org>
10504
10505 * Makefile.in: *** empty log message ***
10506
10507 1993-09-10 Richard Stallman <rms@gnu.org>
10508
10509 * src/conflicts.c: *** empty log message ***
10510
10511 * src/system.h: entered into RCS
10512
10513 1993-09-10 Richard Stallman <rms@gnu.org>
10514
10515 * doc/bison.1: entered into RCS
10516
10517 1993-09-06 Noah Friedman <friedman@gnu.org>
10518
10519 * src/version.c: entered into RCS
10520
10521 1993-09-06 Noah Friedman <friedman@gnu.org>
10522
10523 * Makefile.in: *** empty log message ***
10524
10525 1993-07-30 David J. MacKenzie <djm@gnu.org>
10526
10527 * Makefile.in: *** empty log message ***
10528
10529 1993-07-24 Richard Stallman <rms@gnu.org>
10530
10531 * src/bison.s1: *** empty log message ***
10532
10533 1993-07-24 Richard Stallman <rms@gnu.org>
10534
10535 * bison.simple: *** empty log message ***
10536
10537 1993-07-08 David J. MacKenzie <djm@gnu.org>
10538
10539 * Makefile.in: *** empty log message ***
10540
10541 1993-07-04 Richard Stallman <rms@gnu.org>
10542
10543 * src/bison.s1: *** empty log message ***
10544
10545 1993-07-04 Richard Stallman <rms@gnu.org>
10546
10547 * bison.simple: *** empty log message ***
10548
10549 1993-06-26 David J. MacKenzie <djm@gnu.org>
10550
10551 * src/getargs.c: entered into RCS
10552
10553 1993-06-26 David J. MacKenzie <djm@gnu.org>
10554
10555 * doc/bison.texinfo: *** empty log message ***
10556
10557 * doc/bison.1: New file.
10558
10559 1993-06-25 Richard Stallman <rms@gnu.org>
10560
10561 * src/getargs.c: New file.
10562
10563 1993-06-16 Richard Stallman <rms@gnu.org>
10564
10565 * src/bison.s1: *** empty log message ***
10566
10567 1993-06-16 Richard Stallman <rms@gnu.org>
10568
10569 * bison.simple: *** empty log message ***
10570
10571 1993-06-03 Richard Stallman <rms@gnu.org>
10572
10573 * src/bison.s1: New file.
10574
10575 1993-06-03 Richard Stallman <rms@gnu.org>
10576
10577 * doc/bison.texinfo: *** empty log message ***
10578
10579 1993-06-03 Richard Stallman <rms@gnu.org>
10580
10581 * bison.simple: New file.
10582
10583 1993-05-19 Richard Stallman <rms@gnu.org>
10584
10585 * doc/bison.texinfo: New file.
10586
10587 1993-05-07 Noah Friedman <friedman@gnu.org>
10588
10589 * Makefile.in: *** empty log message ***
10590
10591 1993-04-28 Noah Friedman <friedman@gnu.org>
10592
10593 * src/reader.c: *** empty log message ***
10594
10595 1993-04-23 Noah Friedman <friedman@gnu.org>
10596
10597 * src/alloc.h: entered into RCS
10598
10599 1993-04-20 David J. MacKenzie <djm@gnu.org>
10600
10601 * src/version.c: *** empty log message ***
10602
10603 * src/files.c, src/allocate.c:
10604 entered into RCS
10605
10606 * src/reader.c: *** empty log message ***
10607
10608 * src/lex.c: entered into RCS
10609
10610 * src/conflicts.c: New file.
10611
10612 * src/symtab.c: entered into RCS
10613
10614 * src/alloc.h: New file.
10615
10616 * src/LR0.c: entered into RCS
10617
10618 1993-04-18 Noah Friedman <friedman@gnu.org>
10619
10620 * src/reader.c: New file.
10621
10622 * src/version.c: *** empty log message ***
10623
10624 1993-04-18 Noah Friedman <friedman@gnu.org>
10625
10626 * Makefile.in: *** empty log message ***
10627
10628 1993-04-17 Noah Friedman <friedman@gnu.org>
10629
10630 * Makefile.in: *** empty log message ***
10631
10632 1993-04-15 Richard Stallman <rms@gnu.org>
10633
10634 * src/main.c, src/files.c:
10635 New file.
10636
10637 1993-04-15 Noah Friedman <friedman@gnu.org>
10638
10639 * configure.in: entered into RCS
10640
10641 * configure.in: *** empty log message ***
10642
10643 * configure.in: New file.
10644
10645 1993-04-14 Richard Stallman <rms@gnu.org>
10646
10647 * Makefile.in: New file.
10648
10649 1993-04-13 Richard Stallman <rms@gnu.org>
10650
10651 * src/version.c: New file.
10652
10653 1993-03-25 Richard Stallman <rms@gnu.org>
10654
10655 * src/output.c: entered into RCS
10656
10657 1992-09-25 Richard Stallman <rms@gnu.org>
10658
10659 * configure.bat: entered into RCS
10660
10661 1992-06-22 Richard Stallman <rms@gnu.org>
10662
10663 * src/vmsgetargs.c: entered into RCS
10664
10665 1992-06-22 Richard Stallman <rms@gnu.org>
10666
10667 * doc/bison.rnh: entered into RCS
10668
10669 1992-04-20 David J. MacKenzie <djm@gnu.org>
10670
10671 * README: entered into RCS
10672
10673 1992-01-22 Richard Stallman <rms@gnu.org>
10674
10675 * src/machine.h: entered into RCS
10676
10677 1991-12-21 Richard Stallman <rms@gnu.org>
10678
10679 * src/lalr.c, src/closure.c:
10680 entered into RCS
10681
10682 1991-12-20 Richard Stallman <rms@gnu.org>
10683
10684 * src/state.h: entered into RCS
10685
10686 1991-12-18 Richard Stallman <rms@gnu.org>
10687
10688 * src/print.c, src/nullable.c, src/derives.c:
10689 entered into RCS
10690
10691 1991-11-03 David J. MacKenzie <djm@gnu.org>
10692
10693 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
10694 entered into RCS
10695
10696 1988-09-09 Richard Stallman <rms@gnu.org>
10697
10698 * src/bison.hairy: entered into RCS
10699
10700 1987-12-16 Richard Stallman <rms@gnu.org>
10701
10702 * REFERENCES: entered into RCS
10703
10704 -----
10705
10706 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
10707 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
10708
10709 This file is part of Bison, the GNU Compiler Compiler.
10710
10711 Bison is free software; you can redistribute it and/or modify
10712 it under the terms of the GNU General Public License as published by
10713 the Free Software Foundation; either version 2, or (at your option)
10714 any later version.
10715
10716 Bison is distributed in the hope that it will be useful,
10717 but WITHOUT ANY WARRANTY; without even the implied warranty of
10718 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10719 GNU General Public License for more details.
10720
10721 You should have received a copy of the GNU General Public License
10722 along with Bison; see the file COPYING. If not, write to
10723 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
10724 Boston, MA 02111-1307, USA.